@solana/signers
Advanced tools
Comparing version 2.0.0-canary-20241029091920 to 2.0.0-canary-20241029094702
import { AccountRole, IAccountLookupMeta, IAccountMeta, IInstruction } from '@solana/instructions'; | ||
import { BaseTransactionMessage, TransactionVersion } from '@solana/transaction-messages'; | ||
import { BaseTransactionMessage, ITransactionMessageWithFeePayer, TransactionVersion } from '@solana/transaction-messages'; | ||
import { ITransactionMessageWithFeePayerSigner } from './fee-payer-signer'; | ||
import { TransactionSigner } from './transaction-signer'; | ||
@@ -13,10 +14,8 @@ /** An extension of the IAccountMeta type that keeps track of its transaction signer. */ | ||
/** A variation of the transaction message type that allows IAccountSignerMeta in its account metas. */ | ||
export type ITransactionMessageWithSigners<TSigner extends TransactionSigner = TransactionSigner, TAccounts extends readonly IAccountMetaWithSigner<TSigner>[] = readonly IAccountMetaWithSigner<TSigner>[]> = Pick<BaseTransactionMessage<TransactionVersion, IInstruction & IInstructionWithSigners<TSigner, TAccounts>>, 'instructions'> & { | ||
feePayerSigner?: TSigner; | ||
}; | ||
export type ITransactionMessageWithSigners<TAddress extends string = string, TSigner extends TransactionSigner<TAddress> = TransactionSigner<TAddress>, TAccounts extends readonly IAccountMetaWithSigner<TSigner>[] = readonly IAccountMetaWithSigner<TSigner>[]> = Partial<ITransactionMessageWithFeePayer<TAddress> | ITransactionMessageWithFeePayerSigner<TAddress, TSigner>> & Pick<BaseTransactionMessage<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<TSigner>): readonly TSigner[]; | ||
/** Extract all signers from a transaction message that may contain IAccountSignerMeta accounts. */ | ||
export declare function getSignersFromTransactionMessage<TSigner extends TransactionSigner = TransactionSigner, TTransactionMessage extends ITransactionMessageWithSigners<TSigner> = ITransactionMessageWithSigners<TSigner>>(transaction: TTransactionMessage): readonly TSigner[]; | ||
export declare function getSignersFromTransactionMessage<TAddress extends string = string, TSigner extends TransactionSigner<TAddress> = TransactionSigner<TAddress>, TTransactionMessage extends ITransactionMessageWithSigners<TAddress, TSigner> = ITransactionMessageWithSigners<TAddress, TSigner>>(transaction: TTransactionMessage): readonly TSigner[]; | ||
export {}; | ||
//# sourceMappingURL=account-signer-meta.d.ts.map |
@@ -1,9 +0,7 @@ | ||
import { Address } from '@solana/addresses'; | ||
import { BaseTransactionMessage } from '@solana/transaction-messages'; | ||
import { BaseTransactionMessage, ITransactionMessageWithFeePayer } from '@solana/transaction-messages'; | ||
import { TransactionSigner } from './transaction-signer'; | ||
export interface ITransactionMessageWithFeePayerSigner<TAddress extends string = string, TSigner extends TransactionSigner<TAddress> = TransactionSigner<TAddress>> { | ||
readonly feePayer: Address<TAddress>; | ||
readonly feePayerSigner: TSigner; | ||
readonly feePayer: TSigner; | ||
} | ||
export declare function setTransactionMessageFeePayerSigner<TFeePayerAddress extends string, TTransactionMessage extends BaseTransactionMessage>(feePayerSigner: TransactionSigner<TFeePayerAddress>, transactionMessage: TTransactionMessage): ITransactionMessageWithFeePayerSigner<TFeePayerAddress> & Omit<TTransactionMessage, 'feePayer' | 'feePayerSigner'>; | ||
export declare function setTransactionMessageFeePayerSigner<TFeePayerAddress extends string, TTransactionMessage extends BaseTransactionMessage & Partial<ITransactionMessageWithFeePayer | ITransactionMessageWithFeePayerSigner>>(feePayer: TransactionSigner<TFeePayerAddress>, transactionMessage: TTransactionMessage): ITransactionMessageWithFeePayerSigner<TFeePayerAddress> & Omit<TTransactionMessage, 'feePayer'>; | ||
//# sourceMappingURL=fee-payer-signer.d.ts.map |
{ | ||
"name": "@solana/signers", | ||
"version": "2.0.0-canary-20241029091920", | ||
"version": "2.0.0-canary-20241029094702", | ||
"description": "An abstraction layer over signing messages and transactions in Solana", | ||
@@ -60,9 +60,9 @@ "exports": { | ||
"dependencies": { | ||
"@solana/addresses": "2.0.0-canary-20241029091920", | ||
"@solana/errors": "2.0.0-canary-20241029091920", | ||
"@solana/instructions": "2.0.0-canary-20241029091920", | ||
"@solana/codecs-core": "2.0.0-canary-20241029091920", | ||
"@solana/keys": "2.0.0-canary-20241029091920", | ||
"@solana/transaction-messages": "2.0.0-canary-20241029091920", | ||
"@solana/transactions": "2.0.0-canary-20241029091920" | ||
"@solana/addresses": "2.0.0-canary-20241029094702", | ||
"@solana/errors": "2.0.0-canary-20241029094702", | ||
"@solana/instructions": "2.0.0-canary-20241029094702", | ||
"@solana/keys": "2.0.0-canary-20241029094702", | ||
"@solana/codecs-core": "2.0.0-canary-20241029094702", | ||
"@solana/transaction-messages": "2.0.0-canary-20241029094702", | ||
"@solana/transactions": "2.0.0-canary-20241029094702" | ||
}, | ||
@@ -69,0 +69,0 @@ "peerDependencies": { |
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
403290
1916
+ Added@solana/addresses@2.0.0-canary-20241029094702(transitive)
+ Added@solana/assertions@2.0.0-canary-20241029094702(transitive)
+ Added@solana/codecs-core@2.0.0-canary-20241029094702(transitive)
+ Added@solana/codecs-data-structures@2.0.0-canary-20241029094702(transitive)
+ Added@solana/codecs-numbers@2.0.0-canary-20241029094702(transitive)
+ Added@solana/codecs-strings@2.0.0-canary-20241029094702(transitive)
+ Added@solana/errors@2.0.0-canary-20241029094702(transitive)
+ Added@solana/functional@2.0.0-canary-20241029094702(transitive)
+ Added@solana/instructions@2.0.0-canary-20241029094702(transitive)
+ Added@solana/keys@2.0.0-canary-20241029094702(transitive)
+ Added@solana/rpc-types@2.0.0-canary-20241029094702(transitive)
+ Added@solana/transaction-messages@2.0.0-canary-20241029094702(transitive)
+ Added@solana/transactions@2.0.0-canary-20241029094702(transitive)
- Removed@solana/addresses@2.0.0-canary-20241029091920(transitive)
- Removed@solana/assertions@2.0.0-canary-20241029091920(transitive)
- Removed@solana/codecs-core@2.0.0-canary-20241029091920(transitive)
- Removed@solana/codecs-data-structures@2.0.0-canary-20241029091920(transitive)
- Removed@solana/codecs-numbers@2.0.0-canary-20241029091920(transitive)
- Removed@solana/codecs-strings@2.0.0-canary-20241029091920(transitive)
- Removed@solana/errors@2.0.0-canary-20241029091920(transitive)
- Removed@solana/functional@2.0.0-canary-20241029091920(transitive)
- Removed@solana/instructions@2.0.0-canary-20241029091920(transitive)
- Removed@solana/keys@2.0.0-canary-20241029091920(transitive)
- Removed@solana/rpc-types@2.0.0-canary-20241029091920(transitive)
- Removed@solana/transaction-messages@2.0.0-canary-20241029091920(transitive)
- Removed@solana/transactions@2.0.0-canary-20241029091920(transitive)
Updated@solana/transaction-messages@2.0.0-canary-20241029094702