Skip to main content

Module iota::auth_context

use iota::address; use iota::hash; use iota::hex; use iota::intent; use iota::object; use iota::ptb_call_arg; use iota::ptb_command; use iota::tx_context; use std::address; use std::ascii; use std::bcs; use std::option; use std::string; use std::type_name; use std::vector;

Struct AuthContext

public struct AuthContext has drop

Fields
auth_digest: vector<u8>

The digest of the MoveAuthenticator

tx_inputs: vector<iota::ptb_call_arg::CallArg>

The transaction input objects or primitive values

tx_commands: vector<iota::ptb_command::Command>

The transaction commands to be executed sequentially.

Function digest

public fun digest(_ctx: &iota::auth_context::AuthContext): &vector

Implementation

public fun digest(_ctx: &AuthContext): &vector { native_digest() }

Function tx_inputs

public fun tx_inputs(_ctx: &iota::auth_context::AuthContext): &vector<iota::ptb_call_arg::CallArg>

Implementation

public fun tx_inputs(_ctx: &AuthContext): &vector { native_tx_inputs() }

Function tx_commands

public fun tx_commands(_ctx: &iota::auth_context::AuthContext): &vector<iota::ptb_command::Command>

Implementation

public fun tx_commands(_ctx: &AuthContext): &vector { native_tx_commands() }

Function tx_data_bytes

Returns bcs::to_bytes(TransactionData).

public fun tx_data_bytes(_ctx: &iota::auth_context::AuthContext): &vector

Implementation

public fun tx_data_bytes(_ctx: &AuthContext): &vector { native_tx_data_bytes() }

Function intent_tx_data_bytes

Returns bcs::to_bytes(IntentMessage<TransactionData>), i.e., the IOTA transaction intent bytes prepended to the BCS-serialized TransactionData.

public fun intent_tx_data_bytes(ctx: &iota::auth_context::AuthContext): vector<u8>

Implementation

public fun intent_tx_data_bytes(ctx: &AuthContext): vector<u8> { let mut result = intent::iota_transaction().to_bytes(); result.append(*ctx.tx_data_bytes()); result }

Function signing_digest

Returns Blake2b256(bcs::to_bytes(IntentMessage<TransactionData>)). This is the message that protocol generic signatures sign over.

public fun signing_digest(ctx: &iota::auth_context::AuthContext): vector<u8>

Implementation

public fun signing_digest(ctx: &AuthContext): vector<u8> { let intent_msg = ctx.intent_tx_data_bytes(); hash::blake2b256(&intent_msg) }

Function native_digest

fun native_digest(): &vector

Implementation

native fun native_digest(): &vector;

Function native_tx_data_bytes

fun native_tx_data_bytes(): &vector

Implementation

native fun native_tx_data_bytes(): &vector;

Function native_tx_inputs

fun native_tx_inputs<I>(): &vector

Implementation

native fun native_tx_inputs<I>(): &vector;

Function native_tx_commands

fun native_tx_commands<C>(): &vector

Implementation

native fun native_tx_commands<C>(): &vector;