@solana/signers 2.0.0-experimental.efe6f4d → 2.0.0-experimental.f5d64e6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +214 -12
- package/dist/index.browser.cjs +197 -8
- package/dist/index.browser.cjs.map +1 -1
- package/dist/index.browser.js +189 -10
- package/dist/index.browser.js.map +1 -1
- package/dist/index.native.js +189 -10
- package/dist/index.native.js.map +1 -1
- package/dist/index.node.cjs +197 -8
- package/dist/index.node.cjs.map +1 -1
- package/dist/index.node.js +189 -10
- package/dist/index.node.js.map +1 -1
- package/dist/types/account-signer-meta.d.ts +19 -0
- package/dist/types/account-signer-meta.d.ts.map +1 -0
- package/dist/types/add-signers.d.ts +9 -0
- package/dist/types/add-signers.d.ts.map +1 -0
- package/dist/types/deduplicate-signers.d.ts +5 -0
- package/dist/types/deduplicate-signers.d.ts.map +1 -0
- package/dist/types/index.d.ts +15 -10
- package/dist/types/index.d.ts.map +1 -0
- package/dist/types/keypair-signer.d.ts +2 -2
- package/dist/types/keypair-signer.d.ts.map +1 -0
- package/dist/types/message-modifying-signer.d.ts +4 -2
- package/dist/types/message-modifying-signer.d.ts.map +1 -0
- package/dist/types/message-partial-signer.d.ts +4 -3
- package/dist/types/message-partial-signer.d.ts.map +1 -0
- package/dist/types/message-signer.d.ts +2 -2
- package/dist/types/message-signer.d.ts.map +1 -0
- package/dist/types/noop-signer.d.ts +8 -0
- package/dist/types/noop-signer.d.ts.map +1 -0
- package/dist/types/sign-transaction.d.ts +33 -0
- package/dist/types/sign-transaction.d.ts.map +1 -0
- package/dist/types/signable-message.d.ts +1 -1
- package/dist/types/signable-message.d.ts.map +1 -0
- package/dist/types/transaction-modifying-signer.d.ts +3 -1
- package/dist/types/transaction-modifying-signer.d.ts.map +1 -0
- package/dist/types/transaction-partial-signer.d.ts +3 -2
- package/dist/types/transaction-partial-signer.d.ts.map +1 -0
- package/dist/types/transaction-sending-signer.d.ts +3 -1
- package/dist/types/transaction-sending-signer.d.ts.map +1 -0
- package/dist/types/transaction-signer.d.ts +3 -3
- package/dist/types/transaction-signer.d.ts.map +1 -0
- package/dist/types/transaction-with-single-sending-signer.d.ts +11 -0
- package/dist/types/transaction-with-single-sending-signer.d.ts.map +1 -0
- package/dist/types/types.d.ts +3 -0
- package/dist/types/types.d.ts.map +1 -0
- package/package.json +11 -10
- package/dist/index.development.js +0 -1200
- package/dist/index.development.js.map +0 -1
- package/dist/index.production.min.js +0 -33
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import { Address } from '@solana/addresses';
|
|
2
2
|
import { CompilableTransaction } from '@solana/transactions';
|
|
3
|
-
import { SignatureDictionary } from './types';
|
|
3
|
+
import { BaseSignerConfig, SignatureDictionary } from './types.js';
|
|
4
|
+
export type TransactionPartialSignerConfig = BaseSignerConfig;
|
|
4
5
|
/** Defines a signer capable of signing transactions. */
|
|
5
6
|
export type TransactionPartialSigner<TAddress extends string = string> = Readonly<{
|
|
6
7
|
address: Address<TAddress>;
|
|
7
|
-
signTransactions(transactions: readonly CompilableTransaction[]): Promise<readonly SignatureDictionary[]>;
|
|
8
|
+
signTransactions(transactions: readonly CompilableTransaction[], config?: TransactionPartialSignerConfig): Promise<readonly SignatureDictionary[]>;
|
|
8
9
|
}>;
|
|
9
10
|
/** Checks whether the provided value implements the {@link TransactionPartialSigner} interface. */
|
|
10
11
|
export declare function isTransactionPartialSigner<TAddress extends string>(value: {
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"transaction-partial-signer.d.ts","sourceRoot":"","sources":["../../src/transaction-partial-signer.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAC5C,OAAO,EAAE,qBAAqB,EAAE,MAAM,sBAAsB,CAAC;AAE7D,OAAO,EAAE,gBAAgB,EAAE,mBAAmB,EAAE,MAAM,SAAS,CAAC;AAEhE,MAAM,MAAM,8BAA8B,GAAG,gBAAgB,CAAC;AAE9D,wDAAwD;AACxD,MAAM,MAAM,wBAAwB,CAAC,QAAQ,SAAS,MAAM,GAAG,MAAM,IAAI,QAAQ,CAAC;IAC9E,OAAO,EAAE,OAAO,CAAC,QAAQ,CAAC,CAAC;IAC3B,gBAAgB,CACZ,YAAY,EAAE,SAAS,qBAAqB,EAAE,EAC9C,MAAM,CAAC,EAAE,8BAA8B,GACxC,OAAO,CAAC,SAAS,mBAAmB,EAAE,CAAC,CAAC;CAC9C,CAAC,CAAC;AAEH,mGAAmG;AACnG,wBAAgB,0BAA0B,CAAC,QAAQ,SAAS,MAAM,EAAE,KAAK,EAAE;IACvE,OAAO,EAAE,OAAO,CAAC,QAAQ,CAAC,CAAC;IAC3B,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC;CAC1B,GAAG,KAAK,IAAI,wBAAwB,CAAC,QAAQ,CAAC,CAE9C;AAED,iGAAiG;AACjG,wBAAgB,gCAAgC,CAAC,QAAQ,SAAS,MAAM,EAAE,KAAK,EAAE;IAC7E,OAAO,EAAE,OAAO,CAAC,QAAQ,CAAC,CAAC;IAC3B,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC;CAC1B,GAAG,OAAO,CAAC,KAAK,IAAI,wBAAwB,CAAC,QAAQ,CAAC,CAKtD"}
|
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
import { Address } from '@solana/addresses';
|
|
2
2
|
import { SignatureBytes } from '@solana/keys';
|
|
3
3
|
import { CompilableTransaction } from '@solana/transactions';
|
|
4
|
+
import { BaseSignerConfig } from './types.js';
|
|
5
|
+
export type TransactionSendingSignerConfig = BaseSignerConfig;
|
|
4
6
|
/** Defines a signer capable of signing and sending transactions simultaneously. */
|
|
5
7
|
export type TransactionSendingSigner<TAddress extends string = string> = Readonly<{
|
|
6
8
|
address: Address<TAddress>;
|
|
7
|
-
signAndSendTransactions(transactions: readonly CompilableTransaction[]): Promise<readonly SignatureBytes[]>;
|
|
9
|
+
signAndSendTransactions(transactions: readonly CompilableTransaction[], config?: TransactionSendingSignerConfig): Promise<readonly SignatureBytes[]>;
|
|
8
10
|
}>;
|
|
9
11
|
/** Checks whether the provided value implements the {@link TransactionSendingSigner} interface. */
|
|
10
12
|
export declare function isTransactionSendingSigner<TAddress extends string>(value: {
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"transaction-sending-signer.d.ts","sourceRoot":"","sources":["../../src/transaction-sending-signer.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAC5C,OAAO,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AAC9C,OAAO,EAAE,qBAAqB,EAAE,MAAM,sBAAsB,CAAC;AAE7D,OAAO,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAC;AAE3C,MAAM,MAAM,8BAA8B,GAAG,gBAAgB,CAAC;AAE9D,mFAAmF;AACnF,MAAM,MAAM,wBAAwB,CAAC,QAAQ,SAAS,MAAM,GAAG,MAAM,IAAI,QAAQ,CAAC;IAC9E,OAAO,EAAE,OAAO,CAAC,QAAQ,CAAC,CAAC;IAC3B,uBAAuB,CACnB,YAAY,EAAE,SAAS,qBAAqB,EAAE,EAC9C,MAAM,CAAC,EAAE,8BAA8B,GACxC,OAAO,CAAC,SAAS,cAAc,EAAE,CAAC,CAAC;CACzC,CAAC,CAAC;AAEH,mGAAmG;AACnG,wBAAgB,0BAA0B,CAAC,QAAQ,SAAS,MAAM,EAAE,KAAK,EAAE;IACvE,OAAO,EAAE,OAAO,CAAC,QAAQ,CAAC,CAAC;IAC3B,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC;CAC1B,GAAG,KAAK,IAAI,wBAAwB,CAAC,QAAQ,CAAC,CAE9C;AAED,iGAAiG;AACjG,wBAAgB,gCAAgC,CAAC,QAAQ,SAAS,MAAM,EAAE,KAAK,EAAE;IAC7E,OAAO,EAAE,OAAO,CAAC,QAAQ,CAAC,CAAC;IAC3B,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC;CAC1B,GAAG,OAAO,CAAC,KAAK,IAAI,wBAAwB,CAAC,QAAQ,CAAC,CAKtD"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Address } from '@solana/addresses';
|
|
2
|
-
import { TransactionModifyingSigner } from './transaction-modifying-signer';
|
|
3
|
-
import { TransactionPartialSigner } from './transaction-partial-signer';
|
|
4
|
-
import { TransactionSendingSigner } from './transaction-sending-signer';
|
|
2
|
+
import { TransactionModifyingSigner } from './transaction-modifying-signer.js';
|
|
3
|
+
import { TransactionPartialSigner } from './transaction-partial-signer.js';
|
|
4
|
+
import { TransactionSendingSigner } from './transaction-sending-signer.js';
|
|
5
5
|
/** Defines a signer capable of signing transactions. */
|
|
6
6
|
export type TransactionSigner<TAddress extends string = string> = TransactionPartialSigner<TAddress> | TransactionModifyingSigner<TAddress> | TransactionSendingSigner<TAddress>;
|
|
7
7
|
/** Checks whether the provided value implements the {@link TransactionSigner} interface. */
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"transaction-signer.d.ts","sourceRoot":"","sources":["../../src/transaction-signer.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAE5C,OAAO,EAAgC,0BAA0B,EAAE,MAAM,gCAAgC,CAAC;AAC1G,OAAO,EAA8B,wBAAwB,EAAE,MAAM,8BAA8B,CAAC;AACpG,OAAO,EAA8B,wBAAwB,EAAE,MAAM,8BAA8B,CAAC;AAEpG,wDAAwD;AACxD,MAAM,MAAM,iBAAiB,CAAC,QAAQ,SAAS,MAAM,GAAG,MAAM,IACxD,wBAAwB,CAAC,QAAQ,CAAC,GAClC,0BAA0B,CAAC,QAAQ,CAAC,GACpC,wBAAwB,CAAC,QAAQ,CAAC,CAAC;AAEzC,4FAA4F;AAC5F,wBAAgB,mBAAmB,CAAC,QAAQ,SAAS,MAAM,EAAE,KAAK,EAAE;IAChE,OAAO,EAAE,OAAO,CAAC,QAAQ,CAAC,CAAC;IAC3B,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC;CAC1B,GAAG,KAAK,IAAI,iBAAiB,CAAC,QAAQ,CAAC,CAIvC;AAED,0FAA0F;AAC1F,wBAAgB,yBAAyB,CAAC,QAAQ,SAAS,MAAM,EAAE,KAAK,EAAE;IACtE,OAAO,EAAE,OAAO,CAAC,QAAQ,CAAC,CAAC;IAC3B,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC;CAC1B,GAAG,OAAO,CAAC,KAAK,IAAI,iBAAiB,CAAC,QAAQ,CAAC,CAK/C"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { CompilableTransaction } from '@solana/transactions';
|
|
2
|
+
import { ITransactionWithSigners } from './account-signer-meta.js';
|
|
3
|
+
/** Defines a transaction with exactly one {@link TransactionSendingSigner}. */
|
|
4
|
+
export type ITransactionWithSingleSendingSigner = ITransactionWithSigners & {
|
|
5
|
+
readonly __transactionWithSingleSendingSigner: unique symbol;
|
|
6
|
+
};
|
|
7
|
+
/** Checks whether the provided transaction has exactly one {@link TransactionSendingSigner}. */
|
|
8
|
+
export declare function isTransactionWithSingleSendingSigner<TTransaction extends CompilableTransaction>(transaction: TTransaction): transaction is TTransaction & ITransactionWithSingleSendingSigner;
|
|
9
|
+
/** Asserts that the provided transaction has exactly one {@link TransactionSendingSigner}. */
|
|
10
|
+
export declare function assertIsTransactionWithSingleSendingSigner<TTransaction extends CompilableTransaction>(transaction: TTransaction): asserts transaction is TTransaction & ITransactionWithSingleSendingSigner;
|
|
11
|
+
//# sourceMappingURL=transaction-with-single-sending-signer.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"transaction-with-single-sending-signer.d.ts","sourceRoot":"","sources":["../../src/transaction-with-single-sending-signer.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,qBAAqB,EAAE,MAAM,sBAAsB,CAAC;AAE7D,OAAO,EAA6B,uBAAuB,EAAE,MAAM,uBAAuB,CAAC;AAK3F,+EAA+E;AAC/E,MAAM,MAAM,mCAAmC,GAAG,uBAAuB,GAAG;IACxE,QAAQ,CAAC,oCAAoC,EAAE,OAAO,MAAM,CAAC;CAChE,CAAC;AAEF,gGAAgG;AAChG,wBAAgB,oCAAoC,CAAC,YAAY,SAAS,qBAAqB,EAC3F,WAAW,EAAE,YAAY,GAC1B,WAAW,IAAI,YAAY,GAAG,mCAAmC,CAOnE;AAED,8FAA8F;AAC9F,wBAAgB,0CAA0C,CAAC,YAAY,SAAS,qBAAqB,EACjG,WAAW,EAAE,YAAY,GAC1B,OAAO,CAAC,WAAW,IAAI,YAAY,GAAG,mCAAmC,CAwB3E"}
|
package/dist/types/types.d.ts
CHANGED
|
@@ -1,4 +1,7 @@
|
|
|
1
1
|
import { Address } from '@solana/addresses';
|
|
2
2
|
import { SignatureBytes } from '@solana/keys';
|
|
3
3
|
export type SignatureDictionary = Readonly<Record<Address, SignatureBytes>>;
|
|
4
|
+
export type BaseSignerConfig = Readonly<{
|
|
5
|
+
abortSignal?: AbortSignal;
|
|
6
|
+
}>;
|
|
4
7
|
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAC5C,OAAO,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AAE9C,MAAM,MAAM,mBAAmB,GAAG,QAAQ,CAAC,MAAM,CAAC,OAAO,EAAE,cAAc,CAAC,CAAC,CAAC;AAE5E,MAAM,MAAM,gBAAgB,GAAG,QAAQ,CAAC;IAAE,WAAW,CAAC,EAAE,WAAW,CAAA;CAAE,CAAC,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@solana/signers",
|
|
3
|
-
"version": "2.0.0-experimental.
|
|
3
|
+
"version": "2.0.0-experimental.f5d64e6",
|
|
4
4
|
"description": "An abstraction layer over signing messages and transactions in Solana",
|
|
5
5
|
"exports": {
|
|
6
6
|
"browser": {
|
|
@@ -49,15 +49,16 @@
|
|
|
49
49
|
"node": ">=17.4"
|
|
50
50
|
},
|
|
51
51
|
"dependencies": {
|
|
52
|
-
"@solana/addresses": "2.0.0-experimental.
|
|
53
|
-
"@solana/
|
|
54
|
-
"@solana/keys": "2.0.0-experimental.
|
|
52
|
+
"@solana/addresses": "2.0.0-experimental.f5d64e6",
|
|
53
|
+
"@solana/instructions": "2.0.0-experimental.f5d64e6",
|
|
54
|
+
"@solana/keys": "2.0.0-experimental.f5d64e6",
|
|
55
|
+
"@solana/transactions": "2.0.0-experimental.f5d64e6"
|
|
55
56
|
},
|
|
56
57
|
"devDependencies": {
|
|
57
58
|
"@solana/eslint-config-solana": "^1.0.2",
|
|
58
59
|
"@swc/jest": "^0.2.29",
|
|
59
|
-
"@types/jest": "^29.5.
|
|
60
|
-
"@typescript-eslint/eslint-plugin": "^6.
|
|
60
|
+
"@types/jest": "^29.5.11",
|
|
61
|
+
"@typescript-eslint/eslint-plugin": "^6.13.2",
|
|
61
62
|
"@typescript-eslint/parser": "^6.3.0",
|
|
62
63
|
"agadoo": "^3.0.0",
|
|
63
64
|
"eslint": "^8.45.0",
|
|
@@ -67,8 +68,8 @@
|
|
|
67
68
|
"jest-environment-jsdom": "^29.7.0",
|
|
68
69
|
"jest-runner-eslint": "^2.1.2",
|
|
69
70
|
"jest-runner-prettier": "^1.0.0",
|
|
70
|
-
"prettier": "^
|
|
71
|
-
"tsup": "
|
|
71
|
+
"prettier": "^3.1",
|
|
72
|
+
"tsup": "^8.0.1",
|
|
72
73
|
"typescript": "^5.2.2",
|
|
73
74
|
"version-from-git": "^1.1.1",
|
|
74
75
|
"build-scripts": "0.0.0",
|
|
@@ -86,8 +87,8 @@
|
|
|
86
87
|
]
|
|
87
88
|
},
|
|
88
89
|
"scripts": {
|
|
89
|
-
"compile:js": "tsup --config build-scripts/tsup.config.
|
|
90
|
-
"compile:typedefs": "tsc -p ./tsconfig.declarations.json",
|
|
90
|
+
"compile:js": "tsup --config build-scripts/tsup.config.package.ts",
|
|
91
|
+
"compile:typedefs": "tsc -p ./tsconfig.declarations.json && node node_modules/build-scripts/add-js-extension-to-types.mjs",
|
|
91
92
|
"dev": "jest -c node_modules/test-config/jest-dev.config.ts --rootDir . --watch",
|
|
92
93
|
"publish-packages": "pnpm publish --tag experimental --access public --no-git-checks",
|
|
93
94
|
"style:fix": "pnpm eslint --fix src/* && pnpm prettier -w src/*",
|