@coinbase/cdp-hooks 0.0.87 → 0.0.88

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (129) hide show
  1. package/dist/esm/index106.js +1 -1
  2. package/dist/esm/index107.js +2 -2
  3. package/dist/esm/index108.js +1 -1
  4. package/dist/esm/index113.js +1 -1
  5. package/dist/esm/index116.js +1 -1
  6. package/dist/esm/index119.js +1 -1
  7. package/dist/esm/index120.js +1 -1
  8. package/dist/esm/index121.js +3 -3
  9. package/dist/esm/index122.js +2 -2
  10. package/dist/esm/index123.js +1 -1
  11. package/dist/esm/index125.js +1 -1
  12. package/dist/esm/index126.js +1 -1
  13. package/dist/esm/index127.js +3 -3
  14. package/dist/esm/index128.js +3 -3
  15. package/dist/esm/index129.js +3 -3
  16. package/dist/esm/index130.js +3 -3
  17. package/dist/esm/index131.js +3 -3
  18. package/dist/esm/index132.js +3 -3
  19. package/dist/esm/index133.js +3 -3
  20. package/dist/esm/index134.js +1 -1
  21. package/dist/esm/index136.js +1 -1
  22. package/dist/esm/index2.js +34 -29
  23. package/dist/esm/index217.js +3 -3
  24. package/dist/esm/index246.js +2 -2
  25. package/dist/esm/index249.js +2 -2
  26. package/dist/esm/index250.js +1 -1
  27. package/dist/esm/index254.js +3 -3
  28. package/dist/esm/index255.js +38 -40
  29. package/dist/esm/index256.js +2 -2
  30. package/dist/esm/index257.js +69 -4
  31. package/dist/esm/index258.js +34 -10
  32. package/dist/esm/index259.js +13 -18
  33. package/dist/esm/index260.js +40 -7
  34. package/dist/esm/index261.js +2 -12
  35. package/dist/esm/index262.js +4 -66
  36. package/dist/esm/index263.js +9 -64
  37. package/dist/esm/index264.js +17 -183
  38. package/dist/esm/index265.js +7 -22
  39. package/dist/esm/index266.js +10 -41
  40. package/dist/esm/index267.js +62 -72
  41. package/dist/esm/index268.js +61 -36
  42. package/dist/esm/index269.js +184 -15
  43. package/dist/esm/index270.js +21 -12
  44. package/dist/esm/index271.js +42 -7
  45. package/dist/esm/index272.js +76 -6
  46. package/dist/esm/index273.js +40 -36
  47. package/dist/esm/index274.js +16 -15
  48. package/dist/esm/index275.js +13 -8
  49. package/dist/esm/index276.js +7 -12
  50. package/dist/esm/index277.js +6 -9
  51. package/dist/esm/index278.js +36 -16
  52. package/dist/esm/index279.js +15 -22
  53. package/dist/esm/index280.js +7 -29
  54. package/dist/esm/index281.js +13 -2
  55. package/dist/esm/index282.js +9 -13
  56. package/dist/esm/index283.js +15 -11
  57. package/dist/esm/index284.js +20 -45
  58. package/dist/esm/index285.js +30 -9
  59. package/dist/esm/index286.js +2 -14
  60. package/dist/esm/index287.js +13 -14
  61. package/dist/esm/index288.js +12 -8
  62. package/dist/esm/index289.js +46 -14
  63. package/dist/esm/index290.js +8 -23
  64. package/dist/esm/index291.js +13 -11
  65. package/dist/esm/index292.js +14 -24
  66. package/dist/esm/index293.js +8 -51
  67. package/dist/esm/index294.js +13 -15
  68. package/dist/esm/index295.js +24 -14
  69. package/dist/esm/index296.js +11 -11
  70. package/dist/esm/index297.js +24 -103
  71. package/dist/esm/index298.js +51 -5
  72. package/dist/esm/index299.js +16 -222
  73. package/dist/esm/index3.js +1 -1
  74. package/dist/esm/index300.js +14 -6
  75. package/dist/esm/index301.js +12 -7
  76. package/dist/esm/index302.js +101 -24
  77. package/dist/esm/index303.js +5 -19
  78. package/dist/esm/index304.js +218 -140
  79. package/dist/esm/index305.js +7 -13
  80. package/dist/esm/index306.js +6 -35
  81. package/dist/esm/index307.js +26 -41
  82. package/dist/esm/index308.js +19 -38
  83. package/dist/esm/index309.js +146 -2
  84. package/dist/esm/index310.js +13 -70
  85. package/dist/esm/index311.js +35 -34
  86. package/dist/esm/index312.js +41 -14
  87. package/dist/esm/index313.js +2 -69
  88. package/dist/esm/index314.js +68 -3
  89. package/dist/esm/index315.js +3 -136
  90. package/dist/esm/index316.js +125 -144
  91. package/dist/esm/index317.js +155 -9
  92. package/dist/esm/index318.js +9 -16
  93. package/dist/esm/index319.js +16 -113
  94. package/dist/esm/index320.js +95 -116
  95. package/dist/esm/index321.js +135 -2
  96. package/dist/esm/index322.js +1 -1
  97. package/dist/esm/index324.js +2 -2
  98. package/dist/esm/index325.js +2 -2
  99. package/dist/esm/index326.js +1 -1
  100. package/dist/esm/index327.js +1 -1
  101. package/dist/esm/index328.js +3 -65
  102. package/dist/esm/index329.js +65 -4
  103. package/dist/esm/index330.js +4 -40
  104. package/dist/esm/index331.js +40 -7
  105. package/dist/esm/index332.js +7 -62
  106. package/dist/esm/index333.js +57 -72
  107. package/dist/esm/index334.js +78 -4
  108. package/dist/esm/index335.js +4 -195
  109. package/dist/esm/index336.js +194 -3
  110. package/dist/esm/index337.js +3 -3
  111. package/dist/esm/index73.js +2 -2
  112. package/dist/esm/index80.js +1 -1
  113. package/dist/esm/index81.js +1 -1
  114. package/dist/esm/index84.js +3 -3
  115. package/dist/esm/index85.js +2 -2
  116. package/dist/esm/index86.js +3 -3
  117. package/dist/esm/index87.js +2 -2
  118. package/dist/esm/index88.js +3 -3
  119. package/dist/esm/index89.js +6 -6
  120. package/dist/esm/index90.js +2 -2
  121. package/dist/esm/index91.js +1 -1
  122. package/dist/esm/index92.js +1 -1
  123. package/dist/esm/index93.js +1 -1
  124. package/dist/esm/index94.js +1 -1
  125. package/dist/esm/index95.js +1 -1
  126. package/dist/esm/index96.js +1 -1
  127. package/dist/esm/index97.js +4 -4
  128. package/dist/esm/index98.js +1 -1
  129. package/package.json +3 -3
