@solana/web3.js 1.73.2 → 1.73.3

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@solana/web3.js",
3
- "version": "1.73.2",
3
+ "version": "1.73.3",
4
4
  "description": "Solana Javascript API",
5
5
  "keywords": [
6
6
  "api",
@@ -37,24 +37,22 @@
37
37
  "/src"
38
38
  ],
39
39
  "scripts": {
40
- "build": "npm run clean; cross-env NODE_ENV=production rollup -c; npm run type:gen",
40
+ "compile:docs": "typedoc --treatWarningsAsErrors",
41
+ "compile:js": "cross-env NODE_ENV=production rollup -c",
42
+ "compile:typedefs": "./scripts/typegen.sh",
41
43
  "build:fixtures": "set -ex; ./test/fixtures/noop-program/build.sh",
42
- "clean": "rimraf ./coverage ./lib",
43
- "codecov": "set -ex; npm run test:cover; cat ./coverage/lcov.info | codecov",
44
- "dev": "cross-env NODE_ENV=development rollup -c",
45
- "doc": "set -ex; typedoc --tsconfig ./tsconfig.library.json --treatWarningsAsErrors",
46
- "type:gen": "./scripts/typegen.sh",
47
- "lint": "set -ex; npm run pretty; eslint . --ext .js,.ts",
48
- "lint:fix": "npm run pretty:fix && eslint . --fix --ext .js,.ts",
49
- "type:check": "tsc -p tsconfig.library.json --noEmit && tsc -p tsconfig.tests.json --noEmit",
50
- "ok": "run-s lint test doc type:check",
51
- "pretty": "prettier --check '{,{src,test}/**/}*.{j,t}s'",
52
- "pretty:fix": "prettier --write '{,{src,test}/**/}*.{j,t}s'",
53
- "re": "semantic-release --repository-url git@github.com:solana-labs/solana-web3.js.git",
54
- "test": "cross-env NODE_ENV=test TS_NODE_COMPILER_OPTIONS='{ \"module\": \"commonjs\", \"target\": \"es2019\" }' ts-mocha -p ./tsconfig.tests.json --require esm './test/**/*.test.ts'",
55
- "test:cover": "nyc --reporter=lcov npm run test",
56
- "test:live": "TEST_LIVE=1 npm run test",
57
- "test:live-with-test-validator": "start-server-and-test 'solana-test-validator --reset --quiet' http://localhost:8899/health test:live"
44
+ "clean": "rimraf .nyc_output/ ./coverage ./docs ./declarations ./lib",
45
+ "dev": "cross-env NODE_ENV=development rollup -c --watch",
46
+ "publish-packages": "semantic-release --repository-url git@github.com:solana-labs/solana-web3.js.git",
47
+ "test:coverage": "cat ./coverage/lcov.info | codecov",
48
+ "test:lint": "eslint src/ test/ --ext .js,.ts",
49
+ "test:lint:fix": "eslint src/ test/ --fix --ext .js,.ts",
50
+ "test:live": "TEST_LIVE=1 pnpm run test:unit:node",
51
+ "test:live-with-test-validator": "start-server-and-test '$HOME/.local/share/solana/install/active_release/bin/solana-test-validator --reset --quiet' http://localhost:8899/health test:live",
52
+ "test:prettier": "prettier --check '{,{src,test}/**/}*.{j,t}s'",
53
+ "test:prettier:fix": "prettier --write '{,{src,test}/**/}*.{j,t}s'",
54
+ "test:typecheck": "tsc --noEmit",
55
+ "test:unit:node": "cross-env NODE_ENV=test TS_NODE_COMPILER_OPTIONS='{ \"module\": \"commonjs\", \"target\": \"es2019\" }' nyc --reporter=lcov ts-mocha --require esm './test/**/*.test.ts'"
58
56
  },
59
57
  "dependencies": {
60
58
  "@babel/runtime": "^7.12.5",
@@ -70,8 +68,8 @@
70
68
  "buffer": "6.0.1",
71
69
  "fast-stable-stringify": "^1.0.0",
72
70
  "jayson": "^3.4.4",
73
- "node-fetch": "2",
74
- "rpc-websockets": "^7.5.0",
71
+ "node-fetch": "^2.6.7",
72
+ "rpc-websockets": "^7.5.1",
75
73
  "superstruct": "^0.14.2"
76
74
  },
