Module contract_client

Module contract_client 

Source
Expand description

This module contains a generic client that provides conveniences for interacting with any smart contract instance, as well as for creating new ones.

The key types in this module are ContractClient, ContractInitBuilder and ModuleDeployBuilder.

Structs§

ContractClient
A contract client that handles some of the boilerplate such as serialization and parsing of responses when sending transactions, or invoking smart contracts.
ContractInitHandle
A handle returned when sending a smart contract init transaction. This can be used to get the response of the initialization.
ContractInitInner
A helper type to construct ContractInitBuilder. Users do not directly interact with values of this type.
ContractTransactionMetadata
Transaction metadata for CIS-4 update transactions.
ContractUpdateHandle
A handle returned when sending a smart contract update transaction. This can be used to get the response of the update.
ContractUpdateInner
A helper type to construct ContractUpdateBuilder. Users do not directly interact with values of this type.
CredentialEntry
Response to a credential data query.
CredentialEventData
Data for events of registering and updating a credential.
CredentialInfo
CredentialMetadataEvent
CredentialSchemaRefEvent
The schema reference has been updated for the credential type.
CredentialType
Credential type is a string that corresponds to the value of the “name” attribute of the credential schema.
ErrorSchema
Define a newtype wrapper around the error schema type.
IssuerMetadataEvent
An event emitted when the issuer metadata is set, either initially or when it is updated.
MetadataUrl
A URL for the metadata.
ModuleDeployData
Result of successful module deployment.
ModuleDeployHandle
Reason
A short comment on a reason of revoking or restoring a credential. The string is of a limited size of 256 bytes in order to fit into a single log entry along with other data.
RegistryMetadata
A response type for the registry metadata request.
RejectedTransaction
This type is used when an invoke (dry-run) of a transaction gets rejected.
RevocationKeyEvent
An untagged revocation key event. Emitted when keys are registered and removed. For a tagged version use CredentialEvent.
RevocationKeyWithNonce
Revocation key together with a nonce that needs to be used for signing the next revocation transaction.
RevokeCredentialEvent
An untagged revocation event.
SchemaRef
A schema reference is a schema URL pointing to the JSON schema for a verifiable credential.
TransactionBuilder
A builder of transactions out of minimal data typically obtained by dry-running.

Enums§

ConcordiumStdRejectReason
ContractInitError
An error that may occur when querying the result of a smart contract update transaction.
ContractUpdateError
An error that may occur when querying the result of a smart contract update transaction.
CredentialEvent
An event specified by CIS4 standard.
CredentialStatus
The current status of a credential.
DecodedReason
A human-readable decoded error for the reject reason of a reverted transaction.
DryRunModuleDeployError
An error that may occur when attempting to dry run a smart contract module deployment.
DryRunNewInstanceError
An error that may occur when attempting to dry run a new instance creation.
InvokeContractOutcome
The outcome of invoking (dry-running) a transaction to update a smart contract instance. The variants describe the two cases of successfully simulating the transaction and rejecting the transaction due to some reverts.
ModuleDeployError
An error that may occur when querying the result of a module deploy transaction.
RevocationKeyAction
Revoker
A type for specifying who is revoking a credential, when registering a revocation event.
ViewError
An error that can be used as the error for the view family of functions.

Functions§

decode_concordium_std_error
Decode the reject_reason into a human-readable error based on the error code definition in the concordium-std crate.
decode_smart_contract_revert
Decode the smart contract logical revert reason and return a human-readable error.

Type Aliases§

ContractInitBuilder
Builder for initializing a new smart contract instance.
ContractUpdateBuilder
A builder to simplify sending smart contract updates.
IssuerKey
Public key of an issuer.
ModuleDeployBuilder
RevocationKey
SimulatedTransaction
The SimulatedTransaction type is an alias for the ContractUpdateBuilder type. This type is used when an invoke (dry-run) of a transaction succeeds. This type includes a convenient send method to send and execute the transaction on-chain in a subsequent action. As such, it is a builder to simplify sending smart contract updates.