@solana/transactions 2.0.0-experimental.fbdf21a → 2.0.0-experimental.fc4e943

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.
Files changed (47) hide show
  1. package/LICENSE +1 -1
  2. package/dist/index.browser.cjs +813 -41
  3. package/dist/index.browser.cjs.map +1 -1
  4. package/dist/index.browser.js +803 -42
  5. package/dist/index.browser.js.map +1 -1
  6. package/dist/index.development.js +1784 -41
  7. package/dist/index.development.js.map +1 -1
  8. package/dist/index.native.js +803 -42
  9. package/dist/index.native.js.map +1 -1
  10. package/dist/index.node.cjs +813 -41
  11. package/dist/index.node.cjs.map +1 -1
  12. package/dist/index.node.js +803 -42
  13. package/dist/index.node.js.map +1 -1
  14. package/dist/index.production.min.js +16 -5
  15. package/dist/types/accounts.d.ts +28 -0
  16. package/dist/types/blockhash.d.ts +9 -1
  17. package/dist/types/compile-address-table-lookups.d.ts +10 -0
  18. package/dist/types/compile-header.d.ts +9 -0
  19. package/dist/types/compile-instructions.d.ts +10 -0
  20. package/dist/types/compile-lifetime-token.d.ts +3 -0
  21. package/dist/types/compile-static-accounts.d.ts +4 -0
  22. package/dist/types/compile-transaction.d.ts +11 -0
  23. package/dist/types/durable-nonce.d.ts +20 -7
  24. package/dist/types/fee-payer.d.ts +3 -2
  25. package/dist/types/index.d.ts +2 -0
  26. package/dist/types/message.d.ts +30 -0
  27. package/dist/types/serializers/address-table-lookup.d.ts +6 -0
  28. package/dist/types/serializers/header.d.ts +8 -0
  29. package/dist/types/serializers/index.d.ts +2 -0
  30. package/dist/types/serializers/instruction.d.ts +6 -0
  31. package/dist/types/serializers/message.d.ts +6 -0
  32. package/dist/types/serializers/transaction-version.d.ts +6 -0
  33. package/dist/types/serializers/transaction.d.ts +6 -0
  34. package/dist/types/serializers/unimplemented.d.ts +3 -0
  35. package/dist/types/signatures.d.ts +14 -7
  36. package/dist/types/types.d.ts +7 -0
  37. package/dist/types/unsigned-transaction.d.ts +4 -0
  38. package/dist/types/wire-transaction.d.ts +6 -0
  39. package/package.json +23 -21
  40. package/dist/types/blockhash.d.ts.map +0 -1
  41. package/dist/types/create-transaction.d.ts.map +0 -1
  42. package/dist/types/durable-nonce.d.ts.map +0 -1
  43. package/dist/types/fee-payer.d.ts.map +0 -1
  44. package/dist/types/index.d.ts.map +0 -1
  45. package/dist/types/instructions.d.ts.map +0 -1
  46. package/dist/types/signatures.d.ts.map +0 -1
  47. package/dist/types/types.d.ts.map +0 -1
@@ -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;
@@ -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,6 @@
1
+ import { getTransactionEncoder } from './serializers/transaction';
2
+ export type Base64EncodedWireTransaction = string & {
3
+ readonly __brand: unique symbol;
4
+ };
5
+ export declare function getBase64EncodedWireTransaction(transaction: Parameters<ReturnType<typeof getTransactionEncoder>['serialize']>[0]): Base64EncodedWireTransaction;
6
+ //# sourceMappingURL=wire-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.fbdf21a",
3
+ "version": "2.0.0-experimental.fc4e943",
4
4
  "description": "Helpers for creating and serializing transactions",