77
75
  "devDependencies": {
@@ -80,15 +78,14 @@
80
78
  "@babel/plugin-transform-runtime": "^7.12.10",
81
79
  "@babel/preset-env": "^7.12.11",
82
80
  "@babel/preset-typescript": "^7.12.16",
83
- "@commitlint/config-conventional": "^17.0.2",
84
81
  "@rollup/plugin-alias": "^4.0.3",
85
- "@rollup/plugin-babel": "^5.2.3",
82
+ "@rollup/plugin-babel": "^6.0.3",
86
83
  "@rollup/plugin-commonjs": "^24.0.1",
87
84
  "@rollup/plugin-json": "^6.0.0",
88
- "@rollup/plugin-multi-entry": "^4.0.0",
89
- "@rollup/plugin-node-resolve": "^13.0.0",
90
- "@rollup/plugin-replace": "^4.0.0",
91
- "@solana/spl-token": "^0.2.0",
85
+ "@rollup/plugin-multi-entry": "^6.0.0",
86
+ "@rollup/plugin-node-resolve": "^15.0.1",
87
+ "@rollup/plugin-replace": "^5.0.2",
88
+ "@solana/spl-token": "^0.3.7",
92
89
  "@types/bn.js": "^5.1.0",
93
90
  "@types/bs58": "^4.0.1",
94
91
  "@types/chai": "^4.2.15",
@@ -116,25 +113,22 @@
116
113
  "mockttp": "^3.6.2",
117
114
  "mz": "^2.7.0",
118
115
  "node-abort-controller": "^3.0.1",
119
- "npm-run-all": "^4.1.5",
120
116
  "nyc": "^15.1.0",
121
117
  "prettier": "^2.3.0",
122
- "rimraf": "3.0.2",
118
+ "rimraf": "4.1.2",
123
119
  "rollup": "2.79.1",
124
120
  "rollup-plugin-dts": "^4.0.0",
125
121
  "rollup-plugin-node-polyfills": "^0.2.1",
126
122
  "rollup-plugin-terser": "^7.0.2",
127
123
  "semantic-release": "^19.0.3",
128
- "sinon": "^13.0.2",
124
+ "sinon": "^15.0.1",
129
125
  "sinon-chai": "^3.7.0",
130
126
  "start-server-and-test": "^1.12.0",
131
127
  "ts-mocha": "^10.0.0",
132
128
  "ts-node": "^10.0.0",
129
+ "tsconfig": "workspace:*",
133
130
  "tslib": "^2.1.0",
134
131
  "typedoc": "^0.23",
135
132
  "typescript": "^4.9"
136
- },
137
- "engines": {
138
- "node": ">=12.20.0"
139
133
  }
140
134
  }
package/src/connection.ts CHANGED
@@ -4384,10 +4384,11 @@ export class Connection {
4384
4384
  *
4385
4385
  * @deprecated Deprecated since Solana v1.8.0. Please use {@link getLatestBlockhash} instead.
4386
4386
  */
4387
- async getRecentBlockhashAndContext(
4388
- commitment?: Commitment,
4389
- ): Promise<
4390
- RpcResponseAndContext<{blockhash: Blockhash; feeCalculator: FeeCalculator}>
4387
+ async getRecentBlockhashAndContext(commitment?: Commitment): Promise<
4388
+ RpcResponseAndContext<{
4389
+ blockhash: Blockhash;
4390
+ feeCalculator: FeeCalculator;
4391
+ }>
4391
4392
  > {
4392
4393
  const args = this._buildArgs([], commitment);
4393
4394
  const unsafeRes = await this._rpcRequest('getRecentBlockhash', args);
@@ -732,7 +732,11 @@ export class StakeProgram {
732
732
  {pubkey: authorizedPubkey, isSigner: true, isWritable: false},
733
733
  ];
734
734
  if (custodianPubkey) {
735
- keys.push({pubkey: custodianPubkey, isSigner: false, isWritable: false});
735
+ keys.push({
736
+ pubkey: custodianPubkey,
737
+ isSigner: false,
738
+ isWritable: false,
739
+ });
736
740
  }
737
741
  return new Transaction().add({
738
742
  keys,
@@ -770,7 +774,11 @@ export class StakeProgram {
770
774
  {pubkey: SYSVAR_CLOCK_PUBKEY, isSigner: false, isWritable: false},
771
775
  ];
772
776
  if (custodianPubkey) {
773
- keys.push({pubkey: custodianPubkey, isSigner: false, isWritable: false});
777
+ keys.push({
778
+ pubkey: custodianPubkey,
779
+ isSigner: false,
780
+ isWritable: false,
781
+ });
774
782
  }
775
783
  return new Transaction().add({
776
784
  keys,
@@ -893,7 +901,11 @@ export class StakeProgram {
893
901
  {pubkey: authorizedPubkey, isSigner: true, isWritable: false},
894
902
  ];
895
903
  if (custodianPubkey) {
896
- keys.push({pubkey: custodianPubkey, isSigner: false, isWritable: false});
904
+ keys.push({
905
+ pubkey: custodianPubkey,
906
+ isSigner: false,
907
+ isWritable: false,
908
+ });
897
909
  }
898
910
  return new Transaction().add({
899
911
  keys,
@@ -861,7 +861,11 @@ export class SystemProgram {
861
861
  {pubkey: params.newAccountPubkey, isSigner: false, isWritable: true},
862
862
  ];
863
863
  if (params.basePubkey != params.fromPubkey) {
864
- keys.push({pubkey: params.basePubkey, isSigner: true, isWritable: false});
864
+ keys.push({
865
+ pubkey: params.basePubkey,
866
+ isSigner: true,
867
+ isWritable: false,
868
+ });
865
869
  }
866
870
 
867
871
  return new TransactionInstruction({