EmbeddedWallet

class EmbeddedWallet(val context: Context, val authClientId: String, val authTokenRetriever: AuthTokenRetriever, options: EmbeddedWalletOptions? = null)

Created by Fireblocks Ltd. on 24/07/2024. EmbeddedWallet is the main entry point for the Fireblocks Embedded Wallet SDK.

Parameters

context

The application context

authClientId

The authClientId of the EmbeddedWallet instance

authTokenRetriever

The AuthTokenRetriever instance

options

Throws

EmbeddedWalletException

Constructors

Link copied to clipboard
constructor(context: Context, authClientId: String, authTokenRetriever: AuthTokenRetriever, options: EmbeddedWalletOptions? = null)

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard
Link copied to clipboard

Functions

Link copied to clipboard
suspend fun addAsset(accountId: Int, assetId: String): Result<AddressDetails>

Add an asset to a specific account.

Link copied to clipboard

Assign a wallet.

Link copied to clipboard

Cancel a transaction by ID.

Link copied to clipboard
suspend fun createAccount(): Result<Account>

Create a new account.

Link copied to clipboard

Creates a new transaction. This endpoint can be used for regular Transfers, Contract Calls, Raw & Typed message signing. For Transfers, the required parameters are: assetId, source, destination and amount. For Contract Calls, the required parameters are: operation.CONTRACT_CALL, assetId (Base Asset), source, destination, amount (usually 0) and extraParameters object with contractCallData string. For RAW and Typed messages signing, the required parameters are: operation.RAW/TYPED_MESSAGE, assetId or derivationPath, source or derivationPath, extraParameters with rawMessageData object. Typed Message Signing is supported for the following asset IDs: 'ETH', 'BTC' and 'TRX'. Typed Message Signing Guide. For MEV Protection configuration the required parameters are: extraParameters with the nodeControls object

Link copied to clipboard

Create a new web3 connection.

Link copied to clipboard

Estimates the transaction fee for a specific transaction request. This endpoint simulates a transaction which means that the system will expect to have the requested asset and balance in the specified wallet.

Link copied to clipboard
suspend fun getAccounts(allPages: Boolean = true, pageCursor: String? = null, pageSize: Int? = null, order: Order? = null): Result<PaginatedResponse<Account>>

Get accounts

Link copied to clipboard
suspend fun getAddresses(accountId: Int, assetId: String, allPages: Boolean? = true, pageCursor: String? = null, pageSize: Int? = null, order: Order? = null): Result<PaginatedResponse<AddressDetails>>

Returns a paginated response of the addresses for a given vault account and asset.

Link copied to clipboard
suspend fun getAsset(accountId: Int, assetId: String): Result<Asset>

Get a specific asset for a specific account.

Link copied to clipboard
suspend fun getAssets(accountId: Int, allPages: Boolean? = true, pageCursor: String? = null, pageSize: Int? = null, order: Order? = null): Result<PaginatedResponse<Asset>>

Get all assets for a specific account.

Link copied to clipboard
suspend fun getBalance(accountId: Int, assetId: String): Result<AssetBalance>

Get the balance of a specific asset for a specific account.

Link copied to clipboard
suspend fun getDevice(deviceId: String): Result<Device>
Link copied to clipboard

Get the latest backup information.

Link copied to clipboard
suspend fun getNFT(id: String): Result<TokenResponse>

Get a specific NFT by ID.

Link copied to clipboard
suspend fun getOwnedNFTs(blockchainDescriptor: BlockchainDescriptor? = null, ncwAccountIds: List<String>? = null, ids: List<String>? = null, collectionIds: List<String>? = null, allPages: Boolean? = true, pageCursor: String? = null, pageSize: Int? = null, sort: List<GetOwnershipTokensSort>? = null, order: Order? = null, status: TokensStatus? = null, search: String? = null, spam: TokensSpam? = null): Result<PaginatedResponse<TokenOwnershipResponse>>

Get all owned NFTs.

Link copied to clipboard
suspend fun getSupportedAssets(allPages: Boolean? = true, pageCursor: String? = null, pageSize: Int? = null, onlyBaseAssets: Boolean? = null): Result<PaginatedResponse<Asset>>

Get all supported assets.

Link copied to clipboard

Get a specific transaction by ID.

Link copied to clipboard
suspend fun getTransactions(before: String? = null, after: String? = null, status: Status? = null, orderBy: OrderBy? = null, sort: Order? = null, limit: Int? = null, incoming: Boolean? = null, outgoing: Boolean? = null, sourceType: SourceType? = null, sourceId: String? = null, destType: DestType? = null, destId: String? = null, assets: List<String>? = null, txHash: String? = null, sourceWalletId: String? = null, destWalletId: String? = null, pageCursor: String? = null): Result<PaginatedResponse<TransactionResponse>>

Get transactions history Returns a list of transactions that were created within the specified time frame.

Link copied to clipboard
suspend fun getWeb3Connections(allPages: Boolean? = true, pageCursor: String? = null, pageSize: Int? = null, order: Order? = null, filter: Web3Filter? = null, sort: Web3ConnectionSort? = null): Result<PaginatedResponse<Web3Connection>>

Returns a paginated response of the web3 connections.

Link copied to clipboard
fun initializeCore(deviceId: String, keyStorage: FireblocksKeyStorage, coreOptions: CoreOptions? = null): Fireblocks

Initialize the Fireblocks core

Link copied to clipboard
suspend fun listOwnedAssets(allPages: Boolean? = true, pageCursor: String? = null, pageSize: Int? = null, sort: List<ListOwnedTokensSort>? = null, order: Order? = null, status: TokensStatus? = null, search: String? = null, spam: TokensSpam? = null): Result<PaginatedResponse<TokenOwnershipResponse>>

Returns all owned NFT assets

Link copied to clipboard
suspend fun listOwnedCollections(allPages: Boolean? = true, pageCursor: String? = null, pageSize: Int? = null, sort: List<ListOwnedTokensSort>? = null, order: Order? = null, status: TokensStatus? = null, search: String? = null): Result<PaginatedResponse<TokenOwnershipResponse>>

Returns all owned NFT collections

Link copied to clipboard
suspend fun refreshBalance(accountId: Int, assetId: String): Result<AssetBalance>

Refresh the balance of a specific asset for a specific account.

Link copied to clipboard
Link copied to clipboard