@solana/transactions 2.0.0-experimental.2a425db → 2.0.0-experimental.2a70690
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 +13 -12
- package/dist/index.browser.cjs.map +1 -1
- package/dist/index.browser.js +9 -8
- package/dist/index.browser.js.map +1 -1
- package/dist/index.development.js +51 -47
- package/dist/index.development.js.map +1 -1
- package/dist/index.native.js +9 -10
- package/dist/index.native.js.map +1 -1
- package/dist/index.node.cjs +15 -12
- package/dist/index.node.cjs.map +1 -1
- package/dist/index.node.js +9 -8
- package/dist/index.node.js.map +1 -1
- package/dist/index.production.min.js +3 -3
- package/dist/types/accounts.d.ts +2 -2
- package/dist/types/accounts.d.ts.map +1 -1
- package/dist/types/blockhash.d.ts +1 -1
- package/dist/types/blockhash.d.ts.map +1 -1
- package/dist/types/compile-address-table-lookups.d.ts +1 -1
- package/dist/types/compile-address-table-lookups.d.ts.map +1 -1
- package/dist/types/compile-instructions.d.ts +1 -1
- package/dist/types/compile-instructions.d.ts.map +1 -1
- package/dist/types/compile-static-accounts.d.ts +1 -1
- package/dist/types/compile-static-accounts.d.ts.map +1 -1
- package/dist/types/durable-nonce.d.ts +3 -3
- package/dist/types/durable-nonce.d.ts.map +1 -1
- package/dist/types/fee-payer.d.ts +3 -2
- package/dist/types/fee-payer.d.ts.map +1 -1
- package/dist/types/serializers/message.d.ts.map +1 -1
- package/dist/types/signatures.d.ts +3 -2
- package/dist/types/signatures.d.ts.map +1 -1
- package/dist/types/types.d.ts +7 -0
- package/dist/types/types.d.ts.map +1 -1
- package/dist/types/wire-transaction.d.ts +1 -1
- package/dist/types/wire-transaction.d.ts.map +1 -1
- package/package.json +12 -13
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
import { Base58EncodedAddress } from '@solana/
|
|
1
|
+
import { Base58EncodedAddress } from '@solana/addresses';
|
|
2
2
|
import { ITransactionWithSignatures } from './signatures';
|
|
3
3
|
import { BaseTransaction } from './types';
|
|
4
4
|
export interface ITransactionWithFeePayer<TAddress extends string = string> {
|
|
5
5
|
readonly feePayer: Base58EncodedAddress<TAddress>;
|
|
6
6
|
}
|
|
7
|
-
export declare function setTransactionFeePayer<TFeePayerAddress extends string, TTransaction extends BaseTransaction>(feePayer: Base58EncodedAddress<TFeePayerAddress>, transaction:
|
|
7
|
+
export declare function setTransactionFeePayer<TFeePayerAddress extends string, TTransaction extends BaseTransaction>(feePayer: Base58EncodedAddress<TFeePayerAddress>, transaction: (TTransaction & ITransactionWithSignatures) | (TTransaction & ITransactionWithFeePayer<TFeePayerAddress> & ITransactionWithSignatures)): Omit<TTransaction, keyof ITransactionWithSignatures> & ITransactionWithFeePayer<TFeePayerAddress>;
|
|
8
|
+
export declare function setTransactionFeePayer<TFeePayerAddress extends string, TTransaction extends BaseTransaction>(feePayer: Base58EncodedAddress<TFeePayerAddress>, transaction: TTransaction | (TTransaction & ITransactionWithFeePayer<TFeePayerAddress>)): TTransaction & ITransactionWithFeePayer<TFeePayerAddress>;
|
|
8
9
|
//# sourceMappingURL=fee-payer.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fee-payer.d.ts","sourceRoot":"","sources":["../../src/fee-payer.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"fee-payer.d.ts","sourceRoot":"","sources":["../../src/fee-payer.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,MAAM,mBAAmB,CAAC;AAEzD,OAAO,EAAE,0BAA0B,EAAE,MAAM,cAAc,CAAC;AAC1D,OAAO,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;AAG1C,MAAM,WAAW,wBAAwB,CAAC,QAAQ,SAAS,MAAM,GAAG,MAAM;IACtE,QAAQ,CAAC,QAAQ,EAAE,oBAAoB,CAAC,QAAQ,CAAC,CAAC;CACrD;AAED,wBAAgB,sBAAsB,CAAC,gBAAgB,SAAS,MAAM,EAAE,YAAY,SAAS,eAAe,EACxG,QAAQ,EAAE,oBAAoB,CAAC,gBAAgB,CAAC,EAChD,WAAW,EACL,CAAC,YAAY,GAAG,0BAA0B,CAAC,GAC3C,CAAC,YAAY,GAAG,wBAAwB,CAAC,gBAAgB,CAAC,GAAG,0BAA0B,CAAC,GAC/F,IAAI,CAAC,YAAY,EAAE,MAAM,0BAA0B,CAAC,GAAG,wBAAwB,CAAC,gBAAgB,CAAC,CAAC;AAErG,wBAAgB,sBAAsB,CAAC,gBAAgB,SAAS,MAAM,EAAE,YAAY,SAAS,eAAe,EACxG,QAAQ,EAAE,oBAAoB,CAAC,gBAAgB,CAAC,EAChD,WAAW,EAAE,YAAY,GAAG,CAAC,YAAY,GAAG,wBAAwB,CAAC,gBAAgB,CAAC,CAAC,GACxF,YAAY,GAAG,wBAAwB,CAAC,gBAAgB,CAAC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"message.d.ts","sourceRoot":"","sources":["../../../src/serializers/message.ts"],"names":[],"mappings":"AAAA,OAAO,EAIH,UAAU,EAKb,MAAM,sCAAsC,CAAC;AAG9C,OAAO,EAAE,eAAe,EAAE,MAAM,YAAY,CAAC;
|
|
1
|
+
{"version":3,"file":"message.d.ts","sourceRoot":"","sources":["../../../src/serializers/message.ts"],"names":[],"mappings":"AAAA,OAAO,EAIH,UAAU,EAKb,MAAM,sCAAsC,CAAC;AAG9C,OAAO,EAAE,eAAe,EAAE,MAAM,YAAY,CAAC;AA8F7C,wBAAgB,yBAAyB,IAAI,UAAU,CAAC,eAAe,CAAC,CAMvE;AAED,wBAAgB,yBAAyB,IAAI,UAAU,CAAC,eAAe,CAAC,CAMvE;AAED,wBAAgB,uBAAuB,IAAI,UAAU,CAAC,eAAe,CAAC,CAMrE"}
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import { Base58EncodedAddress
|
|
1
|
+
import { Base58EncodedAddress } from '@solana/addresses';
|
|
2
|
+
import { Ed25519Signature } from '@solana/keys';
|
|
2
3
|
import { compileMessage } from './message';
|
|
3
4
|
export interface IFullySignedTransaction extends ITransactionWithSignatures {
|
|
4
|
-
readonly
|
|
5
|
+
readonly __brand: unique symbol;
|
|
5
6
|
}
|
|
6
7
|
export interface ITransactionWithSignatures {
|
|
7
8
|
readonly signatures: Readonly<Record<Base58EncodedAddress, Ed25519Signature>>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"signatures.d.ts","sourceRoot":"","sources":["../../src/signatures.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,gBAAgB,
|
|
1
|
+
{"version":3,"file":"signatures.d.ts","sourceRoot":"","sources":["../../src/signatures.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAA2B,MAAM,mBAAmB,CAAC;AAClF,OAAO,EAAE,gBAAgB,EAAa,MAAM,cAAc,CAAC;AAE3D,OAAO,EAAmB,cAAc,EAAE,MAAM,WAAW,CAAC;AAG5D,MAAM,WAAW,uBAAwB,SAAQ,0BAA0B;IACvE,QAAQ,CAAC,OAAO,EAAE,OAAO,MAAM,CAAC;CACnC;AACD,MAAM,WAAW,0BAA0B;IACvC,QAAQ,CAAC,UAAU,EAAE,QAAQ,CAAC,MAAM,CAAC,oBAAoB,EAAE,gBAAgB,CAAC,CAAC,CAAC;CACjF;AAQD,wBAAsB,eAAe,CAAC,YAAY,SAAS,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC,CAAC,CAAC,EAC3F,OAAO,EAAE,aAAa,EACtB,WAAW,EAAE,YAAY,GAAG,CAAC,YAAY,GAAG,0BAA0B,CAAC,GACxE,OAAO,CAAC,YAAY,GAAG,0BAA0B,CAAC,CAgBpD"}
|
package/dist/types/types.d.ts
CHANGED
|
@@ -1,4 +1,11 @@
|
|
|
1
1
|
import { IAccountMeta, IInstruction } from '@solana/instructions';
|
|
2
|
+
/** A string of bytes that are definitely a serialized message */
|
|
3
|
+
export type SerializedMessageBytes = Uint8Array & {
|
|
4
|
+
readonly __serializedMessageBytes: unique symbol;
|
|
5
|
+
};
|
|
6
|
+
export type SerializedMessageBytesBase64 = string & {
|
|
7
|
+
readonly __serializedMessageBytesBase64: unique symbol;
|
|
8
|
+
};
|
|
2
9
|
export type BaseTransaction = Readonly<{
|
|
3
10
|
instructions: readonly IInstruction[];
|
|
4
11
|
version: TransactionVersion;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AAElE,MAAM,MAAM,eAAe,GAAG,QAAQ,CAAC;IACnC,YAAY,EAAE,SAAS,YAAY,EAAE,CAAC;IACtC,OAAO,EAAE,kBAAkB,CAAC;CAC/B,CAAC,CAAC;AAEH,KAAK,iBAAiB,GAAG,eAAe,GACpC,QAAQ,CAAC;IACL,YAAY,EAAE,SAAS,CAAC,IAAI,CAAC,YAAY,EAAE,UAAU,CAAC,GAClD,QAAQ,CAAC;QAAE,QAAQ,CAAC,QAAQ,CAAC,EAAE,SAAS,YAAY,EAAE,CAAA;KAAE,CAAC,CAAC,EAAE,CAAC;IACjE,OAAO,EAAE,QAAQ,CAAC;CACrB,CAAC,CAAC;AAEP,KAAK,aAAa,GAAG,eAAe,GAChC,QAAQ,CAAC;IACL,YAAY,EAAE,SAAS,YAAY,EAAE,CAAC;IACtC,OAAO,EAAE,CAAC,CAAC;CACd,CAAC,CAAC;AAEP,MAAM,MAAM,WAAW,GAAG,iBAAiB,GAAG,aAAa,CAAC;AAC5D,MAAM,MAAM,kBAAkB,GAAG,QAAQ,GAAG,CAAC,CAAC"}
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AAElE,iEAAiE;AACjE,MAAM,MAAM,sBAAsB,GAAG,UAAU,GAAG;IAAE,QAAQ,CAAC,wBAAwB,EAAE,OAAO,MAAM,CAAA;CAAE,CAAC;AACvG,MAAM,MAAM,4BAA4B,GAAG,MAAM,GAAG;IAAE,QAAQ,CAAC,8BAA8B,EAAE,OAAO,MAAM,CAAA;CAAE,CAAC;AAE/G,MAAM,MAAM,eAAe,GAAG,QAAQ,CAAC;IACnC,YAAY,EAAE,SAAS,YAAY,EAAE,CAAC;IACtC,OAAO,EAAE,kBAAkB,CAAC;CAC/B,CAAC,CAAC;AAEH,KAAK,iBAAiB,GAAG,eAAe,GACpC,QAAQ,CAAC;IACL,YAAY,EAAE,SAAS,CAAC,IAAI,CAAC,YAAY,EAAE,UAAU,CAAC,GAClD,QAAQ,CAAC;QAAE,QAAQ,CAAC,QAAQ,CAAC,EAAE,SAAS,YAAY,EAAE,CAAA;KAAE,CAAC,CAAC,EAAE,CAAC;IACjE,OAAO,EAAE,QAAQ,CAAC;CACrB,CAAC,CAAC;AAEP,KAAK,aAAa,GAAG,eAAe,GAChC,QAAQ,CAAC;IACL,YAAY,EAAE,SAAS,YAAY,EAAE,CAAC;IACtC,OAAO,EAAE,CAAC,CAAC;CACd,CAAC,CAAC;AAEP,MAAM,MAAM,WAAW,GAAG,iBAAiB,GAAG,aAAa,CAAC;AAC5D,MAAM,MAAM,kBAAkB,GAAG,QAAQ,GAAG,CAAC,CAAC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { getTransactionEncoder } from './serializers/transaction';
|
|
2
2
|
export type Base64EncodedWireTransaction = string & {
|
|
3
|
-
readonly
|
|
3
|
+
readonly __brand: unique symbol;
|
|
4
4
|
};
|
|
5
5
|
export declare function getBase64EncodedWireTransaction(transaction: Parameters<ReturnType<typeof getTransactionEncoder>['serialize']>[0]): Base64EncodedWireTransaction;
|
|
6
6
|
//# sourceMappingURL=wire-transaction.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"wire-transaction.d.ts","sourceRoot":"","sources":["../../src/wire-transaction.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,qBAAqB,EAAE,MAAM,2BAA2B,CAAC;AAElE,MAAM,MAAM,4BAA4B,GAAG,MAAM,GAAG;IAChD,QAAQ,CAAC,
|
|
1
|
+
{"version":3,"file":"wire-transaction.d.ts","sourceRoot":"","sources":["../../src/wire-transaction.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,qBAAqB,EAAE,MAAM,2BAA2B,CAAC;AAElE,MAAM,MAAM,4BAA4B,GAAG,MAAM,GAAG;IAChD,QAAQ,CAAC,OAAO,EAAE,OAAO,MAAM,CAAC;CACnC,CAAC;AAEF,wBAAgB,+BAA+B,CAC3C,WAAW,EAAE,UAAU,CAAC,UAAU,CAAC,OAAO,qBAAqB,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,CAAC,GAClF,4BAA4B,CAO9B"}
|
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.2a70690",
|
|
4
4
|
"description": "Helpers for creating and serializing transactions",
|
|
5
5
|
"exports": {
|
|
6
6
|
"browser": {
|
|
@@ -46,29 +46,27 @@
|
|
|
46
46
|
"maintained node versions"
|
|
47
47
|
],
|
|
48
48
|
"dependencies": {
|
|
49
|
-
"@metaplex-foundation/umi-serializers": "^0.8.
|
|
50
|
-
"@solana/
|
|
49
|
+
"@metaplex-foundation/umi-serializers": "^0.8.9",
|
|
50
|
+
"@solana/addresses": "2.0.0-experimental.2a70690",
|
|
51
|
+
"@solana/keys": "2.0.0-experimental.2a70690"
|
|
51
52
|
},
|
|
52
53
|
"devDependencies": {
|
|
53
54
|
"@solana/eslint-config-solana": "^1.0.2",
|
|
54
|
-
"@swc/
|
|
55
|
-
"@swc/jest": "^0.2.23",
|
|
55
|
+
"@swc/jest": "^0.2.28",
|
|
56
56
|
"@types/jest": "^29.5.3",
|
|
57
|
-
"@typescript-eslint/eslint-plugin": "^6.
|
|
58
|
-
"@typescript-eslint/parser": "^6.
|
|
57
|
+
"@typescript-eslint/eslint-plugin": "^6.7.0",
|
|
58
|
+
"@typescript-eslint/parser": "^6.3.0",
|
|
59
59
|
"agadoo": "^3.0.0",
|
|
60
60
|
"eslint": "^8.45.0",
|
|
61
61
|
"eslint-plugin-sort-keys-fix": "^1.1.2",
|
|
62
62
|
"jest": "^29.6.1",
|
|
63
|
-
"jest-runner-eslint": "^2.
|
|
63
|
+
"jest-runner-eslint": "^2.1.0",
|
|
64
64
|
"jest-runner-prettier": "^1.0.0",
|
|
65
|
-
"
|
|
66
|
-
"
|
|
67
|
-
"ts-node": "^10.9.1",
|
|
68
|
-
"tsup": "6.7.0",
|
|
65
|
+
"prettier": "^2.8",
|
|
66
|
+
"tsup": "7.2.0",
|
|
69
67
|
"typescript": "^5.1.6",
|
|
70
68
|
"version-from-git": "^1.1.1",
|
|
71
|
-
"@solana/instructions": "2.0.0-experimental.
|
|
69
|
+
"@solana/instructions": "2.0.0-experimental.2a70690",
|
|
72
70
|
"build-scripts": "0.0.0",
|
|
73
71
|
"test-config": "0.0.0",
|
|
74
72
|
"test-matchers": "0.0.0",
|
|
@@ -87,6 +85,7 @@
|
|
|
87
85
|
"compile:typedefs": "tsc -p ./tsconfig.declarations.json",
|
|
88
86
|
"dev": "jest -c node_modules/test-config/jest-dev.config.ts --rootDir . --watch",
|
|
89
87
|
"publish-packages": "pnpm publish --tag experimental --access public --no-git-checks",
|
|
88
|
+
"style:fix": "pnpm eslint --fix src/* && pnpm prettier -w src/*",
|
|
90
89
|
"test:lint": "jest -c node_modules/test-config/jest-lint.config.ts --rootDir . --silent",
|
|
91
90
|
"test:prettier": "jest -c node_modules/test-config/jest-prettier.config.ts --rootDir . --silent",
|
|
92
91
|
"test:treeshakability:browser": "agadoo dist/index.browser.js",
|