@stellar/stellar-sdk 16.0.0-rc.1 → 16.0.0-rc.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.
Files changed (64) hide show
  1. package/README.md +22 -28
  2. package/dist/stellar-sdk-axios.js +247 -232
  3. package/dist/stellar-sdk-axios.js.map +1 -1
  4. package/dist/stellar-sdk-axios.min.js +1 -1
  5. package/dist/stellar-sdk-axios.min.js.map +1 -1
  6. package/dist/stellar-sdk.js +50 -35
  7. package/dist/stellar-sdk.js.map +1 -1
  8. package/dist/stellar-sdk.min.js +1 -1
  9. package/dist/stellar-sdk.min.js.map +1 -1
  10. package/lib/axios/cjs/base/auth.js +11 -11
  11. package/lib/axios/cjs/base/auth.js.map +1 -1
  12. package/lib/axios/cjs/base/keypair.js +1 -1
  13. package/lib/axios/cjs/base/keypair.js.map +1 -1
  14. package/lib/axios/cjs/bindings/config.js +1 -1
  15. package/lib/axios/cjs/contract/assembled_transaction.js +6 -1
  16. package/lib/axios/cjs/contract/assembled_transaction.js.map +1 -1
  17. package/lib/axios/cjs/contract/types.js.map +1 -1
  18. package/lib/axios/cjs/horizon/horizon_axios_client.js +1 -1
  19. package/lib/axios/cjs/rpc/axios.js +1 -1
  20. package/lib/axios/cjs/rpc/server.js +13 -4
  21. package/lib/axios/cjs/rpc/server.js.map +1 -1
  22. package/lib/axios/esm/base/auth.d.ts +19 -7
  23. package/lib/axios/esm/base/auth.js +11 -11
  24. package/lib/axios/esm/base/auth.js.map +1 -1
  25. package/lib/axios/esm/base/keypair.js +1 -1
  26. package/lib/axios/esm/base/keypair.js.map +1 -1
  27. package/lib/axios/esm/bindings/config.js +1 -1
  28. package/lib/axios/esm/contract/assembled_transaction.js +6 -1
  29. package/lib/axios/esm/contract/assembled_transaction.js.map +1 -1
  30. package/lib/axios/esm/contract/types.d.ts +9 -0
  31. package/lib/axios/esm/contract/types.js.map +1 -1
  32. package/lib/axios/esm/horizon/horizon_axios_client.js +1 -1
  33. package/lib/axios/esm/rpc/axios.js +1 -1
  34. package/lib/axios/esm/rpc/server.d.ts +7 -2
  35. package/lib/axios/esm/rpc/server.js +13 -4
  36. package/lib/axios/esm/rpc/server.js.map +1 -1
  37. package/lib/cjs/base/auth.js +11 -11
  38. package/lib/cjs/base/auth.js.map +1 -1
  39. package/lib/cjs/base/keypair.js +1 -1
  40. package/lib/cjs/base/keypair.js.map +1 -1
  41. package/lib/cjs/bindings/config.js +1 -1
  42. package/lib/cjs/contract/assembled_transaction.js +6 -1
  43. package/lib/cjs/contract/assembled_transaction.js.map +1 -1
  44. package/lib/cjs/contract/types.js.map +1 -1
  45. package/lib/cjs/horizon/horizon_axios_client.js +1 -1
  46. package/lib/cjs/rpc/axios.js +1 -1
  47. package/lib/cjs/rpc/server.js +13 -4
  48. package/lib/cjs/rpc/server.js.map +1 -1
  49. package/lib/esm/base/auth.d.ts +19 -7
  50. package/lib/esm/base/auth.js +11 -11
  51. package/lib/esm/base/auth.js.map +1 -1
  52. package/lib/esm/base/keypair.js +1 -1
  53. package/lib/esm/base/keypair.js.map +1 -1
  54. package/lib/esm/bindings/config.js +1 -1
  55. package/lib/esm/contract/assembled_transaction.js +6 -1
  56. package/lib/esm/contract/assembled_transaction.js.map +1 -1
  57. package/lib/esm/contract/types.d.ts +9 -0
  58. package/lib/esm/contract/types.js.map +1 -1
  59. package/lib/esm/horizon/horizon_axios_client.js +1 -1
  60. package/lib/esm/rpc/axios.js +1 -1
  61. package/lib/esm/rpc/server.d.ts +7 -2
  62. package/lib/esm/rpc/server.js +13 -4
  63. package/lib/esm/rpc/server.js.map +1 -1
  64. package/package.json +1 -1
@@ -1125,7 +1125,7 @@
1125
1125
 
1126
1126
  const isIterable = (thing) => thing != null && isFunction$3(thing[iterator]);
1127
1127
 
