fuse_wallet_sdk library

Classes

ABI
AbiType<T>
A type that can be encoded and decoded as specified in the solidity ABI, available at https://solidity.readthedocs.io/en/develop/abi-spec.html
Account
Represents a user account with an ID, address, and a list of collectibles.
Action
A class representing different types of actions related to wallet operations.
ActionResult
A class representing the result of an action performed on the blockchain.
ActionsConverter
A class that implements JsonConverter to convert JSON objects to a list of Action objects and vice versa.
Address
An Address class represents the address data.
Addresses
AddressType
Solidity address type
AmountFormat
A utility class for formatting and converting token amounts.
ApproveToken
AuthDto
Represents an authentication object containing the owner's address, signature, and hash.
BaseArrayType<T>
Base class for (non-byte) arrays in solidity.
BatchTransaction
BlockInformation
BlockNum
For operations that are reading data from the blockchain without making a transaction that would modify it, the Ethereum client can read that data from previous states of the blockchain as well. This class specifies which state to use.
BoolType
Solidity bool type
BridgedToken
BundlerJsonRpcProvider
A wrapper over JsonRPC, specifically for the Bundler RPC.
Call
Client
A Client class for interacting with an ERC-4337 bundler.
Collectible
A data class representing a collectible item in a collection.
CollectibleConverter
A JSON converter to convert between a list of Collectible instances and a list of JSON objects.
Collection
A Collection class represents the collection data.
CompositeFunctionParameter
A function parameter that includes other named parameter instead of just wrapping single types.
ContractAbi
Defines the abi of a deployed Ethereum contract. The abi contains information about the functions defined in that contract.
ContractEvent
An event that can be emitted by a smart contract during a transaction.
ContractFunction
A function defined in the ABI of an compiled contract.
ContractsHelper
A utility class providing methods to interact with contracts.
ContractsUtils
A utility class providing methods to interact with contracts.
CreateWallet
Credentials
Anything that can sign payloads with a private key.
CredentialsWithKnownAddress
Credentials where the address is known synchronously.
CustomTransactionSender
Interface for Credentials that don't sign transactions locally, for instance because the private key is not known to this library.
DC<Error, Data>
Data channel could be used to transport data across the dart program Data channel can move any data ranging from external http api response to internal data.
DecodingResult<T>
Decoding Result.
DeployedContract
Helper class that defines a contract with a known ABI that has been deployed on a Ethereum blockchain.
DynamicBytes
The solidity bytes type, which decodes byte arrays of arbitrary length.
DynamicLengthArray<T>
The solidity T[] type for arrays with an dynamic length.
EncodingLengthInfo
Information about whether the length of an encoding depends on the data (dynamic) or is fixed (static). If it's static, also contains information about the length of the encoding.
ERC20
ERC20Transfer
Erc20Transfers
ERC4337
A class that encapsulates constants related to the ERC-4337 protocol.
ERC721
ERC721Transfer
Erc721Transfers
EtherAmount
Utility class to easily convert amounts of Ether into different units of quantities.
EthereumAddress
Represents an Ethereum address.
EtherspotWallet
A EtherspotWallet class that extends the UserOperationBuilder. This class provides methods for interacting with an 4337 EtherspotWallet.
EthPrivateKey
Credentials that can sign payloads with an Ethereum private key.
EventComponent<T>
A FunctionParameter that is a component of an event. Contains additional information about whether the parameter is indexed.
FiatDeposit
FilterEvent
A log event emitted in a transaction.
FilterOptions
Options for event filters created with Web3Client.events.
FixedBytes
The bytes
FixedLengthArray<T>
The solidity T[k] type for arrays whose length is known.
FunctionParameter<T>
The parameter of a function with its name and the expected type.
FunctionType
Function Type
FuseSDK
The main SDK class for interacting with FuseBox.
FuseWalletSDK
GeneratedContract
Base classes for generated contracts.
IClient
An interface for the client class.
IClientOpts
Class for options related to the client.
IntervalStats
A class representing interval-based statistics for a financial instrument.
IntType
The solidity int
IPresetBuilderOpts
Options for the preset builder.
ISafeConstant
ISendUserOperationOpts
Options for sending user operations.
ISendUserOperationResponse
Response for the sendUserOperation method.
IToken
The IToken interface defines properties common to all token types.
IUserOperation
IUserOperation is a class representing an ERC-4337 User Operation. Building a UserOperation involves constructing multiple parts and merging them together.
IUserOperationBuilder
An abstract class representing a builder for a IUserOperation.
IUserOperationMiddlewareCtx
Context for the middleware of user operations.
Kernel
A kernel class that extends the UserOperationBuilder. This class provides methods for interacting with an 4337 ZeroDev Kernel.
KernelModes
LengthTrackingByteSink
LiquidityPoolToken
LpUnderlyingTokens
A class representing the underlying tokens of a liquidity pool (LP) token.
MiscToken
Mnemonic
A utility class for generating and validating mnemonics, and deriving private keys from them.
Native
NativeToken
NftReceive
NftTransfer
Receive
ReceiveNFT
Relay
A class representing a relay object used in the relay process.
Safe
Send
SimpleAccount
A simple account class that extends the UserOperationBuilder. This class provides methods for interacting with an 4337 simple account.
SmartWallet
Represents a smart wallet with its associated properties.
SmartWalletAuth
Class for handling authentication processes for Fuse Smart Wallets.
SmartWalletEvent
A class that represents a Smart Wallet event.
StakedToken
A class representing a staked token.
StakedTokenResponse
A class representing a response containing staked tokens information.
StakeRequestBody
A class representing the request body for a staking operation.
StakeResponseBody
A class representing the response body for a staking operation.
StakeTokens
StakeTokensAction
StakingOption
A class representing a staking option in a staking platform.
StringType
The solidity string type, which utf-8 encodes strings
Swap
SwapTokens
SyncInformation
When the client is currently syncing its blockchain with the network, this representation can be used to find information about at which block the node was before the sync, at which node it currently is and at which block the node will complete its sync.
TimestampConverter
A converter that helps in converting a timestamp from a string to an integer and vice versa.
TokenDetails
A class representing token details. It has different constructors for different types of tokens: Native, LiquidityPoolToken, BridgedToken, MiscToken, ERC20, and ERC721.
TokenEvent
Represents different types of token events.
TokenList
The TokenList class holds the token list data.
TokenReceive
TokenTransfer
TradeData
Represents the data associated with a trade on a blockchain.
TradeRequest
Represents the body of a trade request.
Transaction
TransactionInformation
TransactionReceipt
TupleType
Tuple Type
TxOptions
Represents options for conducting a blockchain transaction, particularly focusing on the fee structure and potential retries.
UintType
The solidity uint
UnstakeRequestBody
A class representing the request body for an unstaking operation.
UnstakeResponseBody
A class representing the response body for an unstaking operation.
UnstakeTokens
UnstakeTokensAction
UserOp
UserOperationBuilder
A concrete implementation of IUserOperationBuilder that provides a flexible way to construct a IUserOperation.
Variables
Wallet
Represents a wallet file. Wallets are used to securely store credentials like a private key belonging to an Ethereum address. The private key in a wallet is encrypted with a secret password that needs to be known in order to obtain the private key.
WalletAction
A class representing different types of actions related to wallet operations.
WalletActionResult
Represents the result of an action performed on the blockchain.
WalletActionsConverter
Converts JSON objects to a list of WalletAction objects and vice versa.
WalletModules
Represents the different modules associated with a wallet.
WalletUpgrade
Represents a wallet upgrade.
Web3Client
Class for sending requests over an HTTP JSON-RPC API endpoint to Ethereum clients. This library won't use the accounts feature of clients to use them to create transactions, you will instead have to obtain private keys of accounts yourself.
WebSocketConnection
A class that represents a WebSocket connection using the Centrifuge client library.

