@solana/web3.js 1.91.0 → 1.91.2

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.91.0",
3
+ "version": "1.91.2",
4
4
  "description": "Solana Javascript API",
5
5
  "keywords": [
6
6
  "api",
@@ -44,14 +44,13 @@
44
44
  "clean": "rimraf ./doc ./declarations ./lib",
45
45
  "dev": "cross-env NODE_ENV=development rollup -c --watch",
46
46
  "prepublishOnly": "pnpm pkg delete devDependencies",
47
- "publish-impl": "semantic-release --repository-url git@github.com:solana-labs/solana-web3.js.git",
48
- "publish-packages": "pnpm publish-impl",
47
+ "publish-packages-legacy": "semantic-release --repository-url git@github.com:solana-labs/solana-web3.js.git",
49
48
  "test:lint": "eslint src/ test/ --ext .js,.ts",
50
49
  "test:lint:fix": "eslint src/ test/ --fix --ext .js,.ts",
51
50
  "test:live": "TEST_LIVE=1 pnpm run test:unit:node",
52
51
  "test:live-with-test-validator": "start-server-and-test '../../scripts/start-shared-test-validator.sh' http://127.0.0.1:8899/health test:live",
53
52
  "test:prettier": "prettier --check '{,{src,test}/**/}*.{j,t}s'",
54
- "test:prettier:fix": "prettier --write '{,{src,test}/**/}*.{j,t}s'",
53
+ "test:prettier:fix": "pnpm prettier --write '{,{src,test}/**/}*.{j,t}s'",
55
54
  "test:typecheck": "tsc --noEmit",
56
55
  "test:unit:node": "cross-env NODE_ENV=test TS_NODE_COMPILER_OPTIONS='{ \"module\": \"commonjs\", \"target\": \"es2019\" }' ts-mocha --require esm './test/**/*.test.ts'"
57
56
  },
@@ -284,25 +284,21 @@ export class Message {
284
284
  const accountCount = shortvec.decodeLength(byteArray);
285
285
  let accountKeys = [];
286
286
  for (let i = 0; i < accountCount; i++) {
287
- const account = byteArray.slice(0, PUBLIC_KEY_LENGTH);
288
- byteArray = byteArray.slice(PUBLIC_KEY_LENGTH);
287
+ const account = byteArray.splice(0, PUBLIC_KEY_LENGTH);
289
288
  accountKeys.push(new PublicKey(Buffer.from(account)));
290
289
  }
291
290
 
292
- const recentBlockhash = byteArray.slice(0, PUBLIC_KEY_LENGTH);
293
- byteArray = byteArray.slice(PUBLIC_KEY_LENGTH);
291
+ const recentBlockhash = byteArray.splice(0, PUBLIC_KEY_LENGTH);
294
292
 
295
293
  const instructionCount = shortvec.decodeLength(byteArray);
296
294
  let instructions: CompiledInstruction[] = [];
297
295
  for (let i = 0; i < instructionCount; i++) {
298
296
  const programIdIndex = byteArray.shift()!;
299
297
  const accountCount = shortvec.decodeLength(byteArray);
300
- const accounts = byteArray.slice(0, accountCount);
301
- byteArray = byteArray.slice(accountCount);
298
+ const accounts = byteArray.splice(0, accountCount);
302
299
  const dataLength = shortvec.decodeLength(byteArray);
303
- const dataSlice = byteArray.slice(0, dataLength);
300
+ const dataSlice = byteArray.splice(0, dataLength);
304
301
  const data = bs58.encode(Buffer.from(dataSlice));
305
- byteArray = byteArray.slice(dataLength);
306
302
  instructions.push({
307
303
  programIdIndex,
308
304
  accounts,
@@ -904,8 +904,7 @@ export class Transaction {
904
904
  const signatureCount = shortvec.decodeLength(byteArray);
905
905
  let signatures = [];
906
906
  for (let i = 0; i < signatureCount; i++) {
907
- const signature = byteArray.slice(0, SIGNATURE_LENGTH_IN_BYTES);
908
- byteArray = byteArray.slice(SIGNATURE_LENGTH_IN_BYTES);
907
+ const signature = byteArray.splice(0, SIGNATURE_LENGTH_IN_BYTES);
909
908
  signatures.push(bs58.encode(Buffer.from(signature)));
910
909
  }
911
910
 
@@ -83,10 +83,8 @@ export class ValidatorInfo {
83
83
 
84
84
  const configKeys: Array<ConfigKey> = [];
85
85
  for (let i = 0; i < 2; i++) {
86
- const publicKey = new PublicKey(byteArray.slice(0, PUBLIC_KEY_LENGTH));
87
- byteArray = byteArray.slice(PUBLIC_KEY_LENGTH);
88
- const isSigner = byteArray.slice(0, 1)[0] === 1;
89
- byteArray = byteArray.slice(1);
86
+ const publicKey = new PublicKey(byteArray.splice(0, PUBLIC_KEY_LENGTH));
87
+ const isSigner = byteArray.splice(0, 1)[0] === 1;
90
88
  configKeys.push({publicKey, isSigner});
91
89
  }
92
90