pub struct WalletCanister<'agent> { /* private fields */ }
Expand description

A wallet canister interface, for the standard wallet provided by DFINITY. This interface implements most methods conveniently for the user.

Implementations§

Create an instance of a WalletCanister interface pointing to the given Canister ID. Fails if it cannot learn the wallet’s version.

Create a WalletCanister interface from an existing canister object. Fails if it cannot learn the wallet’s version.

Create a WalletCanister interface from an existing canister object and a known wallet version.

This interface’s methods may raise errors if the provided version is newer than the wallet’s actual supported version.

Re-fetch the API version string of the wallet.

Get the (cached) API version of the wallet.

Get the friendly name of the wallet (if one exists).

Set the friendly name of the wallet.

Get the current controller’s principal ID.

Transfer controller to another principal ID.

Remove a user as a wallet controller.

Get the list of custodians.

Authorize a new custodian.

Deauthorize a custodian.

Get the balance with the 64-bit API.

Get the balance with the 128-bit API.

Get the balance.

Send cycles to another canister using the 64-bit API.

Send cycles to another canister using the 128-bit API.

Send cycles to another canister.

A function for sending cycles to, so that a memo can be passed along with them.

Create a canister through the wallet, using the single-controller 64-bit API.

Create a canister through the wallet, using the multi-controller 64-bit API.

Create a canister through the wallet, using the 128-bit API.

Create a canister through the wallet.

Create a wallet canister with the single-controller 64-bit API.

Create a wallet canister with the multi-controller 64-bit API.

Create a wallet canister with the 128-bit API.

Create a wallet canister.

Store the wallet WASM inside the wallet canister. This is needed to enable wallet_create_wallet

Add a principal to the address book.

List the entries in the address book.

Remove a principal from the address book.

Get a list of all transaction events this wallet remembers, using the 64-bit API. Fails if any events are 128-bit.

Get a list of all transaction events this wallet remembers, using the 128-bit API.

Get a list of all transaction events this wallet remembers.

Forward a call to another canister, including an amount of cycles from the wallet, using the 64-bit API.

Forward a call to another canister, including an amount of cycles from the wallet, using the 128-bit API.

Forward a call to another canister, including an amount of cycles from the wallet.

Gets the managed canisters the wallet knows about.

Gets the ManagedCanisterEvents for a particular canister, if the wallet knows about that canister, using the 64-bit API.

Gets the ManagedCanisterEvents for a particular canister, if the wallet knows about that canister, using the 128-bit API.

Gets the ManagedCanisterEvents for a particular canister, if the wallet knows about that canister

Gets whether the wallet version supports initializing a canister with multiple controllers (introduced in 0.2.0).

Gets whether the wallet version supports 128-bit cycle counts (introduced in 0.3.0).

Methods from Deref<Target = Canister<'agent>>§

Get the canister ID of this canister.

Create an AsyncCallBuilder to do an update call.

Create a SyncCallBuilder to do a query call.

Call request_status on the RequestId in a loop and return the response as a byte vector.

Creates a copy of this canister, changing the canister ID to the provided principal.

Trait Implementations§

Returns a copy of the value. Read more
Performs copy-assignment from source. Read more
Formats the value using the given formatter. Read more
The resulting type after dereferencing.
Dereferences the value.

Auto Trait Implementations§

Blanket Implementations§

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Should always be Self
The resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning. Read more
Uses borrowed data to replace owned data, usually by cloning. Read more
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.