FuseWalletSDK class

Annotations
  • @Deprecated('Use FuseSDK instead, This class will be removed in the near future.')

Constructors

FuseWalletSDK(String publicApiKey, {String baseUrl = Variables.BASE_URL, String rpcUrl = Variables.FUSE_RPC_URL, String websocketServerURL = Variables.DEFAULT_SOCKET_SERVER_URL})
Constructs a new instance of FuseWalletSDK.

Properties

explorerModule → ExplorerModule
no setter
hashCode int
The hash code for this object.
no setterinherited
jwtToken String
no getter
nftModule → NftModule
no setter
publicApiKey String
The public API key used to access the Fuse API.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
setWallet SmartWallet
no getter
smartWallet SmartWallet
The smart wallet associated with the authenticated user.
getter/setter pair
stakingModule → StakingModule
no setter
tradeModule → TradeModule
no setter
web3client Web3Client
The Web3 client used for sending requests over an HTTP JSON-RPC API endpoint to Ethereum clients.
final
webSocketConnection WebSocketConnection?
getter/setter pair
websocketServerURL String
final

Methods

addModule(EthPrivateKey credentials, String disableModuleName, String disableModuleAddress, String enableModuleAddress, {Map<String, dynamic>? transactionBody}) Future<DC<Exception, Stream<SmartWalletEvent>>>
approveToken(EthPrivateKey credentials, String tokenAddress, String spender, String value, {Map<String, dynamic>? transactionBody}) Future<DC<Exception, Stream<SmartWalletEvent>>>
approveTokenAndCallContract(EthPrivateKey credentials, String tokenAddress, String contractAddress, String value, String encodedData, {Map<String, dynamic>? transactionBody}) Future<DC<Exception, Stream<SmartWalletEvent>>>
authenticate(EthPrivateKey credentials) Future<DC<Exception, String>>
This function authenticates the provided credentials by sending a request to the server.
callContract(EthPrivateKey credentials, String contractAddress, String encodedData, {BigInt? value, Map<String, dynamic>? transactionBody}) Future<DC<Exception, Stream<SmartWalletEvent>>>
createWallet() Future<DC<Exception, Stream<SmartWalletEvent>>>
Creates a new smart wallet and returns a stream of SmartWalletEvents.
disconnectWebSocketClient() Future<void>?
encodeDataAndApproveTokenAndCallContract(EthPrivateKey credentials, String jsonInterface, String contractAddress, String contractName, String methodName, String tokenAddress, String value, List params, {Map<String, dynamic>? transactionBody}) Future<DC<Exception, Stream<SmartWalletEvent>>>
encodeDataAndCallContract(EthPrivateKey credentials, String jsonInterface, String contractAddress, String contractName, String methodName, BigInt value, List params, {Map<String, dynamic>? transactionBody}) Future<DC<Exception, Stream<SmartWalletEvent>>>
fetchWallet() Future<DC<Exception, SmartWallet>>
Fetches the SmartWallet information for the user.
getBalance(String tokenAddress, String address) Future<DC<Exception, BigInt>>
getHistoricalActions({int page = 1, int limit = 10, int? updatedAt, String? tokenAddress}) Future<DC<Exception, ActionResult>>
Retrieves historical actions for a smart wallet, with optional filtering by token address and update time.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
reconnectWebSocketClient() Future<void>?
stakeToken(EthPrivateKey credentials, StakeRequestBody stakeRequestBody) Future<DC<Exception, Stream<SmartWalletEvent>>>
swapTokens(EthPrivateKey credentials, TradeRequest tradeRequest) Future<DC<Exception, Stream<SmartWalletEvent>>>
toString() String
A string representation of this object.
inherited
transferNft(EthPrivateKey credentials, String nftContractAddress, String recipientAddress, num tokenId, {bool? isSafeTransfer = false, String transactionData = '0x', Map<String, dynamic>? transactionDetails = const {}}) Future<DC<Exception, Stream<SmartWalletEvent>>>
transferToken(EthPrivateKey credentials, String tokenAddress, String recipientAddress, String value, {String transactionData = '0x', String? externalId}) Future<DC<Exception, Stream<SmartWalletEvent>>>
unstakeToken(EthPrivateKey credentials, UnstakeRequestBody unstakeRequestBody, String unStakeTokenAddress) Future<DC<Exception, Stream<SmartWalletEvent>>>

Operators

operator ==(Object other) bool
The equality operator.
inherited