Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@wormhole-foundation/connect-sdk-solana

Package Overview
Dependencies
Maintainers
5
Versions
125
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@wormhole-foundation/connect-sdk-solana - npm Package Compare versions

Comparing version 0.4.0-beta.9 to 0.4.0-beta.10

4

dist/cjs/chain.d.ts
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> {
import { SolanaChains } from './types';
export declare class SolanaChain<N extends Network, C extends SolanaChains = SolanaChains> extends ChainContext<N, C> {
getTokenAccount(address: UniversalOrNative<C>, token: UniversalOrNative<C>): Promise<ChainAddress<C>>;
}
//# sourceMappingURL=chain.d.ts.map
import { Balances, Chain, ChainsConfig, Network, PlatformContext, SignedTx, StaticPlatformMethods, TokenId, TxHash } from '@wormhole-foundation/connect-sdk';
import { SolanaChain } from './chain';
import { Commitment, Connection, ConnectionConfig, SendOptions } from '@solana/web3.js';
import { AnySolanaAddress, SolanaChains, SolanaPlatformType, _platform } from './types';
import { AnySolanaAddress, SolanaChains, SolanaPlatformType } from './types';
/**
* @category Solana
*/
export declare class SolanaPlatform<N extends Network> extends PlatformContext<N, SolanaPlatformType> implements StaticPlatformMethods<typeof _platform, typeof SolanaPlatform> {
export declare class SolanaPlatform<N extends Network> extends PlatformContext<N, SolanaPlatformType> implements StaticPlatformMethods<SolanaPlatformType, typeof SolanaPlatform> {
static _platform: "Solana";

@@ -10,0 +10,0 @@ constructor(network: N, config?: ChainsConfig<N, SolanaPlatformType>);

/// <reference types="node" />
import { Connection, Keypair, SendOptions, Transaction } from '@solana/web3.js';
import { SignAndSendSigner, SignOnlySigner, UnsignedTransaction, Signer, Network } from '@wormhole-foundation/connect-sdk';
import { Network, SignAndSendSigner, SignOnlySigner, Signer, UnsignedTransaction } from '@wormhole-foundation/connect-sdk';
import { SolanaChains } from './types';

@@ -5,0 +5,0 @@ import { SolanaUnsignedTransaction } from './unsignedTransaction';

@@ -52,4 +52,2 @@ "use strict";

exports.SolanaSigner = SolanaSigner;
// Number of blocks to wait before considering a transaction expired
const SOLANA_EXPIRED_BLOCKHEIGHT = 150;
class SolanaSendSigner {

@@ -146,7 +144,2 @@ _rpc;

const { blockhash: newBlockhash, lastValidBlockHeight: newBlockHeight, } = await platform_1.SolanaPlatform.latestBlock(this._rpc);
// But we should _not_ submit if the blockhash hasnt expired
if (newBlockHeight - lastValidBlockHeight <
SOLANA_EXPIRED_BLOCKHEIGHT) {
throw e;
}
lastValidBlockHeight = newBlockHeight;

@@ -153,0 +146,0 @@ blockhash = newBlockhash;

@@ -5,3 +5,9 @@ import { PublicKeyInitData } from '@solana/web3.js';

export declare const unusedArbiterFee = 0n;
/**
* Runtime value for the Solana Platform
*/
export declare const _platform: 'Solana';
/**
* Type for the Solana Platform
*/
export type SolanaPlatformType = typeof _platform;

@@ -8,0 +14,0 @@ export type SolanaChains = PlatformToChains<SolanaPlatformType>;

@@ -6,3 +6,6 @@ "use strict";

exports.unusedArbiterFee = 0n;
/**
* Runtime value for the Solana Platform
*/
exports._platform = 'Solana';
//# sourceMappingURL=types.js.map
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> {
import { SolanaChains } from './types';
export declare class SolanaChain<N extends Network, C extends SolanaChains = SolanaChains> extends ChainContext<N, C> {
getTokenAccount(address: UniversalOrNative<C>, token: UniversalOrNative<C>): Promise<ChainAddress<C>>;
}
//# sourceMappingURL=chain.d.ts.map
import { Balances, Chain, ChainsConfig, Network, PlatformContext, SignedTx, StaticPlatformMethods, TokenId, TxHash } from '@wormhole-foundation/connect-sdk';
import { SolanaChain } from './chain';
import { Commitment, Connection, ConnectionConfig, SendOptions } from '@solana/web3.js';
import { AnySolanaAddress, SolanaChains, SolanaPlatformType, _platform } from './types';
import { AnySolanaAddress, SolanaChains, SolanaPlatformType } from './types';
/**
* @category Solana
*/
export declare class SolanaPlatform<N extends Network> extends PlatformContext<N, SolanaPlatformType> implements StaticPlatformMethods<typeof _platform, typeof SolanaPlatform> {
export declare class SolanaPlatform<N extends Network> extends PlatformContext<N, SolanaPlatformType> implements StaticPlatformMethods<SolanaPlatformType, typeof SolanaPlatform> {
static _platform: "Solana";

@@ -10,0 +10,0 @@ constructor(network: N, config?: ChainsConfig<N, SolanaPlatformType>);

/// <reference types="node" />
import { Connection, Keypair, SendOptions, Transaction } from '@solana/web3.js';
import { SignAndSendSigner, SignOnlySigner, UnsignedTransaction, Signer, Network } from '@wormhole-foundation/connect-sdk';
import { Network, SignAndSendSigner, SignOnlySigner, Signer, UnsignedTransaction } from '@wormhole-foundation/connect-sdk';
import { SolanaChains } from './types';

@@ -5,0 +5,0 @@ import { SolanaUnsignedTransaction } from './unsignedTransaction';

@@ -46,4 +46,2 @@ import { ComputeBudgetProgram, Keypair, SendTransactionError, TransactionExpiredBlockheightExceededError, } from '@solana/web3.js';

}
// Number of blocks to wait before considering a transaction expired
const SOLANA_EXPIRED_BLOCKHEIGHT = 150;
export class SolanaSendSigner {

@@ -140,7 +138,2 @@ _rpc;

const { blockhash: newBlockhash, lastValidBlockHeight: newBlockHeight, } = await SolanaPlatform.latestBlock(this._rpc);
// But we should _not_ submit if the blockhash hasnt expired
if (newBlockHeight - lastValidBlockHeight <
SOLANA_EXPIRED_BLOCKHEIGHT) {
throw e;
}
lastValidBlockHeight = newBlockHeight;

@@ -147,0 +140,0 @@ blockhash = newBlockhash;

@@ -5,3 +5,9 @@ import { PublicKeyInitData } from '@solana/web3.js';

export declare const unusedArbiterFee = 0n;
/**
* Runtime value for the Solana Platform
*/
export declare const _platform: 'Solana';
/**
* Type for the Solana Platform
*/
export type SolanaPlatformType = typeof _platform;

@@ -8,0 +14,0 @@ export type SolanaChains = PlatformToChains<SolanaPlatformType>;

export const unusedNonce = 0;
export const unusedArbiterFee = 0n;
/**
* Runtime value for the Solana Platform
*/
export const _platform = 'Solana';
//# sourceMappingURL=types.js.map
{
"name": "@wormhole-foundation/connect-sdk-solana",
"version": "0.4.0-beta.9",
"version": "0.4.0-beta.10",
"repository": {

@@ -49,3 +49,3 @@ "type": "git",

"dependencies": {
"@wormhole-foundation/connect-sdk": "^0.4.0-beta.9",
"@wormhole-foundation/connect-sdk": "^0.4.0-beta.10",
"@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

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

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc