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

@project-serum/anchor

Package Overview
Dependencies
Maintainers
6
Versions
73
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@project-serum/anchor - npm Package Compare versions

Comparing version 0.6.0-beta.1 to 0.6.0-beta.2

4

dist/cjs/program/namespace/account.js

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

// @ts-ignore
accountsNamespace["createInstruction"] = async (keypair, sizeOverride) => {
accountsNamespace["createInstruction"] = async (signer, sizeOverride) => {
// @ts-ignore

@@ -63,3 +63,3 @@ const size = accountsNamespace["size"];

fromPubkey: provider.wallet.publicKey,
newAccountPubkey: keypair.publicKey,
newAccountPubkey: signer.publicKey,
space: sizeOverride !== null && sizeOverride !== void 0 ? sizeOverride : size,

@@ -66,0 +66,0 @@ lamports: await provider.connection.getMinimumBalanceForRentExemption(sizeOverride !== null && sizeOverride !== void 0 ? sizeOverride : size),

@@ -35,4 +35,4 @@ "use strict";

static local(url, opts) {
opts = opts || Provider.defaultOptions();
const connection = new web3_js_1.Connection(url || "http://localhost:8899", opts.preflightCommitment);
opts = opts !== null && opts !== void 0 ? opts : Provider.defaultOptions();
const connection = new web3_js_1.Connection(url !== null && url !== void 0 ? url : "http://localhost:8899", opts.preflightCommitment);
const wallet = NodeWallet.local();

@@ -39,0 +39,0 @@ return new Provider(connection, wallet, opts);

@@ -33,3 +33,3 @@ import camelCase from "camelcase";

// @ts-ignore
accountsNamespace["createInstruction"] = async (keypair, sizeOverride) => {
accountsNamespace["createInstruction"] = async (signer, sizeOverride) => {
// @ts-ignore

@@ -39,3 +39,3 @@ const size = accountsNamespace["size"];

fromPubkey: provider.wallet.publicKey,
newAccountPubkey: keypair.publicKey,
newAccountPubkey: signer.publicKey,
space: sizeOverride !== null && sizeOverride !== void 0 ? sizeOverride : size,

@@ -42,0 +42,0 @@ lamports: await provider.connection.getMinimumBalanceForRentExemption(sizeOverride !== null && sizeOverride !== void 0 ? sizeOverride : size),

@@ -32,4 +32,4 @@ import { Connection, Keypair, sendAndConfirmRawTransaction, } from "@solana/web3.js";

static local(url, opts) {
opts = opts || Provider.defaultOptions();
const connection = new Connection(url || "http://localhost:8899", opts.preflightCommitment);
opts = opts !== null && opts !== void 0 ? opts : Provider.defaultOptions();
const connection = new Connection(url !== null && url !== void 0 ? url : "http://localhost:8899", opts.preflightCommitment);
const wallet = NodeWallet.local();

@@ -36,0 +36,0 @@ return new Provider(connection, wallet, opts);

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

import { AccountMeta, Keypair, PublicKey, ConfirmOptions, TransactionInstruction } from "@solana/web3.js";
import { AccountMeta, Signer, PublicKey, ConfirmOptions, TransactionInstruction } from "@solana/web3.js";
import { IdlInstruction } from "../idl";

@@ -19,3 +19,3 @@ /**

*/
signers?: Array<Keypair>;
signers?: Array<Signer>;
/**

@@ -22,0 +22,0 @@ * Instructions to run *before* a given method. Often this is used, for

/// <reference types="node" />
import EventEmitter from "eventemitter3";
import { Keypair, PublicKey, TransactionInstruction, Commitment } from "@solana/web3.js";
import { Signer, PublicKey, TransactionInstruction, Commitment } from "@solana/web3.js";
import Provider from "../../provider";

@@ -26,3 +26,3 @@ import { Idl } from "../../idl";

unsubscribe: (address: PublicKey) => void;
createInstruction: (keypair: Keypair) => Promise<TransactionInstruction>;
createInstruction: (signer: Signer) => Promise<TransactionInstruction>;
associated: (...args: PublicKey[]) => Promise<any>;

@@ -29,0 +29,0 @@ associatedAddress: (...args: PublicKey[]) => Promise<PublicKey>;

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

import { Connection, Keypair, PublicKey, Transaction, TransactionSignature, ConfirmOptions, RpcResponseAndContext, SimulatedTransactionResponse } from "@solana/web3.js";
import { Connection, Keypair, Signer, PublicKey, Transaction, TransactionSignature, ConfirmOptions, RpcResponseAndContext, SimulatedTransactionResponse } from "@solana/web3.js";
/**

@@ -41,3 +41,3 @@ * The network and wallet context used to send transactions paid for and signed

*/
send(tx: Transaction, signers?: Array<Keypair | undefined>, opts?: ConfirmOptions): Promise<TransactionSignature>;
send(tx: Transaction, signers?: Array<Signer | undefined>, opts?: ConfirmOptions): Promise<TransactionSignature>;
/**

@@ -55,7 +55,7 @@ * Similar to `send`, but for an array of transactions and signers.

*/
simulate(tx: Transaction, signers?: Array<Keypair | undefined>, opts?: ConfirmOptions): Promise<RpcResponseAndContext<SimulatedTransactionResponse>>;
simulate(tx: Transaction, signers?: Array<Signer | undefined>, opts?: ConfirmOptions): Promise<RpcResponseAndContext<SimulatedTransactionResponse>>;
}
export declare type SendTxRequest = {
tx: Transaction;
signers: Array<Keypair | undefined>;
signers: Array<Signer | undefined>;
};

@@ -62,0 +62,0 @@ /**

{
"name": "@project-serum/anchor",
"version": "0.6.0-beta.1",
"version": "0.6.0-beta.2",
"description": "Anchor client",

@@ -21,3 +21,3 @@ "main": "dist/cjs/index.js",

"prepublishOnly": "yarn build",
"docs": "typedoc --excludePrivate --out ../docs/src/.vuepress/dist/ts/ src/index.ts"
"docs": "typedoc --excludePrivate --includeVersion --out ../docs/src/.vuepress/dist/ts/ src/index.ts"
},

@@ -27,6 +27,2 @@ "dependencies": {

"@solana/web3.js": "^1.11.0",
"@types/bn.js": "^4.11.6",
"@types/bs58": "^4.0.1",
"@types/crypto-hash": "^1.1.2",
"@types/pako": "^1.0.1",
"base64-js": "^1.5.1",

@@ -47,3 +43,7 @@ "bn.js": "^5.1.2",

"@commitlint/config-conventional": "^11.0.0",
"@types/bn.js": "^4.11.6",
"@types/bs58": "^4.0.1",
"@types/crypto-hash": "^1.1.2",
"@types/jest": "^26.0.15",
"@types/pako": "^1.0.1",
"@typescript-eslint/eslint-plugin": "^4.6.0",

@@ -50,0 +50,0 @@ "@typescript-eslint/parser": "^4.6.0",

import {
AccountMeta,
Keypair,
Signer,
PublicKey,

@@ -28,3 +28,3 @@ ConfirmOptions,

*/
signers?: Array<Keypair>;
signers?: Array<Signer>;

@@ -31,0 +31,0 @@ /**

@@ -5,3 +5,3 @@ import camelCase from "camelcase";

import {
Keypair,
Signer,
PublicKey,

@@ -42,3 +42,3 @@ SystemProgram,

unsubscribe: (address: PublicKey) => void;
createInstruction: (keypair: Keypair) => Promise<TransactionInstruction>;
createInstruction: (signer: Signer) => Promise<TransactionInstruction>;
associated: (...args: PublicKey[]) => Promise<any>;

@@ -98,3 +98,3 @@ associatedAddress: (...args: PublicKey[]) => Promise<PublicKey>;

accountsNamespace["createInstruction"] = async (
keypair: Keypair,
signer: Signer,
sizeOverride?: number

@@ -107,3 +107,3 @@ ): Promise<TransactionInstruction> => {

fromPubkey: provider.wallet.publicKey,
newAccountPubkey: keypair.publicKey,
newAccountPubkey: signer.publicKey,
space: sizeOverride ?? size,

@@ -110,0 +110,0 @@ lamports: await provider.connection.getMinimumBalanceForRentExemption(

import {
Connection,
Keypair,
Signer,
PublicKey,

@@ -46,5 +47,5 @@ Transaction,

static local(url?: string, opts?: ConfirmOptions): Provider {
opts = opts || Provider.defaultOptions();
opts = opts ?? Provider.defaultOptions();
const connection = new Connection(
url || "http://localhost:8899",
url ?? "http://localhost:8899",
opts.preflightCommitment

@@ -85,3 +86,3 @@ );

tx: Transaction,
signers?: Array<Keypair | undefined>,
signers?: Array<Signer | undefined>,
opts?: ConfirmOptions

@@ -96,3 +97,3 @@ ): Promise<TransactionSignature> {

const signerKps = signers.filter((s) => s !== undefined) as Array<Keypair>;
const signerKps = signers.filter((s) => s !== undefined) as Array<Signer>;
const signerPubkeys = [this.wallet.publicKey].concat(

@@ -147,3 +148,3 @@ signerKps.map((s) => s.publicKey)

(s) => s !== undefined
) as Array<Keypair>;
) as Array<Signer>;
const signerPubkeys = [this.wallet.publicKey].concat(

@@ -187,3 +188,3 @@ signerKps.map((s) => s.publicKey)

tx: Transaction,
signers?: Array<Keypair | undefined>,
signers?: Array<Signer | undefined>,
opts?: ConfirmOptions

@@ -198,3 +199,3 @@ ): Promise<RpcResponseAndContext<SimulatedTransactionResponse>> {

const signerKps = signers.filter((s) => s !== undefined) as Array<Keypair>;
const signerKps = signers.filter((s) => s !== undefined) as Array<Signer>;
const signerPubkeys = [this.wallet.publicKey].concat(

@@ -225,3 +226,3 @@ signerKps.map((s) => s.publicKey)

tx: Transaction;
signers: Array<Keypair | undefined>;
signers: Array<Signer | undefined>;
};

@@ -228,0 +229,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

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