Enums

ContractFunctionType
Contract Function Type
EtherUnit
Operation
StateMutability
The state mutability of a contract function defines how that function interacts with the blockchain.
TimeFrame

Extensions

E on String

Constants

sizeUnitBytes → const int
The length of the encoding of a solidity type is always a multiplicative of this unit size.

Functions

addressFromJson(String address) String
amountFromJson(String? value) BigInt
calculatePadLength(int bodyLength, {bool allowEmpty = false}) int
Calculates the amount of padding bytes needed so that the length of the padding plus the bodyLength is a multiplicative of sizeUnitBytes. If allowEmpty (defaults to false) is true, an empty length is allowed. Otherwise an empty bodyLength will be given a full sizeUnitBytes padding.
decimalsFromJson(String? decimals) int
decodeAbi(List<String> types, Uint8List value) List
eip1559GasPrice(Web3Client client) Future<Map<String, dynamic>>
encode(dynamic value) List<int>
encodeAbi(List<String> types, List values) Uint8List
encodeList(List list, LengthTrackingByteSink builder) → void
eOASignature(EthPrivateKey credentials) UserOperationMiddlewareFn
estimateUserOperationGas(Web3Client client) UserOperationMiddlewareFn
getGasPrice(Web3Client client) UserOperationMiddlewareFn
hexlify(BigInt dec) String
hexZeroPad(String value, num length) String
legacyGasPrice(Web3Client client) Future<Map<String, dynamic>>
nameFromJson(String tokenName) String
padUint8ListTo32(Uint8List data) Uint8List
parseAbiType(String name) AbiType
Parses an ABI type from its AbiType.name.
prependTransactionType(int type, Uint8List transaction) Uint8List
signTransactionRaw(Transaction transaction, Credentials c, {int? chainId = 1}) Uint8List
signUserOpHash(EthPrivateKey credentials) UserOperationMiddlewareFn
uint8ListFromList(List<int> data) Uint8List
verifyingPaymaster(String paymasterRpc, Map<String, dynamic> context) UserOperationMiddlewareFn

Typedefs

SocketConnector = StreamChannel<String> Function()
Signature for a function that opens a socket on which json-rpc operations can be performed.
UserOperationMiddlewareFn = Future<void> Function(IUserOperationMiddlewareCtx context)
Interface for a user operation middleware.

Exceptions / Errors

WalletAlreadyExistsException