API Reference
Complete API documentation for @tetherto/wdk-protocol-bridge-usdt0-evm
API Reference
Table of Contents
| Class | Description | Methods |
|---|---|---|
| Usdt0ProtocolEvm | Extends @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
Methods
| Method | Description | Returns | Throws |
|---|---|---|---|
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
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
| Property | Type | Description |
|---|---|---|
amount | `number | bigint` |
dstEid? | number | Custom LayerZero destination endpoint ID to override the default for the target chain. |
oftContractAddress? | string | Custom OFT contract address to use instead of auto-resolving from the source chain. |
recipient | string | The address of the recipient. |
targetChain | string | The identifier of the destination blockchain (e.g., "arbitrum"). |
token | string | The address of the token to bridge. |