iota_sdk
_UniffiRustBuffer Objects
class _UniffiRustBuffer(ctypes.Structure)
alloc_with_builder
@contextlib.contextmanager
def alloc_with_builder(*args)
Context-manger to allocate a buffer using a _UniffiRustBufferBuilder.
The allocated buffer will be automatically freed if an error occurs, ensuring that we don't accidentally leak it.
consume_with_stream
@contextlib.contextmanager
def consume_with_stream()
Context-manager to consume a buffer using a _UniffiRustBufferStream.
The _UniffiRustBuffer will be freed once the context-manager exits, ensuring that we don't leak it even if an error occurs.
read_with_stream
@contextlib.contextmanager
def read_with_stream()
Context-manager to read a buffer using a _UniffiRustBufferStream.
This is like consume_with_stream, but doesn't free the buffer afterwards.
It should only be used with borrowed _UniffiRustBuffer data.
ActiveJwk Objects
class ActiveJwk()
A new Jwk
BCS
The BCS serialized form for this type is defined by the following ABNF:
active-jwk = jwk-id jwk u64
jwk_id
Identifier used to uniquely identify a Jwk
jwk
The Jwk
epoch
Most recent epoch in which the jwk was validated
AuthenticatorStateExpire Objects
class AuthenticatorStateExpire()
Expire old JWKs
BCS
The BCS serialized form for this type is defined by the following ABNF:
authenticator-state-expire = u64 u64
min_epoch
Expire JWKs that have a lower epoch than this
authenticator_obj_initial_shared_version
The initial version of the authenticator object that it was shared at.
AuthenticatorStateUpdateV1 Objects
class AuthenticatorStateUpdateV1()
Update the set of valid JWKs
BCS
The BCS serialized form for this type is defined by the following ABNF:
authenticator-state-update = u64 ; epoch
u64 ; round
(vector active-jwk)
u64 ; initial version of the authenticator object
epoch
Epoch of the authenticator state update transaction
round
Consensus round of the authenticator state update
new_active_jwks
newly active jwks
ChangedObject Objects
class ChangedObject()
Input/output state of an object that was changed during execution
BCS
The BCS serialized form for this type is defined by the following ABNF:
changed-object = object-id object-in object-out id-operation
object_id
Id of the object
input_state
State of the object in the store prior to this transaction.
output_state
State of the object in the store after this transaction.
id_operation
Whether this object ID is created or deleted in this transaction. This information isn't required by the protocol but is useful for providing more detailed semantics on object changes.
CheckpointSummaryPage Objects
class CheckpointSummaryPage()
A page of items returned by the GraphQL server.
page_info
Information about the page, such as the cursor and whether there are more pages.
data
The data returned by the server.
CoinMetadata Objects
class CoinMetadata()
The coin metadata associated with the given coin type.
address
The CoinMetadata object ID.
decimals
The number of decimal places used to represent the token.
description
Optional description of the token, provided by the creator of the token.
icon_url
Icon URL of the coin.
name
Full, official name of the token.
symbol
The token's identifying abbreviation.
supply
The overall quantity of tokens that will be issued.
version
Version of the token.
CoinPage Objects
class CoinPage()
A page of items returned by the GraphQL server.
page_info
Information about the page, such as the cursor and whether there are more pages.
data
The data returned by the server.
DryRunEffect Objects
class DryRunEffect()
Effects of a single command in the dry run, including mutated references and return values.
mutated_references
Changes made to arguments that were mutably borrowed by this command.
return_values
Return results of this command.
DryRunMutation Objects
class DryRunMutation()
A mutation to an argument that was mutably borrowed by a command.
input
The transaction argument that was mutated.
type_tag
The Move type of the mutated value.
bcs
The BCS representation of the mutated value.
DryRunResult Objects
class DryRunResult()
The result of a simulation (dry run), which includes the effects of the transaction, any errors that may have occurred, and intermediate results for each command.
error
The error that occurred during dry run execution, if any.
results
The intermediate results for each command of the dry run execution, including contents of mutated references and return values.
transaction
The transaction block representing the dry run execution.
effects
The effects of the transaction execution.
DryRunReturn Objects
class DryRunReturn()
A return value from a command in the dry run.
type_tag
The Move type of the return value.
bcs
The BCS representation of the return value.
DynamicFieldName Objects
class DynamicFieldName()
The name part of a dynamic field, including its type, bcs, and json representation.
type_tag
The type name of this dynamic field name
bcs
The bcs bytes of this dynamic field name
json
The json representation of the dynamic field name
DynamicFieldOutput Objects
class DynamicFieldOutput()
The output of a dynamic field query, that includes the name, value, and value's json representation.
name
The name of the dynamic field
value
The dynamic field value typename and bcs
value_as_json
The json representation of the dynamic field value object
DynamicFieldOutputPage Objects
class DynamicFieldOutputPage()
A page of items returned by the GraphQL server.
page_info
Information about the page, such as the cursor and whether there are more pages.
data
The data returned by the server.
DynamicFieldValue Objects
class DynamicFieldValue()
The value part of a dynamic field.
EndOfEpochData Objects
class EndOfEpochData()
Data which, when included in a [CheckpointSummary], signals the end of an
Epoch.
BCS
The BCS serialized form for this type is defined by the following ABNF:
end-of-epoch-data = (vector validator-committee-member) ; next_epoch_committee
u64 ; next_epoch_protocol_version
(vector checkpoint-commitment) ; epoch_commitments
Epoch Objects
class Epoch()
epoch_id
The epoch's id as a sequence number that starts at 0 and is incremented by one at every epoch change.
fund_inflow
The storage fees paid for transactions executed during the epoch.
fund_outflow
The storage fee rebates paid to users who deleted the data associated with past transactions.
fund_size
The storage fund available in this epoch. This fund is used to redistribute storage fees from past transactions to future validators.
live_object_set_digest
A commitment by the committee at the end of epoch on the contents of the live object set at that time. This can be used to verify state snapshots.
net_inflow
The difference between the fund inflow and outflow, representing the net amount of storage fees accumulated in this epoch.
protocol_configs
The epoch's corresponding protocol configuration, including the feature flags and the configuration options.
reference_gas_price
The minimum gas price that a quorum of validators are guaranteed to sign a transaction for.
start_timestamp
The epoch's starting timestamp.
end_timestamp
The epoch's ending timestamp. Note that this is available only on epochs that have ended.
system_state_version
The value of the version field of 0x5, the
0x3::iota::IotaSystemState object. This version changes whenever
the fields contained in the system state object (held in a dynamic
field attached to 0x5) change.
total_checkpoints
The total number of checkpoints in this epoch.
total_gas_fees
The total amount of gas fees (in IOTA) that were paid in this epoch.
total_stake_rewards
The total IOTA rewarded as stake.
total_transactions
The total number of transaction in this epoch.
validator_set
Validator related properties. For active validators, see
active_validators API.
For epochs other than the current the data provided refer to the start
of the epoch.
EpochPage Objects
class EpochPage()
A page of items returned by the GraphQL server.
page_info
Information about the page, such as the cursor and whether there are more pages.
data
The data returned by the server.
Event Objects
class Event()
An event
BCS
The BCS serialized form for this type is defined by the following ABNF:
event = object-id identifier address struct-tag bytes
package_id
Package id of the top-level function invoked by a MoveCall command which triggered this event to be emitted.
module
Module name of the top-level function invoked by a MoveCall command which triggered this event to be emitted.
sender
Address of the account that sent the transaction where this event was emitted.
type
The type of the event emitted
contents
BCS serialized bytes of the event
timestamp
UTC timestamp in milliseconds since epoch (1/1/1970)
data
Structured contents of a Move value
json
Representation of a Move value in JSON
EventPage Objects
class EventPage()
A page of items returned by the GraphQL server.
page_info
Information about the page, such as the cursor and whether there are more pages.
data
The data returned by the server.
GasCostSummary Objects
class GasCostSummary()
Summary of gas charges.
Storage is charged independently of computation.
There are 3 parts to the storage charges:
storage_cost: it is the charge of storage at the time the transaction is
executed. The cost of storage is the number of bytes of the
objects being mutated multiplied by a variable storage cost
per byte storage_rebate: this is the amount a user gets back when
manipulating an object. The storage_rebate is the
storage_cost for an object minus fees. non_refundable_storage_fee: not
all the value of the object storage cost is
given back to user and there is a small fraction that
is kept by the system. This value tracks that charge.
When looking at a gas cost summary the amount charged to the user is
computation_cost + storage_cost - storage_rebate
and that is the amount that is deducted from the gas coins.
non_refundable_storage_fee is collected from the objects being
mutated/deleted and it is tracked by the system in storage funds.
Objects deleted, including the older versions of objects mutated, have the
storage field on the objects added up to a pool of "potential rebate". This
rebate then is reduced by the "nonrefundable rate" such that:
potential_rebate(storage cost of deleted/mutated objects) = storage_rebate + non_refundable_storage_fee
BCS
The BCS serialized form for this type is defined by the following ABNF:
gas-cost-summary = u64 ; computation-cost
u64 ; storage-cost
u64 ; storage-rebate
u64 ; non-refundable-storage-fee
computation_cost
Cost of computation/execution
computation_cost_burned
The burned component of the computation/execution costs
storage_cost
Storage cost, it's the sum of all storage cost for all objects created or mutated.
storage_rebate
The amount of storage cost refunded to the user for all objects deleted or mutated in the transaction.
non_refundable_storage_fee
The fee for the rebate. The portion of the storage rebate kept by the system.
GasPayment Objects
class GasPayment()
Payment information for executing a transaction
BCS
The BCS serialized form for this type is defined by the following ABNF:
gas-payment = (vector object-ref) ; gas coin objects
address ; owner
u64 ; price
u64 ; budget
owner
Owner of the gas objects, either the transaction sender or a sponsor
price
Gas unit price to use when charging for computation
Must be greater-than-or-equal-to the network's current RGP (reference gas price)
budget
Total budget willing to spend for the execution of a transaction
Jwk Objects
class Jwk()
A JSON Web Key
Struct that contains info for a JWK. A list of them for different kids can be retrieved from the JWK endpoint (e.g. <https://www.googleapis.com/oauth2/v3/certs>). The JWK is used to verify the JWT token.
BCS
The BCS serialized form for this type is defined by the following ABNF:
jwk = string string string string
kty
Key type parameter, <https://datatracker.ietf.org/doc/html/rfc7517#section-4.1>
e
RSA public exponent, <https://datatracker.ietf.org/doc/html/rfc7517#section-9.3>
n
RSA modulus, <https://datatracker.ietf.org/doc/html/rfc7517#section-9.3>
alg
Algorithm parameter, <https://datatracker.ietf.org/doc/html/rfc7517#section-4.4>
JwkId Objects
class JwkId()
Key to uniquely identify a JWK
BCS
The BCS serialized form for this type is defined by the following ABNF:
jwk-id = string string
iss
The issuer or identity of the OIDC provider.
kid
A key id use to uniquely identify a key from an OIDC provider.
MoveLocation Objects
class MoveLocation()
Location in move bytecode where an error occurred
BCS
The BCS serialized form for this type is defined by the following ABNF:
move-location = object-id identifier u16 u16 (option identifier)
package
The package id
module
The module name
function
The function index
instruction
Index into the code stream for a jump. The offset is relative to the beginning of the instruction stream.
function_name
The name of the function if available
MovePackagePage Objects
class MovePackagePage()
A page of items returned by the GraphQL server.
page_info
Information about the page, such as the cursor and whether there are more pages.
data
The data returned by the server.
MoveStruct Objects
class MoveStruct()
A move struct
BCS
The BCS serialized form for this type is defined by the following ABNF:
object-move-struct = compressed-struct-tag bool u64 object-contents
compressed-struct-tag = other-struct-type / gas-coin-type / staked-iota-type / coin-type
other-struct-type = %x00 struct-tag
gas-coin-type = %x01
staked-iota-type = %x02
coin-type = %x03 type-tag
; first 32 bytes of the contents are the object's object-id
object-contents = uleb128 (object-id *OCTET) ; length followed by contents
struct_type
The type of this object
version
Number that increases each time a tx takes this object as a mutable input This is a lamport timestamp, not a sequentially increasing version
contents
BCS bytes of a Move struct value
MoveViewResult Objects
class MoveViewResult()
The result of executing a Move View Function.
Execution errors are captured in the error field, in which case the
results field will be None. On success, the results field will contain
the return values of the Move view function, and the error field will be
None.
error
Execution error from executing the Move view function.
results
The return values of the Move view function, resolved and formatted as JSON.
NameRegistrationPage Objects
class NameRegistrationPage()
A page of items returned by the GraphQL server.
page_info
Information about the page, such as the cursor and whether there are more pages.
data
The data returned by the server.
ObjectPage Objects
class ObjectPage()
A page of items returned by the GraphQL server.
page_info
Information about the page, such as the cursor and whether there are more pages.
data
The data returned by the server.
ObjectReference Objects
class ObjectReference()
Reference to an object
Contains sufficient information to uniquely identify a specific object.
BCS
The BCS serialized form for this type is defined by the following ABNF:
object-ref = object-id u64 digest
PageInfo Objects
class PageInfo()
Information about pagination in a connection.
has_previous_page
When paginating backwards, are there more items?
has_next_page
Are there more items when paginating forwards?
start_cursor
When paginating backwards, the cursor to continue.
end_cursor
When paginating forwards, the cursor to continue.
PaginationFilter Objects
class PaginationFilter()
Pagination options for querying the GraphQL server. It defaults to forward pagination with the GraphQL server's max page size.
direction
The direction of pagination.
cursor
An opaque cursor used for pagination.
limit
The maximum number of items to return. If this is omitted, it will lazily query the service configuration for the max page size.
ProtocolConfigAttr Objects
class ProtocolConfigAttr()
A key-value protocol configuration attribute.
ProtocolConfigFeatureFlag Objects
class ProtocolConfigFeatureFlag()
Feature flags are a form of boolean configuration that are usually used to gate features while they are in development. Once a lag has been enabled, it is rare for it to be disabled.
ProtocolConfigs Objects
class ProtocolConfigs()
Information about the configuration of the protocol. Constants that control how the chain operates. These can only change during protocol upgrades which happen on epoch boundaries.
protocol_version
The protocol is not required to change on every epoch boundary, so the protocol version tracks which change to the protocol these configs are from.
feature_flags
List all available feature flags and their values. Feature flags are a form of boolean configuration that are usually used to gate features while they are in development. Once a flag has been enabled, it is rare for it to be disabled.
configs
List all available configurations and their values. These configurations can take any value (but they will all be represented in string form), and do not include feature flags.
RandomnessStateUpdate Objects
class RandomnessStateUpdate()
Randomness update
BCS
The BCS serialized form for this type is defined by the following ABNF:
randomness-state-update = u64 u64 bytes u64
epoch
Epoch of the randomness state update transaction
randomness_round
Randomness round of the update
random_bytes
Updated random bytes
randomness_obj_initial_shared_version
The initial version of the randomness object that it was shared at
ServiceConfig Objects
class ServiceConfig()
default_page_size
Default number of elements allowed on a single page of a connection.
enabled_features
List of all features that are enabled on this RPC service.
max_move_value_depth
Maximum estimated cost of a database query used to serve a GraphQL request. This is measured in the same units that the database uses in EXPLAIN queries. Maximum nesting allowed in struct fields when calculating the layout of a single Move Type.
max_output_nodes
The maximum number of output nodes in a GraphQL response. Non-connection nodes have a count of 1, while connection nodes are counted as the specified 'first' or 'last' number of items, or the default_page_size as set by the server if those arguments are not set. Counts accumulate multiplicatively down the query tree. For example, if a query starts with a connection of first: 10 and has a field to a connection with last: 20, the count at the second level would be 200 nodes. This is then summed to the count of 10 nodes at the first level, for a total of 210 nodes.
max_page_size
Maximum number of elements allowed on a single page of a connection.
max_query_depth
The maximum depth a GraphQL query can be to be accepted by this service.
max_query_nodes
The maximum number of nodes (field names) the service will accept in a single query.
max_query_payload_size
Maximum length of a query payload string.
max_type_argument_depth
Maximum nesting allowed in type arguments in Move Types resolved by this service.
max_type_argument_width
Maximum number of type arguments passed into a generic instantiation of a Move Type resolved by this service.
max_type_nodes
Maximum number of structs that need to be processed when calculating the layout of a single Move Type.
mutation_timeout_ms
Maximum time in milliseconds spent waiting for a response from fullnode after issuing a transaction to execute. Note that the transaction may still succeed even in the case of a timeout. Transactions are idempotent, so a transaction that times out should be resubmitted until the network returns a definite response (success or failure, not timeout).
request_timeout_ms
Maximum time in milliseconds that will be spent to serve one query request.
SignedTransactionPage Objects
class SignedTransactionPage()
A page of items returned by the GraphQL server.
page_info
Information about the page, such as the cursor and whether there are more pages.
data
The data returned by the server.
TransactionDataEffectsPage Objects
class TransactionDataEffectsPage()
A page of items returned by the GraphQL server.
page_info
Information about the page, such as the cursor and whether there are more pages.
data
The data returned by the server.
TransactionEffectsPage Objects
class TransactionEffectsPage()
A page of items returned by the GraphQL server.
page_info
Information about the page, such as the cursor and whether there are more pages.
data
The data returned by the server.
TransactionEffectsV1 Objects
class TransactionEffectsV1()
Version 1 of TransactionEffects
BCS
The BCS serialized form for this type is defined by the following ABNF:
effects-v1 = execution-status
u64 ; epoch
gas-cost-summary
digest ; transaction digest
(option u32) ; gas object index
(option digest) ; events digest
(vector digest) ; list of transaction dependencies
u64 ; lamport version
(vector changed-object)
(vector unchanged-shared-object)
(option digest) ; auxiliary data digest
status
The status of the execution
epoch
The epoch when this transaction was executed.
gas_used
The gas used by this transaction
transaction_digest
The transaction digest
gas_object_index
The updated gas object reference, as an index into the changed_objects
vector. Having a dedicated field for convenient access.
System transaction that don't require gas will leave this as None.
events_digest
The digest of the events emitted during execution, can be None if the transaction does not emit any event.
dependencies
The set of transaction digests this transaction depends on.
lamport_version
The version number of all the written Move objects by this transaction.
changed_objects
Objects whose state are changed in the object store.
unchanged_shared_objects
Shared objects that are not mutated in this transaction. Unlike owned objects, read-only shared objects' version are not committed in the transaction, and in order for a node to catch up and execute it without consensus sequencing, the version needs to be committed in the effects.
auxiliary_data_digest
Auxiliary data that are not protocol-critical, generated as part of the effects but are stored separately. Storing it separately allows us to avoid bloating the effects with data that are not critical. It also provides more flexibility on the format and type of the data.
TransactionSignerFnOutput Objects
class TransactionSignerFnOutput()
The result of an async sign call containing the UserSignature.
TypeOrigin Objects
class TypeOrigin()
Identifies a struct and the module it was defined in
BCS
The BCS serialized form for this type is defined by the following ABNF:
type-origin = identifier identifier object-id
UnchangedSharedObject Objects
class UnchangedSharedObject()
A shared object that wasn't changed during execution
BCS
The BCS serialized form for this type is defined by the following ABNF:
unchanged-shared-object = object-id unchanged-shared-object-kind
UpgradeInfo Objects
class UpgradeInfo()
Upgraded package info for the linkage table
BCS
The BCS serialized form for this type is defined by the following ABNF:
upgrade-info = object-id u64
upgraded_id
Id of the upgraded packages
upgraded_version
Version of the upgraded package
Validator Objects
class Validator()
Represents a validator in the system.
apy
The APY of this validator in basis points. To get the APY in percentage, divide by 100.
address
The validator's address.
commission_rate
The fee charged by the validator for staking services.
credentials
Validator's credentials.
description
Validator's description.
exchange_rates_size
Number of exchange rates in the table.
gas_price
The reference gas price for this epoch.
name
Validator's name.
image_url
Validator's url containing their custom image.
next_epoch_commission_rate
The proposed next epoch fee for the validator's staking services.
next_epoch_credentials
Validator's credentials for the next epoch.
next_epoch_gas_price
The validator's gas price quote for the next epoch.
next_epoch_stake
The total number of IOTA tokens in this pool plus the pending stake amount for this epoch.
operation_cap
The validator's current valid Cap object. Validators can delegate
the operation ability to another address. The address holding this Cap
object can then update the reference gas price and tallying rule on
behalf of the validator.
pending_pool_token_withdraw
Pending pool token withdrawn during the current epoch, emptied at epoch boundaries. Zero for past epochs.
pending_stake
Pending stake amount for the current epoch, emptied at epoch boundaries. Zero for past epochs.
pending_total_iota_withdraw
Pending stake withdrawn during the current epoch, emptied at epoch boundaries. Zero for past epochs.
pool_token_balance
Total number of pool tokens issued by the pool.
project_url
Validator's homepage URL.
rewards_pool
The epoch stake rewards will be added here at the end of each epoch.
staking_pool_activation_epoch
The epoch at which this pool became active.
staking_pool_id
The ID of this validator's 0x3::staking_pool::StakingPool.
staking_pool_iota_balance
The total number of IOTA tokens in this pool.
voting_power
The voting power of this validator in basis points (e.g., 100 = 1% voting power).
ValidatorCommittee Objects
class ValidatorCommittee()
The Validator Set for a particular epoch.
BCS
The BCS serialized form for this type is defined by the following ABNF:
validator-committee = u64 ; epoch
(vector validator-committee-member)
ValidatorCommitteeMember Objects
class ValidatorCommitteeMember()
A member of a Validator Committee
BCS
The BCS serialized form for this type is defined by the following ABNF:
validator-committee-member = bls-public-key
u64 ; stake
ValidatorCredentials Objects
class ValidatorCredentials()
The credentials related fields associated with a validator.
ValidatorPage Objects
class ValidatorPage()
A page of items returned by the GraphQL server.
page_info
Information about the page, such as the cursor and whether there are more pages.
data
The data returned by the server.
ValidatorSet Objects
class ValidatorSet()
inactive_pools_id
Object ID of the Table storing the inactive staking pools.
inactive_pools_size
Size of the inactive pools Table.
pending_active_validators_id
Object ID of the wrapped object TableVec storing the pending active
validators.
pending_active_validators_size
Size of the pending active validators table.
pending_removals
Validators that are pending removal from the active validator set,
expressed as indices in to activeValidators.
staking_pool_mappings_id
Object ID of the Table storing the mapping from staking pool ids to
the addresses of the corresponding validators. This is needed
because a validator's address can potentially change but the object
ID of its pool will not.
staking_pool_mappings_size
Size of the stake pool mappings Table.
total_stake
Total amount of stake for all active validators at the beginning of the epoch.
validator_candidates_size
Size of the validator candidates Table.
validator_candidates_id
Object ID of the Table storing the validator candidates.
ZkLoginClaim Objects
class ZkLoginClaim()
A claim of the iss in a zklogin proof
BCS
The BCS serialized form for this type is defined by the following ABNF:
zklogin-claim = string u8
CommandArgumentError Objects
class CommandArgumentError()
An error with an argument to a command
BCS
The BCS serialized form for this type is defined by the following ABNF:
command-argument-error = type-mismatch
=/ invalid-bcs-bytes
=/ invalid-usage-of-pure-argument
=/ invalid-argument-to-private-entry-function
=/ index-out-of-bounds
=/ secondary-index-out-of-bound
=/ invalid-result-arity
=/ invalid-gas-coin-usage
=/ invalid-value-usage
=/ invalid-object-by-value
=/ invalid-object-by-mut-ref
=/ shared-object-operation-not-allowed
type-mismatch = %x00
invalid-bcs-bytes = %x01
invalid-usage-of-pure-argument = %x02
invalid-argument-to-private-entry-function = %x03
index-out-of-bounds = %x04 u16
secondary-index-out-of-bound = %x05 u16 u16
invalid-result-arity = %x06 u16
invalid-gas-coin-usage = %x07
invalid-value-usage = %x08
invalid-object-by-value = %x09
invalid-object-by-mut-ref = %x0a
shared-object-operation-not-allowed = %x0b
TYPE_MISMATCH Objects
class TYPE_MISMATCH()
The type of the value does not match the expected type
INVALID_BCS_BYTES Objects
class INVALID_BCS_BYTES()
The argument cannot be deserialized into a value of the specified type
INVALID_USAGE_OF_PURE_ARGUMENT Objects
class INVALID_USAGE_OF_PURE_ARGUMENT()
The argument cannot be instantiated from raw bytes
INVALID_ARGUMENT_TO_PRIVATE_ENTRY_FUNCTION Objects
class INVALID_ARGUMENT_TO_PRIVATE_ENTRY_FUNCTION()
Invalid argument to private entry function. Private entry functions cannot take arguments from other Move functions.
INDEX_OUT_OF_BOUNDS Objects
class INDEX_OUT_OF_BOUNDS()
Out of bounds access to input or results
SECONDARY_INDEX_OUT_OF_BOUNDS Objects
class SECONDARY_INDEX_OUT_OF_BOUNDS()
Out of bounds access to subresult
INVALID_RESULT_ARITY Objects
class INVALID_RESULT_ARITY()
Invalid usage of result. Expected a single result but found either no return value or multiple.
INVALID_GAS_COIN_USAGE Objects
class INVALID_GAS_COIN_USAGE()
Invalid usage of Gas coin. The Gas coin can only be used by-value with a TransferObjects command.
INVALID_VALUE_USAGE Objects
class INVALID_VALUE_USAGE()
Invalid usage of move value.
INVALID_OBJECT_BY_VALUE Objects
class INVALID_OBJECT_BY_VALUE()
Immutable objects cannot be passed by-value.
INVALID_OBJECT_BY_MUT_REF Objects
class INVALID_OBJECT_BY_MUT_REF()
Immutable objects cannot be passed by mutable reference, &mut.
SHARED_OBJECT_OPERATION_NOT_ALLOWED Objects
class SHARED_OBJECT_OPERATION_NOT_ALLOWED()
Shared object operations such a wrapping, freezing, or converting to owned are not allowed.
INVALID_ARGUMENT_ARITY Objects
class INVALID_ARGUMENT_ARITY()
Invalid argument arity. Expected a single argument but found a result that expanded to multiple arguments.
Direction Objects
class Direction(enum.Enum)
Pagination direction.
ExecutionError Objects
class ExecutionError()
An error that can occur during the execution of a transaction
BCS
The BCS serialized form for this type is defined by the following ABNF:
execution-error = insufficient-gas
=/ invalid-gas-object
=/ invariant-violation
=/ feature-not-yet-supported
=/ object-too-big
=/ package-too-big
=/ circular-object-ownership
=/ insufficient-coin-balance
=/ coin-balance-overflow
=/ publish-error-non-zero-address
=/ iota-move-verification-error
=/ move-primitive-runtime-error
=/ move-abort
=/ vm-verification-or-deserialization-error
=/ vm-invariant-violation
=/ function-not-found
=/ arity-mismatch
=/ type-arity-mismatch
=/ non-entry-function-invoked
=/ command-argument-error
=/ type-argument-error
=/ unused-value-without-drop
=/ invalid-public-function-return-type
=/ invalid-transfer-object
=/ effects-too-large
=/ publish-upgrade-missing-dependency
=/ publish-upgrade-dependency-downgrade
=/ package-upgrade-error
=/ written-objects-too-large
=/ certificate-denied
=/ iota-move-verification-timeout
=/ shared-object-operation-not-allowed
=/ input-object-deleted
=/ execution-cancelled-due-to-shared-object-congestion
=/ address-denied-for-coin
=/ coin-type-global-pause
=/ execution-cancelled-due-to-randomness-unavailable
insufficient-gas = %x00
invalid-gas-object = %x01
invariant-violation = %x02
feature-not-yet-supported = %x03
object-too-big = %x04 u64 u64
package-too-big = %x05 u64 u64
circular-object-ownership = %x06 object-id
insufficient-coin-balance = %x07
coin-balance-overflow = %x08
publish-error-non-zero-address = %x09
iota-move-verification-error = %x0a
move-primitive-runtime-error = %x0b (option move-location)
move-abort = %x0c move-location u64
vm-verification-or-deserialization-error = %x0d
vm-invariant-violation = %x0e
function-not-found = %x0f
arity-mismatch = %x10
type-arity-mismatch = %x11
non-entry-function-invoked = %x12
command-argument-error = %x13 u16 command-argument-error
type-argument-error = %x14 u16 type-argument-error
unused-value-without-drop = %x15 u16 u16
invalid-public-function-return-type = %x16 u16
invalid-transfer-object = %x17
effects-too-large = %x18 u64 u64
publish-upgrade-missing-dependency = %x19
publish-upgrade-dependency-downgrade = %x1a
package-upgrade-error = %x1b package-upgrade-error
written-objects-too-large = %x1c u64 u64
certificate-denied = %x1d
iota-move-verification-timeout = %x1e
shared-object-operation-not-allowed = %x1f
input-object-deleted = %x20
execution-cancelled-due-to-shared-object-congestion = %x21 (vector object-id)
address-denied-for-coin = %x22 address string
coin-type-global-pause = %x23 string
execution-cancelled-due-to-randomness-unavailable = %x24
INSUFFICIENT_GAS Objects
class INSUFFICIENT_GAS()
Insufficient Gas
INVALID_GAS_OBJECT Objects
class INVALID_GAS_OBJECT()
Invalid Gas Object.
INVARIANT_VIOLATION Objects
class INVARIANT_VIOLATION()
Invariant Violation
FEATURE_NOT_YET_SUPPORTED Objects
class FEATURE_NOT_YET_SUPPORTED()
Attempted to used feature that is not supported yet
OBJECT_TOO_BIG Objects
class OBJECT_TOO_BIG()
Move object is larger than the maximum allowed size
PACKAGE_TOO_BIG Objects
class PACKAGE_TOO_BIG()
Package is larger than the maximum allowed size
CIRCULAR_OBJECT_OWNERSHIP Objects
class CIRCULAR_OBJECT_OWNERSHIP()
Circular Object Ownership
INSUFFICIENT_COIN_BALANCE Objects
class INSUFFICIENT_COIN_BALANCE()
Insufficient coin balance for requested operation
COIN_BALANCE_OVERFLOW Objects
class COIN_BALANCE_OVERFLOW()
Coin balance overflowed an u64
PUBLISH_ERROR_NON_ZERO_ADDRESS Objects
class PUBLISH_ERROR_NON_ZERO_ADDRESS()
Publish Error, Non-zero Address. The modules in the package must have their self-addresses set to zero.
IOTA_MOVE_VERIFICATION Objects
class IOTA_MOVE_VERIFICATION()
IOTA Move Bytecode Verification Error.
MOVE_PRIMITIVE_RUNTIME Objects
class MOVE_PRIMITIVE_RUNTIME()
Error from a non-abort instruction. Possible causes: Arithmetic error, stack overflow, max value depth, etc."
MOVE_ABORT Objects
class MOVE_ABORT()
Move runtime abort
VM_VERIFICATION_OR_DESERIALIZATION Objects
class VM_VERIFICATION_OR_DESERIALIZATION()
Bytecode verification error.
VM_INVARIANT_VIOLATION Objects
class VM_INVARIANT_VIOLATION()
MoveVm invariant violation
FUNCTION_NOT_FOUND Objects
class FUNCTION_NOT_FOUND()
Function not found
ARITY_MISMATCH Objects
class ARITY_MISMATCH()
Arity mismatch for Move function. The number of arguments does not match the number of parameters
TYPE_ARITY_MISMATCH Objects
class TYPE_ARITY_MISMATCH()
Type arity mismatch for Move function. Mismatch between the number of actual versus expected type arguments.
NON_ENTRY_FUNCTION_INVOKED Objects
class NON_ENTRY_FUNCTION_INVOKED()
Non Entry Function Invoked. Move Call must start with an entry function.
COMMAND_ARGUMENT Objects
class COMMAND_ARGUMENT()
Invalid command argument
TYPE_ARGUMENT Objects
class TYPE_ARGUMENT()
Type argument error
type_argument
Index of the problematic type argument
UNUSED_VALUE_WITHOUT_DROP Objects
class UNUSED_VALUE_WITHOUT_DROP()
Unused result without the drop ability.
INVALID_PUBLIC_FUNCTION_RETURN_TYPE Objects
class INVALID_PUBLIC_FUNCTION_RETURN_TYPE()
Invalid public Move function signature. Unsupported return type for return value
INVALID_TRANSFER_OBJECT Objects
class INVALID_TRANSFER_OBJECT()
Invalid Transfer Object, object does not have public transfer.
EFFECTS_TOO_LARGE Objects
class EFFECTS_TOO_LARGE()
Effects from the transaction are too large
PUBLISH_UPGRADE_MISSING_DEPENDENCY Objects
class PUBLISH_UPGRADE_MISSING_DEPENDENCY()
Publish or Upgrade is missing dependency
PUBLISH_UPGRADE_DEPENDENCY_DOWNGRADE Objects
class PUBLISH_UPGRADE_DEPENDENCY_DOWNGRADE()
Publish or Upgrade dependency downgrade.
Indirect (transitive) dependency of published or upgraded package has been assigned an on-chain version that is less than the version required by one of the package's transitive dependencies.
PACKAGE_UPGRADE Objects
class PACKAGE_UPGRADE()
Invalid package upgrade
WRITTEN_OBJECTS_TOO_LARGE Objects
class WRITTEN_OBJECTS_TOO_LARGE()
Indicates the transaction tried to write objects too large to storage
CERTIFICATE_DENIED Objects
class CERTIFICATE_DENIED()
Certificate is on the deny list
IOTA_MOVE_VERIFICATION_TIMEOUT Objects
class IOTA_MOVE_VERIFICATION_TIMEOUT()
IOTA Move Bytecode verification timed out.
SHARED_OBJECT_OPERATION_NOT_ALLOWED Objects
class SHARED_OBJECT_OPERATION_NOT_ALLOWED()
The requested shared object operation is not allowed
INPUT_OBJECT_DELETED Objects
class INPUT_OBJECT_DELETED()
Requested shared object has been deleted
EXECUTION_CANCELLED_DUE_TO_SHARED_OBJECT_CONGESTION Objects
class EXECUTION_CANCELLED_DUE_TO_SHARED_OBJECT_CONGESTION()
Certificate is cancelled due to congestion on shared objects
EXECUTION_CANCELLED_DUE_TO_SHARED_OBJECT_CONGESTION_V2 Objects
class EXECUTION_CANCELLED_DUE_TO_SHARED_OBJECT_CONGESTION_V2()
Certificate is cancelled due to congestion on shared objects; suggested gas price can be used to give this certificate more priority.
ADDRESS_DENIED_FOR_COIN Objects
class ADDRESS_DENIED_FOR_COIN()
Address is denied for this coin type
COIN_TYPE_GLOBAL_PAUSE Objects
class COIN_TYPE_GLOBAL_PAUSE()
Coin type is globally paused for use
EXECUTION_CANCELLED_DUE_TO_RANDOMNESS_UNAVAILABLE Objects
class EXECUTION_CANCELLED_DUE_TO_RANDOMNESS_UNAVAILABLE()
Certificate is cancelled because randomness could not be generated this epoch
INVALID_LINKAGE Objects
class INVALID_LINKAGE()
A valid linkage was unable to be determined for the transaction or one of its commands.
ExecutionStatus Objects
class ExecutionStatus()
The status of an executed Transaction
BCS
The BCS serialized form for this type is defined by the following ABNF:
execution-status = success / failure
success = %x00
failure = %x01 execution-error (option u64)
SUCCESS Objects
class SUCCESS()
The Transaction successfully executed.
FAILURE Objects
class FAILURE()
The Transaction didn't execute successfully.
Failed transactions are still committed to the blockchain but any intended effects are rolled back to prior to this transaction executing with the caveat that gas objects are still smashed and gas usage is still charged.
error
The error encountered during execution.
command
The command, if any, during which the error occurred.
HashingIntentScope Objects
class HashingIntentScope(enum.Enum)
A 1-byte domain separator for hashing Object ID in IOTA. It starts from
0xf0 to ensure no hashing collision for any ObjectID vs IotaAddress which is
derived as the hash of flag || pubkey.
IdOperation Objects
class IdOperation(enum.Enum)
Defines what happened to an ObjectId during execution
BCS
The BCS serialized form for this type is defined by the following ABNF:
id-operation = id-operation-none
=/ id-operation-created
=/ id-operation-deleted
id-operation-none = %x00
id-operation-created = %x01
id-operation-deleted = %x02
IntentAppId Objects
class IntentAppId(enum.Enum)
Byte signifying the application id of an Intent
This enum specifies the application ID. Two intents in two different applications (i.e., IOTA, Ethereum etc) should never collide, so that even when a signing key is reused, nobody can take a signature designated for app_1 and present it as a valid signature for an (any) intent in app_2.
BCS
The BCS serialized form for this type is defined by the following ABNF:
intent-app-id = u8
IntentError Objects
class IntentError(Exception)
Intent errors.
IntentError Objects
class IntentError()
Intent errors.
Bytes Objects
class Bytes(_UniffiTempIntentError)
Invalid bytes for Intent
Hex Objects
class Hex(_UniffiTempIntentError)
Invalid hex string for Intent
Scope Objects
class Scope(_UniffiTempIntentError)
Invalid Scope for Intent
Version Objects
class Version(_UniffiTempIntentError)
Invalid Version for Intent
AppId Objects
class AppId(_UniffiTempIntentError)
Invalid AppId for Intent
IntentError
type: ignore
IntentScope Objects
class IntentScope(enum.Enum)
Byte signifying the scope of an Intent
This enum specifies the intent scope. Two intents for different scopes should never collide, so no signature provided for one intent scope can be used for another, even when the serialized data itself may be the same.
BCS
The BCS serialized form for this type is defined by the following ABNF:
intent-scope = u8
TRANSACTION_DATA
Used for a user signature on a transaction data.
TRANSACTION_EFFECTS
Used for an authority signature on transaction effects.
CHECKPOINT_SUMMARY
Used for an authority signature on a checkpoint summary.
PERSONAL_MESSAGE
Used for a user signature on a personal message.
SENDER_SIGNED_TRANSACTION
Used for an authority signature on a user signed transaction.
PROOF_OF_POSSESSION
Used as a signature representing an authority's proof of possession of its authority key.
BRIDGE_EVENT_DEPRECATED
Deprecated. Should not be reused. Introduced for bridge purposes but was never included in messages.
CONSENSUS_BLOCK
Used for consensus authority signature on block's digest.
DISCOVERY_PEERS
Used for reporting peer addresses in discovery
AUTHORITY_CAPABILITIES
Used for authority capabilities from non-committee authorities.
IntentVersion Objects
class IntentVersion(enum.Enum)
Byte signifying the version of an Intent
The version here is to distinguish between signing different versions of the struct or enum. Serialized output between two different versions of the same struct/enum might accidentally (or maliciously on purpose) match.
BCS
The BCS serialized form for this type is defined by the following ABNF:
intent-version = u8
NameFormat Objects
class NameFormat(enum.Enum)
Two different view options for a name.
At -> test@example | Dot -> test.example.iota
ObjectIn Objects
class ObjectIn()
State of an object prior to execution
If an object exists (at root-level) in the store prior to this transaction, it should be Data, otherwise it's Missing, e.g. wrapped objects should be Missing.
BCS
The BCS serialized form for this type is defined by the following ABNF:
object-in = object-in-missing / object-in-data
object-in-missing = %x00
object-in-data = %x01 u64 digest owner
DATA Objects
class DATA()
The old version, digest and owner.
ObjectOut Objects
class ObjectOut()
State of an object after execution
BCS
The BCS serialized form for this type is defined by the following ABNF:
object-out = object-out-missing
=/ object-out-object-write
=/ object-out-package-write
object-out-missing = %x00
object-out-object-write = %x01 digest owner
object-out-package-write = %x02 version digest
MISSING Objects
class MISSING()
Same definition as in ObjectIn.
OBJECT_WRITE Objects
class OBJECT_WRITE()
Any written object, including all of mutated, created, unwrapped today.
PACKAGE_WRITE Objects
class PACKAGE_WRITE()
Packages writes need to be tracked separately with version because we don't use lamport version for package publish and upgrades.
PackageUpgradeError Objects
class PackageUpgradeError()
An error with a upgrading a package
BCS
The BCS serialized form for this type is defined by the following ABNF:
package-upgrade-error = unable-to-fetch-package /
not-a-package /
incompatible-upgrade /
digest-does-not-match /
unknown-upgrade-policy /
package-id-does-not-match
unable-to-fetch-package = %x00 object-id
not-a-package = %x01 object-id
incompatible-upgrade = %x02
digest-does-not-match = %x03 digest
unknown-upgrade-policy = %x04 u8
package-id-does-not-match = %x05 object-id object-id
UNABLE_TO_FETCH_PACKAGE Objects
class UNABLE_TO_FETCH_PACKAGE()
Unable to fetch package
NOT_A_PACKAGE Objects
class NOT_A_PACKAGE()
Object is not a package
INCOMPATIBLE_UPGRADE Objects
class INCOMPATIBLE_UPGRADE()
Package upgrade is incompatible with previous version
DIGEST_DOES_NOT_MATCH Objects
class DIGEST_DOES_NOT_MATCH()
Digest in upgrade ticket and computed digest differ
UNKNOWN_UPGRADE_POLICY Objects
class UNKNOWN_UPGRADE_POLICY()
Upgrade policy is not valid
PACKAGE_ID_DOES_NOT_MATCH Objects
class PACKAGE_ID_DOES_NOT_MATCH()
PackageId does not matach PackageId in upgrade ticket
SdkFfiError
type: ignore
SignatureScheme Objects
class SignatureScheme(enum.Enum)
Flag use to disambiguate the signature schemes supported by IOTA.
BCS
The BCS serialized form for this type is defined by the following ABNF:
signature-scheme = ed25519-flag / secp256k1-flag / secp256r1-flag /
multisig-flag / bls-flag / zklogin-auth-flag / passkey-auth-flag /
move-auth-flag
ed25519-flag = %x00
secp256k1-flag = %x01
secp256r1-flag = %x02
multisig-flag = %x03
bls-flag = %x04
zklogin-auth-flag = %x05
passkey-auth-flag = %x06
move-auth-flag = %x07
TransactionArgument Objects
class TransactionArgument()
A transaction argument used in programmable transactions.
GAS_COIN Objects
class GAS_COIN()
Reference to the gas coin.
INPUT Objects
class INPUT()
An input to the programmable transaction block.
index
Index of the programmable transaction block input (0-indexed).
RESULT Objects
class RESULT()
The result of another transaction command.
cmd
The index of the previous command (0-indexed) that returned this result.
index
If the previous command returns multiple values, this is the index of the individual result among the multiple results from that command (also 0-indexed).
TransactionExpiration Objects
class TransactionExpiration()
A TTL for a transaction
BCS
The BCS serialized form for this type is defined by the following ABNF:
transaction-expiration = %x00 ; none
=/ %x01 u64 ; epoch
NONE Objects
class NONE()
The transaction has no expiration
EPOCH Objects
class EPOCH()
Validators won't sign a transaction unless the expiration Epoch is greater than or equal to the current epoch
TypeArgumentError Objects
class TypeArgumentError(enum.Enum)
An error with a type argument
BCS
The BCS serialized form for this type is defined by the following ABNF:
type-argument-error = type-not-found / constraint-not-satisfied
type-not-found = %x00
constraint-not-satisfied = %x01
TYPE_NOT_FOUND
A type was not found in the module specified
CONSTRAINT_NOT_SATISFIED
A type provided did not match the specified constraint
UnchangedSharedKind Objects
class UnchangedSharedKind()
Type of unchanged shared object
BCS
The BCS serialized form for this type is defined by the following ABNF:
unchanged-shared-object-kind = read-only-root
=/ mutate-deleted
=/ read-deleted
=/ cancelled
=/ per-epoch-config
read-only-root = %x00 u64 digest
mutate-deleted = %x01 u64
read-deleted = %x02 u64
cancelled = %x03 u64
per-epoch-config = %x04
READ_ONLY_ROOT Objects
class READ_ONLY_ROOT()
Read-only shared objects from the input. We don't really need ObjectDigest for protocol correctness, but it will make it easier to verify untrusted read.
MUTATE_DELETED Objects
class MUTATE_DELETED()
Deleted shared objects that appear mutably/owned in the input.
READ_DELETED Objects
class READ_DELETED()
Deleted shared objects that appear as read-only in the input.
CANCELLED Objects
class CANCELLED()
Shared objects in cancelled transaction. The sequence number embed cancellation reason.
PER_EPOCH_CONFIG Objects
class PER_EPOCH_CONFIG()
Read of a per-epoch config object that should remain the same during an epoch.
WaitForTx Objects
class WaitForTx(enum.Enum)
Determines what to wait for after executing a transaction.
Users should almost always use WaitForTx::Finalized (the default). The GraphQL client interacts with the indexer, not the fullnode directly. Using WaitForTx::IndexedOnNode only guarantees the transaction is indexed on the fullnode (meaning you can submit transactions that reference objects created by this transaction), but subsequent queries using the transaction ID can still fail until the transaction is indexed on the indexer.
INDEXED_ON_NODE
Indicates that the transaction effects will be usable in subsequent transactions (you can reference objects created by this transaction), and that the transaction itself is indexed on the fullnode.
Warning: This does not guarantee the transaction is indexed on the indexer. Since the GraphQL client queries the indexer, subsequent queries with this transaction ID may still fail. Prefer WaitForTx::Finalized unless you have a specific reason to use this.
FINALIZED
Indicates that the transaction has been included in a checkpoint, and all queries may include it.
TransactionSignerFnProtocol Objects
class TransactionSignerFnProtocol(typing.Protocol)
Defines a type which can sign a transaction asynchronously.
This trait can be implemented downstream to enable signing when using the
TransactionBuilder::execute function.
sign
def sign(transaction: "Transaction")
Sign a transaction and return a UserSignature.
TransactionSignerFn Objects
class TransactionSignerFn()
Defines a type which can sign a transaction asynchronously.
This trait can be implemented downstream to enable signing when using the
TransactionBuilder::execute function.
sign
def sign(transaction: "Transaction")
Sign a transaction and return a UserSignature.
TransactionSignerFnImpl Objects
class TransactionSignerFnImpl()
Defines a type which can sign a transaction asynchronously.
This trait can be implemented downstream to enable signing when using the
TransactionBuilder::execute function.
sign
async def sign(transaction: "Transaction") -> "TransactionSignerFnOutput"
Sign a transaction and return a UserSignature.
AddressProtocol Objects
class AddressProtocol(typing.Protocol)
Unique identifier for an Account on the IOTA blockchain.
An Address is a 32-byte pseudonymous identifier used to uniquely identify
an account and asset-ownership on the IOTA blockchain. Often, human-readable
addresses are encoded in hexadecimal with a 0x prefix. For example, this
is a valid IOTA address:
0x02a212de6a9dfa3a69e22387acfbafbb1a9e591bd9d636e7895dcfc8de05f331.
Deriving an Address
Addresses are cryptographically derived from a number of user account
authenticators, the simplest of which is an
Ed25519PublicKey.
Deriving an address consists of the Blake2b256 hash of the sequence of bytes
of its corresponding authenticator, prefixed with a domain-separator (except
ed25519, for compatibility reasons). For each other authenticator, this
domain-separator is the single byte-value of its
SignatureScheme flag. E.g. hash(signature schema flag || authenticator bytes).
Each authenticator has a method for deriving its Address as well as
documentation for the specifics of how the derivation is done. See
Ed25519PublicKey::derive_address for an example.
Relationship to ObjectIds
ObjectIds and Addresses share the same 32-byte addressable space but
are derived leveraging different domain-separator values to ensure that,
cryptographically, there won't be any overlap, e.g. there can't be a
valid 0x0 who's ObjectId is equal to that of the Address of a user
account.
BCS
An Address's BCS serialized form is defined by the following:
0x4
to_canonical_string
def to_canonical_string(with_prefix: "bool")
Returns the string representation of this address using the
canonical display, with or without a 0x prefix.
to_short_string
def to_short_string(with_prefix: "bool")
Returns the shortest possible string representation of the address (i.e. with leading zeroes trimmed).
Address Objects
class Address()
Unique identifier for an Account on the IOTA blockchain.
An Address is a 32-byte pseudonymous identifier used to uniquely identify
an account and asset-ownership on the IOTA blockchain. Often, human-readable
addresses are encoded in hexadecimal with a 0x prefix. For example, this
is a valid IOTA address:
0x02a212de6a9dfa3a69e22387acfbafbb1a9e591bd9d636e7895dcfc8de05f331.
Deriving an Address
Addresses are cryptographically derived from a number of user account
authenticators, the simplest of which is an
Ed25519PublicKey.
Deriving an address consists of the Blake2b256 hash of the sequence of bytes
of its corresponding authenticator, prefixed with a domain-separator (except
ed25519, for compatibility reasons). For each other authenticator, this
domain-separator is the single byte-value of its
SignatureScheme flag. E.g. hash(signature schema flag || authenticator bytes).
Each authenticator has a method for deriving its Address as well as
documentation for the specifics of how the derivation is done. See
Ed25519PublicKey::derive_address for an example.
Relationship to ObjectIds
ObjectIds and Addresses share the same 32-byte addressable space but
are derived leveraging different domain-separator values to ensure that,
cryptographically, there won't be any overlap, e.g. there can't be a
valid 0x0 who's ObjectId is equal to that of the Address of a user
account.
BCS
An Address's BCS serialized form is defined by the following:
0x4
from_hex
@classmethod
def from_hex(cls, hex: "str")
Parses an Address from a hex string, with or without a 0x prefix.
The string can be of variable length; if it's shorter than 64 hex
characters, it will be left-padded with 0s.
to_canonical_string
def to_canonical_string(with_prefix: "bool") -> "str"
Returns the string representation of this address using the
canonical display, with or without a 0x prefix.
to_short_string
def to_short_string(with_prefix: "bool") -> "str"
Returns the shortest possible string representation of the address (i.e. with leading zeroes trimmed).
ArgumentProtocol Objects
class ArgumentProtocol(typing.Protocol)
An argument to a programmable transaction command
BCS
The BCS serialized form for this type is defined by the following ABNF:
argument = argument-gas
=/ argument-input
=/ argument-result
=/ argument-nested-result
argument-gas = %x00
argument-input = %x01 u16
argument-result = %x02 u16
argument-nested-result = %x03 u16 u16
get_nested_result
def get_nested_result(ix: "int")
Get the nested result for this result at the given index. Returns None if this is not a Result.
Argument Objects
class Argument()
An argument to a programmable transaction command
BCS
The BCS serialized form for this type is defined by the following ABNF:
argument = argument-gas
=/ argument-input
=/ argument-result
=/ argument-nested-result
argument-gas = %x00
argument-input = %x01 u16
argument-result = %x02 u16
argument-nested-result = %x03 u16 u16
new_gas
@classmethod
def new_gas(cls)
The gas coin. The gas coin can only be used by-ref, except for with
TransferObjects, which can use it by-value.
new_input
@classmethod
def new_input(cls, input: "int")
One of the input objects or primitive values (from
ProgrammableTransaction inputs)
new_nested_result
@classmethod
def new_nested_result(cls, command_index: "int", subresult_index: "int")
Like a Result but it accesses a nested result. Currently, the only
usage of this is to access a value from a Move call with multiple
return values.
new_result
@classmethod
def new_result(cls, result: "int")
The result of another command (from ProgrammableTransaction commands)
get_nested_result
def get_nested_result(ix: "int") -> "typing.Optional[Argument]"
Get the nested result for this result at the given index. Returns None if this is not a Result.
Bls12381PublicKeyProtocol Objects
class Bls12381PublicKeyProtocol(typing.Protocol)
A bls12381 min-sig public key.
BCS
The BCS serialized form for this type is defined by the following ABNF:
bls-public-key = %x60 96OCTET
Due to historical reasons, even though a min-sig Bls12381PublicKey has a
fixed-length of 96, IOTA's binary representation of a min-sig
Bls12381PublicKey is prefixed with its length meaning its serialized
binary form (in bcs) is 97 bytes long vs a more compact 96 bytes.
Bls12381PublicKey Objects
class Bls12381PublicKey()
A bls12381 min-sig public key.
BCS
The BCS serialized form for this type is defined by the following ABNF:
bls-public-key = %x60 96OCTET
Due to historical reasons, even though a min-sig Bls12381PublicKey has a
fixed-length of 96, IOTA's binary representation of a min-sig
Bls12381PublicKey is prefixed with its length meaning its serialized
binary form (in bcs) is 97 bytes long vs a more compact 96 bytes.
Bls12381SignatureProtocol Objects
class Bls12381SignatureProtocol(typing.Protocol)
A bls12381 min-sig public key.
BCS
The BCS serialized form for this type is defined by the following ABNF:
bls-public-key = %x60 96OCTET
Due to historical reasons, even though a min-sig Bls12381PublicKey has a
fixed-length of 96, IOTA's binary representation of a min-sig
Bls12381PublicKey is prefixed with its length meaning its serialized
binary form (in bcs) is 97 bytes long vs a more compact 96 bytes.
Bls12381Signature Objects
class Bls12381Signature()
A bls12381 min-sig public key.
BCS
The BCS serialized form for this type is defined by the following ABNF:
bls-public-key = %x60 96OCTET
Due to historical reasons, even though a min-sig Bls12381PublicKey has a
fixed-length of 96, IOTA's binary representation of a min-sig
Bls12381PublicKey is prefixed with its length meaning its serialized
binary form (in bcs) is 97 bytes long vs a more compact 96 bytes.
Bn254FieldElementProtocol Objects
class Bn254FieldElementProtocol(typing.Protocol)
A point on the BN254 elliptic curve.
This is a 32-byte, or 256-bit, value that is generally represented as radix10 when a human-readable display format is needed, and is represented as a 32-byte big-endian value while in memory.
BCS
The BCS serialized form for this type is defined by the following ABNF:
bn254-field-element = *DIGIT ; which is then interpreted as a radix10 encoded 32-byte value
Bn254FieldElement Objects
class Bn254FieldElement()
A point on the BN254 elliptic curve.
This is a 32-byte, or 256-bit, value that is generally represented as radix10 when a human-readable display format is needed, and is represented as a 32-byte big-endian value while in memory.
BCS
The BCS serialized form for this type is defined by the following ABNF:
bn254-field-element = *DIGIT ; which is then interpreted as a radix10 encoded 32-byte value
CancelledTransactionProtocol Objects
class CancelledTransactionProtocol(typing.Protocol)
A transaction that was cancelled
BCS
The BCS serialized form for this type is defined by the following ABNF:
cancelled-transaction = digest (vector version-assignment)
CancelledTransaction Objects
class CancelledTransaction()
A transaction that was cancelled
BCS
The BCS serialized form for this type is defined by the following ABNF:
cancelled-transaction = digest (vector version-assignment)
ChangeEpochProtocol Objects
class ChangeEpochProtocol(typing.Protocol)
System transaction used to change the epoch
BCS
The BCS serialized form for this type is defined by the following ABNF:
change-epoch = u64 ; next epoch
u64 ; protocol version
u64 ; storage charge
u64 ; computation charge
u64 ; storage rebate
u64 ; non-refundable storage fee
u64 ; epoch start timestamp
(vector system-package)
computation_charge
def computation_charge()
The total amount of gas charged for computation during the epoch.
epoch
def epoch()
The next (to become) epoch ID.
epoch_start_timestamp_ms
def epoch_start_timestamp_ms()
Unix timestamp when epoch started
non_refundable_storage_fee
def non_refundable_storage_fee()
The non-refundable storage fee.
protocol_version
def protocol_version()
The protocol version in effect in the new epoch.
storage_charge
def storage_charge()
The total amount of gas charged for storage during the epoch.
storage_rebate
def storage_rebate()
The amount of storage rebate refunded to the txn senders.
system_packages
def system_packages()
System packages (specifically framework and move stdlib) that are written before the new epoch starts.
ChangeEpoch Objects
class ChangeEpoch()
System transaction used to change the epoch
BCS
The BCS serialized form for this type is defined by the following ABNF:
change-epoch = u64 ; next epoch
u64 ; protocol version
u64 ; storage charge
u64 ; computation charge
u64 ; storage rebate
u64 ; non-refundable storage fee
u64 ; epoch start timestamp
(vector system-package)
computation_charge
def computation_charge() -> "int"
The total amount of gas charged for computation during the epoch.
epoch
def epoch() -> "int"
The next (to become) epoch ID.
epoch_start_timestamp_ms
def epoch_start_timestamp_ms() -> "int"
Unix timestamp when epoch started
non_refundable_storage_fee
def non_refundable_storage_fee() -> "int"
The non-refundable storage fee.
protocol_version
def protocol_version() -> "int"
The protocol version in effect in the new epoch.
storage_charge
def storage_charge() -> "int"
The total amount of gas charged for storage during the epoch.
storage_rebate
def storage_rebate() -> "int"
The amount of storage rebate refunded to the txn senders.
system_packages
def system_packages() -> "typing.List[SystemPackage]"
System packages (specifically framework and move stdlib) that are written before the new epoch starts.
ChangeEpochV2Protocol Objects
class ChangeEpochV2Protocol(typing.Protocol)
System transaction used to change the epoch
BCS
The BCS serialized form for this type is defined by the following ABNF:
change-epoch = u64 ; next epoch
u64 ; protocol version
u64 ; storage charge
u64 ; computation charge
u64 ; computation charge burned
u64 ; storage rebate
u64 ; non-refundable storage fee
u64 ; epoch start timestamp
(vector system-package)
computation_charge
def computation_charge()
The total amount of gas charged for computation during the epoch.
computation_charge_burned
def computation_charge_burned()
The total amount of gas burned for computation during the epoch.
epoch
def epoch()
The next (to become) epoch ID.
epoch_start_timestamp_ms
def epoch_start_timestamp_ms()
Unix timestamp when epoch started
non_refundable_storage_fee
def non_refundable_storage_fee()
The non-refundable storage fee.
protocol_version
def protocol_version()
The protocol version in effect in the new epoch.
storage_charge
def storage_charge()
The total amount of gas charged for storage during the epoch.
storage_rebate
def storage_rebate()
The amount of storage rebate refunded to the txn senders.
system_packages
def system_packages()
System packages (specifically framework and move stdlib) that are written before the new epoch starts.
ChangeEpochV2 Objects
class ChangeEpochV2()
System transaction used to change the epoch
BCS
The BCS serialized form for this type is defined by the following ABNF:
change-epoch = u64 ; next epoch
u64 ; protocol version
u64 ; storage charge
u64 ; computation charge
u64 ; computation charge burned
u64 ; storage rebate
u64 ; non-refundable storage fee
u64 ; epoch start timestamp
(vector system-package)
computation_charge
def computation_charge() -> "int"
The total amount of gas charged for computation during the epoch.
computation_charge_burned
def computation_charge_burned() -> "int"
The total amount of gas burned for computation during the epoch.
epoch
def epoch() -> "int"
The next (to become) epoch ID.
epoch_start_timestamp_ms
def epoch_start_timestamp_ms() -> "int"
Unix timestamp when epoch started
non_refundable_storage_fee
def non_refundable_storage_fee() -> "int"
The non-refundable storage fee.
protocol_version
def protocol_version() -> "int"
The protocol version in effect in the new epoch.
storage_charge
def storage_charge() -> "int"
The total amount of gas charged for storage during the epoch.
storage_rebate
def storage_rebate() -> "int"
The amount of storage rebate refunded to the txn senders.
system_packages
def system_packages() -> "typing.List[SystemPackage]"
System packages (specifically framework and move stdlib) that are written before the new epoch starts.
ChangeEpochV3Protocol Objects
class ChangeEpochV3Protocol(typing.Protocol)
computation_charge
def computation_charge()
The total amount of gas charged for computation during the epoch.
computation_charge_burned
def computation_charge_burned()
The total amount of gas burned for computation during the epoch.
eligible_active_validators
def eligible_active_validators()
Vector of active validator indices eligible to take part in committee selection because they support the new, target protocol version.
epoch
def epoch()
The next (to become) epoch ID.
epoch_start_timestamp_ms
def epoch_start_timestamp_ms()
Unix timestamp when epoch started
non_refundable_storage_fee
def non_refundable_storage_fee()
The non-refundable storage fee.
protocol_version
def protocol_version()
The protocol version in effect in the new epoch.
storage_charge
def storage_charge()
The total amount of gas charged for storage during the epoch.
storage_rebate
def storage_rebate()
The amount of storage rebate refunded to the txn senders.
system_packages
def system_packages()
System packages (specifically framework and move stdlib) that are written before the new epoch starts.
ChangeEpochV3 Objects
class ChangeEpochV3()
computation_charge
def computation_charge() -> "int"
The total amount of gas charged for computation during the epoch.
computation_charge_burned
def computation_charge_burned() -> "int"
The total amount of gas burned for computation during the epoch.
eligible_active_validators
def eligible_active_validators() -> "typing.List[int]"
Vector of active validator indices eligible to take part in committee selection because they support the new, target protocol version.
epoch
def epoch() -> "int"
The next (to become) epoch ID.
epoch_start_timestamp_ms
def epoch_start_timestamp_ms() -> "int"
Unix timestamp when epoch started
non_refundable_storage_fee
def non_refundable_storage_fee() -> "int"
The non-refundable storage fee.
protocol_version
def protocol_version() -> "int"
The protocol version in effect in the new epoch.
storage_charge
def storage_charge() -> "int"
The total amount of gas charged for storage during the epoch.
storage_rebate
def storage_rebate() -> "int"
The amount of storage rebate refunded to the txn senders.
system_packages
def system_packages() -> "typing.List[SystemPackage]"
System packages (specifically framework and move stdlib) that are written before the new epoch starts.
ChangeEpochV4Protocol Objects
class ChangeEpochV4Protocol(typing.Protocol)
adjust_rewards_by_score
def adjust_rewards_by_score()
Whether to adjust validator rewards based on score.
computation_charge
def computation_charge()
The total amount of gas charged for computation during the epoch.
computation_charge_burned
def computation_charge_burned()
The total amount of gas burned for computation during the epoch.
eligible_active_validators
def eligible_active_validators()
Vector of active validator indices eligible to take part in committee selection because they support the new, target protocol version.
epoch
def epoch()
The next (to become) epoch ID.
epoch_start_timestamp_ms
def epoch_start_timestamp_ms()
Unix timestamp when epoch started
non_refundable_storage_fee
def non_refundable_storage_fee()
The non-refundable storage fee.
protocol_version
def protocol_version()
The protocol version in effect in the new epoch.
scores
def scores()
Vector of scores relative to the past epoch performance of each validator, ordered by the past epoch's validator index.
storage_charge
def storage_charge()
The total amount of gas charged for storage during the epoch.
storage_rebate
def storage_rebate()
The amount of storage rebate refunded to the txn senders.
system_packages
def system_packages()
System packages (specifically framework and move stdlib) that are written before the new epoch starts.
ChangeEpochV4 Objects
class ChangeEpochV4()
adjust_rewards_by_score
def adjust_rewards_by_score() -> "bool"
Whether to adjust validator rewards based on score.
computation_charge
def computation_charge() -> "int"
The total amount of gas charged for computation during the epoch.
computation_charge_burned
def computation_charge_burned() -> "int"
The total amount of gas burned for computation during the epoch.
eligible_active_validators
def eligible_active_validators() -> "typing.List[int]"
Vector of active validator indices eligible to take part in committee selection because they support the new, target protocol version.
epoch
def epoch() -> "int"
The next (to become) epoch ID.
epoch_start_timestamp_ms
def epoch_start_timestamp_ms() -> "int"
Unix timestamp when epoch started
non_refundable_storage_fee
def non_refundable_storage_fee() -> "int"
The non-refundable storage fee.
protocol_version
def protocol_version() -> "int"
The protocol version in effect in the new epoch.
scores
def scores() -> "typing.List[int]"
Vector of scores relative to the past epoch performance of each validator, ordered by the past epoch's validator index.
storage_charge
def storage_charge() -> "int"
The total amount of gas charged for storage during the epoch.
storage_rebate
def storage_rebate() -> "int"
The amount of storage rebate refunded to the txn senders.
system_packages
def system_packages() -> "typing.List[SystemPackage]"
System packages (specifically framework and move stdlib) that are written before the new epoch starts.
CheckpointCommitmentProtocol Objects
class CheckpointCommitmentProtocol(typing.Protocol)
A commitment made by a checkpoint.
BCS
The BCS serialized form for this type is defined by the following ABNF:
; CheckpointCommitment is an enum and each variant is prefixed with its index
checkpoint-commitment = ecmh-live-object-set
ecmh-live-object-set = %x00 digest
CheckpointCommitment Objects
class CheckpointCommitment()
A commitment made by a checkpoint.
BCS
The BCS serialized form for this type is defined by the following ABNF:
; CheckpointCommitment is an enum and each variant is prefixed with its index
checkpoint-commitment = ecmh-live-object-set
ecmh-live-object-set = %x00 digest
CheckpointContentsProtocol Objects
class CheckpointContentsProtocol(typing.Protocol)
The committed to contents of a checkpoint.
CheckpointContents contains a list of digests of Transactions, their
effects, and the user signatures that authorized their execution included in
a checkpoint.
BCS
The BCS serialized form for this type is defined by the following ABNF:
checkpoint-contents = %x00 checkpoint-contents-v1 ; variant 0
checkpoint-contents-v1 = (vector (digest digest)) ; vector of transaction and effect digests
(vector (vector bcs-user-signature)) ; set of user signatures for each
; transaction. MUST be the same
; length as the vector of digests
CheckpointContents Objects
class CheckpointContents()
The committed to contents of a checkpoint.
CheckpointContents contains a list of digests of Transactions, their
effects, and the user signatures that authorized their execution included in
a checkpoint.
BCS
The BCS serialized form for this type is defined by the following ABNF:
checkpoint-contents = %x00 checkpoint-contents-v1 ; variant 0
checkpoint-contents-v1 = (vector (digest digest)) ; vector of transaction and effect digests
(vector (vector bcs-user-signature)) ; set of user signatures for each
; transaction. MUST be the same
; length as the vector of digests
CheckpointSummaryProtocol Objects
class CheckpointSummaryProtocol(typing.Protocol)
A header for a Checkpoint on the IOTA blockchain.
On the IOTA network, checkpoints define the history of the blockchain. They are quite similar to the concept of blocks used by other blockchains like Bitcoin or Ethereum. The IOTA blockchain, however, forms checkpoints after transaction execution has already happened to provide a certified history of the chain, instead of being formed before execution.
Checkpoints commit to a variety of state including but not limited to:
- The hash of the previous checkpoint.
- The set of transaction digests, their corresponding effects digests, as well as the set of user signatures which authorized its execution.
- The object's produced by a transaction.
- The set of live objects that make up the current state of the chain.
- On epoch transitions, the next validator committee.
CheckpointSummarys themselves don't directly include all of the above
information but they are the top-level type by which all the above are
committed to transitively via cryptographic hashes included in the summary.
CheckpointSummarys are signed and certified by a quorum of the validator
committee in a given epoch in order to allow verification of the chain's
state.
BCS
The BCS serialized form for this type is defined by the following ABNF:
checkpoint-summary = u64 ; epoch
u64 ; sequence_number
u64 ; network_total_transactions
digest ; content_digest
(option digest) ; previous_digest
gas-cost-summary ; epoch_rolling_gas_cost_summary
u64 ; timestamp_ms
(vector checkpoint-commitment) ; checkpoint_commitments
(option end-of-epoch-data) ; end_of_epoch_data
bytes ; version_specific_data
checkpoint_commitments
def checkpoint_commitments()
Commitments to checkpoint-specific state.
content_digest
def content_digest()
The hash of the CheckpointContents for this checkpoint.
end_of_epoch_data
def end_of_epoch_data()
Extra data only present in the final checkpoint of an epoch.
epoch
def epoch()
Epoch that this checkpoint belongs to.
epoch_rolling_gas_cost_summary
def epoch_rolling_gas_cost_summary()
The running total gas costs of all transactions included in the current epoch so far until this checkpoint.
network_total_transactions
def network_total_transactions()
Total number of transactions committed since genesis, including those in this checkpoint.
previous_digest
def previous_digest()
The hash of the previous CheckpointSummary.
This will be only be None for the first, or genesis checkpoint.
sequence_number
def sequence_number()
The height of this checkpoint.
timestamp_ms
def timestamp_ms()
Timestamp of the checkpoint - number of milliseconds from the Unix epoch Checkpoint timestamps are monotonic, but not strongly monotonic - subsequent checkpoints can have same timestamp if they originate from the same underlining consensus commit
version_specific_data
def version_specific_data()
CheckpointSummary is not an evolvable structure - it must be readable by any version of the code. Therefore, in order to allow extensions to be added to CheckpointSummary, we allow opaque data to be added to checkpoints which can be deserialized based on the current protocol version.
CheckpointSummary Objects
class CheckpointSummary()
A header for a Checkpoint on the IOTA blockchain.
On the IOTA network, checkpoints define the history of the blockchain. They are quite similar to the concept of blocks used by other blockchains like Bitcoin or Ethereum. The IOTA blockchain, however, forms checkpoints after transaction execution has already happened to provide a certified history of the chain, instead of being formed before execution.
Checkpoints commit to a variety of state including but not limited to:
- The hash of the previous checkpoint.
- The set of transaction digests, their corresponding effects digests, as well as the set of user signatures which authorized its execution.
- The object's produced by a transaction.
- The set of live objects that make up the current state of the chain.
- On epoch transitions, the next validator committee.
CheckpointSummarys themselves don't directly include all of the above
information but they are the top-level type by which all the above are
committed to transitively via cryptographic hashes included in the summary.
CheckpointSummarys are signed and certified by a quorum of the validator
committee in a given epoch in order to allow verification of the chain's
state.
BCS
The BCS serialized form for this type is defined by the following ABNF:
checkpoint-summary = u64 ; epoch
u64 ; sequence_number
u64 ; network_total_transactions
digest ; content_digest
(option digest) ; previous_digest
gas-cost-summary ; epoch_rolling_gas_cost_summary
u64 ; timestamp_ms
(vector checkpoint-commitment) ; checkpoint_commitments
(option end-of-epoch-data) ; end_of_epoch_data
bytes ; version_specific_data
checkpoint_commitments
def checkpoint_commitments() -> "typing.List[CheckpointCommitment]"
Commitments to checkpoint-specific state.
content_digest
def content_digest() -> "Digest"
The hash of the CheckpointContents for this checkpoint.
end_of_epoch_data
def end_of_epoch_data() -> "typing.Optional[EndOfEpochData]"
Extra data only present in the final checkpoint of an epoch.
epoch
def epoch() -> "int"
Epoch that this checkpoint belongs to.
epoch_rolling_gas_cost_summary
def epoch_rolling_gas_cost_summary() -> "GasCostSummary"
The running total gas costs of all transactions included in the current epoch so far until this checkpoint.
network_total_transactions
def network_total_transactions() -> "int"
Total number of transactions committed since genesis, including those in this checkpoint.
previous_digest
def previous_digest() -> "typing.Optional[Digest]"
The hash of the previous CheckpointSummary.
This will be only be None for the first, or genesis checkpoint.
sequence_number
def sequence_number() -> "int"
The height of this checkpoint.
timestamp_ms
def timestamp_ms() -> "int"
Timestamp of the checkpoint - number of milliseconds from the Unix epoch Checkpoint timestamps are monotonic, but not strongly monotonic - subsequent checkpoints can have same timestamp if they originate from the same underlining consensus commit
version_specific_data
def version_specific_data() -> "bytes"
CheckpointSummary is not an evolvable structure - it must be readable by any version of the code. Therefore, in order to allow extensions to be added to CheckpointSummary, we allow opaque data to be added to checkpoints which can be deserialized based on the current protocol version.
CheckpointTransactionInfoProtocol Objects
class CheckpointTransactionInfoProtocol(typing.Protocol)
Transaction information committed to in a checkpoint
CheckpointTransactionInfo Objects
class CheckpointTransactionInfo()
Transaction information committed to in a checkpoint
CircomG1Protocol Objects
class CircomG1Protocol(typing.Protocol)
A G1 point
This represents the canonical decimal representation of the projective coordinates in Fq.
BCS
The BCS serialized form for this type is defined by the following ABNF:
circom-g1 = %x03 3(bn254-field-element)
CircomG1 Objects
class CircomG1()
A G1 point
This represents the canonical decimal representation of the projective coordinates in Fq.
BCS
The BCS serialized form for this type is defined by the following ABNF:
circom-g1 = %x03 3(bn254-field-element)
CircomG2Protocol Objects
class CircomG2Protocol(typing.Protocol)
A G2 point
This represents the canonical decimal representation of the coefficients of the projective coordinates in Fq2.
BCS
The BCS serialized form for this type is defined by the following ABNF:
circom-g2 = %x03 3(%x02 2(bn254-field-element))
CircomG2 Objects
class CircomG2()
A G2 point
This represents the canonical decimal representation of the coefficients of the projective coordinates in Fq2.
BCS
The BCS serialized form for this type is defined by the following ABNF:
circom-g2 = %x03 3(%x02 2(bn254-field-element))
ClientTransactionBuilderProtocol Objects
class ClientTransactionBuilderProtocol(typing.Protocol)
A builder for creating transactions which uses a GraphQL client to
automatically resolve inputs. Use finish to finalize the transaction data.
dry_run
def dry_run(skip_checks: "typing.Union[object, bool]" = _DEFAULT)
Dry run the transaction.
execute
def execute(
signer: "TransactionSigner",
wait_for: "typing.Union[object, typing.Optional[WaitForTx]]" = _DEFAULT
)
Execute the transaction and optionally wait for finalization.
execute_with_sponsor
def execute_with_sponsor(
signer: "TransactionSigner",
sponsor_signer: "TransactionSigner",
wait_for: "typing.Union[object, typing.Optional[WaitForTx]]" = _DEFAULT
)
Execute the transaction and optionally wait for finalization.
expiration
def expiration(epoch: "int")
Set the expiration of the transaction to be a specific epoch.
finish
def finish()
Convert this builder into a transaction.
gas
def gas(object_ids: "typing.List[ObjectId]")
Add gas coins that will be consumed. Optional.
gas_budget
def gas_budget(budget: "int")
Set the gas budget for the transaction.
gas_price
def gas_price(price: "int")
Set the gas price for the transaction.
gas_station_sponsor
def gas_station_sponsor(
url: "str",
duration: "typing.Union[object, typing.Optional[Duration]]" = _DEFAULT,
headers:
"typing.Union[object, typing.Optional[dict[str, typing.List[str]]]]" = _DEFAULT
)
Set the gas station sponsor.
make_move_vec
def make_move_vec(elements: "typing.List[MoveArg]", type_tag: "TypeTag",
name: "str")
Make a move vector from a list of elements. The elements must all be of
the type indicated by type_tag.
merge_coins
def merge_coins(primary_coin: "PtbArgument",
consumed_coins: "typing.List[PtbArgument]")
Merge multiple coins into one.
This method combines the balances of multiple coins of the same coin
type into a single coin. The primary_coin will receive the balances
from all consumed_coins. After merging, the consumed_coins will
be consumed and no longer exist.
move_call
def move_call(
package: "Address",
module: "Identifier",
function: "Identifier",
arguments: "typing.Union[object, typing.List[PtbArgument]]" = _DEFAULT,
type_args: "typing.Union[object, typing.List[TypeTag]]" = _DEFAULT,
names: "typing.Union[object, typing.List[str]]" = _DEFAULT)
Call a Move function with the given arguments.
publish
def publish(package_data: "MovePackageData", upgrade_cap_name: "str")
Publish a list of modules with the given dependencies. The result
assigned to upgrade_cap_name is the 0x2::package::UpgradeCap
Move type. Note that the upgrade capability needs to be handled
after this call:
- transfer it to the transaction sender or another address
- burn it
- wrap it for access control
- discard the it to make a package immutable
The arguments required for this command are:
modules: is the modules' bytecode to be publisheddependencies: is the list of IDs of the transitive dependencies of the package
send_coins
def send_coins(
coins: "typing.List[PtbArgument]",
recipient: "Address",
amount: "typing.Union[object, typing.Optional[PtbArgument]]" = _DEFAULT
)
Transfer some coins to a recipient address. If multiple coins are provided then they will be merged.
The amount parameter specifies the quantity in NANOS, where 1 IOTA
equals 1_000_000_000 NANOS.
If amount is provided, that amount is split from the provided coins
and sent.
If amount is None, the entire coins are transferred.
All provided coins must have the same coin type. Mixing coins of different types will result in an error.
If you intend to transfer all provided coins to another address in a
single transaction, consider using
TransactionBuilder::transfer_objects() instead.
send_iota
def send_iota(recipient: "Address", amount: "PtbArgument")
Send IOTA to a recipient address.
The amount parameter specifies the quantity in NANOS, where 1 IOTA
equals 1_000_000_000 NANOS. That amount is split from the gas coin and
sent.
set_sender
def set_sender(sender: "Address")
Set the sender address.
split_coins
def split_coins(coin: "PtbArgument",
amounts: "typing.List[PtbArgument]",
names: "typing.Union[object, typing.List[str]]" = _DEFAULT)
Split a coin into many.
sponsor
def sponsor(sponsor: "Address")
Set the sponsor of the transaction.
stake
def stake(stake: "PtbArgument", validator_address: "Address")
Add stake to a validator's staking pool.
This is a high-level function which will split the provided stake amount from the gas coin and then stake using the resulting coin.
transfer_objects
def transfer_objects(recipient: "Address",
objects: "typing.List[PtbArgument]")
Transfer a list of objects to the given address, without producing any result.
unstake
def unstake(staked_iota: "PtbArgument")
Withdraw stake from a validator's staking pool.
upgrade
def upgrade(package_id: "ObjectId",
package_data: "MovePackageData",
upgrade_ticket: "PtbArgument",
name: "typing.Union[object, typing.Optional[str]]" = _DEFAULT)
Upgrade a Move package.
modules: is the modules' bytecode for the modules to be publisheddependencies: is the list of IDs of the transitive dependencies of the package to be upgradedpackage: is the ID of the current package being upgradedticket: is the upgrade ticket
To get the ticket, you have to call the
0x2::package::authorize_upgrade function, and pass the package
ID, the upgrade policy, and package digest.
ClientTransactionBuilder Objects
class ClientTransactionBuilder()
A builder for creating transactions which uses a GraphQL client to
automatically resolve inputs. Use finish to finalize the transaction data.
dry_run
async def dry_run(
skip_checks: "typing.Union[object, bool]" = _DEFAULT
) -> "DryRunResult"
Dry run the transaction.
execute
async def execute(
signer: "TransactionSigner",
wait_for: "typing.Union[object, typing.Optional[WaitForTx]]" = _DEFAULT
) -> "TransactionEffects"
Execute the transaction and optionally wait for finalization.
execute_with_sponsor
async def execute_with_sponsor(
signer: "TransactionSigner",
sponsor_signer: "TransactionSigner",
wait_for: "typing.Union[object, typing.Optional[WaitForTx]]" = _DEFAULT
) -> "TransactionEffects"
Execute the transaction and optionally wait for finalization.
expiration
def expiration(epoch: "int") -> "ClientTransactionBuilder"
Set the expiration of the transaction to be a specific epoch.
finish
async def finish() -> "Transaction"
Convert this builder into a transaction.
gas
def gas(object_ids: "typing.List[ObjectId]") -> "ClientTransactionBuilder"
Add gas coins that will be consumed. Optional.
gas_budget
def gas_budget(budget: "int") -> "ClientTransactionBuilder"
Set the gas budget for the transaction.
gas_price
def gas_price(price: "int") -> "ClientTransactionBuilder"
Set the gas price for the transaction.
gas_station_sponsor
def gas_station_sponsor(
url: "str",
duration: "typing.Union[object, typing.Optional[Duration]]" = _DEFAULT,
headers:
"typing.Union[object, typing.Optional[dict[str, typing.List[str]]]]" = _DEFAULT
) -> "ClientTransactionBuilder"
Set the gas station sponsor.
make_move_vec
def make_move_vec(elements: "typing.List[MoveArg]", type_tag: "TypeTag",
name: "str") -> "ClientTransactionBuilder"
Make a move vector from a list of elements. The elements must all be of
the type indicated by type_tag.
merge_coins
def merge_coins(
primary_coin: "PtbArgument", consumed_coins: "typing.List[PtbArgument]"
) -> "ClientTransactionBuilder"
Merge multiple coins into one.
This method combines the balances of multiple coins of the same coin
type into a single coin. The primary_coin will receive the balances
from all consumed_coins. After merging, the consumed_coins will
be consumed and no longer exist.
move_call
def move_call(
package: "Address",
module: "Identifier",
function: "Identifier",
arguments: "typing.Union[object, typing.List[PtbArgument]]" = _DEFAULT,
type_args: "typing.Union[object, typing.List[TypeTag]]" = _DEFAULT,
names: "typing.Union[object, typing.List[str]]" = _DEFAULT
) -> "ClientTransactionBuilder"
Call a Move function with the given arguments.
publish
def publish(package_data: "MovePackageData",
upgrade_cap_name: "str") -> "ClientTransactionBuilder"
Publish a list of modules with the given dependencies. The result
assigned to upgrade_cap_name is the 0x2::package::UpgradeCap
Move type. Note that the upgrade capability needs to be handled
after this call:
- transfer it to the transaction sender or another address
- burn it
- wrap it for access control
- discard the it to make a package immutable
The arguments required for this command are:
modules: is the modules' bytecode to be publisheddependencies: is the list of IDs of the transitive dependencies of the package
send_coins
def send_coins(
coins: "typing.List[PtbArgument]",
recipient: "Address",
amount: "typing.Union[object, typing.Optional[PtbArgument]]" = _DEFAULT
) -> "ClientTransactionBuilder"
Transfer some coins to a recipient address. If multiple coins are provided then they will be merged.
The amount parameter specifies the quantity in NANOS, where 1 IOTA
equals 1_000_000_000 NANOS.
If amount is provided, that amount is split from the provided coins
and sent.
If amount is None, the entire coins are transferred.
All provided coins must have the same coin type. Mixing coins of different types will result in an error.
If you intend to transfer all provided coins to another address in a
single transaction, consider using
TransactionBuilder::transfer_objects() instead.
send_iota
def send_iota(recipient: "Address",
amount: "PtbArgument") -> "ClientTransactionBuilder"
Send IOTA to a recipient address.
The amount parameter specifies the quantity in NANOS, where 1 IOTA
equals 1_000_000_000 NANOS. That amount is split from the gas coin and
sent.
set_sender
def set_sender(sender: "Address") -> None
Set the sender address.
split_coins
def split_coins(
coin: "PtbArgument",
amounts: "typing.List[PtbArgument]",
names: "typing.Union[object, typing.List[str]]" = _DEFAULT
) -> "ClientTransactionBuilder"
Split a coin into many.
sponsor
def sponsor(sponsor: "Address") -> "ClientTransactionBuilder"
Set the sponsor of the transaction.
stake
def stake(stake: "PtbArgument",
validator_address: "Address") -> "ClientTransactionBuilder"
Add stake to a validator's staking pool.
This is a high-level function which will split the provided stake amount from the gas coin and then stake using the resulting coin.
transfer_objects
def transfer_objects(
recipient: "Address",
objects: "typing.List[PtbArgument]") -> "ClientTransactionBuilder"
Transfer a list of objects to the given address, without producing any result.
unstake
def unstake(staked_iota: "PtbArgument") -> "ClientTransactionBuilder"
Withdraw stake from a validator's staking pool.
upgrade
def upgrade(
package_id: "ObjectId",
package_data: "MovePackageData",
upgrade_ticket: "PtbArgument",
name: "typing.Union[object, typing.Optional[str]]" = _DEFAULT
) -> "ClientTransactionBuilder"
Upgrade a Move package.
modules: is the modules' bytecode for the modules to be publisheddependencies: is the list of IDs of the transitive dependencies of the package to be upgradedpackage: is the ID of the current package being upgradedticket: is the upgrade ticket
To get the ticket, you have to call the
0x2::package::authorize_upgrade function, and pass the package
ID, the upgrade policy, and package digest.
CommandProtocol Objects
class CommandProtocol(typing.Protocol)
A single command in a programmable transaction.
BCS
The BCS serialized form for this type is defined by the following ABNF:
command = command-move-call
=/ command-transfer-objects
=/ command-split-coins
=/ command-merge-coins
=/ command-publish
=/ command-make-move-vector
=/ command-upgrade
command-move-call = %x00 move-call
command-transfer-objects = %x01 transfer-objects
command-split-coins = %x02 split-coins
command-merge-coins = %x03 merge-coins
command-publish = %x04 publish
command-make-move-vector = %x05 make-move-vector
command-upgrade = %x06 upgrade
Command Objects
class Command()
A single command in a programmable transaction.
BCS
The BCS serialized form for this type is defined by the following ABNF:
command = command-move-call
=/ command-transfer-objects
=/ command-split-coins
=/ command-merge-coins
=/ command-publish
=/ command-make-move-vector
=/ command-upgrade
command-move-call = %x00 move-call
command-transfer-objects = %x01 transfer-objects
command-split-coins = %x02 split-coins
command-merge-coins = %x03 merge-coins
command-publish = %x04 publish
command-make-move-vector = %x05 make-move-vector
command-upgrade = %x06 upgrade
new_make_move_vector
@classmethod
def new_make_move_vector(cls, make_move_vector: "MakeMoveVector")
Given n-values of the same type, it constructs a vector. For non objects or an empty vector, the type tag must be specified.
new_merge_coins
@classmethod
def new_merge_coins(cls, merge_coins: "MergeCoins")
It merges n-coins into the first coin
new_move_call
@classmethod
def new_move_call(cls, move_call: "MoveCall")
A call to either an entry or a public Move function
new_publish
@classmethod
def new_publish(cls, publish: "Publish")
Publishes a Move package. It takes the package bytes and a list of the package's transitive dependencies to link against on-chain.
new_split_coins
@classmethod
def new_split_coins(cls, split_coins: "SplitCoins")
It splits off some amounts into a new coins with those amounts
new_transfer_objects
@classmethod
def new_transfer_objects(cls, transfer_objects: "TransferObjects")
It sends n-objects to the specified address. These objects must have store (public transfer) and either the previous owner must be an address or the object must be newly created.
new_upgrade
@classmethod
def new_upgrade(cls, upgrade: "Upgrade")
Upgrades a Move package Takes (in order):
- A vector of serialized modules for the package.
- A vector of object ids for the transitive dependencies of the new package.
- The object ID of the package being upgraded.
- An argument holding the
UpgradeTicketthat must have been produced from an earlier command in the same programmable transaction.
ConsensusCommitPrologueV1Protocol Objects
class ConsensusCommitPrologueV1Protocol(typing.Protocol)
V1 of the consensus commit prologue system transaction
BCS
The BCS serialized form for this type is defined by the following ABNF:
consensus-commit-prologue-v1 = u64 u64 (option u64) u64 digest
consensus-determined-version-assignments
commit_timestamp_ms
def commit_timestamp_ms()
Unix timestamp from consensus
consensus_commit_digest
def consensus_commit_digest()
Digest of consensus output
consensus_determined_version_assignments
def consensus_determined_version_assignments()
Stores consensus handler determined shared object version assignments.
epoch
def epoch()
Epoch of the commit prologue transaction
round
def round()
Consensus round of the commit
sub_dag_index
def sub_dag_index()
The sub DAG index of the consensus commit. This field will be populated if there are multiple consensus commits per round.
ConsensusCommitPrologueV1 Objects
class ConsensusCommitPrologueV1()
V1 of the consensus commit prologue system transaction
BCS
The BCS serialized form for this type is defined by the following ABNF:
consensus-commit-prologue-v1 = u64 u64 (option u64) u64 digest
consensus-determined-version-assignments
commit_timestamp_ms
def commit_timestamp_ms() -> "int"
Unix timestamp from consensus
consensus_commit_digest
def consensus_commit_digest() -> "Digest"
Digest of consensus output
consensus_determined_version_assignments
def consensus_determined_version_assignments(
) -> "ConsensusDeterminedVersionAssignments"
Stores consensus handler determined shared object version assignments.
epoch
def epoch() -> "int"
Epoch of the commit prologue transaction
round
def round() -> "int"
Consensus round of the commit
sub_dag_index
def sub_dag_index() -> "typing.Optional[int]"
The sub DAG index of the consensus commit. This field will be populated if there are multiple consensus commits per round.
DigestProtocol Objects
class DigestProtocol(typing.Protocol)
A 32-byte Blake2b256 hash output.
BCS
A Digest's BCS serialized form is defined by the following:
digest = %x20 32OCTET
Due to historical reasons, even though a Digest has a fixed-length of 32,
IOTA's binary representation of a Digest is prefixed with its length
meaning its serialized binary form (in bcs) is 33 bytes long vs a more
compact 32 bytes.
next_lexicographical
def next_lexicographical()
Returns the next digest in byte-increasing order.
Digest Objects
class Digest()
A 32-byte Blake2b256 hash output.
BCS
A Digest's BCS serialized form is defined by the following:
digest = %x20 32OCTET
Due to historical reasons, even though a Digest has a fixed-length of 32,
IOTA's binary representation of a Digest is prefixed with its length
meaning its serialized binary form (in bcs) is 33 bytes long vs a more
compact 32 bytes.
next_lexicographical
def next_lexicographical() -> "Digest"
Returns the next digest in byte-increasing order.
Ed25519PrivateKeyProtocol Objects
class Ed25519PrivateKeyProtocol(typing.Protocol)
sign_personal_message
def sign_personal_message(message: "PersonalMessage")
Sign a personal message and return a UserSignature.
sign_transaction
def sign_transaction(transaction: "Transaction")
Sign a transaction and return a UserSignature.
to_bech32
def to_bech32()
Encode this private key as flag || privkey in Bech32 starting with
"iotaprivkey" to a string.
to_bytes
def to_bytes()
Serialize this private key to bytes.
to_der
def to_der()
Serialize this private key as DER-encoded PKCS#8
to_pem
def to_pem()
Serialize this private key as PEM-encoded PKCS#8
Ed25519PrivateKey Objects
class Ed25519PrivateKey()
from_bech32
@classmethod
def from_bech32(cls, value: "str")
Decode a private key from flag || privkey in Bech32 starting with
"iotaprivkey".
from_der
@classmethod
def from_der(cls, bytes: "bytes")
Deserialize PKCS#8 private key from ASN.1 DER-encoded data (binary format).
from_mnemonic
@classmethod
def from_mnemonic(cls,
phrase: "str",
account_index: "typing.Union[object, int]" = _DEFAULT,
password: "typing.Union[object, str]" = _DEFAULT)
Construct the private key from a mnemonic phrase
from_mnemonic_with_path
@classmethod
def from_mnemonic_with_path(cls,
phrase: "str",
path: "str",
password: "typing.Union[object, str]" = _DEFAULT)
Create an instance from a mnemonic phrase and a derivation path like
"m/44'/4218'/0'/0'/0'"
from_pem
@classmethod
def from_pem(cls, s: "str")
Deserialize PKCS#8-encoded private key from PEM.
sign_personal_message
def sign_personal_message(message: "PersonalMessage") -> "UserSignature"
Sign a personal message and return a UserSignature.
sign_transaction
def sign_transaction(transaction: "Transaction") -> "UserSignature"
Sign a transaction and return a UserSignature.
to_bech32
def to_bech32() -> "str"
Encode this private key as flag || privkey in Bech32 starting with
"iotaprivkey" to a string.
to_bytes
def to_bytes() -> "bytes"
Serialize this private key to bytes.
to_der
def to_der() -> "bytes"
Serialize this private key as DER-encoded PKCS#8
to_pem
def to_pem() -> "str"
Serialize this private key as PEM-encoded PKCS#8
Ed25519PublicKeyProtocol Objects
class Ed25519PublicKeyProtocol(typing.Protocol)
An ed25519 public key.
BCS
The BCS serialized form for this type is defined by the following ABNF:
ed25519-public-key = 32OCTET
derive_address
def derive_address()
Derive an Address from this Public Key
An Address can be derived from an Ed25519PublicKey by hashing the
bytes of the public key with no prefix flag.
hash(32-byte ed25519 public key)
scheme
def scheme()
Returns the signature scheme for this public key.
to_flagged_bytes
def to_flagged_bytes()
Returns the bytes with signature scheme flag prepended.
Ed25519PublicKey Objects
class Ed25519PublicKey()
An ed25519 public key.
BCS
The BCS serialized form for this type is defined by the following ABNF:
ed25519-public-key = 32OCTET
derive_address
def derive_address() -> "Address"
Derive an Address from this Public Key
An Address can be derived from an Ed25519PublicKey by hashing the
bytes of the public key with no prefix flag.
hash(32-byte ed25519 public key)
scheme
def scheme() -> "SignatureScheme"
Returns the signature scheme for this public key.
to_flagged_bytes
def to_flagged_bytes() -> "bytes"
Returns the bytes with signature scheme flag prepended.
Ed25519SignatureProtocol Objects
class Ed25519SignatureProtocol(typing.Protocol)
An ed25519 signature.
BCS
The BCS serialized form for this type is defined by the following ABNF:
ed25519-signature = 64OCTET
Ed25519Signature Objects
class Ed25519Signature()
An ed25519 signature.
BCS
The BCS serialized form for this type is defined by the following ABNF:
ed25519-signature = 64OCTET
Ed25519VerifyingKeyProtocol Objects
class Ed25519VerifyingKeyProtocol(typing.Protocol)
to_der
def to_der()
Serialize this public key as DER-encoded data
to_pem
def to_pem()
Serialize this public key into PEM format
Ed25519VerifyingKey Objects
class Ed25519VerifyingKey()
from_der
@classmethod
def from_der(cls, bytes: "bytes")
Deserialize public key from ASN.1 DER-encoded data (binary format).
from_pem
@classmethod
def from_pem(cls, s: "str")
Deserialize public key from PEM.
to_der
def to_der() -> "bytes"
Serialize this public key as DER-encoded data
to_pem
def to_pem() -> "str"
Serialize this public key into PEM format
EndOfEpochTransactionKindProtocol Objects
class EndOfEpochTransactionKindProtocol(typing.Protocol)
Operation run at the end of an epoch
BCS
The BCS serialized form for this type is defined by the following ABNF:
end-of-epoch-transaction-kind = eoe-change-epoch
=/ eoe-authenticator-state-create
=/ eoe-authenticator-state-expire
=/ eoe-randomness-state-create
=/ eoe-deny-list-state-create
=/ eoe-bridge-state-create
=/ eoe-bridge-committee-init
=/ eoe-store-execution-time-observations
eoe-change-epoch = %x00 change-epoch
eoe-authenticator-state-create = %x01
eoe-authenticator-state-expire = %x02 authenticator-state-expire
eoe-randomness-state-create = %x03
eoe-deny-list-state-create = %x04
eoe-bridge-state-create = %x05 digest
eoe-bridge-committee-init = %x06 u64
eoe-store-execution-time-observations = %x07 stored-execution-time-observations
EndOfEpochTransactionKind Objects
class EndOfEpochTransactionKind()
Operation run at the end of an epoch
BCS
The BCS serialized form for this type is defined by the following ABNF:
end-of-epoch-transaction-kind = eoe-change-epoch
=/ eoe-authenticator-state-create
=/ eoe-authenticator-state-expire
=/ eoe-randomness-state-create
=/ eoe-deny-list-state-create
=/ eoe-bridge-state-create
=/ eoe-bridge-committee-init
=/ eoe-store-execution-time-observations
eoe-change-epoch = %x00 change-epoch
eoe-authenticator-state-create = %x01
eoe-authenticator-state-expire = %x02 authenticator-state-expire
eoe-randomness-state-create = %x03
eoe-deny-list-state-create = %x04
eoe-bridge-state-create = %x05 digest
eoe-bridge-committee-init = %x06 u64
eoe-store-execution-time-observations = %x07 stored-execution-time-observations
ExecutionTimeObservationKeyProtocol Objects
class ExecutionTimeObservationKeyProtocol(typing.Protocol)
Key for an execution time observation
BCS
The BCS serialized form for this type is defined by the following ABNF:
execution-time-observation-key = %x00 move-entry-point
=/ %x01 ; transfer-objects
=/ %x02 ; split-coins
=/ %x03 ; merge-coins
=/ %x04 ; publish
=/ %x05 ; make-move-vec
=/ %x06 ; upgrade
move-entry-point = object-id string string (vec type-tag)
ExecutionTimeObservationKey Objects
class ExecutionTimeObservationKey()
Key for an execution time observation
BCS
The BCS serialized form for this type is defined by the following ABNF:
execution-time-observation-key = %x00 move-entry-point
=/ %x01 ; transfer-objects
=/ %x02 ; split-coins
=/ %x03 ; merge-coins
=/ %x04 ; publish
=/ %x05 ; make-move-vec
=/ %x06 ; upgrade
move-entry-point = object-id string string (vec type-tag)
ExecutionTimeObservationsProtocol Objects
class ExecutionTimeObservationsProtocol(typing.Protocol)
Set of Execution Time Observations from the committee.
BCS
The BCS serialized form for this type is defined by the following ABNF:
stored-execution-time-observations = %x00 v1-stored-execution-time-observations
v1-stored-execution-time-observations = (vec
execution-time-observation-key
(vec execution-time-observation)
)
ExecutionTimeObservations Objects
class ExecutionTimeObservations()
Set of Execution Time Observations from the committee.
BCS
The BCS serialized form for this type is defined by the following ABNF:
stored-execution-time-observations = %x00 v1-stored-execution-time-observations
v1-stored-execution-time-observations = (vec
execution-time-observation-key
(vec execution-time-observation)
)
FaucetClientProtocol Objects
class FaucetClientProtocol(typing.Protocol)
request
def request(address: "Address")
Request gas from the faucet. Note that this will return the UUID of the
request and not wait until the token is received. Use
request_and_wait to wait for the token.
request_and_wait
def request_and_wait(address: "Address")
Request gas from the faucet and wait until the request is completed and
token is transferred. Returns FaucetReceipt if the request is
successful, which contains the list of tokens transferred, and the
transaction digest.
Note that the faucet is heavily rate-limited, so calling repeatedly the faucet would likely result in a 429 code or 502 code.
If you intend to use the transferred tokens with the graphql client,
consider using request_and_wait_for_finalized instead to ensure
the tokens are available in the indexer.
request_and_wait_for_finalized
def request_and_wait_for_finalized(address: "Address",
client: "GraphQlClient")
Request gas from the faucet and wait until the request is completed and
token is transferred and finalized on the ledger. Returns
FaucetReceipt if the request is successful, which contains the
list of tokens transferred, and the transaction digest.
This is a convenience method that combines request_and_wait and
waiting for the funding transactions to be finalized using the provided
GraphQL Client.
request_status
def request_status(id: "str")
Check the faucet request status.
Possible statuses are defined in: BatchSendStatusType
FaucetClient Objects
class FaucetClient()
__init__
def __init__(faucet_url: "str")
Construct a new FaucetClient with the given faucet service URL. This
FaucetClient expects that the service provides two endpoints:
/v1/gas and /v1/status. As such, do not provide the request
endpoint, just the top level service endpoint.
- /v1/gas is used to request gas
- /v1/status/task-uuid is used to check the status of the request
new_devnet
@classmethod
def new_devnet(cls)
Create a new Faucet client connected to the devnet faucet.
new_localnet
@classmethod
def new_localnet(cls)
Create a new Faucet client connected to a localnet faucet.
new_testnet
@classmethod
def new_testnet(cls)
Create a new Faucet client connected to the testnet faucet.
request
async def request(address: "Address") -> "typing.Optional[str]"
Request gas from the faucet. Note that this will return the UUID of the
request and not wait until the token is received. Use
request_and_wait to wait for the token.
request_and_wait
async def request_and_wait(
address: "Address") -> "typing.Optional[FaucetReceipt]"
Request gas from the faucet and wait until the request is completed and
token is transferred. Returns FaucetReceipt if the request is
successful, which contains the list of tokens transferred, and the
transaction digest.
Note that the faucet is heavily rate-limited, so calling repeatedly the faucet would likely result in a 429 code or 502 code.
If you intend to use the transferred tokens with the graphql client,
consider using request_and_wait_for_finalized instead to ensure
the tokens are available in the indexer.
request_and_wait_for_finalized
async def request_and_wait_for_finalized(
address: "Address",
client: "GraphQlClient") -> "typing.Optional[FaucetReceipt]"
Request gas from the faucet and wait until the request is completed and
token is transferred and finalized on the ledger. Returns
FaucetReceipt if the request is successful, which contains the
list of tokens transferred, and the transaction digest.
This is a convenience method that combines request_and_wait and
waiting for the funding transactions to be finalized using the provided
GraphQL Client.
request_status
async def request_status(id: "str") -> "typing.Optional[BatchSendStatus]"
Check the faucet request status.
Possible statuses are defined in: BatchSendStatusType
GenesisObjectProtocol Objects
class GenesisObjectProtocol(typing.Protocol)
An object part of the initial chain state
GenesisObject's are included as a part of genesis, the initial
checkpoint/transaction, that initializes the state of the blockchain.
BCS
The BCS serialized form for this type is defined by the following ABNF:
genesis-object = object-data owner
GenesisObject Objects
class GenesisObject()
An object part of the initial chain state
GenesisObject's are included as a part of genesis, the initial
checkpoint/transaction, that initializes the state of the blockchain.
BCS
The BCS serialized form for this type is defined by the following ABNF:
genesis-object = object-data owner
GenesisTransactionProtocol Objects
class GenesisTransactionProtocol(typing.Protocol)
The genesis transaction
BCS
The BCS serialized form for this type is defined by the following ABNF:
genesis-transaction = (vector genesis-object)
GenesisTransaction Objects
class GenesisTransaction()
The genesis transaction
BCS
The BCS serialized form for this type is defined by the following ABNF:
genesis-transaction = (vector genesis-object)
GraphQlClientProtocol Objects
class GraphQlClientProtocol(typing.Protocol)
The GraphQL client for interacting with the IOTA blockchain.
active_validators
def active_validators(
epoch: "typing.Union[object, typing.Optional[int]]" = _DEFAULT,
pagination_filter:
"typing.Union[object, typing.Optional[PaginationFilter]]" = _DEFAULT)
Get the list of active validators for the provided epoch, including related metadata. If no epoch is provided, it will return the active validators for the current epoch.
balance
def balance(
address: "Address",
coin_type: "typing.Union[object, typing.Optional[str]]" = _DEFAULT)
Get the balance of all the coins owned by address for the provided coin
type. Coin type will default to 0x2::coin::Coin<0x2::iota::IOTA>
if not provided.
chain_id
def chain_id()
Get the chain identifier.
checkpoint
def checkpoint(
digest: "typing.Union[object, typing.Optional[Digest]]" = _DEFAULT,
seq_num: "typing.Union[object, typing.Optional[int]]" = _DEFAULT)
Get the CheckpointSummary for a given checkpoint digest or
checkpoint id. If none is provided, it will use the last known
checkpoint id.
checkpoints
def checkpoints(
pagination_filter:
"typing.Union[object, typing.Optional[PaginationFilter]]" = _DEFAULT)
Get a page of CheckpointSummary for the provided parameters.
coin_metadata
def coin_metadata(coin_type: "str")
Get the coin metadata for the coin type.
coins
def coins(
owner: "Address",
pagination_filter:
"typing.Union[object, typing.Optional[PaginationFilter]]" = _DEFAULT,
coin_type: "typing.Union[object, typing.Optional[StructTag]]" = _DEFAULT
)
Get the list of coins for the specified address.
If coin_type is not provided, all coins will be returned. For IOTA
coins, pass in the coin type: 0x2::iota::IOTA.
dry_run_tx
def dry_run_tx(tx: "Transaction",
skip_checks: "typing.Union[object, bool]" = _DEFAULT)
Dry run a Transaction and return the transaction effects and dry run
error (if any).
skipChecks optional flag disables the usual verification checks that
prevent access to objects that are owned by addresses other than the
sender, and calling non-public, non-entry functions, and some other
checks. Defaults to false.
dry_run_tx_kind
def dry_run_tx_kind(tx_kind: "TransactionKind",
tx_meta: "TransactionMetadata",
skip_checks: "typing.Union[object, bool]" = _DEFAULT)
Dry run a TransactionKind and return the transaction effects and dry
run error (if any).
skipChecks optional flag disables the usual verification checks that
prevent access to objects that are owned by addresses other than the
sender, and calling non-public, non-entry functions, and some other
checks. Defaults to false.
tx_meta is the transaction metadata.
dynamic_field
def dynamic_field(address: "Address", type_tag: "TypeTag", name: "Value")
Access a dynamic field on an object using its name. Names are arbitrary Move values whose type have copy, drop, and store, and are specified using their type, and their BCS contents, Base64 encoded.
The name argument is a json serialized type.
This returns DynamicFieldOutput which contains the name, the value
as json, and object.
dynamic_fields
def dynamic_fields(
address: "Address",
pagination_filter:
"typing.Union[object, typing.Optional[PaginationFilter]]" = _DEFAULT)
Get a page of dynamic fields for the provided address. Note that this will also fetch dynamic fields on wrapped objects.
This returns a page of DynamicFieldOutputs.
dynamic_object_field
def dynamic_object_field(address: "Address", type_tag: "TypeTag",
name: "Value")
Access a dynamic object field on an object using its name. Names are arbitrary Move values whose type have copy, drop, and store, and are specified using their type, and their BCS contents, Base64 encoded.
The name argument is a json serialized type.
This returns DynamicFieldOutput which contains the name, the value
as json, and object.
epoch
def epoch(epoch: "typing.Union[object, typing.Optional[int]]" = _DEFAULT)
Return the epoch information for the provided epoch. If no epoch is provided, it will return the last known epoch.
epoch_total_checkpoints
def epoch_total_checkpoints(
epoch: "typing.Union[object, typing.Optional[int]]" = _DEFAULT)
Return the number of checkpoints in this epoch. This will return
Ok(None) if the epoch requested is not available in the GraphQL
service (e.g., due to pruning).
epoch_total_transaction_blocks
def epoch_total_transaction_blocks(
epoch: "typing.Union[object, typing.Optional[int]]" = _DEFAULT)
Return the number of transaction blocks in this epoch. This will return
Ok(None) if the epoch requested is not available in the GraphQL
service (e.g., due to pruning).
events
def events(
filter: "typing.Union[object, typing.Optional[EventFilter]]" = _DEFAULT,
pagination_filter:
"typing.Union[object, typing.Optional[PaginationFilter]]" = _DEFAULT)
Return a page of tuple (event, transaction digest) based on the (optional) event filter.
execute_tx
def execute_tx(
signatures: "typing.List[UserSignature]",
tx: "Transaction",
wait_for: "typing.Union[object, typing.Optional[WaitForTx]]" = _DEFAULT
)
Execute a transaction.
gas_coins
def gas_coins(
owner: "Address",
pagination_filter:
"typing.Union[object, typing.Optional[PaginationFilter]]" = _DEFAULT)
Get the list of gas coins for the specified address.
iota_names_default_name
def iota_names_default_name(address: "Address",
format: "typing.Optional[NameFormat]")
Get the default name pointing to this address, if one exists.
iota_names_lookup
def iota_names_lookup(name: "str")
Return the resolved address for the given name.
iota_names_registrations
def iota_names_registrations(address: "Address",
pagination_filter: "PaginationFilter")
Find all registration NFTs for the given address.
is_tx_finalized
def is_tx_finalized(digest: "Digest")
Returns whether the transaction for the given digest has been included in a checkpoint (finalized).
is_tx_indexed_on_node
def is_tx_indexed_on_node(digest: "Digest")
Returns whether the transaction for the given digest has been indexed
on the node. This means that it can be queried by its digest and its
effects will be usable for subsequent transactions. To check for
full finalization, use is_tx_finalized.
latest_checkpoint_sequence_number
def latest_checkpoint_sequence_number()
Return the sequence number of the latest checkpoint that has been executed.
max_page_size
def max_page_size()
Lazily fetch the max page size
move_object_contents
def move_object_contents(
object_id: "ObjectId",
version: "typing.Union[object, typing.Optional[int]]" = _DEFAULT)
Return the contents' JSON of an object that is a Move object.
If the object does not exist (e.g., due to pruning), this will return
Ok(None). Similarly, if this is not an object but an address, it
will return Ok(None).
move_object_contents_bcs
def move_object_contents_bcs(
object_id: "ObjectId",
version: "typing.Union[object, typing.Optional[int]]" = _DEFAULT)
Return the BCS of an object that is a Move object.
If the object does not exist (e.g., due to pruning), this will return
Ok(None). Similarly, if this is not an object but an address, it
will return Ok(None).
move_view_call
def move_view_call(
function_name: "str",
type_arguments:
"typing.Union[object, typing.Optional[typing.List[TypeTag]]]" = _DEFAULT,
arguments:
"typing.Union[object, typing.Optional[typing.List[MoveViewArg]]]" = _DEFAULT
)
Execute a Move View Function.
A View Function is a function in a Move module with a return type that does not alter the state of the ledger. When using this interface, no transactions are submitted to the network for inclusion into the ledger.
This method allows calling nearly any Move function with a return type and any arguments. The function's result values are provided and decoded using the appropriate Move type, then formatted in JSON.
The use of this interface does not require signature checks (even for functions that take Owned Objects as input) or gas coins, as it does not alter ledger state. Spam attacks are dealt with at the RPC level rather than execution level.
Arguments
function_name- The Move function fully qualified name as
- __
<package_id>__::<module_name>::<function_name>, e.g., - __
0x2__::hash::blake2b256
type_arguments- The type arguments of the Move functionarguments- The typed arguments to be passed into the Move function
Returns
A MoveViewResult containing either execution results (return values)
or an error.
move_view_call_json
def move_view_call_json(
function_name: "str",
type_arguments:
"typing.Union[object, typing.Optional[typing.List[str]]]" = _DEFAULT,
arguments:
"typing.Union[object, typing.Optional[typing.List[Value]]]" = _DEFAULT)
Execute a Move View Function with raw JSON arguments.
This is an alternative to [GraphQLClient::move_view_call] that accepts
raw JSON values instead of typed arguments.
A View Function is a function in a Move module with a return type that does not alter the state of the ledger. When using this interface, no transactions are submitted to the network for inclusion into the ledger.
Arguments
function_name- The Move function fully qualified name as
- __
<package_id>__::<module_name>::<function_name>, e.g., - __
0x2__::hash::blake2b256
type_arguments- The type arguments of the Move functionarguments- The arguments to be passed into the Move function, in JSON format
Returns
A MoveViewResult containing either execution results (return values)
or an error.
normalized_move_function
def normalized_move_function(
package: "Address",
module: "str",
function: "str",
version: "typing.Union[object, typing.Optional[int]]" = _DEFAULT)
Return the normalized Move function data for the provided package, module, and function.
normalized_move_module
def normalized_move_module(
package: "Address",
module: "str",
version: "typing.Union[object, typing.Optional[int]]" = _DEFAULT,
pagination_filter_enums:
"typing.Union[object, typing.Optional[PaginationFilter]]" = _DEFAULT,
pagination_filter_friends:
"typing.Union[object, typing.Optional[PaginationFilter]]" = _DEFAULT,
pagination_filter_functions:
"typing.Union[object, typing.Optional[PaginationFilter]]" = _DEFAULT,
pagination_filter_structs:
"typing.Union[object, typing.Optional[PaginationFilter]]" = _DEFAULT)
Return the normalized Move module data for the provided module.
object
def object(object_id: "ObjectId",
version: "typing.Union[object, typing.Optional[int]]" = _DEFAULT)
Return an object based on the provided Address.
If the object does not exist (e.g., due to pruning), this will return
Ok(None). Similarly, if this is not an object but an address, it
will return Ok(None).
object_bcs
def object_bcs(object_id: "ObjectId")
Return the object's bcs content Vec<u8> based on the provided
Address.
objects
def objects(
filter: "typing.Union[object, typing.Optional[ObjectFilter]]" = _DEFAULT,
pagination_filter:
"typing.Union[object, typing.Optional[PaginationFilter]]" = _DEFAULT)
Return a page of objects based on the provided parameters.
Use this function together with the ObjectFilter::owner to get the
objects owned by an address.
package
def package(address: "Address",
version: "typing.Union[object, typing.Optional[int]]" = _DEFAULT)
The package corresponding to the given address (at the optionally given version). When no version is given, the package is loaded directly from the address given. Otherwise, the address is translated before loading to point to the package whose original ID matches the package at address, but whose version is version. For non-system packages, this might result in a different address than address because different versions of a package, introduced by upgrades, exist at distinct addresses.
Note that this interpretation of version is different from a historical object read (the interpretation of version for the object query).
package_latest
def package_latest(address: "Address")
Fetch the latest version of the package at address. This corresponds to the package with the highest version that shares its original ID with the package at address.
package_versions
def package_versions(
address: "Address",
after_version: "typing.Union[object, typing.Optional[int]]" = _DEFAULT,
before_version: "typing.Union[object, typing.Optional[int]]" = _DEFAULT,
pagination_filter:
"typing.Union[object, typing.Optional[PaginationFilter]]" = _DEFAULT)
Fetch all versions of package at address (packages that share this package's original ID), optionally bounding the versions exclusively from below with afterVersion, or from above with beforeVersion.
packages
def packages(
after_checkpoint: "typing.Union[object, typing.Optional[int]]" = _DEFAULT,
before_checkpoint: "typing.Union[object, typing.Optional[int]]" = _DEFAULT,
pagination_filter:
"typing.Union[object, typing.Optional[PaginationFilter]]" = _DEFAULT)
The Move packages that exist in the network, optionally filtered to be strictly before beforeCheckpoint and/or strictly after afterCheckpoint.
This query returns all versions of a given user package that appear between the specified checkpoints, but only records the latest versions of system packages.
protocol_config
def protocol_config(
version: "typing.Union[object, typing.Optional[int]]" = _DEFAULT)
Get the protocol configuration.
reference_gas_price
def reference_gas_price(
epoch: "typing.Union[object, typing.Optional[int]]" = _DEFAULT)
Get the reference gas price for the provided epoch or the last known one if no epoch is provided.
This will return Ok(None) if the epoch requested is not available in
the GraphQL service (e.g., due to pruning).
run_query
def run_query(query: "Query")
Run a query.
service_config
def service_config()
Get the GraphQL service configuration, including complexity limits, read and mutation limits, supported versions, and others.
set_rpc_server
def set_rpc_server(server: "str")
Set the server address for the GraphQL client. It should be a valid URL with a host and optionally a port number.
total_supply
def total_supply(coin_type: "str")
Get total supply for the coin type.
total_transaction_blocks
def total_transaction_blocks()
The total number of transaction blocks in the network by the end of the last known checkpoint.
total_transaction_blocks_by_digest
def total_transaction_blocks_by_digest(digest: "Digest")
The total number of transaction blocks in the network by the end of the provided checkpoint digest.
total_transaction_blocks_by_seq_num
def total_transaction_blocks_by_seq_num(seq_num: "int")
The total number of transaction blocks in the network by the end of the provided checkpoint sequence number.
transaction
def transaction(digest: "Digest")
Get a transaction by its digest.
transaction_data_effects
def transaction_data_effects(digest: "Digest")
Get a transaction's data and effects by its digest.
transaction_effects
def transaction_effects(digest: "Digest")
Get a transaction's effects by its digest.
transactions
def transactions(
filter:
"typing.Union[object, typing.Optional[TransactionsFilter]]" = _DEFAULT,
pagination_filter:
"typing.Union[object, typing.Optional[PaginationFilter]]" = _DEFAULT)
Get a page of transactions based on the provided filters.
transactions_data_effects
def transactions_data_effects(
filter:
"typing.Union[object, typing.Optional[TransactionsFilter]]" = _DEFAULT,
pagination_filter:
"typing.Union[object, typing.Optional[PaginationFilter]]" = _DEFAULT)
Get a page of transactions' data and effects based on the provided filters.
transactions_effects
def transactions_effects(
filter:
"typing.Union[object, typing.Optional[TransactionsFilter]]" = _DEFAULT,
pagination_filter:
"typing.Union[object, typing.Optional[PaginationFilter]]" = _DEFAULT)
Get a page of transactions' effects based on the provided filters.
wait_for_tx
def wait_for_tx(
digest: "Digest",
wait_for: "WaitForTx",
timeout: "typing.Union[object, typing.Optional[Duration]]" = _DEFAULT)
Wait for the indexing (on the node, not the indexer) or finalization of a transaction by its digest. An optional timeout can be provided, which, if exceeded, will return an error (default 60s).
GraphQlClient Objects
class GraphQlClient()
The GraphQL client for interacting with the IOTA blockchain.
__init__
def __init__(server: "str")
Create a new GraphQL client with the provided server address.
new_devnet
@classmethod
def new_devnet(cls)
Create a new GraphQL client connected to the devnet GraphQL server:
{DEVNET_HOST}.
new_localnet
@classmethod
def new_localnet(cls)
Create a new GraphQL client connected to the localhost GraphQL server:
{DEFAULT_LOCAL_HOST}.
new_mainnet
@classmethod
def new_mainnet(cls)
Create a new GraphQL client connected to the mainnet GraphQL server:
{MAINNET_HOST}.
new_testnet
@classmethod
def new_testnet(cls)
Create a new GraphQL client connected to the testnet GraphQL server:
{TESTNET_HOST}.
active_validators
async def active_validators(
epoch: "typing.Union[object, typing.Optional[int]]" = _DEFAULT,
pagination_filter:
"typing.Union[object, typing.Optional[PaginationFilter]]" = _DEFAULT
) -> "ValidatorPage"
Get the list of active validators for the provided epoch, including related metadata. If no epoch is provided, it will return the active validators for the current epoch.
balance
async def balance(
address: "Address",
coin_type: "typing.Union[object, typing.Optional[str]]" = _DEFAULT
) -> "typing.Optional[int]"
Get the balance of all the coins owned by address for the provided coin
type. Coin type will default to 0x2::coin::Coin<0x2::iota::IOTA>
if not provided.
chain_id
async def chain_id() -> "str"
Get the chain identifier.
checkpoint
async def checkpoint(
digest: "typing.Union[object, typing.Optional[Digest]]" = _DEFAULT,
seq_num: "typing.Union[object, typing.Optional[int]]" = _DEFAULT
) -> "typing.Optional[CheckpointSummary]"
Get the CheckpointSummary for a given checkpoint digest or
checkpoint id. If none is provided, it will use the last known
checkpoint id.
checkpoints
async def checkpoints(
pagination_filter:
"typing.Union[object, typing.Optional[PaginationFilter]]" = _DEFAULT
) -> "CheckpointSummaryPage"
Get a page of CheckpointSummary for the provided parameters.
coin_metadata
async def coin_metadata(coin_type: "str") -> "typing.Optional[CoinMetadata]"
Get the coin metadata for the coin type.
coins
async def coins(
owner: "Address",
pagination_filter:
"typing.Union[object, typing.Optional[PaginationFilter]]" = _DEFAULT,
coin_type: "typing.Union[object, typing.Optional[StructTag]]" = _DEFAULT
) -> "CoinPage"
Get the list of coins for the specified address.
If coin_type is not provided, all coins will be returned. For IOTA
coins, pass in the coin type: 0x2::iota::IOTA.
dry_run_tx
async def dry_run_tx(
tx: "Transaction",
skip_checks: "typing.Union[object, bool]" = _DEFAULT
) -> "DryRunResult"
Dry run a Transaction and return the transaction effects and dry run
error (if any).
skipChecks optional flag disables the usual verification checks that
prevent access to objects that are owned by addresses other than the
sender, and calling non-public, non-entry functions, and some other
checks. Defaults to false.
dry_run_tx_kind
async def dry_run_tx_kind(
tx_kind: "TransactionKind",
tx_meta: "TransactionMetadata",
skip_checks: "typing.Union[object, bool]" = _DEFAULT
) -> "DryRunResult"
Dry run a TransactionKind and return the transaction effects and dry
run error (if any).
skipChecks optional flag disables the usual verification checks that
prevent access to objects that are owned by addresses other than the
sender, and calling non-public, non-entry functions, and some other
checks. Defaults to false.
tx_meta is the transaction metadata.
dynamic_field
async def dynamic_field(
address: "Address", type_tag: "TypeTag",
name: "Value") -> "typing.Optional[DynamicFieldOutput]"
Access a dynamic field on an object using its name. Names are arbitrary Move values whose type have copy, drop, and store, and are specified using their type, and their BCS contents, Base64 encoded.
The name argument is a json serialized type.
This returns DynamicFieldOutput which contains the name, the value
as json, and object.
dynamic_fields
async def dynamic_fields(
address: "Address",
pagination_filter:
"typing.Union[object, typing.Optional[PaginationFilter]]" = _DEFAULT
) -> "DynamicFieldOutputPage"
Get a page of dynamic fields for the provided address. Note that this will also fetch dynamic fields on wrapped objects.
This returns a page of DynamicFieldOutputs.
dynamic_object_field
async def dynamic_object_field(
address: "Address", type_tag: "TypeTag",
name: "Value") -> "typing.Optional[DynamicFieldOutput]"
Access a dynamic object field on an object using its name. Names are arbitrary Move values whose type have copy, drop, and store, and are specified using their type, and their BCS contents, Base64 encoded.
The name argument is a json serialized type.
This returns DynamicFieldOutput which contains the name, the value
as json, and object.
epoch
async def epoch(
epoch: "typing.Union[object, typing.Optional[int]]" = _DEFAULT
) -> "typing.Optional[Epoch]"
Return the epoch information for the provided epoch. If no epoch is provided, it will return the last known epoch.
epoch_total_checkpoints
async def epoch_total_checkpoints(
epoch: "typing.Union[object, typing.Optional[int]]" = _DEFAULT
) -> "typing.Optional[int]"
Return the number of checkpoints in this epoch. This will return
Ok(None) if the epoch requested is not available in the GraphQL
service (e.g., due to pruning).
epoch_total_transaction_blocks
async def epoch_total_transaction_blocks(
epoch: "typing.Union[object, typing.Optional[int]]" = _DEFAULT
) -> "typing.Optional[int]"
Return the number of transaction blocks in this epoch. This will return
Ok(None) if the epoch requested is not available in the GraphQL
service (e.g., due to pruning).
events
async def events(
filter: "typing.Union[object, typing.Optional[EventFilter]]" = _DEFAULT,
pagination_filter:
"typing.Union[object, typing.Optional[PaginationFilter]]" = _DEFAULT
) -> "EventPage"
Return a page of tuple (event, transaction digest) based on the (optional) event filter.
execute_tx
async def execute_tx(
signatures: "typing.List[UserSignature]",
tx: "Transaction",
wait_for: "typing.Union[object, typing.Optional[WaitForTx]]" = _DEFAULT
) -> "TransactionEffects"
Execute a transaction.
gas_coins
async def gas_coins(
owner: "Address",
pagination_filter:
"typing.Union[object, typing.Optional[PaginationFilter]]" = _DEFAULT
) -> "CoinPage"
Get the list of gas coins for the specified address.
iota_names_default_name
async def iota_names_default_name(
address: "Address",
format: "typing.Optional[NameFormat]") -> "typing.Optional[Name]"
Get the default name pointing to this address, if one exists.
iota_names_lookup
async def iota_names_lookup(name: "str") -> "typing.Optional[Address]"
Return the resolved address for the given name.
iota_names_registrations
async def iota_names_registrations(
address: "Address",
pagination_filter: "PaginationFilter") -> "NameRegistrationPage"
Find all registration NFTs for the given address.
is_tx_finalized
async def is_tx_finalized(digest: "Digest") -> "bool"
Returns whether the transaction for the given digest has been included in a checkpoint (finalized).
is_tx_indexed_on_node
async def is_tx_indexed_on_node(digest: "Digest") -> "bool"
Returns whether the transaction for the given digest has been indexed
on the node. This means that it can be queried by its digest and its
effects will be usable for subsequent transactions. To check for
full finalization, use is_tx_finalized.
latest_checkpoint_sequence_number
async def latest_checkpoint_sequence_number() -> "typing.Optional[int]"
Return the sequence number of the latest checkpoint that has been executed.
max_page_size
async def max_page_size() -> "int"
Lazily fetch the max page size
move_object_contents
async def move_object_contents(
object_id: "ObjectId",
version: "typing.Union[object, typing.Optional[int]]" = _DEFAULT
) -> "typing.Optional[Value]"
Return the contents' JSON of an object that is a Move object.
If the object does not exist (e.g., due to pruning), this will return
Ok(None). Similarly, if this is not an object but an address, it
will return Ok(None).
move_object_contents_bcs
async def move_object_contents_bcs(
object_id: "ObjectId",
version: "typing.Union[object, typing.Optional[int]]" = _DEFAULT
) -> "typing.Optional[bytes]"
Return the BCS of an object that is a Move object.
If the object does not exist (e.g., due to pruning), this will return
Ok(None). Similarly, if this is not an object but an address, it
will return Ok(None).
move_view_call
async def move_view_call(
function_name: "str",
type_arguments:
"typing.Union[object, typing.Optional[typing.List[TypeTag]]]" = _DEFAULT,
arguments:
"typing.Union[object, typing.Optional[typing.List[MoveViewArg]]]" = _DEFAULT
) -> "MoveViewResult"
Execute a Move View Function.
A View Function is a function in a Move module with a return type that does not alter the state of the ledger. When using this interface, no transactions are submitted to the network for inclusion into the ledger.
This method allows calling nearly any Move function with a return type and any arguments. The function's result values are provided and decoded using the appropriate Move type, then formatted in JSON.
The use of this interface does not require signature checks (even for functions that take Owned Objects as input) or gas coins, as it does not alter ledger state. Spam attacks are dealt with at the RPC level rather than execution level.
Arguments
function_name- The Move function fully qualified name as
- __
<package_id>__::<module_name>::<function_name>, e.g., - __
0x2__::hash::blake2b256
type_arguments- The type arguments of the Move functionarguments- The typed arguments to be passed into the Move function
Returns
A MoveViewResult containing either execution results (return values)
or an error.
move_view_call_json
async def move_view_call_json(
function_name: "str",
type_arguments:
"typing.Union[object, typing.Optional[typing.List[str]]]" = _DEFAULT,
arguments:
"typing.Union[object, typing.Optional[typing.List[Value]]]" = _DEFAULT
) -> "MoveViewResult"
Execute a Move View Function with raw JSON arguments.
This is an alternative to [GraphQLClient::move_view_call] that accepts
raw JSON values instead of typed arguments.
A View Function is a function in a Move module with a return type that does not alter the state of the ledger. When using this interface, no transactions are submitted to the network for inclusion into the ledger.
Arguments
function_name- The Move function fully qualified name as
- __
<package_id>__::<module_name>::<function_name>, e.g., - __
0x2__::hash::blake2b256
type_arguments- The type arguments of the Move functionarguments- The arguments to be passed into the Move function, in JSON format
Returns
A MoveViewResult containing either execution results (return values)
or an error.
normalized_move_function
async def normalized_move_function(
package: "Address",
module: "str",
function: "str",
version: "typing.Union[object, typing.Optional[int]]" = _DEFAULT
) -> "typing.Optional[MoveFunction]"
Return the normalized Move function data for the provided package, module, and function.
normalized_move_module
async def normalized_move_module(
package: "Address",
module: "str",
version: "typing.Union[object, typing.Optional[int]]" = _DEFAULT,
pagination_filter_enums:
"typing.Union[object, typing.Optional[PaginationFilter]]" = _DEFAULT,
pagination_filter_friends:
"typing.Union[object, typing.Optional[PaginationFilter]]" = _DEFAULT,
pagination_filter_functions:
"typing.Union[object, typing.Optional[PaginationFilter]]" = _DEFAULT,
pagination_filter_structs:
"typing.Union[object, typing.Optional[PaginationFilter]]" = _DEFAULT
) -> "typing.Optional[MoveModule]"
Return the normalized Move module data for the provided module.
object
async def object(
object_id: "ObjectId",
version: "typing.Union[object, typing.Optional[int]]" = _DEFAULT
) -> "typing.Optional[Object]"
Return an object based on the provided Address.
If the object does not exist (e.g., due to pruning), this will return
Ok(None). Similarly, if this is not an object but an address, it
will return Ok(None).
object_bcs
async def object_bcs(object_id: "ObjectId") -> "typing.Optional[bytes]"
Return the object's bcs content Vec<u8> based on the provided
Address.
objects
async def objects(
filter: "typing.Union[object, typing.Optional[ObjectFilter]]" = _DEFAULT,
pagination_filter:
"typing.Union[object, typing.Optional[PaginationFilter]]" = _DEFAULT
) -> "ObjectPage"
Return a page of objects based on the provided parameters.
Use this function together with the ObjectFilter::owner to get the
objects owned by an address.
package
async def package(
address: "Address",
version: "typing.Union[object, typing.Optional[int]]" = _DEFAULT
) -> "typing.Optional[MovePackage]"
The package corresponding to the given address (at the optionally given version). When no version is given, the package is loaded directly from the address given. Otherwise, the address is translated before loading to point to the package whose original ID matches the package at address, but whose version is version. For non-system packages, this might result in a different address than address because different versions of a package, introduced by upgrades, exist at distinct addresses.
Note that this interpretation of version is different from a historical object read (the interpretation of version for the object query).
package_latest
async def package_latest(address: "Address") -> "typing.Optional[MovePackage]"
Fetch the latest version of the package at address. This corresponds to the package with the highest version that shares its original ID with the package at address.
package_versions
async def package_versions(
address: "Address",
after_version: "typing.Union[object, typing.Optional[int]]" = _DEFAULT,
before_version: "typing.Union[object, typing.Optional[int]]" = _DEFAULT,
pagination_filter:
"typing.Union[object, typing.Optional[PaginationFilter]]" = _DEFAULT
) -> "MovePackagePage"
Fetch all versions of package at address (packages that share this package's original ID), optionally bounding the versions exclusively from below with afterVersion, or from above with beforeVersion.
packages
async def packages(
after_checkpoint: "typing.Union[object, typing.Optional[int]]" = _DEFAULT,
before_checkpoint: "typing.Union[object, typing.Optional[int]]" = _DEFAULT,
pagination_filter:
"typing.Union[object, typing.Optional[PaginationFilter]]" = _DEFAULT
) -> "MovePackagePage"
The Move packages that exist in the network, optionally filtered to be strictly before beforeCheckpoint and/or strictly after afterCheckpoint.
This query returns all versions of a given user package that appear between the specified checkpoints, but only records the latest versions of system packages.
protocol_config
async def protocol_config(
version: "typing.Union[object, typing.Optional[int]]" = _DEFAULT
) -> "ProtocolConfigs"
Get the protocol configuration.
reference_gas_price
async def reference_gas_price(
epoch: "typing.Union[object, typing.Optional[int]]" = _DEFAULT
) -> "typing.Optional[int]"
Get the reference gas price for the provided epoch or the last known one if no epoch is provided.
This will return Ok(None) if the epoch requested is not available in
the GraphQL service (e.g., due to pruning).
run_query
async def run_query(query: "Query") -> "Value"
Run a query.
service_config
async def service_config() -> "ServiceConfig"
Get the GraphQL service configuration, including complexity limits, read and mutation limits, supported versions, and others.
set_rpc_server
async def set_rpc_server(server: "str") -> None
Set the server address for the GraphQL client. It should be a valid URL with a host and optionally a port number.
total_supply
async def total_supply(coin_type: "str") -> "typing.Optional[int]"
Get total supply for the coin type.
total_transaction_blocks
async def total_transaction_blocks() -> "typing.Optional[int]"
The total number of transaction blocks in the network by the end of the last known checkpoint.
total_transaction_blocks_by_digest
async def total_transaction_blocks_by_digest(
digest: "Digest") -> "typing.Optional[int]"
The total number of transaction blocks in the network by the end of the provided checkpoint digest.
total_transaction_blocks_by_seq_num
async def total_transaction_blocks_by_seq_num(
seq_num: "int") -> "typing.Optional[int]"
The total number of transaction blocks in the network by the end of the provided checkpoint sequence number.
transaction
async def transaction(
digest: "Digest") -> "typing.Optional[SignedTransaction]"
Get a transaction by its digest.
transaction_data_effects
async def transaction_data_effects(
digest: "Digest") -> "typing.Optional[TransactionDataEffects]"
Get a transaction's data and effects by its digest.
transaction_effects
async def transaction_effects(
digest: "Digest") -> "typing.Optional[TransactionEffects]"
Get a transaction's effects by its digest.
transactions
async def transactions(
filter:
"typing.Union[object, typing.Optional[TransactionsFilter]]" = _DEFAULT,
pagination_filter:
"typing.Union[object, typing.Optional[PaginationFilter]]" = _DEFAULT
) -> "SignedTransactionPage"
Get a page of transactions based on the provided filters.
transactions_data_effects
async def transactions_data_effects(
filter:
"typing.Union[object, typing.Optional[TransactionsFilter]]" = _DEFAULT,
pagination_filter:
"typing.Union[object, typing.Optional[PaginationFilter]]" = _DEFAULT
) -> "TransactionDataEffectsPage"
Get a page of transactions' data and effects based on the provided filters.
transactions_effects
async def transactions_effects(
filter:
"typing.Union[object, typing.Optional[TransactionsFilter]]" = _DEFAULT,
pagination_filter:
"typing.Union[object, typing.Optional[PaginationFilter]]" = _DEFAULT
) -> "TransactionEffectsPage"
Get a page of transactions' effects based on the provided filters.
wait_for_tx
async def wait_for_tx(
digest: "Digest",
wait_for: "WaitForTx",
timeout: "typing.Union[object, typing.Optional[Duration]]" = _DEFAULT
) -> None
Wait for the indexing (on the node, not the indexer) or finalization of a transaction by its digest. An optional timeout can be provided, which, if exceeded, will return an error (default 60s).
IdentifierProtocol Objects
class IdentifierProtocol(typing.Protocol)
A move identifier
BCS
The BCS serialized form for this type is defined by the following ABNF:
identifier = %x01-80 ; length of the identifier
(ALPHA *127(ALPHA / DIGIT / UNDERSCORE)) /
(UNDERSCORE 1*127(ALPHA / DIGIT / UNDERSCORE))
UNDERSCORE = %x95
Identifier Objects
class Identifier()
A move identifier
BCS
The BCS serialized form for this type is defined by the following ABNF:
identifier = %x01-80 ; length of the identifier
(ALPHA *127(ALPHA / DIGIT / UNDERSCORE)) /
(UNDERSCORE 1*127(ALPHA / DIGIT / UNDERSCORE))
UNDERSCORE = %x95
InputProtocol Objects
class InputProtocol(typing.Protocol)
An input to a user transaction
BCS
The BCS serialized form for this type is defined by the following ABNF:
input = input-pure / input-immutable-or-owned / input-shared / input-receiving
input-pure = %x00 bytes
input-immutable-or-owned = %x01 object-ref
input-shared = %x02 object-id u64 bool
input-receiving = %x04 object-ref
Input Objects
class Input()
An input to a user transaction
BCS
The BCS serialized form for this type is defined by the following ABNF:
input = input-pure / input-immutable-or-owned / input-shared / input-receiving
input-pure = %x00 bytes
input-immutable-or-owned = %x01 object-ref
input-shared = %x02 object-id u64 bool
input-receiving = %x04 object-ref
new_immutable_or_owned
@classmethod
def new_immutable_or_owned(cls, object_ref: "ObjectReference")
A move object that is either immutable or address owned
new_pure
@classmethod
def new_pure(cls, value: "bytes")
For normal operations this is required to be a move primitive type and not contain structs or objects.
new_shared
@classmethod
def new_shared(cls, object_id: "ObjectId", initial_shared_version: "int",
mutable: "bool")
A move object whose owner is "Shared"
IntentProtocol Objects
class IntentProtocol(typing.Protocol)
A Signing Intent
An intent is a compact struct that serves as the domain separator for a message that a signature commits to. It consists of three parts:
- IntentScope (what the type of the message is)
- IntentVersion
- IntentAppId (what application the signature refers to).
The serialization of an Intent is a 3-byte array where each field is represented by a byte and it is prepended onto a message before it is signed in IOTA.
BCS
The BCS serialized form for this type is defined by the following ABNF:
intent = intent-scope intent-version intent-app-id
app_id
def app_id()
Get the app id of the signing intent.
scope
def scope()
Get the scope of the signing intent.
to_bytes
def to_bytes()
Convert the signing intent to bytes.
version
def version()
Get the version of the signing intent.
Intent Objects
class Intent()
A Signing Intent
An intent is a compact struct that serves as the domain separator for a message that a signature commits to. It consists of three parts:
- IntentScope (what the type of the message is)
- IntentVersion
- IntentAppId (what application the signature refers to).
The serialization of an Intent is a 3-byte array where each field is represented by a byte and it is prepended onto a message before it is signed in IOTA.
BCS
The BCS serialized form for this type is defined by the following ABNF:
intent = intent-scope intent-version intent-app-id
__init__
def __init__(scope: "IntentScope", version: "IntentVersion",
app_id: "IntentAppId")
Create a new signing intent.
from_bytes
@classmethod
def from_bytes(cls, bytes: "bytes")
Create a signing intent from bytes.
from_hex
@classmethod
def from_hex(cls, hex: "str")
Create a signing intent from a hex string.
new_consensus_app
@classmethod
def new_consensus_app(cls, scope: "IntentScope")
Create a new Consensus app signing intent.
new_iota_app
@classmethod
def new_iota_app(cls, scope: "IntentScope")
Create a new IOTA app signing intent.
new_iota_transaction
@classmethod
def new_iota_transaction(cls)
Create a new IOTA transaction signing intent.
new_personal_message
@classmethod
def new_personal_message(cls)
Create a new IOTA personal message signing intent.
app_id
def app_id() -> "IntentAppId"
Get the app id of the signing intent.
scope
def scope() -> "IntentScope"
Get the scope of the signing intent.
to_bytes
def to_bytes() -> "bytes"
Convert the signing intent to bytes.
version
def version() -> "IntentVersion"
Get the version of the signing intent.
MakeMoveVectorProtocol Objects
class MakeMoveVectorProtocol(typing.Protocol)
Command to build a move vector out of a set of individual elements
BCS
The BCS serialized form for this type is defined by the following ABNF:
make-move-vector = (option type-tag) (vector argument)
elements
def elements()
The set individual elements to build the vector with
type_tag
def type_tag()
Type of the individual elements
This is required to be set when the type can't be inferred, for example when the set of provided arguments are all pure input values.
MakeMoveVector Objects
class MakeMoveVector()
Command to build a move vector out of a set of individual elements
BCS
The BCS serialized form for this type is defined by the following ABNF:
make-move-vector = (option type-tag) (vector argument)
elements
def elements() -> "typing.List[Argument]"
The set individual elements to build the vector with
type_tag
def type_tag() -> "typing.Optional[TypeTag]"
Type of the individual elements
This is required to be set when the type can't be inferred, for example when the set of provided arguments are all pure input values.
MergeCoinsProtocol Objects
class MergeCoinsProtocol(typing.Protocol)
Command to merge multiple coins of the same type into a single coin
BCS
The BCS serialized form for this type is defined by the following ABNF:
merge-coins = argument (vector argument)
coin
def coin()
Coin to merge coins into
coins_to_merge
def coins_to_merge()
Set of coins to merge into coin
All listed coins must be of the same type and be the same type as coin
MergeCoins Objects
class MergeCoins()
Command to merge multiple coins of the same type into a single coin
BCS
The BCS serialized form for this type is defined by the following ABNF:
merge-coins = argument (vector argument)
coin
def coin() -> "Argument"
Coin to merge coins into
coins_to_merge
def coins_to_merge() -> "typing.List[Argument]"
Set of coins to merge into coin
All listed coins must be of the same type and be the same type as coin
MoveAuthenticatorProtocol Objects
class MoveAuthenticatorProtocol(typing.Protocol)
MoveAuthenticator is a signature variant that enables a method of authentication through Move code. This type represents the data received by the Move authenticate function during the Account Abstraction authentication flow.
MoveAuthenticator Objects
class MoveAuthenticator()
MoveAuthenticator is a signature variant that enables a method of authentication through Move code. This type represents the data received by the Move authenticate function during the Account Abstraction authentication flow.
new_immutable
@classmethod
def new_immutable(cls, call_args: "typing.List[Input]",
type_args: "typing.List[TypeTag]",
object_to_authenticate: "ObjectReference")
Create a new move authenticator from an immutable object.
new_shared
@classmethod
def new_shared(cls, call_args: "typing.List[Input]",
type_args: "typing.List[TypeTag]",
object_to_authenticate: "ObjectId",
initial_shared_version: "int")
Create a new move authenticator from a shared object.
MoveAuthenticatorBuilderProtocol Objects
class MoveAuthenticatorBuilderProtocol(typing.Protocol)
finish
def finish(client: "GraphQlClient")
Resolve this move authenticator builder into a MoveAuthenticator which
can be used to execute a transaction.
MoveAuthenticatorBuilder Objects
class MoveAuthenticatorBuilder()
__init__
def __init__(account_id: "ObjectId", call_args: "typing.List[PtbArgument]",
type_args: "typing.List[TypeTag]")
Create a new move authenticator call with the account ID, function inputs, and generic types.
finish
async def finish(client: "GraphQlClient") -> "MoveAuthenticator"
Resolve this move authenticator builder into a MoveAuthenticator which
can be used to execute a transaction.
MoveCallProtocol Objects
class MoveCallProtocol(typing.Protocol)
Command to call a move function
Functions that can be called by a MoveCall command are those that have a
function signature that is either entry or public (which don't have a
reference return type).
BCS
The BCS serialized form for this type is defined by the following ABNF:
move-call = object-id ; package id
identifier ; module name
identifier ; function name
(vector type-tag) ; type arguments, if any
(vector argument) ; input arguments
arguments
def arguments()
The arguments to the function.
function
def function()
The function to be called.
module
def module()
The specific module in the package containing the function.
package
def package()
The package containing the module and function.
type_arguments
def type_arguments()
The type arguments to the function.
MoveCall Objects
class MoveCall()
Command to call a move function
Functions that can be called by a MoveCall command are those that have a
function signature that is either entry or public (which don't have a
reference return type).
BCS
The BCS serialized form for this type is defined by the following ABNF:
move-call = object-id ; package id
identifier ; module name
identifier ; function name
(vector type-tag) ; type arguments, if any
(vector argument) ; input arguments
arguments
def arguments() -> "typing.List[Argument]"
The arguments to the function.
function
def function() -> "Identifier"
The function to be called.
module
def module() -> "Identifier"
The specific module in the package containing the function.
package
def package() -> "ObjectId"
The package containing the module and function.
type_arguments
def type_arguments() -> "typing.List[TypeTag]"
The type arguments to the function.
MovePackageProtocol Objects
class MovePackageProtocol(typing.Protocol)
A move package
BCS
The BCS serialized form for this type is defined by the following ABNF:
object-move-package = object-id u64 move-modules type-origin-table linkage-table
move-modules = map (identifier bytes)
type-origin-table = vector type-origin
linkage-table = map (object-id upgrade-info)
MovePackage Objects
class MovePackage()
A move package
BCS
The BCS serialized form for this type is defined by the following ABNF:
object-move-package = object-id u64 move-modules type-origin-table linkage-table
move-modules = map (identifier bytes)
type-origin-table = vector type-origin
linkage-table = map (object-id upgrade-info)
MovePackageDataProtocol Objects
class MovePackageDataProtocol(typing.Protocol)
Type corresponding to the output of iota move build --dump-bytecode-as-base64
dependencies
def dependencies()
Returns the package dependencies.
digest
def digest()
Returns the package digest.
modules
def modules()
Returns the package modules.
MovePackageData Objects
class MovePackageData()
Type corresponding to the output of iota move build --dump-bytecode-as-base64
dependencies
def dependencies() -> "typing.List[ObjectId]"
Returns the package dependencies.
digest
def digest() -> "Digest"
Returns the package digest.
modules
def modules() -> "typing.List[bytes]"
Returns the package modules.
MoveViewArgProtocol Objects
class MoveViewArgProtocol(typing.Protocol)
An argument for a Move View Function call.
This enum represents the different types of values that can be passed as arguments to a Move View Function.
MoveViewArg Objects
class MoveViewArg()
An argument for a Move View Function call.
This enum represents the different types of values that can be passed as arguments to a Move View Function.
MultisigAggregatedSignatureProtocol Objects
class MultisigAggregatedSignatureProtocol(typing.Protocol)
Aggregated signature from members of a multisig committee.
BCS
The BCS serialized form for this type is defined by the following ABNF:
multisig-aggregated-signature = (vector multisig-member-signature)
u16 ; bitmap
multisig-committee
There is also a legacy encoding for this type defined as:
legacy-multisig-aggregated-signature = (vector multisig-member-signature)
roaring-bitmap ; bitmap
legacy-multisig-committee
roaring-bitmap = bytes ; where the contents of the bytes are valid
; according to the serialized spec for
; roaring bitmaps
See <https://github.com/RoaringBitmap/RoaringFormatSpec> for the specification for the serialized format of RoaringBitmaps.
bitmap
def bitmap()
The bitmap that indicates which committee members provided their signature.
signatures
def signatures()
The list of signatures from committee members
MultisigAggregatedSignature Objects
class MultisigAggregatedSignature()
Aggregated signature from members of a multisig committee.
BCS
The BCS serialized form for this type is defined by the following ABNF:
multisig-aggregated-signature = (vector multisig-member-signature)
u16 ; bitmap
multisig-committee
There is also a legacy encoding for this type defined as:
legacy-multisig-aggregated-signature = (vector multisig-member-signature)
roaring-bitmap ; bitmap
legacy-multisig-committee
roaring-bitmap = bytes ; where the contents of the bytes are valid
; according to the serialized spec for
; roaring bitmaps
See <https://github.com/RoaringBitmap/RoaringFormatSpec> for the specification for the serialized format of RoaringBitmaps.
__init__
def __init__(committee: "MultisigCommittee",
signatures: "typing.List[MultisigMemberSignature]",
bitmap: "int")
Construct a new aggregated multisig signature.
Since the list of signatures doesn't contain sufficient information to identify which committee member provided the signature, it is up to the caller to ensure that the provided signature list is in the same order as it's corresponding member in the provided committee and that it's position in the provided bitmap is set.
bitmap
def bitmap() -> "int"
The bitmap that indicates which committee members provided their signature.
signatures
def signatures() -> "typing.List[MultisigMemberSignature]"
The list of signatures from committee members
MultisigCommitteeProtocol Objects
class MultisigCommitteeProtocol(typing.Protocol)
A multisig committee
A MultisigCommittee is a set of members who collectively control a single
Address on the IOTA blockchain. The number of required signatures to
authorize the execution of a transaction is determined by
(signature_0_weight + signature_1_weight ..) >= threshold.
BCS
The BCS serialized form for this type is defined by the following ABNF:
multisig-committee = (vector multisig-member)
u16 ; threshold
There is also a legacy encoding for this type defined as:
legacy-multisig-committee = (vector legacy-multisig-member)
u16 ; threshold
derive_address
def derive_address()
Derive an Address from this MultisigCommittee.
A MultiSig address
is defined as the 32-byte Blake2b hash of serializing the
SignatureScheme flag (0x03), the threshold (in little endian), and
the concatenation of all n flag, public keys and its weight.
hash(0x03 || threshold || flag_1 || pk_1 || weight_1 || ... || flag_n || pk_n || weight_n).
When flag_i is ZkLogin, the pk_i for the ZkLoginPublicIdentifier
refers to the same input used when deriving the address using the
ZkLoginPublicIdentifier::derive_address_padded method (using the
full 32-byte address_seed value).
is_valid
def is_valid()
Checks if the Committee is valid.
A valid committee is one that:
- Has a nonzero threshold
- Has at least one member
- Has at most ten members
- No member has weight 0
- the sum of the weights of all members must be larger than the threshold
- contains no duplicate members
members
def members()
The members of the committee
scheme
def scheme()
Return the flag for this signature scheme
threshold
def threshold()
The total signature weight required to authorize a transaction for the
address corresponding to this MultisigCommittee.
MultisigCommittee Objects
class MultisigCommittee()
A multisig committee
A MultisigCommittee is a set of members who collectively control a single
Address on the IOTA blockchain. The number of required signatures to
authorize the execution of a transaction is determined by
(signature_0_weight + signature_1_weight ..) >= threshold.
BCS
The BCS serialized form for this type is defined by the following ABNF:
multisig-committee = (vector multisig-member)
u16 ; threshold
There is also a legacy encoding for this type defined as:
legacy-multisig-committee = (vector legacy-multisig-member)
u16 ; threshold
__init__
def __init__(members: "typing.List[MultisigMember]", threshold: "int")
Construct a new committee from a list of MultisigMembers and a
threshold.
Note that the order of the members is significant towards deriving the
Address governed by this committee.
derive_address
def derive_address() -> "Address"
Derive an Address from this MultisigCommittee.
A MultiSig address
is defined as the 32-byte Blake2b hash of serializing the
SignatureScheme flag (0x03), the threshold (in little endian), and
the concatenation of all n flag, public keys and its weight.
hash(0x03 || threshold || flag_1 || pk_1 || weight_1 || ... || flag_n || pk_n || weight_n).
When flag_i is ZkLogin, the pk_i for the ZkLoginPublicIdentifier
refers to the same input used when deriving the address using the
ZkLoginPublicIdentifier::derive_address_padded method (using the
full 32-byte address_seed value).
is_valid
def is_valid() -> "bool"
Checks if the Committee is valid.
A valid committee is one that:
- Has a nonzero threshold
- Has at least one member
- Has at most ten members
- No member has weight 0
- the sum of the weights of all members must be larger than the threshold
- contains no duplicate members
members
def members() -> "typing.List[MultisigMember]"
The members of the committee
scheme
def scheme() -> "SignatureScheme"
Return the flag for this signature scheme
threshold
def threshold() -> "int"
The total signature weight required to authorize a transaction for the
address corresponding to this MultisigCommittee.
MultisigMemberProtocol Objects
class MultisigMemberProtocol(typing.Protocol)
A member in a multisig committee
BCS
The BCS serialized form for this type is defined by the following ABNF:
multisig-member = multisig-member-public-key
u8 ; weight
There is also a legacy encoding for this type defined as:
legacy-multisig-member = legacy-multisig-member-public-key
u8 ; weight
public_key
def public_key()
This member's public key.
weight
def weight()
Weight of this member's signature.
MultisigMember Objects
class MultisigMember()
A member in a multisig committee
BCS
The BCS serialized form for this type is defined by the following ABNF:
multisig-member = multisig-member-public-key
u8 ; weight
There is also a legacy encoding for this type defined as:
legacy-multisig-member = legacy-multisig-member-public-key
u8 ; weight
__init__
def __init__(public_key: "MultisigMemberPublicKey", weight: "int")
Construct a new member from a MultisigMemberPublicKey and a weight.
public_key
def public_key() -> "MultisigMemberPublicKey"
This member's public key.
weight
def weight() -> "int"
Weight of this member's signature.
MultisigMemberPublicKeyProtocol Objects
class MultisigMemberPublicKeyProtocol(typing.Protocol)
Enum of valid public keys for multisig committee members
BCS
The BCS serialized form for this type is defined by the following ABNF:
multisig-member-public-key = ed25519-multisig-member-public-key /
secp256k1-multisig-member-public-key /
secp256r1-multisig-member-public-key /
zklogin-multisig-member-public-key
ed25519-multisig-member-public-key = %x00 ed25519-public-key
secp256k1-multisig-member-public-key = %x01 secp256k1-public-key
secp256r1-multisig-member-public-key = %x02 secp256r1-public-key
zklogin-multisig-member-public-key = %x03 zklogin-public-identifier
There is also a legacy encoding for this type defined as:
legacy-multisig-member-public-key = string ; which is valid base64 encoded
; and the decoded bytes are defined
; by legacy-public-key
legacy-public-key = (ed25519-flag ed25519-public-key) /
(secp256k1-flag secp256k1-public-key) /
(secp256r1-flag secp256r1-public-key)
MultisigMemberPublicKey Objects
class MultisigMemberPublicKey()
Enum of valid public keys for multisig committee members
BCS
The BCS serialized form for this type is defined by the following ABNF:
multisig-member-public-key = ed25519-multisig-member-public-key /
secp256k1-multisig-member-public-key /
secp256r1-multisig-member-public-key /
zklogin-multisig-member-public-key
ed25519-multisig-member-public-key = %x00 ed25519-public-key
secp256k1-multisig-member-public-key = %x01 secp256k1-public-key
secp256r1-multisig-member-public-key = %x02 secp256r1-public-key
zklogin-multisig-member-public-key = %x03 zklogin-public-identifier
There is also a legacy encoding for this type defined as:
legacy-multisig-member-public-key = string ; which is valid base64 encoded
; and the decoded bytes are defined
; by legacy-public-key
legacy-public-key = (ed25519-flag ed25519-public-key) /
(secp256k1-flag secp256k1-public-key) /
(secp256r1-flag secp256r1-public-key)
MultisigMemberSignatureProtocol Objects
class MultisigMemberSignatureProtocol(typing.Protocol)
A signature from a member of a multisig committee.
BCS
The BCS serialized form for this type is defined by the following ABNF:
multisig-member-signature = ed25519-multisig-member-signature /
secp256k1-multisig-member-signature /
secp256r1-multisig-member-signature /
zklogin-multisig-member-signature
ed25519-multisig-member-signature = %x00 ed25519-signature
secp256k1-multisig-member-signature = %x01 secp256k1-signature
secp256r1-multisig-member-signature = %x02 secp256r1-signature
zklogin-multisig-member-signature = %x03 zklogin-authenticator
MultisigMemberSignature Objects
class MultisigMemberSignature()
A signature from a member of a multisig committee.
BCS
The BCS serialized form for this type is defined by the following ABNF:
multisig-member-signature = ed25519-multisig-member-signature /
secp256k1-multisig-member-signature /
secp256r1-multisig-member-signature /
zklogin-multisig-member-signature
ed25519-multisig-member-signature = %x00 ed25519-signature
secp256k1-multisig-member-signature = %x01 secp256k1-signature
secp256r1-multisig-member-signature = %x02 secp256r1-signature
zklogin-multisig-member-signature = %x03 zklogin-authenticator
NameProtocol Objects
class NameProtocol(typing.Protocol)
format
def format(format: "NameFormat")
Formats a name into a string based on the available output formats.
The default separator is .
is_sln
def is_sln()
Returns whether this name is a second-level name (Ex. test.iota)
is_subname
def is_subname()
Returns whether this name is a subname (Ex. sub.test.iota)
label
def label(index: "int")
Get the label at the given index
labels
def labels()
Get all of the labels. NOTE: These are in reverse order starting with the top-level name and proceeding to subnames.
num_labels
def num_labels()
Returns the number of labels including TLN.
parent
def parent()
parents; second-level names return None.
Name Objects
class Name()
format
def format(format: "NameFormat") -> "str"
Formats a name into a string based on the available output formats.
The default separator is .
is_sln
def is_sln() -> "bool"
Returns whether this name is a second-level name (Ex. test.iota)
is_subname
def is_subname() -> "bool"
Returns whether this name is a subname (Ex. sub.test.iota)
label
def label(index: "int") -> "typing.Optional[str]"
Get the label at the given index
labels
def labels() -> "typing.List[str]"
Get all of the labels. NOTE: These are in reverse order starting with the top-level name and proceeding to subnames.
num_labels
def num_labels() -> "int"
Returns the number of labels including TLN.
parent
def parent() -> "typing.Optional[Name]"
parents; second-level names return None.
NameRegistrationProtocol Objects
class NameRegistrationProtocol(typing.Protocol)
An object to manage a second-level name (SLN).
NameRegistration Objects
class NameRegistration()
An object to manage a second-level name (SLN).
ObjectProtocol Objects
class ObjectProtocol(typing.Protocol)
An object on the IOTA blockchain
BCS
The BCS serialized form for this type is defined by the following ABNF:
object = object-data owner digest u64
as_package
def as_package()
Interpret this object as a move package
as_package_opt
def as_package_opt()
Try to interpret this object as a move package
as_struct
def as_struct()
Interpret this object as a move struct
as_struct_opt
def as_struct_opt()
Try to interpret this object as a move struct
data
def data()
Return this object's data
digest
def digest()
Calculate the digest of this Object
This is done by hashing the BCS bytes of this Object prefixed
object_id
def object_id()
Return this object's id
object_ref
def object_ref()
Return this object's reference
object_type
def object_type()
Return this object's type
owner
def owner()
Return this object's owner
previous_transaction
def previous_transaction()
Return the digest of the transaction that last modified this object
storage_rebate
def storage_rebate()
Return the storage rebate locked in this object
Storage rebates are credited to the gas coin used in a transaction that deletes this object.
version
def version()
Return this object's version
Object Objects
class Object()
An object on the IOTA blockchain
BCS
The BCS serialized form for this type is defined by the following ABNF:
object = object-data owner digest u64
as_package
def as_package() -> "MovePackage"
Interpret this object as a move package
as_package_opt
def as_package_opt() -> "typing.Optional[MovePackage]"
Try to interpret this object as a move package
as_struct
def as_struct() -> "MoveStruct"
Interpret this object as a move struct
as_struct_opt
def as_struct_opt() -> "typing.Optional[MoveStruct]"
Try to interpret this object as a move struct
data
def data() -> "ObjectData"
Return this object's data
digest
def digest() -> "Digest"
Calculate the digest of this Object
This is done by hashing the BCS bytes of this Object prefixed
object_id
def object_id() -> "ObjectId"
Return this object's id
object_ref
def object_ref() -> "ObjectReference"
Return this object's reference
object_type
def object_type() -> "ObjectType"
Return this object's type
owner
def owner() -> "Owner"
Return this object's owner
previous_transaction
def previous_transaction() -> "Digest"
Return the digest of the transaction that last modified this object
storage_rebate
def storage_rebate() -> "int"
Return the storage rebate locked in this object
Storage rebates are credited to the gas coin used in a transaction that deletes this object.
version
def version() -> "int"
Return this object's version
ObjectDataProtocol Objects
class ObjectDataProtocol(typing.Protocol)
Object data, either a package or struct
BCS
The BCS serialized form for this type is defined by the following ABNF:
object-data = object-data-struct / object-data-package
object-data-struct = %x00 object-move-struct
object-data-package = %x01 object-move-package
as_package_opt
def as_package_opt()
Try to interpret this object as a MovePackage
as_struct_opt
def as_struct_opt()
Try to interpret this object as a MoveStruct
is_package
def is_package()
Return whether this object is a MovePackage
is_struct
def is_struct()
Return whether this object is a MoveStruct
ObjectData Objects
class ObjectData()
Object data, either a package or struct
BCS
The BCS serialized form for this type is defined by the following ABNF:
object-data = object-data-struct / object-data-package
object-data-struct = %x00 object-move-struct
object-data-package = %x01 object-move-package
new_move_package
@classmethod
def new_move_package(cls, move_package: "MovePackage")
Create an ObjectData from MovePackage
new_move_struct
@classmethod
def new_move_struct(cls, move_struct: "MoveStruct")
Create an ObjectData from a MoveStruct
as_package_opt
def as_package_opt() -> "typing.Optional[MovePackage]"
Try to interpret this object as a MovePackage
as_struct_opt
def as_struct_opt() -> "typing.Optional[MoveStruct]"
Try to interpret this object as a MoveStruct
is_package
def is_package() -> "bool"
Return whether this object is a MovePackage
is_struct
def is_struct() -> "bool"
Return whether this object is a MoveStruct
ObjectIdProtocol Objects
class ObjectIdProtocol(typing.Protocol)
An ObjectId is a 32-byte identifier used to uniquely identify an object on
the IOTA blockchain.
Relationship to Address
Addresses and ObjectIds share the same 32-byte addressable space but
are derived leveraging different domain-separator values to ensure,
cryptographically, that there won't be any overlap, e.g. there can't be a
valid Object whose ObjectId is equal to that of the Address of a user
account.
BCS
An ObjectId's BCS serialized form is defined by the following:
object-id = 32*OCTET
derive_dynamic_child_id
def derive_dynamic_child_id(key_type_tag: "TypeTag", key_bytes: "bytes")
Derive an ObjectId for a Dynamic Child Object.
hash(parent || len(key) || key || key_type_tag)
to_canonical_string
def to_canonical_string(with_prefix: "bool")
Returns the string representation of this object ID using the
canonical display, with or without a 0x prefix.
to_short_string
def to_short_string(with_prefix: "bool")
Returns the shortest possible string representation of the object ID (i.e. with leading zeroes trimmed).
ObjectId Objects
class ObjectId()
An ObjectId is a 32-byte identifier used to uniquely identify an object on
the IOTA blockchain.
Relationship to Address
Addresses and ObjectIds share the same 32-byte addressable space but
are derived leveraging different domain-separator values to ensure,
cryptographically, that there won't be any overlap, e.g. there can't be a
valid Object whose ObjectId is equal to that of the Address of a user
account.
BCS
An ObjectId's BCS serialized form is defined by the following:
object-id = 32*OCTET
derive_id
@classmethod
def derive_id(cls, digest: "Digest", count: "int")
Create an ObjectId from a transaction digest and the number of objects that have been created during a transactions.
derive_dynamic_child_id
def derive_dynamic_child_id(key_type_tag: "TypeTag",
key_bytes: "bytes") -> "ObjectId"
Derive an ObjectId for a Dynamic Child Object.
hash(parent || len(key) || key || key_type_tag)
to_canonical_string
def to_canonical_string(with_prefix: "bool") -> "str"
Returns the string representation of this object ID using the
canonical display, with or without a 0x prefix.
to_short_string
def to_short_string(with_prefix: "bool") -> "str"
Returns the shortest possible string representation of the object ID (i.e. with leading zeroes trimmed).
ObjectTypeProtocol Objects
class ObjectTypeProtocol(typing.Protocol)
Type of an IOTA object
ObjectType Objects
class ObjectType()
Type of an IOTA object
OwnerProtocol Objects
class OwnerProtocol(typing.Protocol)
Enum of different types of ownership for an object.
BCS
The BCS serialized form for this type is defined by the following ABNF:
owner = owner-address / owner-object / owner-shared / owner-immutable
owner-address = %x00 address
owner-object = %x01 object-id
owner-shared = %x02 u64
owner-immutable = %x03
Owner Objects
class Owner()
Enum of different types of ownership for an object.
BCS
The BCS serialized form for this type is defined by the following ABNF:
owner = owner-address / owner-object / owner-shared / owner-immutable
owner-address = %x00 address
owner-object = %x01 object-id
owner-shared = %x02 u64
owner-immutable = %x03
PasskeyAuthenticatorProtocol Objects
class PasskeyAuthenticatorProtocol(typing.Protocol)
A passkey authenticator.
BCS
The BCS serialized form for this type is defined by the following ABNF:
See <https://www.w3.org/TR/webauthn-2/`dictdef`-collectedclientdata> for
the required json-schema for the client-data-json rule. In addition, IOTA
currently requires that the CollectedClientData.type field is required to
be webauthn.get.
Note: Due to historical reasons, signatures are serialized slightly
different from the majority of the types in IOTA. In particular if a
signature is ever embedded in another structure it generally is serialized
as bytes meaning it has a length prefix that defines the length of
the completely serialized signature.
passkey-bcs = bytes ; where the contents of the bytes are
; defined by <passkey>
passkey = passkey-flag
bytes ; passkey authenticator data
client-data-json ; valid json
simple-signature ; required to be a secp256r1 signature
client-data-json = string ; valid json
authenticator_data
def authenticator_data()
Opaque authenticator data for this passkey signature.
See <https://www.w3.org/TR/webauthn-2/`sctn`-authenticator-data> for more information on this field.
challenge
def challenge()
The parsed challenge message for this passkey signature.
This is parsed by decoding the base64url data from the
client_data_json.challenge field.
client_data_json
def client_data_json()
Structured, unparsed, JSON for this passkey signature.
See <https://www.w3.org/TR/webauthn-2/`dictdef`-collectedclientdata> for more information on this field.
public_key
def public_key()
The passkey public key
signature
def signature()
The passkey signature.
PasskeyAuthenticator Objects
class PasskeyAuthenticator()
A passkey authenticator.
BCS
The BCS serialized form for this type is defined by the following ABNF:
See <https://www.w3.org/TR/webauthn-2/`dictdef`-collectedclientdata> for
the required json-schema for the client-data-json rule. In addition, IOTA
currently requires that the CollectedClientData.type field is required to
be webauthn.get.
Note: Due to historical reasons, signatures are serialized slightly
different from the majority of the types in IOTA. In particular if a
signature is ever embedded in another structure it generally is serialized
as bytes meaning it has a length prefix that defines the length of
the completely serialized signature.
passkey-bcs = bytes ; where the contents of the bytes are
; defined by <passkey>
passkey = passkey-flag
bytes ; passkey authenticator data
client-data-json ; valid json
simple-signature ; required to be a secp256r1 signature
client-data-json = string ; valid json
authenticator_data
def authenticator_data() -> "bytes"
Opaque authenticator data for this passkey signature.
See <https://www.w3.org/TR/webauthn-2/`sctn`-authenticator-data> for more information on this field.
challenge
def challenge() -> "bytes"
The parsed challenge message for this passkey signature.
This is parsed by decoding the base64url data from the
client_data_json.challenge field.
client_data_json
def client_data_json() -> "str"
Structured, unparsed, JSON for this passkey signature.
See <https://www.w3.org/TR/webauthn-2/`dictdef`-collectedclientdata> for more information on this field.
public_key
def public_key() -> "PasskeyPublicKey"
The passkey public key
signature
def signature() -> "SimpleSignature"
The passkey signature.
PasskeyPublicKeyProtocol Objects
class PasskeyPublicKeyProtocol(typing.Protocol)
Public key of a PasskeyAuthenticator.
This is used to derive the onchain Address for a PasskeyAuthenticator.
BCS
The BCS serialized form for this type is defined by the following ABNF:
passkey-public-key = passkey-flag secp256r1-public-key
derive_address
def derive_address()
Derive an Address from this Passkey Public Key
An Address can be derived from a PasskeyPublicKey by hashing the
bytes of the Secp256r1PublicKey that corresponds to this passkey
prefixed with the Passkey SignatureScheme flag (0x06).
hash( 0x06 || 33-byte secp256r1 public key)
PasskeyPublicKey Objects
class PasskeyPublicKey()
Public key of a PasskeyAuthenticator.
This is used to derive the onchain Address for a PasskeyAuthenticator.
BCS
The BCS serialized form for this type is defined by the following ABNF:
passkey-public-key = passkey-flag secp256r1-public-key
derive_address
def derive_address() -> "Address"
Derive an Address from this Passkey Public Key
An Address can be derived from a PasskeyPublicKey by hashing the
bytes of the Secp256r1PublicKey that corresponds to this passkey
prefixed with the Passkey SignatureScheme flag (0x06).
hash( 0x06 || 33-byte secp256r1 public key)
PersonalMessageProtocol Objects
class PersonalMessageProtocol(typing.Protocol)
A personal message that wraps around a byte array.
message_bytes
def message_bytes()
Get the message as bytes.
signing_digest
def signing_digest()
Get the signing digest as bytes.
signing_digest_hex
def signing_digest_hex()
Get the signing digest as hex string.
PersonalMessage Objects
class PersonalMessage()
A personal message that wraps around a byte array.
__init__
def __init__(message_bytes: "bytes")
Create a new personal message from bytes.
message_bytes
def message_bytes() -> "bytes"
Get the message as bytes.
signing_digest
def signing_digest() -> "bytes"
Get the signing digest as bytes.
signing_digest_hex
def signing_digest_hex() -> "str"
Get the signing digest as hex string.
ProgrammableTransactionProtocol Objects
class ProgrammableTransactionProtocol(typing.Protocol)
A user transaction
Contains a series of native commands and move calls where the results of one command can be used in future commands.
BCS
The BCS serialized form for this type is defined by the following ABNF:
ptb = (vector input) (vector command)
commands
def commands()
The commands to be executed sequentially. A failure in any command will result in the failure of the entire transaction.
inputs
def inputs()
Input objects or primitive values
ProgrammableTransaction Objects
class ProgrammableTransaction()
A user transaction
Contains a series of native commands and move calls where the results of one command can be used in future commands.
BCS
The BCS serialized form for this type is defined by the following ABNF:
ptb = (vector input) (vector command)
commands
def commands() -> "typing.List[Command]"
The commands to be executed sequentially. A failure in any command will result in the failure of the entire transaction.
inputs
def inputs() -> "typing.List[Input]"
Input objects or primitive values
PublishProtocol Objects
class PublishProtocol(typing.Protocol)
Command to publish a new move package
BCS
The BCS serialized form for this type is defined by the following ABNF:
publish = (vector bytes) ; the serialized move modules
(vector object-id) ; the set of package dependencies
dependencies
def dependencies()
Set of packages that the to-be published package depends on
modules
def modules()
The serialized move modules
Publish Objects
class Publish()
Command to publish a new move package
BCS
The BCS serialized form for this type is defined by the following ABNF:
publish = (vector bytes) ; the serialized move modules
(vector object-id) ; the set of package dependencies
dependencies
def dependencies() -> "typing.List[ObjectId]"
Set of packages that the to-be published package depends on
modules
def modules() -> "typing.List[bytes]"
The serialized move modules
Secp256k1PrivateKeyProtocol Objects
class Secp256k1PrivateKeyProtocol(typing.Protocol)
sign_personal_message
def sign_personal_message(message: "PersonalMessage")
Sign a personal message and return a UserSignature.
sign_transaction
def sign_transaction(transaction: "Transaction")
Sign a transaction and return a UserSignature.
to_bech32
def to_bech32()
Encode this private key as flag || privkey in Bech32 starting with
"iotaprivkey" to a string.
to_bytes
def to_bytes()
Serialize this private key to bytes.
to_der
def to_der()
Serialize this private key as DER-encoded PKCS#8
to_pem
def to_pem()
Serialize this private key as PEM-encoded PKCS#8
Secp256k1PrivateKey Objects
class Secp256k1PrivateKey()
from_bech32
@classmethod
def from_bech32(cls, value: "str")
Decode a private key from flag || privkey in Bech32 starting with
"iotaprivkey".
from_der
@classmethod
def from_der(cls, bytes: "bytes")
Deserialize PKCS#8 private key from ASN.1 DER-encoded data (binary format).
from_mnemonic
@classmethod
def from_mnemonic(cls,
phrase: "str",
account_index: "typing.Union[object, int]" = _DEFAULT,
password: "typing.Union[object, str]" = _DEFAULT)
Construct the private key from a mnemonic phrase
from_mnemonic_with_path
@classmethod
def from_mnemonic_with_path(cls,
phrase: "str",
path: "str",
password: "typing.Union[object, str]" = _DEFAULT)
Create an instance from a mnemonic phrase and a derivation path like
"m/54'/4218'/0'/0/0"
from_pem
@classmethod
def from_pem(cls, s: "str")
Deserialize PKCS#8-encoded private key from PEM.
sign_personal_message
def sign_personal_message(message: "PersonalMessage") -> "UserSignature"
Sign a personal message and return a UserSignature.
sign_transaction
def sign_transaction(transaction: "Transaction") -> "UserSignature"
Sign a transaction and return a UserSignature.
to_bech32
def to_bech32() -> "str"
Encode this private key as flag || privkey in Bech32 starting with
"iotaprivkey" to a string.
to_bytes
def to_bytes() -> "bytes"
Serialize this private key to bytes.
to_der
def to_der() -> "bytes"
Serialize this private key as DER-encoded PKCS#8
to_pem
def to_pem() -> "str"
Serialize this private key as PEM-encoded PKCS#8
Secp256k1PublicKeyProtocol Objects
class Secp256k1PublicKeyProtocol(typing.Protocol)
A secp256k1 signature.
BCS
The BCS serialized form for this type is defined by the following ABNF:
secp256k1-signature = 64OCTET
derive_address
def derive_address()
Derive an Address from this Public Key
An Address can be derived from a Secp256k1PublicKey by hashing the
bytes of the public key prefixed with the Secp256k1
SignatureScheme flag (0x01).
hash( 0x01 || 33-byte secp256k1 public key)
scheme
def scheme()
Returns the signature scheme for this public key.
to_flagged_bytes
def to_flagged_bytes()
Returns the bytes with signature scheme flag prepended.
Secp256k1PublicKey Objects
class Secp256k1PublicKey()
A secp256k1 signature.
BCS
The BCS serialized form for this type is defined by the following ABNF:
secp256k1-signature = 64OCTET
derive_address
def derive_address() -> "Address"
Derive an Address from this Public Key
An Address can be derived from a Secp256k1PublicKey by hashing the
bytes of the public key prefixed with the Secp256k1
SignatureScheme flag (0x01).
hash( 0x01 || 33-byte secp256k1 public key)
scheme
def scheme() -> "SignatureScheme"
Returns the signature scheme for this public key.
to_flagged_bytes
def to_flagged_bytes() -> "bytes"
Returns the bytes with signature scheme flag prepended.
Secp256k1SignatureProtocol Objects
class Secp256k1SignatureProtocol(typing.Protocol)
A secp256k1 public key.
BCS
The BCS serialized form for this type is defined by the following ABNF:
secp256k1-public-key = 33OCTET
Secp256k1Signature Objects
class Secp256k1Signature()
A secp256k1 public key.
BCS
The BCS serialized form for this type is defined by the following ABNF:
secp256k1-public-key = 33OCTET
Secp256k1VerifyingKeyProtocol Objects
class Secp256k1VerifyingKeyProtocol(typing.Protocol)
to_der
def to_der()
Serialize this public key as DER-encoded data
to_pem
def to_pem()
Serialize this public key into PEM
Secp256k1VerifyingKey Objects
class Secp256k1VerifyingKey()
from_der
@classmethod
def from_der(cls, bytes: "bytes")
Deserialize public key from ASN.1 DER-encoded data (binary format).
from_pem
@classmethod
def from_pem(cls, s: "str")
Deserialize public key from PEM.
to_der
def to_der() -> "bytes"
Serialize this public key as DER-encoded data
to_pem
def to_pem() -> "str"
Serialize this public key into PEM
Secp256r1PrivateKeyProtocol Objects
class Secp256r1PrivateKeyProtocol(typing.Protocol)
public_key
def public_key()
Get the public key corresponding to this private key.
sign_personal_message
def sign_personal_message(message: "PersonalMessage")
Sign a personal message and return a UserSignature.
sign_transaction
def sign_transaction(transaction: "Transaction")
Sign a transaction and return a UserSignature.
to_bech32
def to_bech32()
Encode this private key as flag || privkey in Bech32 starting with
"iotaprivkey" to a string.
to_bytes
def to_bytes()
Serialize this private key to bytes.
to_der
def to_der()
Serialize this private key as DER-encoded PKCS#8
to_pem
def to_pem()
Serialize this private key as PEM-encoded PKCS#8
try_sign
def try_sign(message: "bytes")
Sign a message and return a Secp256r1Signature.
try_sign_simple
def try_sign_simple(message: "bytes")
Sign a message and return a SimpleSignature.
try_sign_user
def try_sign_user(message: "bytes")
Sign a message and return a UserSignature.
Secp256r1PrivateKey Objects
class Secp256r1PrivateKey()
from_bech32
@classmethod
def from_bech32(cls, value: "str")
Decode a private key from flag || privkey in Bech32 starting with
"iotaprivkey".
from_der
@classmethod
def from_der(cls, bytes: "bytes")
Deserialize PKCS#8 private key from ASN.1 DER-encoded data (binary format).
from_mnemonic
@classmethod
def from_mnemonic(cls,
phrase: "str",
account_index: "typing.Union[object, int]" = _DEFAULT,
password: "typing.Union[object, str]" = _DEFAULT)
Construct the private key from a mnemonic phrase
from_mnemonic_with_path
@classmethod
def from_mnemonic_with_path(cls,
phrase: "str",
path: "str",
password: "typing.Union[object, str]" = _DEFAULT)
Create an instance from a mnemonic phrase and a derivation path like
"m/74'/4218'/0'/0/0"
from_pem
@classmethod
def from_pem(cls, s: "str")
Deserialize PKCS#8-encoded private key from PEM.
generate
@classmethod
def generate(cls)
Generate a new random Secp256r1PrivateKey
public_key
def public_key() -> "Secp256r1PublicKey"
Get the public key corresponding to this private key.
sign_personal_message
def sign_personal_message(message: "PersonalMessage") -> "UserSignature"
Sign a personal message and return a UserSignature.
sign_transaction
def sign_transaction(transaction: "Transaction") -> "UserSignature"
Sign a transaction and return a UserSignature.
to_bech32
def to_bech32() -> "str"
Encode this private key as flag || privkey in Bech32 starting with
"iotaprivkey" to a string.
to_bytes
def to_bytes() -> "bytes"
Serialize this private key to bytes.
to_der
def to_der() -> "bytes"
Serialize this private key as DER-encoded PKCS#8
to_pem
def to_pem() -> "str"
Serialize this private key as PEM-encoded PKCS#8
try_sign
def try_sign(message: "bytes") -> "Secp256r1Signature"
Sign a message and return a Secp256r1Signature.
try_sign_simple
def try_sign_simple(message: "bytes") -> "SimpleSignature"
Sign a message and return a SimpleSignature.
try_sign_user
def try_sign_user(message: "bytes") -> "UserSignature"
Sign a message and return a UserSignature.
Secp256r1PublicKeyProtocol Objects
class Secp256r1PublicKeyProtocol(typing.Protocol)
A secp256r1 signature.
BCS
The BCS serialized form for this type is defined by the following ABNF:
secp256r1-signature = 64OCTET
derive_address
def derive_address()
Derive an Address from this Public Key
An Address can be derived from a Secp256r1PublicKey by hashing the
bytes of the public key prefixed with the Secp256r1
SignatureScheme flag (0x02).
hash( 0x02 || 33-byte secp256r1 public key)
scheme
def scheme()
Returns the signature scheme for this public key.
to_flagged_bytes
def to_flagged_bytes()
Returns the bytes with signature scheme flag prepended
Secp256r1PublicKey Objects
class Secp256r1PublicKey()
A secp256r1 signature.
BCS
The BCS serialized form for this type is defined by the following ABNF:
secp256r1-signature = 64OCTET
derive_address
def derive_address() -> "Address"
Derive an Address from this Public Key
An Address can be derived from a Secp256r1PublicKey by hashing the
bytes of the public key prefixed with the Secp256r1
SignatureScheme flag (0x02).
hash( 0x02 || 33-byte secp256r1 public key)
scheme
def scheme() -> "SignatureScheme"
Returns the signature scheme for this public key.
to_flagged_bytes
def to_flagged_bytes() -> "bytes"
Returns the bytes with signature scheme flag prepended
Secp256r1SignatureProtocol Objects
class Secp256r1SignatureProtocol(typing.Protocol)
A secp256r1 public key.
BCS
The BCS serialized form for this type is defined by the following ABNF:
secp256r1-public-key = 33OCTET
Secp256r1Signature Objects
class Secp256r1Signature()
A secp256r1 public key.
BCS
The BCS serialized form for this type is defined by the following ABNF:
secp256r1-public-key = 33OCTET
Secp256r1VerifyingKeyProtocol Objects
class Secp256r1VerifyingKeyProtocol(typing.Protocol)
to_der
def to_der()
Serialize this public key as DER-encoded data.
to_pem
def to_pem()
Serialize this public key into PEM.
Secp256r1VerifyingKey Objects
class Secp256r1VerifyingKey()
from_der
@classmethod
def from_der(cls, bytes: "bytes")
Deserialize public key from ASN.1 DER-encoded data (binary format).
from_pem
@classmethod
def from_pem(cls, s: "str")
Deserialize public key from PEM.
to_der
def to_der() -> "bytes"
Serialize this public key as DER-encoded data.
to_pem
def to_pem() -> "str"
Serialize this public key into PEM.
SimpleKeypairProtocol Objects
class SimpleKeypairProtocol(typing.Protocol)
sign_personal_message
def sign_personal_message(message: "PersonalMessage")
Sign a personal message and return a UserSignature.
sign_transaction
def sign_transaction(transaction: "Transaction")
Sign a transaction and return a UserSignature.
to_bech32
def to_bech32()
Encode a SimpleKeypair as flag || privkey in Bech32 starting with
"iotaprivkey" to a string. Note that the pubkey is not encoded.
to_bytes
def to_bytes()
Encode a SimpleKeypair as flag || privkey in bytes
to_der
def to_der()
Serialize this private key as DER-encoded PKCS#8
to_pem
def to_pem()
Serialize this private key as DER-encoded PKCS#8
SimpleKeypair Objects
class SimpleKeypair()
from_bech32
@classmethod
def from_bech32(cls, value: "str")
Decode a SimpleKeypair from flag || privkey in Bech32 starting with
"iotaprivkey" to SimpleKeypair. The public key is computed directly from
the private key bytes.
from_bytes
@classmethod
def from_bytes(cls, bytes: "bytes")
Decode a SimpleKeypair from flag || privkey bytes
from_der
@classmethod
def from_der(cls, bytes: "bytes")
Deserialize PKCS#8 private key from ASN.1 DER-encoded data (binary format).
from_pem
@classmethod
def from_pem(cls, s: "str")
Deserialize PKCS#8-encoded private key from PEM.
sign_personal_message
def sign_personal_message(message: "PersonalMessage") -> "UserSignature"
Sign a personal message and return a UserSignature.
sign_transaction
def sign_transaction(transaction: "Transaction") -> "UserSignature"
Sign a transaction and return a UserSignature.
to_bech32
def to_bech32() -> "str"
Encode a SimpleKeypair as flag || privkey in Bech32 starting with
"iotaprivkey" to a string. Note that the pubkey is not encoded.
to_bytes
def to_bytes() -> "bytes"
Encode a SimpleKeypair as flag || privkey in bytes
to_der
def to_der() -> "bytes"
Serialize this private key as DER-encoded PKCS#8
to_pem
def to_pem() -> "str"
Serialize this private key as DER-encoded PKCS#8
SimpleSignatureProtocol Objects
class SimpleSignatureProtocol(typing.Protocol)
A basic signature
This enumeration defines the set of simple or basic signature schemes supported by IOTA. Most signature schemes supported by IOTA end up comprising of a at least one simple signature scheme.
BCS
The BCS serialized form for this type is defined by the following ABNF:
Note: Due to historical reasons, signatures are serialized slightly
different from the majority of the types in IOTA. In particular if a
signature is ever embedded in another structure it generally is serialized
as bytes meaning it has a length prefix that defines the length of
the completely serialized signature.
simple-signature-bcs = bytes ; where the contents of the bytes are defined by <simple-signature>
simple-signature = (ed25519-flag ed25519-signature ed25519-public-key) /
(secp256k1-flag secp256k1-signature secp256k1-public-key) /
(secp256r1-flag secp256r1-signature secp256r1-public-key)
SimpleSignature Objects
class SimpleSignature()
A basic signature
This enumeration defines the set of simple or basic signature schemes supported by IOTA. Most signature schemes supported by IOTA end up comprising of a at least one simple signature scheme.
BCS
The BCS serialized form for this type is defined by the following ABNF:
Note: Due to historical reasons, signatures are serialized slightly
different from the majority of the types in IOTA. In particular if a
signature is ever embedded in another structure it generally is serialized
as bytes meaning it has a length prefix that defines the length of
the completely serialized signature.
simple-signature-bcs = bytes ; where the contents of the bytes are defined by <simple-signature>
simple-signature = (ed25519-flag ed25519-signature ed25519-public-key) /
(secp256k1-flag secp256k1-signature secp256k1-public-key) /
(secp256r1-flag secp256r1-signature secp256r1-public-key)
SimpleVerifyingKeyProtocol Objects
class SimpleVerifyingKeyProtocol(typing.Protocol)
to_der
def to_der()
Serialize this private key as DER-encoded PKCS#8
to_pem
def to_pem()
Serialize this private key as DER-encoded PKCS#8
SimpleVerifyingKey Objects
class SimpleVerifyingKey()
from_der
@classmethod
def from_der(cls, bytes: "bytes")
Deserialize PKCS#8 private key from ASN.1 DER-encoded data (binary format).
from_pem
@classmethod
def from_pem(cls, s: "str")
Deserialize PKCS#8-encoded private key from PEM.
to_der
def to_der() -> "bytes"
Serialize this private key as DER-encoded PKCS#8
to_pem
def to_pem() -> "str"
Serialize this private key as DER-encoded PKCS#8
SplitCoinsProtocol Objects
class SplitCoinsProtocol(typing.Protocol)
Command to split a single coin object into multiple coins
BCS
The BCS serialized form for this type is defined by the following ABNF:
split-coins = argument (vector argument)
amounts
def amounts()
The amounts to split off
coin
def coin()
The coin to split
SplitCoins Objects
class SplitCoins()
Command to split a single coin object into multiple coins
BCS
The BCS serialized form for this type is defined by the following ABNF:
split-coins = argument (vector argument)
amounts
def amounts() -> "typing.List[Argument]"
The amounts to split off
coin
def coin() -> "Argument"
The coin to split
StructTagProtocol Objects
class StructTagProtocol(typing.Protocol)
Type information for a move struct
BCS
The BCS serialized form for this type is defined by the following ABNF:
struct-tag = address ; address of the package
identifier ; name of the module
identifier ; name of the type
(vector type-tag) ; type parameters
address
def address()
Returns the address part of a StructTag
coin_type
def coin_type()
Checks if this is a Coin type
coin_type_opt
def coin_type_opt()
Checks if this is a Coin type
module
def module()
Returns the module part of a StructTag
name
def name()
Returns the name part of a StructTag
to_canonical_string
def to_canonical_string(with_prefix: "bool")
Returns the string representation of this struct tag using the
canonical display, with or without a 0x prefix.
type_args
def type_args()
Returns the type params part of a StructTag
StructTag Objects
class StructTag()
Type information for a move struct
BCS
The BCS serialized form for this type is defined by the following ABNF:
struct-tag = address ; address of the package
identifier ; name of the module
identifier ; name of the type
(vector type-tag) ; type parameters
address
def address() -> "Address"
Returns the address part of a StructTag
coin_type
def coin_type() -> "TypeTag"
Checks if this is a Coin type
coin_type_opt
def coin_type_opt() -> "typing.Optional[TypeTag]"
Checks if this is a Coin type
module
def module() -> "Identifier"
Returns the module part of a StructTag
name
def name() -> "Identifier"
Returns the name part of a StructTag
to_canonical_string
def to_canonical_string(with_prefix: "bool") -> "str"
Returns the string representation of this struct tag using the
canonical display, with or without a 0x prefix.
type_args
def type_args() -> "typing.List[TypeTag]"
Returns the type params part of a StructTag
SystemPackageProtocol Objects
class SystemPackageProtocol(typing.Protocol)
System package
BCS
The BCS serialized form for this type is defined by the following ABNF:
system-package = u64 ; version
(vector bytes) ; modules
(vector object-id) ; dependencies
SystemPackage Objects
class SystemPackage()
System package
BCS
The BCS serialized form for this type is defined by the following ABNF:
system-package = u64 ; version
(vector bytes) ; modules
(vector object-id) ; dependencies
TransactionProtocol Objects
class TransactionProtocol(typing.Protocol)
Transaction
BCS
The BCS serialized form for this type is defined by the following ABNF:
transaction = %x00 transaction-v1
transaction-v1 = transaction-kind address gas-payment transaction-expiration
signing_digest
def signing_digest()
Get the signing digest.
signing_digest_hex
def signing_digest_hex()
Get the signing digest as a hex string.
to_base64
def to_base64()
Serialize the transaction as a base64-encoded string.
Transaction Objects
class Transaction()
Transaction
BCS
The BCS serialized form for this type is defined by the following ABNF:
transaction = %x00 transaction-v1
transaction-v1 = transaction-kind address gas-payment transaction-expiration
from_base64
@classmethod
def from_base64(cls, base64: "str")
Deserialize a transaction from a base64-encoded string.
signing_digest
def signing_digest() -> "bytes"
Get the signing digest.
signing_digest_hex
def signing_digest_hex() -> "str"
Get the signing digest as a hex string.
to_base64
def to_base64() -> "str"
Serialize the transaction as a base64-encoded string.
TransactionBuilderProtocol Objects
class TransactionBuilderProtocol(typing.Protocol)
A builder for creating transactions. Use finish to finalize the
transaction data.
execute_with_gas_station
def execute_with_gas_station(signer: "TransactionSigner")
Execute the transaction using the gas station and return the JSON
transaction effects. This will fail unless data is set with the
gas_station_sponsor function.
NOTE: These effects are not necessarily compatible with
TransactionEffects
expiration
def expiration(epoch: "int")
Set the expiration of the transaction to be a specific epoch.
finish
def finish()
Convert this builder into a transaction.
gas
def gas(object_refs: "typing.List[ObjectReference]")
Add gas coins that will be consumed. Optional.
gas_budget
def gas_budget(budget: "int")
Set the gas budget for the transaction.
gas_price
def gas_price(price: "int")
Set the gas price for the transaction.
gas_station_sponsor
def gas_station_sponsor(
url: "str",
duration: "typing.Union[object, typing.Optional[Duration]]" = _DEFAULT,
headers:
"typing.Union[object, typing.Optional[dict[str, typing.List[str]]]]" = _DEFAULT
)
Set the gas station sponsor.
make_move_vec
def make_move_vec(elements: "typing.List[MoveArg]", type_tag: "TypeTag",
name: "str")
Make a move vector from a list of elements. The elements must all be of
the type indicated by type_tag.
merge_coins
def merge_coins(primary_coin: "PtbArgument",
consumed_coins: "typing.List[PtbArgument]")
Merge multiple coins into one.
This method combines the balances of multiple coins of the same coin
type into a single coin. The primary_coin will receive the balances
from all consumed_coins. After merging, the consumed_coins will
be consumed and no longer exist.
move_call
def move_call(
package: "Address",
module: "Identifier",
function: "Identifier",
arguments: "typing.Union[object, typing.List[PtbArgument]]" = _DEFAULT,
type_args: "typing.Union[object, typing.List[TypeTag]]" = _DEFAULT,
names: "typing.Union[object, typing.List[str]]" = _DEFAULT)
Call a Move function with the given arguments.
publish
def publish(package_data: "MovePackageData", upgrade_cap_name: "str")
Publish a list of modules with the given dependencies. The result
assigned to upgrade_cap_name is the 0x2::package::UpgradeCap
Move type. Note that the upgrade capability needs to be handled
after this call:
- transfer it to the transaction sender or another address
- burn it
- wrap it for access control
- discard the it to make a package immutable
The arguments required for this command are:
modules: is the modules' bytecode to be publisheddependencies: is the list of IDs of the transitive dependencies of the package
send_coins
def send_coins(
coins: "typing.List[PtbArgument]",
recipient: "Address",
amount: "typing.Union[object, typing.Optional[PtbArgument]]" = _DEFAULT
)
Transfer some coins to a recipient address. If multiple coins are provided then they will be merged.
The amount parameter specifies the quantity in NANOS, where 1 IOTA
equals 1_000_000_000 NANOS.
If amount is provided, that amount is split from the provided coins
and sent.
If amount is None, the entire coins are transferred.
All provided coins must have the same coin type. Mixing coins of different types will result in an error.
If you intend to transfer all provided coins to another address in a
single transaction, consider using
TransactionBuilder::transfer_objects() instead.
send_iota
def send_iota(recipient: "Address", amount: "PtbArgument")
Send IOTA to a recipient address.
The amount parameter specifies the quantity in NANOS, where 1 IOTA
equals 1_000_000_000 NANOS. That amount is split from the gas coin and
sent.
set_sender
def set_sender(sender: "Address")
Set the sender address.
split_coins
def split_coins(coin: "PtbArgument",
amounts: "typing.List[PtbArgument]",
names: "typing.Union[object, typing.List[str]]" = _DEFAULT)
Split a coin by the provided amounts.
sponsor
def sponsor(sponsor: "Address")
Set the sponsor of the transaction.
stake
def stake(stake: "PtbArgument", validator_address: "Address")
Add stake to a validator's staking pool.
This is a high-level function which will split the provided stake amount from the gas coin and then stake using the resulting coin.
transfer_objects
def transfer_objects(recipient: "Address",
objects: "typing.List[PtbArgument]")
Transfer a list of objects to the given address, without producing any result.
unstake
def unstake(staked_iota: "PtbArgument")
Withdraw stake from a validator's staking pool.
upgrade
def upgrade(package_id: "ObjectId",
package_data: "MovePackageData",
upgrade_ticket: "PtbArgument",
name: "typing.Union[object, typing.Optional[str]]" = _DEFAULT)
Upgrade a Move package.
modules: is the modules' bytecode for the modules to be publisheddependencies: is the list of IDs of the transitive dependencies of the package to be upgradedpackage: is the ID of the current package being upgradedticket: is the upgrade ticket
To get the ticket, you have to call the
0x2::package::authorize_upgrade function, and pass the package
ID, the upgrade policy, and package digest.
TransactionBuilder Objects
class TransactionBuilder()
A builder for creating transactions. Use finish to finalize the
transaction data.
__init__
def __init__(sender: "Address")
Create a new transaction builder and initialize its elements to default.
execute_with_gas_station
async def execute_with_gas_station(signer: "TransactionSigner") -> "Value"
Execute the transaction using the gas station and return the JSON
transaction effects. This will fail unless data is set with the
gas_station_sponsor function.
NOTE: These effects are not necessarily compatible with
TransactionEffects
expiration
def expiration(epoch: "int") -> "TransactionBuilder"
Set the expiration of the transaction to be a specific epoch.
finish
def finish() -> "Transaction"
Convert this builder into a transaction.
gas
def gas(object_refs: "typing.List[ObjectReference]") -> "TransactionBuilder"
Add gas coins that will be consumed. Optional.
gas_budget
def gas_budget(budget: "int") -> "TransactionBuilder"
Set the gas budget for the transaction.
gas_price
def gas_price(price: "int") -> "TransactionBuilder"
Set the gas price for the transaction.
gas_station_sponsor
def gas_station_sponsor(
url: "str",
duration: "typing.Union[object, typing.Optional[Duration]]" = _DEFAULT,
headers:
"typing.Union[object, typing.Optional[dict[str, typing.List[str]]]]" = _DEFAULT
) -> "TransactionBuilder"
Set the gas station sponsor.
make_move_vec
def make_move_vec(elements: "typing.List[MoveArg]", type_tag: "TypeTag",
name: "str") -> "TransactionBuilder"
Make a move vector from a list of elements. The elements must all be of
the type indicated by type_tag.
merge_coins
def merge_coins(
primary_coin: "PtbArgument",
consumed_coins: "typing.List[PtbArgument]") -> "TransactionBuilder"
Merge multiple coins into one.
This method combines the balances of multiple coins of the same coin
type into a single coin. The primary_coin will receive the balances
from all consumed_coins. After merging, the consumed_coins will
be consumed and no longer exist.
move_call
def move_call(
package: "Address",
module: "Identifier",
function: "Identifier",
arguments: "typing.Union[object, typing.List[PtbArgument]]" = _DEFAULT,
type_args: "typing.Union[object, typing.List[TypeTag]]" = _DEFAULT,
names: "typing.Union[object, typing.List[str]]" = _DEFAULT
) -> "TransactionBuilder"
Call a Move function with the given arguments.
publish
def publish(package_data: "MovePackageData",
upgrade_cap_name: "str") -> "TransactionBuilder"
Publish a list of modules with the given dependencies. The result
assigned to upgrade_cap_name is the 0x2::package::UpgradeCap
Move type. Note that the upgrade capability needs to be handled
after this call:
- transfer it to the transaction sender or another address
- burn it
- wrap it for access control
- discard the it to make a package immutable
The arguments required for this command are:
modules: is the modules' bytecode to be publisheddependencies: is the list of IDs of the transitive dependencies of the package
send_coins
def send_coins(
coins: "typing.List[PtbArgument]",
recipient: "Address",
amount: "typing.Union[object, typing.Optional[PtbArgument]]" = _DEFAULT
) -> "TransactionBuilder"
Transfer some coins to a recipient address. If multiple coins are provided then they will be merged.
The amount parameter specifies the quantity in NANOS, where 1 IOTA
equals 1_000_000_000 NANOS.
If amount is provided, that amount is split from the provided coins
and sent.
If amount is None, the entire coins are transferred.
All provided coins must have the same coin type. Mixing coins of different types will result in an error.
If you intend to transfer all provided coins to another address in a
single transaction, consider using
TransactionBuilder::transfer_objects() instead.
send_iota
def send_iota(recipient: "Address",
amount: "PtbArgument") -> "TransactionBuilder"
Send IOTA to a recipient address.
The amount parameter specifies the quantity in NANOS, where 1 IOTA
equals 1_000_000_000 NANOS. That amount is split from the gas coin and
sent.
set_sender
def set_sender(sender: "Address") -> None
Set the sender address.
split_coins
def split_coins(
coin: "PtbArgument",
amounts: "typing.List[PtbArgument]",
names: "typing.Union[object, typing.List[str]]" = _DEFAULT
) -> "TransactionBuilder"
Split a coin by the provided amounts.
sponsor
def sponsor(sponsor: "Address") -> "TransactionBuilder"
Set the sponsor of the transaction.
stake
def stake(stake: "PtbArgument",
validator_address: "Address") -> "TransactionBuilder"
Add stake to a validator's staking pool.
This is a high-level function which will split the provided stake amount from the gas coin and then stake using the resulting coin.
transfer_objects
def transfer_objects(
recipient: "Address",
objects: "typing.List[PtbArgument]") -> "TransactionBuilder"
Transfer a list of objects to the given address, without producing any result.
unstake
def unstake(staked_iota: "PtbArgument") -> "TransactionBuilder"
Withdraw stake from a validator's staking pool.
upgrade
def upgrade(
package_id: "ObjectId",
package_data: "MovePackageData",
upgrade_ticket: "PtbArgument",
name: "typing.Union[object, typing.Optional[str]]" = _DEFAULT
) -> "TransactionBuilder"
Upgrade a Move package.
modules: is the modules' bytecode for the modules to be publisheddependencies: is the list of IDs of the transitive dependencies of the package to be upgradedpackage: is the ID of the current package being upgradedticket: is the upgrade ticket
To get the ticket, you have to call the
0x2::package::authorize_upgrade function, and pass the package
ID, the upgrade policy, and package digest.
TransactionEffectsProtocol Objects
class TransactionEffectsProtocol(typing.Protocol)
The output or effects of executing a transaction
BCS
The BCS serialized form for this type is defined by the following ABNF:
transaction-effects = %x00 effects-v1
=/ %x01 effects-v2
TransactionEffects Objects
class TransactionEffects()
The output or effects of executing a transaction
BCS
The BCS serialized form for this type is defined by the following ABNF:
transaction-effects = %x00 effects-v1
=/ %x01 effects-v2
TransactionEventsProtocol Objects
class TransactionEventsProtocol(typing.Protocol)
Events emitted during the successful execution of a transaction
BCS
The BCS serialized form for this type is defined by the following ABNF:
transaction-events = vector event
TransactionEvents Objects
class TransactionEvents()
Events emitted during the successful execution of a transaction
BCS
The BCS serialized form for this type is defined by the following ABNF:
transaction-events = vector event
TransactionKindProtocol Objects
class TransactionKindProtocol(typing.Protocol)
Transaction type
BCS
The BCS serialized form for this type is defined by the following ABNF:
transaction-kind = %x00 ptb
=/ %x01 change-epoch
=/ %x02 genesis-transaction
=/ %x03 consensus-commit-prologue
=/ %x04 authenticator-state-update
=/ %x05 (vector end-of-epoch-transaction-kind)
=/ %x06 randomness-state-update
=/ %x07 consensus-commit-prologue-v2
=/ %x08 consensus-commit-prologue-v3
TransactionKind Objects
class TransactionKind()
Transaction type
BCS
The BCS serialized form for this type is defined by the following ABNF:
transaction-kind = %x00 ptb
=/ %x01 change-epoch
=/ %x02 genesis-transaction
=/ %x03 consensus-commit-prologue
=/ %x04 authenticator-state-update
=/ %x05 (vector end-of-epoch-transaction-kind)
=/ %x06 randomness-state-update
=/ %x07 consensus-commit-prologue-v2
=/ %x08 consensus-commit-prologue-v3
TransactionSignerProtocol Objects
class TransactionSignerProtocol(typing.Protocol)
An async signer implementation which wraps a TransactionSignerFn
definition, which can be used to sign a transaction with a callback.
TransactionSigner Objects
class TransactionSigner()
An async signer implementation which wraps a TransactionSignerFn
definition, which can be used to sign a transaction with a callback.
TransactionV1Protocol Objects
class TransactionV1Protocol(typing.Protocol)
A transaction
BCS
The BCS serialized form for this type is defined by the following ABNF:
transaction = %x00 transaction-v1
transaction-v1 = transaction-kind address gas-payment transaction-expiration
signing_digest
def signing_digest()
Get the signing digest.
signing_digest_hex
def signing_digest_hex()
Get the signing digest as a hex string.
to_base64
def to_base64()
Serialize the transaction as a base64-encoded string.
TransactionV1 Objects
class TransactionV1()
A transaction
BCS
The BCS serialized form for this type is defined by the following ABNF:
transaction = %x00 transaction-v1
transaction-v1 = transaction-kind address gas-payment transaction-expiration
from_base64
@classmethod
def from_base64(cls, bytes: "str")
Deserialize a transaction from a base64-encoded string.
signing_digest
def signing_digest() -> "bytes"
Get the signing digest.
signing_digest_hex
def signing_digest_hex() -> "str"
Get the signing digest as a hex string.
to_base64
def to_base64() -> "str"
Serialize the transaction as a base64-encoded string.
TransferObjectsProtocol Objects
class TransferObjectsProtocol(typing.Protocol)
Command to transfer ownership of a set of objects to an address
BCS
The BCS serialized form for this type is defined by the following ABNF:
transfer-objects = (vector argument) argument
address
def address()
The address to transfer ownership to
objects
def objects()
Set of objects to transfer
TransferObjects Objects
class TransferObjects()
Command to transfer ownership of a set of objects to an address
BCS
The BCS serialized form for this type is defined by the following ABNF:
transfer-objects = (vector argument) argument
address
def address() -> "Argument"
The address to transfer ownership to
objects
def objects() -> "typing.List[Argument]"
Set of objects to transfer
TypeTagProtocol Objects
class TypeTagProtocol(typing.Protocol)
Type of a move value
BCS
The BCS serialized form for this type is defined by the following ABNF:
type-tag = type-tag-u8 type-tag-u16 type-tag-u32 type-tag-u64 type-tag-u128 type-tag-u256 type-tag-bool type-tag-address type-tag-signer type-tag-vector type-tag-struct
type-tag-u8 = %x01
type-tag-u16 = %x08
type-tag-u32 = %x09
type-tag-u64 = %x02
type-tag-u128 = %x03
type-tag-u256 = %x0a
type-tag-bool = %x00
type-tag-address = %x04
type-tag-signer = %x05
type-tag-vector = %x06 type-tag
type-tag-struct = %x07 struct-tag
to_canonical_string
def to_canonical_string(with_prefix: "bool")
Returns the string representation of this type tag using the
canonical display, with or without a 0x prefix.
TypeTag Objects
class TypeTag()
Type of a move value
BCS
The BCS serialized form for this type is defined by the following ABNF:
type-tag = type-tag-u8 type-tag-u16 type-tag-u32 type-tag-u64 type-tag-u128 type-tag-u256 type-tag-bool type-tag-address type-tag-signer type-tag-vector type-tag-struct
type-tag-u8 = %x01
type-tag-u16 = %x08
type-tag-u32 = %x09
type-tag-u64 = %x02
type-tag-u128 = %x03
type-tag-u256 = %x0a
type-tag-bool = %x00
type-tag-address = %x04
type-tag-signer = %x05
type-tag-vector = %x06 type-tag
type-tag-struct = %x07 struct-tag
to_canonical_string
def to_canonical_string(with_prefix: "bool") -> "str"
Returns the string representation of this type tag using the
canonical display, with or without a 0x prefix.
UpgradeProtocol Objects
class UpgradeProtocol(typing.Protocol)
Command to upgrade an already published package
BCS
The BCS serialized form for this type is defined by the following ABNF:
upgrade = (vector bytes) ; move modules
(vector object-id) ; dependencies
object-id ; package-id of the package
argument ; upgrade ticket
dependencies
def dependencies()
Set of packages that the to-be published package depends on
modules
def modules()
The serialized move modules
package
def package()
Package id of the package to upgrade
ticket
def ticket()
Ticket authorizing the upgrade
Upgrade Objects
class Upgrade()
Command to upgrade an already published package
BCS
The BCS serialized form for this type is defined by the following ABNF:
upgrade = (vector bytes) ; move modules
(vector object-id) ; dependencies
object-id ; package-id of the package
argument ; upgrade ticket
dependencies
def dependencies() -> "typing.List[ObjectId]"
Set of packages that the to-be published package depends on
modules
def modules() -> "typing.List[bytes]"
The serialized move modules
package
def package() -> "ObjectId"
Package id of the package to upgrade
ticket
def ticket() -> "Argument"
Ticket authorizing the upgrade
UpgradePolicyProtocol Objects
class UpgradePolicyProtocol(typing.Protocol)
Representation of upgrade policy constants in iota::package.
as_u8
def as_u8()
Returns the internal representation.
UpgradePolicy Objects
class UpgradePolicy()
Representation of upgrade policy constants in iota::package.
additive
@classmethod
def additive(cls)
Allows adding new functionalities (e.g., new public functions or structs) but restricts changes to existing functionalities.
compatible
@classmethod
def compatible(cls)
The least restrictive policy. Permits changes to all function implementations, the removal of ability constraints on generic type parameters in function signatures, and modifications to private, public(friend), and entry function signatures. However, public function signatures and existing types cannot be changed.
dep_only
@classmethod
def dep_only(cls)
Limits modifications to the package’s dependencies only.
as_u8
def as_u8() -> "int"
Returns the internal representation.
UserSignatureProtocol Objects
class UserSignatureProtocol(typing.Protocol)
A signature from a user
A UserSignature is most commonly used to authorize the execution and
inclusion of a transaction to the blockchain.
BCS
The BCS serialized form for this type is defined by the following ABNF:
Note: Due to historical reasons, signatures are serialized slightly
different from the majority of the types in IOTA. In particular if a
signature is ever embedded in another structure it generally is serialized
as bytes meaning it has a length prefix that defines the length of
the completely serialized signature.
user-signature-bcs = bytes ; where the contents of the bytes are defined by <user-signature>
user-signature = simple-signature / multisig / multisig-legacy / zklogin / passkey / move-authenticator
scheme
def scheme()
Return the flag for this signature scheme
UserSignature Objects
class UserSignature()
A signature from a user
A UserSignature is most commonly used to authorize the execution and
inclusion of a transaction to the blockchain.
BCS
The BCS serialized form for this type is defined by the following ABNF:
Note: Due to historical reasons, signatures are serialized slightly
different from the majority of the types in IOTA. In particular if a
signature is ever embedded in another structure it generally is serialized
as bytes meaning it has a length prefix that defines the length of
the completely serialized signature.
user-signature-bcs = bytes ; where the contents of the bytes are defined by <user-signature>
user-signature = simple-signature / multisig / multisig-legacy / zklogin / passkey / move-authenticator
scheme
def scheme() -> "SignatureScheme"
Return the flag for this signature scheme
UserSignatureVerifierProtocol Objects
class UserSignatureVerifierProtocol(typing.Protocol)
Verifier that will verify all UserSignature variants
UserSignatureVerifier Objects
class UserSignatureVerifier()
Verifier that will verify all UserSignature variants
ValidatorAggregatedSignatureProtocol Objects
class ValidatorAggregatedSignatureProtocol(typing.Protocol)
An aggregated signature from multiple Validators.
BCS
The BCS serialized form for this type is defined by the following ABNF:
validator-aggregated-signature = u64 ; epoch
bls-signature
roaring-bitmap
roaring-bitmap = bytes ; where the contents of the bytes are valid
; according to the serialized spec for
; roaring bitmaps
See <https://github.com/RoaringBitmap/RoaringFormatSpec> for the specification for the serialized format of RoaringBitmaps.
ValidatorAggregatedSignature Objects
class ValidatorAggregatedSignature()
An aggregated signature from multiple Validators.
BCS
The BCS serialized form for this type is defined by the following ABNF:
validator-aggregated-signature = u64 ; epoch
bls-signature
roaring-bitmap
roaring-bitmap = bytes ; where the contents of the bytes are valid
; according to the serialized spec for
; roaring bitmaps
See <https://github.com/RoaringBitmap/RoaringFormatSpec> for the specification for the serialized format of RoaringBitmaps.
ValidatorExecutionTimeObservationProtocol Objects
class ValidatorExecutionTimeObservationProtocol(typing.Protocol)
An execution time observation from a particular validator
BCS
The BCS serialized form for this type is defined by the following ABNF:
execution-time-observation = bls-public-key duration
duration = u64 ; seconds
u32 ; subsecond nanoseconds
ValidatorExecutionTimeObservation Objects
class ValidatorExecutionTimeObservation()
An execution time observation from a particular validator
BCS
The BCS serialized form for this type is defined by the following ABNF:
execution-time-observation = bls-public-key duration
duration = u64 ; seconds
u32 ; subsecond nanoseconds
ValidatorSignatureProtocol Objects
class ValidatorSignatureProtocol(typing.Protocol)
A signature from a Validator
BCS
The BCS serialized form for this type is defined by the following ABNF:
validator-signature = u64 ; epoch
bls-public-key
bls-signature
ValidatorSignature Objects
class ValidatorSignature()
A signature from a Validator
BCS
The BCS serialized form for this type is defined by the following ABNF:
validator-signature = u64 ; epoch
bls-public-key
bls-signature
VersionAssignmentProtocol Objects
class VersionAssignmentProtocol(typing.Protocol)
Object version assignment from consensus
BCS
The BCS serialized form for this type is defined by the following ABNF:
version-assignment = object-id u64
VersionAssignment Objects
class VersionAssignment()
Object version assignment from consensus
BCS
The BCS serialized form for this type is defined by the following ABNF:
version-assignment = object-id u64
ZkLoginAuthenticatorProtocol Objects
class ZkLoginAuthenticatorProtocol(typing.Protocol)
A zklogin authenticator
BCS
The BCS serialized form for this type is defined by the following ABNF:
Note: Due to historical reasons, signatures are serialized slightly
different from the majority of the types in IOTA. In particular if a
signature is ever embedded in another structure it generally is serialized
as bytes meaning it has a length prefix that defines the length of
the completely serialized signature.
zklogin-bcs = bytes ; contents are defined by <zklogin-authenticator>
zklogin = zklogin-flag
zklogin-inputs
u64 ; max epoch
simple-signature
ZkLoginAuthenticator Objects
class ZkLoginAuthenticator()
A zklogin authenticator
BCS
The BCS serialized form for this type is defined by the following ABNF:
Note: Due to historical reasons, signatures are serialized slightly
different from the majority of the types in IOTA. In particular if a
signature is ever embedded in another structure it generally is serialized
as bytes meaning it has a length prefix that defines the length of
the completely serialized signature.
zklogin-bcs = bytes ; contents are defined by <zklogin-authenticator>
zklogin = zklogin-flag
zklogin-inputs
u64 ; max epoch
simple-signature
ZkLoginInputsProtocol Objects
class ZkLoginInputsProtocol(typing.Protocol)
A zklogin groth16 proof and the required inputs to perform proof verification.
BCS
The BCS serialized form for this type is defined by the following ABNF:
zklogin-inputs = zklogin-proof
zklogin-claim
string ; base64url-unpadded encoded JwtHeader
bn254-field-element ; address_seed
ZkLoginInputs Objects
class ZkLoginInputs()
A zklogin groth16 proof and the required inputs to perform proof verification.
BCS
The BCS serialized form for this type is defined by the following ABNF:
zklogin-inputs = zklogin-proof
zklogin-claim
string ; base64url-unpadded encoded JwtHeader
bn254-field-element ; address_seed
ZkLoginProofProtocol Objects
class ZkLoginProofProtocol(typing.Protocol)
A zklogin groth16 proof
BCS
The BCS serialized form for this type is defined by the following ABNF:
zklogin-proof = circom-g1 circom-g2 circom-g1
ZkLoginProof Objects
class ZkLoginProof()
A zklogin groth16 proof
BCS
The BCS serialized form for this type is defined by the following ABNF:
zklogin-proof = circom-g1 circom-g2 circom-g1
ZkLoginPublicIdentifierProtocol Objects
class ZkLoginPublicIdentifierProtocol(typing.Protocol)
Public Key equivalent for Zklogin authenticators
A ZkLoginPublicIdentifier is the equivalent of a public key for other
account authenticators, and contains the information required to derive the
onchain account Address for a Zklogin authenticator.
Note
Due to a historical bug that was introduced in the IOTA Typescript SDK when
the zklogin authenticator was first introduced, there are now possibly two
"valid" addresses for each zklogin authenticator depending on the
bit-pattern of the address_seed value.
The original bug incorrectly derived a zklogin's address by stripping any
leading zero-bytes that could have been present in the 32-byte length
address_seed value prior to hashing, leading to a different derived
address. This incorrectly derived address was presented to users of various
wallets, leading them to sending funds to these addresses that they couldn't
access. Instead of letting these users lose any assets that were sent to
these addresses, the IOTA network decided to change the protocol to allow
for a zklogin authenticator who's address_seed value had leading
zero-bytes be authorized to sign for both the addresses derived from both
the unpadded and padded address_seed value.
BCS
The BCS serialized form for this type is defined by the following ABNF:
zklogin-public-identifier-bcs = bytes ; where the contents are defined by
; <zklogin-public-identifier>
zklogin-public-identifier = zklogin-public-identifier-iss
address-seed
zklogin-public-identifier-unpadded = zklogin-public-identifier-iss
address-seed-unpadded
; The iss, or issuer, is a utf8 string that is less than 255 bytes long
; and is serialized with the iss's length in bytes as a u8 followed by
; the bytes of the iss
zklogin-public-identifier-iss = u8 *255(OCTET)
; A Bn254FieldElement serialized as a 32-byte big-endian value
address-seed = 32(OCTET)
; A Bn254FieldElement serialized as a 32-byte big-endian value
; with any leading zero bytes stripped
address-seed-unpadded = %x00 / %x01-ff *31(OCTET)
derive_address
def derive_address()
Provides an iterator over the addresses that correspond to this zklogin authenticator.
In the majority of instances this will only yield a single address,
except for the instances where the address_seed value has a
leading zero-byte, in such cases the returned iterator will yield
two addresses.
derive_address_padded
def derive_address_padded()
Derive an Address from this ZkLoginPublicIdentifier by hashing the
byte length of the iss followed by the iss bytes themselves and
the full 32 byte address_seed value, all prefixed with the zklogin
SignatureScheme flag (0x05).
hash( 0x05 || iss_bytes_len || iss_bytes || 32_byte_address_seed )
derive_address_unpadded
def derive_address_unpadded()
Derive an Address from this ZkLoginPublicIdentifier by hashing the
byte length of the iss followed by the iss bytes themselves and
the address_seed bytes with any leading zero-bytes stripped, all
prefixed with the zklogin SignatureScheme flag (0x05).
hash( 0x05 || iss_bytes_len || iss_bytes || unpadded_32_byte_address_seed )
ZkLoginPublicIdentifier Objects
class ZkLoginPublicIdentifier()
Public Key equivalent for Zklogin authenticators
A ZkLoginPublicIdentifier is the equivalent of a public key for other
account authenticators, and contains the information required to derive the
onchain account Address for a Zklogin authenticator.
Note
Due to a historical bug that was introduced in the IOTA Typescript SDK when
the zklogin authenticator was first introduced, there are now possibly two
"valid" addresses for each zklogin authenticator depending on the
bit-pattern of the address_seed value.
The original bug incorrectly derived a zklogin's address by stripping any
leading zero-bytes that could have been present in the 32-byte length
address_seed value prior to hashing, leading to a different derived
address. This incorrectly derived address was presented to users of various
wallets, leading them to sending funds to these addresses that they couldn't
access. Instead of letting these users lose any assets that were sent to
these addresses, the IOTA network decided to change the protocol to allow
for a zklogin authenticator who's address_seed value had leading
zero-bytes be authorized to sign for both the addresses derived from both
the unpadded and padded address_seed value.
BCS
The BCS serialized form for this type is defined by the following ABNF:
zklogin-public-identifier-bcs = bytes ; where the contents are defined by
; <zklogin-public-identifier>
zklogin-public-identifier = zklogin-public-identifier-iss
address-seed
zklogin-public-identifier-unpadded = zklogin-public-identifier-iss
address-seed-unpadded
; The iss, or issuer, is a utf8 string that is less than 255 bytes long
; and is serialized with the iss's length in bytes as a u8 followed by
; the bytes of the iss
zklogin-public-identifier-iss = u8 *255(OCTET)
; A Bn254FieldElement serialized as a 32-byte big-endian value
address-seed = 32(OCTET)
; A Bn254FieldElement serialized as a 32-byte big-endian value
; with any leading zero bytes stripped
address-seed-unpadded = %x00 / %x01-ff *31(OCTET)
derive_address
def derive_address() -> "typing.List[Address]"
Provides an iterator over the addresses that correspond to this zklogin authenticator.
In the majority of instances this will only yield a single address,
except for the instances where the address_seed value has a
leading zero-byte, in such cases the returned iterator will yield
two addresses.
derive_address_padded
def derive_address_padded() -> "Address"
Derive an Address from this ZkLoginPublicIdentifier by hashing the
byte length of the iss followed by the iss bytes themselves and
the full 32 byte address_seed value, all prefixed with the zklogin
SignatureScheme flag (0x05).
hash( 0x05 || iss_bytes_len || iss_bytes || 32_byte_address_seed )
derive_address_unpadded
def derive_address_unpadded() -> "Address"
Derive an Address from this ZkLoginPublicIdentifier by hashing the
byte length of the iss followed by the iss bytes themselves and
the address_seed bytes with any leading zero-bytes stripped, all
prefixed with the zklogin SignatureScheme flag (0x05).
hash( 0x05 || iss_bytes_len || iss_bytes || unpadded_32_byte_address_seed )
ZkloginVerifier Objects
class ZkloginVerifier()
new_dev
@classmethod
def new_dev(cls)
Load a fixed verifying key from zkLogin.vkey output. This is based on a local setup and should not be used in production.
active_jwk_from_bcs
def active_jwk_from_bcs(bcs: "bytes") -> "ActiveJwk"
Create this type from BCS encoded bytes.
active_jwk_from_json
def active_jwk_from_json(json: "str") -> "ActiveJwk"
Create this type from JSON encoded string.
active_jwk_to_bcs
def active_jwk_to_bcs(data: "ActiveJwk") -> "bytes"
Convert this type to BCS encoded bytes.
active_jwk_to_json
def active_jwk_to_json(data: "ActiveJwk") -> "str"
Convert this type to JSON encoded string.
address_from_bcs
def address_from_bcs(bcs: "bytes") -> "Address"
Create this type from BCS encoded bytes.
address_from_json
def address_from_json(json: "str") -> "Address"
Create this type from JSON encoded string.
address_to_bcs
def address_to_bcs(data: "Address") -> "bytes"
Convert this type to BCS encoded bytes.
address_to_json
def address_to_json(data: "Address") -> "str"
Convert this type to JSON encoded string.
argument_from_bcs
def argument_from_bcs(bcs: "bytes") -> "Argument"
Create this type from BCS encoded bytes.
argument_from_json
def argument_from_json(json: "str") -> "Argument"
Create this type from JSON encoded string.
argument_to_bcs
def argument_to_bcs(data: "Argument") -> "bytes"
Convert this type to BCS encoded bytes.
argument_to_json
def argument_to_json(data: "Argument") -> "str"
Convert this type to JSON encoded string.
authenticator_state_expire_from_bcs
def authenticator_state_expire_from_bcs(
bcs: "bytes") -> "AuthenticatorStateExpire"
Create this type from BCS encoded bytes.
authenticator_state_expire_from_json
def authenticator_state_expire_from_json(
json: "str") -> "AuthenticatorStateExpire"
Create this type from JSON encoded string.
authenticator_state_expire_to_bcs
def authenticator_state_expire_to_bcs(
data: "AuthenticatorStateExpire") -> "bytes"
Convert this type to BCS encoded bytes.
authenticator_state_expire_to_json
def authenticator_state_expire_to_json(
data: "AuthenticatorStateExpire") -> "str"
Convert this type to JSON encoded string.
authenticator_state_update_v1_from_bcs
def authenticator_state_update_v1_from_bcs(
bcs: "bytes") -> "AuthenticatorStateUpdateV1"
Create this type from BCS encoded bytes.
authenticator_state_update_v1_from_json
def authenticator_state_update_v1_from_json(
json: "str") -> "AuthenticatorStateUpdateV1"
Create this type from JSON encoded string.
authenticator_state_update_v1_to_bcs
def authenticator_state_update_v1_to_bcs(
data: "AuthenticatorStateUpdateV1") -> "bytes"
Convert this type to BCS encoded bytes.
authenticator_state_update_v1_to_json
def authenticator_state_update_v1_to_json(
data: "AuthenticatorStateUpdateV1") -> "str"
Convert this type to JSON encoded string.
bls12381_public_key_from_bcs
def bls12381_public_key_from_bcs(bcs: "bytes") -> "Bls12381PublicKey"
Create this type from BCS encoded bytes.
bls12381_public_key_from_json
def bls12381_public_key_from_json(json: "str") -> "Bls12381PublicKey"
Create this type from JSON encoded string.
bls12381_public_key_to_bcs
def bls12381_public_key_to_bcs(data: "Bls12381PublicKey") -> "bytes"
Convert this type to BCS encoded bytes.
bls12381_public_key_to_json
def bls12381_public_key_to_json(data: "Bls12381PublicKey") -> "str"
Convert this type to JSON encoded string.
bls12381_signature_from_bcs
def bls12381_signature_from_bcs(bcs: "bytes") -> "Bls12381Signature"
Create this type from BCS encoded bytes.
bls12381_signature_from_json
def bls12381_signature_from_json(json: "str") -> "Bls12381Signature"
Create this type from JSON encoded string.
bls12381_signature_to_bcs
def bls12381_signature_to_bcs(data: "Bls12381Signature") -> "bytes"
Convert this type to BCS encoded bytes.
bls12381_signature_to_json
def bls12381_signature_to_json(data: "Bls12381Signature") -> "str"
Convert this type to JSON encoded string.
bn254_field_element_from_bcs
def bn254_field_element_from_bcs(bcs: "bytes") -> "Bn254FieldElement"
Create this type from BCS encoded bytes.
bn254_field_element_from_json
def bn254_field_element_from_json(json: "str") -> "Bn254FieldElement"
Create this type from JSON encoded string.
bn254_field_element_to_bcs
def bn254_field_element_to_bcs(data: "Bn254FieldElement") -> "bytes"
Convert this type to BCS encoded bytes.
bn254_field_element_to_json
def bn254_field_element_to_json(data: "Bn254FieldElement") -> "str"
Convert this type to JSON encoded string.
bool_from_bcs
def bool_from_bcs(input: "bytes") -> "bool"
Create a bool from BCS encoded bytes.
bool_from_json
def bool_from_json(input: "str") -> "bool"
Create a bool from JSON encoded string.
bool_to_bcs
def bool_to_bcs(input: "bool") -> "bytes"
Convert this bool to BCS encoded bytes.
bool_to_json
def bool_to_json(input: "bool") -> "str"
Convert this bool to JSON encoded string.
cancelled_transaction_from_bcs
def cancelled_transaction_from_bcs(bcs: "bytes") -> "CancelledTransaction"
Create this type from BCS encoded bytes.
cancelled_transaction_from_json
def cancelled_transaction_from_json(json: "str") -> "CancelledTransaction"
Create this type from JSON encoded string.
cancelled_transaction_to_bcs
def cancelled_transaction_to_bcs(data: "CancelledTransaction") -> "bytes"
Convert this type to BCS encoded bytes.
cancelled_transaction_to_json
def cancelled_transaction_to_json(data: "CancelledTransaction") -> "str"
Convert this type to JSON encoded string.
change_epoch_from_bcs
def change_epoch_from_bcs(bcs: "bytes") -> "ChangeEpoch"
Create this type from BCS encoded bytes.
change_epoch_from_json
def change_epoch_from_json(json: "str") -> "ChangeEpoch"
Create this type from JSON encoded string.
change_epoch_to_bcs
def change_epoch_to_bcs(data: "ChangeEpoch") -> "bytes"
Convert this type to BCS encoded bytes.
change_epoch_to_json
def change_epoch_to_json(data: "ChangeEpoch") -> "str"
Convert this type to JSON encoded string.
change_epoch_v2_from_bcs
def change_epoch_v2_from_bcs(bcs: "bytes") -> "ChangeEpochV2"
Create this type from BCS encoded bytes.
change_epoch_v2_from_json
def change_epoch_v2_from_json(json: "str") -> "ChangeEpochV2"
Create this type from JSON encoded string.
change_epoch_v2_to_bcs
def change_epoch_v2_to_bcs(data: "ChangeEpochV2") -> "bytes"
Convert this type to BCS encoded bytes.
change_epoch_v2_to_json
def change_epoch_v2_to_json(data: "ChangeEpochV2") -> "str"
Convert this type to JSON encoded string.
changed_object_from_bcs
def changed_object_from_bcs(bcs: "bytes") -> "ChangedObject"
Create this type from BCS encoded bytes.
changed_object_from_json
def changed_object_from_json(json: "str") -> "ChangedObject"
Create this type from JSON encoded string.
changed_object_to_bcs
def changed_object_to_bcs(data: "ChangedObject") -> "bytes"
Convert this type to BCS encoded bytes.
changed_object_to_json
def changed_object_to_json(data: "ChangedObject") -> "str"
Convert this type to JSON encoded string.
checkpoint_commitment_from_bcs
def checkpoint_commitment_from_bcs(bcs: "bytes") -> "CheckpointCommitment"
Create this type from BCS encoded bytes.
checkpoint_commitment_from_json
def checkpoint_commitment_from_json(json: "str") -> "CheckpointCommitment"
Create this type from JSON encoded string.
checkpoint_commitment_to_bcs
def checkpoint_commitment_to_bcs(data: "CheckpointCommitment") -> "bytes"
Convert this type to BCS encoded bytes.
checkpoint_commitment_to_json
def checkpoint_commitment_to_json(data: "CheckpointCommitment") -> "str"
Convert this type to JSON encoded string.
checkpoint_contents_from_bcs
def checkpoint_contents_from_bcs(bcs: "bytes") -> "CheckpointContents"
Create this type from BCS encoded bytes.
checkpoint_contents_from_json
def checkpoint_contents_from_json(json: "str") -> "CheckpointContents"
Create this type from JSON encoded string.
checkpoint_contents_to_bcs
def checkpoint_contents_to_bcs(data: "CheckpointContents") -> "bytes"
Convert this type to BCS encoded bytes.
checkpoint_contents_to_json
def checkpoint_contents_to_json(data: "CheckpointContents") -> "str"
Convert this type to JSON encoded string.
checkpoint_summary_from_bcs
def checkpoint_summary_from_bcs(bcs: "bytes") -> "CheckpointSummary"
Create this type from BCS encoded bytes.
checkpoint_summary_from_json
def checkpoint_summary_from_json(json: "str") -> "CheckpointSummary"
Create this type from JSON encoded string.
checkpoint_summary_to_bcs
def checkpoint_summary_to_bcs(data: "CheckpointSummary") -> "bytes"
Convert this type to BCS encoded bytes.
checkpoint_summary_to_json
def checkpoint_summary_to_json(data: "CheckpointSummary") -> "str"
Convert this type to JSON encoded string.
checkpoint_transaction_info_from_bcs
def checkpoint_transaction_info_from_bcs(
bcs: "bytes") -> "CheckpointTransactionInfo"
Create this type from BCS encoded bytes.
checkpoint_transaction_info_from_json
def checkpoint_transaction_info_from_json(
json: "str") -> "CheckpointTransactionInfo"
Create this type from JSON encoded string.
checkpoint_transaction_info_to_bcs
def checkpoint_transaction_info_to_bcs(
data: "CheckpointTransactionInfo") -> "bytes"
Convert this type to BCS encoded bytes.
checkpoint_transaction_info_to_json
def checkpoint_transaction_info_to_json(
data: "CheckpointTransactionInfo") -> "str"
Convert this type to JSON encoded string.
circom_g1_from_bcs
def circom_g1_from_bcs(bcs: "bytes") -> "CircomG1"
Create this type from BCS encoded bytes.
circom_g1_from_json
def circom_g1_from_json(json: "str") -> "CircomG1"
Create this type from JSON encoded string.
circom_g1_to_bcs
def circom_g1_to_bcs(data: "CircomG1") -> "bytes"
Convert this type to BCS encoded bytes.
circom_g1_to_json
def circom_g1_to_json(data: "CircomG1") -> "str"
Convert this type to JSON encoded string.
circom_g2_from_bcs
def circom_g2_from_bcs(bcs: "bytes") -> "CircomG2"
Create this type from BCS encoded bytes.
circom_g2_from_json
def circom_g2_from_json(json: "str") -> "CircomG2"
Create this type from JSON encoded string.
circom_g2_to_bcs
def circom_g2_to_bcs(data: "CircomG2") -> "bytes"
Convert this type to BCS encoded bytes.
circom_g2_to_json
def circom_g2_to_json(data: "CircomG2") -> "str"
Convert this type to JSON encoded string.
command_argument_error_from_bcs
def command_argument_error_from_bcs(bcs: "bytes") -> "CommandArgumentError"
Create this type from BCS encoded bytes.
command_argument_error_from_json
def command_argument_error_from_json(json: "str") -> "CommandArgumentError"
Create this type from JSON encoded string.
command_argument_error_to_bcs
def command_argument_error_to_bcs(data: "CommandArgumentError") -> "bytes"
Convert this type to BCS encoded bytes.
command_argument_error_to_json
def command_argument_error_to_json(data: "CommandArgumentError") -> "str"
Convert this type to JSON encoded string.
command_from_bcs
def command_from_bcs(bcs: "bytes") -> "Command"
Create this type from BCS encoded bytes.
command_from_json
def command_from_json(json: "str") -> "Command"
Create this type from JSON encoded string.
command_to_bcs
def command_to_bcs(data: "Command") -> "bytes"
Convert this type to BCS encoded bytes.
command_to_json
def command_to_json(data: "Command") -> "str"
Convert this type to JSON encoded string.
consensus_commit_prologue_v1_from_bcs
def consensus_commit_prologue_v1_from_bcs(
bcs: "bytes") -> "ConsensusCommitPrologueV1"
Create this type from BCS encoded bytes.
consensus_commit_prologue_v1_from_json
def consensus_commit_prologue_v1_from_json(
json: "str") -> "ConsensusCommitPrologueV1"
Create this type from JSON encoded string.
consensus_commit_prologue_v1_to_bcs
def consensus_commit_prologue_v1_to_bcs(
data: "ConsensusCommitPrologueV1") -> "bytes"
Convert this type to BCS encoded bytes.
consensus_commit_prologue_v1_to_json
def consensus_commit_prologue_v1_to_json(
data: "ConsensusCommitPrologueV1") -> "str"
Convert this type to JSON encoded string.
consensus_determined_version_assignments_from_bcs
def consensus_determined_version_assignments_from_bcs(
bcs: "bytes") -> "ConsensusDeterminedVersionAssignments"
Create this type from BCS encoded bytes.
consensus_determined_version_assignments_from_json
def consensus_determined_version_assignments_from_json(
json: "str") -> "ConsensusDeterminedVersionAssignments"
Create this type from JSON encoded string.
consensus_determined_version_assignments_to_bcs
def consensus_determined_version_assignments_to_bcs(
data: "ConsensusDeterminedVersionAssignments") -> "bytes"
Convert this type to BCS encoded bytes.
consensus_determined_version_assignments_to_json
def consensus_determined_version_assignments_to_json(
data: "ConsensusDeterminedVersionAssignments") -> "str"
Convert this type to JSON encoded string.
digest_from_bcs
def digest_from_bcs(bcs: "bytes") -> "Digest"
Create this type from BCS encoded bytes.
digest_from_json
def digest_from_json(json: "str") -> "Digest"
Create this type from JSON encoded string.
digest_to_bcs
def digest_to_bcs(data: "Digest") -> "bytes"
Convert this type to BCS encoded bytes.
digest_to_json
def digest_to_json(data: "Digest") -> "str"
Convert this type to JSON encoded string.
ed25519_public_key_from_bcs
def ed25519_public_key_from_bcs(bcs: "bytes") -> "Ed25519PublicKey"
Create this type from BCS encoded bytes.
ed25519_public_key_from_json
def ed25519_public_key_from_json(json: "str") -> "Ed25519PublicKey"
Create this type from JSON encoded string.
ed25519_public_key_to_bcs
def ed25519_public_key_to_bcs(data: "Ed25519PublicKey") -> "bytes"
Convert this type to BCS encoded bytes.
ed25519_public_key_to_json
def ed25519_public_key_to_json(data: "Ed25519PublicKey") -> "str"
Convert this type to JSON encoded string.
ed25519_signature_from_bcs
def ed25519_signature_from_bcs(bcs: "bytes") -> "Ed25519Signature"
Create this type from BCS encoded bytes.
ed25519_signature_from_json
def ed25519_signature_from_json(json: "str") -> "Ed25519Signature"
Create this type from JSON encoded string.
ed25519_signature_to_bcs
def ed25519_signature_to_bcs(data: "Ed25519Signature") -> "bytes"
Convert this type to BCS encoded bytes.
ed25519_signature_to_json
def ed25519_signature_to_json(data: "Ed25519Signature") -> "str"
Convert this type to JSON encoded string.
end_of_epoch_data_from_bcs
def end_of_epoch_data_from_bcs(bcs: "bytes") -> "EndOfEpochData"
Create this type from BCS encoded bytes.
end_of_epoch_data_from_json
def end_of_epoch_data_from_json(json: "str") -> "EndOfEpochData"
Create this type from JSON encoded string.
end_of_epoch_data_to_bcs
def end_of_epoch_data_to_bcs(data: "EndOfEpochData") -> "bytes"
Convert this type to BCS encoded bytes.
end_of_epoch_data_to_json
def end_of_epoch_data_to_json(data: "EndOfEpochData") -> "str"
Convert this type to JSON encoded string.
event_from_bcs
def event_from_bcs(bcs: "bytes") -> "Event"
Create this type from BCS encoded bytes.
event_from_json
def event_from_json(json: "str") -> "Event"
Create this type from JSON encoded string.
event_to_bcs
def event_to_bcs(data: "Event") -> "bytes"
Convert this type to BCS encoded bytes.
event_to_json
def event_to_json(data: "Event") -> "str"
Convert this type to JSON encoded string.
execution_error_from_bcs
def execution_error_from_bcs(bcs: "bytes") -> "ExecutionError"
Create this type from BCS encoded bytes.
execution_error_from_json
def execution_error_from_json(json: "str") -> "ExecutionError"
Create this type from JSON encoded string.
execution_error_to_bcs
def execution_error_to_bcs(data: "ExecutionError") -> "bytes"
Convert this type to BCS encoded bytes.
execution_error_to_json
def execution_error_to_json(data: "ExecutionError") -> "str"
Convert this type to JSON encoded string.
execution_status_from_bcs
def execution_status_from_bcs(bcs: "bytes") -> "ExecutionStatus"
Create this type from BCS encoded bytes.
execution_status_from_json
def execution_status_from_json(json: "str") -> "ExecutionStatus"
Create this type from JSON encoded string.
execution_status_to_bcs
def execution_status_to_bcs(data: "ExecutionStatus") -> "bytes"
Convert this type to BCS encoded bytes.
execution_status_to_json
def execution_status_to_json(data: "ExecutionStatus") -> "str"
Convert this type to JSON encoded string.
execution_time_observation_from_bcs
def execution_time_observation_from_bcs(
bcs: "bytes") -> "ExecutionTimeObservation"
Create this type from BCS encoded bytes.
execution_time_observation_from_json
def execution_time_observation_from_json(
json: "str") -> "ExecutionTimeObservation"
Create this type from JSON encoded string.
execution_time_observation_key_from_bcs
def execution_time_observation_key_from_bcs(
bcs: "bytes") -> "ExecutionTimeObservationKey"
Create this type from BCS encoded bytes.
execution_time_observation_key_from_json
def execution_time_observation_key_from_json(
json: "str") -> "ExecutionTimeObservationKey"
Create this type from JSON encoded string.
execution_time_observation_key_to_bcs
def execution_time_observation_key_to_bcs(
data: "ExecutionTimeObservationKey") -> "bytes"
Convert this type to BCS encoded bytes.
execution_time_observation_key_to_json
def execution_time_observation_key_to_json(
data: "ExecutionTimeObservationKey") -> "str"
Convert this type to JSON encoded string.
execution_time_observation_to_bcs
def execution_time_observation_to_bcs(
data: "ExecutionTimeObservation") -> "bytes"
Convert this type to BCS encoded bytes.
execution_time_observation_to_json
def execution_time_observation_to_json(
data: "ExecutionTimeObservation") -> "str"
Convert this type to JSON encoded string.
execution_time_observations_from_bcs
def execution_time_observations_from_bcs(
bcs: "bytes") -> "ExecutionTimeObservations"
Create this type from BCS encoded bytes.
execution_time_observations_from_json
def execution_time_observations_from_json(
json: "str") -> "ExecutionTimeObservations"
Create this type from JSON encoded string.
execution_time_observations_to_bcs
def execution_time_observations_to_bcs(
data: "ExecutionTimeObservations") -> "bytes"
Convert this type to BCS encoded bytes.
execution_time_observations_to_json
def execution_time_observations_to_json(
data: "ExecutionTimeObservations") -> "str"
Convert this type to JSON encoded string.
gas_cost_summary_from_bcs
def gas_cost_summary_from_bcs(bcs: "bytes") -> "GasCostSummary"
Create this type from BCS encoded bytes.
gas_cost_summary_from_json
def gas_cost_summary_from_json(json: "str") -> "GasCostSummary"
Create this type from JSON encoded string.
gas_cost_summary_to_bcs
def gas_cost_summary_to_bcs(data: "GasCostSummary") -> "bytes"
Convert this type to BCS encoded bytes.
gas_cost_summary_to_json
def gas_cost_summary_to_json(data: "GasCostSummary") -> "str"
Convert this type to JSON encoded string.
gas_payment_from_bcs
def gas_payment_from_bcs(bcs: "bytes") -> "GasPayment"
Create this type from BCS encoded bytes.
gas_payment_from_json
def gas_payment_from_json(json: "str") -> "GasPayment"
Create this type from JSON encoded string.
gas_payment_to_bcs
def gas_payment_to_bcs(data: "GasPayment") -> "bytes"
Convert this type to BCS encoded bytes.
gas_payment_to_json
def gas_payment_to_json(data: "GasPayment") -> "str"
Convert this type to JSON encoded string.
generate_mnemonic
def generate_mnemonic(word_count: "typing.Optional[MnemonicLength]") -> "str"
Generate a new BIP-39 mnemonic in English. Supported word counts are 12 and 24 (default).
genesis_object_from_bcs
def genesis_object_from_bcs(bcs: "bytes") -> "GenesisObject"
Create this type from BCS encoded bytes.
genesis_object_from_json
def genesis_object_from_json(json: "str") -> "GenesisObject"
Create this type from JSON encoded string.
genesis_object_to_bcs
def genesis_object_to_bcs(data: "GenesisObject") -> "bytes"
Convert this type to BCS encoded bytes.
genesis_object_to_json
def genesis_object_to_json(data: "GenesisObject") -> "str"
Convert this type to JSON encoded string.
genesis_transaction_from_bcs
def genesis_transaction_from_bcs(bcs: "bytes") -> "GenesisTransaction"
Create this type from BCS encoded bytes.
genesis_transaction_from_json
def genesis_transaction_from_json(json: "str") -> "GenesisTransaction"
Create this type from JSON encoded string.
genesis_transaction_to_bcs
def genesis_transaction_to_bcs(data: "GenesisTransaction") -> "bytes"
Convert this type to BCS encoded bytes.
genesis_transaction_to_json
def genesis_transaction_to_json(data: "GenesisTransaction") -> "str"
Convert this type to JSON encoded string.
i16_from_bcs
def i16_from_bcs(input: "bytes") -> "int"
Create a i16 from BCS encoded bytes.
i16_from_json
def i16_from_json(input: "str") -> "int"
Create a i16 from JSON encoded string.
i16_to_bcs
def i16_to_bcs(input: "int") -> "bytes"
Convert this i16 to BCS encoded bytes.
i16_to_json
def i16_to_json(input: "int") -> "str"
Convert this i16 to JSON encoded string.
i32_from_bcs
def i32_from_bcs(input: "bytes") -> "int"
Create a i32 from BCS encoded bytes.
i32_from_json
def i32_from_json(input: "str") -> "int"
Create a i32 from JSON encoded string.
i32_to_bcs
def i32_to_bcs(input: "int") -> "bytes"
Convert this i32 to BCS encoded bytes.
i32_to_json
def i32_to_json(input: "int") -> "str"
Convert this i32 to JSON encoded string.
i64_from_bcs
def i64_from_bcs(input: "bytes") -> "int"
Create a i64 from BCS encoded bytes.
i64_from_json
def i64_from_json(input: "str") -> "int"
Create a i64 from JSON encoded string.
i64_to_bcs
def i64_to_bcs(input: "int") -> "bytes"
Convert this i64 to BCS encoded bytes.
i64_to_json
def i64_to_json(input: "int") -> "str"
Convert this i64 to JSON encoded string.
i8_from_bcs
def i8_from_bcs(input: "bytes") -> "int"
Create a i8 from BCS encoded bytes.
i8_from_json
def i8_from_json(input: "str") -> "int"
Create a i8 from JSON encoded string.
i8_to_bcs
def i8_to_bcs(input: "int") -> "bytes"
Convert this i8 to BCS encoded bytes.
i8_to_json
def i8_to_json(input: "int") -> "str"
Convert this i8 to JSON encoded string.
id_operation_from_bcs
def id_operation_from_bcs(bcs: "bytes") -> "IdOperation"
Create this type from BCS encoded bytes.
id_operation_from_json
def id_operation_from_json(json: "str") -> "IdOperation"
Create this type from JSON encoded string.
id_operation_to_bcs
def id_operation_to_bcs(data: "IdOperation") -> "bytes"
Convert this type to BCS encoded bytes.
id_operation_to_json
def id_operation_to_json(data: "IdOperation") -> "str"
Convert this type to JSON encoded string.
identifier_from_bcs
def identifier_from_bcs(bcs: "bytes") -> "Identifier"
Create this type from BCS encoded bytes.
identifier_from_json
def identifier_from_json(json: "str") -> "Identifier"
Create this type from JSON encoded string.
identifier_to_bcs
def identifier_to_bcs(data: "Identifier") -> "bytes"
Convert this type to BCS encoded bytes.
identifier_to_json
def identifier_to_json(data: "Identifier") -> "str"
Convert this type to JSON encoded string.
input_from_bcs
def input_from_bcs(bcs: "bytes") -> "Input"
Create this type from BCS encoded bytes.
input_from_json
def input_from_json(json: "str") -> "Input"
Create this type from JSON encoded string.
input_to_bcs
def input_to_bcs(data: "Input") -> "bytes"
Convert this type to BCS encoded bytes.
input_to_json
def input_to_json(data: "Input") -> "str"
Convert this type to JSON encoded string.
jwk_from_bcs
def jwk_from_bcs(bcs: "bytes") -> "Jwk"
Create this type from BCS encoded bytes.
jwk_from_json
def jwk_from_json(json: "str") -> "Jwk"
Create this type from JSON encoded string.
jwk_id_from_bcs
def jwk_id_from_bcs(bcs: "bytes") -> "JwkId"
Create this type from BCS encoded bytes.
jwk_id_from_json
def jwk_id_from_json(json: "str") -> "JwkId"
Create this type from JSON encoded string.
jwk_id_to_bcs
def jwk_id_to_bcs(data: "JwkId") -> "bytes"
Convert this type to BCS encoded bytes.
jwk_id_to_json
def jwk_id_to_json(data: "JwkId") -> "str"
Convert this type to JSON encoded string.
jwk_to_bcs
def jwk_to_bcs(data: "Jwk") -> "bytes"
Convert this type to BCS encoded bytes.
jwk_to_json
def jwk_to_json(data: "Jwk") -> "str"
Convert this type to JSON encoded string.
make_move_vector_from_bcs
def make_move_vector_from_bcs(bcs: "bytes") -> "MakeMoveVector"
Create this type from BCS encoded bytes.
make_move_vector_from_json
def make_move_vector_from_json(json: "str") -> "MakeMoveVector"
Create this type from JSON encoded string.
make_move_vector_to_bcs
def make_move_vector_to_bcs(data: "MakeMoveVector") -> "bytes"
Convert this type to BCS encoded bytes.
make_move_vector_to_json
def make_move_vector_to_json(data: "MakeMoveVector") -> "str"
Convert this type to JSON encoded string.
merge_coins_from_bcs
def merge_coins_from_bcs(bcs: "bytes") -> "MergeCoins"
Create this type from BCS encoded bytes.
merge_coins_from_json
def merge_coins_from_json(json: "str") -> "MergeCoins"
Create this type from JSON encoded string.
merge_coins_to_bcs
def merge_coins_to_bcs(data: "MergeCoins") -> "bytes"
Convert this type to BCS encoded bytes.
merge_coins_to_json
def merge_coins_to_json(data: "MergeCoins") -> "str"
Convert this type to JSON encoded string.
move_call_from_bcs
def move_call_from_bcs(bcs: "bytes") -> "MoveCall"
Create this type from BCS encoded bytes.
move_call_from_json
def move_call_from_json(json: "str") -> "MoveCall"
Create this type from JSON encoded string.
move_call_to_bcs
def move_call_to_bcs(data: "MoveCall") -> "bytes"
Convert this type to BCS encoded bytes.
move_call_to_json
def move_call_to_json(data: "MoveCall") -> "str"
Convert this type to JSON encoded string.
move_location_from_bcs
def move_location_from_bcs(bcs: "bytes") -> "MoveLocation"
Create this type from BCS encoded bytes.
move_location_from_json
def move_location_from_json(json: "str") -> "MoveLocation"
Create this type from JSON encoded string.
move_location_to_bcs
def move_location_to_bcs(data: "MoveLocation") -> "bytes"
Convert this type to BCS encoded bytes.
move_location_to_json
def move_location_to_json(data: "MoveLocation") -> "str"
Convert this type to JSON encoded string.
move_package_from_bcs
def move_package_from_bcs(bcs: "bytes") -> "MovePackage"
Create this type from BCS encoded bytes.
move_package_from_json
def move_package_from_json(json: "str") -> "MovePackage"
Create this type from JSON encoded string.
move_package_to_bcs
def move_package_to_bcs(data: "MovePackage") -> "bytes"
Convert this type to BCS encoded bytes.
move_package_to_json
def move_package_to_json(data: "MovePackage") -> "str"
Convert this type to JSON encoded string.
move_struct_from_bcs
def move_struct_from_bcs(bcs: "bytes") -> "MoveStruct"
Create this type from BCS encoded bytes.
move_struct_from_json
def move_struct_from_json(json: "str") -> "MoveStruct"
Create this type from JSON encoded string.
move_struct_to_bcs
def move_struct_to_bcs(data: "MoveStruct") -> "bytes"
Convert this type to BCS encoded bytes.
move_struct_to_json
def move_struct_to_json(data: "MoveStruct") -> "str"
Convert this type to JSON encoded string.
multisig_aggregated_signature_from_bcs
def multisig_aggregated_signature_from_bcs(
bcs: "bytes") -> "MultisigAggregatedSignature"
Create this type from BCS encoded bytes.
multisig_aggregated_signature_from_json
def multisig_aggregated_signature_from_json(
json: "str") -> "MultisigAggregatedSignature"
Create this type from JSON encoded string.
multisig_aggregated_signature_to_bcs
def multisig_aggregated_signature_to_bcs(
data: "MultisigAggregatedSignature") -> "bytes"
Convert this type to BCS encoded bytes.
multisig_aggregated_signature_to_json
def multisig_aggregated_signature_to_json(
data: "MultisigAggregatedSignature") -> "str"
Convert this type to JSON encoded string.
multisig_committee_from_bcs
def multisig_committee_from_bcs(bcs: "bytes") -> "MultisigCommittee"
Create this type from BCS encoded bytes.
multisig_committee_from_json
def multisig_committee_from_json(json: "str") -> "MultisigCommittee"
Create this type from JSON encoded string.
multisig_committee_to_bcs
def multisig_committee_to_bcs(data: "MultisigCommittee") -> "bytes"
Convert this type to BCS encoded bytes.
multisig_committee_to_json
def multisig_committee_to_json(data: "MultisigCommittee") -> "str"
Convert this type to JSON encoded string.
multisig_member_from_bcs
def multisig_member_from_bcs(bcs: "bytes") -> "MultisigMember"
Create this type from BCS encoded bytes.
multisig_member_from_json
def multisig_member_from_json(json: "str") -> "MultisigMember"
Create this type from JSON encoded string.
multisig_member_public_key_from_bcs
def multisig_member_public_key_from_bcs(
bcs: "bytes") -> "MultisigMemberPublicKey"
Create this type from BCS encoded bytes.
multisig_member_public_key_from_json
def multisig_member_public_key_from_json(
json: "str") -> "MultisigMemberPublicKey"
Create this type from JSON encoded string.
multisig_member_public_key_to_bcs
def multisig_member_public_key_to_bcs(
data: "MultisigMemberPublicKey") -> "bytes"
Convert this type to BCS encoded bytes.
multisig_member_public_key_to_json
def multisig_member_public_key_to_json(
data: "MultisigMemberPublicKey") -> "str"
Convert this type to JSON encoded string.
multisig_member_signature_from_bcs
def multisig_member_signature_from_bcs(
bcs: "bytes") -> "MultisigMemberSignature"
Create this type from BCS encoded bytes.
multisig_member_signature_from_json
def multisig_member_signature_from_json(
json: "str") -> "MultisigMemberSignature"
Create this type from JSON encoded string.
multisig_member_signature_to_bcs
def multisig_member_signature_to_bcs(
data: "MultisigMemberSignature") -> "bytes"
Convert this type to BCS encoded bytes.
multisig_member_signature_to_json
def multisig_member_signature_to_json(
data: "MultisigMemberSignature") -> "str"
Convert this type to JSON encoded string.
multisig_member_to_bcs
def multisig_member_to_bcs(data: "MultisigMember") -> "bytes"
Convert this type to BCS encoded bytes.
multisig_member_to_json
def multisig_member_to_json(data: "MultisigMember") -> "str"
Convert this type to JSON encoded string.
object_data_from_bcs
def object_data_from_bcs(bcs: "bytes") -> "ObjectData"
Create this type from BCS encoded bytes.
object_data_from_json
def object_data_from_json(json: "str") -> "ObjectData"
Create this type from JSON encoded string.
object_data_to_bcs
def object_data_to_bcs(data: "ObjectData") -> "bytes"
Convert this type to BCS encoded bytes.
object_data_to_json
def object_data_to_json(data: "ObjectData") -> "str"
Convert this type to JSON encoded string.
object_from_bcs
def object_from_bcs(bcs: "bytes") -> "Object"
Create this type from BCS encoded bytes.
object_from_json
def object_from_json(json: "str") -> "Object"
Create this type from JSON encoded string.
object_id_from_bcs
def object_id_from_bcs(bcs: "bytes") -> "ObjectId"
Create this type from BCS encoded bytes.
object_id_from_json
def object_id_from_json(json: "str") -> "ObjectId"
Create this type from JSON encoded string.
object_id_to_bcs
def object_id_to_bcs(data: "ObjectId") -> "bytes"
Convert this type to BCS encoded bytes.
object_id_to_json
def object_id_to_json(data: "ObjectId") -> "str"
Convert this type to JSON encoded string.
object_in_from_bcs
def object_in_from_bcs(bcs: "bytes") -> "ObjectIn"
Create this type from BCS encoded bytes.
object_in_from_json
def object_in_from_json(json: "str") -> "ObjectIn"
Create this type from JSON encoded string.
object_in_to_bcs
def object_in_to_bcs(data: "ObjectIn") -> "bytes"
Convert this type to BCS encoded bytes.
object_in_to_json
def object_in_to_json(data: "ObjectIn") -> "str"
Convert this type to JSON encoded string.
object_out_from_bcs
def object_out_from_bcs(bcs: "bytes") -> "ObjectOut"
Create this type from BCS encoded bytes.
object_out_from_json
def object_out_from_json(json: "str") -> "ObjectOut"
Create this type from JSON encoded string.
object_out_to_bcs
def object_out_to_bcs(data: "ObjectOut") -> "bytes"
Convert this type to BCS encoded bytes.
object_out_to_json
def object_out_to_json(data: "ObjectOut") -> "str"
Convert this type to JSON encoded string.
object_reference_from_bcs
def object_reference_from_bcs(bcs: "bytes") -> "ObjectReference"
Create this type from BCS encoded bytes.
object_reference_from_json
def object_reference_from_json(json: "str") -> "ObjectReference"
Create this type from JSON encoded string.
object_reference_to_bcs
def object_reference_to_bcs(data: "ObjectReference") -> "bytes"
Convert this type to BCS encoded bytes.
object_reference_to_json
def object_reference_to_json(data: "ObjectReference") -> "str"
Convert this type to JSON encoded string.
object_to_bcs
def object_to_bcs(data: "Object") -> "bytes"
Convert this type to BCS encoded bytes.
object_to_json
def object_to_json(data: "Object") -> "str"
Convert this type to JSON encoded string.
owner_from_bcs
def owner_from_bcs(bcs: "bytes") -> "Owner"
Create this type from BCS encoded bytes.
owner_from_json
def owner_from_json(json: "str") -> "Owner"
Create this type from JSON encoded string.
owner_to_bcs
def owner_to_bcs(data: "Owner") -> "bytes"
Convert this type to BCS encoded bytes.
owner_to_json
def owner_to_json(data: "Owner") -> "str"
Convert this type to JSON encoded string.
package_upgrade_error_from_bcs
def package_upgrade_error_from_bcs(bcs: "bytes") -> "PackageUpgradeError"
Create this type from BCS encoded bytes.
package_upgrade_error_from_json
def package_upgrade_error_from_json(json: "str") -> "PackageUpgradeError"
Create this type from JSON encoded string.
package_upgrade_error_to_bcs
def package_upgrade_error_to_bcs(data: "PackageUpgradeError") -> "bytes"
Convert this type to BCS encoded bytes.
package_upgrade_error_to_json
def package_upgrade_error_to_json(data: "PackageUpgradeError") -> "str"
Convert this type to JSON encoded string.
passkey_authenticator_from_bcs
def passkey_authenticator_from_bcs(bcs: "bytes") -> "PasskeyAuthenticator"
Create this type from BCS encoded bytes.
passkey_authenticator_from_json
def passkey_authenticator_from_json(json: "str") -> "PasskeyAuthenticator"
Create this type from JSON encoded string.
passkey_authenticator_to_bcs
def passkey_authenticator_to_bcs(data: "PasskeyAuthenticator") -> "bytes"
Convert this type to BCS encoded bytes.
passkey_authenticator_to_json
def passkey_authenticator_to_json(data: "PasskeyAuthenticator") -> "str"
Convert this type to JSON encoded string.
programmable_transaction_from_bcs
def programmable_transaction_from_bcs(
bcs: "bytes") -> "ProgrammableTransaction"
Create this type from BCS encoded bytes.
programmable_transaction_from_json
def programmable_transaction_from_json(
json: "str") -> "ProgrammableTransaction"
Create this type from JSON encoded string.
programmable_transaction_to_bcs
def programmable_transaction_to_bcs(
data: "ProgrammableTransaction") -> "bytes"
Convert this type to BCS encoded bytes.
programmable_transaction_to_json
def programmable_transaction_to_json(data: "ProgrammableTransaction") -> "str"
Convert this type to JSON encoded string.
publish_from_bcs
def publish_from_bcs(bcs: "bytes") -> "Publish"
Create this type from BCS encoded bytes.
publish_from_json
def publish_from_json(json: "str") -> "Publish"
Create this type from JSON encoded string.
publish_to_bcs
def publish_to_bcs(data: "Publish") -> "bytes"
Convert this type to BCS encoded bytes.
publish_to_json
def publish_to_json(data: "Publish") -> "str"
Convert this type to JSON encoded string.
randomness_state_update_from_bcs
def randomness_state_update_from_bcs(bcs: "bytes") -> "RandomnessStateUpdate"
Create this type from BCS encoded bytes.
randomness_state_update_from_json
def randomness_state_update_from_json(json: "str") -> "RandomnessStateUpdate"
Create this type from JSON encoded string.
randomness_state_update_to_bcs
def randomness_state_update_to_bcs(data: "RandomnessStateUpdate") -> "bytes"
Convert this type to BCS encoded bytes.
randomness_state_update_to_json
def randomness_state_update_to_json(data: "RandomnessStateUpdate") -> "str"
Convert this type to JSON encoded string.
secp256k1_public_key_from_bcs
def secp256k1_public_key_from_bcs(bcs: "bytes") -> "Secp256k1PublicKey"
Create this type from BCS encoded bytes.
secp256k1_public_key_from_json
def secp256k1_public_key_from_json(json: "str") -> "Secp256k1PublicKey"
Create this type from JSON encoded string.
secp256k1_public_key_to_bcs
def secp256k1_public_key_to_bcs(data: "Secp256k1PublicKey") -> "bytes"
Convert this type to BCS encoded bytes.
secp256k1_public_key_to_json
def secp256k1_public_key_to_json(data: "Secp256k1PublicKey") -> "str"
Convert this type to JSON encoded string.
secp256k1_signature_from_bcs
def secp256k1_signature_from_bcs(bcs: "bytes") -> "Secp256k1Signature"
Create this type from BCS encoded bytes.
secp256k1_signature_from_json
def secp256k1_signature_from_json(json: "str") -> "Secp256k1Signature"
Create this type from JSON encoded string.
secp256k1_signature_to_bcs
def secp256k1_signature_to_bcs(data: "Secp256k1Signature") -> "bytes"
Convert this type to BCS encoded bytes.
secp256k1_signature_to_json
def secp256k1_signature_to_json(data: "Secp256k1Signature") -> "str"
Convert this type to JSON encoded string.
secp256r1_public_key_from_bcs
def secp256r1_public_key_from_bcs(bcs: "bytes") -> "Secp256r1PublicKey"
Create this type from BCS encoded bytes.
secp256r1_public_key_from_json
def secp256r1_public_key_from_json(json: "str") -> "Secp256r1PublicKey"
Create this type from JSON encoded string.
secp256r1_public_key_to_bcs
def secp256r1_public_key_to_bcs(data: "Secp256r1PublicKey") -> "bytes"
Convert this type to BCS encoded bytes.
secp256r1_public_key_to_json
def secp256r1_public_key_to_json(data: "Secp256r1PublicKey") -> "str"
Convert this type to JSON encoded string.
secp256r1_signature_from_bcs
def secp256r1_signature_from_bcs(bcs: "bytes") -> "Secp256r1Signature"
Create this type from BCS encoded bytes.
secp256r1_signature_from_json
def secp256r1_signature_from_json(json: "str") -> "Secp256r1Signature"
Create this type from JSON encoded string.
secp256r1_signature_to_bcs
def secp256r1_signature_to_bcs(data: "Secp256r1Signature") -> "bytes"
Convert this type to BCS encoded bytes.
secp256r1_signature_to_json
def secp256r1_signature_to_json(data: "Secp256r1Signature") -> "str"
Convert this type to JSON encoded string.
signed_transaction_from_bcs
def signed_transaction_from_bcs(bcs: "bytes") -> "SignedTransaction"
Create this type from BCS encoded bytes.
signed_transaction_from_json
def signed_transaction_from_json(json: "str") -> "SignedTransaction"
Create this type from JSON encoded string.
signed_transaction_to_bcs
def signed_transaction_to_bcs(data: "SignedTransaction") -> "bytes"
Convert this type to BCS encoded bytes.
signed_transaction_to_json
def signed_transaction_to_json(data: "SignedTransaction") -> "str"
Convert this type to JSON encoded string.
simple_signature_from_bcs
def simple_signature_from_bcs(bcs: "bytes") -> "SimpleSignature"
Create this type from BCS encoded bytes.
simple_signature_from_json
def simple_signature_from_json(json: "str") -> "SimpleSignature"
Create this type from JSON encoded string.
simple_signature_to_bcs
def simple_signature_to_bcs(data: "SimpleSignature") -> "bytes"
Convert this type to BCS encoded bytes.
simple_signature_to_json
def simple_signature_to_json(data: "SimpleSignature") -> "str"
Convert this type to JSON encoded string.
split_coins_from_bcs
def split_coins_from_bcs(bcs: "bytes") -> "SplitCoins"
Create this type from BCS encoded bytes.
split_coins_from_json
def split_coins_from_json(json: "str") -> "SplitCoins"
Create this type from JSON encoded string.
split_coins_to_bcs
def split_coins_to_bcs(data: "SplitCoins") -> "bytes"
Convert this type to BCS encoded bytes.
split_coins_to_json
def split_coins_to_json(data: "SplitCoins") -> "str"
Convert this type to JSON encoded string.
string_from_bcs
def string_from_bcs(input: "bytes") -> "str"
Create a String from BCS encoded bytes.
string_from_json
def string_from_json(input: "str") -> "str"
Create a String from JSON encoded string.
string_to_bcs
def string_to_bcs(input: "str") -> "bytes"
Convert this String to BCS encoded bytes.
string_to_json
def string_to_json(input: "str") -> "str"
Convert this String to JSON encoded string.
struct_tag_from_bcs
def struct_tag_from_bcs(bcs: "bytes") -> "StructTag"
Create this type from BCS encoded bytes.
struct_tag_from_json
def struct_tag_from_json(json: "str") -> "StructTag"
Create this type from JSON encoded string.
struct_tag_to_bcs
def struct_tag_to_bcs(data: "StructTag") -> "bytes"
Convert this type to BCS encoded bytes.
struct_tag_to_json
def struct_tag_to_json(data: "StructTag") -> "str"
Convert this type to JSON encoded string.
system_package_from_bcs
def system_package_from_bcs(bcs: "bytes") -> "SystemPackage"
Create this type from BCS encoded bytes.
system_package_from_json
def system_package_from_json(json: "str") -> "SystemPackage"
Create this type from JSON encoded string.
system_package_to_bcs
def system_package_to_bcs(data: "SystemPackage") -> "bytes"
Convert this type to BCS encoded bytes.
system_package_to_json
def system_package_to_json(data: "SystemPackage") -> "str"
Convert this type to JSON encoded string.
transaction_effects_from_bcs
def transaction_effects_from_bcs(bcs: "bytes") -> "TransactionEffects"
Create this type from BCS encoded bytes.
transaction_effects_from_json
def transaction_effects_from_json(json: "str") -> "TransactionEffects"
Create this type from JSON encoded string.
transaction_effects_to_bcs
def transaction_effects_to_bcs(data: "TransactionEffects") -> "bytes"
Convert this type to BCS encoded bytes.
transaction_effects_to_json
def transaction_effects_to_json(data: "TransactionEffects") -> "str"
Convert this type to JSON encoded string.
transaction_effects_v1_from_bcs
def transaction_effects_v1_from_bcs(bcs: "bytes") -> "TransactionEffectsV1"
Create this type from BCS encoded bytes.
transaction_effects_v1_from_json
def transaction_effects_v1_from_json(json: "str") -> "TransactionEffectsV1"
Create this type from JSON encoded string.
transaction_effects_v1_to_bcs
def transaction_effects_v1_to_bcs(data: "TransactionEffectsV1") -> "bytes"
Convert this type to BCS encoded bytes.
transaction_effects_v1_to_json
def transaction_effects_v1_to_json(data: "TransactionEffectsV1") -> "str"
Convert this type to JSON encoded string.
transaction_events_from_bcs
def transaction_events_from_bcs(bcs: "bytes") -> "TransactionEvents"
Create this type from BCS encoded bytes.
transaction_events_from_json
def transaction_events_from_json(json: "str") -> "TransactionEvents"
Create this type from JSON encoded string.
transaction_events_to_bcs
def transaction_events_to_bcs(data: "TransactionEvents") -> "bytes"
Convert this type to BCS encoded bytes.
transaction_events_to_json
def transaction_events_to_json(data: "TransactionEvents") -> "str"
Convert this type to JSON encoded string.
transaction_expiration_from_bcs
def transaction_expiration_from_bcs(bcs: "bytes") -> "TransactionExpiration"
Create this type from BCS encoded bytes.
transaction_expiration_from_json
def transaction_expiration_from_json(json: "str") -> "TransactionExpiration"
Create this type from JSON encoded string.
transaction_expiration_to_bcs
def transaction_expiration_to_bcs(data: "TransactionExpiration") -> "bytes"
Convert this type to BCS encoded bytes.
transaction_expiration_to_json
def transaction_expiration_to_json(data: "TransactionExpiration") -> "str"
Convert this type to JSON encoded string.
transaction_from_bcs
def transaction_from_bcs(bcs: "bytes") -> "Transaction"
Create this type from BCS encoded bytes.
transaction_from_json
def transaction_from_json(json: "str") -> "Transaction"
Create this type from JSON encoded string.
transaction_kind_from_bcs
def transaction_kind_from_bcs(bcs: "bytes") -> "TransactionKind"
Create this type from BCS encoded bytes.
transaction_kind_from_json
def transaction_kind_from_json(json: "str") -> "TransactionKind"
Create this type from JSON encoded string.
transaction_kind_to_bcs
def transaction_kind_to_bcs(data: "TransactionKind") -> "bytes"
Convert this type to BCS encoded bytes.
transaction_kind_to_json
def transaction_kind_to_json(data: "TransactionKind") -> "str"
Convert this type to JSON encoded string.
transaction_to_bcs
def transaction_to_bcs(data: "Transaction") -> "bytes"
Convert this type to BCS encoded bytes.
transaction_to_json
def transaction_to_json(data: "Transaction") -> "str"
Convert this type to JSON encoded string.
transaction_v1_from_bcs
def transaction_v1_from_bcs(bcs: "bytes") -> "TransactionV1"
Create this type from BCS encoded bytes.
transaction_v1_from_json
def transaction_v1_from_json(json: "str") -> "TransactionV1"
Create this type from JSON encoded string.
transaction_v1_to_bcs
def transaction_v1_to_bcs(data: "TransactionV1") -> "bytes"
Convert this type to BCS encoded bytes.
transaction_v1_to_json
def transaction_v1_to_json(data: "TransactionV1") -> "str"
Convert this type to JSON encoded string.
transfer_objects_from_bcs
def transfer_objects_from_bcs(bcs: "bytes") -> "TransferObjects"
Create this type from BCS encoded bytes.
transfer_objects_from_json
def transfer_objects_from_json(json: "str") -> "TransferObjects"
Create this type from JSON encoded string.
transfer_objects_to_bcs
def transfer_objects_to_bcs(data: "TransferObjects") -> "bytes"
Convert this type to BCS encoded bytes.
transfer_objects_to_json
def transfer_objects_to_json(data: "TransferObjects") -> "str"
Convert this type to JSON encoded string.
type_argument_error_from_bcs
def type_argument_error_from_bcs(bcs: "bytes") -> "TypeArgumentError"
Create this type from BCS encoded bytes.
type_argument_error_from_json
def type_argument_error_from_json(json: "str") -> "TypeArgumentError"
Create this type from JSON encoded string.
type_argument_error_to_bcs
def type_argument_error_to_bcs(data: "TypeArgumentError") -> "bytes"
Convert this type to BCS encoded bytes.
type_argument_error_to_json
def type_argument_error_to_json(data: "TypeArgumentError") -> "str"
Convert this type to JSON encoded string.
type_origin_from_bcs
def type_origin_from_bcs(bcs: "bytes") -> "TypeOrigin"
Create this type from BCS encoded bytes.
type_origin_from_json
def type_origin_from_json(json: "str") -> "TypeOrigin"
Create this type from JSON encoded string.
type_origin_to_bcs
def type_origin_to_bcs(data: "TypeOrigin") -> "bytes"
Convert this type to BCS encoded bytes.
type_origin_to_json
def type_origin_to_json(data: "TypeOrigin") -> "str"
Convert this type to JSON encoded string.
type_tag_from_bcs
def type_tag_from_bcs(bcs: "bytes") -> "TypeTag"
Create this type from BCS encoded bytes.
type_tag_from_json
def type_tag_from_json(json: "str") -> "TypeTag"
Create this type from JSON encoded string.
type_tag_to_bcs
def type_tag_to_bcs(data: "TypeTag") -> "bytes"
Convert this type to BCS encoded bytes.
type_tag_to_json
def type_tag_to_json(data: "TypeTag") -> "str"
Convert this type to JSON encoded string.
u16_from_bcs
def u16_from_bcs(input: "bytes") -> "int"
Create a u16 from BCS encoded bytes.
u16_from_json
def u16_from_json(input: "str") -> "int"
Create a u16 from JSON encoded string.
u16_to_bcs
def u16_to_bcs(input: "int") -> "bytes"
Convert this u16 to BCS encoded bytes.
u16_to_json
def u16_to_json(input: "int") -> "str"
Convert this u16 to JSON encoded string.
u32_from_bcs
def u32_from_bcs(input: "bytes") -> "int"
Create a u32 from BCS encoded bytes.
u32_from_json
def u32_from_json(input: "str") -> "int"
Create a u32 from JSON encoded string.
u32_to_bcs
def u32_to_bcs(input: "int") -> "bytes"
Convert this u32 to BCS encoded bytes.
u32_to_json
def u32_to_json(input: "int") -> "str"
Convert this u32 to JSON encoded string.
u64_from_bcs
def u64_from_bcs(input: "bytes") -> "int"
Create a u64 from BCS encoded bytes.
u64_from_json
def u64_from_json(input: "str") -> "int"
Create a u64 from JSON encoded string.
u64_to_bcs
def u64_to_bcs(input: "int") -> "bytes"
Convert this u64 to BCS encoded bytes.
u64_to_json
def u64_to_json(input: "int") -> "str"
Convert this u64 to JSON encoded string.
u8_from_bcs
def u8_from_bcs(input: "bytes") -> "int"
Create a u8 from BCS encoded bytes.
u8_from_json
def u8_from_json(input: "str") -> "int"
Create a u8 from JSON encoded string.
u8_to_bcs
def u8_to_bcs(input: "int") -> "bytes"
Convert this u8 to BCS encoded bytes.
u8_to_json
def u8_to_json(input: "int") -> "str"
Convert this u8 to JSON encoded string.
unchanged_shared_kind_from_bcs
def unchanged_shared_kind_from_bcs(bcs: "bytes") -> "UnchangedSharedKind"
Create this type from BCS encoded bytes.
unchanged_shared_kind_from_json
def unchanged_shared_kind_from_json(json: "str") -> "UnchangedSharedKind"
Create this type from JSON encoded string.
unchanged_shared_kind_to_bcs
def unchanged_shared_kind_to_bcs(data: "UnchangedSharedKind") -> "bytes"
Convert this type to BCS encoded bytes.
unchanged_shared_kind_to_json
def unchanged_shared_kind_to_json(data: "UnchangedSharedKind") -> "str"
Convert this type to JSON encoded string.
unchanged_shared_object_from_bcs
def unchanged_shared_object_from_bcs(bcs: "bytes") -> "UnchangedSharedObject"
Create this type from BCS encoded bytes.
unchanged_shared_object_from_json
def unchanged_shared_object_from_json(json: "str") -> "UnchangedSharedObject"
Create this type from JSON encoded string.
unchanged_shared_object_to_bcs
def unchanged_shared_object_to_bcs(data: "UnchangedSharedObject") -> "bytes"
Convert this type to BCS encoded bytes.
unchanged_shared_object_to_json
def unchanged_shared_object_to_json(data: "UnchangedSharedObject") -> "str"
Convert this type to JSON encoded string.
upgrade_from_bcs
def upgrade_from_bcs(bcs: "bytes") -> "Upgrade"
Create this type from BCS encoded bytes.
upgrade_from_json
def upgrade_from_json(json: "str") -> "Upgrade"
Create this type from JSON encoded string.
upgrade_info_from_bcs
def upgrade_info_from_bcs(bcs: "bytes") -> "UpgradeInfo"
Create this type from BCS encoded bytes.
upgrade_info_from_json
def upgrade_info_from_json(json: "str") -> "UpgradeInfo"
Create this type from JSON encoded string.
upgrade_info_to_bcs
def upgrade_info_to_bcs(data: "UpgradeInfo") -> "bytes"
Convert this type to BCS encoded bytes.
upgrade_info_to_json
def upgrade_info_to_json(data: "UpgradeInfo") -> "str"
Convert this type to JSON encoded string.
upgrade_to_bcs
def upgrade_to_bcs(data: "Upgrade") -> "bytes"
Convert this type to BCS encoded bytes.
upgrade_to_json
def upgrade_to_json(data: "Upgrade") -> "str"
Convert this type to JSON encoded string.
user_signature_from_bcs
def user_signature_from_bcs(bcs: "bytes") -> "UserSignature"
Create this type from BCS encoded bytes.
user_signature_from_json
def user_signature_from_json(json: "str") -> "UserSignature"
Create this type from JSON encoded string.
user_signature_to_bcs
def user_signature_to_bcs(data: "UserSignature") -> "bytes"
Convert this type to BCS encoded bytes.
user_signature_to_json
def user_signature_to_json(data: "UserSignature") -> "str"
Convert this type to JSON encoded string.
validator_aggregated_signature_from_bcs
def validator_aggregated_signature_from_bcs(
bcs: "bytes") -> "ValidatorAggregatedSignature"
Create this type from BCS encoded bytes.
validator_aggregated_signature_from_json
def validator_aggregated_signature_from_json(
json: "str") -> "ValidatorAggregatedSignature"
Create this type from JSON encoded string.
validator_aggregated_signature_to_bcs
def validator_aggregated_signature_to_bcs(
data: "ValidatorAggregatedSignature") -> "bytes"
Convert this type to BCS encoded bytes.
validator_aggregated_signature_to_json
def validator_aggregated_signature_to_json(
data: "ValidatorAggregatedSignature") -> "str"
Convert this type to JSON encoded string.
validator_committee_from_bcs
def validator_committee_from_bcs(bcs: "bytes") -> "ValidatorCommittee"
Create this type from BCS encoded bytes.
validator_committee_from_json
def validator_committee_from_json(json: "str") -> "ValidatorCommittee"
Create this type from JSON encoded string.
validator_committee_member_from_bcs
def validator_committee_member_from_bcs(
bcs: "bytes") -> "ValidatorCommitteeMember"
Create this type from BCS encoded bytes.
validator_committee_member_from_json
def validator_committee_member_from_json(
json: "str") -> "ValidatorCommitteeMember"
Create this type from JSON encoded string.
validator_committee_member_to_bcs
def validator_committee_member_to_bcs(
data: "ValidatorCommitteeMember") -> "bytes"
Convert this type to BCS encoded bytes.
validator_committee_member_to_json
def validator_committee_member_to_json(
data: "ValidatorCommitteeMember") -> "str"
Convert this type to JSON encoded string.
validator_committee_to_bcs
def validator_committee_to_bcs(data: "ValidatorCommittee") -> "bytes"
Convert this type to BCS encoded bytes.
validator_committee_to_json
def validator_committee_to_json(data: "ValidatorCommittee") -> "str"
Convert this type to JSON encoded string.
validator_execution_time_observation_from_bcs
def validator_execution_time_observation_from_bcs(
bcs: "bytes") -> "ValidatorExecutionTimeObservation"
Create this type from BCS encoded bytes.
validator_execution_time_observation_from_json
def validator_execution_time_observation_from_json(
json: "str") -> "ValidatorExecutionTimeObservation"
Create this type from JSON encoded string.
validator_execution_time_observation_to_bcs
def validator_execution_time_observation_to_bcs(
data: "ValidatorExecutionTimeObservation") -> "bytes"
Convert this type to BCS encoded bytes.
validator_execution_time_observation_to_json
def validator_execution_time_observation_to_json(
data: "ValidatorExecutionTimeObservation") -> "str"
Convert this type to JSON encoded string.
validator_signature_from_bcs
def validator_signature_from_bcs(bcs: "bytes") -> "ValidatorSignature"
Create this type from BCS encoded bytes.
validator_signature_from_json
def validator_signature_from_json(json: "str") -> "ValidatorSignature"
Create this type from JSON encoded string.
validator_signature_to_bcs
def validator_signature_to_bcs(data: "ValidatorSignature") -> "bytes"
Convert this type to BCS encoded bytes.
validator_signature_to_json
def validator_signature_to_json(data: "ValidatorSignature") -> "str"
Convert this type to JSON encoded string.
version_assignment_from_bcs
def version_assignment_from_bcs(bcs: "bytes") -> "VersionAssignment"
Create this type from BCS encoded bytes.
version_assignment_from_json
def version_assignment_from_json(json: "str") -> "VersionAssignment"
Create this type from JSON encoded string.
version_assignment_to_bcs
def version_assignment_to_bcs(data: "VersionAssignment") -> "bytes"
Convert this type to BCS encoded bytes.
version_assignment_to_json
def version_assignment_to_json(data: "VersionAssignment") -> "str"
Convert this type to JSON encoded string.
zk_login_authenticator_from_bcs
def zk_login_authenticator_from_bcs(bcs: "bytes") -> "ZkLoginAuthenticator"
Create this type from BCS encoded bytes.
zk_login_authenticator_from_json
def zk_login_authenticator_from_json(json: "str") -> "ZkLoginAuthenticator"
Create this type from JSON encoded string.
zk_login_authenticator_to_bcs
def zk_login_authenticator_to_bcs(data: "ZkLoginAuthenticator") -> "bytes"
Convert this type to BCS encoded bytes.
zk_login_authenticator_to_json
def zk_login_authenticator_to_json(data: "ZkLoginAuthenticator") -> "str"
Convert this type to JSON encoded string.
zk_login_claim_from_bcs
def zk_login_claim_from_bcs(bcs: "bytes") -> "ZkLoginClaim"
Create this type from BCS encoded bytes.
zk_login_claim_from_json
def zk_login_claim_from_json(json: "str") -> "ZkLoginClaim"
Create this type from JSON encoded string.
zk_login_claim_to_bcs
def zk_login_claim_to_bcs(data: "ZkLoginClaim") -> "bytes"
Convert this type to BCS encoded bytes.
zk_login_claim_to_json
def zk_login_claim_to_json(data: "ZkLoginClaim") -> "str"
Convert this type to JSON encoded string.
zk_login_proof_from_bcs
def zk_login_proof_from_bcs(bcs: "bytes") -> "ZkLoginProof"
Create this type from BCS encoded bytes.
zk_login_proof_from_json
def zk_login_proof_from_json(json: "str") -> "ZkLoginProof"
Create this type from JSON encoded string.
zk_login_proof_to_bcs
def zk_login_proof_to_bcs(data: "ZkLoginProof") -> "bytes"
Convert this type to BCS encoded bytes.
zk_login_proof_to_json
def zk_login_proof_to_json(data: "ZkLoginProof") -> "str"
Convert this type to JSON encoded string.
zk_login_public_identifier_from_bcs
def zk_login_public_identifier_from_bcs(
bcs: "bytes") -> "ZkLoginPublicIdentifier"
Create this type from BCS encoded bytes.
zk_login_public_identifier_from_json
def zk_login_public_identifier_from_json(
json: "str") -> "ZkLoginPublicIdentifier"
Create this type from JSON encoded string.
zk_login_public_identifier_to_bcs
def zk_login_public_identifier_to_bcs(
data: "ZkLoginPublicIdentifier") -> "bytes"
Convert this type to BCS encoded bytes.
zk_login_public_identifier_to_json
def zk_login_public_identifier_to_json(
data: "ZkLoginPublicIdentifier") -> "str"
Convert this type to JSON encoded string.