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:
AccountHash
The AccountHash is a 32-byte hash derived from a supported PublicKey. Its role is to standardize keys that can vary in length.
ActionThresholds
Thresholds that have to be met when executing an action of a certain type.
Required Parameters:
deployment
key_management
ActivationPoint
The first era to which the associated protocol version applies.
Approval
A struct containing a signature and the public key of the signer.
Required Parameters:
AssociatedKey
A key granted limited permissions to an Account, for purposes such as multisig.
Required Parameters:
weight
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
low
The inclusive lower bound of the range.high
The inclusive upper bound of the range.
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.
Additional Parameters:
vesting_schedule
Vesting schedule for a genesis validator.None
if non-genesis validator.
BlockHash
A cryptographic hash identifying a Block
.
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.
BlockSynchronizerStatus
The status of the block synchronizer.
Historical
The status of syncing a historical block, if any.block_hash
The block hash.block_height
The height of the block, if known.acquisition_state
The state of acquisition of the data associated with the block.
Forward
The status of syncing a forward block, if any.block_hash
The block hash.block_height
The height of the block, if known.acquisition_state
The state of acquisition of the data associated with the block.
ChainspecRawBytes
The raw bytes of the chainspec.toml, genesis accounts.toml, and global_state.toml files.
chainspec_bytes
Hex-encoded raw bytes of the current chainspec.toml file.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:
protocol_version
ContractHash
The hash address of the contract.
ContractPackage
Contract definition, metadata and security container.
Required Parameters:
ContractPackageHash
The hash address of the contract package.
ContractVersion
The version of the contract.
Required Parameters:
contract_version
protocol_version_major
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.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.URef
Lookup a dictionary item via its seed URef.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.
DisabledVersions
Required Parameters:
contract_version
protocol_version_major
EntryPoint
Metadata describing a callable entry point and its return value, if any. All required parameters should be declared, whereas all non-required parameters should not be declared. Non-required parameters should not be confused with optional parameters.
Required Parameters:
EntryPointAccess
Enum describing the possible access control options for a contract entry point.
Public
A public entry point is callable by any caller.Groups
Only callers from the authorized, listed groups may call this entry point. Note: If this list is empty then this entry point is not callable from outside the contract.
EntryPointType
Context of an entry point execution.
session
Executes in the caller's context.contract
Executes in the callee's context.
EraID
Era ID newtype.
EraInfo
Auction metadata. Intended to be recorded at each era.
Required Parameters:
seigniorage_allocation
Information about a seigniorage allocation.
EraSummary
The summary of an era.
Required Parameters:
block_hash
The Block hash.era_id
The era id.merkle_proof
The merkle proof.state_root_hash
Hex-encoded hash of the state root.stored_value
The StoredValue containing era information.
ExecutableDeployItem
Represents possible variants of an executable Deploy.
ModuleBytes
Executable specified as raw bytes that represent Wasm code and an instance of RuntimeArgs
.
Required Parameters:
module_bytes
Hex-encoded raw Wasm bytes. There are some special cases around passingmodule_bytes
for payment code.
Additional Parameters:
args
Runtime arguments.
StoredContractByHash
Stored contract referenced by its ContractHash
, entry point and an instance of RuntimeArgs
.
Required Parameters:
args
Runtime arguments.entry_point
The name of an entry point.hash
A hex-encoded hash.
StoredContractByName
Stored contract referenced by a named key existing in the signer's Account context, entry point and an instance of RuntimeArgs
.
Required Parameters:
args
Runtime arguments.entry_point
The name of an entry point.name
A named key.
StoredVersionContractByHash
Stored versioned contract referenced by its ContractPackageHash
, entry point and an instance of RuntimeArgs
.
Required Parameters:
args
Runtime arguments.entry_point
The name of an entry point.hash
A hex-encoded hash.
Additional Parameters:
version
An optional version of the contract to call. It will default to the highest enabled version if no value is specified.
StoredVersionContractByName
Stored versioned contract referenced by a named key existing in the signer's Account context, entry point and an instance of RuntimeArgs
.
Required Parameters:
args
Runtime arguments.entry_point
The name of an entry point.name
A named key.
Additional Parameters:
version
An optional version of the contract to call. It will default to the highest enabled version if no value is specified.
Transfer
A native transfer which does not contain or reference a Wasm code.
Required Parameters:
ExecutionEffect
The journal of execution transforms from a single Deploy.
Required Parameters:
ExecutionResult
The result of executing a single Deploy.
Failure
The result of a failed execution`Required Parameters:
error_message
The error message associated with executing the Deploy.Success
The result of a successful execution.Required Parameters:
FinalizedApprovals
A boolean value that determines whether to return the deploy with the finalized approvals substituted. If false
or omitted, returns the deploy with the approvals that were originally received by the node.
GlobalStateIdentifier
Identifier for possible ways to query global state.
BlockHash
Query using a Block hash.StateRootHash
Query using the state root hash.
Group
A (labelled) "user group". Each entry point of a versioned contract may be associated with one or more user groups which are allowed to call it.
Groups
Required Parameters:
group
JsonBid
An entry in a founding validator map representing a bid.
Required Parameters:
bonding_purse
The purse that was used for bonding.delegation_rate
The delegation rate.delegators
The delegators.inactive
Is this an inactive validator.staked_amount
The amount of tokens staked by a validator (not including delegators).
JsonBids
A Json representation of a single bid.
Required Parameters:
JsonBlock
A JSON-friendly representation of Block
.
Required Parameters:
body
JSON-friendly Block body.hash
BlockHash.header
JSON-friendly Block header.proofs
JSON-friendly list of proofs for this Block.
JsonBlockBody
A JSON-friendly representation of Body
.
Required Parameters:
JsonBlockHeader
JSON representation of a Block header.
accumulated_seed
Accumulated seed.body_hash
The body hash.era_id
The Block era id.height
The Block height.parent_hash
The parent hash.protocol_version
The protocol version.random_bit
Randomness bit.state_root_hash
The state root hash.timestamp
The Block timestamp.
Additional Parameters:
era_end
The era end.
JsonDelegator
A delegator associated with the given validator.
Required Parameters:
JsonEraEnd
Required Parameters:
JsonEraReport
Equivocation and reward information to be included in the terminal Block.
Required Parameters:
JsonEraValidators
The validators for the given era.
Required Parameters:
JsonExecutionResult
The execution result of a single Deploy.
JsonProof
A JSON-friendly representation of a proof, i.e. a Block's finality signature.
Required Parameters:
JsonValidatorChanges
The changes in a validator's status.
Required Parameters:
public_key
The public key of the validator.status_changes
The set of changes to the validator's status.
JsonValidatorStatusChange
A single change to a validator's status in the given era.
Required Parameters:
era_id
The era in which the change occurred.validator_change
The change in validator status.
JsonValidatorsWeights
A validator's weight.
Required Parameters:
Merkle_Proof
A merkle proof is a construction created using a merkle trie that allows verification of the associated hashes.
MinimalBlockInfo
Minimal info of a Block
.
Required Parameters:
NamedArg
Named arguments to a contract.
NamedKey
A named key.
Required Parameters:
key
The value of the entry: a casperKey
type.name
The name of the entry.
NextUpgrade
Information about the next protocol upgrade.
Required Parameters:
protocol_version
NewValidator
The public key for the new validator in a redelegation using UnbondingPurse.
Operation
An operation performed while executing a Deploy.
Required Parameters:
key
The formatted string of theKey
.
OpKind
The type of operation performed while executing a Deploy.
Parameter
Parameter to an entry point.
Required Parameters:
name
PeerEntry
Required Parameters:
address
node_id
PeersMap
Map of peer IDs to network addresses.
ProtocolVersion
Casper Platform protocol version.
PublicKey
Hex-encoded cryptographic public key, including the algorithm tag prefix.
PurseIdentifier
The identifier to obtain the purse corresponding to a balance query. Valid identifiers include:
main_purse_under_public_key
The main purse under a providedPublicKey
.main_purse_under_account_hash
The main purse under a providedAccountHash
.purse_uref
A specific purse identified by the associatedURef
.
ReactorState
The state of the reactor, which will return one of the following:
Initialize
Get all components and reactor state set up on start.CatchUp
Orient to the network and attempt to catch up to tip.Upgrading
Running commit upgrade and creating immediate switch block.KeepUp
Stay caught up with tip.Validate
Node is currently caught up and is an active validator.ShutdownForUpgrade
Node should be shut down for upgrade.
Reward
Required Parameters:
amount
RuntimeArgs
Represents a collection of arguments passed to a smart contract.
SeigniorageAllocation
Information about a seigniorage allocation.
Validator
Info about a seigniorage allocation for a validator.Required Parameters:
amount
Allocated amount.validator_public_key
Validator's public key.Delegator
Info about a seigniorage allocation for a delegator.Require Parameters:
amount
Allocated amount.delegator_public_key
Delegator's public key.validator_public_key
Validator's public key.
Signature
Hex-encoded cryptographic signature, including the algorithm tag prefix.
StoredValue
Representation of a value stored in global state. Account
, Contract
and ContractPackage
have their own json_compatibility
representation (see their docs for further info).
CLValue
A Casper-specific value.Account
An Account.ContractWasm
A contract's Wasm.Contract
Entry points supported by a contract.ContractPackage
A contract definition, metadata, and security container.Transfer
A record of a transfer.DeployInfo
A record of a Deploy.EraInfo
Auction metadata.Bid
A bid.Withdraw
A withdraw.
TimeDiff
Human-readable duration.
Timestamp
Timestamp formatted as per RFC 3339.
Transfer
Represents a transfer from one purse to another.
Required Parameters:
amount
Transfer amount.deploy_hash
Deploy that created the transfer.from
Account from which transfer was executed.source
Source purse.target
Target purse.
Additional Parameters:
id
User-defined ID.to
Account to which funds are transferred.
TransferAddr
Hex-encoded transfer address.
Transform
The actual transformation performed while executing a Deploy.
WriteCLValue
Write the given CLValue to global state.WriteAccount
Writes the given Account to global state.WriteDeployInfo
Writes the given DeployInfo to global state.WriteEraInfo
Writes the given EraInfo to global state.WriteTransfer
Writes the given Transfer to global state.WriteBid
Writes the given Bid to global state.WriteWithdraw
Writes the given Withdraw to global state.AddInt32
Adds the giveni32
.AddUInt64
Adds the givenu64
.AddUInt128
Adds the givenU128
.AddUInt256
Adds the givenU256
.AddUInt512
Adds the givenU512
.AddKeys
Adds the given collection of named keys.Failure
A failed transformation, containing an error message.
TransformEntry
A transformation performed while executing a Deploy.
Required Parameters:
key
The formatted string of theKey
.transforms
The transformation.
U128
Decimal representation of a 128-bit integer.
U256
Decimal representation of a 256-bit integer.
U512
Decimal representation of a 512-bit integer.
UnbondingPurse
Unbonding purse.
Required Parameters:
amount
Unbonding amount.bonding_purse
Bonding purse.era_of_creation
Era in which the unbonding request was created.unbonder_public_key
Unbonder's public key.validator_public_key
The original validator's public key.new_validator
The redelegated validator's public key.
URef
Hex-encoded, formatted URef.
ValidatorChange
A change to a validator's status between two eras.
Added
Removed
Banned
CannotPropose
SeenAsFaulty
ValidatorWeight
Required Parameters:
VestingSchedule
Vesting schedule for a genesis validator.
WithdrawPurse
Withdraw purse, previously known as unbonding purse prior to 1.5. Withdraw purses remain as historical data.
Required Parameters:
amount
Unbonding amount.bonding_purse
Bonding purse.era_of_creation
Era in which the unbonding request was created.unbonder_public_key
Unbonder's public key.validator_public_key
The original validator's public key.