1128
- var utils$1 = {
1128
+ var utils$2 = {
1129
1129
  isArray: isArray$4,
1130
1130
  isArrayBuffer,
1131
1131
  isBuffer: isBuffer$2,
@@ -3166,7 +3166,7 @@
3166
3166
 
3167
3167
  // RawAxiosHeaders whose duplicates are ignored by node
3168
3168
  // c.f. https://nodejs.org/api/http.html#http_message_headers
3169
- const ignoreDuplicateOf = utils$1.toObjectSet([
3169
+ const ignoreDuplicateOf = utils$2.toObjectSet([
3170
3170
  'age',
3171
3171
  'authorization',
3172
3172
  'content-length',
@@ -3264,7 +3264,7 @@
3264
3264
  const INVALID_BYTE_STRING_HEADER_VALUE_CHARS = new RegExp('[^\\u0009\\u0020-\\u007e\\u0080-\\u00ff]+', 'g');
3265
3265
 
3266
3266
  function sanitizeValue(value, invalidChars) {
3267
- if (utils$1.isArray(value)) {
3267
+ if (utils$2.isArray(value)) {
3268
3268
  return value.map((item) => sanitizeValue(item, invalidChars));
3269
3269
  }
3270
3270
 
@@ -3280,7 +3280,7 @@
3280
3280
  function toByteStringHeaderObject(headers) {
3281
3281
  const byteStringHeaders = Object.create(null);
3282
3282
 
3283
- utils$1.forEach(headers.toJSON(), (value, header) => {
3283
+ utils$2.forEach(headers.toJSON(), (value, header) => {
3284
3284
  byteStringHeaders[header] = sanitizeByteStringHeaderValue(value);
3285
3285
  });
3286
3286
 
@@ -3298,7 +3298,7 @@
3298
3298
  return value;
3299
3299
  }
3300
3300
 
3301
- return utils$1.isArray(value) ? value.map(normalizeValue) : sanitizeHeaderValue(String(value));
3301
+ return utils$2.isArray(value) ? value.map(normalizeValue) : sanitizeHeaderValue(String(value));
3302
3302
  }
3303
3303
 
3304
3304
  function parseTokens(str) {
@@ -3316,7 +3316,7 @@
3316
3316
  const isValidHeaderName = (str) => /^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(str.trim());
3317
3317
 
3318
3318
  function matchHeaderValue(context, value, header, filter, isHeaderNameFilter) {
3319
- if (utils$1.isFunction(filter)) {
3319
+ if (utils$2.isFunction(filter)) {
3320
3320
  return filter.call(this, value, header);
3321
3321
  }
3322
3322
 
@@ -3324,13 +3324,13 @@
3324
3324
  value = header;
3325
3325
  }
3326
3326
 
3327
- if (!utils$1.isString(value)) return;
3327
+ if (!utils$2.isString(value)) return;
3328
3328
 
3329
- if (utils$1.isString(filter)) {
3329
+ if (utils$2.isString(filter)) {
3330
3330
  return value.indexOf(filter) !== -1;
3331
3331
  }
3332
3332
 
3333
- if (utils$1.isRegExp(filter)) {
3333
+ if (utils$2.isRegExp(filter)) {
3334
3334
  return filter.test(value);
3335
3335
  }
3336
3336
  }
@@ -3345,7 +3345,7 @@
3345
3345
  }
3346
3346
 
3347
3347
  function buildAccessors(obj, header) {
3348
- const accessorName = utils$1.toCamelCase(' ' + header);
3348
+ const accessorName = utils$2.toCamelCase(' ' + header);
3349
3349
 
3350
3350
  ['get', 'set', 'has'].forEach((methodName) => {
3351
3351
  Object.defineProperty(obj, methodName + accessorName, {
@@ -3375,7 +3375,7 @@
3375
3375
  throw new Error('header name must be a non-empty string');
3376
3376
  }
3377
3377
 
3378
- const key = utils$1.findKey(self, lHeader);
3378
+ const key = utils$2.findKey(self, lHeader);
3379
3379
 
3380
3380
  if (
3381
3381
  !key ||
@@ -3388,23 +3388,23 @@
3388
3388
  }
3389
3389
 
3390
3390
  const setHeaders = (headers, _rewrite) =>
3391
- utils$1.forEach(headers, (_value, _header) => setHeader(_value, _header, _rewrite));
3391
+ utils$2.forEach(headers, (_value, _header) => setHeader(_value, _header, _rewrite));
3392
3392
 
3393
- if (utils$1.isPlainObject(header) || header instanceof this.constructor) {
3393
+ if (utils$2.isPlainObject(header) || header instanceof this.constructor) {
3394
3394
  setHeaders(header, valueOrRewrite);
3395
- } else if (utils$1.isString(header) && (header = header.trim()) && !isValidHeaderName(header)) {
3395
+ } else if (utils$2.isString(header) && (header = header.trim()) && !isValidHeaderName(header)) {
3396
3396
  setHeaders(parseHeaders(header), valueOrRewrite);
3397
- } else if (utils$1.isObject(header) && utils$1.isIterable(header)) {
3397
+ } else if (utils$2.isObject(header) && utils$2.isIterable(header)) {
3398
3398
  let obj = {},
3399
3399
  dest,
3400
3400
  key;
3401
3401
  for (const entry of header) {
3402
- if (!utils$1.isArray(entry)) {
3402
+ if (!utils$2.isArray(entry)) {
3403
3403
  throw TypeError('Object iterator must return a key-value pair');
3404
3404
  }
3405
3405
 
3406
3406
  obj[(key = entry[0])] = (dest = obj[key])
3407
- ? utils$1.isArray(dest)
3407
+ ? utils$2.isArray(dest)
3408
3408
  ? [...dest, entry[1]]
3409
3409
  : [dest, entry[1]]
3410
3410
  : entry[1];
@@ -3422,7 +3422,7 @@
3422
3422
  header = normalizeHeader(header);
3423
3423
 
3424
3424
  if (header) {
3425
- const key = utils$1.findKey(this, header);
3425
+ const key = utils$2.findKey(this, header);
3426
3426
 
3427
3427
  if (key) {
3428
3428
  const value = this[key];
@@ -3435,11 +3435,11 @@
3435
3435
  return parseTokens(value);
3436
3436
  }
3437
3437
 
3438
- if (utils$1.isFunction(parser)) {
3438
+ if (utils$2.isFunction(parser)) {
3439
3439
  return parser.call(this, value, key);
3440
3440
  }
3441
3441
 
3442
- if (utils$1.isRegExp(parser)) {
3442
+ if (utils$2.isRegExp(parser)) {
3443
3443
  return parser.exec(value);
3444
3444
  }
3445
3445
 
@@ -3452,7 +3452,7 @@
3452
3452
  header = normalizeHeader(header);
3453
3453
 
3454
3454
  if (header) {
3455
- const key = utils$1.findKey(this, header);
3455
+ const key = utils$2.findKey(this, header);
3456
3456
 
3457
3457
  return !!(
3458
3458
  key &&
@@ -3472,7 +3472,7 @@
3472
3472
  _header = normalizeHeader(_header);
3473
3473
 
3474
3474
  if (_header) {
3475
- const key = utils$1.findKey(self, _header);
3475
+ const key = utils$2.findKey(self, _header);
3476
3476
 
3477
3477
  if (key && (!matcher || matchHeaderValue(self, self[key], key, matcher))) {
3478
3478
  delete self[key];
@@ -3482,7 +3482,7 @@
3482
3482
  }
3483
3483
  }
3484
3484
 
3485
- if (utils$1.isArray(header)) {
3485
+ if (utils$2.isArray(header)) {
3486
3486
  header.forEach(deleteHeader);
3487
3487
  } else {
3488
3488
  deleteHeader(header);
@@ -3511,8 +3511,8 @@
3511
3511
  const self = this;
3512
3512
  const headers = {};
3513
3513
 
3514
- utils$1.forEach(this, (value, header) => {
3515
- const key = utils$1.findKey(headers, header);
3514
+ utils$2.forEach(this, (value, header) => {
3515
+ const key = utils$2.findKey(headers, header);
3516
3516
 
3517
3517
  if (key) {
3518
3518
  self[key] = normalizeValue(value);
@@ -3541,10 +3541,10 @@
3541
3541
  toJSON(asStrings) {
3542
3542
  const obj = Object.create(null);
3543
3543
 
3544
- utils$1.forEach(this, (value, header) => {
3544
+ utils$2.forEach(this, (value, header) => {
3545
3545
  value != null &&
3546
3546
  value !== false &&
3547
- (obj[header] = asStrings && utils$1.isArray(value) ? value.join(', ') : value);
3547
+ (obj[header] = asStrings && utils$2.isArray(value) ? value.join(', ') : value);
3548
3548
  });
3549
3549
 
3550
3550
  return obj;
@@ -3600,7 +3600,7 @@
3600
3600
  }
3601
3601
  }
3602
3602
 
3603
- utils$1.isArray(header) ? header.forEach(defineAccessor) : defineAccessor(header);
3603
+ utils$2.isArray(header) ? header.forEach(defineAccessor) : defineAccessor(header);
3604
3604
 
3605
3605
  return this;
3606
3606
  }
@@ -3616,7 +3616,7 @@
3616
3616
  ]);
3617
3617
 
3618
3618
  // reserved names hotfix
3619
- utils$1.reduceDescriptors(AxiosHeaders$1.prototype, ({ value }, key) => {
3619
+ utils$2.reduceDescriptors(AxiosHeaders$1.prototype, ({ value }, key) => {
3620
3620
  let mapped = key[0].toUpperCase() + key.slice(1); // map `set` => `Set`
3621
3621
  return {
3622
3622
  get: () => value,
@@ -3626,19 +3626,19 @@
3626
3626
  };
3627
3627
  });
3628
3628
 
3629
- utils$1.freezeMethods(AxiosHeaders$1);
3629
+ utils$2.freezeMethods(AxiosHeaders$1);
3630
3630
 
3631
3631
  const REDACTED = '[REDACTED ****]';
3632
3632
 
3633
3633
  function hasOwnOrPrototypeToJSON(source) {
3634
- if (utils$1.hasOwnProp(source, 'toJSON')) {
3634
+ if (utils$2.hasOwnProp(source, 'toJSON')) {
3635
3635
  return true;
3636
3636
  }
3637
3637
 
3638
3638
  let prototype = Object.getPrototypeOf(source);
3639
3639
 
3640
3640
  while (prototype && prototype !== Object.prototype) {
3641
- if (utils$1.hasOwnProp(prototype, 'toJSON')) {
3641
+ if (utils$2.hasOwnProp(prototype, 'toJSON')) {
3642
3642
  return true;
3643
3643
  }
3644
3644
 
@@ -3657,7 +3657,7 @@
3657
3657
 
3658
3658
  const visit = (source) => {
3659
3659
  if (source === null || typeof source !== 'object') return source;
3660
- if (utils$1.isBuffer(source)) return source;
3660
+ if (utils$2.isBuffer(source)) return source;
3661
3661
  if (seen.indexOf(source) !== -1) return undefined;
3662
3662
 
3663
3663
  if (source instanceof AxiosHeaders$1) {
@@ -3667,16 +3667,16 @@
3667
3667
  seen.push(source);
3668
3668
 
3669
3669
  let result;
3670
- if (utils$1.isArray(source)) {
3670
+ if (utils$2.isArray(source)) {
3671
3671
  result = [];
3672
3672
  source.forEach((v, i) => {
3673
3673
  const reducedValue = visit(v);
3674
- if (!utils$1.isUndefined(reducedValue)) {
3674
+ if (!utils$2.isUndefined(reducedValue)) {
3675
3675
  result[i] = reducedValue;
3676
3676
  }
3677
3677
  });
3678
3678
  } else {
3679
- if (!utils$1.isPlainObject(source) && hasOwnOrPrototypeToJSON(source)) {
3679
+ if (!utils$2.isPlainObject(source) && hasOwnOrPrototypeToJSON(source)) {
3680
3680
  seen.pop();
3681
3681
  return source;
3682
3682
  }
@@ -3684,7 +3684,7 @@
3684
3684
  result = Object.create(null);
3685
3685
  for (const [key, value] of Object.entries(source)) {
3686
3686
  const reducedValue = lowerKeys.has(key.toLowerCase()) ? REDACTED : visit(value);
3687
- if (!utils$1.isUndefined(reducedValue)) {
3687
+ if (!utils$2.isUndefined(reducedValue)) {
3688
3688
  result[key] = reducedValue;
3689
3689
  }
3690
3690
  }
@@ -3756,11 +3756,11 @@
3756
3756
  // with REDACTED in the serialized snapshot. Undefined or empty leaves the
3757
3757
  // existing serialization behavior unchanged.
3758
3758
  const config = this.config;
3759
- const redactKeys = config && utils$1.hasOwnProp(config, 'redact') ? config.redact : undefined;
3759
+ const redactKeys = config && utils$2.hasOwnProp(config, 'redact') ? config.redact : undefined;
3760
3760
  const serializedConfig =
3761
- utils$1.isArray(redactKeys) && redactKeys.length > 0
3761
+ utils$2.isArray(redactKeys) && redactKeys.length > 0
3762
3762
  ? redactConfig(config, redactKeys)
3763
- : utils$1.toJSONObject(config);
3763
+ : utils$2.toJSONObject(config);
3764
3764
 
3765
3765
  return {
3766
3766
  // Standard
@@ -3854,7 +3854,7 @@
3854
3854
  * @returns {boolean}
3855
3855
  */
3856
3856
  function isVisitable(thing) {
3857
- return utils$1.isPlainObject(thing) || utils$1.isArray(thing);
3857
+ return utils$2.isPlainObject(thing) || utils$2.isArray(thing);
3858
3858
  }
3859
3859
 
3860
3860
  /**
@@ -3865,7 +3865,7 @@
3865
3865
  * @returns {string} the key without the brackets.
3866
3866
  */
3867
3867
  function removeBrackets(key) {
3868
- return utils$1.endsWith(key, '[]') ? key.slice(0, -2) : key;
3868
+ return utils$2.endsWith(key, '[]') ? key.slice(0, -2) : key;
3869
3869
  }
3870
3870
 
3871
3871
  /**
@@ -3897,10 +3897,10 @@
3897
3897
  * @returns {boolean}
3898
3898
  */
3899
3899
  function isFlatArray(arr) {
3900
- return utils$1.isArray(arr) && !arr.some(isVisitable);
3900
+ return utils$2.isArray(arr) && !arr.some(isVisitable);
3901
3901
  }
3902
3902
 
3903
- const predicates = utils$1.toFlatObject(utils$1, {}, null, function filter(prop) {
3903
+ const predicates = utils$2.toFlatObject(utils$2, {}, null, function filter(prop) {
3904
3904
  return /^is[A-Z]/.test(prop);
3905
3905
  });
3906
3906
 
@@ -3928,7 +3928,7 @@
3928
3928
  * @returns
3929
3929
  */
3930
3930
  function toFormData$1(obj, formData, options) {
3931
- if (!utils$1.isObject(obj)) {
3931
+ if (!utils$2.isObject(obj)) {
3932
3932
  throw new TypeError('target must be an object');
3933
3933
  }
3934
3934
 
@@ -3936,7 +3936,7 @@
3936
3936
  formData = formData || new (FormData$1 || FormData)();
3937
3937
 
3938
3938
  // eslint-disable-next-line no-param-reassign
3939
- options = utils$1.toFlatObject(
3939
+ options = utils$2.toFlatObject(
3940
3940
  options,
3941
3941
  {
3942
3942
  metaTokens: true,
@@ -3946,7 +3946,7 @@
3946
3946
  false,
3947
3947
  function defined(option, source) {
3948
3948
  // eslint-disable-next-line no-eq-null,eqeqeq
3949
- return !utils$1.isUndefined(source[option]);
3949
+ return !utils$2.isUndefined(source[option]);
3950
3950
  }
3951
3951
  );
3952
3952
 
@@ -3957,28 +3957,28 @@
3957
3957
  const indexes = options.indexes;
3958
3958
  const _Blob = options.Blob || (typeof Blob !== 'undefined' && Blob);
3959
3959
  const maxDepth = options.maxDepth === undefined ? 100 : options.maxDepth;
3960
- const useBlob = _Blob && utils$1.isSpecCompliantForm(formData);
3960
+ const useBlob = _Blob && utils$2.isSpecCompliantForm(formData);
3961
3961
 
3962
- if (!utils$1.isFunction(visitor)) {
3962
+ if (!utils$2.isFunction(visitor)) {
3963
3963
  throw new TypeError('visitor must be a function');
3964
3964
  }
3965
3965
 
3966
3966
  function convertValue(value) {
3967
3967
  if (value === null) return '';
3968
3968
 
3969
- if (utils$1.isDate(value)) {
3969
+ if (utils$2.isDate(value)) {
3970
3970
  return value.toISOString();
3971
3971
  }
3972
3972
 
3973
- if (utils$1.isBoolean(value)) {
3973
+ if (utils$2.isBoolean(value)) {
3974
3974
  return value.toString();
3975
3975
  }
3976
3976
 
3977
- if (!useBlob && utils$1.isBlob(value)) {
3977
+ if (!useBlob && utils$2.isBlob(value)) {
3978
3978
  throw new AxiosError$1('Blob is not supported. Use a Buffer instead.');
3979
3979
  }
3980
3980
 
3981
- if (utils$1.isArrayBuffer(value) || utils$1.isTypedArray(value)) {
3981
+ if (utils$2.isArrayBuffer(value) || utils$2.isTypedArray(value)) {
3982
3982
  return useBlob && typeof Blob === 'function' ? new Blob([value]) : Buffer.from(value);
3983
3983
  }
3984
3984
 
@@ -3998,26 +3998,26 @@
3998
3998
  function defaultVisitor(value, key, path) {
3999
3999
  let arr = value;
4000
4000
 
4001
- if (utils$1.isReactNative(formData) && utils$1.isReactNativeBlob(value)) {
4001
+ if (utils$2.isReactNative(formData) && utils$2.isReactNativeBlob(value)) {
4002
4002
  formData.append(renderKey(path, key, dots), convertValue(value));
4003
4003
  return false;
4004
4004
  }
4005
4005
 
4006
4006
  if (value && !path && typeof value === 'object') {
4007
- if (utils$1.endsWith(key, '{}')) {
4007
+ if (utils$2.endsWith(key, '{}')) {
4008
4008
  // eslint-disable-next-line no-param-reassign
4009
4009
  key = metaTokens ? key : key.slice(0, -2);
4010
4010
  // eslint-disable-next-line no-param-reassign
4011
4011
  value = JSON.stringify(value);
4012
4012
  } else if (
4013
- (utils$1.isArray(value) && isFlatArray(value)) ||
4014
- ((utils$1.isFileList(value) || utils$1.endsWith(key, '[]')) && (arr = utils$1.toArray(value)))
4013
+ (utils$2.isArray(value) && isFlatArray(value)) ||
4014
+ ((utils$2.isFileList(value) || utils$2.endsWith(key, '[]')) && (arr = utils$2.toArray(value)))
4015
4015
  ) {
4016
4016
  // eslint-disable-next-line no-param-reassign
4017
4017
  key = removeBrackets(key);
4018
4018
 
4019
4019
  arr.forEach(function each(el, index) {
4020
- !(utils$1.isUndefined(el) || el === null) &&
4020
+ !(utils$2.isUndefined(el) || el === null) &&
4021
4021
  formData.append(
4022
4022
  // eslint-disable-next-line no-nested-ternary
4023
4023
  indexes === true
@@ -4050,7 +4050,7 @@
4050
4050
  });
4051
4051
 
4052
4052
  function build(value, path, depth = 0) {
4053
- if (utils$1.isUndefined(value)) return;
4053
+ if (utils$2.isUndefined(value)) return;
4054
4054
 
4055
4055
  if (depth > maxDepth) {
4056
4056
  throw new AxiosError$1(
@@ -4065,10 +4065,10 @@
4065
4065
 
4066
4066
  stack.push(value);
4067
4067
 
4068
- utils$1.forEach(value, function each(el, key) {
4068
+ utils$2.forEach(value, function each(el, key) {
4069
4069
  const result =
4070
- !(utils$1.isUndefined(el) || el === null) &&
4071
- visitor.call(formData, el, utils$1.isString(key) ? key.trim() : key, path, exposedHelpers);
4070
+ !(utils$2.isUndefined(el) || el === null) &&
4071
+ visitor.call(formData, el, utils$2.isString(key) ? key.trim() : key, path, exposedHelpers);
4072
4072
 
4073
4073
  if (result === true) {
4074
4074
  build(el, path ? path.concat(key) : [key], depth + 1);
@@ -4078,7 +4078,7 @@
4078
4078
  stack.pop();
4079
4079
  }
4080
4080
 
4081
- if (!utils$1.isObject(obj)) {
4081
+ if (!utils$2.isObject(obj)) {
4082
4082
  throw new TypeError('data must be an object');
4083
4083
  }
4084
4084
 
@@ -4175,7 +4175,7 @@
4175
4175
 
4176
4176
  const _encode = (options && options.encode) || encode$1;
4177
4177
 
4178
- const _options = utils$1.isFunction(options)
4178
+ const _options = utils$2.isFunction(options)
4179
4179
  ? {
4180
4180
  serialize: options,
4181
4181
  }
@@ -4188,7 +4188,7 @@
4188
4188
  if (serializeFn) {
4189
4189
  serializedParams = serializeFn(params, _options);
4190
4190
  } else {
4191
- serializedParams = utils$1.isURLSearchParams(params)
4191
+ serializedParams = utils$2.isURLSearchParams(params)
4192
4192
  ? params.toString()
4193
4193
  : new AxiosURLSearchParams(params, _options).toString(_encode);
4194
4194
  }
@@ -4264,7 +4264,7 @@
4264
4264
  * @returns {void}
4265
4265
  */
4266
4266
  forEach(fn) {
4267
- utils$1.forEach(this.handlers, function forEachHandler(h) {
4267
+ utils$2.forEach(this.handlers, function forEachHandler(h) {
4268
4268
  if (h !== null) {
4269
4269
  fn(h);
4270
4270
  }
@@ -6277,7 +6277,7 @@
6277
6277
 
6278
6278
  const origin = (hasBrowserEnv && window.location.href) || 'http://localhost';
6279
6279
 
6280
- var utils = /*#__PURE__*/Object.freeze({
6280
+ var utils$1 = /*#__PURE__*/Object.freeze({
6281
6281
  __proto__: null,
6282
6282
  hasBrowserEnv: hasBrowserEnv,
6283
6283
  hasStandardBrowserEnv: hasStandardBrowserEnv,
@@ -6287,14 +6287,14 @@
6287
6287
  });
6288
6288
 
6289
6289
  var platform = {
6290
- ...utils,
6290
+ ...utils$1,
6291
6291
  ...platform$1,
6292
6292
  };
6293
6293
 
6294
6294
  function toURLEncodedForm(data, options) {
6295
6295
  return toFormData$1(data, new platform.classes.URLSearchParams(), {
6296
6296
  visitor: function (value, key, path, helpers) {
6297
- if (platform.isNode && utils$1.isBuffer(value)) {
6297
+ if (platform.isNode && utils$2.isBuffer(value)) {
6298
6298
  this.append(key, value.toString('base64'));
6299
6299
  return false;
6300
6300
  }
@@ -6317,7 +6317,7 @@
6317
6317
  // foo.x.y.z
6318
6318
  // foo-x-y-z
6319
6319
  // foo x y z
6320
- return utils$1.matchAll(/\w+|\[(\w*)]/g, name).map((match) => {
6320
+ return utils$2.matchAll(/\w+|\[(\w*)]/g, name).map((match) => {
6321
6321
  return match[0] === '[]' ? '' : match[1] || match[0];
6322
6322
  });
6323
6323
  }
@@ -6357,11 +6357,11 @@
6357
6357
 
6358
6358
  const isNumericKey = Number.isFinite(+name);
6359
6359
  const isLast = index >= path.length;
6360
- name = !name && utils$1.isArray(target) ? target.length : name;
6360
+ name = !name && utils$2.isArray(target) ? target.length : name;
6361
6361
 
6362
6362
  if (isLast) {
6363
- if (utils$1.hasOwnProp(target, name)) {
6364
- target[name] = utils$1.isArray(target[name])
6363
+ if (utils$2.hasOwnProp(target, name)) {
6364
+ target[name] = utils$2.isArray(target[name])
6365
6365
  ? target[name].concat(value)
6366
6366
  : [target[name], value];
6367
6367
  } else {
@@ -6371,23 +6371,23 @@
6371
6371
  return !isNumericKey;
6372
6372
  }
6373
6373
 
6374
- if (!utils$1.hasOwnProp(target, name) || !utils$1.isObject(target[name])) {
6374
+ if (!utils$2.hasOwnProp(target, name) || !utils$2.isObject(target[name])) {
6375
6375
  target[name] = [];
6376
6376
  }
6377
6377
 
6378
6378
  const result = buildPath(path, value, target[name], index);
6379
6379
 
6380
- if (result && utils$1.isArray(target[name])) {
6380
+ if (result && utils$2.isArray(target[name])) {
6381
6381
  target[name] = arrayToObject(target[name]);
6382
6382
  }
6383
6383
 
6384
6384
  return !isNumericKey;
6385
6385
  }
6386
6386
 
6387
- if (utils$1.isFormData(formData) && utils$1.isFunction(formData.entries)) {
6387
+ if (utils$2.isFormData(formData) && utils$2.isFunction(formData.entries)) {
6388
6388
  const obj = {};
6389
6389
 
6390
- utils$1.forEachEntry(formData, (name, value) => {
6390
+ utils$2.forEachEntry(formData, (name, value) => {
6391
6391
  buildPath(parsePropPath(name), value, obj, 0);
6392
6392
  });
6393
6393
 
@@ -6397,7 +6397,7 @@
6397
6397
  return null;
6398
6398
  }
6399
6399
 
6400
- const own = (obj, key) => (obj != null && utils$1.hasOwnProp(obj, key) ? obj[key] : undefined);
6400
+ const own = (obj, key) => (obj != null && utils$2.hasOwnProp(obj, key) ? obj[key] : undefined);
6401
6401
 
6402
6402
  /**
6403
6403
  * It takes a string, tries to parse it, and if it fails, it returns the stringified version
@@ -6410,10 +6410,10 @@
6410
6410
  * @returns {string} A stringified version of the rawValue.
6411
6411
  */
6412
6412
  function stringifySafely(rawValue, parser, encoder) {
6413
- if (utils$1.isString(rawValue)) {
6413
+ if (utils$2.isString(rawValue)) {
6414
6414
  try {
6415
6415
  (parser || JSON.parse)(rawValue);
6416
- return utils$1.trim(rawValue);
6416
+ return utils$2.trim(rawValue);
6417
6417
  } catch (e) {
6418
6418
  if (e.name !== 'SyntaxError') {
6419
6419
  throw e;
@@ -6433,32 +6433,32 @@
6433
6433
  function transformRequest(data, headers) {
6434
6434
  const contentType = headers.getContentType() || '';
6435
6435
  const hasJSONContentType = contentType.indexOf('application/json') > -1;
6436
- const isObjectPayload = utils$1.isObject(data);
6436
+ const isObjectPayload = utils$2.isObject(data);
6437
6437
 
6438
- if (isObjectPayload && utils$1.isHTMLForm(data)) {
6438
+ if (isObjectPayload && utils$2.isHTMLForm(data)) {
6439
6439
  data = new FormData(data);
6440
6440
  }
6441
6441
 
6442
- const isFormData = utils$1.isFormData(data);
6442
+ const isFormData = utils$2.isFormData(data);
6443
6443
 
6444
6444
  if (isFormData) {
6445
6445
  return hasJSONContentType ? JSON.stringify(formDataToJSON(data)) : data;
6446
6446
  }
6447
6447
 
6448
6448
  if (
6449
- utils$1.isArrayBuffer(data) ||
6450
- utils$1.isBuffer(data) ||
6451
- utils$1.isStream(data) ||
6452
- utils$1.isFile(data) ||
6453
- utils$1.isBlob(data) ||
6454
- utils$1.isReadableStream(data)
6449
+ utils$2.isArrayBuffer(data) ||
6450
+ utils$2.isBuffer(data) ||
6451
+ utils$2.isStream(data) ||
6452
+ utils$2.isFile(data) ||
6453
+ utils$2.isBlob(data) ||
6454
+ utils$2.isReadableStream(data)
6455
6455
  ) {
6456
6456
  return data;
6457
6457
  }
6458
- if (utils$1.isArrayBufferView(data)) {
6458
+ if (utils$2.isArrayBufferView(data)) {
6459
6459
  return data.buffer;
6460
6460
  }
6461
- if (utils$1.isURLSearchParams(data)) {
6461
+ if (utils$2.isURLSearchParams(data)) {
6462
6462
  headers.setContentType('application/x-www-form-urlencoded;charset=utf-8', false);
6463
6463
  return data.toString();
6464
6464
  }
@@ -6472,7 +6472,7 @@
6472
6472
  }
6473
6473
 
6474
6474
  if (
6475
- (isFileList = utils$1.isFileList(data)) ||
6475
+ (isFileList = utils$2.isFileList(data)) ||
6476
6476
  contentType.indexOf('multipart/form-data') > -1
6477
6477
  ) {
6478
6478
  const env = own(this, 'env');
@@ -6502,13 +6502,13 @@
6502
6502
  const responseType = own(this, 'responseType');
6503
6503
  const JSONRequested = responseType === 'json';
6504
6504
 
6505
- if (utils$1.isResponse(data) || utils$1.isReadableStream(data)) {
6505
+ if (utils$2.isResponse(data) || utils$2.isReadableStream(data)) {
6506
6506
  return data;
6507
6507
  }
6508
6508
 
6509
6509
  if (
6510
6510
  data &&
6511
- utils$1.isString(data) &&
6511
+ utils$2.isString(data) &&
6512
6512
  ((forcedJSONParsing && !responseType) || JSONRequested)
6513
6513
  ) {
6514
6514
  const silentJSONParsing = transitional && transitional.silentJSONParsing;
@@ -6559,7 +6559,7 @@
6559
6559
  },
6560
6560
  };
6561
6561
 
6562
- utils$1.forEach(['delete', 'get', 'head', 'post', 'put', 'patch', 'query'], (method) => {
6562
+ utils$2.forEach(['delete', 'get', 'head', 'post', 'put', 'patch', 'query'], (method) => {
6563
6563
  defaults.headers[method] = {};
6564
6564
  });
6565
6565
 
@@ -6577,7 +6577,7 @@
6577
6577
  const headers = AxiosHeaders$1.from(context.headers);
6578
6578
  let data = context.data;
6579
6579
 
6580
- utils$1.forEach(fns, function transform(fn) {
6580
+ utils$2.forEach(fns, function transform(fn) {
6581
6581
  data = fn.call(config, data, headers.normalize(), response ? response.status : undefined);
6582
6582
  });
6583
6583
 
@@ -21969,7 +21969,7 @@
21969
21969
 
21970
21970
  class AxiosTransformStream extends Stream.Transform {
21971
21971
  constructor(options) {
21972
- options = utils$1.toFlatObject(
21972
+ options = utils$2.toFlatObject(
21973
21973
  options,
21974
21974
  {
21975
21975
  maxRate: 0,
@@ -21981,7 +21981,7 @@
21981
21981
  },
21982
21982
  null,
21983
21983
  (prop, source) => {
21984
- return !utils$1.isUndefined(source[prop]);
21984
+ return !utils$2.isUndefined(source[prop]);
21985
21985
  }
21986
21986
  );
21987
21987
 
@@ -22140,7 +22140,7 @@
22140
22140
  class FormDataPart {
22141
22141
  constructor(name, value) {
22142
22142
  const { escapeName } = this.constructor;
22143
- const isStringValue = utils$1.isString(value);
22143
+ const isStringValue = utils$2.isString(value);
22144
22144
 
22145
22145
  let headers = `Content-Disposition: form-data; name="${escapeName(name)}"${
22146
22146
  !isStringValue && value.name ? `; filename="${escapeName(value.name)}"` : ''
@@ -22168,7 +22168,7 @@
22168
22168
 
22169
22169
  const { value } = this;
22170
22170
 
22171
- if (utils$1.isTypedArray(value)) {
22171
+ if (utils$2.isTypedArray(value)) {
22172
22172
  yield value;
22173
22173
  } else {
22174
22174
  yield* readBlob(value);
@@ -22197,7 +22197,7 @@
22197
22197
  boundary = tag + '-' + platform.generateString(size, BOUNDARY_ALPHABET),
22198
22198
  } = options || {};
22199
22199
 
22200
- if (!utils$1.isFormData(form)) {
22200
+ if (!utils$2.isFormData(form)) {
22201
22201
  throw TypeError('FormData instance required');
22202
22202
  }
22203
22203
 
@@ -22217,7 +22217,7 @@
22217
22217
 
22218
22218
  contentLength += boundaryBytes.byteLength * parts.length;
22219
22219
 
22220
- contentLength = utils$1.toFiniteNumber(contentLength);
22220
+ contentLength = utils$2.toFiniteNumber(contentLength);
22221
22221
 
22222
22222
  const computedHeaders = {
22223
22223
  'Content-Type': `multipart/form-data; boundary=${boundary}`,
@@ -22266,7 +22266,7 @@
22266
22266
  }
22267
22267
 
22268
22268
  const callbackify = (fn, reducer) => {
22269
- return utils$1.isAsyncFn(fn)
22269
+ return utils$2.isAsyncFn(fn)
22270
22270
  ? function (...args) {
22271
22271
  const cb = args.pop();
22272
22272
  fn.apply(this, args).then((value) => {
@@ -22603,7 +22603,7 @@
22603
22603
  const asyncDecorator =
22604
22604
  (fn) =>
22605
22605
  (...args) =>
22606
- utils$1.asap(() => fn(...args));
22606
+ utils$2.asap(() => fn(...args));
22607
22607
 
22608
22608
  /**
22609
22609
  * Estimate decoded byte length of a data:// URL *without* allocating large buffers.
@@ -22716,7 +22716,7 @@
22716
22716
  finishFlush: zlib.constants.BROTLI_OPERATION_FLUSH,
22717
22717
  };
22718
22718
 
22719
- const isBrotliSupported = utils$1.isFunction(zlib.createBrotliDecompress);
22719
+ const isBrotliSupported = utils$2.isFunction(zlib.createBrotliDecompress);
22720
22720
 
22721
22721
  const { http: httpFollow, https: httpsFollow } = followRedirects;
22722
22722
 
@@ -22789,7 +22789,7 @@
22789
22789
  // `my%40email.com:pass` are sent as `my@email.com:pass`. Falls back to the
22790
22790
  // original value for malformed input so a bad encoding never throws.
22791
22791
  const decodeURIComponentSafe = (value) => {
22792
- if (!utils$1.isString(value)) {
22792
+ if (!utils$2.isString(value)) {
22793
22793
  return value;
22794
22794
  }
22795
22795
 
@@ -22975,11 +22975,11 @@
22975
22975
  // redirect proxying to an attacker-controlled host.
22976
22976
  const isProxyURL = proxy instanceof URL;
22977
22977
  const readProxyField = (key) =>
22978
- isProxyURL || utils$1.hasOwnProp(proxy, key) ? proxy[key] : undefined;
22978
+ isProxyURL || utils$2.hasOwnProp(proxy, key) ? proxy[key] : undefined;
22979
22979
 
22980
22980
  const proxyUsername = readProxyField('username');
22981
22981
  const proxyPassword = readProxyField('password');
22982
- let proxyAuth = utils$1.hasOwnProp(proxy, 'auth') ? proxy.auth : undefined;
22982
+ let proxyAuth = utils$2.hasOwnProp(proxy, 'auth') ? proxy.auth : undefined;
22983
22983
 
22984
22984
  // Basic proxy authorization
22985
22985
  if (proxyUsername) {
@@ -22991,9 +22991,9 @@
22991
22991
  // plain object inheriting from polluted Object.prototype cannot leak creds.
22992
22992
  const authIsObject = typeof proxyAuth === 'object';
22993
22993
  const authUsername =
22994
- authIsObject && utils$1.hasOwnProp(proxyAuth, 'username') ? proxyAuth.username : undefined;
22994
+ authIsObject && utils$2.hasOwnProp(proxyAuth, 'username') ? proxyAuth.username : undefined;
22995
22995
  const authPassword =
22996
- authIsObject && utils$1.hasOwnProp(proxyAuth, 'password') ? proxyAuth.password : undefined;
22996
+ authIsObject && utils$2.hasOwnProp(proxyAuth, 'password') ? proxyAuth.password : undefined;
22997
22997
  const validProxyAuth = Boolean(authUsername || authPassword);
22998
22998
 
22999
22999
  if (validProxyAuth) {
@@ -23095,7 +23095,7 @@
23095
23095
  }
23096
23096
 
23097
23097
  const isHttpAdapterSupported =
23098
- typeof browser$1$1 !== 'undefined' && utils$1.kindOf(browser$1$1) === 'process';
23098
+ typeof browser$1$1 !== 'undefined' && utils$2.kindOf(browser$1$1) === 'process';
23099
23099
 
23100
23100
  // temporary hotfix
23101
23101
 
@@ -23125,7 +23125,7 @@
23125
23125
  };
23126
23126
 
23127
23127
  const resolveFamily = ({ address, family }) => {
23128
- if (!utils$1.isString(address)) {
23128
+ if (!utils$2.isString(address)) {
23129
23129
  throw TypeError('address must be a string');
23130
23130
  }
23131
23131
  return {
@@ -23135,7 +23135,7 @@
23135
23135
  };
23136
23136
 
23137
23137
  const buildAddressEntry = (address, family) =>
23138
- resolveFamily(utils$1.isObject(address) ? address : { address, family });
23138
+ resolveFamily(utils$2.isObject(address) ? address : { address, family });
23139
23139
 
23140
23140
  const http2Transport = {
23141
23141
  request(options, cb) {
@@ -23159,7 +23159,7 @@
23159
23159
  [HTTP2_HEADER_PATH]: options.path,
23160
23160
  };
23161
23161
 
23162
- utils$1.forEach(headers, (header, name) => {
23162
+ utils$2.forEach(headers, (header, name) => {
23163
23163
  name.charAt(0) !== ':' && (http2Headers[name] = header);
23164
23164
  });
23165
23165
 
@@ -23189,7 +23189,7 @@
23189
23189
  var httpAdapter = isHttpAdapterSupported &&
23190
23190
  function httpAdapter(config) {
23191
23191
  return wrapAsync(async function dispatchHttpRequest(resolve$1, reject, onDone) {
23192
- const own = (key) => (utils$1.hasOwnProp(config, key) ? config[key] : undefined);
23192
+ const own = (key) => (utils$2.hasOwnProp(config, key) ? config[key] : undefined);
23193
23193
  let data = own('data');
23194
23194
  let lookup = own('lookup');
23195
23195
  let family = own('family');
@@ -23217,7 +23217,7 @@
23217
23217
  const isHttp2 = httpVersion === 2;
23218
23218
 
23219
23219
  if (lookup) {
23220
- const _lookup = callbackify(lookup, (value) => (utils$1.isArray(value) ? value : [value]));
23220
+ const _lookup = callbackify(lookup, (value) => (utils$2.isArray(value) ? value : [value]));
23221
23221
  // hotfix to support opt.all option which is required for node 20.x
23222
23222
  lookup = (hostname, opt, cb) => {
23223
23223
  _lookup(hostname, opt, (err, arg0, arg1) => {
@@ -23225,7 +23225,7 @@
23225
23225
  return cb(err);
23226
23226
  }
23227
23227
 
23228
- const addresses = utils$1.isArray(arg0)
23228
+ const addresses = utils$2.isArray(arg0)
23229
23229
  ? arg0.map((addr) => buildAddressEntry(addr))
23230
23230
  : [buildAddressEntry(arg0, arg1)];
23231
23231
 
@@ -23361,7 +23361,7 @@
23361
23361
  convertedData = convertedData.toString(responseEncoding);
23362
23362
 
23363
23363
  if (!responseEncoding || responseEncoding === 'utf8') {
23364
- convertedData = utils$1.stripBOM(convertedData);
23364
+ convertedData = utils$2.stripBOM(convertedData);
23365
23365
  }
23366
23366
  } else if (responseType === 'stream') {
23367
23367
  convertedData = Stream.Readable.from(convertedData);
@@ -23396,7 +23396,7 @@
23396
23396
  let maxDownloadRate = undefined;
23397
23397
 
23398
23398
  // support for spec compliant FormData objects
23399
- if (utils$1.isSpecCompliantForm(data)) {
23399
+ if (utils$2.isSpecCompliantForm(data)) {
23400
23400
  const userBoundary = headers.getContentType(/boundary=([-_\w\d]{10,70})/i);
23401
23401
 
23402
23402
  data = formDataToStream(
@@ -23411,8 +23411,8 @@
23411
23411
  );
23412
23412
  // support for https://www.npmjs.com/package/form-data api
23413
23413
  } else if (
23414
- utils$1.isFormData(data) &&
23415
- utils$1.isFunction(data.getHeaders) &&
23414
+ utils$2.isFormData(data) &&
23415
+ utils$2.isFunction(data.getHeaders) &&
23416
23416
  data.getHeaders !== Object.prototype.getHeaders
23417
23417
  ) {
23418
23418
  setFormDataHeaders$1(headers, data.getHeaders(), own('formDataHeaderPolicy'));
@@ -23426,14 +23426,14 @@
23426
23426
  /*eslint no-empty:0*/
23427
23427
  } catch (e) {}
23428
23428
  }
23429
- } else if (utils$1.isBlob(data) || utils$1.isFile(data)) {
23429
+ } else if (utils$2.isBlob(data) || utils$2.isFile(data)) {
23430
23430
  data.size && headers.setContentType(data.type || 'application/octet-stream');
23431
23431
  headers.setContentLength(data.size || 0);
23432
23432
  data = Stream.Readable.from(readBlob(data));
23433
- } else if (data && !utils$1.isStream(data)) {
23434
- if (Buffer.isBuffer(data)) ; else if (utils$1.isArrayBuffer(data)) {
23433
+ } else if (data && !utils$2.isStream(data)) {
23434
+ if (Buffer.isBuffer(data)) ; else if (utils$2.isArrayBuffer(data)) {
23435
23435
  data = Buffer.from(new Uint8Array(data));
23436
- } else if (utils$1.isString(data)) {
23436
+ } else if (utils$2.isString(data)) {
23437
23437
  data = Buffer.from(data, 'utf-8');
23438
23438
  } else {
23439
23439
  return reject(
@@ -23459,9 +23459,9 @@
23459
23459
  }
23460
23460
  }
23461
23461
 
23462
- const contentLength = utils$1.toFiniteNumber(headers.getContentLength());
23462
+ const contentLength = utils$2.toFiniteNumber(headers.getContentLength());
23463
23463
 
23464
- if (utils$1.isArray(maxRate)) {
23464
+ if (utils$2.isArray(maxRate)) {
23465
23465
  maxUploadRate = maxRate[0];
23466
23466
  maxDownloadRate = maxRate[1];
23467
23467
  } else {
@@ -23469,7 +23469,7 @@
23469
23469
  }
23470
23470
 
23471
23471
  if (data && (onUploadProgress || maxUploadRate)) {
23472
- if (!utils$1.isStream(data)) {
23472
+ if (!utils$2.isStream(data)) {
23473
23473
  data = Stream.Readable.from(data, { objectMode: false });
23474
23474
  }
23475
23475
 
@@ -23477,10 +23477,10 @@
23477
23477
  [
23478
23478
  data,
23479
23479
  new AxiosTransformStream({
23480
- maxRate: utils$1.toFiniteNumber(maxUploadRate),
23480
+ maxRate: utils$2.toFiniteNumber(maxUploadRate),
23481
23481
  }),
23482
23482
  ],
23483
- utils$1.noop
23483
+ utils$2.noop
23484
23484
  );
23485
23485
 
23486
23486
  onUploadProgress &&
@@ -23551,7 +23551,7 @@
23551
23551
  });
23552
23552
 
23553
23553
  // cacheable-lookup integration hotfix
23554
- !utils$1.isUndefined(lookup) && (options.lookup = lookup);
23554
+ !utils$2.isUndefined(lookup) && (options.lookup = lookup);
23555
23555
 
23556
23556
  if (config.socketPath) {
23557
23557
  if (typeof config.socketPath !== 'string') {
@@ -23645,11 +23645,11 @@
23645
23645
 
23646
23646
  const streams = [res];
23647
23647
 
23648
- const responseLength = utils$1.toFiniteNumber(res.headers['content-length']);
23648
+ const responseLength = utils$2.toFiniteNumber(res.headers['content-length']);
23649
23649
 
23650
23650
  if (onDownloadProgress || maxDownloadRate) {
23651
23651
  const transformStream = new AxiosTransformStream({
23652
- maxRate: utils$1.toFiniteNumber(maxDownloadRate),
23652
+ maxRate: utils$2.toFiniteNumber(maxDownloadRate),
23653
23653
  });
23654
23654
 
23655
23655
  onDownloadProgress &&
@@ -23710,7 +23710,7 @@
23710
23710
  }
23711
23711
  }
23712
23712
 
23713
- responseStream = streams.length > 1 ? Stream.pipeline(streams, utils$1.noop) : streams[0];
23713
+ responseStream = streams.length > 1 ? Stream.pipeline(streams, utils$2.noop) : streams[0];
23714
23714
 
23715
23715
  const response = {
23716
23716
  status: res.statusCode,
@@ -23799,7 +23799,7 @@
23799
23799
  if (responseType !== 'arraybuffer') {
23800
23800
  responseData = responseData.toString(responseEncoding);
23801
23801
  if (!responseEncoding || responseEncoding === 'utf8') {
23802
- responseData = utils$1.stripBOM(responseData);
23802
+ responseData = utils$2.stripBOM(responseData);
23803
23803
  }
23804
23804
  }
23805
23805
  response.data = responseData;
@@ -23918,7 +23918,7 @@
23918
23918
  }
23919
23919
 
23920
23920
  // Send the request
23921
- if (utils$1.isStream(data)) {
23921
+ if (utils$2.isStream(data)) {
23922
23922
  let ended = false;
23923
23923
  let errored = false;
23924
23924
 
@@ -23964,7 +23964,7 @@
23964
23964
  },
23965
23965
  }),
23966
23966
  ],
23967
- utils$1.noop
23967
+ utils$2.noop
23968
23968
  );
23969
23969
  uploadStream.on('error', (err) => {
23970
23970
  if (!req.destroyed) req.destroy(err);
@@ -24002,19 +24002,19 @@
24002
24002
 
24003
24003
  const cookie = [`${name}=${encodeURIComponent(value)}`];
24004
24004
 
24005
- if (utils$1.isNumber(expires)) {
24005
+ if (utils$2.isNumber(expires)) {
24006
24006
  cookie.push(`expires=${new Date(expires).toUTCString()}`);
24007
24007
  }
24008
- if (utils$1.isString(path)) {
24008
+ if (utils$2.isString(path)) {
24009
24009
  cookie.push(`path=${path}`);
24010
24010
  }
24011
- if (utils$1.isString(domain)) {
24011
+ if (utils$2.isString(domain)) {
24012
24012
  cookie.push(`domain=${domain}`);
24013
24013
  }
24014
24014
  if (secure === true) {
24015
24015
  cookie.push('secure');
24016
24016
  }
24017
- if (utils$1.isString(sameSite)) {
24017
+ if (utils$2.isString(sameSite)) {
24018
24018
  cookie.push(`SameSite=${sameSite}`);
24019
24019
  }
24020
24020
 
@@ -24083,45 +24083,45 @@
24083
24083
  });
24084
24084
 
24085
24085
  function getMergedValue(target, source, prop, caseless) {
24086
- if (utils$1.isPlainObject(target) && utils$1.isPlainObject(source)) {
24087
- return utils$1.merge.call({ caseless }, target, source);
24088
- } else if (utils$1.isPlainObject(source)) {
24089
- return utils$1.merge({}, source);
24090
- } else if (utils$1.isArray(source)) {
24086
+ if (utils$2.isPlainObject(target) && utils$2.isPlainObject(source)) {
24087
+ return utils$2.merge.call({ caseless }, target, source);
24088
+ } else if (utils$2.isPlainObject(source)) {
24089
+ return utils$2.merge({}, source);
24090
+ } else if (utils$2.isArray(source)) {
24091
24091
  return source.slice();
24092
24092
  }
24093
24093
  return source;
24094
24094
  }
24095
24095
 
24096
24096
  function mergeDeepProperties(a, b, prop, caseless) {
24097
- if (!utils$1.isUndefined(b)) {
24097
+ if (!utils$2.isUndefined(b)) {
24098
24098
  return getMergedValue(a, b, prop, caseless);
24099
- } else if (!utils$1.isUndefined(a)) {
24099
+ } else if (!utils$2.isUndefined(a)) {
24100
24100
  return getMergedValue(undefined, a, prop, caseless);
24101
24101
  }
24102
24102
  }
24103
24103
 
24104
24104
  // eslint-disable-next-line consistent-return
24105
24105
  function valueFromConfig2(a, b) {
24106
- if (!utils$1.isUndefined(b)) {
24106
+ if (!utils$2.isUndefined(b)) {
24107
24107
  return getMergedValue(undefined, b);
24108
24108
  }
24109
24109
  }
24110
24110
 
24111
24111
  // eslint-disable-next-line consistent-return
24112
24112
  function defaultToConfig2(a, b) {
24113
- if (!utils$1.isUndefined(b)) {
24113
+ if (!utils$2.isUndefined(b)) {
24114
24114
  return getMergedValue(undefined, b);
24115
- } else if (!utils$1.isUndefined(a)) {
24115
+ } else if (!utils$2.isUndefined(a)) {
24116
24116
  return getMergedValue(undefined, a);
24117
24117
  }
24118
24118
  }
24119
24119
 
24120
24120
  // eslint-disable-next-line consistent-return
24121
24121
  function mergeDirectKeys(a, b, prop) {
24122
- if (utils$1.hasOwnProp(config2, prop)) {
24122
+ if (utils$2.hasOwnProp(config2, prop)) {
24123
24123
  return getMergedValue(a, b);
24124
- } else if (utils$1.hasOwnProp(config1, prop)) {
24124
+ } else if (utils$2.hasOwnProp(config1, prop)) {
24125
24125
  return getMergedValue(undefined, a);
24126
24126
  }
24127
24127
  }
@@ -24160,13 +24160,13 @@
24160
24160
  mergeDeepProperties(headersToObject(a), headersToObject(b), prop, true),
24161
24161
  };
24162
24162
 
24163
- utils$1.forEach(Object.keys({ ...config1, ...config2 }), function computeConfigValue(prop) {
24163
+ utils$2.forEach(Object.keys({ ...config1, ...config2 }), function computeConfigValue(prop) {
24164
24164
  if (prop === '__proto__' || prop === 'constructor' || prop === 'prototype') return;
24165
- const merge = utils$1.hasOwnProp(mergeMap, prop) ? mergeMap[prop] : mergeDeepProperties;
24166
- const a = utils$1.hasOwnProp(config1, prop) ? config1[prop] : undefined;
24167
- const b = utils$1.hasOwnProp(config2, prop) ? config2[prop] : undefined;
24165
+ const merge = utils$2.hasOwnProp(mergeMap, prop) ? mergeMap[prop] : mergeDeepProperties;
24166
+ const a = utils$2.hasOwnProp(config1, prop) ? config1[prop] : undefined;
24167
+ const b = utils$2.hasOwnProp(config2, prop) ? config2[prop] : undefined;
24168
24168
  const configValue = merge(a, b, prop);
24169
- (utils$1.isUndefined(configValue) && merge !== mergeDirectKeys) || (config[prop] = configValue);
24169
+ (utils$2.isUndefined(configValue) && merge !== mergeDirectKeys) || (config[prop] = configValue);
24170
24170
  });
24171
24171
 
24172
24172
  return config;
@@ -24205,7 +24205,7 @@
24205
24205
 
24206
24206
  // Read only own properties to prevent prototype pollution gadgets
24207
24207
  // (e.g. Object.prototype.baseURL = 'https://evil.com').
24208
- const own = (key) => (utils$1.hasOwnProp(newConfig, key) ? newConfig[key] : undefined);
24208
+ const own = (key) => (utils$2.hasOwnProp(newConfig, key) ? newConfig[key] : undefined);
24209
24209
 
24210
24210
  const data = own('data');
24211
24211
  let withXSRFToken = own('withXSRFToken');
@@ -24234,10 +24234,10 @@
24234
24234
  );
24235
24235
  }
24236
24236
 
24237
- if (utils$1.isFormData(data)) {
24237
+ if (utils$2.isFormData(data)) {
24238
24238
  if (platform.hasStandardBrowserEnv || platform.hasStandardBrowserWebWorkerEnv) {
24239
24239
  headers.setContentType(undefined); // browser handles it
24240
- } else if (utils$1.isFunction(data.getHeaders)) {
24240
+ } else if (utils$2.isFunction(data.getHeaders)) {
24241
24241
  // Node.js FormData (like form-data package)
24242
24242
  setFormDataHeaders(headers, data.getHeaders(), own('formDataHeaderPolicy'));
24243
24243
  }
@@ -24248,7 +24248,7 @@
24248
24248
  // Specifically not if we're in a web worker, or react-native.
24249
24249
 
24250
24250
  if (platform.hasStandardBrowserEnv) {
24251
- if (utils$1.isFunction(withXSRFToken)) {
24251
+ if (utils$2.isFunction(withXSRFToken)) {
24252
24252
  withXSRFToken = withXSRFToken(newConfig);
24253
24253
  }
24254
24254
 
@@ -24417,13 +24417,13 @@
24417
24417
 
24418
24418
  // Add headers to the request
24419
24419
  if ('setRequestHeader' in request) {
24420
- utils$1.forEach(toByteStringHeaderObject(requestHeaders), function setRequestHeader(val, key) {
24420
+ utils$2.forEach(toByteStringHeaderObject(requestHeaders), function setRequestHeader(val, key) {
24421
24421
  request.setRequestHeader(key, val);
24422
24422
  });
24423
24423
  }
24424
24424
 
24425
24425
  // Add withCredentials to request if needed
24426
- if (!utils$1.isUndefined(_config.withCredentials)) {
24426
+ if (!utils$2.isUndefined(_config.withCredentials)) {
24427
24427
  request.withCredentials = !!_config.withCredentials;
24428
24428
  }
24429
24429
 
@@ -24533,7 +24533,7 @@
24533
24533
 
24534
24534
  const { signal } = controller;
24535
24535
 
24536
- signal.unsubscribe = () => utils$1.asap(unsubscribe);
24536
+ signal.unsubscribe = () => utils$2.asap(unsubscribe);
24537
24537
 
24538
24538
  return signal;
24539
24539
  };
@@ -24630,7 +24630,7 @@
24630
24630
 
24631
24631
  const DEFAULT_CHUNK_SIZE = 64 * 1024;
24632
24632
 
24633
- const { isFunction } = utils$1;
24633
+ const { isFunction } = utils$2;
24634
24634
 
24635
24635
  const test = (fn, ...args) => {
24636
24636
  try {
@@ -24642,12 +24642,12 @@
24642
24642
 
24643
24643
  const factory = (env) => {
24644
24644
  const globalObject =
24645
- utils$1.global !== undefined && utils$1.global !== null
24646
- ? utils$1.global
24645
+ utils$2.global !== undefined && utils$2.global !== null
24646
+ ? utils$2.global
24647
24647
  : globalThis;
24648
24648
  const { ReadableStream, TextEncoder } = globalObject;
24649
24649
 
24650
- env = utils$1.merge.call(
24650
+ env = utils$2.merge.call(
24651
24651
  {
24652
24652
  skipUndefined: true,
24653
24653
  },
@@ -24705,7 +24705,7 @@
24705
24705
  const supportsResponseStream =
24706
24706
  isResponseSupported &&
24707
24707
  isReadableStreamSupported &&
24708
- test(() => utils$1.isReadableStream(new Response('').body));
24708
+ test(() => utils$2.isReadableStream(new Response('').body));
24709
24709
 
24710
24710
  const resolvers = {
24711
24711
  stream: supportsResponseStream && ((res) => res.body),
@@ -24736,11 +24736,11 @@
24736
24736
  return 0;
24737
24737
  }
24738
24738
 
24739
- if (utils$1.isBlob(body)) {
24739
+ if (utils$2.isBlob(body)) {
24740
24740
  return body.size;
24741
24741
  }
24742
24742
 
24743
- if (utils$1.isSpecCompliantForm(body)) {
24743
+ if (utils$2.isSpecCompliantForm(body)) {
24744
24744
  const _request = new Request(platform.origin, {
24745
24745
  method: 'POST',
24746
24746
  body,
@@ -24748,21 +24748,21 @@
24748
24748
  return (await _request.arrayBuffer()).byteLength;
24749
24749
  }
24750
24750
 
24751
- if (utils$1.isArrayBufferView(body) || utils$1.isArrayBuffer(body)) {
24751
+ if (utils$2.isArrayBufferView(body) || utils$2.isArrayBuffer(body)) {
24752
24752
  return body.byteLength;
24753
24753
  }
24754
24754
 
24755
- if (utils$1.isURLSearchParams(body)) {
24755
+ if (utils$2.isURLSearchParams(body)) {
24756
24756
  body = body + '';
24757
24757
  }
24758
24758
 
24759
- if (utils$1.isString(body)) {
24759
+ if (utils$2.isString(body)) {
24760
24760
  return (await encodeText(body)).byteLength;
24761
24761
  }
24762
24762
  };
24763
24763
 
24764
24764
  const resolveBodyLength = async (headers, body) => {
24765
- const length = utils$1.toFiniteNumber(headers.getContentLength());
24765
+ const length = utils$2.toFiniteNumber(headers.getContentLength());
24766
24766
 
24767
24767
  return length == null ? getBodyLength(body) : length;
24768
24768
  };
@@ -24785,8 +24785,8 @@
24785
24785
  maxBodyLength,
24786
24786
  } = resolveConfig(config);
24787
24787
 
24788
- const hasMaxContentLength = utils$1.isNumber(maxContentLength) && maxContentLength > -1;
24789
- const hasMaxBodyLength = utils$1.isNumber(maxBodyLength) && maxBodyLength > -1;
24788
+ const hasMaxContentLength = utils$2.isNumber(maxContentLength) && maxContentLength > -1;
24789
+ const hasMaxBodyLength = utils$2.isNumber(maxBodyLength) && maxBodyLength > -1;
24790
24790
 
24791
24791
  let _fetch = envFetch || fetch;
24792
24792
 
@@ -24859,7 +24859,7 @@
24859
24859
 
24860
24860
  let contentTypeHeader;
24861
24861
 
24862
- if (utils$1.isFormData(data) && (contentTypeHeader = _request.headers.get('content-type'))) {
24862
+ if (utils$2.isFormData(data) && (contentTypeHeader = _request.headers.get('content-type'))) {
24863
24863
  headers.setContentType(contentTypeHeader);
24864
24864
  }
24865
24865
 
@@ -24873,7 +24873,7 @@
24873
24873
  }
24874
24874
  }
24875
24875
 
24876
- if (!utils$1.isString(withCredentials)) {
24876
+ if (!utils$2.isString(withCredentials)) {
24877
24877
  withCredentials = withCredentials ? 'include' : 'omit';
24878
24878
  }
24879
24879
 
@@ -24883,7 +24883,7 @@
24883
24883
 
24884
24884
  // If data is FormData and Content-Type is multipart/form-data without boundary,
24885
24885
  // delete it so fetch can set it correctly with the boundary
24886
- if (utils$1.isFormData(data)) {
24886
+ if (utils$2.isFormData(data)) {
24887
24887
  const contentType = headers.getContentType();
24888
24888
  if (
24889
24889
  contentType &&
@@ -24916,7 +24916,7 @@
24916
24916
  // Cheap pre-check: if the server honestly declares a content-length that
24917
24917
  // already exceeds the cap, reject before we start streaming.
24918
24918
  if (hasMaxContentLength) {
24919
- const declaredLength = utils$1.toFiniteNumber(response.headers.get('content-length'));
24919
+ const declaredLength = utils$2.toFiniteNumber(response.headers.get('content-length'));
24920
24920
  if (declaredLength != null && declaredLength > maxContentLength) {
24921
24921
  throw new AxiosError$1(
24922
24922
  'maxContentLength size of ' + maxContentLength + ' exceeded',
@@ -24941,7 +24941,7 @@
24941
24941
  options[prop] = response[prop];
24942
24942
  });
24943
24943
 
24944
- const responseContentLength = utils$1.toFiniteNumber(response.headers.get('content-length'));
24944
+ const responseContentLength = utils$2.toFiniteNumber(response.headers.get('content-length'));
24945
24945
 
24946
24946
  const [onProgress, flush] =
24947
24947
  (onDownloadProgress &&
@@ -24978,7 +24978,7 @@
24978
24978
 
24979
24979
  responseType = responseType || 'text';
24980
24980
 
24981
- let responseData = await resolvers[utils$1.findKey(resolvers, responseType) || 'text'](
24981
+ let responseData = await resolvers[utils$2.findKey(resolvers, responseType) || 'text'](
24982
24982
  response,
24983
24983
  config
24984
24984
  );
@@ -25101,7 +25101,7 @@
25101
25101
  };
25102
25102
 
25103
25103
  // Assign adapter names for easier debugging and identification
25104
- utils$1.forEach(knownAdapters, (fn, value) => {
25104
+ utils$2.forEach(knownAdapters, (fn, value) => {
25105
25105
  if (fn) {
25106
25106
  try {
25107
25107
  // Null-proto descriptors so a polluted Object.prototype.get cannot turn
@@ -25129,7 +25129,7 @@
25129
25129
  * @returns {boolean}
25130
25130
  */
25131
25131
  const isResolvedHandle = (adapter) =>
25132
- utils$1.isFunction(adapter) || adapter === null || adapter === false;
25132
+ utils$2.isFunction(adapter) || adapter === null || adapter === false;
25133
25133
 
25134
25134
  /**
25135
25135
  * Get the first suitable adapter from the provided list.
@@ -25142,7 +25142,7 @@
25142
25142
  * @returns {Function} The resolved adapter function
25143
25143
  */
25144
25144
  function getAdapter$1(adapters, config) {
25145
- adapters = utils$1.isArray(adapters) ? adapters : [adapters];
25145
+ adapters = utils$2.isArray(adapters) ? adapters : [adapters];
25146
25146
 
25147
25147
  const { length } = adapters;
25148
25148
  let nameOrAdapter;
@@ -25164,7 +25164,7 @@
25164
25164
  }
25165
25165
  }
25166
25166
 
25167
- if (adapter && (utils$1.isFunction(adapter) || (adapter = adapter.get(config)))) {
25167
+ if (adapter && (utils$2.isFunction(adapter) || (adapter = adapter.get(config)))) {
25168
25168
  break;
25169
25169
  }
25170
25170
 
@@ -25496,7 +25496,7 @@
25496
25496
  }
25497
25497
 
25498
25498
  if (paramsSerializer != null) {
25499
- if (utils$1.isFunction(paramsSerializer)) {
25499
+ if (utils$2.isFunction(paramsSerializer)) {
25500
25500
  config.paramsSerializer = {
25501
25501
  serialize: paramsSerializer,
25502
25502
  };
@@ -25532,10 +25532,10 @@
25532
25532
  config.method = (config.method || this.defaults.method || 'get').toLowerCase();
25533
25533
 
25534
25534
  // Flatten headers
25535
- let contextHeaders = headers && utils$1.merge(headers.common, headers[config.method]);
25535
+ let contextHeaders = headers && utils$2.merge(headers.common, headers[config.method]);
25536
25536
 
25537
25537
  headers &&
25538
- utils$1.forEach(['delete', 'get', 'head', 'post', 'put', 'patch', 'query', 'common'], (method) => {
25538
+ utils$2.forEach(['delete', 'get', 'head', 'post', 'put', 'patch', 'query', 'common'], (method) => {
25539
25539
  delete headers[method];
25540
25540
  });
25541
25541
 
@@ -25625,7 +25625,7 @@
25625
25625
  };
25626
25626
 
25627
25627
  // Provide aliases for supported request methods
25628
- utils$1.forEach(['delete', 'get', 'head', 'options'], function forEachMethodNoData(method) {
25628
+ utils$2.forEach(['delete', 'get', 'head', 'options'], function forEachMethodNoData(method) {
25629
25629
  /*eslint func-names:0*/
25630
25630
  Axios$1.prototype[method] = function (url, config) {
25631
25631
  return this.request(
@@ -25638,7 +25638,7 @@
25638
25638
  };
25639
25639
  });
25640
25640
 
25641
- utils$1.forEach(['post', 'put', 'patch', 'query'], function forEachMethodWithData(method) {
25641
+ utils$2.forEach(['post', 'put', 'patch', 'query'], function forEachMethodWithData(method) {
25642
25642
  function generateHTTPMethod(isForm) {
25643
25643
  return function httpMethod(url, data, config) {
25644
25644
  return this.request(
@@ -25830,7 +25830,7 @@
25830
25830
  * @returns {boolean} True if the payload is an error thrown by Axios, otherwise false
25831
25831
  */
25832
25832
  function isAxiosError$1(payload) {
25833
- return utils$1.isObject(payload) && payload.isAxiosError === true;
25833
+ return utils$2.isObject(payload) && payload.isAxiosError === true;
25834
25834
  }
25835
25835
 
25836
25836
  const HttpStatusCode$1 = {
@@ -25921,10 +25921,10 @@
25921
25921
  const instance = bind(Axios$1.prototype.request, context);
25922
25922
 
25923
25923
  // Copy axios.prototype to instance
25924
- utils$1.extend(instance, Axios$1.prototype, context, { allOwnKeys: true });
25924
+ utils$2.extend(instance, Axios$1.prototype, context, { allOwnKeys: true });
25925
25925
 
25926
25926
  // Copy context to instance
25927
- utils$1.extend(instance, context, null, { allOwnKeys: true });
25927
+ utils$2.extend(instance, context, null, { allOwnKeys: true });
25928
25928
 
25929
25929
  // Factory for creating new instances
25930
25930
  instance.create = function create(instanceConfig) {
@@ -25968,7 +25968,7 @@
25968
25968
 
25969
25969
  axios.AxiosHeaders = AxiosHeaders$1;
25970
25970
 
25971
- axios.formToJSON = (thing) => formDataToJSON(utils$1.isHTMLForm(thing) ? new FormData(thing) : thing);
25971
+ axios.formToJSON = (thing) => formDataToJSON(utils$2.isHTMLForm(thing) ? new FormData(thing) : thing);
25972
25972
 
25973
25973
  axios.getAdapter = adapters.getAdapter;
25974
25974
 
@@ -32110,6 +32110,9 @@
32110
32110
  // Reduce any little-endian byte string modulo the subgroup order; the `hash` name reflects the
32111
32111
  // common caller shape, not an input restriction.
32112
32112
  const modL_LE = (hash) => modN(bytesToNumberLE(hash)); // modulo L; but little-endian
32113
+ // Both sync and async SHA-512 slots are exported/configurable; use `callHash(...)` for both so
32114
+ // missing async overrides fail explicitly, then validate the returned digest type/length.
32115
+ const sha512a = (...m) => Promise.resolve(callHash('sha512Async')(concatBytes(...m))).then(checkDigest);
32113
32116
  const sha512s = (...m) => checkDigest(callHash('sha512')(concatBytes(...m)));
32114
32117
  // RFC8032 5.1.5. Split the 64-byte hashed seed into the clamped scalar half and nonce prefix.
32115
32118
  const hash2extK = (hashed) => {
@@ -32127,6 +32130,8 @@
32127
32130
  const pointBytes = point.toBytes(); // point serialized to Uint8Array
32128
32131
  return { head, prefix, scalar, point, pointBytes };
32129
32132
  };
32133
+ // RFC8032 5.1.5; getPublicKey async, sync. Hash priv key and extract point.
32134
+ const getExtendedPublicKeyAsync = (secretKey) => sha512a(abytes(secretKey, L)).then(hash2extK);
32130
32135
  const getExtendedPublicKey = (secretKey) => hash2extK(sha512s(abytes(secretKey, L)));
32131
32136
  /**
32132
32137
  * Creates a 32-byte Ed25519 public key from the RFC 8032 32-byte secret-key seed.
@@ -32298,28 +32303,24 @@
32298
32303
  return abytes(seed, L);
32299
32304
  };
32300
32305
  /**
32301
- * Generates a secret/public keypair.
32302
- * @param seed - Optional 32-byte Ed25519 secret-key seed, returned verbatim as `secretKey`.
32303
- * @returns Keypair with `secretKey` and `publicKey`.
32304
- * @throws If synchronous SHA-512 has not been configured in `hashes`. {@link Error}
32305
- * @throws On wrong argument types. {@link TypeError}
32306
- * @throws On wrong argument ranges or values. {@link RangeError}
32306
+ * Ed25519-specific key utilities.
32307
+ * `utils.getExtendedPublicKey*` expose secret-derived internals (`head`, `prefix`, `scalar`, and
32308
+ * point objects), not just public-key bytes.
32307
32309
  * @example
32308
- * Generate a new keypair through the synchronous API after wiring SHA-512.
32310
+ * Generate a new Ed25519 secret key and derive the matching public key.
32309
32311
  *
32310
32312
  * ```ts
32311
32313
  * import * as ed from '@noble/ed25519';
32312
- * import { sha512 } from '@noble/hashes/sha2.js';
32313
32314
  *
32314
- * ed.hashes.sha512 = sha512;
32315
- * const { secretKey, publicKey } = ed.keygen();
32315
+ * const secretKey = ed.utils.randomSecretKey();
32316
+ * const publicKey = await ed.getPublicKeyAsync(secretKey);
32316
32317
  * ```
32317
32318
  */
32318
- const keygen = (seed) => {
32319
- const secretKey = randomSecretKey(seed);
32320
- const publicKey = getPublicKey(secretKey);
32321
- return { secretKey, publicKey };
32322
- };
32319
+ const utils = /* @__PURE__ */ Object.freeze({
32320
+ getExtendedPublicKeyAsync: getExtendedPublicKeyAsync,
32321
+ getExtendedPublicKey: getExtendedPublicKey,
32322
+ randomSecretKey: randomSecretKey,
32323
+ });
32323
32324
  // ## Precomputes
32324
32325
  // --------------
32325
32326
  const W = 8; // W is window size
@@ -33497,7 +33498,7 @@
33497
33498
  * Create a random `Keypair` object.
33498
33499
  */
33499
33500
  static random() {
33500
- const { secretKey } = keygen();
33501
+ const secretKey = utils.randomSecretKey();
33501
33502
  return this.fromRawEd25519Seed(bufferExports.Buffer.from(secretKey));
33502
33503
  }
33503
33504
  /** Returns this public key as an xdr.AccountId. */
@@ -42113,7 +42114,8 @@
42113
42114
  validUntilLedgerSeq,
42114
42115
  invocation,
42115
42116
  networkPassphrase,
42116
- publicKey = ""
42117
+ publicKey = "",
42118
+ authV2 = false
42117
42119
  } = params;
42118
42120
  const kp = Keypair.random().rawPublicKey();
42119
42121
  const nonce = new types.Int64(bytesToInt64(kp));
@@ -42121,18 +42123,17 @@
42121
42123
  if (!pk) {
42122
42124
  throw new Error(`authorizeInvocation requires publicKey parameter`);
42123
42125
  }
42126
+ const addressCredentials = new types.SorobanAddressCredentials({
42127
+ address: new Address(pk).toScAddress(),
42128
+ nonce,
42129
+ signatureExpirationLedger: 0,
42130
+ // replaced
42131
+ signature: types.ScVal.scvVec([])
42132
+ // replaced
42133
+ });
42124
42134
  const entry = new types.SorobanAuthorizationEntry({
42125
42135
  rootInvocation: invocation,
42126
- credentials: types.SorobanCredentials.sorobanCredentialsAddressV2(
42127
- new types.SorobanAddressCredentials({
42128
- address: new Address(pk).toScAddress(),
42129
- nonce,
42130
- signatureExpirationLedger: 0,
42131
- // replaced
42132
- signature: types.ScVal.scvVec([])
42133
- // replaced
42134
- })
42135
- )
42136
+ credentials: authV2 ? types.SorobanCredentials.sorobanCredentialsAddressV2(addressCredentials) : types.SorobanCredentials.sorobanCredentialsAddress(addressCredentials)
42136
42137
  });
42137
42138
  return authorizeEntry(entry, signer, validUntilLedgerSeq, networkPassphrase);
42138
42139
  }
@@ -43707,7 +43708,7 @@ ${value}`, dataLines++;
43707
43708
  return doc && typeof doc == "object" && "baseURI" in doc && typeof doc.baseURI == "string" ? doc.baseURI : void 0;
43708
43709
  }
43709
43710
 
43710
- const version$1 = "16.0.0-rc.1";
43711
+ const version$1 = "16.0.0-rc.2";
43711
43712
  const SERVER_TIME_MAP = {};
43712
43713
  function toSeconds(ms) {
43713
43714
  return Math.floor(ms / 1e3);
@@ -45634,7 +45635,7 @@ ${value}`, dataLines++;
45634
45635
  Api2.isSimulationRaw = isSimulationRaw;
45635
45636
  })(Api || (Api = {}));
45636
45637
 
45637
- const version = "16.0.0-rc.1";
45638
+ const version = "16.0.0-rc.2";
45638
45639
  function createHttpClient(headers) {
45639
45640
  return create({
45640
45641
  headers: {
@@ -46713,6 +46714,11 @@ ${value}`, dataLines++;
46713
46714
  * auth mode to use for simulation: `enforce` for enforcement mode,
46714
46715
  * `record` for recording mode, or `record_allow_nonroot` for recording
46715
46716
  * mode that allows non-root authorization
46717
+ * @param authV2 - (optional) request `SOROBAN_CREDENTIALS_ADDRESS_V2`
46718
+ * (CAP-71) auth credentials from simulation instead of the legacy
46719
+ * `SOROBAN_CREDENTIALS_ADDRESS`. Defaults to `false`; only enable it for
46720
+ * networks that have activated CAP-71, as V2 credentials are otherwise
46721
+ * rejected.
46716
46722
  *
46717
46723
  * @returns An object with the
46718
46724
  * cost, footprint, result/auth requirements (if applicable), and error of
@@ -46752,12 +46758,12 @@ ${value}`, dataLines++;
46752
46758
  * });
46753
46759
  * ```
46754
46760
  */
46755
- async simulateTransaction(tx, addlResources, authMode) {
46756
- return this._simulateTransaction(tx, addlResources, authMode).then(
46761
+ async simulateTransaction(tx, addlResources, authMode, authV2 = false) {
46762
+ return this._simulateTransaction(tx, addlResources, authMode, authV2).then(
46757
46763
  parseRawSimulation
46758
46764
  );
46759
46765
  }
46760
- async _simulateTransaction(transaction, addlResources, authMode) {
46766
+ async _simulateTransaction(transaction, addlResources, authMode, authV2 = false) {
46761
46767
  return postObject(
46762
46768
  this.httpClient,
46763
46769
  this.serverURL.toString(),
@@ -46769,7 +46775,11 @@ ${value}`, dataLines++;
46769
46775
  resourceConfig: {
46770
46776
  instructionLeeway: addlResources.cpuInstructions
46771
46777
  }
46772
- }
46778
+ },
46779
+ // CAP-71: only request ADDRESS_V2 auth credentials when explicitly
46780
+ // opted in. They are rejected by networks that have not activated
46781
+ // CAP-71, so default to omitting the flag (legacy ADDRESS credentials).
46782
+ ...authV2 && { authV2: true }
46773
46783
  }
46774
46784
  );
46775
46785
  }
@@ -47833,7 +47843,12 @@ All attempts to get the result: ${JSON.stringify(
47833
47843
  restore = restore ?? this.options.restore;
47834
47844
  delete this.simulationResult;
47835
47845
  delete this.simulationTransactionData;
47836
- this.simulation = await this.server.simulateTransaction(this.built);
47846
+ this.simulation = await this.server.simulateTransaction(
47847
+ this.built,
47848
+ void 0,
47849
+ void 0,
47850
+ this.options.authV2
47851
+ );
47837
47852
  if (restore && Api.isSimulationRestore(this.simulation)) {
47838
47853
  const account = await getAccount(this.options, this.server);
47839
47854
  const result = await this.restoreFootprint(
@@ -49784,7 +49799,7 @@ ${indent} */
49784
49799
  build: "tsc"
49785
49800
  },
49786
49801
  dependencies: {
49787
- "@stellar/stellar-sdk": `^${"16.0.0-rc.1"}`,
49802
+ "@stellar/stellar-sdk": `^${"16.0.0-rc.2"}`,
49788
49803
  buffer: "6.0.3"
49789
49804
  },
49790
49805
  devDependencies: {