Class TokenBoundSmartWallet

A smart wallet controlled by the holder of a particular NFT.

Hierarchy

Constructors

Properties

#connectParams: undefined | ConnectParams<SmartWalletConnectionArgs>
chains: Chain[]
connector?: SmartWalletConnector
dappMetadata: DAppMetaData
tbaConnector?: TokenBoundSmartWalletConnector
tbaOptions: TokenBoundSmartWalletConfig
type: "evm" = "evm"
walletId: string
walletStorage: AsyncStorage
id: "tokenBoundSmartWallet" = walletIds.tokenBoundSmartWallet
meta: {
    iconURL: string;
    name: string;
} = ...

Type declaration

  • iconURL: string
  • name: string

Accessors

Methods

  • Add another admin to the smart wallet.

    Parameters

    • adminAddress: string

      the address of the admin to add.

    Returns Promise<Omit<TransactionResultWithMetadata<unknown>, "data">>

  • Create and add a session key to the smart wallet.

    Parameters

    • keyAddress: string

      the address of the session key to add.

    • permissions: {
          approvedCallTargets: Object;
          expirationDate?: number | Date;
          nativeTokenLimitPerTransaction?: string | number;
          startDate?: number | Date;
      }

      the permissions to grant to the session key.

      • approvedCallTargets: Object
      • Optional expirationDate?: number | Date
      • Optional nativeTokenLimitPerTransaction?: string | number
      • Optional startDate?: number | Date

    Returns Promise<Omit<TransactionResultWithMetadata<unknown>, "data">>

  • Manually deploy the smart wallet contract. If already deployed this will throw an error. Note that this is not necessary as the smart wallet will be deployed automatically on the first transaction the user makes.

    Returns Promise<Omit<TransactionResultWithMetadata<unknown>, "data">>

    the transaction receipt

  • Manually deploy the smart wallet contract. If already deployed this will do nothing. Note that this is not necessary as the smart wallet will be deployed automatically on the first transaction the user makes.

    Returns Promise<void>

    the transaction receipt

  • Estimate the gas cost of a single transaction

    Parameters

    • transaction: Transaction<any>

      the transaction to estimate

    Returns Promise<{
        details: {
            deployCost: BigNumber;
            deployGasLimit: BigNumber;
            gasPrice: BigNumber;
            totalCost: BigNumber;
            transactionCost: BigNumber;
            transactionGasLimit: BigNumber;
        };
        ether: string;
        wei: BigNumber;
    }>

  • Estimate the gas cost of a batch of transactions

    Parameters

    • transactions: Transaction<any>[]

      the transactions to estimate

    Returns Promise<{
        details: {
            deployCost: BigNumber;
            deployGasLimit: BigNumber;
            gasPrice: BigNumber;
            totalCost: BigNumber;
            transactionCost: BigNumber;
            transactionGasLimit: BigNumber;
        };
        ether: string;
        wei: BigNumber;
    }>

  • Estimate the gas cost of a batch of raw transactions

    Parameters

    • transactions: Deferrable<TransactionRequest>[]

      the transactions to estimate

    Returns Promise<{
        details: {
            deployCost: BigNumber;
            deployGasLimit: BigNumber;
            gasPrice: BigNumber;
            totalCost: BigNumber;
            transactionCost: BigNumber;
            transactionGasLimit: BigNumber;
        };
        ether: string;
        wei: BigNumber;
    }>

  • Estimate the gas cost of a single raw transaction

    Parameters

    • transactions: Deferrable<TransactionRequest>

      the transactions to estimate

    Returns Promise<{
        details: {
            deployCost: BigNumber;
            deployGasLimit: BigNumber;
            gasPrice: BigNumber;
            totalCost: BigNumber;
            transactionCost: BigNumber;
            transactionGasLimit: BigNumber;
        };
        ether: string;
        wei: BigNumber;
    }>

  • Execute a single transaction and wait for confirmations

    Parameters

    • transaction: Transaction<Omit<TransactionResultWithMetadata<unknown>, "data">>

      the transaction to execute

    Returns Promise<Omit<TransactionResultWithMetadata<unknown>, "data">>

    the transaction receipt

  • Execute multiple transactions in a single batch and wait for confirmations

    Parameters

    • transactions: Transaction<any>[]

      the transactions to execute

    Returns Promise<Omit<TransactionResultWithMetadata<unknown>, "data">>

    the transaction receipt

  • Execute multiple raw transactions in a single batch and wait for confirmations

    Parameters

    • transactions: Deferrable<TransactionRequest>[]

      the transactions to execute

    Returns Promise<Omit<TransactionResultWithMetadata<unknown>, "data">>

    the transaction receipt

  • Execute a single raw transaction and wait for confirmations

    Parameters

    • transaction: Deferrable<TransactionRequest>

      the transaction to execute

    Returns Promise<Omit<TransactionResultWithMetadata<unknown>, "data">>

    the transaction receipt

  • Parameters

    • currencyAddress: string = NATIVE_TOKEN_ADDRESS

    Returns Promise<{
        decimals: number;
        displayValue: string;
        name: string;
        symbol: string;
        value: BigNumber;
    }>

    the native token balance of the connected wallet

  • Check whether the connected signer can execute a given transaction using the smart wallet.

    Parameters

    • transaction: Transaction<Omit<TransactionResultWithMetadata<unknown>, "data">>

      the transaction to execute using the smart wallet.

    Returns Promise<boolean>

    whether the connected signer can execute the transaction using the smart wallet.

  • Send a single transaction without waiting for confirmations

    Parameters

    • transaction: Transaction<Omit<TransactionResultWithMetadata<unknown>, "data">>

      the transaction to send

    Returns Promise<TransactionResponse>

    the transaction result

  • Send a multiple transaction in a batch without waiting for confirmations

    Parameters

    • transactions: Transaction<Omit<TransactionResultWithMetadata<unknown>, "data">>[]

      the transactions to send

    Returns Promise<TransactionResponse>

    the transaction result

  • Send multiple raw transaction in a batch without waiting for confirmations

    Parameters

    • transactions: Deferrable<TransactionRequest>[]

      the transactions to send

    Returns Promise<TransactionResponse>

    the transaction result

  • Send a single raw transaction without waiting for confirmations

    Parameters

    • transaction: Deferrable<TransactionRequest>

      the transaction to send

    Returns Promise<TransactionResponse>

    the transaction result

  • Parameters

    • to: string
    • amount: string | number
    • currencyAddress: string = NATIVE_TOKEN_ADDRESS

    Returns Promise<Omit<TransactionResultWithMetadata<unknown>, "data">>

Generated using TypeDoc