diff --git a/sdk/js/CHANGELOG.md b/sdk/js/CHANGELOG.md index 745fa998..ee06955b 100644 --- a/sdk/js/CHANGELOG.md +++ b/sdk/js/CHANGELOG.md @@ -5,9 +5,15 @@ ### Added added parseSequencesFromLog\* + Terra NFT token bridge + getIsTransferCompleted on NFT bridge +export for wasm, createPostVaaInstructionSolana, createVerifySignaturesInstructionsSolana, postVaaSolana, postVaaSolanaWithRetry, and getSignedVAAWithRetry + +re-export top level objects ethers_contracts, solana, terra, rpc, utils, bridge, token_bridge, nft_bridge + ## 0.1.5 ### Added diff --git a/sdk/js/src/nft_bridge/getIsTransferCompleted.ts b/sdk/js/src/nft_bridge/getIsTransferCompleted.ts index 45a80566..e52680a8 100644 --- a/sdk/js/src/nft_bridge/getIsTransferCompleted.ts +++ b/sdk/js/src/nft_bridge/getIsTransferCompleted.ts @@ -9,7 +9,7 @@ import { redeemOnTerra } from "."; export async function getIsTransferCompletedEth( nftBridgeAddress: string, - provider: ethers.providers.Provider, + provider: ethers.Signer | ethers.providers.Provider, signedVAA: Uint8Array ) { const nftBridge = NFTBridge__factory.connect(nftBridgeAddress, provider); diff --git a/sdk/js/src/nft_bridge/getIsWrappedAsset.ts b/sdk/js/src/nft_bridge/getIsWrappedAsset.ts index 7e843b94..7cd1f493 100644 --- a/sdk/js/src/nft_bridge/getIsWrappedAsset.ts +++ b/sdk/js/src/nft_bridge/getIsWrappedAsset.ts @@ -12,7 +12,7 @@ import { importNftWasm } from "../solana/wasm"; */ export async function getIsWrappedAssetEth( tokenBridgeAddress: string, - provider: ethers.providers.Web3Provider, + provider: ethers.Signer | ethers.providers.Provider, assetAddress: string ) { if (!assetAddress) return false; diff --git a/sdk/js/src/nft_bridge/getOriginalAsset.ts b/sdk/js/src/nft_bridge/getOriginalAsset.ts index de098254..d8f05256 100644 --- a/sdk/js/src/nft_bridge/getOriginalAsset.ts +++ b/sdk/js/src/nft_bridge/getOriginalAsset.ts @@ -24,7 +24,7 @@ export interface WormholeWrappedNFTInfo { */ export async function getOriginalAssetEth( tokenBridgeAddress: string, - provider: ethers.providers.Web3Provider, + provider: ethers.Signer | ethers.providers.Provider, wrappedAddress: string, tokenId: string, lookupChainId: ChainId diff --git a/sdk/js/src/rpc/getSignedVAAWithRetry.ts b/sdk/js/src/rpc/getSignedVAAWithRetry.ts index 9e3f357f..227598f3 100644 --- a/sdk/js/src/rpc/getSignedVAAWithRetry.ts +++ b/sdk/js/src/rpc/getSignedVAAWithRetry.ts @@ -1,6 +1,6 @@ import { ChainId, getSignedVAA } from ".."; -export default async function getSignedVAAWithRetry( +export async function getSignedVAAWithRetry( hosts: string[], emitterChain: ChainId, emitterAddress: string, @@ -32,3 +32,5 @@ export default async function getSignedVAAWithRetry( } return result; } + +export default getSignedVAAWithRetry; diff --git a/sdk/js/src/rpc/index.ts b/sdk/js/src/rpc/index.ts index 2fc4bf25..72faa582 100644 --- a/sdk/js/src/rpc/index.ts +++ b/sdk/js/src/rpc/index.ts @@ -1,2 +1,2 @@ export * from "./getSignedVAA"; -export * from "./getSignedVAAWithRetry"; +export { getSignedVAAWithRetry } from "./getSignedVAAWithRetry"; diff --git a/sdk/js/src/solana/index.ts b/sdk/js/src/solana/index.ts index 135e7124..9fd69ee1 100644 --- a/sdk/js/src/solana/index.ts +++ b/sdk/js/src/solana/index.ts @@ -1,4 +1,9 @@ export * from "./getBridgeFeeIx"; -export { postVaa as postVaaSolana } from "./postVaa"; -export { postVaaWithRetry as postVaaSolanaWithRetry } from "./postVaa"; +export { + createPostVaaInstruction as createPostVaaInstructionSolana, + createVerifySignaturesInstructions as createVerifySignaturesInstructionsSolana, + postVaa as postVaaSolana, + postVaaWithRetry as postVaaSolanaWithRetry, +} from "./postVaa"; export * from "./rust"; +export * from "./wasm"; diff --git a/sdk/js/src/token_bridge/getForeignAsset.ts b/sdk/js/src/token_bridge/getForeignAsset.ts index c73937d6..ea17f702 100644 --- a/sdk/js/src/token_bridge/getForeignAsset.ts +++ b/sdk/js/src/token_bridge/getForeignAsset.ts @@ -16,7 +16,7 @@ import { importTokenWasm } from "../solana/wasm"; */ export async function getForeignAssetEth( tokenBridgeAddress: string, - provider: ethers.providers.Web3Provider, + provider: ethers.Signer | ethers.providers.Provider, originChain: ChainId, originAsset: Uint8Array ) { diff --git a/sdk/js/src/token_bridge/getIsTransferCompleted.ts b/sdk/js/src/token_bridge/getIsTransferCompleted.ts index 699f0f5f..4ab6465e 100644 --- a/sdk/js/src/token_bridge/getIsTransferCompleted.ts +++ b/sdk/js/src/token_bridge/getIsTransferCompleted.ts @@ -9,7 +9,7 @@ import { redeemOnTerra } from "."; export async function getIsTransferCompletedEth( tokenBridgeAddress: string, - provider: ethers.providers.Provider, + provider: ethers.Signer | ethers.providers.Provider, signedVAA: Uint8Array ) { const tokenBridge = Bridge__factory.connect(tokenBridgeAddress, provider); diff --git a/sdk/js/src/token_bridge/getIsWrappedAsset.ts b/sdk/js/src/token_bridge/getIsWrappedAsset.ts index c7941333..15a7cfcc 100644 --- a/sdk/js/src/token_bridge/getIsWrappedAsset.ts +++ b/sdk/js/src/token_bridge/getIsWrappedAsset.ts @@ -13,7 +13,7 @@ import { importTokenWasm } from "../solana/wasm"; */ export async function getIsWrappedAssetEth( tokenBridgeAddress: string, - provider: ethers.providers.Web3Provider, + provider: ethers.Signer | ethers.providers.Provider, assetAddress: string ) { if (!assetAddress) return false; diff --git a/sdk/js/src/token_bridge/getOriginalAsset.ts b/sdk/js/src/token_bridge/getOriginalAsset.ts index 3b485b70..b745fe13 100644 --- a/sdk/js/src/token_bridge/getOriginalAsset.ts +++ b/sdk/js/src/token_bridge/getOriginalAsset.ts @@ -23,7 +23,7 @@ export interface WormholeWrappedInfo { */ export async function getOriginalAssetEth( tokenBridgeAddress: string, - provider: ethers.providers.Web3Provider, + provider: ethers.Signer | ethers.providers.Provider, wrappedAddress: string, lookupChainId: ChainId ): Promise {