@solana/transactions 2.0.0-experimental.c2d0ddc → 2.0.0-experimental.c5061ae
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/dist/index.browser.cjs +83 -62
- package/dist/index.browser.cjs.map +1 -1
- package/dist/index.browser.js +82 -61
- package/dist/index.browser.js.map +1 -1
- package/dist/index.development.js +85 -64
- package/dist/index.development.js.map +1 -1
- package/dist/index.native.js +84 -61
- package/dist/index.native.js.map +1 -1
- package/dist/index.node.cjs +83 -60
- package/dist/index.node.cjs.map +1 -1
- package/dist/index.node.js +82 -63
- package/dist/index.node.js.map +1 -1
- package/dist/index.production.min.js +10 -8
- package/dist/types/blockhash.d.ts +5 -0
- package/dist/types/durable-nonce.d.ts +11 -6
- package/dist/types/signatures.d.ts +1 -3
- package/dist/types/unsigned-transaction.d.ts +4 -0
- package/package.json +4 -4
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { IInstruction, IInstructionWithAccounts, IInstructionWithData } from '@solana/instructions';
|
|
2
2
|
import { ReadonlyAccount, ReadonlySignerAccount, WritableAccount } from '@solana/instructions/dist/types/accounts';
|
|
3
|
-
|
|
3
|
+
import { BaseTransaction } from './types';
|
|
4
|
+
type AdvanceNonceAccountInstruction<TNonceAccountAddress extends string = string, TNonceAuthorityAddress extends string = string> = IInstruction<'11111111111111111111111111111111'> & IInstructionWithAccounts<readonly [
|
|
4
5
|
WritableAccount<TNonceAccountAddress>,
|
|
5
6
|
ReadonlyAccount<'SysvarRecentB1ockHashes11111111111111111111'>,
|
|
6
7
|
ReadonlySignerAccount<TNonceAuthorityAddress>
|
|
@@ -8,15 +9,19 @@ type AdvanceNonceAccountInstruction<TNonceAccountAddress extends string = string
|
|
|
8
9
|
type AdvanceNonceAccountInstructionData = Uint8Array & {
|
|
9
10
|
readonly __advanceNonceAccountInstructionData: unique symbol;
|
|
10
11
|
};
|
|
11
|
-
type
|
|
12
|
-
|
|
12
|
+
export type Nonce<TNonceValue extends string = string> = TNonceValue & {
|
|
13
|
+
readonly __nonce: unique symbol;
|
|
14
|
+
};
|
|
15
|
+
type NonceLifetimeConstraint<TNonceValue extends string = string> = Readonly<{
|
|
16
|
+
nonce: Nonce<TNonceValue>;
|
|
13
17
|
}>;
|
|
14
|
-
export interface IDurableNonceTransaction<TNonceAccountAddress extends string = string, TNonceAuthorityAddress extends string = string> {
|
|
15
|
-
readonly instructions: [
|
|
18
|
+
export interface IDurableNonceTransaction<TNonceAccountAddress extends string = string, TNonceAuthorityAddress extends string = string, TNonceValue extends string = string> {
|
|
19
|
+
readonly instructions: readonly [
|
|
16
20
|
AdvanceNonceAccountInstruction<TNonceAccountAddress, TNonceAuthorityAddress>,
|
|
17
21
|
...IInstruction[]
|
|
18
22
|
];
|
|
19
|
-
readonly lifetimeConstraint: NonceLifetimeConstraint
|
|
23
|
+
readonly lifetimeConstraint: NonceLifetimeConstraint<TNonceValue>;
|
|
20
24
|
}
|
|
25
|
+
export declare function assertIsDurableNonceTransaction(transaction: BaseTransaction | (BaseTransaction & IDurableNonceTransaction)): asserts transaction is BaseTransaction & IDurableNonceTransaction;
|
|
21
26
|
export {};
|
|
22
27
|
//# sourceMappingURL=durable-nonce.d.ts.map
|
|
@@ -4,9 +4,7 @@ export interface IFullySignedTransaction extends ITransactionWithSignatures {
|
|
|
4
4
|
readonly __fullySignedTransaction: unique symbol;
|
|
5
5
|
}
|
|
6
6
|
export interface ITransactionWithSignatures {
|
|
7
|
-
readonly signatures:
|
|
8
|
-
readonly [publicKey: Base58EncodedAddress]: Ed25519Signature;
|
|
9
|
-
};
|
|
7
|
+
readonly signatures: Readonly<Record<Base58EncodedAddress, Ed25519Signature>>;
|
|
10
8
|
}
|
|
11
9
|
export declare function signTransaction<TTransaction extends Parameters<typeof compileMessage>[0]>(keyPair: CryptoKeyPair, transaction: TTransaction | (TTransaction & ITransactionWithSignatures)): Promise<TTransaction & ITransactionWithSignatures>;
|
|
12
10
|
//# sourceMappingURL=signatures.d.ts.map
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { ITransactionWithSignatures } from '.';
|
|
2
|
+
import { BaseTransaction } from './types';
|
|
3
|
+
export declare function getUnsignedTransaction<TTransaction extends BaseTransaction>(transaction: TTransaction | (TTransaction & ITransactionWithSignatures)): TTransaction | Omit<TTransaction & ITransactionWithSignatures, keyof ITransactionWithSignatures>;
|
|
4
|
+
//# sourceMappingURL=unsigned-transaction.d.ts.map
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@solana/transactions",
|
|
3
|
-
"version": "2.0.0-experimental.
|
|
3
|
+
"version": "2.0.0-experimental.c5061ae",
|
|
4
4
|
"description": "Helpers for creating and serializing transactions",
|
|
5
5
|
"exports": {
|
|
6
6
|
"browser": {
|
|
@@ -47,13 +47,13 @@
|
|
|
47
47
|
],
|
|
48
48
|
"dependencies": {
|
|
49
49
|
"@metaplex-foundation/umi-serializers": "^0.8.5",
|
|
50
|
-
"@solana/keys": "2.0.0-experimental.
|
|
50
|
+
"@solana/keys": "2.0.0-experimental.c5061ae"
|
|
51
51
|
},
|
|
52
52
|
"devDependencies": {
|
|
53
53
|
"@solana/eslint-config-solana": "^1.0.2",
|
|
54
54
|
"@swc/core": "^1.3.18",
|
|
55
55
|
"@swc/jest": "^0.2.23",
|
|
56
|
-
"@types/jest": "^29.5.
|
|
56
|
+
"@types/jest": "^29.5.3",
|
|
57
57
|
"@typescript-eslint/eslint-plugin": "^6.0.0",
|
|
58
58
|
"@typescript-eslint/parser": "^6.0.0",
|
|
59
59
|
"agadoo": "^3.0.0",
|
|
@@ -68,7 +68,7 @@
|
|
|
68
68
|
"tsup": "6.7.0",
|
|
69
69
|
"typescript": "^5.1.6",
|
|
70
70
|
"version-from-git": "^1.1.1",
|
|
71
|
-
"@solana/instructions": "2.0.0-experimental.
|
|
71
|
+
"@solana/instructions": "2.0.0-experimental.c5061ae",
|
|
72
72
|
"build-scripts": "0.0.0",
|
|
73
73
|
"test-config": "0.0.0",
|
|
74
74
|
"test-matchers": "0.0.0",
|