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

@saberhq/solana-contrib

Package Overview
Dependencies
Maintainers
2
Versions
181
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@saberhq/solana-contrib - npm Package Compare versions

Comparing version 1.1.1 to 1.2.0

19

dist/provider.d.ts

@@ -43,7 +43,22 @@ import type { ConfirmOptions, Connection, KeyedAccountInfo, PublicKey, RpcResponseAndContext, Signer, SimulatedTransactionResponse, Transaction } from "@solana/web3.js";

constructor(connection: Connection, broadcaster: Broadcaster, wallet: Wallet, opts?: ConfirmOptions);
/**
* Creates a new SolanaProvider.
*/
static load({ connection, sendConnection, wallet, opts, }: {
/**
* Connection used for general reads
*/
connection: Connection;
sendConnection: Connection;
/**
* Connection used for sending transactions
*/
sendConnection?: Connection;
/**
* Wallet used for signing transactions
*/
wallet: Wallet;
opts: ConfirmOptions;
/**
* Confirmation options
*/
opts?: ConfirmOptions;
}): SolanaProvider;

@@ -50,0 +65,0 @@ /**

5

dist/provider.js

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

}
static load({ connection, sendConnection, wallet, opts, }) {
/**
* Creates a new SolanaProvider.
*/
static load({ connection, sendConnection = connection, wallet, opts, }) {
return new SolanaProvider(connection, new broadcaster_1.SingleConnectionBroadcaster(sendConnection, opts), wallet, opts);

@@ -66,0 +69,0 @@ }

@@ -1,2 +0,2 @@

import type { Connection, PublicKey, Signer, Transaction } from "@solana/web3.js";
import type { ConfirmOptions, Connection, PublicKey, Signer, Transaction } from "@solana/web3.js";
import type { Provider, Wallet } from "./interfaces";

@@ -17,4 +17,4 @@ /**

*/
createProvider(connection: Connection, sendConnection?: Connection): Provider;
createProvider(connection: Connection, sendConnection?: Connection, opts?: ConfirmOptions): Provider;
}
//# sourceMappingURL=wallet.d.ts.map
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.SignerWallet = void 0;
const _1 = require(".");
const provider_1 = require("./provider");

@@ -31,4 +30,9 @@ /**

*/
createProvider(connection, sendConnection) {
return new provider_1.SolanaProvider(connection, new _1.SingleConnectionBroadcaster(sendConnection !== null && sendConnection !== void 0 ? sendConnection : connection), this);
createProvider(connection, sendConnection, opts) {
return provider_1.SolanaProvider.load({
connection,
sendConnection,
wallet: this,
opts,
});
}

@@ -35,0 +39,0 @@ }

{
"name": "@saberhq/solana-contrib",
"version": "1.1.1",
"version": "1.2.0",
"description": "Common types and libraries for Solana",

@@ -33,3 +33,3 @@ "author": "Ian Macalinao <ian@saber.so>",

},
"gitHead": "4efb7cb4a2cd74cf936efb8f6b0fb8025fced491",
"gitHead": "49a0261851caa5d36808f327d5f110f7d497f1fb",
"publishConfig": {

@@ -36,0 +36,0 @@ "access": "public"

@@ -78,12 +78,27 @@ import type {

/**
* Creates a new SolanaProvider.
*/
static load({
connection,
sendConnection,
sendConnection = connection,
wallet,
opts,
}: {
/**
* Connection used for general reads
*/
connection: Connection;
sendConnection: Connection;
/**
* Connection used for sending transactions
*/
sendConnection?: Connection;
/**
* Wallet used for signing transactions
*/
wallet: Wallet;
opts: ConfirmOptions;
/**
* Confirmation options
*/
opts?: ConfirmOptions;
}): SolanaProvider {

@@ -90,0 +105,0 @@ return new SolanaProvider(

import type {
ConfirmOptions,
Connection,

@@ -8,3 +9,2 @@ PublicKey,

import { SingleConnectionBroadcaster } from ".";
import type { Provider, Wallet } from "./interfaces";

@@ -44,10 +44,12 @@ import { SolanaProvider } from "./provider";

connection: Connection,
sendConnection?: Connection
sendConnection?: Connection,
opts?: ConfirmOptions
): Provider {
return new SolanaProvider(
return SolanaProvider.load({
connection,
new SingleConnectionBroadcaster(sendConnection ?? connection),
this
);
sendConnection,
wallet: this,
opts,
});
}
}

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