@solana/transaction-messages 3.0.0-canary-20250722221247 → 3.0.0-canary-20250724091815
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 +8 -30
- package/dist/index.browser.cjs.map +1 -1
- package/dist/index.browser.mjs +9 -29
- package/dist/index.browser.mjs.map +1 -1
- package/dist/index.native.mjs +9 -29
- package/dist/index.native.mjs.map +1 -1
- package/dist/index.node.cjs +8 -30
- package/dist/index.node.cjs.map +1 -1
- package/dist/index.node.mjs +9 -29
- package/dist/index.node.mjs.map +1 -1
- package/dist/types/codecs/address-table-lookup.d.ts.map +1 -1
- package/dist/types/compile/address-table-lookups.d.ts +0 -4
- package/dist/types/compile/address-table-lookups.d.ts.map +1 -1
- package/dist/types/decompile-message.d.ts.map +1 -1
- package/dist/types/index.d.ts +0 -2
- package/dist/types/index.d.ts.map +1 -1
- package/package.json +10 -10
- package/dist/types/compilable-transaction-message.d.ts +0 -19
- package/dist/types/compilable-transaction-message.d.ts.map +0 -1
- package/dist/types/deprecated.d.ts +0 -65
- package/dist/types/deprecated.d.ts.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"address-table-lookup.d.ts","sourceRoot":"","sources":["../../../src/codecs/address-table-lookup.ts"],"names":[],"mappings":"AACA,OAAO,
|
|
1
|
+
{"version":3,"file":"address-table-lookup.d.ts","sourceRoot":"","sources":["../../../src/codecs/address-table-lookup.ts"],"names":[],"mappings":"AACA,OAAO,EAGH,KAAK,iBAAiB,EACtB,KAAK,mBAAmB,EACxB,KAAK,mBAAmB,EAC3B,MAAM,qBAAqB,CAAC;AAI7B,OAAO,KAAK,EAAE,8BAA8B,EAAE,MAAM,kCAAkC,CAAC;AAEvF,KAAK,kBAAkB,GAAG,UAAU,CAAC,OAAO,8BAA8B,CAAC,CAAC,MAAM,CAAC,CAAC;AAGpF,wBAAgB,4BAA4B,IAAI,mBAAmB,CAAC,kBAAkB,CAAC,CAatF;AAGD,wBAAgB,4BAA4B,IAAI,mBAAmB,CAAC,kBAAkB,CAAC,CAWtF;AAED,wBAAgB,0BAA0B,IAAI,iBAAiB,CAAC,kBAAkB,CAAC,CAElF"}
|
|
@@ -3,14 +3,10 @@ import { OrderedAccounts } from '../compile/accounts';
|
|
|
3
3
|
type AddressTableLookup = Readonly<{
|
|
4
4
|
/** The address of the address lookup table account. */
|
|
5
5
|
lookupTableAddress: Address;
|
|
6
|
-
/** @deprecated Use `readonlyIndexes` */
|
|
7
|
-
readableIndices: readonly number[];
|
|
8
6
|
/** Indexes of accounts in a lookup table to load as read-only. */
|
|
9
7
|
readonlyIndexes: readonly number[];
|
|
10
8
|
/** Indexes of accounts in a lookup table to load as writable. */
|
|
11
9
|
writableIndexes: readonly number[];
|
|
12
|
-
/** @deprecated Use `writableIndexes` */
|
|
13
|
-
writableIndices: readonly number[];
|
|
14
10
|
}>;
|
|
15
11
|
export declare function getCompiledAddressTableLookups(orderedAccounts: OrderedAccounts): AddressTableLookup[];
|
|
16
12
|
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"address-table-lookups.d.ts","sourceRoot":"","sources":["../../../src/compile/address-table-lookups.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAwB,MAAM,mBAAmB,CAAC;AAGlE,OAAO,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAEtD,KAAK,kBAAkB,GAAG,QAAQ,CAAC;IAC/B,uDAAuD;IACvD,kBAAkB,EAAE,OAAO,CAAC;IAC5B,
|
|
1
|
+
{"version":3,"file":"address-table-lookups.d.ts","sourceRoot":"","sources":["../../../src/compile/address-table-lookups.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAwB,MAAM,mBAAmB,CAAC;AAGlE,OAAO,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAEtD,KAAK,kBAAkB,GAAG,QAAQ,CAAC;IAC/B,uDAAuD;IACvD,kBAAkB,EAAE,OAAO,CAAC;IAC5B,kEAAkE;IAClE,eAAe,EAAE,SAAS,MAAM,EAAE,CAAC;IACnC,iEAAiE;IACjE,eAAe,EAAE,SAAS,MAAM,EAAE,CAAC;CACtC,CAAC,CAAC;AAEH,wBAAgB,8BAA8B,CAAC,eAAe,EAAE,eAAe,GAAG,kBAAkB,EAAE,CA2BrG"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"decompile-message.d.ts","sourceRoot":"","sources":["../../src/decompile-message.ts"],"names":[],"mappings":"AAYA,OAAO,EAAE,6BAA6B,EAAE,MAAM,qCAAqC,CAAC;AAEpF,OAAO,EAAE,0BAA0B,EAAE,sCAAsC,EAAE,MAAM,WAAW,CAAC;AAK/F,OAAO,EAAiC,8BAA8B,EAAE,MAAM,aAAa,CAAC;AAE5F,OAAO,EAAE,8BAA8B,EAAE,MAAM,YAAY,CAAC;AAC5D,OAAO,EAAE,sBAAsB,EAAsB,MAAM,uBAAuB,CAAC;
|
|
1
|
+
{"version":3,"file":"decompile-message.d.ts","sourceRoot":"","sources":["../../src/decompile-message.ts"],"names":[],"mappings":"AAYA,OAAO,EAAE,6BAA6B,EAAE,MAAM,qCAAqC,CAAC;AAEpF,OAAO,EAAE,0BAA0B,EAAE,sCAAsC,EAAE,MAAM,WAAW,CAAC;AAK/F,OAAO,EAAiC,8BAA8B,EAAE,MAAM,aAAa,CAAC;AAE5F,OAAO,EAAE,8BAA8B,EAAE,MAAM,YAAY,CAAC;AAC5D,OAAO,EAAE,sBAAsB,EAAsB,MAAM,uBAAuB,CAAC;AA+JnF,MAAM,MAAM,iCAAiC,GAAG;IAC5C;;;;;;OAMG;IACH,6BAA6B,CAAC,EAAE,6BAA6B,CAAC;IAC9D;;;;OAIG;IACH,oBAAoB,CAAC,EAAE,MAAM,CAAC;CACjC,CAAC;AAEF;;;;;;;;;;GAUG;AACH,wBAAgB,2BAA2B,CACvC,0BAA0B,EAAE,0BAA0B,GAAG,sCAAsC,EAC/F,MAAM,CAAC,EAAE,iCAAiC,GAC3C,sBAAsB,GAAG,8BAA8B,GAAG,8BAA8B,CA0C1F"}
|
package/dist/types/index.d.ts
CHANGED
|
@@ -30,7 +30,6 @@
|
|
|
30
30
|
export * from './addresses-by-lookup-table-address';
|
|
31
31
|
export * from './blockhash';
|
|
32
32
|
export * from './codecs';
|
|
33
|
-
export * from './compilable-transaction-message';
|
|
34
33
|
export * from './compile';
|
|
35
34
|
export * from './compress-transaction-message';
|
|
36
35
|
export * from './create-transaction-message';
|
|
@@ -42,5 +41,4 @@ export * from './instructions';
|
|
|
42
41
|
export * from './lifetime';
|
|
43
42
|
export * from './transaction-message-size';
|
|
44
43
|
export * from './transaction-message';
|
|
45
|
-
export * from './deprecated';
|
|
46
44
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AACH,cAAc,qCAAqC,CAAC;AACpD,cAAc,aAAa,CAAC;AAC5B,cAAc,UAAU,CAAC;AACzB,cAAc,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AACH,cAAc,qCAAqC,CAAC;AACpD,cAAc,aAAa,CAAC;AAC5B,cAAc,UAAU,CAAC;AACzB,cAAc,WAAW,CAAC;AAC1B,cAAc,gCAAgC,CAAC;AAC/C,cAAc,8BAA8B,CAAC;AAC7C,cAAc,qBAAqB,CAAC;AACpC,cAAc,iBAAiB,CAAC;AAChC,OAAO,EAAE,gCAAgC,EAAE,MAAM,6BAA6B,CAAC;AAC/E,cAAc,aAAa,CAAC;AAC5B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,YAAY,CAAC;AAC3B,cAAc,4BAA4B,CAAC;AAC3C,cAAc,uBAAuB,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@solana/transaction-messages",
|
|
3
|
-
"version": "3.0.0-canary-
|
|
3
|
+
"version": "3.0.0-canary-20250724091815",
|
|
4
4
|
"description": "Helpers for creating transaction messages",
|
|
5
5
|
"exports": {
|
|
6
6
|
"edge-light": {
|
|
@@ -54,15 +54,15 @@
|
|
|
54
54
|
"maintained node versions"
|
|
55
55
|
],
|
|
56
56
|
"dependencies": {
|
|
57
|
-
"@solana/
|
|
58
|
-
"@solana/
|
|
59
|
-
"@solana/codecs-
|
|
60
|
-
"@solana/codecs-
|
|
61
|
-
"@solana/errors": "3.0.0-canary-
|
|
62
|
-
"@solana/functional": "3.0.0-canary-
|
|
63
|
-
"@solana/instructions": "3.0.0-canary-
|
|
64
|
-
"@solana/nominal-types": "3.0.0-canary-
|
|
65
|
-
"@solana/rpc-types": "3.0.0-canary-
|
|
57
|
+
"@solana/addresses": "3.0.0-canary-20250724091815",
|
|
58
|
+
"@solana/codecs-core": "3.0.0-canary-20250724091815",
|
|
59
|
+
"@solana/codecs-data-structures": "3.0.0-canary-20250724091815",
|
|
60
|
+
"@solana/codecs-numbers": "3.0.0-canary-20250724091815",
|
|
61
|
+
"@solana/errors": "3.0.0-canary-20250724091815",
|
|
62
|
+
"@solana/functional": "3.0.0-canary-20250724091815",
|
|
63
|
+
"@solana/instructions": "3.0.0-canary-20250724091815",
|
|
64
|
+
"@solana/nominal-types": "3.0.0-canary-20250724091815",
|
|
65
|
+
"@solana/rpc-types": "3.0.0-canary-20250724091815"
|
|
66
66
|
},
|
|
67
67
|
"peerDependencies": {
|
|
68
68
|
"typescript": ">=5.3.3"
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import { Instruction } from '@solana/instructions';
|
|
2
|
-
import { TransactionMessageWithFeePayer } from './fee-payer';
|
|
3
|
-
import { TransactionMessageWithLifetime } from './lifetime';
|
|
4
|
-
import { BaseTransactionMessage, TransactionVersion } from './transaction-message';
|
|
5
|
-
/**
|
|
6
|
-
* A transaction message having sufficient detail to be compiled for execution on the network.
|
|
7
|
-
*
|
|
8
|
-
* In essence, this means that it has at minimum a version, a fee payer, and a lifetime constraint.
|
|
9
|
-
*
|
|
10
|
-
* @deprecated Use `BaseTransactionMessage & TransactionMessageWithFeePayer` instead. Alternatively,
|
|
11
|
-
* use `BaseTransactionMessage & TransactionMessageWithFeePayer & TransactionMessageWithLifetime`
|
|
12
|
-
* if you need a lifetime constraint.
|
|
13
|
-
*
|
|
14
|
-
* @see {@link BaseTransactionMessage}
|
|
15
|
-
* @see {@link TransactionMessageWithFeePayer}
|
|
16
|
-
* @see {@link TransactionMessageWithLifetime}
|
|
17
|
-
*/
|
|
18
|
-
export type CompilableTransactionMessage<TVersion extends TransactionVersion = TransactionVersion, TInstruction extends Instruction = Instruction> = BaseTransactionMessage<TVersion, TInstruction> & TransactionMessageWithFeePayer & TransactionMessageWithLifetime;
|
|
19
|
-
//# sourceMappingURL=compilable-transaction-message.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"compilable-transaction-message.d.ts","sourceRoot":"","sources":["../../src/compilable-transaction-message.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AAEnD,OAAO,EAAE,8BAA8B,EAAE,MAAM,aAAa,CAAC;AAC7D,OAAO,EAAE,8BAA8B,EAAE,MAAM,YAAY,CAAC;AAC5D,OAAO,EAAE,sBAAsB,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAC;AAEnF;;;;;;;;;;;;GAYG;AACH,MAAM,MAAM,4BAA4B,CACpC,QAAQ,SAAS,kBAAkB,GAAG,kBAAkB,EACxD,YAAY,SAAS,WAAW,GAAG,WAAW,IAC9C,sBAAsB,CAAC,QAAQ,EAAE,YAAY,CAAC,GAAG,8BAA8B,GAAG,8BAA8B,CAAC"}
|
|
@@ -1,65 +0,0 @@
|
|
|
1
|
-
import type { Address } from '@solana/addresses';
|
|
2
|
-
import { assertIsTransactionMessageWithDurableNonceLifetime, isTransactionMessageWithDurableNonceLifetime } from './durable-nonce';
|
|
3
|
-
/**
|
|
4
|
-
* Represents a transaction message for which a fee payer has been declared. A transaction must
|
|
5
|
-
* conform to this type to be compiled and landed on the network.
|
|
6
|
-
*
|
|
7
|
-
* @deprecated Use {@link TransactionMessageWithFeePayer} instead. It was only renamed.
|
|
8
|
-
*/
|
|
9
|
-
export interface ITransactionMessageWithFeePayer<TAddress extends string = string> {
|
|
10
|
-
readonly feePayer: Readonly<{
|
|
11
|
-
address: Address<TAddress>;
|
|
12
|
-
}>;
|
|
13
|
-
}
|
|
14
|
-
/**
|
|
15
|
-
* From time to time you might acquire a transaction message, that you expect to have a
|
|
16
|
-
* nonce-based lifetime, from an untrusted network API or user input. Use this function to assert
|
|
17
|
-
* that such a transaction message actually has a nonce-based lifetime.
|
|
18
|
-
*
|
|
19
|
-
* @deprecated Use {@link assertIsTransactionMessageWithDurableNonceLifetime} instead. It was only renamed.
|
|
20
|
-
*
|
|
21
|
-
* @example
|
|
22
|
-
* ```ts
|
|
23
|
-
* import { assertIsDurableNonceTransactionMessage } from '@solana/transaction-messages';
|
|
24
|
-
*
|
|
25
|
-
* try {
|
|
26
|
-
* // If this type assertion function doesn't throw, then
|
|
27
|
-
* // Typescript will upcast `message` to `TransactionMessageWithDurableNonceLifetime`.
|
|
28
|
-
* assertIsDurableNonceTransactionMessage(message);
|
|
29
|
-
* // At this point, `message` is a `TransactionMessageWithDurableNonceLifetime` that can be used
|
|
30
|
-
* // with the RPC.
|
|
31
|
-
* const { nonce, nonceAccountAddress } = message.lifetimeConstraint;
|
|
32
|
-
* const { data: { blockhash: actualNonce } } = await fetchNonce(nonceAccountAddress);
|
|
33
|
-
* } catch (e) {
|
|
34
|
-
* // `message` turned out not to have a nonce-based lifetime
|
|
35
|
-
* }
|
|
36
|
-
* ```
|
|
37
|
-
*/
|
|
38
|
-
export declare const assertIsDurableNonceTransactionMessage: typeof assertIsTransactionMessageWithDurableNonceLifetime;
|
|
39
|
-
/**
|
|
40
|
-
* A type guard that returns `true` if the transaction message conforms to the
|
|
41
|
-
* {@link TransactionMessageWithDurableNonceLifetime} type, and refines its type for use in your
|
|
42
|
-
* program.
|
|
43
|
-
*
|
|
44
|
-
* @deprecated Use {@link isTransactionMessageWithDurableNonceLifetime} instead. It was only renamed.
|
|
45
|
-
*
|
|
46
|
-
* @example
|
|
47
|
-
* ```ts
|
|
48
|
-
* import { isDurableNonceTransaction } from '@solana/transaction-messages';
|
|
49
|
-
* import { fetchNonce } from "@solana-program/system";
|
|
50
|
-
*
|
|
51
|
-
* if (isDurableNonceTransaction(message)) {
|
|
52
|
-
* // At this point, `message` has been refined to a
|
|
53
|
-
* // `TransactionMessageWithDurableNonceLifetime`.
|
|
54
|
-
* const { nonce, nonceAccountAddress } = message.lifetimeConstraint;
|
|
55
|
-
* const { data: { blockhash: actualNonce } } = await fetchNonce(nonceAccountAddress);
|
|
56
|
-
* setNonceIsValid(nonce === actualNonce);
|
|
57
|
-
* } else {
|
|
58
|
-
* setError(
|
|
59
|
-
* `${getSignatureFromTransaction(transaction)} does not have a nonce-based lifetime`,
|
|
60
|
-
* );
|
|
61
|
-
* }
|
|
62
|
-
* ```
|
|
63
|
-
*/
|
|
64
|
-
export declare const isDurableNonceTransaction: typeof isTransactionMessageWithDurableNonceLifetime;
|
|
65
|
-
//# sourceMappingURL=deprecated.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"deprecated.d.ts","sourceRoot":"","sources":["../../src/deprecated.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAEjD,OAAO,EACH,kDAAkD,EAClD,4CAA4C,EAC/C,MAAM,iBAAiB,CAAC;AAEzB;;;;;GAKG;AACH,MAAM,WAAW,+BAA+B,CAAC,QAAQ,SAAS,MAAM,GAAG,MAAM;IAC7E,QAAQ,CAAC,QAAQ,EAAE,QAAQ,CAAC;QAAE,OAAO,EAAE,OAAO,CAAC,QAAQ,CAAC,CAAA;KAAE,CAAC,CAAC;CAC/D;AAED;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,eAAO,MAAM,sCAAsC,2DAAqD,CAAC;AAEzG;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,eAAO,MAAM,yBAAyB,qDAA+C,CAAC"}
|