Types
The following definitions expand on parameters seen elsewhere within the SDK standard and are provided for clarity and completeness.
Account
Structure representing a user's Account, stored in global state.
Required Parameters:
AccountActionThresholds
Thresholds that have to be met when executing an action of a certain type.
Required Parameters:
-
deployment
Threshold for deploy execution. -
key_management
Threshold for managing account keys.
AccountAssociatedKeys
A collection of weighted public keys (represented as account hashes) associated with an account.
AccountAssociatedKeyWeight
The weight associated with public keys in an account's associated keys.
AccountHash
The AccountHash is a 32-byte hash derived from a supported PublicKey. Its role is to standardize keys that can vary in length.
AccountIdentifier
Identifier of an account.
Contains one of:
ActivationPoint
The first era to which the associated protocol version applies.
Any of:
AddressableEntity
AddressableEntityHash
The hex-encoded address of the addressable entity.
Approval
A struct containing a signature and the public key of the signer.
Required Parameters:
Array_of_AssociatedKey
An array of AssociatedKeys.
Array_of_BlockProof
An array of BlockProofs
.
Array_of_EntityVersionAndHash
An array of EntityVersionAndHashes.
Array_of_EraReward
An array of EraRewards.
Array_of_MessageTopic
An array of MessageTopics.
Array_of_NamedEntryPoint
An array of named entry points.
Array_of_NamedUserGroup
An array of NamedUserGroups.
Array_of_PublicKeyAndBid
An array of bids associated with given public keys.
Array_of_PublicKeyAndDelegator
An array consisting of PublicKeyAndDelegators.
Array_of_ValidatorWeight
An array of ValidatorWeights
.
AssociatedKey
A key granted limited permissions to an Account, for purposes such as multisig.
Required Parameters:
AuctionState
Data structure summarizing auction contract data.
Required Parameters:
-
bids
All bids contained within a vector. -
block_height
Block height. -
era_validators
Era validators. -
state_root_hash
Global state hash.
AvailableBlockRange
An unbroken, inclusive range of blocks.
Required Parameters:
-
low
The inclusive lower bound of the range. -
high
The inclusive upper bound of the range.
BalanceHoldWithProof
Hold amount at a given block time.
Required Parameters:
-
amount
The amount in the hold. -
proof
A string proof that the given value is present in the Merkle trie. -
time
The block time at which the hold was created.
Bid
An entry in the validator map.
Required Parameters:
-
bonding_purse
The purse that was used for bonding. -
delegation_rate
The delegation rate. -
delegators
The validator's delegators, indexed by their public keys. -
inactive
true
if validator has been "evicted". -
staked_amount
The amount of tokens staked by a validator (not including delegators). -
validator_public_key
Validator's public key.
Optional Parameters:
vesting_schedule
Vesting schedule for a genesis validator.None
if non-genesis validator.
BidKind
Auction bid variants.
One of:
-
Unified
A unified record indexed on validator data, with an embedded collection of all delegator bids assigned to that validator. The `Unified`` variant is for legacy retrograde support; new instances will not be created going forward. -
Validator
A bid record containing only validator data. -
Delegator
A bid record containing only delegator data. -
Bridge
A bridge record pointing to a newValidatorBid
after the public key was changed. -
Credit
Credited amount.
Block
A block after execution.
One of:
BlockBodyV1
The body portion of a block prior to Casper 2.0.
Required Parameters:
-
deploy_hashes
The deploy hashes of the non-transfer deploys within the block. -
proposer
The public key of the validator that proposed the block. -
transfer_hashes
The deploy hashes of the transfers within the block.
BlockBodyV2
The body portion of a block.
Required Parameters:
-
rewarded_signatures
List of identifiers for finality signatures for a particular past block. -
transactions
Map of transactions mapping categories to a list of transaction hashes.
BlockHash
A cryptographic hash identifying a Block
.
BlockHeader
The versioned header portion of a block. It encapsulates different variants of the BlockHeader
struct.
One of:
-
Version1
The legacy, initial version of the header portion of a block. -
Version2
The version 2 of the header portion of a block.
BlockHeaderV1
The header portion of a block prior to Casper 2.0.
Required Parameters:
-
height
The height of this block. -
random_bit
A random bit needed for initializing a future era.
Optional Parameters:
BlockHeaderV2
The header portion of a block.
Required Parameters:
-
accumulated_seed
A seed needed for initializing a future era. -
body_hash
The hash of the block's body. -
current_gas_price
The gas price of the era. -
height
The height of this block. -
parent_hash
The parent block's hash. -
proposer
The public key of the validator which proposed the block. -
protocol_version
The protocol version of the network from when this block was created. -
random_bit
A random bit needed for initializing a future era. -
state_root_hash
The root hash of global state after the deploys in this block have been executed. -
timestamp
The timestamp from when the block was proposed.
Optional Parameters:
-
era_end
TheEraEnd
of a block if it is a switch block. -
last_switch_block_hash
The most recent switch block hash.
BlockIdentifier
Identifier for possible ways to retrieve a Block.
-
Hash
Identify and retrieve the Block with its hash. -
Height
Identify and retrieve the Block with its height.
BlockProof
A validator's public key paired with a corresponding signature of a given block hash.
Required Parameters:
BlockSynchronizerStatus
The status of the block synchronizer.
Optional Parameters:
-
Historical
The status of syncing a historical block, if any. -
Forward
The status of syncing a forward block, if any.
BlockSyncStatus
The status of syncing an individual block.
Required Parameters:
-
acquisition_state
The state of acquisition of the data associated with the block as a string. -
block_hash
The block hash.
Optional Parameters:
block_height
The height of the block, if known.
BlockTime
A newtype wrapping a u64
, which represents the block time.
BlockV1
A block after execution with the resulting global state root hash prior to Casper 2.0. This is the core component of the Casper linear blockchain.
Required Parameters:
-
body
The body portion of the block. -
hash
The block hash identifying this block. -
header
The header portion of the block.
BlockV2
A block after execution, with the resulting global state root hash. This is the core component of the Casper linear blockchain.
Required Parameters:
-
body
The body portion of the block. -
hash
The block hash identifying this block. -
header
The header portion of the block.
Bridge
A bridge record pointing to a new ValidatorBid
after the public key was changed.
Required Parameters:
-
era_id
Era when bridge record was created. -
old_validator_public_key
Previous validator public key associated with the bid. -
new_validator_public_key
New validator public key associated with the bid.
Bytes
Hex-encoded bytes.
ByteCode
A container for a contract's Wasm bytes.
Required Parameters:
ByteCodeHash
The hex-encoded address of a smart contract AddressableEntity
.
ByteCodeKind
The type of byte code.
One of:
-
Empty
Empty byte code. -
V1CasperWasm
Byte code to be executed with the version 1 Casper execution engine.
BytesreprError
Serialization and deserialization errors.
-
EarlyEndOfStream
Early end of stream while deserializing. -
Formatting
Formatting error while deserializing. -
LeftOverBytes
Not all input bytes were consumed. -
OutOfMemory
Out of memory error. -
NotRepresentable
No serialized representation is available for a value. -
ExceededRecursionDepth
Exceeded a recursion depth limit.
ChainspecRawBytes
The raw bytes of the chainspec.toml, genesis accounts.toml, and global_state.toml files.
Required Parameters:
chainspec_bytes
Hex-encoded raw bytes of the current chainspec.toml file.
Optional Parameters:
-
maybe_genesis_accounts_bytes
Hex-encoded raw bytes of the current genesis accounts.toml file. -
maybe_global_state_bytes
Hex-encoded raw bytes of the current global_state.toml file.
Contract
A contract struct that can be serialized as a JSON object.
Required Parameters:
ContractHash
The hash address of the contract.
ContractPackage
Contract definition, metadata and security container.
Required Parameters:
ContractPackageHash
The hash address of the contract package.
ContractPackageStatus
An enum to determine the lock status of the contract package.
One of:
-
Locked
The package is locked and cannot be versioned. -
Unlocked
The package is unlocked and can be versioned.
ContractVersion
The version of the contract.
Required Parameters:
-
contract_version
-
protocol_version_major
ContractVersionKey
Major element of ProtocolVersion
combined with ContractVersion
.
ContractWasm
A container for a contract's Wasm bytes.
Required Parameter:
ContractWasmHash
The hash address of the contract Wasm.
Delegator
Represents a party delegating their stake to a validator (or "delegatee").
Required Parameters:
Additional Parameters:
Deploy
A Deploy; an item containing a smart contract along with the requester's signature(s).
Required properties:
DeployHash
Hex-encoded Deploy hash.
DeployHeader
The header portion of a Deploy.
Required Parameters:
-
chain_name
A user defined string. -
gas_price
Defined as an integer in UInt64 format.
DeployInfo
Information relating to the given Deploy.
Required Parameters:
-
deploy_hash
The relevant Deploy. -
from
Account identifier of the creator of the Deploy. -
gas
Gas cost of executing the Deploy. -
source
Source purse used for payment of the Deploy. -
transfers
Transfers performed by the Deploy.
DictionaryIdentifier
Options for dictionary item lookups.
-
AccountNamedKey
Lookup a dictionary item via an Account's named keys.Required Parameters:
-
key
The Account key as a formatted string whose named keys contain dictionary_name. -
dictionary_name
The named key under which the dictionary seed URef is stored. -
dictionary_item_key
The dictionary item key formatted as a string.
-
-
ContractNamedKey
Lookup a dictionary item via a Contract's named keys.Required Parameters:
-
key
The contract key as a formatted string whose named keys contains dictionary_name. -
dictionary_name
The named key under which the dictionary seed URef is stored. -
dictionary_item_key
The dictionary item key formatted as a string.
-
-
EntityNamedKey
Required Parameters:
-
key
The entity address formatted as a string. -
dictionary_name
The named key under which the dictionary seed URef is stored. -
dictionary_item_key
The dictionary item key formatted as a string.
-
-
URef
Lookup a dictionary item via its seed URef.Required Parameters:
-
seed_uref
The dictionary's seed URef. -
dictionary_item_key
The dictionary item key formatted as a string.
-
-
Dictionary
Lookup a dictionary item via its unique key.
Digest
Hex-encoded hash digest.
Effects
A log of all transforms produced during execution.
EntityActionThresholds
Thresholds that have to be met when executing an action of a certain type.
Required Parameters:
-
deployment
Threshold for deploy execution. -
key_management
Threshold for managing account keys. -
upgrade_management
Threshold for upgrading contracts.
EntityAddr
The address for an AddressableEntity which contains the 32 bytes and tagging information.
Any of:
-
The address for a system entity account or contract.
-
The address of an entity that corresponds to an Account.
-
The address of an entity that corresponds to a user (non-system) smart contract.
EntityAssociatedKeys
A collection of weighted public keys (represented as account hashes) associated with an account. See Array_of_AssociatedKey.
EntityAssociatedKeyWeight
The weight associated with public keys in an entity's associated keys.
EntityIdentifier
Identifier of an addressable entity.
One of:
EntityKind
The type of Package
.
One of:
-
System
Package associated with a native contract implementation. -
Account
Package associated with an Account hash. -
SmartContract
Packages associated with Wasm stored on chain.