@solana/transactions 2.0.0-experimental.0108bc7
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/LICENSE +20 -0
- package/README.md +25 -0
- package/dist/index.browser.cjs +771 -0
- package/dist/index.browser.cjs.map +1 -0
- package/dist/index.browser.js +760 -0
- package/dist/index.browser.js.map +1 -0
- package/dist/index.development.js +1327 -0
- package/dist/index.development.js.map +1 -0
- package/dist/index.native.js +760 -0
- package/dist/index.native.js.map +1 -0
- package/dist/index.node.cjs +773 -0
- package/dist/index.node.cjs.map +1 -0
- package/dist/index.node.js +762 -0
- package/dist/index.node.js.map +1 -0
- package/dist/index.production.min.js +20 -0
- package/dist/types/accounts.d.ts +28 -0
- package/dist/types/accounts.d.ts.map +1 -0
- package/dist/types/blockhash.d.ts +18 -0
- package/dist/types/blockhash.d.ts.map +1 -0
- package/dist/types/compile-address-table-lookups.d.ts +10 -0
- package/dist/types/compile-address-table-lookups.d.ts.map +1 -0
- package/dist/types/compile-header.d.ts +9 -0
- package/dist/types/compile-header.d.ts.map +1 -0
- package/dist/types/compile-instructions.d.ts +10 -0
- package/dist/types/compile-instructions.d.ts.map +1 -0
- package/dist/types/compile-lifetime-token.d.ts +3 -0
- package/dist/types/compile-lifetime-token.d.ts.map +1 -0
- package/dist/types/compile-static-accounts.d.ts +4 -0
- package/dist/types/compile-static-accounts.d.ts.map +1 -0
- package/dist/types/compile-transaction.d.ts +11 -0
- package/dist/types/compile-transaction.d.ts.map +1 -0
- package/dist/types/create-transaction.d.ts +9 -0
- package/dist/types/create-transaction.d.ts.map +1 -0
- package/dist/types/durable-nonce.d.ts +34 -0
- package/dist/types/durable-nonce.d.ts.map +1 -0
- package/dist/types/fee-payer.d.ts +8 -0
- package/dist/types/fee-payer.d.ts.map +1 -0
- package/dist/types/index.d.ts +9 -0
- package/dist/types/index.d.ts.map +1 -0
- package/dist/types/instructions.d.ts +5 -0
- package/dist/types/instructions.d.ts.map +1 -0
- package/dist/types/message.d.ts +30 -0
- package/dist/types/message.d.ts.map +1 -0
- package/dist/types/serializers/address-table-lookup.d.ts +6 -0
- package/dist/types/serializers/address-table-lookup.d.ts.map +1 -0
- package/dist/types/serializers/header.d.ts +6 -0
- package/dist/types/serializers/header.d.ts.map +1 -0
- package/dist/types/serializers/instruction.d.ts +6 -0
- package/dist/types/serializers/instruction.d.ts.map +1 -0
- package/dist/types/serializers/message.d.ts +6 -0
- package/dist/types/serializers/message.d.ts.map +1 -0
- package/dist/types/serializers/transaction-version.d.ts +6 -0
- package/dist/types/serializers/transaction-version.d.ts.map +1 -0
- package/dist/types/serializers/transaction.d.ts +6 -0
- package/dist/types/serializers/transaction.d.ts.map +1 -0
- package/dist/types/serializers/unimplemented.d.ts +3 -0
- package/dist/types/serializers/unimplemented.d.ts.map +1 -0
- package/dist/types/signatures.d.ts +11 -0
- package/dist/types/signatures.d.ts.map +1 -0
- package/dist/types/types.d.ts +19 -0
- package/dist/types/types.d.ts.map +1 -0
- package/dist/types/unsigned-transaction.d.ts +4 -0
- package/dist/types/unsigned-transaction.d.ts.map +1 -0
- package/dist/types/wire-transaction.d.ts +6 -0
- package/dist/types/wire-transaction.d.ts.map +1 -0
- package/package.json +97 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"unimplemented.d.ts","sourceRoot":"","sources":["../../../src/serializers/unimplemented.ts"],"names":[],"mappings":"AAOA,wBAAgB,uBAAuB,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,KAAK,CAIjE;AAED,wBAAgB,uBAAuB,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,KAAK,CAIjE"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { Base58EncodedAddress } from '@solana/addresses';
|
|
2
|
+
import { Ed25519Signature } from '@solana/keys';
|
|
3
|
+
import { compileMessage } from './message';
|
|
4
|
+
export interface IFullySignedTransaction extends ITransactionWithSignatures {
|
|
5
|
+
readonly __fullySignedTransaction: unique symbol;
|
|
6
|
+
}
|
|
7
|
+
export interface ITransactionWithSignatures {
|
|
8
|
+
readonly signatures: Readonly<Record<Base58EncodedAddress, Ed25519Signature>>;
|
|
9
|
+
}
|
|
10
|
+
export declare function signTransaction<TTransaction extends Parameters<typeof compileMessage>[0]>(keyPair: CryptoKeyPair, transaction: TTransaction | (TTransaction & ITransactionWithSignatures)): Promise<TTransaction & ITransactionWithSignatures>;
|
|
11
|
+
//# sourceMappingURL=signatures.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"signatures.d.ts","sourceRoot":"","sources":["../../src/signatures.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAwC,MAAM,mBAAmB,CAAC;AAC/F,OAAO,EAAE,gBAAgB,EAAa,MAAM,cAAc,CAAC;AAE3D,OAAO,EAAmB,cAAc,EAAE,MAAM,WAAW,CAAC;AAG5D,MAAM,WAAW,uBAAwB,SAAQ,0BAA0B;IACvE,QAAQ,CAAC,wBAAwB,EAAE,OAAO,MAAM,CAAC;CACpD;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"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { IAccountMeta, IInstruction } from '@solana/instructions';
|
|
2
|
+
export type BaseTransaction = Readonly<{
|
|
3
|
+
instructions: readonly IInstruction[];
|
|
4
|
+
version: TransactionVersion;
|
|
5
|
+
}>;
|
|
6
|
+
type LegacyTransaction = BaseTransaction & Readonly<{
|
|
7
|
+
instructions: readonly (Omit<IInstruction, 'accounts'> & Readonly<{
|
|
8
|
+
readonly accounts?: readonly IAccountMeta[];
|
|
9
|
+
}>)[];
|
|
10
|
+
version: 'legacy';
|
|
11
|
+
}>;
|
|
12
|
+
type V0Transaction = BaseTransaction & Readonly<{
|
|
13
|
+
instructions: readonly IInstruction[];
|
|
14
|
+
version: 0;
|
|
15
|
+
}>;
|
|
16
|
+
export type Transaction = LegacyTransaction | V0Transaction;
|
|
17
|
+
export type TransactionVersion = 'legacy' | 0;
|
|
18
|
+
export {};
|
|
19
|
+
//# 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,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"}
|
|
@@ -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
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"unsigned-transaction.d.ts","sourceRoot":"","sources":["../../src/unsigned-transaction.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,0BAA0B,EAAE,MAAM,GAAG,CAAC;AAC/C,OAAO,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;AAE1C,wBAAgB,sBAAsB,CAAC,YAAY,SAAS,eAAe,EACvE,WAAW,EAAE,YAAY,GAAG,CAAC,YAAY,GAAG,0BAA0B,CAAC,GACxE,YAAY,GAAG,IAAI,CAAC,YAAY,GAAG,0BAA0B,EAAE,MAAM,0BAA0B,CAAC,CAWlG"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { getTransactionEncoder } from './serializers/transaction';
|
|
2
|
+
export type Base64EncodedWireTransaction = string & {
|
|
3
|
+
readonly __base64EncodedWireTransaction: unique symbol;
|
|
4
|
+
};
|
|
5
|
+
export declare function getBase64EncodedWireTransaction(transaction: Parameters<ReturnType<typeof getTransactionEncoder>['serialize']>[0]): Base64EncodedWireTransaction;
|
|
6
|
+
//# sourceMappingURL=wire-transaction.d.ts.map
|
|
@@ -0,0 +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,8BAA8B,EAAE,OAAO,MAAM,CAAC;CAC1D,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
ADDED
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@solana/transactions",
|
|
3
|
+
"version": "2.0.0-experimental.0108bc7",
|
|
4
|
+
"description": "Helpers for creating and serializing transactions",
|
|
5
|
+
"exports": {
|
|
6
|
+
"browser": {
|
|
7
|
+
"import": "./dist/index.browser.js",
|
|
8
|
+
"require": "./dist/index.browser.cjs"
|
|
9
|
+
},
|
|
10
|
+
"node": {
|
|
11
|
+
"import": "./dist/index.node.js",
|
|
12
|
+
"require": "./dist/index.node.cjs"
|
|
13
|
+
},
|
|
14
|
+
"react-native": "./dist/index.native.js",
|
|
15
|
+
"types": "./dist/types/index.d.ts"
|
|
16
|
+
},
|
|
17
|
+
"browser": {
|
|
18
|
+
"./dist/index.node.cjs": "./dist/index.browser.cjs",
|
|
19
|
+
"./dist/index.node.js": "./dist/index.browser.js"
|
|
20
|
+
},
|
|
21
|
+
"main": "./dist/index.node.cjs",
|
|
22
|
+
"module": "./dist/index.node.js",
|
|
23
|
+
"react-native": "./dist/index.native.js",
|
|
24
|
+
"types": "./dist/types/index.d.ts",
|
|
25
|
+
"type": "module",
|
|
26
|
+
"files": [
|
|
27
|
+
"./dist/"
|
|
28
|
+
],
|
|
29
|
+
"sideEffects": false,
|
|
30
|
+
"keywords": [
|
|
31
|
+
"blockchain",
|
|
32
|
+
"solana",
|
|
33
|
+
"web3"
|
|
34
|
+
],
|
|
35
|
+
"author": "Solana Labs Maintainers <maintainers@solanalabs.com>",
|
|
36
|
+
"license": "MIT",
|
|
37
|
+
"repository": {
|
|
38
|
+
"type": "git",
|
|
39
|
+
"url": "https://github.com/solana-labs/solana-web3.js"
|
|
40
|
+
},
|
|
41
|
+
"bugs": {
|
|
42
|
+
"url": "http://github.com/solana-labs/solana-web3.js/issues"
|
|
43
|
+
},
|
|
44
|
+
"browserslist": [
|
|
45
|
+
"supports bigint and not dead",
|
|
46
|
+
"maintained node versions"
|
|
47
|
+
],
|
|
48
|
+
"dependencies": {
|
|
49
|
+
"@metaplex-foundation/umi-serializers": "^0.8.5",
|
|
50
|
+
"@solana/addresses": "2.0.0-experimental.0108bc7",
|
|
51
|
+
"@solana/keys": "2.0.0-experimental.0108bc7"
|
|
52
|
+
},
|
|
53
|
+
"devDependencies": {
|
|
54
|
+
"@solana/eslint-config-solana": "^1.0.2",
|
|
55
|
+
"@swc/jest": "^0.2.27",
|
|
56
|
+
"@types/jest": "^29.5.3",
|
|
57
|
+
"@typescript-eslint/eslint-plugin": "^6.3.0",
|
|
58
|
+
"@typescript-eslint/parser": "^6.0.0",
|
|
59
|
+
"agadoo": "^3.0.0",
|
|
60
|
+
"eslint": "^8.45.0",
|
|
61
|
+
"eslint-plugin-sort-keys-fix": "^1.1.2",
|
|
62
|
+
"jest": "^29.6.1",
|
|
63
|
+
"jest-runner-eslint": "^2.1.0",
|
|
64
|
+
"jest-runner-prettier": "^1.0.0",
|
|
65
|
+
"prettier": "^3.0.1",
|
|
66
|
+
"tsup": "7.2.0",
|
|
67
|
+
"typescript": "^5.1.6",
|
|
68
|
+
"version-from-git": "^1.1.1",
|
|
69
|
+
"@solana/instructions": "2.0.0-experimental.0108bc7",
|
|
70
|
+
"build-scripts": "0.0.0",
|
|
71
|
+
"test-config": "0.0.0",
|
|
72
|
+
"test-matchers": "0.0.0",
|
|
73
|
+
"tsconfig": "0.0.0"
|
|
74
|
+
},
|
|
75
|
+
"bundlewatch": {
|
|
76
|
+
"defaultCompression": "gzip",
|
|
77
|
+
"files": [
|
|
78
|
+
{
|
|
79
|
+
"path": "./dist/index*.js"
|
|
80
|
+
}
|
|
81
|
+
]
|
|
82
|
+
},
|
|
83
|
+
"scripts": {
|
|
84
|
+
"compile:js": "tsup --config build-scripts/tsup.config.library.ts",
|
|
85
|
+
"compile:typedefs": "tsc -p ./tsconfig.declarations.json",
|
|
86
|
+
"dev": "jest -c node_modules/test-config/jest-dev.config.ts --rootDir . --watch",
|
|
87
|
+
"publish-packages": "pnpm publish --tag experimental --access public --no-git-checks",
|
|
88
|
+
"test:lint": "jest -c node_modules/test-config/jest-lint.config.ts --rootDir . --silent",
|
|
89
|
+
"test:prettier": "jest -c node_modules/test-config/jest-prettier.config.ts --rootDir . --silent",
|
|
90
|
+
"test:treeshakability:browser": "agadoo dist/index.browser.js",
|
|
91
|
+
"test:treeshakability:native": "agadoo dist/index.node.js",
|
|
92
|
+
"test:treeshakability:node": "agadoo dist/index.native.js",
|
|
93
|
+
"test:typecheck": "tsc --noEmit",
|
|
94
|
+
"test:unit:browser": "jest -c node_modules/test-config/jest-unit.config.browser.ts --rootDir . --silent",
|
|
95
|
+
"test:unit:node": "jest -c node_modules/test-config/jest-unit.config.node.ts --rootDir . --silent"
|
|
96
|
+
}
|
|
97
|
+
}
|