@bgd-labs/toolbox 0.2.15 → 0.2.17

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/dist/index.mjs CHANGED
@@ -7,7 +7,26 @@ import { createPatch, createTwoFilesPatch, diffChars } from "diff";
7
7
  import { format } from "prettier/standalone";
8
8
  import solidityPlugin from "prettier-plugin-solidity/standalone";
9
9
  import { execSync } from "node:child_process";
10
+ import crypto from "crypto";
11
+ import { Buffer as Buffer$1 } from "node:buffer";
10
12
 
13
+ //#region \0rolldown/runtime.js
14
+ var __defProp = Object.defineProperty;
15
+ var __exportAll = (all, no_symbols) => {
16
+ let target = {};
17
+ for (var name in all) {
18
+ __defProp(target, name, {
19
+ get: all[name],
20
+ enumerable: true
21
+ });
22
+ }
23
+ if (!no_symbols) {
24
+ __defProp(target, Symbol.toStringTag, { value: "Module" });
25
+ }
26
+ return target;
27
+ };
28
+
29
+ //#endregion
11
30
  //#region src/math/binary.ts
12
31
  /**
13
32
  * In solidity it is a quite common practice to encode bit variables in bitmaps opposed to bool structs.
@@ -19453,7 +19472,6 @@ const alchemyNetworkMap = {
19453
19472
  1868: "soneium-mainnet",
19454
19473
  1946: "soneium-minato",
19455
19474
  2020: "ronin-mainnet",
19456
- 2021: "ronin-saigon",
19457
19475
  2201: "stable-testnet",
19458
19476
  2442: "polygonzkevm-cardona",
19459
19477
  2523: "frax-sepolia",
@@ -19513,6 +19531,7 @@ const alchemyNetworkMap = {
19513
19531
  81457: "blast-mainnet",
19514
19532
  84532: "base-sepolia",
19515
19533
  99999: "adi-testnet",
19534
+ 202601: "ronin-saigon",
19516
19535
  421614: "arb-sepolia",
19517
19536
  510525: "clankermon-mainnet",
19518
19537
  534351: "scroll-sepolia",
@@ -19532,9 +19551,7 @@ const alchemyNetworkMap = {
19532
19551
  351243127: "xmtp-ropsten",
19533
19552
  666666666: "degen-mainnet",
19534
19553
  728126428: "tron-mainnet",
19535
- 994873017: "lumia-prism",
19536
19554
  999999999: "zora-sepolia",
19537
- 2030232745: "lumia-beam",
19538
19555
  3448148188: "tron-testnet",
19539
19556
  "null": "sui-testnet"
19540
19557
  };
@@ -19674,6 +19691,7 @@ const tenderlyNetworkMap = {
19674
19691
  9745: "plasma",
19675
19692
  9746: "plasma-testnet",
19676
19693
  10143: "monad-testnet",
19694
+ 10200: "gnosis-chiado-testnet",
19677
19695
  11069: "interval-testnet",
19678
19696
  13371: "immutable",
19679
19697
  13473: "immutable-testnet",
@@ -19761,7 +19779,6 @@ const tenderlyExplorerMap = {
19761
19779
  1946: "soneium-minato",
19762
19780
  1952: "xlayer-testnet",
19763
19781
  2020: "ronin",
19764
- 2021: "ronin-testnet",
19765
19782
  2201: "stable-testnet",
19766
19783
  2391: "tac-spb-testnet",
19767
19784
  2523: "fraxtal-hoodi",
@@ -19780,6 +19797,7 @@ const tenderlyExplorerMap = {
19780
19797
  9746: "plasma-testnet",
19781
19798
  9990: "peaq-agung-testnet",
19782
19799
  10143: "monad-testnet",
19800
+ 10200: "gnosis-chiado-testnet",
19783
19801
  11011: "shape-sepolia",
19784
19802
  11069: "interval-testnet",
19785
19803
  13371: "immutable",
@@ -20845,6 +20863,10 @@ const blockscoutExplorers = {
20845
20863
  api: "https://aiascan.com/api",
20846
20864
  explorer: "https://aiascan.com"
20847
20865
  },
20866
+ 1330: {
20867
+ api: "https://onnscan.com/api",
20868
+ explorer: "https://onnscan.com"
20869
+ },
20848
20870
  1338: {
20849
20871
  api: "https://blockscout.atlantischain.network/api",
20850
20872
  explorer: "https://blockscout.atlantischain.network/"
@@ -34258,7 +34280,6 @@ const hyperRPCSupportedNetworks = [
34258
34280
  1328,
34259
34281
  1329,
34260
34282
  1750,
34261
- 1776,
34262
34283
  1868,
34263
34284
  1923,
34264
34285
  2741,
@@ -34312,6 +34333,7 @@ const hyperRPCSupportedNetworks = [
34312
34333
  531050104,
34313
34334
  1184075182,
34314
34335
  1313161554,
34336
+ 1660990954,
34315
34337
  16666e5
34316
34338
  ];
34317
34339
 
@@ -35249,6 +35271,7 @@ var types_default = {
35249
35271
  "vp": [10],
35250
35272
  "vp_by_strategy": [10],
35251
35273
  "vp_state": [2],
35274
+ "vp_value": [10],
35252
35275
  "__typename": [2]
35253
35276
  },
35254
35277
  "Alias": {
@@ -35362,6 +35385,7 @@ var types_default = {
35362
35385
  "proposalsCount": [3],
35363
35386
  "votesCount": [3],
35364
35387
  "lastVote": [3],
35388
+ "vpValue": [10],
35365
35389
  "__typename": [2]
35366
35390
  },
35367
35391
  "Option": {
@@ -36285,5 +36309,3256 @@ function diffFoundryStorageLayout(layoutBefore, layoutAfter) {
36285
36309
  }
36286
36310
 
36287
36311
  //#endregion
36288
- export { Aip, ChainId, ChainList, EVENT_DB, HALF_RAY, HALF_WAD, HUMAN_READABLE_PAYLOAD_STATE, HUMAN_READABLE_PROPOSAL_STATE, IAToken_ABI, IAaveOracle_ABI, IAaveV3ConfigEngine_ABI, IAccessControl_ABI, IAggregatorInterface_ABI, ICLRatePriceCapAdapter_ABI, ICLSynchronicityPriceAdapterBaseToPeg_ABI, ICLSynchronicityPriceAdapterPegToBase_ABI, ICLSynchronicityPriceAdapter_ABI, ICollector_ABI, IDefaultInterestRateStrategyV2_ABI, IERC1967_ABI, IERC20Metadata_ABI, IERC20_ABI, IEmissionManager_ABI, IGovernance_ABI, IOwnable_ABI, IPausableUpgradeable_ABI, IPayloadsController_ABI, IPendlePriceCapAdapter_ABI, IPoolAddressesProvider_ABI, IPoolConfigurator_ABI, IPool_ABI, IPriceCapAdapterBase_ABI, IPriceCapAdapterStable_ABI, IReserveInterestRateStrategy_ABI, IRewardsController_ABI, ISafe_ABI, IStataTokenFactory_ABI, IStataTokenV2_ABI, IUmbrellaStakeToken_ABI, IUmbrella_ABI, IWithGuardian_ABI, IWrappedTokenGatewayV3_ABI, IncentivizedERC20_ABI, LTV_PRECISION, PayloadState, ProposalState, RAY, SECONDS_PER_YEAR, SelfdestructCheckState, SoltypeType, Umbrella_IRewardsController_ABI, Umbrella_IRewardsDistributor_ABI, VerificationStatus, WAD, WAD_RAY_RATIO, aaveAddressesProvider_IncentivesControllerSlot, addAssetPrice, addAssetSymbol, alchemyNetworkMap, alchemySupportedChainIds, assetIndexesToAsset, assetToBase, bitmapToIndexes, blockscoutExplorers, bytes32ToAddress, calculateAvailableBorrowsMarketReferenceCurrency, calculateCompoundedInterest, calculateHealthFactor, calculateHealthFactorFromBalances, calculateLinearInterest, chainlinkFeeds, checkForSelfdestruct, decodeReserveConfiguration, decodeReserveConfigurationV2, decodeUserConfiguration, diffCode, diffFoundryStorageLayout, enhanceLogs, enhanceStateDiff, erc1967_AdminSlot, erc1967_ImplementationSlot, etherscanExplorers, fetchImmutablePoolAddresses, fetchMutablePoolAddresses, fetchPoolAddresses, findAsset, flashbotsClientExtension, flashbotsOnFetchRequest, formatNumberString, foundry_format, foundry_getStandardJsonInput, foundry_getStorageLayout, genericIndexer, getAlchemyRPC, getBits, getBytesValue, getClient, getCompleteReserveConfiguration, getContractDeploymentBlock, getCurrentDebtBalance, getCurrentLiquidityBalance, getDynamicArraySlot, getExplicitRPC, getExplorer, getGovernance, getHyperRPC, getImplementationSlot, getLogsRecursive, getMarketReferenceCurrencyAndUsdBalance, getMdContractName, getNetworkEnv, getNonFinalizedPayloads, getNonFinalizedProposals, getNormalizedDebt, getNormalizedIncome, getObjectDiff, getPayloadStorageOverrides, getPayloadsController, getPublicRpc, getQuicknodeRpc, getRPCUrl, getReserveConfigurations, getReserveTokens, getSolidityStorageSlotAddress, getSolidityStorageSlotBytes, getSolidityStorageSlotUint, getSourceCode, getTenderlyRpc, getVerificationStatus, hyperRPCSupportedNetworks, isPayloadFinal, isProposalFinal, makePayloadExecutableOnTestClient, makeProposalExecutableOnTestClient, onMevHandler, parseBlockscoutStyleSourceCode, parseEtherscanStyleSourceCode, parseFrontmatterMd, parseLogs, prettifyNumber, priceUpdateDecoder, publicRPCs, quicknodeNetworkMap, rayDiv, rayMul, rayToWad, renderMarkdownStateDiffReport, renderTenderlyReport, routescanExplorers, selfDestructStatusToString, setBits, snapshotClient, tenderlyExplorerMap, tenderlyNetworkMap, tenderly_createVnet, tenderly_deleteVnet, tenderly_getVnet, tenderly_logsToAbiLogs, tenderly_pingExplorer, tenderly_sim, tenderly_simVnet, toAddressLink, toBinaryString, toTxLink, transformTenderlyStateDiff, validateAip, verificationStatusToString, wadDiv, wadToRay };
36312
+ //#region ../../node_modules/.pnpm/multiformats@13.4.2/node_modules/multiformats/dist/src/bytes.js
36313
+ const empty = new Uint8Array(0);
36314
+ function equals$1(aa, bb) {
36315
+ if (aa === bb) return true;
36316
+ if (aa.byteLength !== bb.byteLength) return false;
36317
+ for (let ii = 0; ii < aa.byteLength; ii++) if (aa[ii] !== bb[ii]) return false;
36318
+ return true;
36319
+ }
36320
+ function coerce(o) {
36321
+ if (o instanceof Uint8Array && o.constructor.name === "Uint8Array") return o;
36322
+ if (o instanceof ArrayBuffer) return new Uint8Array(o);
36323
+ if (ArrayBuffer.isView(o)) return new Uint8Array(o.buffer, o.byteOffset, o.byteLength);
36324
+ throw new Error("Unknown type, must be binary type");
36325
+ }
36326
+ function fromString$1(str) {
36327
+ return new TextEncoder().encode(str);
36328
+ }
36329
+ function toString(b) {
36330
+ return new TextDecoder().decode(b);
36331
+ }
36332
+
36333
+ //#endregion
36334
+ //#region ../../node_modules/.pnpm/multiformats@13.4.2/node_modules/multiformats/dist/src/vendor/base-x.js
36335
+ /**
36336
+ * @param {string} ALPHABET
36337
+ * @param {any} name
36338
+ */
36339
+ function base$1(ALPHABET, name) {
36340
+ if (ALPHABET.length >= 255) throw new TypeError("Alphabet too long");
36341
+ var BASE_MAP = new Uint8Array(256);
36342
+ for (var j = 0; j < BASE_MAP.length; j++) BASE_MAP[j] = 255;
36343
+ for (var i = 0; i < ALPHABET.length; i++) {
36344
+ var x = ALPHABET.charAt(i);
36345
+ var xc = x.charCodeAt(0);
36346
+ if (BASE_MAP[xc] !== 255) throw new TypeError(x + " is ambiguous");
36347
+ BASE_MAP[xc] = i;
36348
+ }
36349
+ var BASE = ALPHABET.length;
36350
+ var LEADER = ALPHABET.charAt(0);
36351
+ var FACTOR = Math.log(BASE) / Math.log(256);
36352
+ var iFACTOR = Math.log(256) / Math.log(BASE);
36353
+ /**
36354
+ * @param {any[] | Iterable<number>} source
36355
+ */
36356
+ function encode(source) {
36357
+ if (source instanceof Uint8Array);
36358
+ else if (ArrayBuffer.isView(source)) source = new Uint8Array(source.buffer, source.byteOffset, source.byteLength);
36359
+ else if (Array.isArray(source)) source = Uint8Array.from(source);
36360
+ if (!(source instanceof Uint8Array)) throw new TypeError("Expected Uint8Array");
36361
+ if (source.length === 0) return "";
36362
+ var zeroes = 0;
36363
+ var length = 0;
36364
+ var pbegin = 0;
36365
+ var pend = source.length;
36366
+ while (pbegin !== pend && source[pbegin] === 0) {
36367
+ pbegin++;
36368
+ zeroes++;
36369
+ }
36370
+ var size = (pend - pbegin) * iFACTOR + 1 >>> 0;
36371
+ var b58 = new Uint8Array(size);
36372
+ while (pbegin !== pend) {
36373
+ var carry = source[pbegin];
36374
+ var i = 0;
36375
+ for (var it1 = size - 1; (carry !== 0 || i < length) && it1 !== -1; it1--, i++) {
36376
+ carry += 256 * b58[it1] >>> 0;
36377
+ b58[it1] = carry % BASE >>> 0;
36378
+ carry = carry / BASE >>> 0;
36379
+ }
36380
+ if (carry !== 0) throw new Error("Non-zero carry");
36381
+ length = i;
36382
+ pbegin++;
36383
+ }
36384
+ var it2 = size - length;
36385
+ while (it2 !== size && b58[it2] === 0) it2++;
36386
+ var str = LEADER.repeat(zeroes);
36387
+ for (; it2 < size; ++it2) str += ALPHABET.charAt(b58[it2]);
36388
+ return str;
36389
+ }
36390
+ /**
36391
+ * @param {string | string[]} source
36392
+ */
36393
+ function decodeUnsafe(source) {
36394
+ if (typeof source !== "string") throw new TypeError("Expected String");
36395
+ if (source.length === 0) return new Uint8Array();
36396
+ var psz = 0;
36397
+ if (source[psz] === " ") return;
36398
+ var zeroes = 0;
36399
+ var length = 0;
36400
+ while (source[psz] === LEADER) {
36401
+ zeroes++;
36402
+ psz++;
36403
+ }
36404
+ var size = (source.length - psz) * FACTOR + 1 >>> 0;
36405
+ var b256 = new Uint8Array(size);
36406
+ while (source[psz]) {
36407
+ var carry = BASE_MAP[source.charCodeAt(psz)];
36408
+ if (carry === 255) return;
36409
+ var i = 0;
36410
+ for (var it3 = size - 1; (carry !== 0 || i < length) && it3 !== -1; it3--, i++) {
36411
+ carry += BASE * b256[it3] >>> 0;
36412
+ b256[it3] = carry % 256 >>> 0;
36413
+ carry = carry / 256 >>> 0;
36414
+ }
36415
+ if (carry !== 0) throw new Error("Non-zero carry");
36416
+ length = i;
36417
+ psz++;
36418
+ }
36419
+ if (source[psz] === " ") return;
36420
+ var it4 = size - length;
36421
+ while (it4 !== size && b256[it4] === 0) it4++;
36422
+ var vch = new Uint8Array(zeroes + (size - it4));
36423
+ var j = zeroes;
36424
+ while (it4 !== size) vch[j++] = b256[it4++];
36425
+ return vch;
36426
+ }
36427
+ /**
36428
+ * @param {string | string[]} string
36429
+ */
36430
+ function decode(string) {
36431
+ var buffer = decodeUnsafe(string);
36432
+ if (buffer) return buffer;
36433
+ throw new Error(`Non-${name} character`);
36434
+ }
36435
+ return {
36436
+ encode,
36437
+ decodeUnsafe,
36438
+ decode
36439
+ };
36440
+ }
36441
+ var _brrp__multiformats_scope_baseX = base$1;
36442
+
36443
+ //#endregion
36444
+ //#region ../../node_modules/.pnpm/multiformats@13.4.2/node_modules/multiformats/dist/src/bases/base.js
36445
+ /**
36446
+ * Class represents both BaseEncoder and MultibaseEncoder meaning it
36447
+ * can be used to encode to multibase or base encode without multibase
36448
+ * prefix.
36449
+ */
36450
+ var Encoder = class {
36451
+ name;
36452
+ prefix;
36453
+ baseEncode;
36454
+ constructor(name, prefix, baseEncode) {
36455
+ this.name = name;
36456
+ this.prefix = prefix;
36457
+ this.baseEncode = baseEncode;
36458
+ }
36459
+ encode(bytes) {
36460
+ if (bytes instanceof Uint8Array) return `${this.prefix}${this.baseEncode(bytes)}`;
36461
+ else throw Error("Unknown type, must be binary type");
36462
+ }
36463
+ };
36464
+ /**
36465
+ * Class represents both BaseDecoder and MultibaseDecoder so it could be used
36466
+ * to decode multibases (with matching prefix) or just base decode strings
36467
+ * with corresponding base encoding.
36468
+ */
36469
+ var Decoder = class {
36470
+ name;
36471
+ prefix;
36472
+ baseDecode;
36473
+ prefixCodePoint;
36474
+ constructor(name, prefix, baseDecode) {
36475
+ this.name = name;
36476
+ this.prefix = prefix;
36477
+ const prefixCodePoint = prefix.codePointAt(0);
36478
+ /* c8 ignore next 3 */
36479
+ if (prefixCodePoint === void 0) throw new Error("Invalid prefix character");
36480
+ this.prefixCodePoint = prefixCodePoint;
36481
+ this.baseDecode = baseDecode;
36482
+ }
36483
+ decode(text) {
36484
+ if (typeof text === "string") {
36485
+ if (text.codePointAt(0) !== this.prefixCodePoint) throw Error(`Unable to decode multibase string ${JSON.stringify(text)}, ${this.name} decoder only supports inputs prefixed with ${this.prefix}`);
36486
+ return this.baseDecode(text.slice(this.prefix.length));
36487
+ } else throw Error("Can only multibase decode strings");
36488
+ }
36489
+ or(decoder) {
36490
+ return or(this, decoder);
36491
+ }
36492
+ };
36493
+ var ComposedDecoder = class {
36494
+ decoders;
36495
+ constructor(decoders) {
36496
+ this.decoders = decoders;
36497
+ }
36498
+ or(decoder) {
36499
+ return or(this, decoder);
36500
+ }
36501
+ decode(input) {
36502
+ const prefix = input[0];
36503
+ const decoder = this.decoders[prefix];
36504
+ if (decoder != null) return decoder.decode(input);
36505
+ else throw RangeError(`Unable to decode multibase string ${JSON.stringify(input)}, only inputs prefixed with ${Object.keys(this.decoders)} are supported`);
36506
+ }
36507
+ };
36508
+ function or(left, right) {
36509
+ return new ComposedDecoder({
36510
+ ...left.decoders ?? { [left.prefix]: left },
36511
+ ...right.decoders ?? { [right.prefix]: right }
36512
+ });
36513
+ }
36514
+ var Codec = class {
36515
+ name;
36516
+ prefix;
36517
+ baseEncode;
36518
+ baseDecode;
36519
+ encoder;
36520
+ decoder;
36521
+ constructor(name, prefix, baseEncode, baseDecode) {
36522
+ this.name = name;
36523
+ this.prefix = prefix;
36524
+ this.baseEncode = baseEncode;
36525
+ this.baseDecode = baseDecode;
36526
+ this.encoder = new Encoder(name, prefix, baseEncode);
36527
+ this.decoder = new Decoder(name, prefix, baseDecode);
36528
+ }
36529
+ encode(input) {
36530
+ return this.encoder.encode(input);
36531
+ }
36532
+ decode(input) {
36533
+ return this.decoder.decode(input);
36534
+ }
36535
+ };
36536
+ function from$1({ name, prefix, encode, decode }) {
36537
+ return new Codec(name, prefix, encode, decode);
36538
+ }
36539
+ function baseX({ name, prefix, alphabet }) {
36540
+ const { encode, decode } = _brrp__multiformats_scope_baseX(alphabet, name);
36541
+ return from$1({
36542
+ prefix,
36543
+ name,
36544
+ encode,
36545
+ decode: (text) => coerce(decode(text))
36546
+ });
36547
+ }
36548
+ function decode$4(string, alphabetIdx, bitsPerChar, name) {
36549
+ let end = string.length;
36550
+ while (string[end - 1] === "=") --end;
36551
+ const out = new Uint8Array(end * bitsPerChar / 8 | 0);
36552
+ let bits = 0;
36553
+ let buffer = 0;
36554
+ let written = 0;
36555
+ for (let i = 0; i < end; ++i) {
36556
+ const value = alphabetIdx[string[i]];
36557
+ if (value === void 0) throw new SyntaxError(`Non-${name} character`);
36558
+ buffer = buffer << bitsPerChar | value;
36559
+ bits += bitsPerChar;
36560
+ if (bits >= 8) {
36561
+ bits -= 8;
36562
+ out[written++] = 255 & buffer >> bits;
36563
+ }
36564
+ }
36565
+ if (bits >= bitsPerChar || (255 & buffer << 8 - bits) !== 0) throw new SyntaxError("Unexpected end of data");
36566
+ return out;
36567
+ }
36568
+ function encode$4(data, alphabet, bitsPerChar) {
36569
+ const pad = alphabet[alphabet.length - 1] === "=";
36570
+ const mask = (1 << bitsPerChar) - 1;
36571
+ let out = "";
36572
+ let bits = 0;
36573
+ let buffer = 0;
36574
+ for (let i = 0; i < data.length; ++i) {
36575
+ buffer = buffer << 8 | data[i];
36576
+ bits += 8;
36577
+ while (bits > bitsPerChar) {
36578
+ bits -= bitsPerChar;
36579
+ out += alphabet[mask & buffer >> bits];
36580
+ }
36581
+ }
36582
+ if (bits !== 0) out += alphabet[mask & buffer << bitsPerChar - bits];
36583
+ if (pad) while ((out.length * bitsPerChar & 7) !== 0) out += "=";
36584
+ return out;
36585
+ }
36586
+ function createAlphabetIdx(alphabet) {
36587
+ const alphabetIdx = {};
36588
+ for (let i = 0; i < alphabet.length; ++i) alphabetIdx[alphabet[i]] = i;
36589
+ return alphabetIdx;
36590
+ }
36591
+ /**
36592
+ * RFC4648 Factory
36593
+ */
36594
+ function rfc4648({ name, prefix, bitsPerChar, alphabet }) {
36595
+ const alphabetIdx = createAlphabetIdx(alphabet);
36596
+ return from$1({
36597
+ prefix,
36598
+ name,
36599
+ encode(input) {
36600
+ return encode$4(input, alphabet, bitsPerChar);
36601
+ },
36602
+ decode(input) {
36603
+ return decode$4(input, alphabetIdx, bitsPerChar, name);
36604
+ }
36605
+ });
36606
+ }
36607
+
36608
+ //#endregion
36609
+ //#region ../../node_modules/.pnpm/multiformats@13.4.2/node_modules/multiformats/dist/src/bases/base32.js
36610
+ var base32_exports = /* @__PURE__ */ __exportAll({
36611
+ base32: () => base32,
36612
+ base32hex: () => base32hex,
36613
+ base32hexpad: () => base32hexpad,
36614
+ base32hexpadupper: () => base32hexpadupper,
36615
+ base32hexupper: () => base32hexupper,
36616
+ base32pad: () => base32pad,
36617
+ base32padupper: () => base32padupper,
36618
+ base32upper: () => base32upper,
36619
+ base32z: () => base32z
36620
+ });
36621
+ const base32 = rfc4648({
36622
+ prefix: "b",
36623
+ name: "base32",
36624
+ alphabet: "abcdefghijklmnopqrstuvwxyz234567",
36625
+ bitsPerChar: 5
36626
+ });
36627
+ const base32upper = rfc4648({
36628
+ prefix: "B",
36629
+ name: "base32upper",
36630
+ alphabet: "ABCDEFGHIJKLMNOPQRSTUVWXYZ234567",
36631
+ bitsPerChar: 5
36632
+ });
36633
+ const base32pad = rfc4648({
36634
+ prefix: "c",
36635
+ name: "base32pad",
36636
+ alphabet: "abcdefghijklmnopqrstuvwxyz234567=",
36637
+ bitsPerChar: 5
36638
+ });
36639
+ const base32padupper = rfc4648({
36640
+ prefix: "C",
36641
+ name: "base32padupper",
36642
+ alphabet: "ABCDEFGHIJKLMNOPQRSTUVWXYZ234567=",
36643
+ bitsPerChar: 5
36644
+ });
36645
+ const base32hex = rfc4648({
36646
+ prefix: "v",
36647
+ name: "base32hex",
36648
+ alphabet: "0123456789abcdefghijklmnopqrstuv",
36649
+ bitsPerChar: 5
36650
+ });
36651
+ const base32hexupper = rfc4648({
36652
+ prefix: "V",
36653
+ name: "base32hexupper",
36654
+ alphabet: "0123456789ABCDEFGHIJKLMNOPQRSTUV",
36655
+ bitsPerChar: 5
36656
+ });
36657
+ const base32hexpad = rfc4648({
36658
+ prefix: "t",
36659
+ name: "base32hexpad",
36660
+ alphabet: "0123456789abcdefghijklmnopqrstuv=",
36661
+ bitsPerChar: 5
36662
+ });
36663
+ const base32hexpadupper = rfc4648({
36664
+ prefix: "T",
36665
+ name: "base32hexpadupper",
36666
+ alphabet: "0123456789ABCDEFGHIJKLMNOPQRSTUV=",
36667
+ bitsPerChar: 5
36668
+ });
36669
+ const base32z = rfc4648({
36670
+ prefix: "h",
36671
+ name: "base32z",
36672
+ alphabet: "ybndrfg8ejkmcpqxot1uwisza345h769",
36673
+ bitsPerChar: 5
36674
+ });
36675
+
36676
+ //#endregion
36677
+ //#region ../../node_modules/.pnpm/multiformats@13.4.2/node_modules/multiformats/dist/src/bases/base36.js
36678
+ var base36_exports = /* @__PURE__ */ __exportAll({
36679
+ base36: () => base36,
36680
+ base36upper: () => base36upper
36681
+ });
36682
+ const base36 = baseX({
36683
+ prefix: "k",
36684
+ name: "base36",
36685
+ alphabet: "0123456789abcdefghijklmnopqrstuvwxyz"
36686
+ });
36687
+ const base36upper = baseX({
36688
+ prefix: "K",
36689
+ name: "base36upper",
36690
+ alphabet: "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"
36691
+ });
36692
+
36693
+ //#endregion
36694
+ //#region ../../node_modules/.pnpm/multiformats@13.4.2/node_modules/multiformats/dist/src/bases/base58.js
36695
+ var base58_exports = /* @__PURE__ */ __exportAll({
36696
+ base58btc: () => base58btc,
36697
+ base58flickr: () => base58flickr
36698
+ });
36699
+ const base58btc = baseX({
36700
+ name: "base58btc",
36701
+ prefix: "z",
36702
+ alphabet: "123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz"
36703
+ });
36704
+ const base58flickr = baseX({
36705
+ name: "base58flickr",
36706
+ prefix: "Z",
36707
+ alphabet: "123456789abcdefghijkmnopqrstuvwxyzABCDEFGHJKLMNPQRSTUVWXYZ"
36708
+ });
36709
+
36710
+ //#endregion
36711
+ //#region ../../node_modules/.pnpm/multiformats@13.4.2/node_modules/multiformats/dist/src/vendor/varint.js
36712
+ var encode_1 = encode$3;
36713
+ var MSB$1 = 128, MSBALL = -128, INT = Math.pow(2, 31);
36714
+ /**
36715
+ * @param {number} num
36716
+ * @param {number[]} out
36717
+ * @param {number} offset
36718
+ */
36719
+ function encode$3(num, out, offset) {
36720
+ out = out || [];
36721
+ offset = offset || 0;
36722
+ var oldOffset = offset;
36723
+ while (num >= INT) {
36724
+ out[offset++] = num & 255 | MSB$1;
36725
+ num /= 128;
36726
+ }
36727
+ while (num & MSBALL) {
36728
+ out[offset++] = num & 255 | MSB$1;
36729
+ num >>>= 7;
36730
+ }
36731
+ out[offset] = num | 0;
36732
+ encode$3.bytes = offset - oldOffset + 1;
36733
+ return out;
36734
+ }
36735
+ var decode$3 = read$1;
36736
+ var MSB$1$1 = 128, REST$1 = 127;
36737
+ /**
36738
+ * @param {string | any[]} buf
36739
+ * @param {number} offset
36740
+ */
36741
+ function read$1(buf, offset) {
36742
+ var res = 0, offset = offset || 0, shift = 0, counter = offset, b, l = buf.length;
36743
+ do {
36744
+ if (counter >= l) {
36745
+ read$1.bytes = 0;
36746
+ throw new RangeError("Could not decode varint");
36747
+ }
36748
+ b = buf[counter++];
36749
+ res += shift < 28 ? (b & REST$1) << shift : (b & REST$1) * Math.pow(2, shift);
36750
+ shift += 7;
36751
+ } while (b >= MSB$1$1);
36752
+ read$1.bytes = counter - offset;
36753
+ return res;
36754
+ }
36755
+ var N1$1 = Math.pow(2, 7);
36756
+ var N2$1 = Math.pow(2, 14);
36757
+ var N3$1 = Math.pow(2, 21);
36758
+ var N4$1 = Math.pow(2, 28);
36759
+ var N5$1 = Math.pow(2, 35);
36760
+ var N6$1 = Math.pow(2, 42);
36761
+ var N7$1 = Math.pow(2, 49);
36762
+ var N8 = Math.pow(2, 56);
36763
+ var N9 = Math.pow(2, 63);
36764
+ var length$1 = function(value) {
36765
+ return value < N1$1 ? 1 : value < N2$1 ? 2 : value < N3$1 ? 3 : value < N4$1 ? 4 : value < N5$1 ? 5 : value < N6$1 ? 6 : value < N7$1 ? 7 : value < N8 ? 8 : value < N9 ? 9 : 10;
36766
+ };
36767
+ var _brrp_varint = {
36768
+ encode: encode_1,
36769
+ decode: decode$3,
36770
+ encodingLength: length$1
36771
+ };
36772
+
36773
+ //#endregion
36774
+ //#region ../../node_modules/.pnpm/multiformats@13.4.2/node_modules/multiformats/dist/src/varint.js
36775
+ function decode$2(data, offset = 0) {
36776
+ return [_brrp_varint.decode(data, offset), _brrp_varint.decode.bytes];
36777
+ }
36778
+ function encodeTo(int, target, offset = 0) {
36779
+ _brrp_varint.encode(int, target, offset);
36780
+ return target;
36781
+ }
36782
+ function encodingLength$1(int) {
36783
+ return _brrp_varint.encodingLength(int);
36784
+ }
36785
+
36786
+ //#endregion
36787
+ //#region ../../node_modules/.pnpm/multiformats@13.4.2/node_modules/multiformats/dist/src/hashes/digest.js
36788
+ /**
36789
+ * Creates a multihash digest.
36790
+ */
36791
+ function create(code, digest) {
36792
+ const size = digest.byteLength;
36793
+ const sizeOffset = encodingLength$1(code);
36794
+ const digestOffset = sizeOffset + encodingLength$1(size);
36795
+ const bytes = new Uint8Array(digestOffset + size);
36796
+ encodeTo(code, bytes, 0);
36797
+ encodeTo(size, bytes, sizeOffset);
36798
+ bytes.set(digest, digestOffset);
36799
+ return new Digest(code, size, digest, bytes);
36800
+ }
36801
+ /**
36802
+ * Turns bytes representation of multihash digest into an instance.
36803
+ */
36804
+ function decode$1(multihash) {
36805
+ const bytes = coerce(multihash);
36806
+ const [code, sizeOffset] = decode$2(bytes);
36807
+ const [size, digestOffset] = decode$2(bytes.subarray(sizeOffset));
36808
+ const digest = bytes.subarray(sizeOffset + digestOffset);
36809
+ if (digest.byteLength !== size) throw new Error("Incorrect length");
36810
+ return new Digest(code, size, digest, bytes);
36811
+ }
36812
+ function equals(a, b) {
36813
+ if (a === b) return true;
36814
+ else {
36815
+ const data = b;
36816
+ return a.code === data.code && a.size === data.size && data.bytes instanceof Uint8Array && equals$1(a.bytes, data.bytes);
36817
+ }
36818
+ }
36819
+ /**
36820
+ * Represents a multihash digest which carries information about the
36821
+ * hashing algorithm and an actual hash digest.
36822
+ */
36823
+ var Digest = class {
36824
+ code;
36825
+ size;
36826
+ digest;
36827
+ bytes;
36828
+ /**
36829
+ * Creates a multihash digest.
36830
+ */
36831
+ constructor(code, size, digest, bytes) {
36832
+ this.code = code;
36833
+ this.size = size;
36834
+ this.digest = digest;
36835
+ this.bytes = bytes;
36836
+ }
36837
+ };
36838
+
36839
+ //#endregion
36840
+ //#region ../../node_modules/.pnpm/multiformats@13.4.2/node_modules/multiformats/dist/src/cid.js
36841
+ function format$1(link, base) {
36842
+ const { bytes, version } = link;
36843
+ switch (version) {
36844
+ case 0: return toStringV0(bytes, baseCache(link), base ?? base58btc.encoder);
36845
+ default: return toStringV1(bytes, baseCache(link), base ?? base32.encoder);
36846
+ }
36847
+ }
36848
+ const cache = /* @__PURE__ */ new WeakMap();
36849
+ function baseCache(cid) {
36850
+ const baseCache = cache.get(cid);
36851
+ if (baseCache == null) {
36852
+ const baseCache = /* @__PURE__ */ new Map();
36853
+ cache.set(cid, baseCache);
36854
+ return baseCache;
36855
+ }
36856
+ return baseCache;
36857
+ }
36858
+ var CID = class CID {
36859
+ code;
36860
+ version;
36861
+ multihash;
36862
+ bytes;
36863
+ "/";
36864
+ /**
36865
+ * @param version - Version of the CID
36866
+ * @param code - Code of the codec content is encoded in, see https://github.com/multiformats/multicodec/blob/master/table.csv
36867
+ * @param multihash - (Multi)hash of the of the content.
36868
+ */
36869
+ constructor(version, code, multihash, bytes) {
36870
+ this.code = code;
36871
+ this.version = version;
36872
+ this.multihash = multihash;
36873
+ this.bytes = bytes;
36874
+ this["/"] = bytes;
36875
+ }
36876
+ /**
36877
+ * Signalling `cid.asCID === cid` has been replaced with `cid['/'] === cid.bytes`
36878
+ * please either use `CID.asCID(cid)` or switch to new signalling mechanism
36879
+ *
36880
+ * @deprecated
36881
+ */
36882
+ get asCID() {
36883
+ return this;
36884
+ }
36885
+ get byteOffset() {
36886
+ return this.bytes.byteOffset;
36887
+ }
36888
+ get byteLength() {
36889
+ return this.bytes.byteLength;
36890
+ }
36891
+ toV0() {
36892
+ switch (this.version) {
36893
+ case 0: return this;
36894
+ case 1: {
36895
+ const { code, multihash } = this;
36896
+ if (code !== DAG_PB_CODE) throw new Error("Cannot convert a non dag-pb CID to CIDv0");
36897
+ if (multihash.code !== SHA_256_CODE) throw new Error("Cannot convert non sha2-256 multihash CID to CIDv0");
36898
+ return CID.createV0(multihash);
36899
+ }
36900
+ default: throw Error(`Can not convert CID version ${this.version} to version 0. This is a bug please report`);
36901
+ }
36902
+ }
36903
+ toV1() {
36904
+ switch (this.version) {
36905
+ case 0: {
36906
+ const { code, digest } = this.multihash;
36907
+ const multihash = create(code, digest);
36908
+ return CID.createV1(this.code, multihash);
36909
+ }
36910
+ case 1: return this;
36911
+ default: throw Error(`Can not convert CID version ${this.version} to version 1. This is a bug please report`);
36912
+ }
36913
+ }
36914
+ equals(other) {
36915
+ return CID.equals(this, other);
36916
+ }
36917
+ static equals(self, other) {
36918
+ const unknown = other;
36919
+ return unknown != null && self.code === unknown.code && self.version === unknown.version && equals(self.multihash, unknown.multihash);
36920
+ }
36921
+ toString(base) {
36922
+ return format$1(this, base);
36923
+ }
36924
+ toJSON() {
36925
+ return { "/": format$1(this) };
36926
+ }
36927
+ link() {
36928
+ return this;
36929
+ }
36930
+ [Symbol.toStringTag] = "CID";
36931
+ [Symbol.for("nodejs.util.inspect.custom")]() {
36932
+ return `CID(${this.toString()})`;
36933
+ }
36934
+ /**
36935
+ * Takes any input `value` and returns a `CID` instance if it was
36936
+ * a `CID` otherwise returns `null`. If `value` is instanceof `CID`
36937
+ * it will return value back. If `value` is not instance of this CID
36938
+ * class, but is compatible CID it will return new instance of this
36939
+ * `CID` class. Otherwise returns null.
36940
+ *
36941
+ * This allows two different incompatible versions of CID library to
36942
+ * co-exist and interop as long as binary interface is compatible.
36943
+ */
36944
+ static asCID(input) {
36945
+ if (input == null) return null;
36946
+ const value = input;
36947
+ if (value instanceof CID) return value;
36948
+ else if (value["/"] != null && value["/"] === value.bytes || value.asCID === value) {
36949
+ const { version, code, multihash, bytes } = value;
36950
+ return new CID(version, code, multihash, bytes ?? encodeCID(version, code, multihash.bytes));
36951
+ } else if (value[cidSymbol] === true) {
36952
+ const { version, multihash, code } = value;
36953
+ const digest = decode$1(multihash);
36954
+ return CID.create(version, code, digest);
36955
+ } else return null;
36956
+ }
36957
+ /**
36958
+ * @param version - Version of the CID
36959
+ * @param code - Code of the codec content is encoded in, see https://github.com/multiformats/multicodec/blob/master/table.csv
36960
+ * @param digest - (Multi)hash of the of the content.
36961
+ */
36962
+ static create(version, code, digest) {
36963
+ if (typeof code !== "number") throw new Error("String codecs are no longer supported");
36964
+ if (!(digest.bytes instanceof Uint8Array)) throw new Error("Invalid digest");
36965
+ switch (version) {
36966
+ case 0: if (code !== DAG_PB_CODE) throw new Error(`Version 0 CID must use dag-pb (code: ${DAG_PB_CODE}) block encoding`);
36967
+ else return new CID(version, code, digest, digest.bytes);
36968
+ case 1: return new CID(version, code, digest, encodeCID(version, code, digest.bytes));
36969
+ default: throw new Error("Invalid version");
36970
+ }
36971
+ }
36972
+ /**
36973
+ * Simplified version of `create` for CIDv0.
36974
+ */
36975
+ static createV0(digest) {
36976
+ return CID.create(0, DAG_PB_CODE, digest);
36977
+ }
36978
+ /**
36979
+ * Simplified version of `create` for CIDv1.
36980
+ *
36981
+ * @param code - Content encoding format code.
36982
+ * @param digest - Multihash of the content.
36983
+ */
36984
+ static createV1(code, digest) {
36985
+ return CID.create(1, code, digest);
36986
+ }
36987
+ /**
36988
+ * Decoded a CID from its binary representation. The byte array must contain
36989
+ * only the CID with no additional bytes.
36990
+ *
36991
+ * An error will be thrown if the bytes provided do not contain a valid
36992
+ * binary representation of a CID.
36993
+ */
36994
+ static decode(bytes) {
36995
+ const [cid, remainder] = CID.decodeFirst(bytes);
36996
+ if (remainder.length !== 0) throw new Error("Incorrect length");
36997
+ return cid;
36998
+ }
36999
+ /**
37000
+ * Decoded a CID from its binary representation at the beginning of a byte
37001
+ * array.
37002
+ *
37003
+ * Returns an array with the first element containing the CID and the second
37004
+ * element containing the remainder of the original byte array. The remainder
37005
+ * will be a zero-length byte array if the provided bytes only contained a
37006
+ * binary CID representation.
37007
+ */
37008
+ static decodeFirst(bytes) {
37009
+ const specs = CID.inspectBytes(bytes);
37010
+ const prefixSize = specs.size - specs.multihashSize;
37011
+ const multihashBytes = coerce(bytes.subarray(prefixSize, prefixSize + specs.multihashSize));
37012
+ if (multihashBytes.byteLength !== specs.multihashSize) throw new Error("Incorrect length");
37013
+ const digestBytes = multihashBytes.subarray(specs.multihashSize - specs.digestSize);
37014
+ const digest = new Digest(specs.multihashCode, specs.digestSize, digestBytes, multihashBytes);
37015
+ return [specs.version === 0 ? CID.createV0(digest) : CID.createV1(specs.codec, digest), bytes.subarray(specs.size)];
37016
+ }
37017
+ /**
37018
+ * Inspect the initial bytes of a CID to determine its properties.
37019
+ *
37020
+ * Involves decoding up to 4 varints. Typically this will require only 4 to 6
37021
+ * bytes but for larger multicodec code values and larger multihash digest
37022
+ * lengths these varints can be quite large. It is recommended that at least
37023
+ * 10 bytes be made available in the `initialBytes` argument for a complete
37024
+ * inspection.
37025
+ */
37026
+ static inspectBytes(initialBytes) {
37027
+ let offset = 0;
37028
+ const next = () => {
37029
+ const [i, length] = decode$2(initialBytes.subarray(offset));
37030
+ offset += length;
37031
+ return i;
37032
+ };
37033
+ let version = next();
37034
+ let codec = DAG_PB_CODE;
37035
+ if (version === 18) {
37036
+ version = 0;
37037
+ offset = 0;
37038
+ } else codec = next();
37039
+ if (version !== 0 && version !== 1) throw new RangeError(`Invalid CID version ${version}`);
37040
+ const prefixSize = offset;
37041
+ const multihashCode = next();
37042
+ const digestSize = next();
37043
+ const size = offset + digestSize;
37044
+ const multihashSize = size - prefixSize;
37045
+ return {
37046
+ version,
37047
+ codec,
37048
+ multihashCode,
37049
+ digestSize,
37050
+ multihashSize,
37051
+ size
37052
+ };
37053
+ }
37054
+ /**
37055
+ * Takes cid in a string representation and creates an instance. If `base`
37056
+ * decoder is not provided will use a default from the configuration. It will
37057
+ * throw an error if encoding of the CID is not compatible with supplied (or
37058
+ * a default decoder).
37059
+ */
37060
+ static parse(source, base) {
37061
+ const [prefix, bytes] = parseCIDtoBytes(source, base);
37062
+ const cid = CID.decode(bytes);
37063
+ if (cid.version === 0 && source[0] !== "Q") throw Error("Version 0 CID string must not include multibase prefix");
37064
+ baseCache(cid).set(prefix, source);
37065
+ return cid;
37066
+ }
37067
+ };
37068
+ function parseCIDtoBytes(source, base) {
37069
+ switch (source[0]) {
37070
+ case "Q": {
37071
+ const decoder = base ?? base58btc;
37072
+ return [base58btc.prefix, decoder.decode(`${base58btc.prefix}${source}`)];
37073
+ }
37074
+ case base58btc.prefix: {
37075
+ const decoder = base ?? base58btc;
37076
+ return [base58btc.prefix, decoder.decode(source)];
37077
+ }
37078
+ case base32.prefix: {
37079
+ const decoder = base ?? base32;
37080
+ return [base32.prefix, decoder.decode(source)];
37081
+ }
37082
+ case base36.prefix: {
37083
+ const decoder = base ?? base36;
37084
+ return [base36.prefix, decoder.decode(source)];
37085
+ }
37086
+ default:
37087
+ if (base == null) throw Error("To parse non base32, base36 or base58btc encoded CID multibase decoder must be provided");
37088
+ return [source[0], base.decode(source)];
37089
+ }
37090
+ }
37091
+ function toStringV0(bytes, cache, base) {
37092
+ const { prefix } = base;
37093
+ if (prefix !== base58btc.prefix) throw Error(`Cannot string encode V0 in ${base.name} encoding`);
37094
+ const cid = cache.get(prefix);
37095
+ if (cid == null) {
37096
+ const cid = base.encode(bytes).slice(1);
37097
+ cache.set(prefix, cid);
37098
+ return cid;
37099
+ } else return cid;
37100
+ }
37101
+ function toStringV1(bytes, cache, base) {
37102
+ const { prefix } = base;
37103
+ const cid = cache.get(prefix);
37104
+ if (cid == null) {
37105
+ const cid = base.encode(bytes);
37106
+ cache.set(prefix, cid);
37107
+ return cid;
37108
+ } else return cid;
37109
+ }
37110
+ const DAG_PB_CODE = 112;
37111
+ const SHA_256_CODE = 18;
37112
+ function encodeCID(version, code, multihash) {
37113
+ const codeOffset = encodingLength$1(version);
37114
+ const hashOffset = codeOffset + encodingLength$1(code);
37115
+ const bytes = new Uint8Array(hashOffset + multihash.byteLength);
37116
+ encodeTo(version, bytes, 0);
37117
+ encodeTo(code, bytes, codeOffset);
37118
+ bytes.set(multihash, hashOffset);
37119
+ return bytes;
37120
+ }
37121
+ const cidSymbol = Symbol.for("@ipld/js-cid/CID");
37122
+
37123
+ //#endregion
37124
+ //#region ../../node_modules/.pnpm/multiformats@13.4.2/node_modules/multiformats/dist/src/hashes/hasher.js
37125
+ const DEFAULT_MIN_DIGEST_LENGTH = 20;
37126
+ function from({ name, code, encode, minDigestLength, maxDigestLength }) {
37127
+ return new Hasher(name, code, encode, minDigestLength, maxDigestLength);
37128
+ }
37129
+ /**
37130
+ * Hasher represents a hashing algorithm implementation that produces as
37131
+ * `MultihashDigest`.
37132
+ */
37133
+ var Hasher = class {
37134
+ name;
37135
+ code;
37136
+ encode;
37137
+ minDigestLength;
37138
+ maxDigestLength;
37139
+ constructor(name, code, encode, minDigestLength, maxDigestLength) {
37140
+ this.name = name;
37141
+ this.code = code;
37142
+ this.encode = encode;
37143
+ this.minDigestLength = minDigestLength ?? DEFAULT_MIN_DIGEST_LENGTH;
37144
+ this.maxDigestLength = maxDigestLength;
37145
+ }
37146
+ digest(input, options) {
37147
+ if (options?.truncate != null) {
37148
+ if (options.truncate < this.minDigestLength) throw new Error(`Invalid truncate option, must be greater than or equal to ${this.minDigestLength}`);
37149
+ if (this.maxDigestLength != null && options.truncate > this.maxDigestLength) throw new Error(`Invalid truncate option, must be less than or equal to ${this.maxDigestLength}`);
37150
+ }
37151
+ if (input instanceof Uint8Array) {
37152
+ const result = this.encode(input);
37153
+ if (result instanceof Uint8Array) return createDigest(result, this.code, options?.truncate);
37154
+ return result.then((digest) => createDigest(digest, this.code, options?.truncate));
37155
+ } else throw Error("Unknown type, must be binary type");
37156
+ }
37157
+ };
37158
+ /**
37159
+ * Create a Digest from the passed uint8array and code, optionally truncating it
37160
+ * first.
37161
+ */
37162
+ function createDigest(digest, code, truncate) {
37163
+ if (truncate != null && truncate !== digest.byteLength) {
37164
+ if (truncate > digest.byteLength) throw new Error(`Invalid truncate option, must be less than or equal to ${digest.byteLength}`);
37165
+ digest = digest.subarray(0, truncate);
37166
+ }
37167
+ return create(code, digest);
37168
+ }
37169
+
37170
+ //#endregion
37171
+ //#region ../../node_modules/.pnpm/multiformats@13.4.2/node_modules/multiformats/dist/src/hashes/sha2.js
37172
+ var sha2_exports = /* @__PURE__ */ __exportAll({
37173
+ sha256: () => sha256,
37174
+ sha512: () => sha512
37175
+ });
37176
+ const sha256 = from({
37177
+ name: "sha2-256",
37178
+ code: 18,
37179
+ encode: (input) => coerce(crypto.createHash("sha256").update(input).digest())
37180
+ });
37181
+ const sha512 = from({
37182
+ name: "sha2-512",
37183
+ code: 19,
37184
+ encode: (input) => coerce(crypto.createHash("sha512").update(input).digest())
37185
+ });
37186
+
37187
+ //#endregion
37188
+ //#region ../../node_modules/.pnpm/@ipld+dag-pb@4.1.3/node_modules/@ipld/dag-pb/src/pb-decode.js
37189
+ const textDecoder$1 = new TextDecoder();
37190
+
37191
+ //#endregion
37192
+ //#region ../../node_modules/.pnpm/@ipld+dag-pb@4.1.3/node_modules/@ipld/dag-pb/src/pb-encode.js
37193
+ const textEncoder$2 = new TextEncoder();
37194
+ const maxInt32 = 2 ** 32;
37195
+ const maxUInt32 = 2 ** 31;
37196
+ /**
37197
+ * @typedef {import('./interface.js').RawPBLink} RawPBLink
37198
+ */
37199
+ /**
37200
+ * @typedef {import('./interface.js').RawPBNode} RawPBNode
37201
+ */
37202
+ /**
37203
+ * encodeLink() is passed a slice of the parent byte array that ends where this
37204
+ * link needs to end, so it packs to the right-most part of the passed `bytes`
37205
+ *
37206
+ * @param {RawPBLink} link
37207
+ * @param {Uint8Array} bytes
37208
+ * @returns {number}
37209
+ */
37210
+ function encodeLink(link, bytes) {
37211
+ let i = bytes.length;
37212
+ if (typeof link.Tsize === "number") {
37213
+ if (link.Tsize < 0) throw new Error("Tsize cannot be negative");
37214
+ if (!Number.isSafeInteger(link.Tsize)) throw new Error("Tsize too large for encoding");
37215
+ i = encodeVarint(bytes, i, link.Tsize) - 1;
37216
+ bytes[i] = 24;
37217
+ }
37218
+ if (typeof link.Name === "string") {
37219
+ const nameBytes = textEncoder$2.encode(link.Name);
37220
+ i -= nameBytes.length;
37221
+ bytes.set(nameBytes, i);
37222
+ i = encodeVarint(bytes, i, nameBytes.length) - 1;
37223
+ bytes[i] = 18;
37224
+ }
37225
+ if (link.Hash) {
37226
+ i -= link.Hash.length;
37227
+ bytes.set(link.Hash, i);
37228
+ i = encodeVarint(bytes, i, link.Hash.length) - 1;
37229
+ bytes[i] = 10;
37230
+ }
37231
+ return bytes.length - i;
37232
+ }
37233
+ /**
37234
+ * Encodes a PBNode into a new byte array of precisely the correct size
37235
+ *
37236
+ * @param {RawPBNode} node
37237
+ * @returns {Uint8Array}
37238
+ */
37239
+ function encodeNode(node) {
37240
+ const size = sizeNode(node);
37241
+ const bytes = new Uint8Array(size);
37242
+ let i = size;
37243
+ if (node.Data) {
37244
+ i -= node.Data.length;
37245
+ bytes.set(node.Data, i);
37246
+ i = encodeVarint(bytes, i, node.Data.length) - 1;
37247
+ bytes[i] = 10;
37248
+ }
37249
+ if (node.Links) for (let index = node.Links.length - 1; index >= 0; index--) {
37250
+ const size = encodeLink(node.Links[index], bytes.subarray(0, i));
37251
+ i -= size;
37252
+ i = encodeVarint(bytes, i, size) - 1;
37253
+ bytes[i] = 18;
37254
+ }
37255
+ return bytes;
37256
+ }
37257
+ /**
37258
+ * work out exactly how many bytes this link takes up
37259
+ *
37260
+ * @param {RawPBLink} link
37261
+ * @returns
37262
+ */
37263
+ function sizeLink(link) {
37264
+ let n = 0;
37265
+ if (link.Hash) {
37266
+ const l = link.Hash.length;
37267
+ n += 1 + l + sov(l);
37268
+ }
37269
+ if (typeof link.Name === "string") {
37270
+ const l = textEncoder$2.encode(link.Name).length;
37271
+ n += 1 + l + sov(l);
37272
+ }
37273
+ if (typeof link.Tsize === "number") n += 1 + sov(link.Tsize);
37274
+ return n;
37275
+ }
37276
+ /**
37277
+ * Work out exactly how many bytes this node takes up
37278
+ *
37279
+ * @param {RawPBNode} node
37280
+ * @returns {number}
37281
+ */
37282
+ function sizeNode(node) {
37283
+ let n = 0;
37284
+ if (node.Data) {
37285
+ const l = node.Data.length;
37286
+ n += 1 + l + sov(l);
37287
+ }
37288
+ if (node.Links) for (const link of node.Links) {
37289
+ const l = sizeLink(link);
37290
+ n += 1 + l + sov(l);
37291
+ }
37292
+ return n;
37293
+ }
37294
+ /**
37295
+ * @param {Uint8Array} bytes
37296
+ * @param {number} offset
37297
+ * @param {number} v
37298
+ * @returns {number}
37299
+ */
37300
+ function encodeVarint(bytes, offset, v) {
37301
+ offset -= sov(v);
37302
+ const base = offset;
37303
+ while (v >= maxUInt32) {
37304
+ bytes[offset++] = v & 127 | 128;
37305
+ v /= 128;
37306
+ }
37307
+ while (v >= 128) {
37308
+ bytes[offset++] = v & 127 | 128;
37309
+ v >>>= 7;
37310
+ }
37311
+ bytes[offset] = v;
37312
+ return base;
37313
+ }
37314
+ /**
37315
+ * size of varint
37316
+ *
37317
+ * @param {number} x
37318
+ * @returns {number}
37319
+ */
37320
+ function sov(x) {
37321
+ if (x % 2 === 0) x++;
37322
+ return Math.floor((len64(x) + 6) / 7);
37323
+ }
37324
+ /**
37325
+ * golang math/bits, how many bits does it take to represent this integer?
37326
+ *
37327
+ * @param {number} x
37328
+ * @returns {number}
37329
+ */
37330
+ function len64(x) {
37331
+ let n = 0;
37332
+ if (x >= maxInt32) {
37333
+ x = Math.floor(x / maxInt32);
37334
+ n = 32;
37335
+ }
37336
+ if (x >= 65536) {
37337
+ x >>>= 16;
37338
+ n += 16;
37339
+ }
37340
+ if (x >= 256) {
37341
+ x >>>= 8;
37342
+ n += 8;
37343
+ }
37344
+ return n + len8tab[x];
37345
+ }
37346
+ const len8tab = [
37347
+ 0,
37348
+ 1,
37349
+ 2,
37350
+ 2,
37351
+ 3,
37352
+ 3,
37353
+ 3,
37354
+ 3,
37355
+ 4,
37356
+ 4,
37357
+ 4,
37358
+ 4,
37359
+ 4,
37360
+ 4,
37361
+ 4,
37362
+ 4,
37363
+ 5,
37364
+ 5,
37365
+ 5,
37366
+ 5,
37367
+ 5,
37368
+ 5,
37369
+ 5,
37370
+ 5,
37371
+ 5,
37372
+ 5,
37373
+ 5,
37374
+ 5,
37375
+ 5,
37376
+ 5,
37377
+ 5,
37378
+ 5,
37379
+ 6,
37380
+ 6,
37381
+ 6,
37382
+ 6,
37383
+ 6,
37384
+ 6,
37385
+ 6,
37386
+ 6,
37387
+ 6,
37388
+ 6,
37389
+ 6,
37390
+ 6,
37391
+ 6,
37392
+ 6,
37393
+ 6,
37394
+ 6,
37395
+ 6,
37396
+ 6,
37397
+ 6,
37398
+ 6,
37399
+ 6,
37400
+ 6,
37401
+ 6,
37402
+ 6,
37403
+ 6,
37404
+ 6,
37405
+ 6,
37406
+ 6,
37407
+ 6,
37408
+ 6,
37409
+ 6,
37410
+ 6,
37411
+ 7,
37412
+ 7,
37413
+ 7,
37414
+ 7,
37415
+ 7,
37416
+ 7,
37417
+ 7,
37418
+ 7,
37419
+ 7,
37420
+ 7,
37421
+ 7,
37422
+ 7,
37423
+ 7,
37424
+ 7,
37425
+ 7,
37426
+ 7,
37427
+ 7,
37428
+ 7,
37429
+ 7,
37430
+ 7,
37431
+ 7,
37432
+ 7,
37433
+ 7,
37434
+ 7,
37435
+ 7,
37436
+ 7,
37437
+ 7,
37438
+ 7,
37439
+ 7,
37440
+ 7,
37441
+ 7,
37442
+ 7,
37443
+ 7,
37444
+ 7,
37445
+ 7,
37446
+ 7,
37447
+ 7,
37448
+ 7,
37449
+ 7,
37450
+ 7,
37451
+ 7,
37452
+ 7,
37453
+ 7,
37454
+ 7,
37455
+ 7,
37456
+ 7,
37457
+ 7,
37458
+ 7,
37459
+ 7,
37460
+ 7,
37461
+ 7,
37462
+ 7,
37463
+ 7,
37464
+ 7,
37465
+ 7,
37466
+ 7,
37467
+ 7,
37468
+ 7,
37469
+ 7,
37470
+ 7,
37471
+ 7,
37472
+ 7,
37473
+ 7,
37474
+ 7,
37475
+ 8,
37476
+ 8,
37477
+ 8,
37478
+ 8,
37479
+ 8,
37480
+ 8,
37481
+ 8,
37482
+ 8,
37483
+ 8,
37484
+ 8,
37485
+ 8,
37486
+ 8,
37487
+ 8,
37488
+ 8,
37489
+ 8,
37490
+ 8,
37491
+ 8,
37492
+ 8,
37493
+ 8,
37494
+ 8,
37495
+ 8,
37496
+ 8,
37497
+ 8,
37498
+ 8,
37499
+ 8,
37500
+ 8,
37501
+ 8,
37502
+ 8,
37503
+ 8,
37504
+ 8,
37505
+ 8,
37506
+ 8,
37507
+ 8,
37508
+ 8,
37509
+ 8,
37510
+ 8,
37511
+ 8,
37512
+ 8,
37513
+ 8,
37514
+ 8,
37515
+ 8,
37516
+ 8,
37517
+ 8,
37518
+ 8,
37519
+ 8,
37520
+ 8,
37521
+ 8,
37522
+ 8,
37523
+ 8,
37524
+ 8,
37525
+ 8,
37526
+ 8,
37527
+ 8,
37528
+ 8,
37529
+ 8,
37530
+ 8,
37531
+ 8,
37532
+ 8,
37533
+ 8,
37534
+ 8,
37535
+ 8,
37536
+ 8,
37537
+ 8,
37538
+ 8,
37539
+ 8,
37540
+ 8,
37541
+ 8,
37542
+ 8,
37543
+ 8,
37544
+ 8,
37545
+ 8,
37546
+ 8,
37547
+ 8,
37548
+ 8,
37549
+ 8,
37550
+ 8,
37551
+ 8,
37552
+ 8,
37553
+ 8,
37554
+ 8,
37555
+ 8,
37556
+ 8,
37557
+ 8,
37558
+ 8,
37559
+ 8,
37560
+ 8,
37561
+ 8,
37562
+ 8,
37563
+ 8,
37564
+ 8,
37565
+ 8,
37566
+ 8,
37567
+ 8,
37568
+ 8,
37569
+ 8,
37570
+ 8,
37571
+ 8,
37572
+ 8,
37573
+ 8,
37574
+ 8,
37575
+ 8,
37576
+ 8,
37577
+ 8,
37578
+ 8,
37579
+ 8,
37580
+ 8,
37581
+ 8,
37582
+ 8,
37583
+ 8,
37584
+ 8,
37585
+ 8,
37586
+ 8,
37587
+ 8,
37588
+ 8,
37589
+ 8,
37590
+ 8,
37591
+ 8,
37592
+ 8,
37593
+ 8,
37594
+ 8,
37595
+ 8,
37596
+ 8,
37597
+ 8,
37598
+ 8,
37599
+ 8,
37600
+ 8,
37601
+ 8,
37602
+ 8
37603
+ ];
37604
+
37605
+ //#endregion
37606
+ //#region ../../node_modules/.pnpm/@ipld+dag-pb@4.1.3/node_modules/@ipld/dag-pb/src/util.js
37607
+ /**
37608
+ * @typedef {import('./interface.js').PBLink} PBLink
37609
+ * @typedef {import('./interface.js').PBNode} PBNode
37610
+ */
37611
+ /**
37612
+ * @template T
37613
+ * @typedef {import('multiformats/codecs/interface').ByteView<T>} ByteView
37614
+ */
37615
+ /**
37616
+ * @template T
37617
+ * @typedef {import('multiformats/codecs/interface').ArrayBufferView<T>} ArrayBufferView
37618
+ */
37619
+ const pbNodeProperties = ["Data", "Links"];
37620
+ const pbLinkProperties = [
37621
+ "Hash",
37622
+ "Name",
37623
+ "Tsize"
37624
+ ];
37625
+ const textEncoder$1 = new TextEncoder();
37626
+ /**
37627
+ * @param {PBLink} a
37628
+ * @param {PBLink} b
37629
+ * @returns {number}
37630
+ */
37631
+ function linkComparator(a, b) {
37632
+ if (a === b) return 0;
37633
+ const abuf = a.Name ? textEncoder$1.encode(a.Name) : [];
37634
+ const bbuf = b.Name ? textEncoder$1.encode(b.Name) : [];
37635
+ let x = abuf.length;
37636
+ let y = bbuf.length;
37637
+ for (let i = 0, len = Math.min(x, y); i < len; ++i) if (abuf[i] !== bbuf[i]) {
37638
+ x = abuf[i];
37639
+ y = bbuf[i];
37640
+ break;
37641
+ }
37642
+ return x < y ? -1 : y < x ? 1 : 0;
37643
+ }
37644
+ /**
37645
+ * @param {any} node
37646
+ * @param {string[]} properties
37647
+ * @returns {boolean}
37648
+ */
37649
+ function hasOnlyProperties(node, properties) {
37650
+ return !Object.keys(node).some((p) => !properties.includes(p));
37651
+ }
37652
+ /**
37653
+ * @param {PBNode} node
37654
+ */
37655
+ function validate(node) {
37656
+ if (!node || typeof node !== "object" || Array.isArray(node) || node instanceof Uint8Array || node["/"] && node["/"] === node.bytes) throw new TypeError("Invalid DAG-PB form");
37657
+ if (!hasOnlyProperties(node, pbNodeProperties)) throw new TypeError("Invalid DAG-PB form (extraneous properties)");
37658
+ if (node.Data !== void 0 && !(node.Data instanceof Uint8Array)) throw new TypeError("Invalid DAG-PB form (Data must be bytes)");
37659
+ if (!Array.isArray(node.Links)) throw new TypeError("Invalid DAG-PB form (Links must be a list)");
37660
+ for (let i = 0; i < node.Links.length; i++) {
37661
+ const link = node.Links[i];
37662
+ if (!link || typeof link !== "object" || Array.isArray(link) || link instanceof Uint8Array || link["/"] && link["/"] === link.bytes) throw new TypeError("Invalid DAG-PB form (bad link)");
37663
+ if (!hasOnlyProperties(link, pbLinkProperties)) throw new TypeError("Invalid DAG-PB form (extraneous properties on link)");
37664
+ if (link.Hash === void 0) throw new TypeError("Invalid DAG-PB form (link must have a Hash)");
37665
+ if (link.Hash == null || !link.Hash["/"] || link.Hash["/"] !== link.Hash.bytes) throw new TypeError("Invalid DAG-PB form (link Hash must be a CID)");
37666
+ if (link.Name !== void 0 && typeof link.Name !== "string") throw new TypeError("Invalid DAG-PB form (link Name must be a string)");
37667
+ if (link.Tsize !== void 0) {
37668
+ if (typeof link.Tsize !== "number" || link.Tsize % 1 !== 0) throw new TypeError("Invalid DAG-PB form (link Tsize must be an integer)");
37669
+ if (link.Tsize < 0) throw new TypeError("Invalid DAG-PB form (link Tsize cannot be negative)");
37670
+ }
37671
+ if (i > 0 && linkComparator(link, node.Links[i - 1]) === -1) throw new TypeError("Invalid DAG-PB form (links must be sorted by Name bytes)");
37672
+ }
37673
+ }
37674
+
37675
+ //#endregion
37676
+ //#region ../../node_modules/.pnpm/@ipld+dag-pb@4.1.3/node_modules/@ipld/dag-pb/src/index.js
37677
+ /**
37678
+ * @param {PBNode} node
37679
+ * @returns {ByteView<PBNode>}
37680
+ */
37681
+ function encode$2(node) {
37682
+ validate(node);
37683
+ const pbn = {};
37684
+ if (node.Links) pbn.Links = node.Links.map((l) => {
37685
+ const link = {};
37686
+ if (l.Hash) link.Hash = l.Hash.bytes;
37687
+ if (l.Name !== void 0) link.Name = l.Name;
37688
+ if (l.Tsize !== void 0) link.Tsize = l.Tsize;
37689
+ return link;
37690
+ });
37691
+ if (node.Data) pbn.Data = node.Data;
37692
+ return encodeNode(pbn);
37693
+ }
37694
+
37695
+ //#endregion
37696
+ //#region ../../node_modules/.pnpm/ipfs-unixfs@12.0.0/node_modules/ipfs-unixfs/dist/src/errors.js
37697
+ var InvalidTypeError = class InvalidTypeError extends Error {
37698
+ static name = "InvalidTypeError";
37699
+ static code = "ERR_INVALID_TYPE";
37700
+ name = InvalidTypeError.name;
37701
+ code = InvalidTypeError.code;
37702
+ constructor(message = "Invalid type") {
37703
+ super(message);
37704
+ }
37705
+ };
37706
+ var InvalidUnixFSMessageError = class InvalidUnixFSMessageError extends Error {
37707
+ static name = "InvalidUnixFSMessageError";
37708
+ static code = "ERR_INVALID_MESSAGE";
37709
+ name = InvalidUnixFSMessageError.name;
37710
+ code = InvalidUnixFSMessageError.code;
37711
+ constructor(message = "Invalid message") {
37712
+ super(message);
37713
+ }
37714
+ };
37715
+
37716
+ //#endregion
37717
+ //#region ../../node_modules/.pnpm/uint8arrays@5.1.0/node_modules/uint8arrays/dist/src/util/as-uint8array.node.js
37718
+ /**
37719
+ * To guarantee Uint8Array semantics, convert nodejs Buffers
37720
+ * into vanilla Uint8Arrays
37721
+ */
37722
+ function asUint8Array(buf) {
37723
+ return new Uint8Array(buf.buffer, buf.byteOffset, buf.byteLength);
37724
+ }
37725
+
37726
+ //#endregion
37727
+ //#region ../../node_modules/.pnpm/uint8arrays@5.1.0/node_modules/uint8arrays/dist/src/alloc.node.js
37728
+ /**
37729
+ * Where possible returns a Uint8Array of the requested size that references
37730
+ * uninitialized memory. Only use if you are certain you will immediately
37731
+ * overwrite every value in the returned `Uint8Array`.
37732
+ */
37733
+ function allocUnsafe(size = 0) {
37734
+ return asUint8Array(Buffer$1.allocUnsafe(size));
37735
+ }
37736
+
37737
+ //#endregion
37738
+ //#region ../../node_modules/.pnpm/uint8-varint@2.0.4/node_modules/uint8-varint/dist/src/index.js
37739
+ const N1 = Math.pow(2, 7);
37740
+ const N2 = Math.pow(2, 14);
37741
+ const N3 = Math.pow(2, 21);
37742
+ const N4 = Math.pow(2, 28);
37743
+ const N5 = Math.pow(2, 35);
37744
+ const N6 = Math.pow(2, 42);
37745
+ const N7 = Math.pow(2, 49);
37746
+ /** Most significant bit of a byte */
37747
+ const MSB = 128;
37748
+ /** Rest of the bits in a byte */
37749
+ const REST = 127;
37750
+ function encodingLength(value) {
37751
+ if (value < N1) return 1;
37752
+ if (value < N2) return 2;
37753
+ if (value < N3) return 3;
37754
+ if (value < N4) return 4;
37755
+ if (value < N5) return 5;
37756
+ if (value < N6) return 6;
37757
+ if (value < N7) return 7;
37758
+ if (Number.MAX_SAFE_INTEGER != null && value > Number.MAX_SAFE_INTEGER) throw new RangeError("Could not encode varint");
37759
+ return 8;
37760
+ }
37761
+ function encodeUint8Array(value, buf, offset = 0) {
37762
+ switch (encodingLength(value)) {
37763
+ case 8:
37764
+ buf[offset++] = value & 255 | MSB;
37765
+ value /= 128;
37766
+ case 7:
37767
+ buf[offset++] = value & 255 | MSB;
37768
+ value /= 128;
37769
+ case 6:
37770
+ buf[offset++] = value & 255 | MSB;
37771
+ value /= 128;
37772
+ case 5:
37773
+ buf[offset++] = value & 255 | MSB;
37774
+ value /= 128;
37775
+ case 4:
37776
+ buf[offset++] = value & 255 | MSB;
37777
+ value >>>= 7;
37778
+ case 3:
37779
+ buf[offset++] = value & 255 | MSB;
37780
+ value >>>= 7;
37781
+ case 2:
37782
+ buf[offset++] = value & 255 | MSB;
37783
+ value >>>= 7;
37784
+ case 1:
37785
+ buf[offset++] = value & 255;
37786
+ value >>>= 7;
37787
+ break;
37788
+ default: throw new Error("unreachable");
37789
+ }
37790
+ return buf;
37791
+ }
37792
+ function decodeUint8Array(buf, offset) {
37793
+ let b = buf[offset];
37794
+ let res = 0;
37795
+ res += b & REST;
37796
+ if (b < MSB) return res;
37797
+ b = buf[offset + 1];
37798
+ res += (b & REST) << 7;
37799
+ if (b < MSB) return res;
37800
+ b = buf[offset + 2];
37801
+ res += (b & REST) << 14;
37802
+ if (b < MSB) return res;
37803
+ b = buf[offset + 3];
37804
+ res += (b & REST) << 21;
37805
+ if (b < MSB) return res;
37806
+ b = buf[offset + 4];
37807
+ res += (b & REST) * N4;
37808
+ if (b < MSB) return res;
37809
+ b = buf[offset + 5];
37810
+ res += (b & REST) * N5;
37811
+ if (b < MSB) return res;
37812
+ b = buf[offset + 6];
37813
+ res += (b & REST) * N6;
37814
+ if (b < MSB) return res;
37815
+ b = buf[offset + 7];
37816
+ res += (b & REST) * N7;
37817
+ if (b < MSB) return res;
37818
+ throw new RangeError("Could not decode varint");
37819
+ }
37820
+
37821
+ //#endregion
37822
+ //#region ../../node_modules/.pnpm/protons-runtime@5.5.0/node_modules/protons-runtime/dist/src/utils/float.js
37823
+ const f32 = new Float32Array([-0]);
37824
+ const f8b = new Uint8Array(f32.buffer);
37825
+ /**
37826
+ * Writes a 32 bit float to a buffer using little endian byte order
37827
+ */
37828
+ function writeFloatLE(val, buf, pos) {
37829
+ f32[0] = val;
37830
+ buf[pos] = f8b[0];
37831
+ buf[pos + 1] = f8b[1];
37832
+ buf[pos + 2] = f8b[2];
37833
+ buf[pos + 3] = f8b[3];
37834
+ }
37835
+ /**
37836
+ * Reads a 32 bit float from a buffer using little endian byte order
37837
+ */
37838
+ function readFloatLE(buf, pos) {
37839
+ f8b[0] = buf[pos];
37840
+ f8b[1] = buf[pos + 1];
37841
+ f8b[2] = buf[pos + 2];
37842
+ f8b[3] = buf[pos + 3];
37843
+ return f32[0];
37844
+ }
37845
+ const f64 = new Float64Array([-0]);
37846
+ const d8b = new Uint8Array(f64.buffer);
37847
+ /**
37848
+ * Writes a 64 bit double to a buffer using little endian byte order
37849
+ */
37850
+ function writeDoubleLE(val, buf, pos) {
37851
+ f64[0] = val;
37852
+ buf[pos] = d8b[0];
37853
+ buf[pos + 1] = d8b[1];
37854
+ buf[pos + 2] = d8b[2];
37855
+ buf[pos + 3] = d8b[3];
37856
+ buf[pos + 4] = d8b[4];
37857
+ buf[pos + 5] = d8b[5];
37858
+ buf[pos + 6] = d8b[6];
37859
+ buf[pos + 7] = d8b[7];
37860
+ }
37861
+ /**
37862
+ * Reads a 64 bit double from a buffer using little endian byte order
37863
+ */
37864
+ function readDoubleLE(buf, pos) {
37865
+ d8b[0] = buf[pos];
37866
+ d8b[1] = buf[pos + 1];
37867
+ d8b[2] = buf[pos + 2];
37868
+ d8b[3] = buf[pos + 3];
37869
+ d8b[4] = buf[pos + 4];
37870
+ d8b[5] = buf[pos + 5];
37871
+ d8b[6] = buf[pos + 6];
37872
+ d8b[7] = buf[pos + 7];
37873
+ return f64[0];
37874
+ }
37875
+
37876
+ //#endregion
37877
+ //#region ../../node_modules/.pnpm/protons-runtime@5.5.0/node_modules/protons-runtime/dist/src/utils/longbits.js
37878
+ const MAX_SAFE_NUMBER_INTEGER = BigInt(Number.MAX_SAFE_INTEGER);
37879
+ const MIN_SAFE_NUMBER_INTEGER = BigInt(Number.MIN_SAFE_INTEGER);
37880
+ /**
37881
+ * Constructs new long bits.
37882
+ *
37883
+ * @classdesc Helper class for working with the low and high bits of a 64 bit value.
37884
+ * @memberof util
37885
+ * @function Object() { [native code] }
37886
+ * @param {number} lo - Low 32 bits, unsigned
37887
+ * @param {number} hi - High 32 bits, unsigned
37888
+ */
37889
+ var LongBits = class LongBits {
37890
+ lo;
37891
+ hi;
37892
+ constructor(lo, hi) {
37893
+ /**
37894
+ * Low bits
37895
+ */
37896
+ this.lo = lo | 0;
37897
+ /**
37898
+ * High bits
37899
+ */
37900
+ this.hi = hi | 0;
37901
+ }
37902
+ /**
37903
+ * Converts this long bits to a possibly unsafe JavaScript number
37904
+ */
37905
+ toNumber(unsigned = false) {
37906
+ if (!unsigned && this.hi >>> 31 > 0) {
37907
+ const lo = ~this.lo + 1 >>> 0;
37908
+ let hi = ~this.hi >>> 0;
37909
+ if (lo === 0) hi = hi + 1 >>> 0;
37910
+ return -(lo + hi * 4294967296);
37911
+ }
37912
+ return this.lo + this.hi * 4294967296;
37913
+ }
37914
+ /**
37915
+ * Converts this long bits to a bigint
37916
+ */
37917
+ toBigInt(unsigned = false) {
37918
+ if (unsigned) return BigInt(this.lo >>> 0) + (BigInt(this.hi >>> 0) << 32n);
37919
+ if (this.hi >>> 31 !== 0) {
37920
+ const lo = ~this.lo + 1 >>> 0;
37921
+ let hi = ~this.hi >>> 0;
37922
+ if (lo === 0) hi = hi + 1 >>> 0;
37923
+ return -(BigInt(lo) + (BigInt(hi) << 32n));
37924
+ }
37925
+ return BigInt(this.lo >>> 0) + (BigInt(this.hi >>> 0) << 32n);
37926
+ }
37927
+ /**
37928
+ * Converts this long bits to a string
37929
+ */
37930
+ toString(unsigned = false) {
37931
+ return this.toBigInt(unsigned).toString();
37932
+ }
37933
+ /**
37934
+ * Zig-zag encodes this long bits
37935
+ */
37936
+ zzEncode() {
37937
+ const mask = this.hi >> 31;
37938
+ this.hi = ((this.hi << 1 | this.lo >>> 31) ^ mask) >>> 0;
37939
+ this.lo = (this.lo << 1 ^ mask) >>> 0;
37940
+ return this;
37941
+ }
37942
+ /**
37943
+ * Zig-zag decodes this long bits
37944
+ */
37945
+ zzDecode() {
37946
+ const mask = -(this.lo & 1);
37947
+ this.lo = ((this.lo >>> 1 | this.hi << 31) ^ mask) >>> 0;
37948
+ this.hi = (this.hi >>> 1 ^ mask) >>> 0;
37949
+ return this;
37950
+ }
37951
+ /**
37952
+ * Calculates the length of this longbits when encoded as a varint.
37953
+ */
37954
+ length() {
37955
+ const part0 = this.lo;
37956
+ const part1 = (this.lo >>> 28 | this.hi << 4) >>> 0;
37957
+ const part2 = this.hi >>> 24;
37958
+ return part2 === 0 ? part1 === 0 ? part0 < 16384 ? part0 < 128 ? 1 : 2 : part0 < 2097152 ? 3 : 4 : part1 < 16384 ? part1 < 128 ? 5 : 6 : part1 < 2097152 ? 7 : 8 : part2 < 128 ? 9 : 10;
37959
+ }
37960
+ /**
37961
+ * Constructs new long bits from the specified number
37962
+ */
37963
+ static fromBigInt(value) {
37964
+ if (value === 0n) return zero;
37965
+ if (value < MAX_SAFE_NUMBER_INTEGER && value > MIN_SAFE_NUMBER_INTEGER) return this.fromNumber(Number(value));
37966
+ const negative = value < 0n;
37967
+ if (negative) value = -value;
37968
+ let hi = value >> 32n;
37969
+ let lo = value - (hi << 32n);
37970
+ if (negative) {
37971
+ hi = ~hi | 0n;
37972
+ lo = ~lo | 0n;
37973
+ if (++lo > TWO_32) {
37974
+ lo = 0n;
37975
+ if (++hi > TWO_32) hi = 0n;
37976
+ }
37977
+ }
37978
+ return new LongBits(Number(lo), Number(hi));
37979
+ }
37980
+ /**
37981
+ * Constructs new long bits from the specified number
37982
+ */
37983
+ static fromNumber(value) {
37984
+ if (value === 0) return zero;
37985
+ const sign = value < 0;
37986
+ if (sign) value = -value;
37987
+ let lo = value >>> 0;
37988
+ let hi = (value - lo) / 4294967296 >>> 0;
37989
+ if (sign) {
37990
+ hi = ~hi >>> 0;
37991
+ lo = ~lo >>> 0;
37992
+ if (++lo > 4294967295) {
37993
+ lo = 0;
37994
+ if (++hi > 4294967295) hi = 0;
37995
+ }
37996
+ }
37997
+ return new LongBits(lo, hi);
37998
+ }
37999
+ /**
38000
+ * Constructs new long bits from a number, long or string
38001
+ */
38002
+ static from(value) {
38003
+ if (typeof value === "number") return LongBits.fromNumber(value);
38004
+ if (typeof value === "bigint") return LongBits.fromBigInt(value);
38005
+ if (typeof value === "string") return LongBits.fromBigInt(BigInt(value));
38006
+ return value.low != null || value.high != null ? new LongBits(value.low >>> 0, value.high >>> 0) : zero;
38007
+ }
38008
+ };
38009
+ const zero = new LongBits(0, 0);
38010
+ zero.toBigInt = function() {
38011
+ return 0n;
38012
+ };
38013
+ zero.zzEncode = zero.zzDecode = function() {
38014
+ return this;
38015
+ };
38016
+ zero.length = function() {
38017
+ return 1;
38018
+ };
38019
+ const TWO_32 = 4294967296n;
38020
+
38021
+ //#endregion
38022
+ //#region ../../node_modules/.pnpm/protons-runtime@5.5.0/node_modules/protons-runtime/dist/src/utils/utf8.js
38023
+ /**
38024
+ * Calculates the UTF8 byte length of a string
38025
+ */
38026
+ function length(string) {
38027
+ let len = 0;
38028
+ let c = 0;
38029
+ for (let i = 0; i < string.length; ++i) {
38030
+ c = string.charCodeAt(i);
38031
+ if (c < 128) len += 1;
38032
+ else if (c < 2048) len += 2;
38033
+ else if ((c & 64512) === 55296 && (string.charCodeAt(i + 1) & 64512) === 56320) {
38034
+ ++i;
38035
+ len += 4;
38036
+ } else len += 3;
38037
+ }
38038
+ return len;
38039
+ }
38040
+ /**
38041
+ * Reads UTF8 bytes as a string
38042
+ */
38043
+ function read(buffer, start, end) {
38044
+ if (end - start < 1) return "";
38045
+ let parts;
38046
+ const chunk = [];
38047
+ let i = 0;
38048
+ let t;
38049
+ while (start < end) {
38050
+ t = buffer[start++];
38051
+ if (t < 128) chunk[i++] = t;
38052
+ else if (t > 191 && t < 224) chunk[i++] = (t & 31) << 6 | buffer[start++] & 63;
38053
+ else if (t > 239 && t < 365) {
38054
+ t = ((t & 7) << 18 | (buffer[start++] & 63) << 12 | (buffer[start++] & 63) << 6 | buffer[start++] & 63) - 65536;
38055
+ chunk[i++] = 55296 + (t >> 10);
38056
+ chunk[i++] = 56320 + (t & 1023);
38057
+ } else chunk[i++] = (t & 15) << 12 | (buffer[start++] & 63) << 6 | buffer[start++] & 63;
38058
+ if (i > 8191) {
38059
+ (parts ?? (parts = [])).push(String.fromCharCode.apply(String, chunk));
38060
+ i = 0;
38061
+ }
38062
+ }
38063
+ if (parts != null) {
38064
+ if (i > 0) parts.push(String.fromCharCode.apply(String, chunk.slice(0, i)));
38065
+ return parts.join("");
38066
+ }
38067
+ return String.fromCharCode.apply(String, chunk.slice(0, i));
38068
+ }
38069
+ /**
38070
+ * Writes a string as UTF8 bytes
38071
+ */
38072
+ function write(string, buffer, offset) {
38073
+ const start = offset;
38074
+ let c1;
38075
+ let c2;
38076
+ for (let i = 0; i < string.length; ++i) {
38077
+ c1 = string.charCodeAt(i);
38078
+ if (c1 < 128) buffer[offset++] = c1;
38079
+ else if (c1 < 2048) {
38080
+ buffer[offset++] = c1 >> 6 | 192;
38081
+ buffer[offset++] = c1 & 63 | 128;
38082
+ } else if ((c1 & 64512) === 55296 && ((c2 = string.charCodeAt(i + 1)) & 64512) === 56320) {
38083
+ c1 = 65536 + ((c1 & 1023) << 10) + (c2 & 1023);
38084
+ ++i;
38085
+ buffer[offset++] = c1 >> 18 | 240;
38086
+ buffer[offset++] = c1 >> 12 & 63 | 128;
38087
+ buffer[offset++] = c1 >> 6 & 63 | 128;
38088
+ buffer[offset++] = c1 & 63 | 128;
38089
+ } else {
38090
+ buffer[offset++] = c1 >> 12 | 224;
38091
+ buffer[offset++] = c1 >> 6 & 63 | 128;
38092
+ buffer[offset++] = c1 & 63 | 128;
38093
+ }
38094
+ }
38095
+ return offset - start;
38096
+ }
38097
+
38098
+ //#endregion
38099
+ //#region ../../node_modules/.pnpm/protons-runtime@5.5.0/node_modules/protons-runtime/dist/src/utils/reader.js
38100
+ /* istanbul ignore next */
38101
+ function indexOutOfRange(reader, writeLength) {
38102
+ return RangeError(`index out of range: ${reader.pos} + ${writeLength ?? 1} > ${reader.len}`);
38103
+ }
38104
+ function readFixed32End(buf, end) {
38105
+ return (buf[end - 4] | buf[end - 3] << 8 | buf[end - 2] << 16 | buf[end - 1] << 24) >>> 0;
38106
+ }
38107
+ /**
38108
+ * Constructs a new reader instance using the specified buffer.
38109
+ */
38110
+ var Uint8ArrayReader = class {
38111
+ buf;
38112
+ pos;
38113
+ len;
38114
+ _slice = Uint8Array.prototype.subarray;
38115
+ constructor(buffer) {
38116
+ /**
38117
+ * Read buffer
38118
+ */
38119
+ this.buf = buffer;
38120
+ /**
38121
+ * Read buffer position
38122
+ */
38123
+ this.pos = 0;
38124
+ /**
38125
+ * Read buffer length
38126
+ */
38127
+ this.len = buffer.length;
38128
+ }
38129
+ /**
38130
+ * Reads a varint as an unsigned 32 bit value
38131
+ */
38132
+ uint32() {
38133
+ let value = 4294967295;
38134
+ value = (this.buf[this.pos] & 127) >>> 0;
38135
+ if (this.buf[this.pos++] < 128) return value;
38136
+ value = (value | (this.buf[this.pos] & 127) << 7) >>> 0;
38137
+ if (this.buf[this.pos++] < 128) return value;
38138
+ value = (value | (this.buf[this.pos] & 127) << 14) >>> 0;
38139
+ if (this.buf[this.pos++] < 128) return value;
38140
+ value = (value | (this.buf[this.pos] & 127) << 21) >>> 0;
38141
+ if (this.buf[this.pos++] < 128) return value;
38142
+ value = (value | (this.buf[this.pos] & 15) << 28) >>> 0;
38143
+ if (this.buf[this.pos++] < 128) return value;
38144
+ if ((this.pos += 5) > this.len) {
38145
+ this.pos = this.len;
38146
+ throw indexOutOfRange(this, 10);
38147
+ }
38148
+ return value;
38149
+ }
38150
+ /**
38151
+ * Reads a varint as a signed 32 bit value
38152
+ */
38153
+ int32() {
38154
+ return this.uint32() | 0;
38155
+ }
38156
+ /**
38157
+ * Reads a zig-zag encoded varint as a signed 32 bit value
38158
+ */
38159
+ sint32() {
38160
+ const value = this.uint32();
38161
+ return value >>> 1 ^ -(value & 1) | 0;
38162
+ }
38163
+ /**
38164
+ * Reads a varint as a boolean
38165
+ */
38166
+ bool() {
38167
+ return this.uint32() !== 0;
38168
+ }
38169
+ /**
38170
+ * Reads fixed 32 bits as an unsigned 32 bit integer
38171
+ */
38172
+ fixed32() {
38173
+ if (this.pos + 4 > this.len) throw indexOutOfRange(this, 4);
38174
+ return readFixed32End(this.buf, this.pos += 4);
38175
+ }
38176
+ /**
38177
+ * Reads fixed 32 bits as a signed 32 bit integer
38178
+ */
38179
+ sfixed32() {
38180
+ if (this.pos + 4 > this.len) throw indexOutOfRange(this, 4);
38181
+ return readFixed32End(this.buf, this.pos += 4) | 0;
38182
+ }
38183
+ /**
38184
+ * Reads a float (32 bit) as a number
38185
+ */
38186
+ float() {
38187
+ if (this.pos + 4 > this.len) throw indexOutOfRange(this, 4);
38188
+ const value = readFloatLE(this.buf, this.pos);
38189
+ this.pos += 4;
38190
+ return value;
38191
+ }
38192
+ /**
38193
+ * Reads a double (64 bit float) as a number
38194
+ */
38195
+ double() {
38196
+ /* istanbul ignore if */
38197
+ if (this.pos + 8 > this.len) throw indexOutOfRange(this, 4);
38198
+ const value = readDoubleLE(this.buf, this.pos);
38199
+ this.pos += 8;
38200
+ return value;
38201
+ }
38202
+ /**
38203
+ * Reads a sequence of bytes preceded by its length as a varint
38204
+ */
38205
+ bytes() {
38206
+ const length = this.uint32();
38207
+ const start = this.pos;
38208
+ const end = this.pos + length;
38209
+ /* istanbul ignore if */
38210
+ if (end > this.len) throw indexOutOfRange(this, length);
38211
+ this.pos += length;
38212
+ return start === end ? new Uint8Array(0) : this.buf.subarray(start, end);
38213
+ }
38214
+ /**
38215
+ * Reads a string preceded by its byte length as a varint
38216
+ */
38217
+ string() {
38218
+ const bytes = this.bytes();
38219
+ return read(bytes, 0, bytes.length);
38220
+ }
38221
+ /**
38222
+ * Skips the specified number of bytes if specified, otherwise skips a varint
38223
+ */
38224
+ skip(length) {
38225
+ if (typeof length === "number") {
38226
+ /* istanbul ignore if */
38227
+ if (this.pos + length > this.len) throw indexOutOfRange(this, length);
38228
+ this.pos += length;
38229
+ } else do
38230
+ /* istanbul ignore if */
38231
+ if (this.pos >= this.len) throw indexOutOfRange(this);
38232
+ while ((this.buf[this.pos++] & 128) !== 0);
38233
+ return this;
38234
+ }
38235
+ /**
38236
+ * Skips the next element of the specified wire type
38237
+ */
38238
+ skipType(wireType) {
38239
+ switch (wireType) {
38240
+ case 0:
38241
+ this.skip();
38242
+ break;
38243
+ case 1:
38244
+ this.skip(8);
38245
+ break;
38246
+ case 2:
38247
+ this.skip(this.uint32());
38248
+ break;
38249
+ case 3:
38250
+ while ((wireType = this.uint32() & 7) !== 4) this.skipType(wireType);
38251
+ break;
38252
+ case 5:
38253
+ this.skip(4);
38254
+ break;
38255
+ default: throw Error(`invalid wire type ${wireType} at offset ${this.pos}`);
38256
+ }
38257
+ return this;
38258
+ }
38259
+ readLongVarint() {
38260
+ const bits = new LongBits(0, 0);
38261
+ let i = 0;
38262
+ if (this.len - this.pos > 4) {
38263
+ for (; i < 4; ++i) {
38264
+ bits.lo = (bits.lo | (this.buf[this.pos] & 127) << i * 7) >>> 0;
38265
+ if (this.buf[this.pos++] < 128) return bits;
38266
+ }
38267
+ bits.lo = (bits.lo | (this.buf[this.pos] & 127) << 28) >>> 0;
38268
+ bits.hi = (bits.hi | (this.buf[this.pos] & 127) >> 4) >>> 0;
38269
+ if (this.buf[this.pos++] < 128) return bits;
38270
+ i = 0;
38271
+ } else {
38272
+ for (; i < 3; ++i) {
38273
+ /* istanbul ignore if */
38274
+ if (this.pos >= this.len) throw indexOutOfRange(this);
38275
+ bits.lo = (bits.lo | (this.buf[this.pos] & 127) << i * 7) >>> 0;
38276
+ if (this.buf[this.pos++] < 128) return bits;
38277
+ }
38278
+ bits.lo = (bits.lo | (this.buf[this.pos++] & 127) << i * 7) >>> 0;
38279
+ return bits;
38280
+ }
38281
+ if (this.len - this.pos > 4) for (; i < 5; ++i) {
38282
+ bits.hi = (bits.hi | (this.buf[this.pos] & 127) << i * 7 + 3) >>> 0;
38283
+ if (this.buf[this.pos++] < 128) return bits;
38284
+ }
38285
+ else for (; i < 5; ++i) {
38286
+ if (this.pos >= this.len) throw indexOutOfRange(this);
38287
+ bits.hi = (bits.hi | (this.buf[this.pos] & 127) << i * 7 + 3) >>> 0;
38288
+ if (this.buf[this.pos++] < 128) return bits;
38289
+ }
38290
+ throw Error("invalid varint encoding");
38291
+ }
38292
+ readFixed64() {
38293
+ if (this.pos + 8 > this.len) throw indexOutOfRange(this, 8);
38294
+ return new LongBits(readFixed32End(this.buf, this.pos += 4), readFixed32End(this.buf, this.pos += 4));
38295
+ }
38296
+ /**
38297
+ * Reads a varint as a signed 64 bit value
38298
+ */
38299
+ int64() {
38300
+ return this.readLongVarint().toBigInt();
38301
+ }
38302
+ /**
38303
+ * Reads a varint as a signed 64 bit value returned as a possibly unsafe
38304
+ * JavaScript number
38305
+ */
38306
+ int64Number() {
38307
+ return this.readLongVarint().toNumber();
38308
+ }
38309
+ /**
38310
+ * Reads a varint as a signed 64 bit value returned as a string
38311
+ */
38312
+ int64String() {
38313
+ return this.readLongVarint().toString();
38314
+ }
38315
+ /**
38316
+ * Reads a varint as an unsigned 64 bit value
38317
+ */
38318
+ uint64() {
38319
+ return this.readLongVarint().toBigInt(true);
38320
+ }
38321
+ /**
38322
+ * Reads a varint as an unsigned 64 bit value returned as a possibly unsafe
38323
+ * JavaScript number
38324
+ */
38325
+ uint64Number() {
38326
+ const value = decodeUint8Array(this.buf, this.pos);
38327
+ this.pos += encodingLength(value);
38328
+ return value;
38329
+ }
38330
+ /**
38331
+ * Reads a varint as an unsigned 64 bit value returned as a string
38332
+ */
38333
+ uint64String() {
38334
+ return this.readLongVarint().toString(true);
38335
+ }
38336
+ /**
38337
+ * Reads a zig-zag encoded varint as a signed 64 bit value
38338
+ */
38339
+ sint64() {
38340
+ return this.readLongVarint().zzDecode().toBigInt();
38341
+ }
38342
+ /**
38343
+ * Reads a zig-zag encoded varint as a signed 64 bit value returned as a
38344
+ * possibly unsafe JavaScript number
38345
+ */
38346
+ sint64Number() {
38347
+ return this.readLongVarint().zzDecode().toNumber();
38348
+ }
38349
+ /**
38350
+ * Reads a zig-zag encoded varint as a signed 64 bit value returned as a
38351
+ * string
38352
+ */
38353
+ sint64String() {
38354
+ return this.readLongVarint().zzDecode().toString();
38355
+ }
38356
+ /**
38357
+ * Reads fixed 64 bits
38358
+ */
38359
+ fixed64() {
38360
+ return this.readFixed64().toBigInt();
38361
+ }
38362
+ /**
38363
+ * Reads fixed 64 bits returned as a possibly unsafe JavaScript number
38364
+ */
38365
+ fixed64Number() {
38366
+ return this.readFixed64().toNumber();
38367
+ }
38368
+ /**
38369
+ * Reads fixed 64 bits returned as a string
38370
+ */
38371
+ fixed64String() {
38372
+ return this.readFixed64().toString();
38373
+ }
38374
+ /**
38375
+ * Reads zig-zag encoded fixed 64 bits
38376
+ */
38377
+ sfixed64() {
38378
+ return this.readFixed64().toBigInt();
38379
+ }
38380
+ /**
38381
+ * Reads zig-zag encoded fixed 64 bits returned as a possibly unsafe
38382
+ * JavaScript number
38383
+ */
38384
+ sfixed64Number() {
38385
+ return this.readFixed64().toNumber();
38386
+ }
38387
+ /**
38388
+ * Reads zig-zag encoded fixed 64 bits returned as a string
38389
+ */
38390
+ sfixed64String() {
38391
+ return this.readFixed64().toString();
38392
+ }
38393
+ };
38394
+ function createReader(buf) {
38395
+ return new Uint8ArrayReader(buf instanceof Uint8Array ? buf : buf.subarray());
38396
+ }
38397
+
38398
+ //#endregion
38399
+ //#region ../../node_modules/.pnpm/protons-runtime@5.5.0/node_modules/protons-runtime/dist/src/decode.js
38400
+ function decodeMessage(buf, codec, opts) {
38401
+ const reader = createReader(buf);
38402
+ return codec.decode(reader, void 0, opts);
38403
+ }
38404
+
38405
+ //#endregion
38406
+ //#region ../../node_modules/.pnpm/multiformats@13.4.2/node_modules/multiformats/dist/src/bases/base10.js
38407
+ var base10_exports = /* @__PURE__ */ __exportAll({ base10: () => base10 });
38408
+ const base10 = baseX({
38409
+ prefix: "9",
38410
+ name: "base10",
38411
+ alphabet: "0123456789"
38412
+ });
38413
+
38414
+ //#endregion
38415
+ //#region ../../node_modules/.pnpm/multiformats@13.4.2/node_modules/multiformats/dist/src/bases/base16.js
38416
+ var base16_exports = /* @__PURE__ */ __exportAll({
38417
+ base16: () => base16,
38418
+ base16upper: () => base16upper
38419
+ });
38420
+ const base16 = rfc4648({
38421
+ prefix: "f",
38422
+ name: "base16",
38423
+ alphabet: "0123456789abcdef",
38424
+ bitsPerChar: 4
38425
+ });
38426
+ const base16upper = rfc4648({
38427
+ prefix: "F",
38428
+ name: "base16upper",
38429
+ alphabet: "0123456789ABCDEF",
38430
+ bitsPerChar: 4
38431
+ });
38432
+
38433
+ //#endregion
38434
+ //#region ../../node_modules/.pnpm/multiformats@13.4.2/node_modules/multiformats/dist/src/bases/base2.js
38435
+ var base2_exports = /* @__PURE__ */ __exportAll({ base2: () => base2 });
38436
+ const base2 = rfc4648({
38437
+ prefix: "0",
38438
+ name: "base2",
38439
+ alphabet: "01",
38440
+ bitsPerChar: 1
38441
+ });
38442
+
38443
+ //#endregion
38444
+ //#region ../../node_modules/.pnpm/multiformats@13.4.2/node_modules/multiformats/dist/src/bases/base256emoji.js
38445
+ var base256emoji_exports = /* @__PURE__ */ __exportAll({ base256emoji: () => base256emoji });
38446
+ const alphabet = Array.from("🚀🪐☄🛰🌌🌑🌒🌓🌔🌕🌖🌗🌘🌍🌏🌎🐉☀💻🖥💾💿😂❤😍🤣😊🙏💕😭😘👍😅👏😁🔥🥰💔💖💙😢🤔😆🙄💪😉☺👌🤗💜😔😎😇🌹🤦🎉💞✌✨🤷😱😌🌸🙌😋💗💚😏💛🙂💓🤩😄😀🖤😃💯🙈👇🎶😒🤭❣😜💋👀😪😑💥🙋😞😩😡🤪👊🥳😥🤤👉💃😳✋😚😝😴🌟😬🙃🍀🌷😻😓⭐✅🥺🌈😈🤘💦✔😣🏃💐☹🎊💘😠☝😕🌺🎂🌻😐🖕💝🙊😹🗣💫💀👑🎵🤞😛🔴😤🌼😫⚽🤙☕🏆🤫👈😮🙆🍻🍃🐶💁😲🌿🧡🎁⚡🌞🎈❌✊👋😰🤨😶🤝🚶💰🍓💢🤟🙁🚨💨🤬✈🎀🍺🤓😙💟🌱😖👶🥴▶➡❓💎💸⬇😨🌚🦋😷🕺⚠🙅😟😵👎🤲🤠🤧📌🔵💅🧐🐾🍒😗🤑🌊🤯🐷☎💧😯💆👆🎤🙇🍑❄🌴💣🐸💌📍🥀🤢👅💡💩👐📸👻🤐🤮🎼🥵🚩🍎🍊👼💍📣🥂");
38447
+ const alphabetBytesToChars = alphabet.reduce((p, c, i) => {
38448
+ p[i] = c;
38449
+ return p;
38450
+ }, []);
38451
+ const alphabetCharsToBytes = alphabet.reduce((p, c, i) => {
38452
+ const codePoint = c.codePointAt(0);
38453
+ if (codePoint == null) throw new Error(`Invalid character: ${c}`);
38454
+ p[codePoint] = i;
38455
+ return p;
38456
+ }, []);
38457
+ function encode$1(data) {
38458
+ return data.reduce((p, c) => {
38459
+ p += alphabetBytesToChars[c];
38460
+ return p;
38461
+ }, "");
38462
+ }
38463
+ function decode(str) {
38464
+ const byts = [];
38465
+ for (const char of str) {
38466
+ const codePoint = char.codePointAt(0);
38467
+ if (codePoint == null) throw new Error(`Invalid character: ${char}`);
38468
+ const byt = alphabetCharsToBytes[codePoint];
38469
+ if (byt == null) throw new Error(`Non-base256emoji character: ${char}`);
38470
+ byts.push(byt);
38471
+ }
38472
+ return new Uint8Array(byts);
38473
+ }
38474
+ const base256emoji = from$1({
38475
+ prefix: "🚀",
38476
+ name: "base256emoji",
38477
+ encode: encode$1,
38478
+ decode
38479
+ });
38480
+
38481
+ //#endregion
38482
+ //#region ../../node_modules/.pnpm/multiformats@13.4.2/node_modules/multiformats/dist/src/bases/base64.js
38483
+ var base64_exports = /* @__PURE__ */ __exportAll({
38484
+ base64: () => base64,
38485
+ base64pad: () => base64pad,
38486
+ base64url: () => base64url,
38487
+ base64urlpad: () => base64urlpad
38488
+ });
38489
+ const base64 = rfc4648({
38490
+ prefix: "m",
38491
+ name: "base64",
38492
+ alphabet: "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",
38493
+ bitsPerChar: 6
38494
+ });
38495
+ const base64pad = rfc4648({
38496
+ prefix: "M",
38497
+ name: "base64pad",
38498
+ alphabet: "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",
38499
+ bitsPerChar: 6
38500
+ });
38501
+ const base64url = rfc4648({
38502
+ prefix: "u",
38503
+ name: "base64url",
38504
+ alphabet: "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_",
38505
+ bitsPerChar: 6
38506
+ });
38507
+ const base64urlpad = rfc4648({
38508
+ prefix: "U",
38509
+ name: "base64urlpad",
38510
+ alphabet: "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_=",
38511
+ bitsPerChar: 6
38512
+ });
38513
+
38514
+ //#endregion
38515
+ //#region ../../node_modules/.pnpm/multiformats@13.4.2/node_modules/multiformats/dist/src/bases/base8.js
38516
+ var base8_exports = /* @__PURE__ */ __exportAll({ base8: () => base8 });
38517
+ const base8 = rfc4648({
38518
+ prefix: "7",
38519
+ name: "base8",
38520
+ alphabet: "01234567",
38521
+ bitsPerChar: 3
38522
+ });
38523
+
38524
+ //#endregion
38525
+ //#region ../../node_modules/.pnpm/multiformats@13.4.2/node_modules/multiformats/dist/src/bases/identity.js
38526
+ var identity_exports$1 = /* @__PURE__ */ __exportAll({ identity: () => identity$1 });
38527
+ const identity$1 = from$1({
38528
+ prefix: "\0",
38529
+ name: "identity",
38530
+ encode: (buf) => toString(buf),
38531
+ decode: (str) => fromString$1(str)
38532
+ });
38533
+
38534
+ //#endregion
38535
+ //#region ../../node_modules/.pnpm/multiformats@13.4.2/node_modules/multiformats/dist/src/codecs/json.js
38536
+ const textEncoder = new TextEncoder();
38537
+ const textDecoder = new TextDecoder();
38538
+
38539
+ //#endregion
38540
+ //#region ../../node_modules/.pnpm/multiformats@13.4.2/node_modules/multiformats/dist/src/hashes/identity.js
38541
+ var identity_exports = /* @__PURE__ */ __exportAll({ identity: () => identity });
38542
+ const code = 0;
38543
+ const name = "identity";
38544
+ const encode = coerce;
38545
+ function digest(input, options) {
38546
+ if (options?.truncate != null && options.truncate !== input.byteLength) {
38547
+ if (options.truncate < 0 || options.truncate > input.byteLength) throw new Error(`Invalid truncate option, must be less than or equal to ${input.byteLength}`);
38548
+ input = input.subarray(0, options.truncate);
38549
+ }
38550
+ return create(code, encode(input));
38551
+ }
38552
+ const identity = {
38553
+ code,
38554
+ name,
38555
+ encode,
38556
+ digest
38557
+ };
38558
+
38559
+ //#endregion
38560
+ //#region ../../node_modules/.pnpm/multiformats@13.4.2/node_modules/multiformats/dist/src/basics.js
38561
+ const bases = {
38562
+ ...identity_exports$1,
38563
+ ...base2_exports,
38564
+ ...base8_exports,
38565
+ ...base10_exports,
38566
+ ...base16_exports,
38567
+ ...base32_exports,
38568
+ ...base36_exports,
38569
+ ...base58_exports,
38570
+ ...base64_exports,
38571
+ ...base256emoji_exports
38572
+ };
38573
+ const hashes = {
38574
+ ...sha2_exports,
38575
+ ...identity_exports
38576
+ };
38577
+
38578
+ //#endregion
38579
+ //#region ../../node_modules/.pnpm/uint8arrays@5.1.0/node_modules/uint8arrays/dist/src/util/bases.js
38580
+ function createCodec$1(name, prefix, encode, decode) {
38581
+ return {
38582
+ name,
38583
+ prefix,
38584
+ encoder: {
38585
+ name,
38586
+ prefix,
38587
+ encode
38588
+ },
38589
+ decoder: { decode }
38590
+ };
38591
+ }
38592
+ const string = createCodec$1("utf8", "u", (buf) => {
38593
+ return "u" + new TextDecoder("utf8").decode(buf);
38594
+ }, (str) => {
38595
+ return new TextEncoder().encode(str.substring(1));
38596
+ });
38597
+ const ascii = createCodec$1("ascii", "a", (buf) => {
38598
+ let string = "a";
38599
+ for (let i = 0; i < buf.length; i++) string += String.fromCharCode(buf[i]);
38600
+ return string;
38601
+ }, (str) => {
38602
+ str = str.substring(1);
38603
+ const buf = allocUnsafe(str.length);
38604
+ for (let i = 0; i < str.length; i++) buf[i] = str.charCodeAt(i);
38605
+ return buf;
38606
+ });
38607
+ const BASES = {
38608
+ utf8: string,
38609
+ "utf-8": string,
38610
+ hex: bases.base16,
38611
+ latin1: ascii,
38612
+ ascii,
38613
+ binary: ascii,
38614
+ ...bases
38615
+ };
38616
+
38617
+ //#endregion
38618
+ //#region ../../node_modules/.pnpm/uint8arrays@5.1.0/node_modules/uint8arrays/dist/src/from-string.node.js
38619
+ /**
38620
+ * Create a `Uint8Array` from the passed string
38621
+ *
38622
+ * Supports `utf8`, `utf-8`, `hex`, and any encoding supported by the multiformats module.
38623
+ *
38624
+ * Also `ascii` which is similar to node's 'binary' encoding.
38625
+ */
38626
+ function fromString(string, encoding = "utf8") {
38627
+ const base = BASES[encoding];
38628
+ if (base == null) throw new Error(`Unsupported encoding "${encoding}"`);
38629
+ if (encoding === "utf8" || encoding === "utf-8") return asUint8Array(Buffer$1.from(string, "utf-8"));
38630
+ return base.decoder.decode(`${base.prefix}${string}`);
38631
+ }
38632
+
38633
+ //#endregion
38634
+ //#region ../../node_modules/.pnpm/protons-runtime@5.5.0/node_modules/protons-runtime/dist/src/utils/pool.js
38635
+ /**
38636
+ * A general purpose buffer pool
38637
+ */
38638
+ function pool(size) {
38639
+ const SIZE = size ?? 8192;
38640
+ const MAX = SIZE >>> 1;
38641
+ let slab;
38642
+ let offset = SIZE;
38643
+ return function poolAlloc(size) {
38644
+ if (size < 1 || size > MAX) return allocUnsafe(size);
38645
+ if (offset + size > SIZE) {
38646
+ slab = allocUnsafe(SIZE);
38647
+ offset = 0;
38648
+ }
38649
+ const buf = slab.subarray(offset, offset += size);
38650
+ if ((offset & 7) !== 0) offset = (offset | 7) + 1;
38651
+ return buf;
38652
+ };
38653
+ }
38654
+
38655
+ //#endregion
38656
+ //#region ../../node_modules/.pnpm/protons-runtime@5.5.0/node_modules/protons-runtime/dist/src/utils/writer.js
38657
+ /**
38658
+ * Constructs a new writer operation instance.
38659
+ *
38660
+ * @classdesc Scheduled writer operation
38661
+ */
38662
+ var Op = class {
38663
+ /**
38664
+ * Function to call
38665
+ */
38666
+ fn;
38667
+ /**
38668
+ * Value byte length
38669
+ */
38670
+ len;
38671
+ /**
38672
+ * Next operation
38673
+ */
38674
+ next;
38675
+ /**
38676
+ * Value to write
38677
+ */
38678
+ val;
38679
+ constructor(fn, len, val) {
38680
+ this.fn = fn;
38681
+ this.len = len;
38682
+ this.next = void 0;
38683
+ this.val = val;
38684
+ }
38685
+ };
38686
+ /* istanbul ignore next */
38687
+ function noop() {}
38688
+ /**
38689
+ * Constructs a new writer state instance
38690
+ */
38691
+ var State = class {
38692
+ /**
38693
+ * Current head
38694
+ */
38695
+ head;
38696
+ /**
38697
+ * Current tail
38698
+ */
38699
+ tail;
38700
+ /**
38701
+ * Current buffer length
38702
+ */
38703
+ len;
38704
+ /**
38705
+ * Next state
38706
+ */
38707
+ next;
38708
+ constructor(writer) {
38709
+ this.head = writer.head;
38710
+ this.tail = writer.tail;
38711
+ this.len = writer.len;
38712
+ this.next = writer.states;
38713
+ }
38714
+ };
38715
+ const bufferPool = pool();
38716
+ /**
38717
+ * Allocates a buffer of the specified size
38718
+ */
38719
+ function alloc(size) {
38720
+ if (globalThis.Buffer != null) return allocUnsafe(size);
38721
+ return bufferPool(size);
38722
+ }
38723
+ /**
38724
+ * When a value is written, the writer calculates its byte length and puts it into a linked
38725
+ * list of operations to perform when finish() is called. This both allows us to allocate
38726
+ * buffers of the exact required size and reduces the amount of work we have to do compared
38727
+ * to first calculating over objects and then encoding over objects. In our case, the encoding
38728
+ * part is just a linked list walk calling operations with already prepared values.
38729
+ */
38730
+ var Uint8ArrayWriter = class {
38731
+ /**
38732
+ * Current length
38733
+ */
38734
+ len;
38735
+ /**
38736
+ * Operations head
38737
+ */
38738
+ head;
38739
+ /**
38740
+ * Operations tail
38741
+ */
38742
+ tail;
38743
+ /**
38744
+ * Linked forked states
38745
+ */
38746
+ states;
38747
+ constructor() {
38748
+ this.len = 0;
38749
+ this.head = new Op(noop, 0, 0);
38750
+ this.tail = this.head;
38751
+ this.states = null;
38752
+ }
38753
+ /**
38754
+ * Pushes a new operation to the queue
38755
+ */
38756
+ _push(fn, len, val) {
38757
+ this.tail = this.tail.next = new Op(fn, len, val);
38758
+ this.len += len;
38759
+ return this;
38760
+ }
38761
+ /**
38762
+ * Writes an unsigned 32 bit value as a varint
38763
+ */
38764
+ uint32(value) {
38765
+ this.len += (this.tail = this.tail.next = new VarintOp((value = value >>> 0) < 128 ? 1 : value < 16384 ? 2 : value < 2097152 ? 3 : value < 268435456 ? 4 : 5, value)).len;
38766
+ return this;
38767
+ }
38768
+ /**
38769
+ * Writes a signed 32 bit value as a varint`
38770
+ */
38771
+ int32(value) {
38772
+ return value < 0 ? this._push(writeVarint64, 10, LongBits.fromNumber(value)) : this.uint32(value);
38773
+ }
38774
+ /**
38775
+ * Writes a 32 bit value as a varint, zig-zag encoded
38776
+ */
38777
+ sint32(value) {
38778
+ return this.uint32((value << 1 ^ value >> 31) >>> 0);
38779
+ }
38780
+ /**
38781
+ * Writes an unsigned 64 bit value as a varint
38782
+ */
38783
+ uint64(value) {
38784
+ const bits = LongBits.fromBigInt(value);
38785
+ return this._push(writeVarint64, bits.length(), bits);
38786
+ }
38787
+ /**
38788
+ * Writes an unsigned 64 bit value as a varint
38789
+ */
38790
+ uint64Number(value) {
38791
+ return this._push(encodeUint8Array, encodingLength(value), value);
38792
+ }
38793
+ /**
38794
+ * Writes an unsigned 64 bit value as a varint
38795
+ */
38796
+ uint64String(value) {
38797
+ return this.uint64(BigInt(value));
38798
+ }
38799
+ /**
38800
+ * Writes a signed 64 bit value as a varint
38801
+ */
38802
+ int64(value) {
38803
+ return this.uint64(value);
38804
+ }
38805
+ /**
38806
+ * Writes a signed 64 bit value as a varint
38807
+ */
38808
+ int64Number(value) {
38809
+ return this.uint64Number(value);
38810
+ }
38811
+ /**
38812
+ * Writes a signed 64 bit value as a varint
38813
+ */
38814
+ int64String(value) {
38815
+ return this.uint64String(value);
38816
+ }
38817
+ /**
38818
+ * Writes a signed 64 bit value as a varint, zig-zag encoded
38819
+ */
38820
+ sint64(value) {
38821
+ const bits = LongBits.fromBigInt(value).zzEncode();
38822
+ return this._push(writeVarint64, bits.length(), bits);
38823
+ }
38824
+ /**
38825
+ * Writes a signed 64 bit value as a varint, zig-zag encoded
38826
+ */
38827
+ sint64Number(value) {
38828
+ const bits = LongBits.fromNumber(value).zzEncode();
38829
+ return this._push(writeVarint64, bits.length(), bits);
38830
+ }
38831
+ /**
38832
+ * Writes a signed 64 bit value as a varint, zig-zag encoded
38833
+ */
38834
+ sint64String(value) {
38835
+ return this.sint64(BigInt(value));
38836
+ }
38837
+ /**
38838
+ * Writes a boolish value as a varint
38839
+ */
38840
+ bool(value) {
38841
+ return this._push(writeByte, 1, value ? 1 : 0);
38842
+ }
38843
+ /**
38844
+ * Writes an unsigned 32 bit value as fixed 32 bits
38845
+ */
38846
+ fixed32(value) {
38847
+ return this._push(writeFixed32, 4, value >>> 0);
38848
+ }
38849
+ /**
38850
+ * Writes a signed 32 bit value as fixed 32 bits
38851
+ */
38852
+ sfixed32(value) {
38853
+ return this.fixed32(value);
38854
+ }
38855
+ /**
38856
+ * Writes an unsigned 64 bit value as fixed 64 bits
38857
+ */
38858
+ fixed64(value) {
38859
+ const bits = LongBits.fromBigInt(value);
38860
+ return this._push(writeFixed32, 4, bits.lo)._push(writeFixed32, 4, bits.hi);
38861
+ }
38862
+ /**
38863
+ * Writes an unsigned 64 bit value as fixed 64 bits
38864
+ */
38865
+ fixed64Number(value) {
38866
+ const bits = LongBits.fromNumber(value);
38867
+ return this._push(writeFixed32, 4, bits.lo)._push(writeFixed32, 4, bits.hi);
38868
+ }
38869
+ /**
38870
+ * Writes an unsigned 64 bit value as fixed 64 bits
38871
+ */
38872
+ fixed64String(value) {
38873
+ return this.fixed64(BigInt(value));
38874
+ }
38875
+ /**
38876
+ * Writes a signed 64 bit value as fixed 64 bits
38877
+ */
38878
+ sfixed64(value) {
38879
+ return this.fixed64(value);
38880
+ }
38881
+ /**
38882
+ * Writes a signed 64 bit value as fixed 64 bits
38883
+ */
38884
+ sfixed64Number(value) {
38885
+ return this.fixed64Number(value);
38886
+ }
38887
+ /**
38888
+ * Writes a signed 64 bit value as fixed 64 bits
38889
+ */
38890
+ sfixed64String(value) {
38891
+ return this.fixed64String(value);
38892
+ }
38893
+ /**
38894
+ * Writes a float (32 bit)
38895
+ */
38896
+ float(value) {
38897
+ return this._push(writeFloatLE, 4, value);
38898
+ }
38899
+ /**
38900
+ * Writes a double (64 bit float).
38901
+ *
38902
+ * @function
38903
+ * @param {number} value - Value to write
38904
+ * @returns {Writer} `this`
38905
+ */
38906
+ double(value) {
38907
+ return this._push(writeDoubleLE, 8, value);
38908
+ }
38909
+ /**
38910
+ * Writes a sequence of bytes
38911
+ */
38912
+ bytes(value) {
38913
+ const len = value.length >>> 0;
38914
+ if (len === 0) return this._push(writeByte, 1, 0);
38915
+ return this.uint32(len)._push(writeBytes, len, value);
38916
+ }
38917
+ /**
38918
+ * Writes a string
38919
+ */
38920
+ string(value) {
38921
+ const len = length(value);
38922
+ return len !== 0 ? this.uint32(len)._push(write, len, value) : this._push(writeByte, 1, 0);
38923
+ }
38924
+ /**
38925
+ * Forks this writer's state by pushing it to a stack.
38926
+ * Calling {@link Writer#reset|reset} or {@link Writer#ldelim|ldelim} resets the writer to the previous state.
38927
+ */
38928
+ fork() {
38929
+ this.states = new State(this);
38930
+ this.head = this.tail = new Op(noop, 0, 0);
38931
+ this.len = 0;
38932
+ return this;
38933
+ }
38934
+ /**
38935
+ * Resets this instance to the last state
38936
+ */
38937
+ reset() {
38938
+ if (this.states != null) {
38939
+ this.head = this.states.head;
38940
+ this.tail = this.states.tail;
38941
+ this.len = this.states.len;
38942
+ this.states = this.states.next;
38943
+ } else {
38944
+ this.head = this.tail = new Op(noop, 0, 0);
38945
+ this.len = 0;
38946
+ }
38947
+ return this;
38948
+ }
38949
+ /**
38950
+ * Resets to the last state and appends the fork state's current write length as a varint followed by its operations.
38951
+ */
38952
+ ldelim() {
38953
+ const head = this.head;
38954
+ const tail = this.tail;
38955
+ const len = this.len;
38956
+ this.reset().uint32(len);
38957
+ if (len !== 0) {
38958
+ this.tail.next = head.next;
38959
+ this.tail = tail;
38960
+ this.len += len;
38961
+ }
38962
+ return this;
38963
+ }
38964
+ /**
38965
+ * Finishes the write operation
38966
+ */
38967
+ finish() {
38968
+ let head = this.head.next;
38969
+ const buf = alloc(this.len);
38970
+ let pos = 0;
38971
+ while (head != null) {
38972
+ head.fn(head.val, buf, pos);
38973
+ pos += head.len;
38974
+ head = head.next;
38975
+ }
38976
+ return buf;
38977
+ }
38978
+ };
38979
+ function writeByte(val, buf, pos) {
38980
+ buf[pos] = val & 255;
38981
+ }
38982
+ function writeVarint32(val, buf, pos) {
38983
+ while (val > 127) {
38984
+ buf[pos++] = val & 127 | 128;
38985
+ val >>>= 7;
38986
+ }
38987
+ buf[pos] = val;
38988
+ }
38989
+ /**
38990
+ * Constructs a new varint writer operation instance.
38991
+ *
38992
+ * @classdesc Scheduled varint writer operation
38993
+ */
38994
+ var VarintOp = class extends Op {
38995
+ next;
38996
+ constructor(len, val) {
38997
+ super(writeVarint32, len, val);
38998
+ this.next = void 0;
38999
+ }
39000
+ };
39001
+ function writeVarint64(val, buf, pos) {
39002
+ while (val.hi !== 0) {
39003
+ buf[pos++] = val.lo & 127 | 128;
39004
+ val.lo = (val.lo >>> 7 | val.hi << 25) >>> 0;
39005
+ val.hi >>>= 7;
39006
+ }
39007
+ while (val.lo > 127) {
39008
+ buf[pos++] = val.lo & 127 | 128;
39009
+ val.lo = val.lo >>> 7;
39010
+ }
39011
+ buf[pos++] = val.lo;
39012
+ }
39013
+ function writeFixed32(val, buf, pos) {
39014
+ buf[pos] = val & 255;
39015
+ buf[pos + 1] = val >>> 8 & 255;
39016
+ buf[pos + 2] = val >>> 16 & 255;
39017
+ buf[pos + 3] = val >>> 24;
39018
+ }
39019
+ function writeBytes(val, buf, pos) {
39020
+ buf.set(val, pos);
39021
+ }
39022
+ if (globalThis.Buffer != null) {
39023
+ Uint8ArrayWriter.prototype.bytes = function(value) {
39024
+ const len = value.length >>> 0;
39025
+ this.uint32(len);
39026
+ if (len > 0) this._push(writeBytesBuffer, len, value);
39027
+ return this;
39028
+ };
39029
+ Uint8ArrayWriter.prototype.string = function(value) {
39030
+ const len = globalThis.Buffer.byteLength(value);
39031
+ this.uint32(len);
39032
+ if (len > 0) this._push(writeStringBuffer, len, value);
39033
+ return this;
39034
+ };
39035
+ }
39036
+ function writeBytesBuffer(val, buf, pos) {
39037
+ buf.set(val, pos);
39038
+ }
39039
+ function writeStringBuffer(val, buf, pos) {
39040
+ if (val.length < 40) write(val, buf, pos);
39041
+ else if (buf.utf8Write != null) buf.utf8Write(val, pos);
39042
+ else buf.set(fromString(val), pos);
39043
+ }
39044
+ /**
39045
+ * Creates a new writer
39046
+ */
39047
+ function createWriter() {
39048
+ return new Uint8ArrayWriter();
39049
+ }
39050
+
39051
+ //#endregion
39052
+ //#region ../../node_modules/.pnpm/protons-runtime@5.5.0/node_modules/protons-runtime/dist/src/encode.js
39053
+ function encodeMessage(message, codec) {
39054
+ const w = createWriter();
39055
+ codec.encode(message, w, { lengthDelimited: false });
39056
+ return w.finish();
39057
+ }
39058
+
39059
+ //#endregion
39060
+ //#region ../../node_modules/.pnpm/protons-runtime@5.5.0/node_modules/protons-runtime/dist/src/codec.js
39061
+ var CODEC_TYPES;
39062
+ (function(CODEC_TYPES) {
39063
+ CODEC_TYPES[CODEC_TYPES["VARINT"] = 0] = "VARINT";
39064
+ CODEC_TYPES[CODEC_TYPES["BIT64"] = 1] = "BIT64";
39065
+ CODEC_TYPES[CODEC_TYPES["LENGTH_DELIMITED"] = 2] = "LENGTH_DELIMITED";
39066
+ CODEC_TYPES[CODEC_TYPES["START_GROUP"] = 3] = "START_GROUP";
39067
+ CODEC_TYPES[CODEC_TYPES["END_GROUP"] = 4] = "END_GROUP";
39068
+ CODEC_TYPES[CODEC_TYPES["BIT32"] = 5] = "BIT32";
39069
+ })(CODEC_TYPES || (CODEC_TYPES = {}));
39070
+ function createCodec(name, type, encode, decode) {
39071
+ return {
39072
+ name,
39073
+ type,
39074
+ encode,
39075
+ decode
39076
+ };
39077
+ }
39078
+
39079
+ //#endregion
39080
+ //#region ../../node_modules/.pnpm/protons-runtime@5.5.0/node_modules/protons-runtime/dist/src/codecs/enum.js
39081
+ function enumeration(v) {
39082
+ function findValue(val) {
39083
+ if (v[val.toString()] == null) throw new Error("Invalid enum value");
39084
+ return v[val];
39085
+ }
39086
+ return createCodec("enum", CODEC_TYPES.VARINT, function enumEncode(val, writer) {
39087
+ const enumValue = findValue(val);
39088
+ writer.int32(enumValue);
39089
+ }, function enumDecode(reader) {
39090
+ return findValue(reader.int32());
39091
+ });
39092
+ }
39093
+
39094
+ //#endregion
39095
+ //#region ../../node_modules/.pnpm/protons-runtime@5.5.0/node_modules/protons-runtime/dist/src/codecs/message.js
39096
+ function message(encode, decode) {
39097
+ return createCodec("message", CODEC_TYPES.LENGTH_DELIMITED, encode, decode);
39098
+ }
39099
+
39100
+ //#endregion
39101
+ //#region ../../node_modules/.pnpm/ipfs-unixfs@12.0.0/node_modules/ipfs-unixfs/dist/src/unixfs.js
39102
+ var Data;
39103
+ (function(Data) {
39104
+ (function(DataType) {
39105
+ DataType["Raw"] = "Raw";
39106
+ DataType["Directory"] = "Directory";
39107
+ DataType["File"] = "File";
39108
+ DataType["Metadata"] = "Metadata";
39109
+ DataType["Symlink"] = "Symlink";
39110
+ DataType["HAMTShard"] = "HAMTShard";
39111
+ })(Data.DataType || (Data.DataType = {}));
39112
+ let __DataTypeValues;
39113
+ (function(__DataTypeValues) {
39114
+ __DataTypeValues[__DataTypeValues["Raw"] = 0] = "Raw";
39115
+ __DataTypeValues[__DataTypeValues["Directory"] = 1] = "Directory";
39116
+ __DataTypeValues[__DataTypeValues["File"] = 2] = "File";
39117
+ __DataTypeValues[__DataTypeValues["Metadata"] = 3] = "Metadata";
39118
+ __DataTypeValues[__DataTypeValues["Symlink"] = 4] = "Symlink";
39119
+ __DataTypeValues[__DataTypeValues["HAMTShard"] = 5] = "HAMTShard";
39120
+ })(__DataTypeValues || (__DataTypeValues = {}));
39121
+ (function(DataType) {
39122
+ DataType.codec = () => {
39123
+ return enumeration(__DataTypeValues);
39124
+ };
39125
+ })(Data.DataType || (Data.DataType = {}));
39126
+ let _codec;
39127
+ Data.codec = () => {
39128
+ if (_codec == null) _codec = message((obj, w, opts = {}) => {
39129
+ if (opts.lengthDelimited !== false) w.fork();
39130
+ if (obj.Type != null) {
39131
+ w.uint32(8);
39132
+ Data.DataType.codec().encode(obj.Type, w);
39133
+ }
39134
+ if (obj.Data != null) {
39135
+ w.uint32(18);
39136
+ w.bytes(obj.Data);
39137
+ }
39138
+ if (obj.filesize != null) {
39139
+ w.uint32(24);
39140
+ w.uint64(obj.filesize);
39141
+ }
39142
+ if (obj.blocksizes != null) for (const value of obj.blocksizes) {
39143
+ w.uint32(32);
39144
+ w.uint64(value);
39145
+ }
39146
+ if (obj.hashType != null) {
39147
+ w.uint32(40);
39148
+ w.uint64(obj.hashType);
39149
+ }
39150
+ if (obj.fanout != null) {
39151
+ w.uint32(48);
39152
+ w.uint64(obj.fanout);
39153
+ }
39154
+ if (obj.mode != null) {
39155
+ w.uint32(56);
39156
+ w.uint32(obj.mode);
39157
+ }
39158
+ if (obj.mtime != null) {
39159
+ w.uint32(66);
39160
+ UnixTime.codec().encode(obj.mtime, w);
39161
+ }
39162
+ if (opts.lengthDelimited !== false) w.ldelim();
39163
+ }, (reader, length) => {
39164
+ const obj = { blocksizes: [] };
39165
+ const end = length == null ? reader.len : reader.pos + length;
39166
+ while (reader.pos < end) {
39167
+ const tag = reader.uint32();
39168
+ switch (tag >>> 3) {
39169
+ case 1:
39170
+ obj.Type = Data.DataType.codec().decode(reader);
39171
+ break;
39172
+ case 2:
39173
+ obj.Data = reader.bytes();
39174
+ break;
39175
+ case 3:
39176
+ obj.filesize = reader.uint64();
39177
+ break;
39178
+ case 4:
39179
+ obj.blocksizes.push(reader.uint64());
39180
+ break;
39181
+ case 5:
39182
+ obj.hashType = reader.uint64();
39183
+ break;
39184
+ case 6:
39185
+ obj.fanout = reader.uint64();
39186
+ break;
39187
+ case 7:
39188
+ obj.mode = reader.uint32();
39189
+ break;
39190
+ case 8:
39191
+ obj.mtime = UnixTime.codec().decode(reader, reader.uint32());
39192
+ break;
39193
+ default:
39194
+ reader.skipType(tag & 7);
39195
+ break;
39196
+ }
39197
+ }
39198
+ return obj;
39199
+ });
39200
+ return _codec;
39201
+ };
39202
+ Data.encode = (obj) => {
39203
+ return encodeMessage(obj, Data.codec());
39204
+ };
39205
+ Data.decode = (buf) => {
39206
+ return decodeMessage(buf, Data.codec());
39207
+ };
39208
+ })(Data || (Data = {}));
39209
+ var UnixTime;
39210
+ (function(UnixTime) {
39211
+ let _codec;
39212
+ UnixTime.codec = () => {
39213
+ if (_codec == null) _codec = message((obj, w, opts = {}) => {
39214
+ if (opts.lengthDelimited !== false) w.fork();
39215
+ if (obj.Seconds != null) {
39216
+ w.uint32(8);
39217
+ w.int64(obj.Seconds);
39218
+ }
39219
+ if (obj.FractionalNanoseconds != null) {
39220
+ w.uint32(21);
39221
+ w.fixed32(obj.FractionalNanoseconds);
39222
+ }
39223
+ if (opts.lengthDelimited !== false) w.ldelim();
39224
+ }, (reader, length) => {
39225
+ const obj = {};
39226
+ const end = length == null ? reader.len : reader.pos + length;
39227
+ while (reader.pos < end) {
39228
+ const tag = reader.uint32();
39229
+ switch (tag >>> 3) {
39230
+ case 1:
39231
+ obj.Seconds = reader.int64();
39232
+ break;
39233
+ case 2:
39234
+ obj.FractionalNanoseconds = reader.fixed32();
39235
+ break;
39236
+ default:
39237
+ reader.skipType(tag & 7);
39238
+ break;
39239
+ }
39240
+ }
39241
+ return obj;
39242
+ });
39243
+ return _codec;
39244
+ };
39245
+ UnixTime.encode = (obj) => {
39246
+ return encodeMessage(obj, UnixTime.codec());
39247
+ };
39248
+ UnixTime.decode = (buf) => {
39249
+ return decodeMessage(buf, UnixTime.codec());
39250
+ };
39251
+ })(UnixTime || (UnixTime = {}));
39252
+ var Metadata;
39253
+ (function(Metadata) {
39254
+ let _codec;
39255
+ Metadata.codec = () => {
39256
+ if (_codec == null) _codec = message((obj, w, opts = {}) => {
39257
+ if (opts.lengthDelimited !== false) w.fork();
39258
+ if (obj.MimeType != null) {
39259
+ w.uint32(10);
39260
+ w.string(obj.MimeType);
39261
+ }
39262
+ if (opts.lengthDelimited !== false) w.ldelim();
39263
+ }, (reader, length) => {
39264
+ const obj = {};
39265
+ const end = length == null ? reader.len : reader.pos + length;
39266
+ while (reader.pos < end) {
39267
+ const tag = reader.uint32();
39268
+ switch (tag >>> 3) {
39269
+ case 1:
39270
+ obj.MimeType = reader.string();
39271
+ break;
39272
+ default:
39273
+ reader.skipType(tag & 7);
39274
+ break;
39275
+ }
39276
+ }
39277
+ return obj;
39278
+ });
39279
+ return _codec;
39280
+ };
39281
+ Metadata.encode = (obj) => {
39282
+ return encodeMessage(obj, Metadata.codec());
39283
+ };
39284
+ Metadata.decode = (buf) => {
39285
+ return decodeMessage(buf, Metadata.codec());
39286
+ };
39287
+ })(Metadata || (Metadata = {}));
39288
+
39289
+ //#endregion
39290
+ //#region ../../node_modules/.pnpm/ipfs-unixfs@12.0.0/node_modules/ipfs-unixfs/dist/src/index.js
39291
+ /**
39292
+ * @packageDocumentation
39293
+ *
39294
+ * This module contains the protobuf definition of the UnixFS data structure found at the root of all UnixFS DAGs.
39295
+ *
39296
+ * The UnixFS spec can be found in the [ipfs/specs repository](http://github.com/ipfs/specs)
39297
+ *
39298
+ * @example Create a file composed of several blocks
39299
+ *
39300
+ * ```TypeScript
39301
+ * import { UnixFS } from 'ipfs-unixfs'
39302
+ *
39303
+ * const data = new UnixFS({ type: 'file' })
39304
+ * data.addBlockSize(256n) // add the size of each block
39305
+ * data.addBlockSize(256n)
39306
+ * // ...
39307
+ * ```
39308
+ *
39309
+ * @example Create a directory that contains several files
39310
+ *
39311
+ * Creating a directory that contains several files is achieve by creating a unixfs element that identifies a MerkleDAG node as a directory. The links of that MerkleDAG node are the files that are contained in this directory.
39312
+ *
39313
+ * ```TypeScript
39314
+ * import { UnixFS } from 'ipfs-unixfs'
39315
+ *
39316
+ * const data = new UnixFS({ type: 'directory' })
39317
+ * ```
39318
+ *
39319
+ * @example Create an unixfs Data element
39320
+ *
39321
+ * ```TypeScript
39322
+ * import { UnixFS } from 'ipfs-unixfs'
39323
+ *
39324
+ * const data = new UnixFS({
39325
+ * // ...options
39326
+ * })
39327
+ * ```
39328
+ *
39329
+ * `options` is an optional object argument that might include the following keys:
39330
+ *
39331
+ * - type (string, default `file`): The type of UnixFS entry. Can be:
39332
+ * - `raw`
39333
+ * - `directory`
39334
+ * - `file`
39335
+ * - `metadata`
39336
+ * - `symlink`
39337
+ * - `hamt-sharded-directory`
39338
+ * - data (Uint8Array): The optional data field for this node
39339
+ * - blockSizes (Array, default: `[]`): If this is a `file` node that is made up of multiple blocks, `blockSizes` is a list numbers that represent the size of the file chunks stored in each child node. It is used to calculate the total file size.
39340
+ * - mode (Number, default `0644` for files, `0755` for directories/hamt-sharded-directories) file mode
39341
+ * - mtime (`Date`, `{ secs, nsecs }`, `{ Seconds, FractionalNanoseconds }`, `[ secs, nsecs ]`): The modification time of this node
39342
+ *
39343
+ * @example Add and remove a block size to the block size list
39344
+ *
39345
+ * ```TypeScript
39346
+ * import { UnixFS } from 'ipfs-unixfs'
39347
+ *
39348
+ * const data = new UnixFS({ type: 'file' })
39349
+ * const sizeInBytes = 100n
39350
+ * data.addBlockSize(sizeInBytes)
39351
+ * ```
39352
+ *
39353
+ * ```TypeScript
39354
+ * import { UnixFS } from 'ipfs-unixfs'
39355
+ *
39356
+ * const data = new UnixFS({ type: 'file' })
39357
+ *
39358
+ * const index = 0
39359
+ * data.removeBlockSize(index)
39360
+ * ```
39361
+ *
39362
+ * @example Get total fileSize
39363
+ *
39364
+ * ```TypeScript
39365
+ * import { UnixFS } from 'ipfs-unixfs'
39366
+ *
39367
+ * const data = new UnixFS({ type: 'file' })
39368
+ * data.fileSize() // => size in bytes
39369
+ * ```
39370
+ *
39371
+ * @example Marshal and unmarshal
39372
+ *
39373
+ * ```TypeScript
39374
+ * import { UnixFS } from 'ipfs-unixfs'
39375
+ *
39376
+ * const data = new UnixFS({ type: 'file' })
39377
+ * const marshaled = data.marshal()
39378
+ * const unmarshaled = UnixFS.unmarshal(marshaled)
39379
+ * ```
39380
+ *
39381
+ * @example Is this UnixFS entry a directory?
39382
+ *
39383
+ * ```TypeScript
39384
+ * import { UnixFS } from 'ipfs-unixfs'
39385
+ *
39386
+ * const dir = new UnixFS({ type: 'directory' })
39387
+ * dir.isDirectory() // true
39388
+ *
39389
+ * const file = new UnixFS({ type: 'file' })
39390
+ * file.isDirectory() // false
39391
+ * ```
39392
+ *
39393
+ * @example Has an mtime been set?
39394
+ *
39395
+ * If no modification time has been set, no `mtime` property will be present on the `Data` instance:
39396
+ *
39397
+ * ```TypeScript
39398
+ * import { UnixFS } from 'ipfs-unixfs'
39399
+ *
39400
+ * const file = new UnixFS({ type: 'file' })
39401
+ * file.mtime // undefined
39402
+ *
39403
+ * Object.prototype.hasOwnProperty.call(file, 'mtime') // false
39404
+ *
39405
+ * const dir = new UnixFS({ type: 'directory', mtime: { secs: 5n } })
39406
+ * dir.mtime // { secs: Number, nsecs: Number }
39407
+ * ```
39408
+ */
39409
+ const types = {
39410
+ Raw: "raw",
39411
+ Directory: "directory",
39412
+ File: "file",
39413
+ Metadata: "metadata",
39414
+ Symlink: "symlink",
39415
+ HAMTShard: "hamt-sharded-directory"
39416
+ };
39417
+ const dirTypes = ["directory", "hamt-sharded-directory"];
39418
+ const DEFAULT_FILE_MODE = parseInt("0644", 8);
39419
+ const DEFAULT_DIRECTORY_MODE = parseInt("0755", 8);
39420
+ const MAX_FANOUT = BigInt(1024);
39421
+ var UnixFS = class UnixFS {
39422
+ /**
39423
+ * Decode from protobuf https://github.com/ipfs/specs/blob/master/UNIXFS.md
39424
+ */
39425
+ static unmarshal(marshaled) {
39426
+ const message = Data.decode(marshaled);
39427
+ if (message.fanout != null && message.fanout > MAX_FANOUT) throw new InvalidUnixFSMessageError(`Fanout size was too large - ${message.fanout} > ${MAX_FANOUT}`);
39428
+ const data = new UnixFS({
39429
+ type: types[message.Type != null ? message.Type.toString() : "File"],
39430
+ data: message.Data,
39431
+ blockSizes: message.blocksizes,
39432
+ mode: message.mode,
39433
+ mtime: message.mtime != null ? {
39434
+ secs: message.mtime.Seconds ?? 0n,
39435
+ nsecs: message.mtime.FractionalNanoseconds
39436
+ } : void 0,
39437
+ fanout: message.fanout
39438
+ });
39439
+ data._originalMode = message.mode ?? 0;
39440
+ return data;
39441
+ }
39442
+ type;
39443
+ data;
39444
+ blockSizes;
39445
+ hashType;
39446
+ fanout;
39447
+ mtime;
39448
+ _mode;
39449
+ _originalMode;
39450
+ constructor(options = { type: "file" }) {
39451
+ const { type, data, blockSizes, hashType, fanout, mtime, mode } = options;
39452
+ if (type != null && !Object.values(types).includes(type)) throw new InvalidTypeError("Type: " + type + " is not valid");
39453
+ this.type = type ?? "file";
39454
+ this.data = data;
39455
+ this.hashType = hashType;
39456
+ this.fanout = fanout;
39457
+ this.blockSizes = blockSizes ?? [];
39458
+ this._originalMode = 0;
39459
+ this.mode = mode;
39460
+ this.mtime = mtime;
39461
+ }
39462
+ set mode(mode) {
39463
+ if (mode == null) this._mode = this.isDirectory() ? DEFAULT_DIRECTORY_MODE : DEFAULT_FILE_MODE;
39464
+ else this._mode = mode & 4095;
39465
+ }
39466
+ get mode() {
39467
+ return this._mode;
39468
+ }
39469
+ isDirectory() {
39470
+ return dirTypes.includes(this.type);
39471
+ }
39472
+ addBlockSize(size) {
39473
+ this.blockSizes.push(size);
39474
+ }
39475
+ removeBlockSize(index) {
39476
+ this.blockSizes.splice(index, 1);
39477
+ }
39478
+ /**
39479
+ * Returns `0n` for directories or `data.length + sum(blockSizes)` for everything else
39480
+ */
39481
+ fileSize() {
39482
+ if (this.isDirectory()) return 0n;
39483
+ let sum = 0n;
39484
+ this.blockSizes.forEach((size) => {
39485
+ sum += size;
39486
+ });
39487
+ if (this.data != null) sum += BigInt(this.data.length);
39488
+ return sum;
39489
+ }
39490
+ /**
39491
+ * encode to protobuf Uint8Array
39492
+ */
39493
+ marshal() {
39494
+ let type;
39495
+ switch (this.type) {
39496
+ case "raw":
39497
+ type = Data.DataType.Raw;
39498
+ break;
39499
+ case "directory":
39500
+ type = Data.DataType.Directory;
39501
+ break;
39502
+ case "file":
39503
+ type = Data.DataType.File;
39504
+ break;
39505
+ case "metadata":
39506
+ type = Data.DataType.Metadata;
39507
+ break;
39508
+ case "symlink":
39509
+ type = Data.DataType.Symlink;
39510
+ break;
39511
+ case "hamt-sharded-directory":
39512
+ type = Data.DataType.HAMTShard;
39513
+ break;
39514
+ default: throw new InvalidTypeError(`Type: ${type} is not valid`);
39515
+ }
39516
+ let data = this.data;
39517
+ if (this.data == null || this.data.length === 0) data = void 0;
39518
+ let mode;
39519
+ if (this.mode != null) {
39520
+ mode = this._originalMode & 4294963200 | (this.mode ?? 0);
39521
+ if (mode === DEFAULT_FILE_MODE && !this.isDirectory()) mode = void 0;
39522
+ if (mode === DEFAULT_DIRECTORY_MODE && this.isDirectory()) mode = void 0;
39523
+ }
39524
+ let mtime;
39525
+ if (this.mtime != null) mtime = {
39526
+ Seconds: this.mtime.secs,
39527
+ FractionalNanoseconds: this.mtime.nsecs
39528
+ };
39529
+ return Data.encode({
39530
+ Type: type,
39531
+ Data: data,
39532
+ filesize: this.isDirectory() ? void 0 : this.fileSize(),
39533
+ blocksizes: this.blockSizes,
39534
+ hashType: this.hashType,
39535
+ fanout: this.fanout,
39536
+ mode,
39537
+ mtime
39538
+ });
39539
+ }
39540
+ };
39541
+
39542
+ //#endregion
39543
+ //#region src/ecosystem/ipfs.ts
39544
+ /**
39545
+ * Generates an IPFS CIDv0 hash for the given content
39546
+ * @param content - String or Uint8Array to hash
39547
+ * @returns IPFS CIDv0 hash (starts with "Qm")
39548
+ */
39549
+ async function hash(content) {
39550
+ const unixfs = new UnixFS({
39551
+ type: "file",
39552
+ data: typeof content === "string" ? new TextEncoder().encode(content) : content
39553
+ });
39554
+ const block = encode$2({
39555
+ Data: unixfs.marshal(),
39556
+ Links: []
39557
+ });
39558
+ const hash = await sha256.digest(block);
39559
+ return CID.createV0(hash).toString();
39560
+ }
39561
+
39562
+ //#endregion
39563
+ export { Aip, ChainId, ChainList, EVENT_DB, HALF_RAY, HALF_WAD, HUMAN_READABLE_PAYLOAD_STATE, HUMAN_READABLE_PROPOSAL_STATE, IAToken_ABI, IAaveOracle_ABI, IAaveV3ConfigEngine_ABI, IAccessControl_ABI, IAggregatorInterface_ABI, ICLRatePriceCapAdapter_ABI, ICLSynchronicityPriceAdapterBaseToPeg_ABI, ICLSynchronicityPriceAdapterPegToBase_ABI, ICLSynchronicityPriceAdapter_ABI, ICollector_ABI, IDefaultInterestRateStrategyV2_ABI, IERC1967_ABI, IERC20Metadata_ABI, IERC20_ABI, IEmissionManager_ABI, IGovernance_ABI, IOwnable_ABI, IPausableUpgradeable_ABI, IPayloadsController_ABI, IPendlePriceCapAdapter_ABI, IPoolAddressesProvider_ABI, IPoolConfigurator_ABI, IPool_ABI, IPriceCapAdapterBase_ABI, IPriceCapAdapterStable_ABI, IReserveInterestRateStrategy_ABI, IRewardsController_ABI, ISafe_ABI, IStataTokenFactory_ABI, IStataTokenV2_ABI, IUmbrellaStakeToken_ABI, IUmbrella_ABI, IWithGuardian_ABI, IWrappedTokenGatewayV3_ABI, IncentivizedERC20_ABI, LTV_PRECISION, PayloadState, ProposalState, RAY, SECONDS_PER_YEAR, SelfdestructCheckState, SoltypeType, Umbrella_IRewardsController_ABI, Umbrella_IRewardsDistributor_ABI, VerificationStatus, WAD, WAD_RAY_RATIO, aaveAddressesProvider_IncentivesControllerSlot, addAssetPrice, addAssetSymbol, alchemyNetworkMap, alchemySupportedChainIds, assetIndexesToAsset, assetToBase, bitmapToIndexes, blockscoutExplorers, bytes32ToAddress, calculateAvailableBorrowsMarketReferenceCurrency, calculateCompoundedInterest, calculateHealthFactor, calculateHealthFactorFromBalances, calculateLinearInterest, chainlinkFeeds, checkForSelfdestruct, decodeReserveConfiguration, decodeReserveConfigurationV2, decodeUserConfiguration, diffCode, diffFoundryStorageLayout, enhanceLogs, enhanceStateDiff, erc1967_AdminSlot, erc1967_ImplementationSlot, etherscanExplorers, fetchImmutablePoolAddresses, fetchMutablePoolAddresses, fetchPoolAddresses, findAsset, flashbotsClientExtension, flashbotsOnFetchRequest, formatNumberString, foundry_format, foundry_getStandardJsonInput, foundry_getStorageLayout, genericIndexer, getAlchemyRPC, getBits, getBytesValue, getClient, getCompleteReserveConfiguration, getContractDeploymentBlock, getCurrentDebtBalance, getCurrentLiquidityBalance, getDynamicArraySlot, getExplicitRPC, getExplorer, getGovernance, getHyperRPC, getImplementationSlot, getLogsRecursive, getMarketReferenceCurrencyAndUsdBalance, getMdContractName, getNetworkEnv, getNonFinalizedPayloads, getNonFinalizedProposals, getNormalizedDebt, getNormalizedIncome, getObjectDiff, getPayloadStorageOverrides, getPayloadsController, getPublicRpc, getQuicknodeRpc, getRPCUrl, getReserveConfigurations, getReserveTokens, getSolidityStorageSlotAddress, getSolidityStorageSlotBytes, getSolidityStorageSlotUint, getSourceCode, getTenderlyRpc, getVerificationStatus, hash, hyperRPCSupportedNetworks, isPayloadFinal, isProposalFinal, makePayloadExecutableOnTestClient, makeProposalExecutableOnTestClient, onMevHandler, parseBlockscoutStyleSourceCode, parseEtherscanStyleSourceCode, parseFrontmatterMd, parseLogs, prettifyNumber, priceUpdateDecoder, publicRPCs, quicknodeNetworkMap, rayDiv, rayMul, rayToWad, renderMarkdownStateDiffReport, renderTenderlyReport, routescanExplorers, selfDestructStatusToString, setBits, snapshotClient, tenderlyExplorerMap, tenderlyNetworkMap, tenderly_createVnet, tenderly_deleteVnet, tenderly_getVnet, tenderly_logsToAbiLogs, tenderly_pingExplorer, tenderly_sim, tenderly_simVnet, toAddressLink, toBinaryString, toTxLink, transformTenderlyStateDiff, validateAip, verificationStatusToString, wadDiv, wadToRay };
36289
39564
  //# sourceMappingURL=index.mjs.map