New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@solana/signers

Package Overview
Dependencies
Maintainers
14
Versions
1049
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@solana/signers - npm Package Compare versions

Comparing version 2.0.0-experimental.4c1874d to 2.0.0-experimental.4c9a8b8

dist/types/account-signer-meta.d.ts.map

125

dist/index.browser.js

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

import { isSignerRole } from '@solana/instructions';
import { getAddressFromPublicKey, isAddress } from '@solana/addresses';

@@ -11,2 +12,6 @@ import { generateKeyPair, signBytes } from '@solana/keys';

deduplicated[signer.address] = signer;
} else if (deduplicated[signer.address] !== signer) {
throw new Error(
`Multiple distinct signers were identified for address "${signer.address}". Please ensure that you are using the same signer instance for each address.`
);
}

@@ -26,2 +31,27 @@ });

}
function addSignersToInstruction(signers, instruction) {
if (!instruction.accounts || instruction.accounts.length === 0) {
return instruction;
}
const signerByAddress = new Map(deduplicateSigners(signers).map((signer) => [signer.address, signer]));
return Object.freeze({
...instruction,
accounts: instruction.accounts.map((account) => {
const signer = signerByAddress.get(account.address);
if (!isSignerRole(account.role) || "signer" in account || !signer) {
return account;
}
return Object.freeze({ ...account, signer });
})
});
}
function addSignersToTransaction(signers, transaction) {
if (transaction.instructions.length === 0) {
return transaction;
}
return Object.freeze({
...transaction,
instructions: transaction.instructions.map((instruction) => addSignersToInstruction(signers, instruction))
});
}

@@ -98,2 +128,12 @@ // src/message-partial-signer.ts

// src/noop-signer.ts
function createNoopSigner(address) {
const out = {
address,
signMessages: async (messages) => messages.map(() => Object.freeze({})),
signTransactions: async (transactions) => transactions.map(() => Object.freeze({}))
};
return Object.freeze(out);
}
// src/transaction-modifying-signer.ts

