# 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 core/definitions/dist/esm/testing/mocks/tokenBridge.d.ts:3

#####
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 core/definitions/dist/esm/testing/mocks/tokenBridge.d.ts:5

## Properties

### `Readonly` rpc

rpc: any

- Defined in core/definitions/dist/esm/testing/mocks/tokenBridge.d.ts:4

## 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 core/definitions/dist/esm/testing/mocks/tokenBridge.d.ts:11

### getOriginalAsset

- getOriginalAsset(token): Promise<ChainAddress>

- #### Parameters

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

  #### Returns Promise<ChainAddress>

  Implementation of TokenBridge.getOriginalAsset

  - Defined in core/definitions/dist/esm/testing/mocks/tokenBridge.d.ts:7

### getWrappedAsset

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

- #### Parameters

  - ##### original: ChainAddress

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

  Implementation of TokenBridge.getWrappedAsset

  - Defined in core/definitions/dist/esm/testing/mocks/tokenBridge.d.ts:9

### getWrappedNative

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

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

  Implementation of TokenBridge.getWrappedNative

  - Defined in core/definitions/dist/esm/testing/mocks/tokenBridge.d.ts:15

### hasWrappedAsset

- hasWrappedAsset(original): Promise<boolean>

- #### Parameters

  - ##### original: ChainAddress

  #### Returns Promise<boolean>

  Implementation of TokenBridge.hasWrappedAsset

  - Defined in core/definitions/dist/esm/testing/mocks/tokenBridge.d.ts:8

### isTransferCompleted

- isTransferCompleted(vaa): Promise<boolean>

- #### Parameters

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

  #### Returns Promise<boolean>

  Implementation of TokenBridge.isTransferCompleted

  - Defined in core/definitions/dist/esm/testing/mocks/tokenBridge.d.ts:10

### isWrappedAsset

- isWrappedAsset(token): Promise<boolean>

- #### Parameters

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

  #### Returns Promise<boolean>

  Implementation of TokenBridge.isWrappedAsset

  - Defined in core/definitions/dist/esm/testing/mocks/tokenBridge.d.ts:6

### 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 core/definitions/dist/esm/testing/mocks/tokenBridge.d.ts:14

### 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 core/definitions/dist/esm/testing/mocks/tokenBridge.d.ts:12

### 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 core/definitions/dist/esm/testing/mocks/tokenBridge.d.ts:13

Generated using TypeDoc