@solana/web3.js 1.72.0 → 1.72.1

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/lib/index.esm.js CHANGED
@@ -8,13 +8,13 @@ import { serialize, deserialize, deserializeUnchecked } from 'borsh';
8
8
  import * as BufferLayout from '@solana/buffer-layout';
9
9
  import { blob } from '@solana/buffer-layout';
10
10
  import { toBigIntLE, toBufferLE } from 'bigint-buffer';
11
+ import require$$1 from 'tty';
11
12
  import require$$0$1 from 'os';
12
- import require$$0$2 from 'tty';
13
13
  import require$$0 from 'util';
14
- import require$$0$3 from 'events';
15
- import require$$1 from 'path';
16
- import require$$0$4 from 'http';
17
- import require$$0$5, { Agent as Agent$1 } from 'https';
14
+ import require$$0$2 from 'events';
15
+ import require$$1$1 from 'path';
16
+ import require$$0$3 from 'http';
17
+ import require$$0$4, { Agent as Agent$1 } from 'https';
18
18
  import { coerce, instance, string, tuple, literal, unknown, union, type, optional, any, number, array, nullable, create, boolean, record, assert as assert$1 } from 'superstruct';
19
19
  import { Client } from 'rpc-websockets';
20
20
  import RpcClient from 'jayson/lib/client/browser';
@@ -765,6 +765,36 @@ class CompiledKeys {
765
765
 
766
766
  }
767
767
 
