Expand description
A simple wallet contract base contract to be used by other contracts
It includes the core logic, making contracts using it much more compact. The implementation is
based on [schnorrkel
] crate and its SR25519 signature scheme.
It abstracts away its inner types in the public API to allow it to evolve over time.
The general workflow is:
SimpleWalletBase::initialize
is used for wallet initializationSimpleWalletBase::authorize
is used for authorizationSimpleWalletBase::execute
is used for executing method calls contained in the payload, followed bySimpleWalletBase::increase_nonce
SimpleWalletBase::change_public_key
is used for change public key to a different one
Modules§
- ffi
- FFI code generated by procedural macro
- payload
- This module contains generic utilities for serializing and deserializing method calls to/from payload bytes.
- seal
- Utilities for
Seal
creation and verification
Structs§
- Seal
- Transaction seal.
- Simple
Wallet Base - A simple wallet contract base contract to be used by other contracts.
- Wallet
State - State of the wallet.
Constants§
- EXTERNAL_
ARGS_ BUFFER_ SIZE - Size of the buffer in pointers that is used for
ExternalArgs
pointers. - OUTPUT_
BUFFER_ OFFSETS_ SIZE - Size of the buffer in entries that is used to store buffer offsets.
- OUTPUT_
BUFFER_ SIZE - Size of the buffer in bytes that is used as a stack for storing outputs.
- SIGNING_
CONTEXT - Context for transaction signatures, see
SigningContext
.
Traits§
- Simple
Wallet Base Ext - Extension trait that provides helper methods for calling
SimpleWalletBase
’s methods onEnv
for convenience purposes