5
5
  "exports": {
6
6
  "browser": {
@@ -46,30 +46,31 @@
46
46
  "maintained node versions"
47
47
  ],
48
48
  "dependencies": {
49
- "@metaplex-foundation/umi-serializers": "^0.8.2"
49
+ "@metaplex-foundation/umi-serializers": "^0.8.9",
50
+ "@solana/addresses": "2.0.0-experimental.fc4e943",
51
+ "@solana/codecs-core": "2.0.0-experimental.fc4e943",
52
+ "@solana/codecs-data-structures": "2.0.0-experimental.fc4e943",
53
+ "@solana/codecs-numbers": "2.0.0-experimental.fc4e943",
54
+ "@solana/keys": "2.0.0-experimental.fc4e943"
50
55
  },
51
56
  "devDependencies": {
52
- "@solana/eslint-config-solana": "^1.0.0",
53
- "@swc/core": "^1.3.18",
54
- "@swc/jest": "^0.2.23",
55
- "@types/jest": "^29.5.0",
56
- "@typescript-eslint/eslint-plugin": "^5.57.1",
57
- "@typescript-eslint/parser": "^5.57.1",
57
+ "@solana/eslint-config-solana": "^1.0.2",
58
+ "@swc/jest": "^0.2.28",
59
+ "@types/jest": "^29.5.5",
60
+ "@types/node": "^20.6.3",
61
+ "@typescript-eslint/eslint-plugin": "^6.7.0",
62
+ "@typescript-eslint/parser": "^6.3.0",
58
63
  "agadoo": "^3.0.0",
59
- "eslint": "^8.37.0",
64
+ "eslint": "^8.45.0",
60
65
  "eslint-plugin-sort-keys-fix": "^1.1.2",
61
- "jest": "^29.5.0",
62
- "jest-runner-eslint": "^2.0.0",
66
+ "jest": "^29.7.0",
67
+ "jest-runner-eslint": "^2.1.0",
63
68
  "jest-runner-prettier": "^1.0.0",
64
- "postcss": "^8.4.12",
65
- "prettier": "^2.7.1",
66
- "ts-node": "^10.9.1",
67
- "tsup": "6.7.0",
68
- "typescript": "^5.0.3",
69
+ "prettier": "^2.8",
70
+ "tsup": "7.2.0",
71
+ "typescript": "^5.2.2",
69
72
  "version-from-git": "^1.1.1",
70
- "@solana/instructions": "2.0.0-development",
71
- "@solana/keys": "2.0.0-experimental.fbdf21a",
72
- "@solana/rpc-core": "2.0.0-development",
73
+ "@solana/instructions": "2.0.0-experimental.fc4e943",
73
74
  "build-scripts": "0.0.0",
74
75
  "test-config": "0.0.0",
75
76
  "test-matchers": "0.0.0",
@@ -88,11 +89,12 @@
88
89
  "compile:typedefs": "tsc -p ./tsconfig.declarations.json",
89
90
  "dev": "jest -c node_modules/test-config/jest-dev.config.ts --rootDir . --watch",
90
91
  "publish-packages": "pnpm publish --tag experimental --access public --no-git-checks",
92
+ "style:fix": "pnpm eslint --fix src/* && pnpm prettier -w src/* package.json",
91
93
  "test:lint": "jest -c node_modules/test-config/jest-lint.config.ts --rootDir . --silent",
92
94
  "test:prettier": "jest -c node_modules/test-config/jest-prettier.config.ts --rootDir . --silent",
93
95
  "test:treeshakability:browser": "agadoo dist/index.browser.js",
94
- "test:treeshakability:native": "agadoo dist/index.node.js",
95
- "test:treeshakability:node": "agadoo dist/index.native.js",
96
+ "test:treeshakability:native": "agadoo dist/index.native.js",
97
+ "test:treeshakability:node": "agadoo dist/index.node.js",
96
98
  "test:typecheck": "tsc --noEmit",
97
99
  "test:unit:browser": "jest -c node_modules/test-config/jest-unit.config.browser.ts --rootDir . --silent",
98
100
  "test:unit:node": "jest -c node_modules/test-config/jest-unit.config.node.ts --rootDir . --silent"
@@ -1 +0,0 @@
1
- {"version":3,"file":"blockhash.d.ts","sourceRoot":"","sources":["../../src/blockhash.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAE7C,KAAK,2BAA2B,GAAG,QAAQ,CAAC;IACxC,SAAS,EAAE,SAAS,CAAC;IACrB,oBAAoB,EAAE,MAAM,CAAC;CAChC,CAAC,CAAC;AAEH,MAAM,WAAW,iCAAiC;IAC9C,QAAQ,CAAC,kBAAkB,EAAE,2BAA2B,CAAC;CAC5D"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"create-transaction.d.ts","sourceRoot":"","sources":["../../src/create-transaction.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,E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,CAAC,oBAAoB,EAAE,sBAAsB,CAAC;QAC5E,GAAG,YAAY,EAAE;KACpB,CAAC;IACF,QAAQ,CAAC,kBAAkB,EAAE,uBAAuB,CAAC;CACxD"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"fee-payer.d.ts","sourceRoot":"","sources":["../../src/fee-payer.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,MAAM,cAAc,CAAC;AAEpD,OAAO,EAAE,0BAA0B,EAAE,MAAM,cAAc,CAAC;AAC1D,OAAO,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;AAE1C,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,YAAY,GACZ,CAAC,YAAY,GAAG,wBAAwB,CAAC,gBAAgB,CAAC,CAAC,GAC3D,CAAC,YAAY,GAAG,0BAA0B,CAAC,GAC3C,CAAC,YAAY,GAAG,wBAAwB,CAAC,gBAAgB,CAAC,GAAG,0BAA0B,CAAC,GAE5F,CAAC,YAAY,GAAG,wBAAwB,CAAC,gBAAgB,CAAC,CAAC,GAC3D,CAAC,IAAI,CAAC,YAAY,EAAE,MAAM,0BAA0B,CAAC,GAAG,wBAAwB,CAAC,gBAAgB,CAAC,CAAC,CAuBxG"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAC;AAC5B,cAAc,sBAAsB,CAAC;AACrC,cAAc,iBAAiB,CAAC;AAChC,cAAc,aAAa,CAAC;AAC5B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,cAAc,CAAC;AAC7B,cAAc,SAAS,CAAC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"instructions.d.ts","sourceRoot":"","sources":["../../src/instructions.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,0BAA0B,EAAE,MAAM,cAAc,CAAC;AAC1D,OAAO,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;AA0B1C,wBAAgB,4BAA4B,CAAC,YAAY,SAAS,eAAe,EAC7E,WAAW,EAAE,YAAY,CAAC,cAAc,CAAC,CAAC,MAAM,CAAC,EACjD,WAAW,EAAE,YAAY,GAAG,CAAC,YAAY,GAAG,0BAA0B,CAAC,GACxE,YAAY,GAAG,IAAI,CAAC,YAAY,EAAE,MAAM,0BAA0B,CAAC,CAKrE;AAED,wBAAgB,6BAA6B,CAAC,YAAY,SAAS,eAAe,EAC9E,WAAW,EAAE,YAAY,CAAC,cAAc,CAAC,CAAC,MAAM,CAAC,EACjD,WAAW,EAAE,YAAY,GAAG,CAAC,YAAY,GAAG,0BAA0B,CAAC,GACxE,YAAY,GAAG,IAAI,CAAC,YAAY,EAAE,MAAM,0BAA0B,CAAC,CAKrE"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"signatures.d.ts","sourceRoot":"","sources":["../../src/signatures.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,MAAM,cAAc,CAAC;AAEpD,KAAK,sBAAsB,GAAG,MAAM,GAAG;IACnC,QAAQ,CAAC,wBAAwB,EAAE,OAAO,MAAM,CAAC;CACpD,CAAC;AACF,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,sBAAsB,CAAC,CAAC,CAAC;CACvF"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/types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