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:
deploymentkey_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:
bidsAll bids contained within a vector.block_heightBlock height.era_validatorsEra validators.state_root_hashGlobal state hash.
Bid
An entry in the validator map.
Required Parameters:
bonding_purseThe purse that was used for bonding.delegation_rateThe delegation rate.delegatorsThe validator's delegators, indexed by their public keys.inactivetrueif validator has been "evicted".staked_amountThe amount of tokens staked by a validator (not including delegators).validator_public_keyValidator's public key.
Additional Parameters:
vesting_scheduleVesting schedule for a genesis validator.Noneif non-genesis validator.
BlockHash
A cryptographic hash identifying a Block.
BlockIdentifier
Identifier for possible ways to retrieve a Block.
HashIdentify and retrieve the Block with its hash.HeightIdentify and retrieve the Block with its height.
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_versionprotocol_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_nameA user defined string.gas_priceDefined as an integer in UInt64 format.
DeployInfo
Information relating to the given Deploy.
Required Parameters:
deploy_hashThe relevant Deploy.fromAccount identifier of the creator of the Deploy.gasGas cost of executing the Deploy.sourceSource purse used for payment of the Deploy.transfersTransfers performed by the Deploy.
DictionaryIdentifier
Options for dictionary item lookups.
AccountNamedKeyLookup a dictionary item via an Account's named keys.Required Parameters:
keyThe Account key as a formatted string whose named keys contain dictionary_name.dictionary_nameThe named key under which the dictionary seed URef is stored.dictionary_item_keyThe dictionary item key formatted as a string.ContractNamedKeyLookup a dictionary item via a Contract's named keys.keyThe contract key as a formatted string whose named keys contains dictionary_name.dictionary_nameThe named key under which the dictionary seed URef is stored.dictionary_item_keyThe dictionary item key formatted as a string.URefLookup a dictionary item via its seed URef.seed_urefThe dictionary's seed URef.dictionary_item_keyThe dictionary item key formatted as a string.DictionaryLookup a dictionary item via its unique key.
Digest
Hex-encoded hash digest.
DisabledVersions
Required Parameters:
contract_versionprotocol_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.
PublicA public entry point is callable by any caller.GroupsOnly 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.
sessionExecutes in the caller's context.contractExecutes in the callee's context.
EraID
Era ID newtype.
EraInfo
Auction metadata. Intended to be recorded at each era.
Required Parameters:
seigniorage_allocationInformation about a seigniorage allocation.
EraSummary
The summary of an era.
Required Parameters:
block_hashThe Block hash.era_idThe era id.merkle_proofThe merkle proof.state_root_hashHex-encoded hash of the state root.stored_valueThe 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_bytesHex-encoded raw Wasm bytes. There are some special cases around passingmodule_bytesfor payment code.
Additional Parameters:
argsRuntime arguments.
StoredContractByHash
Stored contract referenced by its ContractHash, entry point and an instance of RuntimeArgs.
Required Parameters:
argsRuntime arguments.entry_pointThe name of an entry point.hashA 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:
argsRuntime arguments.entry_pointThe name of an entry point.nameA named key.
StoredVersionContractByHash
Stored versioned contract referenced by its ContractPackageHash, entry point and an instance of RuntimeArgs.
Required Parameters:
argsRuntime arguments.entry_pointThe name of an entry point.hashA hex-encoded hash.
Additional Parameters:
versionAn 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:
argsRuntime arguments.entry_pointThe name of an entry point.nameA named key.
Additional Parameters:
versionAn 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.
FailureThe result of a failed execution`Required Parameters:
error_messageThe error message associated with executing the Deploy.SuccessThe 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.
BlockHashQuery using a Block hash.StateRootHashQuery 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_purseThe purse that was used for bonding.delegation_rateThe delegation rate.delegatorsThe delegators.inactiveIs this an inactive validator.staked_amountThe 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:
bodyJSON-friendly Block body.hashBlockHash.headerJSON-friendly Block header.proofsJSON-friendly list of proofs for this Block.
JsonBlockBody
A JSON-friendly representation of Body.
Required Parameters:
JsonBlockHeader
JSON representation of a Block header.
accumulated_seedAccumulated seed.body_hashThe body hash.era_idThe Block era id.heightThe Block height.parent_hashThe parent hash.protocol_versionThe protocol version.random_bitRandomness bit.state_root_hashThe state root hash.timestampThe Block timestamp.
Additional Parameters:
era_endThe 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_keyThe public key of the validator.status_changesThe set of changes to the validator's status.
JsonValidatorStatusChange
A single change to a validator's status in the given era.
Required Parameters:
era_idThe era in which the change occurred.validator_changeThe 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:
keyThe value of the entry: a casperKeytype.nameThe 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 re-delegation using UnbondingPurse.
Operation
An operation performed while executing a Deploy.
Required Parameters:
keyThe 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:
addressnode_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_keyThe main purse under a providedPublicKey.main_purse_under_account_hashThe main purse under a providedAccountHash.purse_urefA specific purse identified by the associatedURef.
Reward
Required Parameters:
amount
RuntimeArgs
Represents a collection of arguments passed to a smart contract.
SeigniorageAllocation
Information about a seigniorage allocation.
ValidatorInfo about a seigniorage allocation for a validator.Required Parameters:
amountAllocated amount.validator_public_keyValidator's public key.DelegatorInfo about a seigniorage allocation for a delegator.Require Parameters:
amountAllocated amount.delegator_public_keyDelegator's public key.validator_public_keyValidator'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).
CLValueA Casper-specific value.AccountAn Account.ContractWasmA contract's Wasm.ContractEntry points supported by a contract.ContractPackageA contract definition, metadata, and security container.TransferA record of a transfer.DeployInfoA record of a Deploy.EraInfoAuction metadata.BidA bid.WithdrawA withdraw.
TimeDiff
Human-readable duration.
Timestamp
Timestamp formatted as per RFC 3339.
Transfer
Represents a transfer from one purse to another.
Required Parameters:
amountTransfer amount.deploy_hashDeploy that created the transfer.fromAccount from which transfer was executed.sourceSource purse.targetTarget purse.
Additional Parameters:
idUser-defined ID.toAccount to which funds are transferred.
TransferAddr
Hex-encoded transfer address.
Transform
The actual transformation performed while executing a Deploy.
WriteCLValueWrite the given CLValue to global state.WriteAccountWrites the given Account to global state.WriteDeployInfoWrites the given DeployInfo to global state.WriteEraInfoWrites the given EraInfo to global state.WriteTransferWrites the given Transfer to global state.WriteBidWrites the given Bid to global state.WriteWithdrawWrites the given Withdraw to global state.AddInt32Adds the giveni32.AddUInt64Adds the givenu64.AddUInt128Adds the givenU128.AddUInt256Adds the givenU256.AddUInt512Adds the givenU512.AddKeysAdds the given collection of named keys.FailureA failed transformation, containing an error message.
TransformEntry
A transformation performed while executing a Deploy.
Required Parameters:
keyThe formatted string of theKey.transformsThe 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:
amountUnbonding amount.bonding_purseBonding purse.era_of_creationEra in which the unbonding request was created.unbonder_public_keyUnbonder's public key.validator_public_keyThe original validator's public key.new_validatorThe re-delegated validator's public key.
URef
Hex-encoded, formatted URef.
ValidatorChange
A change to a validator's status between two eras.
AddedRemovedBannedCannotProposeSeenAsFaulty
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:
amountUnbonding amount.bonding_purseBonding purse.era_of_creationEra in which the unbonding request was created.unbonder_public_keyUnbonder's public key.validator_public_keyThe original validator's public key.