768
+ const END_OF_BUFFER_ERROR_MESSAGE = 'Reached end of buffer unexpectedly';
769
+ /**
770
+ * Delegates to `Array#shift`, but throws if the array is zero-length.
771
+ */
772
+
773
+ function guardedShift(byteArray) {
774
+ if (byteArray.length === 0) {
775
+ throw new Error(END_OF_BUFFER_ERROR_MESSAGE);
776
+ }
777
+
778
+ return byteArray.shift();
779
+ }
780
+ /**
781
+ * Delegates to `Array#splice`, but throws if the section being spliced out extends past the end of
782
+ * the array.
783
+ */
784
+
785
+ function guardedSplice(byteArray, ...args) {
786
+ var _args$;
787
+
788
+ const [start] = args;
789
+
790
+ if (args.length === 2 // Implies that `deleteCount` was supplied
791
+ ? start + ((_args$ = args[1]) !== null && _args$ !== void 0 ? _args$ : 0) > byteArray.length : start >= byteArray.length) {
792
+ throw new Error(END_OF_BUFFER_ERROR_MESSAGE);
793
+ }
794
+
795
+ return byteArray.splice(...args);
796
+ }
797
+
768
798
  /**
769
799
  * An instruction to execute by a program
770
800
  *
@@ -916,37 +946,33 @@ class Message {
916
946
  static from(buffer) {
917
947
  // Slice up wire data
918
948
  let byteArray = [...buffer];
919
- const numRequiredSignatures = byteArray.shift();
949
+ const numRequiredSignatures = guardedShift(byteArray);
920
950
 
921
951
  if (numRequiredSignatures !== (numRequiredSignatures & VERSION_PREFIX_MASK)) {
922
952
  throw new Error('Versioned messages must be deserialized with VersionedMessage.deserialize()');
923
953
  }
924
954
 
925
- const numReadonlySignedAccounts = byteArray.shift();
926
- const numReadonlyUnsignedAccounts = byteArray.shift();
955
+ const numReadonlySignedAccounts = guardedShift(byteArray);
956
+ const numReadonlyUnsignedAccounts = guardedShift(byteArray);
927
957
  const accountCount = decodeLength(byteArray);
928
958
  let accountKeys = [];
929
959
 
930
960
  for (let i = 0; i < accountCount; i++) {
931
- const account = byteArray.slice(0, PUBLIC_KEY_LENGTH);
932
- byteArray = byteArray.slice(PUBLIC_KEY_LENGTH);
961
+ const account = guardedSplice(byteArray, 0, PUBLIC_KEY_LENGTH);
933
962
  accountKeys.push(new PublicKey(Buffer.from(account)));
934
963
  }
935
964
 
936
- const recentBlockhash = byteArray.slice(0, PUBLIC_KEY_LENGTH);
937
- byteArray = byteArray.slice(PUBLIC_KEY_LENGTH);
965
+ const recentBlockhash = guardedSplice(byteArray, 0, PUBLIC_KEY_LENGTH);
938
966
  const instructionCount = decodeLength(byteArray);
939
967
  let instructions = [];
940
968
 
941
969
  for (let i = 0; i < instructionCount; i++) {
942
- const programIdIndex = byteArray.shift();
970
+ const programIdIndex = guardedShift(byteArray);
943
971
  const accountCount = decodeLength(byteArray);
944
- const accounts = byteArray.slice(0, accountCount);
945
- byteArray = byteArray.slice(accountCount);
972
+ const accounts = guardedSplice(byteArray, 0, accountCount);
946
973
  const dataLength = decodeLength(byteArray);
947
- const dataSlice = byteArray.slice(0, dataLength);
974
+ const dataSlice = guardedSplice(byteArray, 0, dataLength);
948
975
  const data = bs58.encode(Buffer.from(dataSlice));
949
- byteArray = byteArray.slice(dataLength);
950
976
  instructions.push({
951
977
  programIdIndex,
952
978
  accounts,
@@ -1182,33 +1208,33 @@ class MessageV0 {
1182
1208
 
1183
1209
  static deserialize(serializedMessage) {
1184
1210
  let byteArray = [...serializedMessage];
1185
- const prefix = byteArray.shift();
1211
+ const prefix = guardedShift(byteArray);
1186
1212
  const maskedPrefix = prefix & VERSION_PREFIX_MASK;
1187
1213
  assert(prefix !== maskedPrefix, `Expected versioned message but received legacy message`);
1188
1214
  const version = maskedPrefix;
1189
1215
  assert(version === 0, `Expected versioned message with version 0 but found version ${version}`);
1190
1216
  const header = {
1191
- numRequiredSignatures: byteArray.shift(),
1192
- numReadonlySignedAccounts: byteArray.shift(),
1193
- numReadonlyUnsignedAccounts: byteArray.shift()
1217
+ numRequiredSignatures: guardedShift(byteArray),
1218
+ numReadonlySignedAccounts: guardedShift(byteArray),
1219
+ numReadonlyUnsignedAccounts: guardedShift(byteArray)
1194
1220
  };
1195
1221
  const staticAccountKeys = [];
1196
1222
  const staticAccountKeysLength = decodeLength(byteArray);
1197
1223
 
1198
1224
  for (let i = 0; i < staticAccountKeysLength; i++) {
1199
- staticAccountKeys.push(new PublicKey(byteArray.splice(0, PUBLIC_KEY_LENGTH)));
1225
+ staticAccountKeys.push(new PublicKey(guardedSplice(byteArray, 0, PUBLIC_KEY_LENGTH)));
1200
1226
  }
1201
1227
 
1202
- const recentBlockhash = bs58.encode(byteArray.splice(0, PUBLIC_KEY_LENGTH));
1228
+ const recentBlockhash = bs58.encode(guardedSplice(byteArray, 0, PUBLIC_KEY_LENGTH));
1203
1229
  const instructionCount = decodeLength(byteArray);
1204
1230
  const compiledInstructions = [];
1205
1231
 
1206
1232
  for (let i = 0; i < instructionCount; i++) {
1207
- const programIdIndex = byteArray.shift();
1233
+ const programIdIndex = guardedShift(byteArray);
1208
1234
  const accountKeyIndexesLength = decodeLength(byteArray);
1209
- const accountKeyIndexes = byteArray.splice(0, accountKeyIndexesLength);
1235
+ const accountKeyIndexes = guardedSplice(byteArray, 0, accountKeyIndexesLength);
1210
1236
  const dataLength = decodeLength(byteArray);
1211
- const data = new Uint8Array(byteArray.splice(0, dataLength));
1237
+ const data = new Uint8Array(guardedSplice(byteArray, 0, dataLength));
1212
1238
  compiledInstructions.push({
1213
1239
  programIdIndex,
1214
1240
  accountKeyIndexes,
@@ -1220,11 +1246,11 @@ class MessageV0 {
1220
1246
  const addressTableLookups = [];
1221
1247
 
1222
1248
  for (let i = 0; i < addressTableLookupsCount; i++) {
1223
- const accountKey = new PublicKey(byteArray.splice(0, PUBLIC_KEY_LENGTH));
1249
+ const accountKey = new PublicKey(guardedSplice(byteArray, 0, PUBLIC_KEY_LENGTH));
1224
1250
  const writableIndexesLength = decodeLength(byteArray);
1225
- const writableIndexes = byteArray.splice(0, writableIndexesLength);
1251
+ const writableIndexes = guardedSplice(byteArray, 0, writableIndexesLength);
1226
1252
  const readonlyIndexesLength = decodeLength(byteArray);
1227
- const readonlyIndexes = byteArray.splice(0, readonlyIndexesLength);
1253
+ const readonlyIndexes = guardedSplice(byteArray, 0, readonlyIndexesLength);
1228
1254
  addressTableLookups.push({
1229
1255
  accountKey,
1230
1256
  writableIndexes,
@@ -1966,8 +1992,7 @@ class Transaction {
1966
1992
  let signatures = [];
1967
1993
 
1968
1994
  for (let i = 0; i < signatureCount; i++) {
1969
- const signature = byteArray.slice(0, SIGNATURE_LENGTH_IN_BYTES);
1970
- byteArray = byteArray.slice(SIGNATURE_LENGTH_IN_BYTES);
1995
+ const signature = guardedSplice(byteArray, 0, SIGNATURE_LENGTH_IN_BYTES);
1971
1996
  signatures.push(bs58.encode(Buffer.from(signature)));
1972
1997
  }
1973
1998
 
@@ -2165,7 +2190,7 @@ class VersionedTransaction {
2165
2190
  const signaturesLength = decodeLength(byteArray);
2166
2191
 
2167
2192
  for (let i = 0; i < signaturesLength; i++) {
2168
- signatures.push(new Uint8Array(byteArray.splice(0, SIGNATURE_LENGTH_IN_BYTES)));
2193
+ signatures.push(new Uint8Array(guardedSplice(byteArray, 0, SIGNATURE_LENGTH_IN_BYTES)));
2169
2194
  }
2170
2195
 
2171
2196
  const message = VersionedMessage.deserialize(new Uint8Array(byteArray));
@@ -3338,7 +3363,7 @@ var y = d * 365.25;
3338
3363
  * @api public
3339
3364
  */