@@ -1,5 +1,5 @@
1
1
  import { getAbiItem as p } from "./index154.js";
2
- import { getAction as v } from "./index271.js";
2
+ import { getAction as v } from "./index276.js";
3
3
  import { getLogs as l } from "./index112.js";
4
4
  async function y(n, r) {
5
5
  const { abi: t, address: s, args: c, blockHash: i, eventName: e, fromBlock: m, toBlock: a, strict: f } = r, o = e ? p({ abi: t, name: e }) : void 0, g = o ? void 0 : t.filter((d) => d.type === "event");
@@ -1,5 +1,5 @@
1
- import { Eip712DomainNotFoundError as u } from "./index287.js";
2
- import { getAction as d } from "./index271.js";
1
+ import { Eip712DomainNotFoundError as u } from "./index292.js";
2
+ import { getAction as d } from "./index276.js";
3
3
  import { readContract as f } from "./index120.js";
4
4
  async function E(a, o) {
5
5
  const { address: e, factory: r, factoryData: i } = o;
@@ -1,5 +1,5 @@
1
1
  import { numberToHex as o } from "./index174.js";
2
- import { formatFeeHistory as f } from "./index288.js";
2
+ import { formatFeeHistory as f } from "./index293.js";
3
3
  async function u(r, { blockCount: i, blockNumber: e, blockTag: n = "latest", rewardPercentiles: s }) {
4
4
  const t = typeof e == "bigint" ? o(e) : void 0, a = await r.request({
5
5
  method: "eth_feeHistory",
@@ -1,5 +1,5 @@
1
1
  import { numberToHex as c } from "./index174.js";
2
- import { formatProof as s } from "./index289.js";
2
+ import { formatProof as s } from "./index294.js";
3
3
  async function d(t, { address: e, blockNumber: o, blockTag: r, storageKeys: n }) {
4
4
  const f = r ?? "latest", a = o !== void 0 ? c(o) : void 0, m = await t.request({
5
5
  method: "eth_getProof",
@@ -1,4 +1,4 @@
1
- import { getAction as n } from "./index271.js";
1
+ import { getAction as n } from "./index276.js";
2
2
  import { getBlockNumber as a } from "./index102.js";
3
3
  import { getTransaction as m } from "./index115.js";
4
4
  async function f(o, { hash: r, transactionReceipt: e }) {
@@ -6,7 +6,7 @@ import { decodeFunctionResult as q } from "./index195.js";
6
6
  import { encodeFunctionData as B } from "./index202.js";
7
7
  import { getChainContractAddress as O } from "./index238.js";
8
8
  import { getContractError as E } from "./index245.js";
9
- import { getAction as T } from "./index271.js";
9
+ import { getAction as T } from "./index276.js";
10
10
  import { readContract as Z } from "./index120.js";
11
11
  async function W(n, w) {
12
12
  const { account: b, allowFailure: u = !0, batchSize: F, blockNumber: p, blockTag: j, multicallAddress: y, stateOverride: N } = w, d = w.contracts, C = F ?? (typeof n.batch?.multicall == "object" && n.batch.multicall.batchSize || 1024);
@@ -1,7 +1,7 @@
1
1
  import { decodeFunctionResult as m } from "./index195.js";
2
2
  import { encodeFunctionData as s } from "./index202.js";
3
3
  import { getContractError as f } from "./index245.js";
4
- import { getAction as l } from "./index271.js";
4
+ import { getAction as l } from "./index276.js";
5
5
  import { call as p } from "./index89.js";
6
6
  async function x(n, e) {
7
7
  const { abi: t, address: c, args: o, functionName: r, ...d } = e, i = s({
@@ -1,4 +1,4 @@
1
- import { toRpc as R } from "./index280.js";
1
+ import { toRpc as R } from "./index285.js";
2
2
  import { parseAccount as q } from "./index76.js";
3
3
  import { AbiDecodingZeroDataError as D } from "./index144.js";
4
4
  import { RawContractError as S } from "./index150.js";
@@ -8,11 +8,11 @@ import { encodeFunctionData as C } from "./index202.js";
8
8
  import { concat as F } from "./index178.js";
9
9
  import { numberToHex as H } from "./index174.js";
10
10
  import { getContractError as U } from "./index245.js";
11
- import { getNodeError as A } from "./index290.js";
11
+ import { getNodeError as A } from "./index295.js";
12
12
  import { formatBlock as _ } from "./index179.js";
13
13
  import { formatLog as z } from "./index182.js";
14
14
  import { formatTransactionRequest as I } from "./index209.js";
15
- import { serializeStateOverride as L } from "./index284.js";
15
+ import { serializeStateOverride as L } from "./index289.js";
16
16
  import { assertRequest as V } from "./index222.js";
17
17
  async function nr(p, g) {
18
18
  const { blockNumber: b, blockTag: x = p.experimental_blockTag ?? "latest", blocks: k, returnFullTransactions: v, traceTransfers: w, validation: N } = g;
@@ -1,5 +1,5 @@
1
- import { encode as J, from as K } from "./index291.js";
2
- import { encodeData as M, from as o } from "./index292.js";
1
+ import { encode as J, from as K } from "./index296.js";
2
+ import { encodeData as M, from as o } from "./index297.js";
3
3
  import { parseAccount as Q } from "./index76.js";
4
4
  import { zeroAddress as t, ethAddress as S } from "./index138.js";
5
5
  import { deploylessCallViaBytecodeBytecode as W } from "./index139.js";
@@ -2,7 +2,7 @@ import { parseAccount as p } from "./index76.js";
2
2
  import { decodeFunctionResult as h } from "./index195.js";
3
3
  import { encodeFunctionData as x } from "./index202.js";
4
4
  import { getContractError as b } from "./index245.js";
5
- import { getAction as g } from "./index271.js";
5
+ import { getAction as g } from "./index276.js";
6
6
  import { call as A } from "./index89.js";
7
7
  async function R(s, m) {
8
8
  const { abi: t, address: r, args: o, dataSuffix: n, functionName: a, ...c } = m, e = c.account ? p(c.account) : s.account, d = x({ abi: t, args: o, functionName: a });
@@ -1,5 +1,5 @@
1
1
  import { hashMessage as h } from "./index247.js";
2
- import { verifyHash as i } from "./index293.js";
2
+ import { verifyHash as i } from "./index298.js";
3
3
  async function m(r, { address: a, message: o, factory: s, factoryData: t, signature: e, ...f }) {
4
4
  const c = h(o);
5
5
  return i(r, {
@@ -1,5 +1,5 @@
1
1
  import { hashTypedData as m } from "./index212.js";
2
- import { verifyHash as d } from "./index293.js";
2
+ import { verifyHash as d } from "./index298.js";
3
3
  async function D(a, t) {
4
4
  const { address: r, factory: e, factoryData: o, signature: s, message: y, primaryType: c, types: f, domain: i, ...n } = t, p = m({ message: y, primaryType: c, types: f, domain: i });
5
5
  return d(a, {
@@ -1,8 +1,8 @@
1
1
  import { BlockNotFoundError as D } from "./index149.js";
2
2
  import { WaitForTransactionReceiptTimeoutError as M, TransactionNotFoundError as O, TransactionReceiptNotFoundError as W } from "./index158.js";
3
- import { getAction as l } from "./index271.js";
4
- import { observe as q } from "./index273.js";
5
- import { withResolvers as z } from "./index275.js";
3
+ import { getAction as l } from "./index276.js";
4
+ import { observe as q } from "./index278.js";
5
+ import { withResolvers as z } from "./index280.js";
6
6
  import { withRetry as B } from "./index240.js";
7
7
  import { stringify as G } from "./index168.js";
8
8
  import { getBlock as H } from "./index101.js";
@@ -1,7 +1,7 @@
1
1
  import { hexToBigInt as w } from "./index207.js";
2
- import { getAction as g } from "./index271.js";
3
- import { observe as k } from "./index273.js";
4
- import { poll as h } from "./index274.js";
2
+ import { getAction as g } from "./index276.js";
3
+ import { observe as k } from "./index278.js";
4
+ import { poll as h } from "./index279.js";
5
5
  import { stringify as y } from "./index168.js";
6
6
  import { getBlockNumber as v } from "./index102.js";
7
7
  function H(r, { emitOnBegin: c = !1, emitMissed: a = !1, onBlockNumber: l, onError: b, poll: i, pollingInterval: m = r.pollingInterval }) {
@@ -1,6 +1,6 @@
1
- import { getAction as p } from "./index271.js";
2
- import { observe as h } from "./index273.js";
3
- import { poll as v } from "./index274.js";
1
+ import { getAction as p } from "./index276.js";
2
+ import { observe as h } from "./index278.js";
3
+ import { poll as v } from "./index279.js";
4
4
  import { stringify as S } from "./index168.js";
5
5
  import { getBlock as i } from "./index101.js";
6
6
  function P(r, { blockTag: l = r.experimental_blockTag ?? "latest", emitMissed: y = !1, emitOnBegin: m = !1, onBlock: k, onError: f, includeTransactions: B, poll: d, pollingInterval: w = r.pollingInterval }) {
@@ -3,9 +3,9 @@ import { InvalidInputRpcError as T } from "./index161.js";
3
3
  import { decodeEventLog as z } from "./index191.js";
4
4
  import { encodeEventTopics as A } from "./index201.js";
5
5
  import { formatLog as B } from "./index182.js";
6
- import { getAction as g } from "./index271.js";
7
- import { observe as F } from "./index273.js";
8
- import { poll as O } from "./index274.js";
6
+ import { getAction as g } from "./index276.js";
7
+ import { observe as F } from "./index278.js";
8
+ import { poll as O } from "./index279.js";
9
9
  import { stringify as D } from "./index168.js";
10
10
  import { createContractEventFilter as R } from "./index92.js";
11
11
  import { getBlockNumber as U } from "./index102.js";
@@ -1,12 +1,12 @@
1
1
  import { encodeEventTopics as S } from "./index201.js";
2
- import { observe as B } from "./index273.js";
3
- import { poll as C } from "./index274.js";
2
+ import { observe as B } from "./index278.js";
3
+ import { poll as C } from "./index279.js";
4
4
  import { stringify as T } from "./index168.js";
5
5
  import { DecodeLogDataMismatch as z, DecodeLogTopicsMismatch as A } from "./index144.js";
6
6
  import { InvalidInputRpcError as O } from "./index161.js";
7
7
  import { decodeEventLog as P } from "./index191.js";
8
8
  import { formatLog as I } from "./index182.js";
9
- import { getAction as u } from "./index271.js";
9
+ import { getAction as u } from "./index276.js";
10
10
  import { createEventFilter as R } from "./index93.js";
11
11
  import { getBlockNumber as U } from "./index102.js";
12
12
  import { getFilterChanges as j } from "./index109.js";
@@ -1,6 +1,6 @@
1
- import { getAction as c } from "./index271.js";
2
- import { observe as p } from "./index273.js";
3
- import { poll as b } from "./index274.js";
1
+ import { getAction as c } from "./index276.js";
2
+ import { observe as p } from "./index278.js";
3
+ import { poll as b } from "./index279.js";
4
4
  import { stringify as m } from "./index168.js";
5
5
  import { createPendingTransactionFilter as d } from "./index94.js";
6
6
  import { getFilterChanges as h } from "./index109.js";
@@ -1,7 +1,7 @@
1
1
  import { hashMessage as g } from "./index247.js";
2
- import { parseSiweMessage as l } from "./index294.js";
3
- import { validateSiweMessage as p } from "./index295.js";
4
- import { verifyHash as h } from "./index293.js";
2
+ import { parseSiweMessage as l } from "./index299.js";
3
+ import { validateSiweMessage as p } from "./index300.js";
4
+ import { verifyHash as h } from "./index298.js";
5
5
  async function S(a, r) {
6
6
  const { address: i, domain: t, message: s, nonce: o, scheme: n, signature: d, time: m = /* @__PURE__ */ new Date(), ...f } = r, e = l(s);
7
7
  if (!e.address || !p({
@@ -8,7 +8,7 @@ import { blobsToCommitments as q } from "./index229.js";
8
8
  import { blobsToProofs as V } from "./index233.js";
9
9
  import { commitmentsToVersionedHashes as _ } from "./index232.js";
10
10
  import { toBlobSidecars as B } from "./index234.js";
11
- import { getAction as p } from "./index271.js";
11
+ import { getAction as p } from "./index276.js";
12
12
  import { assertRequest as E } from "./index222.js";
13
13
  import { getTransactionType as M } from "./index211.js";
14
14
  import { getChainId as N } from "./index104.js";
@@ -2,7 +2,7 @@ import { BaseError as $ } from "./index147.js";
2
2
  import { HttpRequestError as M } from "./index78.js";
3
3
  import { MethodNotSupportedRpcError as c, UnknownRpcError as g, UserRejectedRequestError as s, AtomicityNotSupportedError as h, AtomicReadyWalletRejectedUpgradeError as p, BundleTooLargeError as f, UnknownBundleIdError as E, DuplicateIdError as m, UnsupportedChainIdError as l, UnsupportedNonOptionalCapabilityError as R, SwitchChainError as y, ChainDisconnectedError as I, ProviderDisconnectedError as U, UnsupportedProviderMethodError as v, UnauthorizedProviderError as b, JsonRpcVersionUnsupportedError as N, LimitExceededRpcError as u, TransactionRejectedRpcError as q, ResourceUnavailableRpcError as C, ResourceNotFoundRpcError as D, InvalidInputRpcError as P, InternalRpcError as a, InvalidParamsRpcError as x, MethodNotFoundRpcError as A, InvalidRequestRpcError as j, ParseRpcError as B } from "./index161.js";
4
4
  import { stringToHex as z } from "./index174.js";
5
- import { withDedupe as J } from "./index296.js";
5
+ import { withDedupe as J } from "./index301.js";
6
6
  import { withRetry as O } from "./index240.js";
7
7
  import { stringify as V } from "./index168.js";
8
8
  function ee(r, S = {}) {
@@ -1,10 +1,11 @@
1
- import p from "./index73.js";
1
+ import E from "./index73.js";
2
2
  import { getFramework as m } from "./index74.js";
3
- const y = "1f8d3e558f493e38a037dbfadb8ba344", v = "d473b1dcc969105adab157226cd9cf63", i = Symbol.for("@coinbase/cdp-analytics");
4
- function g() {
5
- const t = globalThis;
6
- return t[i] || (t[i] = {
7
- identifier: "",
3
+ const v = "1f8d3e558f493e38a037dbfadb8ba344", y = "d473b1dcc969105adab157226cd9cf63", i = Symbol.for("@coinbase/cdp-analytics");
4
+ function u() {
5
+ const n = globalThis;
6
+ return n[i] || (n[i] = {
7
+ developerIdentifier: "",
8
+ endUserIdentifier: "",
8
9
  enabled: !0,
9
10
  isProduction: !1,
10
11
  isUsingMocks: !1,
@@ -12,33 +13,37 @@ function g() {
12
13
  sendActionCallEvent: (e) => o({ ...e, type: "action_call" }),
13
14
  sendHookCallEvent: (e) => o({ ...e, type: "hook_call" }),
14
15
  sendComponentCallEvent: (e) => o({ ...e, type: "component_call" }),
16
+ sendSessionRefreshEvent: (e) => o({ ...e, type: "session_refresh" }),
15
17
  versionRegistry: {},
16
18
  registerPackageVersion: (e, s) => {
17
- n.versionRegistry[e] = s;
19
+ t.versionRegistry[e] = s;
18
20
  }
19
- }), t[i];
21
+ }), n[i];
20
22
  }
21
- const n = g();
22
- async function o(t) {
23
- if (!n.enabled || !n.identifier)
23
+ const t = u(), _ = /* @__PURE__ */ new Set(["session_refresh"]);
24
+ async function o(n) {
25
+ if (!t.enabled)
26
+ return;
27
+ const s = _.has(n.type) ? t.endUserIdentifier : t.developerIdentifier;
28
+ if (!s)
24
29
  return;
25
- const e = Date.now(), r = [{
26
- user_id: n.identifier,
27
- event_type: t.type,
28
- platform: c() ? "web" : "native",
29
- timestamp: e,
30
+ const a = Date.now(), d = [{
31
+ user_id: s,
32
+ event_type: n.type,
33
+ platform: r() ? "web" : "native",
34
+ timestamp: a,
30
35
  event_properties: {
31
36
  project_name: "cdp-embedded-wallet",
32
37
  framework: m(),
33
- isLocalHost: u(),
34
- isUsingMocks: n.isUsingMocks,
35
- package_versions: n.versionRegistry,
36
- ...t
38
+ isLocalHost: g(),
39
+ isUsingMocks: t.isUsingMocks,
40
+ package_versions: t.versionRegistry,
41
+ ...n
37
42
  }
38
- }], a = JSON.stringify(r), d = e.toString(), l = p(a + d), f = {
39
- client: n.isProduction ? v : y,
40
- e: a,
41
- checksum: l
43
+ }], c = JSON.stringify(d), l = a.toString(), f = E(c + l), p = {
44
+ client: t.isProduction ? y : v,
45
+ e: c,
46
+ checksum: f
42
47
  };
43
48
  await fetch("https://cca-lite.coinbase.com/amp", {
44
49
  method: "POST",
@@ -46,15 +51,15 @@ async function o(t) {
46
51
  headers: {
47
52
  "Content-Type": "application/json"
48
53
  },
49
- body: JSON.stringify(f)
54
+ body: JSON.stringify(p)
50
55
  });
51
56
  }
52
- function c() {
57
+ function r() {
53
58
  return typeof window < "u" && typeof document < "u";
54
59
  }
55
- function u() {
56
- return c() ? window.location.hostname === "localhost" || window.location.hostname === "127.0.0.1" : !1;
60
+ function g() {
61
+ return r() ? window.location.hostname === "localhost" || window.location.hostname === "127.0.0.1" : !1;
57
62
  }
58
63
  export {
59
- n as Analytics
64
+ t as Analytics
60
65
  };
@@ -1,6 +1,6 @@
1
- import { sha256 as v } from "./index297.js";
2
- import { createCurve as G } from "./index298.js";
3
- import { Field as P, mod as h, pow2 as t } from "./index299.js";
1
+ import { sha256 as v } from "./index302.js";
2
+ import { createCurve as G } from "./index303.js";
3
+ import { Field as P, mod as h, pow2 as t } from "./index304.js";
4
4
  const B = {
5
5
  p: BigInt("0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffc2f"),
6
6
  n: BigInt("0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141"),
@@ -1,5 +1,5 @@
1
- import { hashSignature as t } from "./index300.js";
2
- import { toSignature as o } from "./index301.js";
1
+ import { hashSignature as t } from "./index305.js";
2
+ import { toSignature as o } from "./index306.js";
3
3
  function a(r) {
4
4
  return t(o(r));
5
5
  }
@@ -1,5 +1,5 @@
1
- import { split as L, rotlSH as T, rotlSL as S, rotlBH as m, rotlBL as F } from "./index303.js";
2
- import { createHasher as X, Hash as E, anumber as d, u32 as U, swap32IfBE as I, aexists as x, toBytes as P, abytes as k, aoutput as M, clean as y } from "./index304.js";
1
+ import { split as L, rotlSH as T, rotlSL as S, rotlBH as m, rotlBL as F } from "./index308.js";
2
+ import { createHasher as X, Hash as E, anumber as d, u32 as U, swap32IfBE as I, aexists as x, toBytes as P, abytes as k, aoutput as M, clean as y } from "./index309.js";
3
3
  const R = BigInt(0), f = BigInt(1), j = BigInt(2), q = BigInt(7), v = BigInt(256), z = BigInt(113), _ = [], g = [], B = [];
4
4
  for (let n = 0, t = f, s = 1, i = 0; n < 24; n++) {
5
5
  [s, i] = [i, (2 * s + 3 * i) % 5], _.push(2 * (5 * i + s)), g.push((n + 1) * (n + 2) / 2 % 64);
@@ -1,4 +1,4 @@
1
- import { sha256 as s } from "./index297.js";
1
+ import { sha256 as s } from "./index302.js";
2
2
  const o = s;
3
3
  export {
4
4
  o as sha256
@@ -1,6 +1,6 @@
1
- import { contracts as o } from "./index305.js";
2
- import { formatters as r } from "./index306.js";
3
- import { serializers as t } from "./index307.js";
1
+ import { contracts as o } from "./index310.js";
2
+ import { formatters as r } from "./index311.js";
3
+ import { serializers as t } from "./index312.js";
4
4
  const e = {
5
5
  blockTime: 2e3,
6
6
  contracts: o,
@@ -1,43 +1,41 @@
1
- import { version as u } from "./index256.js";
2
- class a extends Error {
3
- constructor(i, e = {}) {
4
- const t = e.cause instanceof a ? e.cause.details : e.cause?.message ? e.cause.message : e.details, s = e.cause instanceof a && e.cause.docsPath || e.docsPath, r = [
5
- i || "An error occurred.",
6
- "",
7
- ...e.metaMessages ? [...e.metaMessages, ""] : [],
8
- ...s ? [`Docs: https://abitype.dev${s}`] : [],
9
- ...t ? [`Details: ${t}`] : [],
10
- `Version: abitype@${u}`
11
- ].join(`
12
- `);
13
- super(r), Object.defineProperty(this, "details", {
14
- enumerable: !0,
15
- configurable: !0,
16
- writable: !0,
17
- value: void 0
18
- }), Object.defineProperty(this, "docsPath", {
19
- enumerable: !0,
20
- configurable: !0,
21
- writable: !0,
22
- value: void 0
23
- }), Object.defineProperty(this, "metaMessages", {
24
- enumerable: !0,
25
- configurable: !0,
26
- writable: !0,
27
- value: void 0
28
- }), Object.defineProperty(this, "shortMessage", {
29
- enumerable: !0,
30
- configurable: !0,
31
- writable: !0,
32
- value: void 0
33
- }), Object.defineProperty(this, "name", {
34
- enumerable: !0,
35
- configurable: !0,
36
- writable: !0,
37
- value: "AbiTypeError"
38
- }), e.cause && (this.cause = e.cause), this.details = t, this.docsPath = s, this.metaMessages = e.metaMessages, this.shortMessage = i;
39
- }
1
+ import { __module as h } from "./index256.js";
2
+ import { __require as S } from "./index257.js";
3
+ import { __require as q } from "./index258.js";
4
+ import { __require as w } from "./index259.js";
5
+ var x;
6
+ function G() {
7
+ return x ? h.exports : (x = 1, function() {
8
+ var v = S(), p = q().utf8, B = w(), F = q().bin, d = function(o, f) {
9
+ o.constructor == String ? f && f.encoding === "binary" ? o = F.stringToBytes(o) : o = p.stringToBytes(o) : B(o) ? o = Array.prototype.slice.call(o, 0) : !Array.isArray(o) && o.constructor !== Uint8Array && (o = o.toString());
10
+ for (var u = v.bytesToWords(o), a = o.length * 8, n = 1732584193, r = -271733879, i = -1732584194, t = 271733878, e = 0; e < u.length; e++)
11
+ u[e] = (u[e] << 8 | u[e] >>> 24) & 16711935 | (u[e] << 24 | u[e] >>> 8) & 4278255360;
12
+ u[a >>> 5] |= 128 << a % 32, u[(a + 64 >>> 9 << 4) + 14] = a;
13
+ for (var _ = d._ff, c = d._gg, l = d._hh, y = d._ii, e = 0; e < u.length; e += 16) {
14
+ var T = n, b = r, A = i, I = t;
15
+ n = _(n, r, i, t, u[e + 0], 7, -680876936), t = _(t, n, r, i, u[e + 1], 12, -389564586), i = _(i, t, n, r, u[e + 2], 17, 606105819), r = _(r, i, t, n, u[e + 3], 22, -1044525330), n = _(n, r, i, t, u[e + 4], 7, -176418897), t = _(t, n, r, i, u[e + 5], 12, 1200080426), i = _(i, t, n, r, u[e + 6], 17, -1473231341), r = _(r, i, t, n, u[e + 7], 22, -45705983), n = _(n, r, i, t, u[e + 8], 7, 1770035416), t = _(t, n, r, i, u[e + 9], 12, -1958414417), i = _(i, t, n, r, u[e + 10], 17, -42063), r = _(r, i, t, n, u[e + 11], 22, -1990404162), n = _(n, r, i, t, u[e + 12], 7, 1804603682), t = _(t, n, r, i, u[e + 13], 12, -40341101), i = _(i, t, n, r, u[e + 14], 17, -1502002290), r = _(r, i, t, n, u[e + 15], 22, 1236535329), n = c(n, r, i, t, u[e + 1], 5, -165796510), t = c(t, n, r, i, u[e + 6], 9, -1069501632), i = c(i, t, n, r, u[e + 11], 14, 643717713), r = c(r, i, t, n, u[e + 0], 20, -373897302), n = c(n, r, i, t, u[e + 5], 5, -701558691), t = c(t, n, r, i, u[e + 10], 9, 38016083), i = c(i, t, n, r, u[e + 15], 14, -660478335), r = c(r, i, t, n, u[e + 4], 20, -405537848), n = c(n, r, i, t, u[e + 9], 5, 568446438), t = c(t, n, r, i, u[e + 14], 9, -1019803690), i = c(i, t, n, r, u[e + 3], 14, -187363961), r = c(r, i, t, n, u[e + 8], 20, 1163531501), n = c(n, r, i, t, u[e + 13], 5, -1444681467), t = c(t, n, r, i, u[e + 2], 9, -51403784), i = c(i, t, n, r, u[e + 7], 14, 1735328473), r = c(r, i, t, n, u[e + 12], 20, -1926607734), n = l(n, r, i, t, u[e + 5], 4, -378558), t = l(t, n, r, i, u[e + 8], 11, -2022574463), i = l(i, t, n, r, u[e + 11], 16, 1839030562), r = l(r, i, t, n, u[e + 14], 23, -35309556), n = l(n, r, i, t, u[e + 1], 4, -1530992060), t = l(t, n, r, i, u[e + 4], 11, 1272893353), i = l(i, t, n, r, u[e + 7], 16, -155497632), r = l(r, i, t, n, u[e + 10], 23, -1094730640), n = l(n, r, i, t, u[e + 13], 4, 681279174), t = l(t, n, r, i, u[e + 0], 11, -358537222), i = l(i, t, n, r, u[e + 3], 16, -722521979), r = l(r, i, t, n, u[e + 6], 23, 76029189), n = l(n, r, i, t, u[e + 9], 4, -640364487), t = l(t, n, r, i, u[e + 12], 11, -421815835), i = l(i, t, n, r, u[e + 15], 16, 530742520), r = l(r, i, t, n, u[e + 2], 23, -995338651), n = y(n, r, i, t, u[e + 0], 6, -198630844), t = y(t, n, r, i, u[e + 7], 10, 1126891415), i = y(i, t, n, r, u[e + 14], 15, -1416354905), r = y(r, i, t, n, u[e + 5], 21, -57434055), n = y(n, r, i, t, u[e + 12], 6, 1700485571), t = y(t, n, r, i, u[e + 3], 10, -1894986606), i = y(i, t, n, r, u[e + 10], 15, -1051523), r = y(r, i, t, n, u[e + 1], 21, -2054922799), n = y(n, r, i, t, u[e + 8], 6, 1873313359), t = y(t, n, r, i, u[e + 15], 10, -30611744), i = y(i, t, n, r, u[e + 6], 15, -1560198380), r = y(r, i, t, n, u[e + 13], 21, 1309151649), n = y(n, r, i, t, u[e + 4], 6, -145523070), t = y(t, n, r, i, u[e + 11], 10, -1120210379), i = y(i, t, n, r, u[e + 2], 15, 718787259), r = y(r, i, t, n, u[e + 9], 21, -343485551), n = n + T >>> 0, r = r + b >>> 0, i = i + A >>> 0, t = t + I >>> 0;
16
+ }
17
+ return v.endian([n, r, i, t]);
18
+ };
19
+ d._ff = function(o, f, u, a, n, r, i) {
20
+ var t = o + (f & u | ~f & a) + (n >>> 0) + i;
21
+ return (t << r | t >>> 32 - r) + f;
22
+ }, d._gg = function(o, f, u, a, n, r, i) {
23
+ var t = o + (f & a | u & ~a) + (n >>> 0) + i;
24
+ return (t << r | t >>> 32 - r) + f;
25
+ }, d._hh = function(o, f, u, a, n, r, i) {
26
+ var t = o + (f ^ u ^ a) + (n >>> 0) + i;
27
+ return (t << r | t >>> 32 - r) + f;
28
+ }, d._ii = function(o, f, u, a, n, r, i) {
29
+ var t = o + (u ^ (f | ~a)) + (n >>> 0) + i;
30
+ return (t << r | t >>> 32 - r) + f;
31
+ }, d._blocksize = 16, d._digestsize = 16, h.exports = function(o, f) {
32
+ if (o == null)
33
+ throw new Error("Illegal argument " + o);
34
+ var u = v.wordsToBytes(d(o, f));
35
+ return f && f.asBytes ? u : f && f.asString ? F.bytesToString(u) : v.bytesToHex(u);
36
+ };
37
+ }(), h.exports);
40
38
  }
41
39
  export {
42
- a as BaseError
40
+ G as __require
43
41
  };
@@ -1,4 +1,4 @@
1
- const o = "1.0.8";
1
+ var e = { exports: {} };
2
2
  export {
3
- o as version
3
+ e as __module
4
4
  };
@@ -1,7 +1,72 @@
1
- import { formatAbiParameters as r } from "./index258.js";
2
- function e(t) {
3
- return t.type === "function" ? `function ${t.name}(${r(t.inputs)})${t.stateMutability && t.stateMutability !== "nonpayable" ? ` ${t.stateMutability}` : ""}${t.outputs?.length ? ` returns (${r(t.outputs)})` : ""}` : t.type === "event" ? `event ${t.name}(${r(t.inputs)})` : t.type === "error" ? `error ${t.name}(${r(t.inputs)})` : t.type === "constructor" ? `constructor(${r(t.inputs)})${t.stateMutability === "payable" ? " payable" : ""}` : t.type === "fallback" ? `fallback() external${t.stateMutability === "payable" ? " payable" : ""}` : "receive() external payable";
1
+ import { __module as a } from "./index313.js";
2
+ var h;
3
+ function c() {
4
+ return h ? a.exports : (h = 1, function() {
5
+ var f = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/", u = {
6
+ // Bit-wise rotation left
7
+ rotl: function(r, t) {
8
+ return r << t | r >>> 32 - t;
9
+ },
10
+ // Bit-wise rotation right
11
+ rotr: function(r, t) {
12
+ return r << 32 - t | r >>> t;
13
+ },
14
+ // Swap big-endian to little-endian and vice versa
15
+ endian: function(r) {
16
+ if (r.constructor == Number)
17
+ return u.rotl(r, 8) & 16711935 | u.rotl(r, 24) & 4278255360;
18
+ for (var t = 0; t < r.length; t++)
19
+ r[t] = u.endian(r[t]);
20
+ return r;
21
+ },
22
+ // Generate an array of any length of random bytes
23
+ randomBytes: function(r) {
24
+ for (var t = []; r > 0; r--)
25
+ t.push(Math.floor(Math.random() * 256));
26
+ return t;
27
+ },
28
+ // Convert a byte array to big-endian 32-bit words
29
+ bytesToWords: function(r) {
30
+ for (var t = [], n = 0, o = 0; n < r.length; n++, o += 8)
31
+ t[o >>> 5] |= r[n] << 24 - o % 32;
32
+ return t;
33
+ },
34
+ // Convert big-endian 32-bit words to a byte array
35
+ wordsToBytes: function(r) {
36
+ for (var t = [], n = 0; n < r.length * 32; n += 8)
37
+ t.push(r[n >>> 5] >>> 24 - n % 32 & 255);
38
+ return t;
39
+ },
40
+ // Convert a byte array to a hex string
41
+ bytesToHex: function(r) {
42
+ for (var t = [], n = 0; n < r.length; n++)
43
+ t.push((r[n] >>> 4).toString(16)), t.push((r[n] & 15).toString(16));
44
+ return t.join("");
45
+ },
46
+ // Convert a hex string to a byte array
47
+ hexToBytes: function(r) {
48
+ for (var t = [], n = 0; n < r.length; n += 2)
49
+ t.push(parseInt(r.substr(n, 2), 16));
50
+ return t;
51
+ },
52
+ // Convert a byte array to a base-64 string
53
+ bytesToBase64: function(r) {
54
+ for (var t = [], n = 0; n < r.length; n += 3)
55
+ for (var o = r[n] << 16 | r[n + 1] << 8 | r[n + 2], e = 0; e < 4; e++)
56
+ n * 8 + e * 6 <= r.length * 8 ? t.push(f.charAt(o >>> 6 * (3 - e) & 63)) : t.push("=");
57
+ return t.join("");
58
+ },
59
+ // Convert a base-64 string to a byte array
60
+ base64ToBytes: function(r) {
61
+ r = r.replace(/[^A-Z0-9+\/]/ig, "");
62
+ for (var t = [], n = 0, o = 0; n < r.length; o = ++n % 4)
63
+ o != 0 && t.push((f.indexOf(r.charAt(n - 1)) & Math.pow(2, -2 * o + 8) - 1) << o * 2 | f.indexOf(r.charAt(n)) >>> 6 - o * 2);
64
+ return t;
65
+ }
66
+ };
67
+ a.exports = u;
68
+ }(), a.exports);
4
69
  }
5
70
  export {
6
- e as formatAbiItem
71
+ c as __require
7
72
  };
@@ -1,13 +1,37 @@
1
- import { formatAbiParameter as m } from "./index259.js";
2
- function f(e) {
3
- let r = "";
4
- const o = e.length;
5
- for (let t = 0; t < o; t++) {
6
- const a = e[t];
7
- r += m(a), t !== o - 1 && (r += ", ");
8
- }
9
- return r;
1
+ var o, u;
2
+ function c() {
3
+ if (u) return o;
4
+ u = 1;
5
+ var t = {
6
+ // UTF-8 encoding
7
+ utf8: {
8
+ // Convert a string to a byte array
9
+ stringToBytes: function(n) {
10
+ return t.bin.stringToBytes(unescape(encodeURIComponent(n)));
11
+ },
12
+ // Convert a byte array to a string
13
+ bytesToString: function(n) {
14
+ return decodeURIComponent(escape(t.bin.bytesToString(n)));
15
+ }
16
+ },
17
+ // Binary encoding
18
+ bin: {
19
+ // Convert a string to a byte array
20
+ stringToBytes: function(n) {
21
+ for (var e = [], r = 0; r < n.length; r++)
22
+ e.push(n.charCodeAt(r) & 255);
23
+ return e;
24
+ },
25
+ // Convert a byte array to a string
26
+ bytesToString: function(n) {
27
+ for (var e = [], r = 0; r < n.length; r++)
28
+ e.push(String.fromCharCode(n[r]));
29
+ return e.join("");
30
+ }
31
+ }
32
+ };
33
+ return o = t, o;
10
34
  }
11
35
  export {
12
- f as formatAbiParameters
36
+ c as __require
13
37
  };