WDK logoWDK documentation

API Reference

Complete API documentation for @tetherto/wdk-protocol-bridge-usdt0-evm

API Reference

Table of Contents

ClassDescriptionMethods
Usdt0ProtocolEvmExtends @tetherto/wdk-wallet.Constructor, Methods

Usdt0ProtocolEvm

Extends @tetherto/wdk-wallet

Constructor

new Usdt0ProtocolEvm(account, config?)
Parameters
  • account (WalletAccountReadOnlyEvm | WalletAccountReadOnlyEvmErc4337): The wallet account to use to interact with the protocol.
  • config (BridgeProtocolConfig, optional): The bridge protocol configuration.
Source

src/usdt0-protocol-evm.js#L52

Methods

MethodDescriptionReturnsThrows
bridge(options, config)Bridges a token to a different blockchain. Users must first approve the necessary amount of tokens to the usdt0 protocol using the WalletAccountEvm#approve or the WalletAccountEvmErc4337#approve method.Promise<BridgeResult>-
quoteBridge(options, config)Quotes the costs of a bridge operation. Users must first approve the necessary amount of tokens to the usdt0 protocol using the WalletAccountEvm#approve or the WalletAccountEvmErc4337#approve method.Promise<Omit<BridgeResult, "hash">>-

bridge(options, config)

Bridges a token to a different blockchain.

Users must first approve the necessary amount of tokens to the usdt0 protocol using the WalletAccountEvm#approve or the WalletAccountEvmErc4337#approve method.

Parameters
  • options (BridgeOptions): The bridge's options. Optionally pass 'oftContractAddress' to use a custom OFT contract address instead of the auto-resolved one, and/or 'dstEid' to override the destination endpoint id.
  • config (Partial<EvmErc4337WalletPaymasterTokenConfig | EvmErc4337WalletSponsorshipPolicyConfig | EvmErc4337WalletNativeCoinsConfig> & Pick<BridgeProtocolConfig, "bridgeMaxFee">, optional): If the protocol has been initialized with an erc-4337 wallet account, it can be used to override its configuration options along with the 'bridgeMaxFee' option.
Returns

Promise<BridgeResult> - The bridge's result.

Source

src/usdt0-protocol-evm.js#L91

quoteBridge(options, config)

Quotes the costs of a bridge operation.

Users must first approve the necessary amount of tokens to the usdt0 protocol using the WalletAccountEvm#approve or the WalletAccountEvmErc4337#approve method.

Parameters
  • options (BridgeOptions): The bridge's options. Optionally pass 'oftContractAddress' to use a custom OFT contract address instead of the auto-resolved one, and/or 'dstEid' to override the destination endpoint id.
  • config (Partial<EvmErc4337WalletPaymasterTokenConfig | EvmErc4337WalletSponsorshipPolicyConfig | EvmErc4337WalletNativeCoinsConfig>, optional): If the protocol has been initialized with an erc-4337 wallet account, it can be used to override its configuration options.
Returns

Promise<Omit<BridgeResult, "hash">> - The bridge's quotes.

Source

src/usdt0-protocol-evm.js#L138


Types

BridgeOptions

PropertyTypeDescription
amount`numberbigint`
dstEid?numberCustom LayerZero destination endpoint ID to override the default for the target chain.
oftContractAddress?stringCustom OFT contract address to use instead of auto-resolving from the source chain.
recipientstringThe address of the recipient.
targetChainstringThe identifier of the destination blockchain (e.g., "arbitrum").
tokenstringThe address of the token to bridge.
Source

src/usdt0-protocol-evm.js#L39

On this page