@wormhole-foundation/connect-sdk-solana
Advanced tools
Comparing version 0.2.0-beta.9 to 0.2.1-beta.0
@@ -1,6 +0,6 @@ | ||
import { ChainAddress, ChainContext, Network, TokenId, UniversalOrNative } from '@wormhole-foundation/connect-sdk'; | ||
import { ChainAddress, ChainContext, Network, UniversalOrNative } from '@wormhole-foundation/connect-sdk'; | ||
import { SolanaChains, SolanaPlatformType } from './types'; | ||
export declare class SolanaChain<N extends Network, C extends SolanaChains = SolanaChains> extends ChainContext<N, SolanaPlatformType, C> { | ||
getTokenAccount(address: UniversalOrNative<C>, token: TokenId<C>): Promise<ChainAddress<C>>; | ||
getTokenAccount(address: UniversalOrNative<C>, token: UniversalOrNative<C>): Promise<ChainAddress<C>>; | ||
} | ||
//# sourceMappingURL=chain.d.ts.map |
@@ -9,3 +9,3 @@ "use strict"; | ||
async getTokenAccount(address, token) { | ||
const mint = token.address.toNative(this.chain).unwrap(); | ||
const mint = token.toNative(this.chain).unwrap(); | ||
const owner = new address_1.SolanaAddress(address).unwrap(); | ||
@@ -12,0 +12,0 @@ const ata = await (0, spl_token_1.getAssociatedTokenAddress)(mint, owner); |
@@ -1,6 +0,6 @@ | ||
import { ChainAddress, ChainContext, Network, TokenId, UniversalOrNative } from '@wormhole-foundation/connect-sdk'; | ||
import { ChainAddress, ChainContext, Network, UniversalOrNative } from '@wormhole-foundation/connect-sdk'; | ||
import { SolanaChains, SolanaPlatformType } from './types'; | ||
export declare class SolanaChain<N extends Network, C extends SolanaChains = SolanaChains> extends ChainContext<N, SolanaPlatformType, C> { | ||
getTokenAccount(address: UniversalOrNative<C>, token: TokenId<C>): Promise<ChainAddress<C>>; | ||
getTokenAccount(address: UniversalOrNative<C>, token: UniversalOrNative<C>): Promise<ChainAddress<C>>; | ||
} | ||
//# sourceMappingURL=chain.d.ts.map |
@@ -6,3 +6,3 @@ import { getAssociatedTokenAddress } from '@solana/spl-token'; | ||
async getTokenAccount(address, token) { | ||
const mint = token.address.toNative(this.chain).unwrap(); | ||
const mint = token.toNative(this.chain).unwrap(); | ||
const owner = new SolanaAddress(address).unwrap(); | ||
@@ -9,0 +9,0 @@ const ata = await getAssociatedTokenAddress(mint, owner); |
{ | ||
"name": "@wormhole-foundation/connect-sdk-solana", | ||
"version": "0.2.0-beta.9", | ||
"version": "0.2.1-beta.0", | ||
"repository": { | ||
@@ -49,3 +49,3 @@ "type": "git", | ||
"dependencies": { | ||
"@wormhole-foundation/connect-sdk": "^0.2.0-beta.9", | ||
"@wormhole-foundation/connect-sdk": "^0.2.1-beta.0", | ||
"@coral-xyz/borsh": "0.2.6", | ||
@@ -52,0 +52,0 @@ "@project-serum/anchor": "0.25.0", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
364835