@solana/web3.js 1.73.2 → 1.73.4

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.4",
4
4
  "description": "Solana Javascript API",
5
5
  "keywords": [
6
6
  "api",
@@ -37,24 +37,21 @@
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 ./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:lint": "eslint src/ test/ --ext .js,.ts",
48
+ "test:lint:fix": "eslint src/ test/ --fix --ext .js,.ts",
49
+ "test:live": "TEST_LIVE=1 pnpm run test:unit:node",
50
+ "test:live-with-test-validator": "start-server-and-test '$HOME/.local/share/solana/install/active_release/bin/solana-test-validator --reset --quiet' http://127.0.0.1:8899/health test:live",
51
+ "test:prettier": "prettier --check '{,{src,test}/**/}*.{j,t}s'",
52
+ "test:prettier:fix": "prettier --write '{,{src,test}/**/}*.{j,t}s'",
53
+ "test:typecheck": "tsc --noEmit",
54
+ "test:unit:node": "cross-env NODE_ENV=test TS_NODE_COMPILER_OPTIONS='{ \"module\": \"commonjs\", \"target\": \"es2019\" }' ts-mocha --require esm './test/**/*.test.ts'"
58
55
  },
59
56
  "dependencies": {
60
57
  "@babel/runtime": "^7.12.5",
@@ -70,8 +67,8 @@
70
67
  "buffer": "6.0.1",
71
68
  "fast-stable-stringify": "^1.0.0",
72
69
  "jayson": "^3.4.4",
73
- "node-fetch": "2",
74
- "rpc-websockets": "^7.5.0",
70
+ "node-fetch": "^2.6.7",
71
+ "rpc-websockets": "^7.5.1",
75
72
  "superstruct": "^0.14.2"
76
73
  },
77
74
  "devDependencies": {
@@ -80,15 +77,14 @@
80
77
  "@babel/plugin-transform-runtime": "^7.12.10",
81
78
  "@babel/preset-env": "^7.12.11",
82
79
  "@babel/preset-typescript": "^7.12.16",
83
- "@commitlint/config-conventional": "^17.0.2",
84
80
  "@rollup/plugin-alias": "^4.0.3",
85
- "@rollup/plugin-babel": "^5.2.3",
81
+ "@rollup/plugin-babel": "^6.0.3",
86
82
  "@rollup/plugin-commonjs": "^24.0.1",
87
83
  "@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",
84
+ "@rollup/plugin-multi-entry": "^6.0.0",
85
+ "@rollup/plugin-node-resolve": "^15.0.1",
86
+ "@rollup/plugin-replace": "^5.0.2",
87
+ "@solana/spl-token": "^0.3.7",
92
88
  "@types/bn.js": "^5.1.0",
93
89
  "@types/bs58": "^4.0.1",
94
90
  "@types/chai": "^4.2.15",
@@ -104,7 +100,6 @@
104
100
  "@typescript-eslint/parser": "^5.40.1",
105
101
  "chai": "^4.3.0",
106
102
  "chai-as-promised": "^7.1.1",
107
- "codecov": "^3.0.4",
108
103
  "cross-env": "7.0.3",
109
104
  "eslint": "^8.25.0",
110
105
  "eslint-config-prettier": "^8.5.0",
@@ -116,25 +111,21 @@
116
111
  "mockttp": "^3.6.2",
117
112
  "mz": "^2.7.0",
118
113
  "node-abort-controller": "^3.0.1",
119
- "npm-run-all": "^4.1.5",
120
- "nyc": "^15.1.0",
121
114
  "prettier": "^2.3.0",
122
- "rimraf": "3.0.2",
115
+ "rimraf": "4.1.2",
123
116
  "rollup": "2.79.1",
124
117
  "rollup-plugin-dts": "^4.0.0",
125
118
  "rollup-plugin-node-polyfills": "^0.2.1",
126
119
  "rollup-plugin-terser": "^7.0.2",
127
120
  "semantic-release": "^19.0.3",
128
- "sinon": "^13.0.2",
121
+ "sinon": "^15.0.1",
129
122
  "sinon-chai": "^3.7.0",
130
123
  "start-server-and-test": "^1.12.0",
131
124
  "ts-mocha": "^10.0.0",
132
125
  "ts-node": "^10.0.0",
126
+ "tsconfig": "workspace:*",
133
127
  "tslib": "^2.1.0",
134
128
  "typedoc": "^0.23",
135
129
  "typescript": "^4.9"
136
- },
137
- "engines": {
138
- "node": ">=12.20.0"
139
130
  }
140
131
  }
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);
@@ -5695,7 +5696,7 @@ export class Connection {
5695
5696
  }
5696
5697
 
5697
5698
  const wireTransaction = transaction.serialize();
5698
- return await this.sendRawTransaction(wireTransaction, options);
5699
+ return await this.sendRawTransaction(wireTransaction, signersOrOptions);
5699
5700
  }
5700
5701
 
5701
5702
  if (signersOrOptions === undefined || !Array.isArray(signersOrOptions)) {
@@ -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({