3340
3365
 
3341
- var ms$2 = function(val, options) {
3366
+ var ms$3 = function (val, options) {
3342
3367
  options = options || {};
3343
3368
  var type = typeof val;
3344
3369
  if (type === 'string' && val.length > 0) {
@@ -3487,11 +3512,11 @@ function plural(ms, msAbs, n, name) {
3487
3512
  */
3488
3513
 
3489
3514
  var util = require$$0;
3490
- var ms$1 = ms$2;
3515
+ var ms$2 = ms$3;
3491
3516
 
3492
3517
  var humanizeMs = function (t) {
3493
3518
  if (typeof t === 'number') return t;
3494
- var r = ms$1(t);
3519
+ var r = ms$2(t);
3495
3520
  if (r === undefined) {
3496
3521
  var err = new Error(util.format('humanize-ms(%j) result undefined', t));
3497
3522
  console.warn(err.stack);
@@ -3503,6 +3528,177 @@ var src = {exports: {}};
3503
3528
 
3504
3529
  var browser = {exports: {}};
3505
3530
 
3531
+ /**
3532
+ * Helpers.
3533
+ */
3534
+
3535
+ var ms$1;
3536
+ var hasRequiredMs;
3537
+
3538
+ function requireMs () {
3539
+ if (hasRequiredMs) return ms$1;
3540
+ hasRequiredMs = 1;
3541
+ var s = 1000;
3542
+ var m = s * 60;
3543
+ var h = m * 60;
3544
+ var d = h * 24;
3545
+ var w = d * 7;
3546
+ var y = d * 365.25;
3547
+
3548
+ /**
3549
+ * Parse or format the given `val`.
3550
+ *
3551
+ * Options:
3552
+ *
3553
+ * - `long` verbose formatting [false]
3554
+ *
3555
+ * @param {String|Number} val
3556
+ * @param {Object} [options]
3557
+ * @throws {Error} throw an error if val is not a non-empty string or a number
3558
+ * @return {String|Number}
3559
+ * @api public
3560
+ */
3561
+
3562
+ ms$1 = function(val, options) {
3563
+ options = options || {};
3564
+ var type = typeof val;
3565
+ if (type === 'string' && val.length > 0) {
3566
+ return parse(val);
3567
+ } else if (type === 'number' && isFinite(val)) {
3568
+ return options.long ? fmtLong(val) : fmtShort(val);
3569
+ }
3570
+ throw new Error(
3571
+ 'val is not a non-empty string or a valid number. val=' +
3572
+ JSON.stringify(val)
3573
+ );
3574
+ };
3575
+
3576
+ /**
3577
+ * Parse the given `str` and return milliseconds.
3578
+ *
3579
+ * @param {String} str
3580
+ * @return {Number}
3581
+ * @api private
3582
+ */
3583
+
3584
+ function parse(str) {
3585
+ str = String(str);
3586
+ if (str.length > 100) {
3587
+ return;
3588
+ }
3589
+ var match = /^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(
3590
+ str
3591
+ );
3592
+ if (!match) {
3593
+ return;
3594
+ }
3595
+ var n = parseFloat(match[1]);
3596
+ var type = (match[2] || 'ms').toLowerCase();
3597
+ switch (type) {
3598
+ case 'years':
3599
+ case 'year':
3600
+ case 'yrs':
3601
+ case 'yr':
3602
+ case 'y':
3603
+ return n * y;
3604
+ case 'weeks':
3605
+ case 'week':
3606
+ case 'w':
3607
+ return n * w;
3608
+ case 'days':
3609
+ case 'day':
3610
+ case 'd':
3611
+ return n * d;
3612
+ case 'hours':
3613
+ case 'hour':
3614
+ case 'hrs':
3615
+ case 'hr':
3616
+ case 'h':
3617
+ return n * h;
3618
+ case 'minutes':
3619
+ case 'minute':
3620
+ case 'mins':
3621
+ case 'min':
3622
+ case 'm':
3623
+ return n * m;
3624
+ case 'seconds':
3625
+ case 'second':
3626
+ case 'secs':
3627
+ case 'sec':
3628
+ case 's':
3629
+ return n * s;
3630
+ case 'milliseconds':
3631
+ case 'millisecond':
3632
+ case 'msecs':
3633
+ case 'msec':
3634
+ case 'ms':
3635
+ return n;
3636
+ default:
3637
+ return undefined;
3638
+ }
3639
+ }
3640
+
3641
+ /**
3642
+ * Short format for `ms`.
3643
+ *
3644
+ * @param {Number} ms
3645
+ * @return {String}
3646
+ * @api private
3647
+ */
3648
+
3649
+ function fmtShort(ms) {
3650
+ var msAbs = Math.abs(ms);
3651
+ if (msAbs >= d) {
3652
+ return Math.round(ms / d) + 'd';
3653
+ }
3654
+ if (msAbs >= h) {
3655
+ return Math.round(ms / h) + 'h';
3656
+ }
3657
+ if (msAbs >= m) {
3658
+ return Math.round(ms / m) + 'm';
3659
+ }
3660
+ if (msAbs >= s) {
3661
+ return Math.round(ms / s) + 's';
3662
+ }
3663
+ return ms + 'ms';
3664
+ }
3665
+
3666
+ /**
3667
+ * Long format for `ms`.
3668
+ *
3669
+ * @param {Number} ms
3670
+ * @return {String}
3671
+ * @api private
3672
+ */
3673
+
3674
+ function fmtLong(ms) {
3675
+ var msAbs = Math.abs(ms);
3676
+ if (msAbs >= d) {
3677
+ return plural(ms, msAbs, d, 'day');
3678
+ }
3679
+ if (msAbs >= h) {
3680
+ return plural(ms, msAbs, h, 'hour');
3681
+ }
3682
+ if (msAbs >= m) {
3683
+ return plural(ms, msAbs, m, 'minute');
3684
+ }
3685
+ if (msAbs >= s) {
3686
+ return plural(ms, msAbs, s, 'second');
3687
+ }
3688
+ return ms + ' ms';
3689
+ }
3690
+
3691
+ /**
3692
+ * Pluralization helper.
3693
+ */
3694
+
3695
+ function plural(ms, msAbs, n, name) {
3696
+ var isPlural = msAbs >= n * 1.5;
3697
+ return Math.round(ms / n) + ' ' + name + (isPlural ? 's' : '');
3698
+ }
3699
+ return ms$1;
3700
+ }
3701
+
3506
3702
  var common;
3507
3703
  var hasRequiredCommon;
3508
3704
 
@@ -3521,7 +3717,7 @@ function requireCommon () {
3521
3717
  createDebug.disable = disable;
3522
3718
  createDebug.enable = enable;
3523
3719
  createDebug.enabled = enabled;
3524
- createDebug.humanize = ms$2;
3720
+ createDebug.humanize = requireMs();
3525
3721
  createDebug.destroy = destroy;
3526
3722
 
3527
3723
  Object.keys(env).forEach(key => {
@@ -4072,12 +4268,12 @@ var hasRequiredHasFlag;
4072
4268
  function requireHasFlag () {
4073
4269
  if (hasRequiredHasFlag) return hasFlag;
4074
4270
  hasRequiredHasFlag = 1;
4075
- hasFlag = (flag, argv) => {
4076
- argv = argv || process.argv;
4271
+
4272
+ hasFlag = (flag, argv = process.argv) => {
4077
4273
  const prefix = flag.startsWith('-') ? '' : (flag.length === 1 ? '-' : '--');
4078
- const pos = argv.indexOf(prefix + flag);
4079
- const terminatorPos = argv.indexOf('--');
4080
- return pos !== -1 && (terminatorPos === -1 ? true : pos < terminatorPos);
4274
+ const position = argv.indexOf(prefix + flag);
4275
+ const terminatorPosition = argv.indexOf('--');
4276
+ return position !== -1 && (terminatorPosition === -1 || position < terminatorPosition);
4081
4277
  };
4082
4278
  return hasFlag;
4083
4279
  }
@@ -4089,23 +4285,32 @@ function requireSupportsColor () {
4089
4285
  if (hasRequiredSupportsColor) return supportsColor_1;
4090
4286
  hasRequiredSupportsColor = 1;
4091
4287
  const os = require$$0$1;
4288
+ const tty = require$$1;
4092
4289
  const hasFlag = requireHasFlag();
4093
4290
 
4094
- const env = process.env;
4291
+ const {env} = process;
4095
4292
 
4096
4293
  let forceColor;
4097
4294
  if (hasFlag('no-color') ||
4098
4295
  hasFlag('no-colors') ||
4099
- hasFlag('color=false')) {
4100
- forceColor = false;
4296
+ hasFlag('color=false') ||
4297
+ hasFlag('color=never')) {
4298
+ forceColor = 0;
4101
4299
  } else if (hasFlag('color') ||
4102
4300
  hasFlag('colors') ||
4103
4301
  hasFlag('color=true') ||
4104
4302
  hasFlag('color=always')) {
4105
- forceColor = true;
4303
+ forceColor = 1;
4106
4304
  }
4305
+
4107
4306
  if ('FORCE_COLOR' in env) {
4108
- forceColor = env.FORCE_COLOR.length === 0 || parseInt(env.FORCE_COLOR, 10) !== 0;
4307
+ if (env.FORCE_COLOR === 'true') {
4308
+ forceColor = 1;
4309
+ } else if (env.FORCE_COLOR === 'false') {
4310
+ forceColor = 0;
4311
+ } else {
4312
+ forceColor = env.FORCE_COLOR.length === 0 ? 1 : Math.min(parseInt(env.FORCE_COLOR, 10), 3);
4313
+ }
4109
4314
  }
4110
4315
 
4111
4316
  function translateLevel(level) {
@@ -4121,8 +4326,8 @@ function requireSupportsColor () {
4121
4326
  };
4122
4327
  }
4123
4328
 
4124
- function supportsColor(stream) {
4125
- if (forceColor === false) {
4329
+ function supportsColor(haveStream, streamIsTTY) {
4330
+ if (forceColor === 0) {
4126
4331
  return 0;
4127
4332
  }
4128
4333
 
@@ -4136,22 +4341,21 @@ function requireSupportsColor () {
4136
4341
  return 2;
4137
4342
  }
4138
4343
 
4139
- if (stream && !stream.isTTY && forceColor !== true) {
4344
+ if (haveStream && !streamIsTTY && forceColor === undefined) {
4140
4345
  return 0;
4141
4346
  }
4142
4347
 
4143
- const min = forceColor ? 1 : 0;
4348
+ const min = forceColor || 0;
4349
+
4350
+ if (env.TERM === 'dumb') {
4351
+ return min;
4352
+ }
4144
4353
 
4145
4354
  if (process.platform === 'win32') {
4146
- // Node.js 7.5.0 is the first version of Node.js to include a patch to
4147
- // libuv that enables 256 color output on Windows. Anything earlier and it
4148
- // won't work. However, here we target Node.js 8 at minimum as it is an LTS
4149
- // release, and Node.js 7 is not. Windows 10 build 10586 is the first Windows
4150
- // release that supports 256 colors. Windows 10 build 14931 is the first release
4151
- // that supports 16m/TrueColor.
4355
+ // Windows 10 build 10586 is the first Windows release that supports 256 colors.
4356
+ // Windows 10 build 14931 is the first release that supports 16m/TrueColor.
4152
4357
  const osRelease = os.release().split('.');
4153
4358
  if (
4154
- Number(process.versions.node.split('.')[0]) >= 8 &&
4155
4359
  Number(osRelease[0]) >= 10 &&
4156
4360
  Number(osRelease[2]) >= 10586
4157
4361
  ) {
@@ -4162,7 +4366,7 @@ function requireSupportsColor () {
4162
4366
  }
4163
4367
 
4164
4368
  if ('CI' in env) {
4165
- if (['TRAVIS', 'CIRCLECI', 'APPVEYOR', 'GITLAB_CI'].some(sign => sign in env) || env.CI_NAME === 'codeship') {
4369
+ if (['TRAVIS', 'CIRCLECI', 'APPVEYOR', 'GITLAB_CI', 'GITHUB_ACTIONS', 'BUILDKITE'].some(sign => sign in env) || env.CI_NAME === 'codeship') {
4166
4370
  return 1;
4167
4371
  }
4168
4372
 
@@ -4201,22 +4405,18 @@ function requireSupportsColor () {
4201
4405
  return 1;
4202
4406
  }
4203
4407
 
4204
- if (env.TERM === 'dumb') {
4205
- return min;
4206
- }
4207
-
4208
4408
  return min;
4209
4409
  }
4210
4410
 
4211
4411
  function getSupportLevel(stream) {
4212
- const level = supportsColor(stream);
4412
+ const level = supportsColor(stream, stream && stream.isTTY);
4213
4413
  return translateLevel(level);
4214
4414
  }
4215
4415
 
4216
4416
  supportsColor_1 = {
4217
4417
  supportsColor: getSupportLevel,
4218
- stdout: getSupportLevel(process.stdout),
4219
- stderr: getSupportLevel(process.stderr)
4418
+ stdout: translateLevel(supportsColor(true, tty.isatty(1))),
4419
+ stderr: translateLevel(supportsColor(true, tty.isatty(2)))
4220
4420
  };
4221
4421
  return supportsColor_1;
4222
4422
  }
@@ -4231,7 +4431,7 @@ function requireNode () {
4231
4431
  if (hasRequiredNode) return node.exports;
4232
4432
  hasRequiredNode = 1;
4233
4433
  (function (module, exports) {
4234
- const tty = require$$0$2;
4434
+ const tty = require$$1;
4235
4435
  const util = require$$0;
4236
4436
 
4237
4437
  /**
@@ -4663,7 +4863,7 @@ function requireEventListenerCount () {
4663
4863
  * @private
4664
4864
  */
4665
4865
 
4666
- var EventEmitter = require$$0$3.EventEmitter;
4866
+ var EventEmitter = require$$0$2.EventEmitter;
4667
4867
 
4668
4868
  /**
4669
4869
  * Module exports.
@@ -4743,7 +4943,7 @@ function requireEventListenerCount () {
4743
4943
 
4744
4944
  var callSiteToString = compat.exports.callSiteToString;
4745
4945
  var eventListenerCount = compat.exports.eventListenerCount;
4746
- var relative = require$$1.relative;
4946
+ var relative = require$$1$1.relative;
4747
4947
 
4748
4948
  /**
4749
4949
  * Module exports.
@@ -5266,7 +5466,7 @@ var constants = {
5266
5466
  SOCKET_REQUEST_FINISHED_COUNT: Symbol('agentkeepalive#socketRequestFinishedCount'),
5267
5467
  };
5268
5468
 
5269
- const OriginalAgent = require$$0$4.Agent;
5469
+ const OriginalAgent = require$$0$3.Agent;
5270
5470
  const ms = humanizeMs;
5271
5471
  const debug = src.exports('agentkeepalive');
5272
5472
  const deprecate = depd_1('agentkeepalive');
@@ -5663,7 +5863,7 @@ function inspect(obj) {
5663
5863
  return res;
5664
5864
  }
5665
5865
 
5666
- const OriginalHttpsAgent = require$$0$5.Agent;
5866
+ const OriginalHttpsAgent = require$$0$4.Agent;
5667
5867
  const HttpAgent = agent;
5668
5868
  const {
5669
5869
  INIT_SOCKET,
@@ -7141,7 +7341,7 @@ const LogsNotificationResult = type({
7141
7341
 
7142
7342
  /** @internal */
7143
7343
  const COMMON_HTTP_HEADERS = {
7144
- 'solana-client': `js/${(_process$env$npm_pack = "0.0.0-development") !== null && _process$env$npm_pack !== void 0 ? _process$env$npm_pack : 'UNKNOWN'}`
7344
+ 'solana-client': `js/${(_process$env$npm_pack = "1.72.1") !== null && _process$env$npm_pack !== void 0 ? _process$env$npm_pack : 'UNKNOWN'}`
7145
7345
  };
7146
7346
  /**
7147
7347
  * A connection to a fullnode JSON RPC endpoint
@@ -12574,10 +12774,8 @@ class ValidatorInfo {
12574
12774
  const configKeys = [];
12575
12775
 
12576
12776
  for (let i = 0; i < 2; i++) {
12577
- const publicKey = new PublicKey(byteArray.slice(0, PUBLIC_KEY_LENGTH));
12578
- byteArray = byteArray.slice(PUBLIC_KEY_LENGTH);
12579
- const isSigner = byteArray.slice(0, 1)[0] === 1;
12580
- byteArray = byteArray.slice(1);
12777
+ const publicKey = new PublicKey(guardedSplice(byteArray, 0, PUBLIC_KEY_LENGTH));
12778
+ const isSigner = guardedShift(byteArray) === 1;
12581
12779
  configKeys.push({
12582
12780
  publicKey,
12583
12781
  isSigner