# Class MockTokenBridge<N, P, C>

#### Type Parameters

- #### N extends Network

- #### P extends Platform

- #### C extends PlatformToChains<P>

#### Hierarchy

- MockTokenBridge

#### Implements

- TokenBridge<N, P, C>

- Defined in definitions/src/testing/mocks/tokenBridge.ts:11

#####
Index

### Constructors

constructor

### Properties

rpc

### Methods

createAttestation
getOriginalAsset
getWrappedAsset
getWrappedNative
hasWrappedAsset
isTransferCompleted
isWrappedAsset
redeem
submitAttestation
transfer

## Constructors

### constructor

- new MockTokenBridge<N, P, C>(rpc): testing.mocks.MockTokenBridge<N, P, C>

- #### Type Parameters

  - #### N extends "Mainnet" | "Testnet" | "Devnet"

  - #### P extends "Solana" | "Algorand" | "Near" | "Sui" | "Aptos" | "Btc" | "Evm" | "Cosmwasm"

  - #### C extends "Solana" | "Ethereum" | "Terra" | "Bsc" | "Polygon" | "Avalanche" | "Oasis" | "Algorand" | "Aurora" | "Fantom" | "Karura" | "Acala" | "Klaytn" | "Celo" | "Near" | "Moonbeam" | "Neon" | "Terra2" | "Injective" | "Osmosis" | "Sui" | "Aptos" | "Arbitrum" | "Optimism" | "Gnosis" | "Pythnet" | "Xpla" | "Btc" | "Base" | "Sei" | "Rootstock" | "Wormchain" | "Cosmoshub" | "Evmos" | "Kujira" | "Sepolia" | "ArbitrumSepolia" | "BaseSepolia" | "OptimismSepolia" | "Holesky"

  #### Parameters

  - ##### rpc: any

  #### Returns testing.mocks.MockTokenBridge<N, P, C>

  - Defined in definitions/src/testing/mocks/tokenBridge.ts:14

## Properties

### `Readonly` rpc

rpc: any

- Defined in definitions/src/testing/mocks/tokenBridge.ts:14

## Methods

### createAttestation

- createAttestation(address): AsyncGenerator<UnsignedTransaction<N, C>, any, unknown>

- #### Parameters

  - ##### address: TokenAddress<C>

  #### Returns AsyncGenerator<UnsignedTransaction<N, C>, any, unknown>

  Implementation of TokenBridge.createAttestation

  - Defined in definitions/src/testing/mocks/tokenBridge.ts:31

### getOriginalAsset

- getOriginalAsset(token): Promise<ChainAddress>

- #### Parameters

  - ##### token: TokenAddress<C>

  #### Returns Promise<ChainAddress>

  Implementation of TokenBridge.getOriginalAsset

  - Defined in definitions/src/testing/mocks/tokenBridge.ts:19

### getWrappedAsset

- getWrappedAsset(original): Promise<NativeAddress<C>>

- #### Parameters

  - ##### original: ChainAddress

  #### Returns Promise<NativeAddress<C>>

  Implementation of TokenBridge.getWrappedAsset

  - Defined in definitions/src/testing/mocks/tokenBridge.ts:25

### getWrappedNative

- getWrappedNative(): Promise<NativeAddress<C>>

- #### Returns Promise<NativeAddress<C>>

  Implementation of TokenBridge.getWrappedNative

  - Defined in definitions/src/testing/mocks/tokenBridge.ts:53

### hasWrappedAsset

- hasWrappedAsset(original): Promise<boolean>

- #### Parameters

  - ##### original: ChainAddress

  #### Returns Promise<boolean>

  Implementation of TokenBridge.hasWrappedAsset

  - Defined in definitions/src/testing/mocks/tokenBridge.ts:22

### isTransferCompleted

- isTransferCompleted(vaa): Promise<boolean>

- #### Parameters

  - ##### vaa: VAA<"TokenBridge:Transfer"> | VAA<"TokenBridge:TransferWithPayload">

  #### Returns Promise<boolean>

  Implementation of TokenBridge.isTransferCompleted

  - Defined in definitions/src/testing/mocks/tokenBridge.ts:28

### isWrappedAsset

- isWrappedAsset(token): Promise<boolean>

- #### Parameters

  - ##### token: TokenAddress<C>

  #### Returns Promise<boolean>

  Implementation of TokenBridge.isWrappedAsset

  - Defined in definitions/src/testing/mocks/tokenBridge.ts:16

### redeem

- redeem(sender, vaa, unwrapNative?): AsyncGenerator<UnsignedTransaction<N, C>, any, unknown>

- #### Parameters

  - ##### sender: TokenAddress<C>

  - ##### vaa: VAA<"TokenBridge:Transfer"> | VAA<"TokenBridge:TransferWithPayload">

  - ##### `Optional` unwrapNative: boolean

  #### Returns AsyncGenerator<UnsignedTransaction<N, C>, any, unknown>

  Implementation of TokenBridge.redeem

  - Defined in definitions/src/testing/mocks/tokenBridge.ts:46

### submitAttestation

- submitAttestation(vaa): AsyncGenerator<UnsignedTransaction<N, C>, any, unknown>

- #### Parameters

  - ##### vaa: VAA<"TokenBridge:AttestMeta">

  #### Returns AsyncGenerator<UnsignedTransaction<N, C>, any, unknown>

  Implementation of TokenBridge.submitAttestation

  - Defined in definitions/src/testing/mocks/tokenBridge.ts:34

### transfer

- transfer(sender, recipient, token, amount, payload?): AsyncGenerator<UnsignedTransaction<N, C>, any, unknown>

- #### Parameters

  - ##### sender: TokenAddress<C>

  - ##### recipient: ChainAddress

  - ##### token: TokenAddress<C>

  - ##### amount: bigint

  - ##### `Optional` payload: Uint8Array

  #### Returns AsyncGenerator<UnsignedTransaction<N, C>, any, unknown>

  Implementation of TokenBridge.transfer

  - Defined in definitions/src/testing/mocks/tokenBridge.ts:37

Generated using TypeDoc