@@ -130,35 +170,38 @@ function isTransactionModifyingSigner(value) {

// src/sign-transaction.ts
async function partiallySignTransactionWithSigners(transaction, signers = []) {
async function partiallySignTransactionWithSigners(transaction, config = {}) {
const { partialSigners, modifyingSigners } = categorizeTransactionSigners(
deduplicateSigners([...getSignersFromTransaction(transaction).filter(isTransactionSigner), ...signers]),
deduplicateSigners(getSignersFromTransaction(transaction).filter(isTransactionSigner)),
{ identifySendingSigner: false }
);
return signModifyingAndPartialTransactionSigners(transaction, modifyingSigners, partialSigners);
return signModifyingAndPartialTransactionSigners(transaction, modifyingSigners, partialSigners, config.abortSignal);
}
async function signTransactionWithSigners(transaction, signers = []) {
const signedTransaction = await partiallySignTransactionWithSigners(transaction, signers);
async function signTransactionWithSigners(transaction, config = {}) {
const signedTransaction = await partiallySignTransactionWithSigners(transaction, config);
assertTransactionIsFullySigned(signedTransaction);
return signedTransaction;
}
async function signAndSendTransactionWithSigners(transaction, signers = [], fallbackSender) {
async function signAndSendTransactionWithSigners(transaction, config = {}) {
const abortSignal = config.abortSignal;
const { partialSigners, modifyingSigners, sendingSigner } = categorizeTransactionSigners(
deduplicateSigners([...getSignersFromTransaction(transaction).filter(isTransactionSigner), ...signers])
deduplicateSigners(getSignersFromTransaction(transaction).filter(isTransactionSigner))
);
abortSignal?.throwIfAborted();
const signedTransaction = await signModifyingAndPartialTransactionSigners(
transaction,
modifyingSigners,
partialSigners
partialSigners,
abortSignal
);
if (sendingSigner) {
const [signature] = await sendingSigner.signAndSendTransactions([signedTransaction]);
return signature;
if (!sendingSigner) {
throw new Error(
"No `TransactionSendingSigner` was identified. Please provide a valid `ITransactionWithSingleSendingSigner` transaction."
);
}
if (fallbackSender) {
assertTransactionIsFullySigned(signedTransaction);
return fallbackSender(signedTransaction);
}
throw new Error("No TransactionSendingSigner was identified and no fallback sender was provided.");
abortSignal?.throwIfAborted();
const [signature] = await sendingSigner.signAndSendTransactions([signedTransaction], { abortSignal });
abortSignal?.throwIfAborted();
return signature;
}
function categorizeTransactionSigners(signers, options) {
const identifySendingSigner = options?.identifySendingSigner ?? true;
function categorizeTransactionSigners(signers, config = {}) {
const identifySendingSigner = config.identifySendingSigner ?? true;
const sendingSigner = identifySendingSigner ? identifyTransactionSendingSigner(signers) : null;

@@ -193,10 +236,15 @@ const otherSigners = signers.filter(

}
async function signModifyingAndPartialTransactionSigners(transaction, modifyingSigners = [], partialSigners = []) {
const modifiedTransaction = await modifyingSigners.reduce(async (transaction2, modifyingSigner) => {
const [tx] = await modifyingSigner.modifyAndSignTransactions([await transaction2]);
return Object.freeze(tx);
}, Promise.resolve(transaction));
async function signModifyingAndPartialTransactionSigners(transaction, modifyingSigners = [], partialSigners = [], abortSignal) {
const modifiedTransaction = await modifyingSigners.reduce(
async (transaction2, modifyingSigner) => {
abortSignal?.throwIfAborted();
const [tx] = await modifyingSigner.modifyAndSignTransactions([await transaction2], { abortSignal });
return Object.freeze(tx);
},
Promise.resolve(transaction)
);
abortSignal?.throwIfAborted();
const signatureDictionaries = await Promise.all(
partialSigners.map(async (partialSigner) => {
const [signatures] = await partialSigner.signTransactions([modifiedTransaction]);
const [signatures] = await partialSigner.signTransactions([modifiedTransaction], { abortSignal });
return signatures;

@@ -225,4 +273,31 @@ })

export { assertIsKeyPairSigner, assertIsMessageModifyingSigner, assertIsMessagePartialSigner, assertIsMessageSigner, assertIsTransactionModifyingSigner, assertIsTransactionPartialSigner, assertIsTransactionSendingSigner, assertIsTransactionSigner, createSignableMessage, createSignerFromKeyPair, generateKeyPairSigner, getSignersFromInstruction, getSignersFromTransaction, isKeyPairSigner, isMessageModifyingSigner, isMessagePartialSigner, isMessageSigner, isTransactionModifyingSigner, isTransactionPartialSigner, isTransactionSendingSigner, isTransactionSigner, partiallySignTransactionWithSigners, signAndSendTransactionWithSigners, signTransactionWithSigners };
// src/transaction-with-single-sending-signer.ts
function isTransactionWithSingleSendingSigner(transaction) {
try {
assertIsTransactionWithSingleSendingSigner(transaction);
return true;
} catch {
return false;
}
}
function assertIsTransactionWithSingleSendingSigner(transaction) {
const signers = getSignersFromTransaction(transaction);
const sendingSigners = signers.filter(isTransactionSendingSigner);
if (sendingSigners.length === 0) {
const error = new Error("No `TransactionSendingSigner` was identified.");
error.name = "MissingTransactionSendingSignerError";
throw error;
}
const sendingOnlySigners = sendingSigners.filter(
(signer) => !isTransactionPartialSigner(signer) && !isTransactionModifyingSigner(signer)
);
if (sendingOnlySigners.length > 1) {
const error = new Error("More than one `TransactionSendingSigner` was identified.");
error.name = "MultipleTransactionSendingSignersError";
throw error;
}
}
export { addSignersToInstruction, addSignersToTransaction, assertIsKeyPairSigner, assertIsMessageModifyingSigner, assertIsMessagePartialSigner, assertIsMessageSigner, assertIsTransactionModifyingSigner, assertIsTransactionPartialSigner, assertIsTransactionSendingSigner, assertIsTransactionSigner, assertIsTransactionWithSingleSendingSigner, createNoopSigner, createSignableMessage, createSignerFromKeyPair, generateKeyPairSigner, getSignersFromInstruction, getSignersFromTransaction, isKeyPairSigner, isMessageModifyingSigner, isMessagePartialSigner, isMessageSigner, isTransactionModifyingSigner, isTransactionPartialSigner, isTransactionSendingSigner, isTransactionSigner, isTransactionWithSingleSendingSigner, partiallySignTransactionWithSigners, signAndSendTransactionWithSigners, signTransactionWithSigners };
//# sourceMappingURL=out.js.map
//# sourceMappingURL=index.browser.js.map

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

import { isSignerRole } from '@solana/instructions';
import { getAddressFromPublicKey, isAddress } from '@solana/addresses';

@@ -11,2 +12,6 @@ import { generateKeyPair, signBytes } from '@solana/keys';

deduplicated[signer.address] = signer;
} else if (deduplicated[signer.address] !== signer) {
throw new Error(
`Multiple distinct signers were identified for address "${signer.address}". Please ensure that you are using the same signer instance for each address.`
);
}

@@ -26,2 +31,27 @@ });

}
function addSignersToInstruction(signers, instruction) {
if (!instruction.accounts || instruction.accounts.length === 0) {
return instruction;
}
const signerByAddress = new Map(deduplicateSigners(signers).map((signer) => [signer.address, signer]));
return Object.freeze({
...instruction,
accounts: instruction.accounts.map((account) => {
const signer = signerByAddress.get(account.address);
if (!isSignerRole(account.role) || "signer" in account || !signer) {
return account;
}
return Object.freeze({ ...account, signer });
})
});
}
function addSignersToTransaction(signers, transaction) {
if (transaction.instructions.length === 0) {
return transaction;
}
return Object.freeze({
...transaction,
instructions: transaction.instructions.map((instruction) => addSignersToInstruction(signers, instruction))
});
}

@@ -98,2 +128,12 @@ // src/message-partial-signer.ts

// src/noop-signer.ts
function createNoopSigner(address) {
const out = {
address,
signMessages: async (messages) => messages.map(() => Object.freeze({})),
signTransactions: async (transactions) => transactions.map(() => Object.freeze({}))
};
return Object.freeze(out);
}
// src/transaction-modifying-signer.ts

@@ -130,35 +170,38 @@ function isTransactionModifyingSigner(value) {

// src/sign-transaction.ts
async function partiallySignTransactionWithSigners(transaction, signers = []) {
async function partiallySignTransactionWithSigners(transaction, config = {}) {
const { partialSigners, modifyingSigners } = categorizeTransactionSigners(
deduplicateSigners([...getSignersFromTransaction(transaction).filter(isTransactionSigner), ...signers]),
deduplicateSigners(getSignersFromTransaction(transaction).filter(isTransactionSigner)),
{ identifySendingSigner: false }
);
return signModifyingAndPartialTransactionSigners(transaction, modifyingSigners, partialSigners);
return signModifyingAndPartialTransactionSigners(transaction, modifyingSigners, partialSigners, config.abortSignal);
}
async function signTransactionWithSigners(transaction, signers = []) {
const signedTransaction = await partiallySignTransactionWithSigners(transaction, signers);
async function signTransactionWithSigners(transaction, config = {}) {
const signedTransaction = await partiallySignTransactionWithSigners(transaction, config);
assertTransactionIsFullySigned(signedTransaction);
return signedTransaction;
}
async function signAndSendTransactionWithSigners(transaction, signers = [], fallbackSender) {
async function signAndSendTransactionWithSigners(transaction, config = {}) {
const abortSignal = config.abortSignal;
const { partialSigners, modifyingSigners, sendingSigner } = categorizeTransactionSigners(
deduplicateSigners([...getSignersFromTransaction(transaction).filter(isTransactionSigner), ...signers])
deduplicateSigners(getSignersFromTransaction(transaction).filter(isTransactionSigner))
);
abortSignal?.throwIfAborted();
const signedTransaction = await signModifyingAndPartialTransactionSigners(
transaction,
modifyingSigners,
partialSigners
partialSigners,
abortSignal
);
if (sendingSigner) {
const [signature] = await sendingSigner.signAndSendTransactions([signedTransaction]);
return signature;
if (!sendingSigner) {
throw new Error(
"No `TransactionSendingSigner` was identified. Please provide a valid `ITransactionWithSingleSendingSigner` transaction."
);
}
if (fallbackSender) {
assertTransactionIsFullySigned(signedTransaction);
return fallbackSender(signedTransaction);
}
throw new Error("No TransactionSendingSigner was identified and no fallback sender was provided.");
abortSignal?.throwIfAborted();
const [signature] = await sendingSigner.signAndSendTransactions([signedTransaction], { abortSignal });
abortSignal?.throwIfAborted();
return signature;
}
function categorizeTransactionSigners(signers, options) {
const identifySendingSigner = options?.identifySendingSigner ?? true;
function categorizeTransactionSigners(signers, config = {}) {
const identifySendingSigner = config.identifySendingSigner ?? true;
const sendingSigner = identifySendingSigner ? identifyTransactionSendingSigner(signers) : null;

@@ -193,10 +236,15 @@ const otherSigners = signers.filter(

}
async function signModifyingAndPartialTransactionSigners(transaction, modifyingSigners = [], partialSigners = []) {
const modifiedTransaction = await modifyingSigners.reduce(async (transaction2, modifyingSigner) => {
const [tx] = await modifyingSigner.modifyAndSignTransactions([await transaction2]);
return Object.freeze(tx);
}, Promise.resolve(transaction));
async function signModifyingAndPartialTransactionSigners(transaction, modifyingSigners = [], partialSigners = [], abortSignal) {
const modifiedTransaction = await modifyingSigners.reduce(
async (transaction2, modifyingSigner) => {
abortSignal?.throwIfAborted();
const [tx] = await modifyingSigner.modifyAndSignTransactions([await transaction2], { abortSignal });
return Object.freeze(tx);
},
Promise.resolve(transaction)
);
abortSignal?.throwIfAborted();
const signatureDictionaries = await Promise.all(
partialSigners.map(async (partialSigner) => {
const [signatures] = await partialSigner.signTransactions([modifiedTransaction]);
const [signatures] = await partialSigner.signTransactions([modifiedTransaction], { abortSignal });
return signatures;

@@ -225,4 +273,31 @@ })

export { assertIsKeyPairSigner, assertIsMessageModifyingSigner, assertIsMessagePartialSigner, assertIsMessageSigner, assertIsTransactionModifyingSigner, assertIsTransactionPartialSigner, assertIsTransactionSendingSigner, assertIsTransactionSigner, createSignableMessage, createSignerFromKeyPair, generateKeyPairSigner, getSignersFromInstruction, getSignersFromTransaction, isKeyPairSigner, isMessageModifyingSigner, isMessagePartialSigner, isMessageSigner, isTransactionModifyingSigner, isTransactionPartialSigner, isTransactionSendingSigner, isTransactionSigner, partiallySignTransactionWithSigners, signAndSendTransactionWithSigners, signTransactionWithSigners };
// src/transaction-with-single-sending-signer.ts
function isTransactionWithSingleSendingSigner(transaction) {
try {
assertIsTransactionWithSingleSendingSigner(transaction);
return true;
} catch {
return false;
}
}
function assertIsTransactionWithSingleSendingSigner(transaction) {
const signers = getSignersFromTransaction(transaction);
const sendingSigners = signers.filter(isTransactionSendingSigner);
if (sendingSigners.length === 0) {
const error = new Error("No `TransactionSendingSigner` was identified.");
error.name = "MissingTransactionSendingSignerError";
throw error;
}
const sendingOnlySigners = sendingSigners.filter(
(signer) => !isTransactionPartialSigner(signer) && !isTransactionModifyingSigner(signer)
);
if (sendingOnlySigners.length > 1) {
const error = new Error("More than one `TransactionSendingSigner` was identified.");
error.name = "MultipleTransactionSendingSignersError";
throw error;
}
}
export { addSignersToInstruction, addSignersToTransaction, assertIsKeyPairSigner, assertIsMessageModifyingSigner, assertIsMessagePartialSigner, assertIsMessageSigner, assertIsTransactionModifyingSigner, assertIsTransactionPartialSigner, assertIsTransactionSendingSigner, assertIsTransactionSigner, assertIsTransactionWithSingleSendingSigner, createNoopSigner, createSignableMessage, createSignerFromKeyPair, generateKeyPairSigner, getSignersFromInstruction, getSignersFromTransaction, isKeyPairSigner, isMessageModifyingSigner, isMessagePartialSigner, isMessageSigner, isTransactionModifyingSigner, isTransactionPartialSigner, isTransactionSendingSigner, isTransactionSigner, isTransactionWithSingleSendingSigner, partiallySignTransactionWithSigners, signAndSendTransactionWithSigners, signTransactionWithSigners };
//# sourceMappingURL=out.js.map
//# sourceMappingURL=index.native.js.map

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

import { isSignerRole } from '@solana/instructions';
import { getAddressFromPublicKey, isAddress } from '@solana/addresses';

@@ -11,2 +12,6 @@ import { generateKeyPair, signBytes } from '@solana/keys';

deduplicated[signer.address] = signer;
} else if (deduplicated[signer.address] !== signer) {
throw new Error(
`Multiple distinct signers were identified for address "${signer.address}". Please ensure that you are using the same signer instance for each address.`
);
}

@@ -26,2 +31,27 @@ });

}
function addSignersToInstruction(signers, instruction) {
if (!instruction.accounts || instruction.accounts.length === 0) {
return instruction;
}
const signerByAddress = new Map(deduplicateSigners(signers).map((signer) => [signer.address, signer]));
return Object.freeze({
...instruction,
accounts: instruction.accounts.map((account) => {
const signer = signerByAddress.get(account.address);
if (!isSignerRole(account.role) || "signer" in account || !signer) {
return account;
}
return Object.freeze({ ...account, signer });
})
});
}
function addSignersToTransaction(signers, transaction) {
if (transaction.instructions.length === 0) {
return transaction;
}
return Object.freeze({
...transaction,
instructions: transaction.instructions.map((instruction) => addSignersToInstruction(signers, instruction))
});
}

@@ -98,2 +128,12 @@ // src/message-partial-signer.ts

// src/noop-signer.ts
function createNoopSigner(address) {
const out = {
address,
signMessages: async (messages) => messages.map(() => Object.freeze({})),
signTransactions: async (transactions) => transactions.map(() => Object.freeze({}))
};
return Object.freeze(out);
}
// src/transaction-modifying-signer.ts

@@ -130,35 +170,38 @@ function isTransactionModifyingSigner(value) {

// src/sign-transaction.ts
async function partiallySignTransactionWithSigners(transaction, signers = []) {
async function partiallySignTransactionWithSigners(transaction, config = {}) {
const { partialSigners, modifyingSigners } = categorizeTransactionSigners(
deduplicateSigners([...getSignersFromTransaction(transaction).filter(isTransactionSigner), ...signers]),
deduplicateSigners(getSignersFromTransaction(transaction).filter(isTransactionSigner)),
{ identifySendingSigner: false }
);
return signModifyingAndPartialTransactionSigners(transaction, modifyingSigners, partialSigners);
return signModifyingAndPartialTransactionSigners(transaction, modifyingSigners, partialSigners, config.abortSignal);
}
async function signTransactionWithSigners(transaction, signers = []) {
const signedTransaction = await partiallySignTransactionWithSigners(transaction, signers);
async function signTransactionWithSigners(transaction, config = {}) {
const signedTransaction = await partiallySignTransactionWithSigners(transaction, config);
assertTransactionIsFullySigned(signedTransaction);
return signedTransaction;
}
async function signAndSendTransactionWithSigners(transaction, signers = [], fallbackSender) {
async function signAndSendTransactionWithSigners(transaction, config = {}) {
const abortSignal = config.abortSignal;
const { partialSigners, modifyingSigners, sendingSigner } = categorizeTransactionSigners(
deduplicateSigners([...getSignersFromTransaction(transaction).filter(isTransactionSigner), ...signers])
deduplicateSigners(getSignersFromTransaction(transaction).filter(isTransactionSigner))
);
abortSignal?.throwIfAborted();
const signedTransaction = await signModifyingAndPartialTransactionSigners(
transaction,
modifyingSigners,
partialSigners
partialSigners,
abortSignal
);
if (sendingSigner) {
const [signature] = await sendingSigner.signAndSendTransactions([signedTransaction]);
return signature;
if (!sendingSigner) {
throw new Error(
"No `TransactionSendingSigner` was identified. Please provide a valid `ITransactionWithSingleSendingSigner` transaction."
);
}
if (fallbackSender) {
assertTransactionIsFullySigned(signedTransaction);
return fallbackSender(signedTransaction);
}
throw new Error("No TransactionSendingSigner was identified and no fallback sender was provided.");
abortSignal?.throwIfAborted();
const [signature] = await sendingSigner.signAndSendTransactions([signedTransaction], { abortSignal });
abortSignal?.throwIfAborted();
return signature;
}
function categorizeTransactionSigners(signers, options) {
const identifySendingSigner = options?.identifySendingSigner ?? true;
function categorizeTransactionSigners(signers, config = {}) {
const identifySendingSigner = config.identifySendingSigner ?? true;
const sendingSigner = identifySendingSigner ? identifyTransactionSendingSigner(signers) : null;

@@ -193,10 +236,15 @@ const otherSigners = signers.filter(

}
async function signModifyingAndPartialTransactionSigners(transaction, modifyingSigners = [], partialSigners = []) {
const modifiedTransaction = await modifyingSigners.reduce(async (transaction2, modifyingSigner) => {
const [tx] = await modifyingSigner.modifyAndSignTransactions([await transaction2]);
return Object.freeze(tx);
}, Promise.resolve(transaction));
async function signModifyingAndPartialTransactionSigners(transaction, modifyingSigners = [], partialSigners = [], abortSignal) {
const modifiedTransaction = await modifyingSigners.reduce(
async (transaction2, modifyingSigner) => {
abortSignal?.throwIfAborted();
const [tx] = await modifyingSigner.modifyAndSignTransactions([await transaction2], { abortSignal });
return Object.freeze(tx);
},
Promise.resolve(transaction)
);
abortSignal?.throwIfAborted();
const signatureDictionaries = await Promise.all(
partialSigners.map(async (partialSigner) => {
const [signatures] = await partialSigner.signTransactions([modifiedTransaction]);
const [signatures] = await partialSigner.signTransactions([modifiedTransaction], { abortSignal });
return signatures;

@@ -225,4 +273,31 @@ })

export { assertIsKeyPairSigner, assertIsMessageModifyingSigner, assertIsMessagePartialSigner, assertIsMessageSigner, assertIsTransactionModifyingSigner, assertIsTransactionPartialSigner, assertIsTransactionSendingSigner, assertIsTransactionSigner, createSignableMessage, createSignerFromKeyPair, generateKeyPairSigner, getSignersFromInstruction, getSignersFromTransaction, isKeyPairSigner, isMessageModifyingSigner, isMessagePartialSigner, isMessageSigner, isTransactionModifyingSigner, isTransactionPartialSigner, isTransactionSendingSigner, isTransactionSigner, partiallySignTransactionWithSigners, signAndSendTransactionWithSigners, signTransactionWithSigners };
// src/transaction-with-single-sending-signer.ts
function isTransactionWithSingleSendingSigner(transaction) {
try {
assertIsTransactionWithSingleSendingSigner(transaction);
return true;
} catch {
return false;
}
}
function assertIsTransactionWithSingleSendingSigner(transaction) {
const signers = getSignersFromTransaction(transaction);
const sendingSigners = signers.filter(isTransactionSendingSigner);
if (sendingSigners.length === 0) {
const error = new Error("No `TransactionSendingSigner` was identified.");
error.name = "MissingTransactionSendingSignerError";
throw error;
}
const sendingOnlySigners = sendingSigners.filter(
(signer) => !isTransactionPartialSigner(signer) && !isTransactionModifyingSigner(signer)
);
if (sendingOnlySigners.length > 1) {
const error = new Error("More than one `TransactionSendingSigner` was identified.");
error.name = "MultipleTransactionSendingSignersError";
throw error;
}
}
export { addSignersToInstruction, addSignersToTransaction, assertIsKeyPairSigner, assertIsMessageModifyingSigner, assertIsMessagePartialSigner, assertIsMessageSigner, assertIsTransactionModifyingSigner, assertIsTransactionPartialSigner, assertIsTransactionSendingSigner, assertIsTransactionSigner, assertIsTransactionWithSingleSendingSigner, createNoopSigner, createSignableMessage, createSignerFromKeyPair, generateKeyPairSigner, getSignersFromInstruction, getSignersFromTransaction, isKeyPairSigner, isMessageModifyingSigner, isMessagePartialSigner, isMessageSigner, isTransactionModifyingSigner, isTransactionPartialSigner, isTransactionSendingSigner, isTransactionSigner, isTransactionWithSingleSendingSigner, partiallySignTransactionWithSigners, signAndSendTransactionWithSigners, signTransactionWithSigners };
//# sourceMappingURL=out.js.map
//# sourceMappingURL=index.node.js.map

12

dist/types/account-signer-meta.d.ts
import { AccountRole, IAccountLookupMeta, IAccountMeta, IInstruction } from '@solana/instructions';
import { BaseTransaction, TransactionVersion } from '@solana/transactions';
import { TransactionSigner } from './transaction-signer';
import { TransactionSigner } from './transaction-signer.js';
/** An extension of the IAccountMeta type that keeps track of its transaction signer. */

@@ -9,10 +9,12 @@ export interface IAccountSignerMeta<TAddress extends string = string, TSigner extends TransactionSigner = TransactionSigner> extends IAccountMeta<TAddress> {

}
/** A variation of the IInstruction type that allows IAccountSignerMeta in its accounts array. */
type IAccountMetaWithWithSigner<TSigner extends TransactionSigner = TransactionSigner> = IAccountMeta | IAccountLookupMeta | IAccountSignerMeta<string, TSigner>;
export type IInstructionWithSigners<TProgramAddress extends string = string, TSigner extends TransactionSigner = TransactionSigner, TAccounts extends readonly IAccountMetaWithWithSigner<TSigner>[] = readonly IAccountMetaWithWithSigner<TSigner>[]> = IInstruction<TProgramAddress, TAccounts>;
/** A variation of the instruction type that allows IAccountSignerMeta in its account metas. */
export type IInstructionWithSigners<TSigner extends TransactionSigner = TransactionSigner, TAccounts extends readonly IAccountMetaWithWithSigner<TSigner>[] = readonly IAccountMetaWithWithSigner<TSigner>[]> = Pick<IInstruction<string, TAccounts>, 'accounts'>;
/** A variation of the transaction type that allows IAccountSignerMeta in its account metas. */
export type ITransactionWithSigners<TSigner extends TransactionSigner = TransactionSigner, TAccounts extends readonly IAccountMetaWithWithSigner<TSigner>[] = readonly IAccountMetaWithWithSigner<TSigner>[]> = Pick<BaseTransaction<TransactionVersion, IInstruction & IInstructionWithSigners<TSigner, TAccounts>>, 'instructions'>;
/** Extract all signers from an instruction that may contain IAccountSignerMeta accounts. */
export declare function getSignersFromInstruction<TSigner extends TransactionSigner = TransactionSigner>(instruction: IInstructionWithSigners<string, TSigner>): readonly TSigner[];
export declare function getSignersFromInstruction<TSigner extends TransactionSigner = TransactionSigner>(instruction: IInstructionWithSigners<TSigner>): readonly TSigner[];
/** Extract all signers from a transaction that may contain IAccountSignerMeta accounts. */
export declare function getSignersFromTransaction<TSigner extends TransactionSigner = TransactionSigner, TInstruction extends IInstructionWithSigners<string, TSigner> = IInstructionWithSigners<string, TSigner>>(transaction: BaseTransaction<TransactionVersion, TInstruction>): readonly TSigner[];
export declare function getSignersFromTransaction<TSigner extends TransactionSigner = TransactionSigner, TTransaction extends ITransactionWithSigners<TSigner> = ITransactionWithSigners<TSigner>>(transaction: TTransaction): readonly TSigner[];
export {};
//# sourceMappingURL=account-signer-meta.d.ts.map

@@ -1,5 +0,5 @@

import { MessageSigner } from './message-signer';
import { TransactionSigner } from './transaction-signer';
import { MessageSigner } from './message-signer.js';
import { TransactionSigner } from './transaction-signer.js';
/** Removes all duplicated signers from a provided array by comparing their addresses. */
export declare function deduplicateSigners<TSigner extends MessageSigner | TransactionSigner>(signers: readonly TSigner[]): readonly TSigner[];
//# sourceMappingURL=deduplicate-signers.d.ts.map

@@ -1,13 +0,16 @@

export * from './account-signer-meta';
export * from './keypair-signer';
export * from './message-modifying-signer';
export * from './message-partial-signer';
export * from './message-signer';
export * from './sign-transaction';
export * from './signable-message';
export * from './transaction-modifying-signer';
export * from './transaction-partial-signer';
export * from './transaction-sending-signer';
export * from './transaction-signer';
export * from './types';
export * from './account-signer-meta.js';
export * from './add-signers.js';
export * from './keypair-signer.js';
export * from './message-modifying-signer.js';
export * from './message-partial-signer.js';
export * from './message-signer.js';
export * from './noop-signer.js';
export * from './sign-transaction.js';
export * from './signable-message.js';
export * from './transaction-modifying-signer.js';
export * from './transaction-partial-signer.js';
export * from './transaction-sending-signer.js';
export * from './transaction-signer.js';
export * from './transaction-with-single-sending-signer.js';
export * from './types.js';
//# sourceMappingURL=index.d.ts.map
import { Address } from '@solana/addresses';
import { MessagePartialSigner } from './message-partial-signer';
import { TransactionPartialSigner } from './transaction-partial-signer';
import { MessagePartialSigner } from './message-partial-signer.js';
import { TransactionPartialSigner } from './transaction-partial-signer.js';
/** Defines a signer capable of signing messages and transactions using a CryptoKeyPair. */

@@ -5,0 +5,0 @@ export type KeyPairSigner<TAddress extends string = string> = MessagePartialSigner<TAddress> & TransactionPartialSigner<TAddress> & {

import { Address } from '@solana/addresses';
import { SignableMessage } from './signable-message';
import { SignableMessage } from './signable-message.js';
import { BaseSignerConfig } from './types.js';
export type MessageModifyingSignerConfig = BaseSignerConfig;
/** Defines a signer capable of signing messages. */
export type MessageModifyingSigner<TAddress extends string = string> = Readonly<{
address: Address<TAddress>;
modifyAndSignMessages(messages: readonly SignableMessage[]): Promise<readonly SignableMessage[]>;
modifyAndSignMessages(messages: readonly SignableMessage[], config?: MessageModifyingSignerConfig): Promise<readonly SignableMessage[]>;
}>;

@@ -8,0 +10,0 @@ /** Checks whether the provided value implements the {@link MessageModifyingSigner} interface. */

import { Address } from '@solana/addresses';
import { SignableMessage } from './signable-message';
import { SignatureDictionary } from './types';
import { SignableMessage } from './signable-message.js';
import { BaseSignerConfig, SignatureDictionary } from './types.js';
export type MessagePartialSignerConfig = BaseSignerConfig;
/** Defines a signer capable of signing messages. */
export type MessagePartialSigner<TAddress extends string = string> = Readonly<{
address: Address<TAddress>;
signMessages(messages: readonly SignableMessage[]): Promise<readonly SignatureDictionary[]>;
signMessages(messages: readonly SignableMessage[], config?: MessagePartialSignerConfig): Promise<readonly SignatureDictionary[]>;
}>;

@@ -9,0 +10,0 @@ /** Checks whether the provided value implements the {@link MessagePartialSigner} interface. */

import { Address } from '@solana/addresses';
import { MessageModifyingSigner } from './message-modifying-signer';
import { MessagePartialSigner } from './message-partial-signer';
import { MessageModifyingSigner } from './message-modifying-signer.js';
import { MessagePartialSigner } from './message-partial-signer.js';
/** Defines a signer capable of signing messages. */

@@ -5,0 +5,0 @@ export type MessageSigner<TAddress extends string = string> = MessagePartialSigner<TAddress> | MessageModifyingSigner<TAddress>;

import { SignatureBytes } from '@solana/keys';
import { CompilableTransaction, IFullySignedTransaction, ITransactionWithSignatures, TransactionVersion } from '@solana/transactions';
import { IInstructionWithSigners } from './account-signer-meta';
import { TransactionSigner } from './transaction-signer';
type CompilableTransactionWithSigners = CompilableTransaction<TransactionVersion, IInstructionWithSigners<string, TransactionSigner>> & Partial<ITransactionWithSignatures>;
import { CompilableTransaction, IFullySignedTransaction, ITransactionWithSignatures } from '@solana/transactions';
import { ITransactionWithSigners } from './account-signer-meta.js';
import { ITransactionWithSingleSendingSigner } from './transaction-with-single-sending-signer.js';
type CompilableTransactionWithSigners = CompilableTransaction & ITransactionWithSigners & Partial<ITransactionWithSignatures>;
/**

@@ -11,3 +11,5 @@ * Signs a transaction using any signers that may be stored in IAccountSignerMeta instruction accounts

*/
export declare function partiallySignTransactionWithSigners<TTransaction extends CompilableTransactionWithSigners = CompilableTransactionWithSigners>(transaction: TTransaction, signers?: readonly TransactionSigner[]): Promise<TTransaction & ITransactionWithSignatures>;
export declare function partiallySignTransactionWithSigners<TTransaction extends CompilableTransactionWithSigners = CompilableTransactionWithSigners>(transaction: TTransaction, config?: {
abortSignal?: AbortSignal;
}): Promise<TTransaction & ITransactionWithSignatures>;
/**

@@ -19,3 +21,5 @@ * Signs a transaction using any signers that may be stored in IAccountSignerMeta instruction accounts

*/
export declare function signTransactionWithSigners<TTransaction extends CompilableTransactionWithSigners = CompilableTransactionWithSigners>(transaction: TTransaction, signers?: readonly TransactionSigner[]): Promise<TTransaction & IFullySignedTransaction>;
export declare function signTransactionWithSigners<TTransaction extends CompilableTransactionWithSigners = CompilableTransactionWithSigners>(transaction: TTransaction, config?: {
abortSignal?: AbortSignal;
}): Promise<TTransaction & IFullySignedTransaction>;
/**

@@ -27,4 +31,6 @@ * Signs and sends a transaction using any signers that may be stored in IAccountSignerMeta

*/
export declare function signAndSendTransactionWithSigners<TTransaction extends CompilableTransactionWithSigners = CompilableTransactionWithSigners>(transaction: TTransaction, signers?: readonly TransactionSigner[], fallbackSender?: (transaction: TTransaction & IFullySignedTransaction) => Promise<SignatureBytes>): Promise<SignatureBytes>;
export declare function signAndSendTransactionWithSigners<TTransaction extends CompilableTransactionWithSigners & ITransactionWithSingleSendingSigner = CompilableTransactionWithSigners & ITransactionWithSingleSendingSigner>(transaction: TTransaction, config?: {
abortSignal?: AbortSignal;
}): Promise<SignatureBytes>;
export {};
//# sourceMappingURL=sign-transaction.d.ts.map

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

import { SignatureDictionary } from './types';
import { SignatureDictionary } from './types.js';
/** Defines a message that needs signing and its current set of signatures if any. */

@@ -3,0 +3,0 @@ export type SignableMessage = Readonly<{

import { Address } from '@solana/addresses';
import { CompilableTransaction } from '@solana/transactions';
import { BaseSignerConfig } from './types.js';
export type TransactionModifyingSignerConfig = BaseSignerConfig;
/** Defines a signer capable of signing transactions. */
export type TransactionModifyingSigner<TAddress extends string = string> = Readonly<{
address: Address<TAddress>;
modifyAndSignTransactions<TTransaction extends CompilableTransaction>(transactions: readonly TTransaction[]): Promise<readonly TTransaction[]>;
modifyAndSignTransactions<TTransaction extends CompilableTransaction>(transactions: readonly TTransaction[], config?: TransactionModifyingSignerConfig): Promise<readonly TTransaction[]>;
}>;

@@ -8,0 +10,0 @@ /** Checks whether the provided value implements the {@link TransactionModifyingSigner} interface. */

import { Address } from '@solana/addresses';
import { CompilableTransaction } from '@solana/transactions';
import { SignatureDictionary } from './types';
import { BaseSignerConfig, SignatureDictionary } from './types.js';
export type TransactionPartialSignerConfig = BaseSignerConfig;
/** Defines a signer capable of signing transactions. */
export type TransactionPartialSigner<TAddress extends string = string> = Readonly<{
address: Address<TAddress>;
signTransactions(transactions: readonly CompilableTransaction[]): Promise<readonly SignatureDictionary[]>;
signTransactions(transactions: readonly CompilableTransaction[], config?: TransactionPartialSignerConfig): Promise<readonly SignatureDictionary[]>;
}>;

@@ -9,0 +10,0 @@ /** Checks whether the provided value implements the {@link TransactionPartialSigner} interface. */

import { Address } from '@solana/addresses';
import { SignatureBytes } from '@solana/keys';
import { CompilableTransaction } from '@solana/transactions';
import { BaseSignerConfig } from './types.js';
export type TransactionSendingSignerConfig = BaseSignerConfig;
/** Defines a signer capable of signing and sending transactions simultaneously. */
export type TransactionSendingSigner<TAddress extends string = string> = Readonly<{
address: Address<TAddress>;
signAndSendTransactions(transactions: readonly CompilableTransaction[]): Promise<readonly SignatureBytes[]>;
signAndSendTransactions(transactions: readonly CompilableTransaction[], config?: TransactionSendingSignerConfig): Promise<readonly SignatureBytes[]>;
}>;

@@ -9,0 +11,0 @@ /** Checks whether the provided value implements the {@link TransactionSendingSigner} interface. */

import { Address } from '@solana/addresses';
import { TransactionModifyingSigner } from './transaction-modifying-signer';
import { TransactionPartialSigner } from './transaction-partial-signer';
import { TransactionSendingSigner } from './transaction-sending-signer';
import { TransactionModifyingSigner } from './transaction-modifying-signer.js';
import { TransactionPartialSigner } from './transaction-partial-signer.js';
import { TransactionSendingSigner } from './transaction-sending-signer.js';
/** Defines a signer capable of signing transactions. */

@@ -6,0 +6,0 @@ export type TransactionSigner<TAddress extends string = string> = TransactionPartialSigner<TAddress> | TransactionModifyingSigner<TAddress> | TransactionSendingSigner<TAddress>;

import { Address } from '@solana/addresses';
import { SignatureBytes } from '@solana/keys';
export type SignatureDictionary = Readonly<Record<Address, SignatureBytes>>;
export type BaseSignerConfig = Readonly<{
abortSignal?: AbortSignal;
}>;
//# sourceMappingURL=types.d.ts.map
{
"name": "@solana/signers",
"version": "2.0.0-experimental.4c1874d",
"version": "2.0.0-experimental.4c9a8b8",
"description": "An abstraction layer over signing messages and transactions in Solana",

@@ -52,6 +52,6 @@ "exports": {

"dependencies": {
"@solana/addresses": "2.0.0-experimental.4c1874d",
"@solana/instructions": "2.0.0-experimental.4c1874d",
"@solana/keys": "2.0.0-experimental.4c1874d",
"@solana/transactions": "2.0.0-experimental.4c1874d"
"@solana/addresses": "2.0.0-experimental.4c9a8b8",
"@solana/instructions": "2.0.0-experimental.4c9a8b8",
"@solana/transactions": "2.0.0-experimental.4c9a8b8",
"@solana/keys": "2.0.0-experimental.4c9a8b8"
},

@@ -61,4 +61,4 @@ "devDependencies": {

"@swc/jest": "^0.2.29",
"@types/jest": "^29.5.6",
"@typescript-eslint/eslint-plugin": "^6.7.0",
"@types/jest": "^29.5.11",
"@typescript-eslint/eslint-plugin": "^6.13.2",
"@typescript-eslint/parser": "^6.3.0",

@@ -73,11 +73,12 @@ "agadoo": "^3.0.0",

"jest-runner-prettier": "^1.0.0",
"prettier": "^2.8",
"prettier": "^3.1",
"tsup": "^8.0.1",
"typescript": "^5.2.2",
"version-from-git": "^1.1.1",
"@solana/rpc-types": "2.0.0-experimental.4c9a8b8",
"build-scripts": "0.0.0",
"test-config": "0.0.0",
"test-matchers": "0.0.0",
"text-encoding-impl": "0.0.0",
"tsconfig": "0.0.0"
"tsconfig": "0.0.0",
"text-encoding-impl": "0.0.0"
},

@@ -93,4 +94,4 @@ "bundlewatch": {

"scripts": {
"compile:js": "tsup --config build-scripts/tsup.config.library.ts",
"compile:typedefs": "tsc -p ./tsconfig.declarations.json",
"compile:js": "tsup --config build-scripts/tsup.config.package.ts",
"compile:typedefs": "tsc -p ./tsconfig.declarations.json && node node_modules/build-scripts/add-js-extension-to-types.mjs",
"dev": "jest -c node_modules/test-config/jest-dev.config.ts --rootDir . --watch",

@@ -97,0 +98,0 @@ "publish-packages": "pnpm publish --tag experimental --access public --no-git-checks",

@@ -339,10 +339,4 @@ [![npm][npm-image]][npm-url]

### Functions
For a given address, a Noop (No-Operation) signer can be created to offer an implementation of both the `MessagePartialSigner` and `TransactionPartialSigner` interfaces such that they do not sign anything. Namely, signing a transaction or a message with a `NoopSigner` will return an empty `SignatureDictionary`.
#### `createNoopSigner()`
_Coming soon..._
Creates a Noop (No-Operation) signer from a given address. It will return an implementation of both the `MessagePartialSigner` and `TransactionPartialSigner` interfaces that do not sign anything. Namely, signing a transaction or a message will return an empty `SignatureDictionary`.
This signer may be useful:

@@ -353,8 +347,26 @@

### Types
#### `NoopSigner<TAddress>`
Defines a Noop (No-Operation) signer.
```ts
const myNoopSigner: NoopSigner;
myNoopSigner satisfies MessagePartialSigner;
myNoopSigner satisfies TransactionPartialSigner;
```
### Functions
#### `createNoopSigner()`
Creates a Noop (No-Operation) signer from a given address.
```ts
import { createNoopSigner } from '@solana/signers';
const myAddress = address('1234..5678');
const myNoopSigner = createNoopSigner(myAddress);
// ^ MessagePartialSigner<'1234..5678'> & TransactionPartialSigner<'1234..5678'>
const myNoopSigner = createNoopSigner(address('1234..5678'));
const [myMessageSignatures] = await myNoopSigner.signMessages([myMessage]); // <- Empty signature dictionary.
const [myTransactionSignatures] = await myNoopSigner.signTransactions([myTransaction]); // <- Empty signature dictionary.
```

@@ -384,6 +396,6 @@

Extends the `IInstruction` type to allow `IAccountSignerMetas` to be used inside the instruction's `accounts` array.
Composable type that allows `IAccountSignerMetas` to be used inside the instruction's `accounts` array.
```ts
const myInstructionWithSigners: IInstructionWithSigners = {
const myInstructionWithSigners: IInstruction & IInstructionWithSigners = {
programAddress: address('1234..5678'),

@@ -400,2 +412,17 @@ accounts: [

#### `ITransactionWithSigners`
Composable type that allows `IAccountSignerMetas` to be used inside all of the transaction's account metas.
```ts
const myTransactionWithSigners: BaseTransaction & ITransactionWithSigners = {
instructions: [
myInstructionA as IInstruction & IInstructionWithSigners,
myInstructionB as IInstruction & IInstructionWithSigners,
myInstructionC as IInstruction,
],
version: 0,
};
```
### Functions

@@ -431,2 +458,35 @@

#### `addSignersToInstruction()`
Helper function that adds the provided signers to any of the applicable account metas. For an account meta to match a provided signer it:
- Must have a signer role (`AccountRole.READONLY_SIGNER` or `AccountRole.WRITABLE_SIGNER`).
- Must have the same address as the provided signer.
- Must not have an attached signer already.
```ts
const myInstruction: IInstruction = {
accounts: [
{ address: '1111' as Address, role: AccountRole.READONLY_SIGNER },
{ address: '2222' as Address, role: AccountRole.WRITABLE_SIGNER },
],
// ...
};
const signerA: TransactionSigner<'1111'>;
const signerB: TransactionSigner<'2222'>;
const myInstructionWithSigners = addSignersToInstruction([mySignerA, mySignerB], myInstruction);
// myInstructionWithSigners.accounts[0].signer === mySignerA
// myInstructionWithSigners.accounts[1].signer === mySignerB
```
#### `addSignersToTransaction()`
Similarly to `addSignersToInstruction`, this function adds signer to all the applicable account metas of all the instructions inside a transaction.
```ts
const myTransactionWithSigners = addSignersToTransaction(mySigners, myTransaction);
```
## Signing transactions with signers

@@ -445,9 +505,11 @@

```ts
const mySignedTransaction = partiallySignTransactionWithSigners(myTransaction);
const mySignedTransaction = await partiallySignTransactionWithSigners(myTransaction);
```
It also accepts an additional array of signers that will be merged with the ones extracted from the transaction, if any.
It also accepts an optional `AbortSignal` that will be propagated to all signers.
```ts
const mySignedTransaction = partiallySignTransactionWithSigners(myTransaction, [myOtherSigner]);
const mySignedTransaction = await partiallySignTransactionWithSigners(myTransaction, {
abortSignal: myAbortController.signal,
});
```

@@ -462,6 +524,8 @@

```ts
const mySignedTransaction = signTransactionWithSigners(myTransaction);
const mySignedTransaction = await signTransactionWithSigners(myTransaction);
// With additional signers.
const mySignedTransaction = signTransactionWithSigners(myTransaction, [myOtherSigner]);
// With additional config.
const mySignedTransaction = await signTransactionWithSigners(myTransaction, {
abortSignal: myAbortController.signal,
});

@@ -477,26 +541,38 @@ // We now know the transaction is fully signed.

```ts
const myTransactionSignature = signAndSendTransactionWithSigners(myTransaction);
const myTransactionSignature = await signAndSendTransactionWithSigners(myTransaction);
// With additional signers.
const myTransactionSignature = signAndSendTransactionWithSigners(myTransaction, [myOtherSigner]);
// With additional config.
const myTransactionSignature = await signAndSendTransactionWithSigners(myTransaction, {
abortSignal: myAbortController.signal,
});
```
Similarly to the `partiallySignTransactionWithSigners` function, it first uses all `TransactionModifyingSigners` sequentially before using all `TransactionPartialSigners` in parallel. It then sends the transaction using the first `TransactionSendingSigner` it finds. Any other sending signer that does not implement another transaction signer interface will be ignored.
Similarly to the `partiallySignTransactionWithSigners` function, it first uses all `TransactionModifyingSigners` sequentially before using all `TransactionPartialSigners` in parallel. It then sends the transaction using the `TransactionSendingSigner` it identified.
If no `TransactionSendingSigner` is extracted from the transaction or explicitly provided, the `fallbackSender` third argument will be used to send the transaction. If no fallback sender is provided and no sending signer is identified, an error will be thrown.
Here as well, composite transaction signers are treated such that at least one sending signer is used if any. When a `TransactionSigner` implements more than one interface, use it as a:
- `TransactionSendingSigner`, if no other `TransactionSendingSigner` exists.
- `TransactionModifyingSigner`, if no other `TransactionModifyingSigner` exists.
- `TransactionPartialSigner`, otherwise.
The provided transaction must be of type `ITransactionWithSingleSendingSigner` meaning that it must contain exactly one `TransactionSendingSigner` inside its account metas. If more than one composite signers implement the `TransactionSendingSigner` interface, one of them will be selected as the sending signer.
Therefore, you may use the `assertIsTransactionWithSingleSendingSigner()` function to ensure the transaction is of the expected type.
```ts
const fallbackSender = async (transaction: CompilableTransaction) => {
const encodedTransaction = getBase64EncodedWireTransaction(transaction);
const signature = await rpc.sendTransaction(encodedTransaction).send();
return getBase58Encoder().encode(signature);
};
const myTransactionSignature = signAndSendTransactionWithSigners(myTransaction, [], fallbackSender);
assertIsTransactionWithSingleSendingSigner(myTransaction);
const myTransactionSignature = await signAndSendTransactionWithSigners(myTransaction);
```
Here as well, composite transaction signers are treated such that at least one sending signer is used if any. When a `TransactionSigner` implements more than one interface, use it as a:
Alternatively, you may use the `isTransactionWithSingleSendingSigner()` function to provide a fallback in case the transaction does not contain any sending signer.
- `TransactionSendingSigner`, if no other `TransactionSendingSigner` exist.
- `TransactionModifyingSigner`, if no other `TransactionModifyingSigner` exist.
- `TransactionPartialSigner`, otherwise.
```ts
let transactionSignature: SignatureBytes;
if (isTransactionWithSingleSendingSigner(transaction)) {
transactionSignature = await signAndSendTransactionWithSigners(transaction);
} else {
const signedTransaction = await signTransactionWithSigners(transaction);
const encodedTransaction = getBase64EncodedWireTransaction(signedTransaction);
transactionSignature = await rpc.sendTransaction(encodedTransaction).send();
}
```

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