@xyo-network/react-storybook 2.61.0 → 2.62.3

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 (175) hide show
  1. package/dist/DeprecateStory.d.mts.map +1 -0
  2. package/dist/DeprecateStory.d.ts +5 -0
  3. package/dist/DeprecateStory.d.ts.map +1 -0
  4. package/dist/WithMapboxSetup.d.mts.map +1 -0
  5. package/dist/WithMapboxSetup.d.ts +3 -0
  6. package/dist/WithMapboxSetup.d.ts.map +1 -0
  7. package/dist/WithRefDecorator.d.mts.map +1 -0
  8. package/dist/WithRefDecorator.d.ts +3 -0
  9. package/dist/WithRefDecorator.d.ts.map +1 -0
  10. package/dist/defaultSeedPhrase.d.mts.map +1 -0
  11. package/dist/defaultSeedPhrase.d.ts +2 -0
  12. package/dist/defaultSeedPhrase.d.ts.map +1 -0
  13. package/dist/docs.json +8680 -0
  14. package/dist/index.d.mts.map +1 -0
  15. package/dist/{esm/index.js → index.d.ts} +1 -1
  16. package/dist/index.d.ts.map +1 -0
  17. package/dist/index.js +896 -0
  18. package/dist/index.js.map +1 -0
  19. package/dist/index.mjs +846 -0
  20. package/dist/index.mjs.map +1 -0
  21. package/dist/sampleAddressHistory.d.mts.map +1 -0
  22. package/dist/sampleAddressHistory.d.ts +35 -0
  23. package/dist/sampleAddressHistory.d.ts.map +1 -0
  24. package/dist/sampleBlock.d.mts.map +1 -0
  25. package/dist/sampleBlock.d.ts +7 -0
  26. package/dist/sampleBlock.d.ts.map +1 -0
  27. package/dist/sampleCoinGeckoPayload.d.mts.map +1 -0
  28. package/dist/sampleCoinGeckoPayload.d.ts +73 -0
  29. package/dist/sampleCoinGeckoPayload.d.ts.map +1 -0
  30. package/dist/sampleEthereumGasDivinerPayload.d.mts.map +1 -0
  31. package/dist/sampleEthereumGasDivinerPayload.d.ts +24 -0
  32. package/dist/sampleEthereumGasDivinerPayload.d.ts.map +1 -0
  33. package/dist/sampleGasPricePayloads/blocknative.d.mts.map +1 -0
  34. package/dist/sampleGasPricePayloads/blocknative.d.ts +68 -0
  35. package/dist/sampleGasPricePayloads/blocknative.d.ts.map +1 -0
  36. package/dist/sampleGasPricePayloads/ethGasStation.d.mts.map +1 -0
  37. package/dist/sampleGasPricePayloads/ethGasStation.d.ts +19 -0
  38. package/dist/sampleGasPricePayloads/ethGasStation.d.ts.map +1 -0
  39. package/dist/sampleGasPricePayloads/etherchainV1.d.mts.map +1 -0
  40. package/dist/sampleGasPricePayloads/etherchainV1.d.ts +11 -0
  41. package/dist/sampleGasPricePayloads/etherchainV1.d.ts.map +1 -0
  42. package/dist/sampleGasPricePayloads/etherchainV2.d.mts.map +1 -0
  43. package/dist/sampleGasPricePayloads/etherchainV2.d.ts +14 -0
  44. package/dist/sampleGasPricePayloads/etherchainV2.d.ts.map +1 -0
  45. package/dist/sampleGasPricePayloads/ethers.d.mts.map +1 -0
  46. package/dist/sampleGasPricePayloads/ethers.d.ts +9 -0
  47. package/dist/sampleGasPricePayloads/ethers.d.ts.map +1 -0
  48. package/dist/sampleGasPricePayloads/etherscan.d.mts.map +1 -0
  49. package/dist/sampleGasPricePayloads/etherscan.d.ts +15 -0
  50. package/dist/sampleGasPricePayloads/etherscan.d.ts.map +1 -0
  51. package/dist/sampleGasPricePayloads/index.d.mts.map +1 -0
  52. package/dist/{esm/sampleGasPricePayloads/index.js → sampleGasPricePayloads/index.d.ts} +1 -1
  53. package/dist/sampleGasPricePayloads/index.d.ts.map +1 -0
  54. package/dist/samplePayload.d.mts.map +1 -0
  55. package/dist/samplePayload.d.ts +31 -0
  56. package/dist/samplePayload.d.ts.map +1 -0
  57. package/dist/sampleUniswapPayload.d.mts.map +1 -0
  58. package/dist/sampleUniswapPayload.d.ts +17 -0
  59. package/dist/sampleUniswapPayload.d.ts.map +1 -0
  60. package/dist/useAppThemeDecorator.d.mts.map +1 -0
  61. package/dist/useAppThemeDecorator.d.ts +4 -0
  62. package/dist/useAppThemeDecorator.d.ts.map +1 -0
  63. package/package.json +32 -24
  64. package/dist/cjs/DeprecateStory.js +0 -10
  65. package/dist/cjs/DeprecateStory.js.map +0 -1
  66. package/dist/cjs/WithMapboxSetup.js +0 -10
  67. package/dist/cjs/WithMapboxSetup.js.map +0 -1
  68. package/dist/cjs/WithRefDecorator.js +0 -18
  69. package/dist/cjs/WithRefDecorator.js.map +0 -1
  70. package/dist/cjs/defaultSeedPhrase.js +0 -6
  71. package/dist/cjs/defaultSeedPhrase.js.map +0 -1
  72. package/dist/cjs/index.js +0 -16
  73. package/dist/cjs/index.js.map +0 -1
  74. package/dist/cjs/sampleAddressHistory.js +0 -117
  75. package/dist/cjs/sampleAddressHistory.js.map +0 -1
  76. package/dist/cjs/sampleBlock.js +0 -93
  77. package/dist/cjs/sampleBlock.js.map +0 -1
  78. package/dist/cjs/sampleCoinGeckoPayload.js +0 -76
  79. package/dist/cjs/sampleCoinGeckoPayload.js.map +0 -1
  80. package/dist/cjs/sampleEthereumGasDivinerPayload.js +0 -27
  81. package/dist/cjs/sampleEthereumGasDivinerPayload.js.map +0 -1
  82. package/dist/cjs/sampleGasPricePayloads/blocknative.js +0 -95
  83. package/dist/cjs/sampleGasPricePayloads/blocknative.js.map +0 -1
  84. package/dist/cjs/sampleGasPricePayloads/ethGasStation.js +0 -22
  85. package/dist/cjs/sampleGasPricePayloads/ethGasStation.js.map +0 -1
  86. package/dist/cjs/sampleGasPricePayloads/etherchainV1.js +0 -14
  87. package/dist/cjs/sampleGasPricePayloads/etherchainV1.js.map +0 -1
  88. package/dist/cjs/sampleGasPricePayloads/etherchainV2.js +0 -17
  89. package/dist/cjs/sampleGasPricePayloads/etherchainV2.js.map +0 -1
  90. package/dist/cjs/sampleGasPricePayloads/ethers.js +0 -12
  91. package/dist/cjs/sampleGasPricePayloads/ethers.js.map +0 -1
  92. package/dist/cjs/sampleGasPricePayloads/etherscan.js +0 -18
  93. package/dist/cjs/sampleGasPricePayloads/etherscan.js.map +0 -1
  94. package/dist/cjs/sampleGasPricePayloads/index.js +0 -10
  95. package/dist/cjs/sampleGasPricePayloads/index.js.map +0 -1
  96. package/dist/cjs/samplePayload.js +0 -30
  97. package/dist/cjs/samplePayload.js.map +0 -1
  98. package/dist/cjs/sampleUniswapPayload.js +0 -197
  99. package/dist/cjs/sampleUniswapPayload.js.map +0 -1
  100. package/dist/cjs/useAppThemeDecorator.js +0 -15
  101. package/dist/cjs/useAppThemeDecorator.js.map +0 -1
  102. package/dist/esm/DeprecateStory.js +0 -6
  103. package/dist/esm/DeprecateStory.js.map +0 -1
  104. package/dist/esm/WithMapboxSetup.js +0 -6
  105. package/dist/esm/WithMapboxSetup.js.map +0 -1
  106. package/dist/esm/WithRefDecorator.js +0 -14
  107. package/dist/esm/WithRefDecorator.js.map +0 -1
  108. package/dist/esm/defaultSeedPhrase.js +0 -3
  109. package/dist/esm/defaultSeedPhrase.js.map +0 -1
  110. package/dist/esm/index.js.map +0 -1
  111. package/dist/esm/sampleAddressHistory.js +0 -114
  112. package/dist/esm/sampleAddressHistory.js.map +0 -1
  113. package/dist/esm/sampleBlock.js +0 -90
  114. package/dist/esm/sampleBlock.js.map +0 -1
  115. package/dist/esm/sampleCoinGeckoPayload.js +0 -73
  116. package/dist/esm/sampleCoinGeckoPayload.js.map +0 -1
  117. package/dist/esm/sampleEthereumGasDivinerPayload.js +0 -24
  118. package/dist/esm/sampleEthereumGasDivinerPayload.js.map +0 -1
  119. package/dist/esm/sampleGasPricePayloads/blocknative.js +0 -92
  120. package/dist/esm/sampleGasPricePayloads/blocknative.js.map +0 -1
  121. package/dist/esm/sampleGasPricePayloads/ethGasStation.js +0 -19
  122. package/dist/esm/sampleGasPricePayloads/ethGasStation.js.map +0 -1
  123. package/dist/esm/sampleGasPricePayloads/etherchainV1.js +0 -11
  124. package/dist/esm/sampleGasPricePayloads/etherchainV1.js.map +0 -1
  125. package/dist/esm/sampleGasPricePayloads/etherchainV2.js +0 -14
  126. package/dist/esm/sampleGasPricePayloads/etherchainV2.js.map +0 -1
  127. package/dist/esm/sampleGasPricePayloads/ethers.js +0 -9
  128. package/dist/esm/sampleGasPricePayloads/ethers.js.map +0 -1
  129. package/dist/esm/sampleGasPricePayloads/etherscan.js +0 -15
  130. package/dist/esm/sampleGasPricePayloads/etherscan.js.map +0 -1
  131. package/dist/esm/sampleGasPricePayloads/index.js.map +0 -1
  132. package/dist/esm/samplePayload.js +0 -30
  133. package/dist/esm/samplePayload.js.map +0 -1
  134. package/dist/esm/sampleUniswapPayload.js +0 -194
  135. package/dist/esm/sampleUniswapPayload.js.map +0 -1
  136. package/dist/esm/useAppThemeDecorator.js +0 -12
  137. package/dist/esm/useAppThemeDecorator.js.map +0 -1
  138. package/dist/types/DeprecateStory.d.ts.map +0 -1
  139. package/dist/types/WithMapboxSetup.d.ts.map +0 -1
  140. package/dist/types/WithRefDecorator.d.ts.map +0 -1
  141. package/dist/types/defaultSeedPhrase.d.ts.map +0 -1
  142. package/dist/types/index.d.ts.map +0 -1
  143. package/dist/types/sampleAddressHistory.d.ts.map +0 -1
  144. package/dist/types/sampleBlock.d.ts.map +0 -1
  145. package/dist/types/sampleCoinGeckoPayload.d.ts.map +0 -1
  146. package/dist/types/sampleEthereumGasDivinerPayload.d.ts.map +0 -1
  147. package/dist/types/sampleGasPricePayloads/blocknative.d.ts.map +0 -1
  148. package/dist/types/sampleGasPricePayloads/ethGasStation.d.ts.map +0 -1
  149. package/dist/types/sampleGasPricePayloads/etherchainV1.d.ts.map +0 -1
  150. package/dist/types/sampleGasPricePayloads/etherchainV2.d.ts.map +0 -1
  151. package/dist/types/sampleGasPricePayloads/ethers.d.ts.map +0 -1
  152. package/dist/types/sampleGasPricePayloads/etherscan.d.ts.map +0 -1
  153. package/dist/types/sampleGasPricePayloads/index.d.ts.map +0 -1
  154. package/dist/types/samplePayload.d.ts.map +0 -1
  155. package/dist/types/sampleUniswapPayload.d.ts.map +0 -1
  156. package/dist/types/useAppThemeDecorator.d.ts.map +0 -1
  157. /package/dist/{types/DeprecateStory.d.ts → DeprecateStory.d.mts} +0 -0
  158. /package/dist/{types/WithMapboxSetup.d.ts → WithMapboxSetup.d.mts} +0 -0
  159. /package/dist/{types/WithRefDecorator.d.ts → WithRefDecorator.d.mts} +0 -0
  160. /package/dist/{types/defaultSeedPhrase.d.ts → defaultSeedPhrase.d.mts} +0 -0
  161. /package/dist/{types/index.d.ts → index.d.mts} +0 -0
  162. /package/dist/{types/sampleAddressHistory.d.ts → sampleAddressHistory.d.mts} +0 -0
  163. /package/dist/{types/sampleBlock.d.ts → sampleBlock.d.mts} +0 -0
  164. /package/dist/{types/sampleCoinGeckoPayload.d.ts → sampleCoinGeckoPayload.d.mts} +0 -0
  165. /package/dist/{types/sampleEthereumGasDivinerPayload.d.ts → sampleEthereumGasDivinerPayload.d.mts} +0 -0
  166. /package/dist/{types/sampleGasPricePayloads/blocknative.d.ts → sampleGasPricePayloads/blocknative.d.mts} +0 -0
  167. /package/dist/{types/sampleGasPricePayloads/ethGasStation.d.ts → sampleGasPricePayloads/ethGasStation.d.mts} +0 -0
  168. /package/dist/{types/sampleGasPricePayloads/etherchainV1.d.ts → sampleGasPricePayloads/etherchainV1.d.mts} +0 -0
  169. /package/dist/{types/sampleGasPricePayloads/etherchainV2.d.ts → sampleGasPricePayloads/etherchainV2.d.mts} +0 -0
  170. /package/dist/{types/sampleGasPricePayloads/ethers.d.ts → sampleGasPricePayloads/ethers.d.mts} +0 -0
  171. /package/dist/{types/sampleGasPricePayloads/etherscan.d.ts → sampleGasPricePayloads/etherscan.d.mts} +0 -0
  172. /package/dist/{types/sampleGasPricePayloads/index.d.ts → sampleGasPricePayloads/index.d.mts} +0 -0
  173. /package/dist/{types/samplePayload.d.ts → samplePayload.d.mts} +0 -0
  174. /package/dist/{types/sampleUniswapPayload.d.ts → sampleUniswapPayload.d.mts} +0 -0
  175. /package/dist/{types/useAppThemeDecorator.d.ts → useAppThemeDecorator.d.mts} +0 -0
package/dist/index.js ADDED
@@ -0,0 +1,896 @@
1
+ "use strict";
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __export = (target, all) => {
7
+ for (var name in all)
8
+ __defProp(target, name, { get: all[name], enumerable: true });
9
+ };
10
+ var __copyProps = (to, from, except, desc) => {
11
+ if (from && typeof from === "object" || typeof from === "function") {
12
+ for (let key of __getOwnPropNames(from))
13
+ if (!__hasOwnProp.call(to, key) && key !== except)
14
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
+ }
16
+ return to;
17
+ };
18
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
+
20
+ // src/index.ts
21
+ var src_exports = {};
22
+ __export(src_exports, {
23
+ DefaultSeedPhrase: () => DefaultSeedPhrase,
24
+ DeprecateStory: () => DeprecateStory,
25
+ WithMapboxSetup: () => WithMapboxSetup,
26
+ WithRefDecorator: () => WithRefDecorator,
27
+ payloadDataMissingPairs: () => payloadDataMissingPairs,
28
+ randomizedSampleAddressHistory: () => randomizedSampleAddressHistory,
29
+ sampleAddressHistory: () => sampleAddressHistory,
30
+ sampleBlock: () => sampleBlock,
31
+ sampleBlockWithBoundWitnessPayload: () => sampleBlockWithBoundWitnessPayload,
32
+ sampleBlockWithPayloads: () => sampleBlockWithPayloads,
33
+ sampleBlocknativeGasPricePayload: () => sampleBlocknativeGasPricePayload,
34
+ sampleCoinGeckoPayload: () => sampleCoinGeckoPayload,
35
+ sampleEthGasStationGasPricePayload: () => sampleEthGasStationGasPricePayload,
36
+ sampleEtherchainV1GasPricePayload: () => sampleEtherchainV1GasPricePayload,
37
+ sampleEtherchainV2GasPricePayload: () => sampleEtherchainV2GasPricePayload,
38
+ sampleEthereumGasDivinerPayload: () => sampleEthereumGasDivinerPayload,
39
+ sampleEthereumGasDivinerPayloadMissingFees: () => sampleEthereumGasDivinerPayloadMissingFees,
40
+ sampleEthersGasPricePayload: () => sampleEthersGasPricePayload,
41
+ sampleEtherscanGasPricePayload: () => sampleEtherscanGasPricePayload,
42
+ sampleIdPayload: () => sampleIdPayload,
43
+ samplePayloadFromBuilder: () => samplePayloadFromBuilder,
44
+ sampleSystemInfoBrowserPayload: () => sampleSystemInfoBrowserPayload,
45
+ sampleUniswapPayload: () => sampleUniswapPayload,
46
+ useAppThemeDecorator: () => useAppThemeDecorator
47
+ });
48
+ module.exports = __toCommonJS(src_exports);
49
+
50
+ // src/defaultSeedPhrase.ts
51
+ var DefaultSeedPhrase = "later puppy sound rebuild rebuild noise ozone amazing hope broccoli crystal grief";
52
+
53
+ // src/DeprecateStory.tsx
54
+ var import_material = require("@mui/material");
55
+ var import_jsx_runtime = require("react/jsx-runtime");
56
+ var DeprecateStory = ({ message }) => {
57
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_material.Alert, { severity: "error", sx: { marginBottom: "24px" }, children: [
58
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_material.AlertTitle, { children: "Story has been Deprecated" }),
59
+ message
60
+ ] });
61
+ };
62
+
63
+ // src/sampleAddressHistory.ts
64
+ var import_boundwitness_model = require("@xyo-network/boundwitness-model");
65
+ var sampleAddressHistory = [
66
+ {
67
+ _signatures: ["186de1122640fc9d6577765e0b0f6822860994a0fbd1f80354963f89eebc3da01d0a68c36d2c6facab89bd777964c0d5b76103eb35b7900cc69bb1b90231117e"],
68
+ addresses: ["fc0f8a536fe657ebbfa7a3b81bee6053c73debec"],
69
+ payload_hashes: ["97e693d0eb86eec1ca28f2bb0c77ddaae821fd0a9adc51c1521cdd754e2e207d"],
70
+ payload_schemas: ["network.xyo.id"],
71
+ previous_hashes: ["8f914f739a96cb8baffaf156724240e4d51ab94cd4a374754c4e8f8281dc4191"],
72
+ schema: import_boundwitness_model.BoundWitnessSchema,
73
+ timestamp: 1666830950083
74
+ },
75
+ {
76
+ _signatures: ["35c4aa262694cdf6c72f473e4e2a4b164b35a5f228a6ed1c8345b8a6b7b0d192d6868fc038a09258f2b7016d04157640d7555109102e3c072556f8c4c002543f"],
77
+ addresses: ["fc0f8a536fe657ebbfa7a3b81bee6053c73debec"],
78
+ payload_hashes: ["b01dd00648fafa4488ff461c812e80e5c657939da8c7d4bb056177e241554449"],
79
+ payload_schemas: ["network.xyo.id"],
80
+ previous_hashes: ["7456e3a653f6b3cac3ee0204cef37152eeb8cfeef3e20a0e177abf7ec36e0236"],
81
+ schema: import_boundwitness_model.BoundWitnessSchema,
82
+ timestamp: 1666830946487
83
+ },
84
+ {
85
+ _signatures: ["f273d8a8587ec2c6c9e91416eec66fdd441156f9ce2fb54e3e78e885aa792017e10ea36af44d9453422ffbafd58732a80387ab57c93ae0618b09aa4847f5e457"],
86
+ addresses: ["fc0f8a536fe657ebbfa7a3b81bee6053c73debec"],
87
+ payload_hashes: ["03be02066ed31dc92ffd371a48026eac5770a8647160704b70e8dca8fc64cb0a"],
88
+ payload_schemas: ["network.xyo.id"],
89
+ previous_hashes: ["053d47a27012548dc0b3bb469e6598c7a48e81d3a552a790b455922cdb0750ba"],
90
+ schema: import_boundwitness_model.BoundWitnessSchema,
91
+ timestamp: 1666830867311
92
+ },
93
+ {
94
+ _signatures: ["79960dd5c590a1007bc526729a3ffee3153bb37ace383485ed298b3ba94939fffade54980a02c57119238bd9984d2860b822d29dbb36b04251fab83354b5a7cc"],
95
+ addresses: ["fc0f8a536fe657ebbfa7a3b81bee6053c73debec"],
96
+ payload_hashes: ["5ebf3c990e08174bcf3987dc94ff0a4ec33b6ba806d3f3ec50e0966395fc1c76"],
97
+ payload_schemas: ["network.xyo.id"],
98
+ previous_hashes: ["9ae219b4d71a5c46321a21cdef08540fafe7e6d51440ba34699883bdaf15e61d"],
99
+ schema: import_boundwitness_model.BoundWitnessSchema,
100
+ timestamp: 1666830864908
101
+ },
102
+ {
103
+ _signatures: ["03830c7e9345a80390524543eb4ca097530bafa5d109b91a5a328399fcffe5af3a32b3a66658c045d013cf9b4fd598cafc9374bd0004d0c1bb2224ac812b855a"],
104
+ addresses: ["fc0f8a536fe657ebbfa7a3b81bee6053c73debec"],
105
+ payload_hashes: ["ce405ae29915ea7b5f62a87c316bf4f46052c7bb0a36e67e621fedb1ec96fec5"],
106
+ payload_schemas: ["network.xyo.id"],
107
+ previous_hashes: ["322e48abf142b99635ea51c73d7d6225c04514348ffd3c37399c39b0e17d4972"],
108
+ schema: import_boundwitness_model.BoundWitnessSchema,
109
+ timestamp: 1666830860155
110
+ },
111
+ {
112
+ _signatures: ["2ddd7f65ad5ccdce83318f47040db7f45ef76142d2bb9c549241ac59619bf00a671f1ca5755d4e4b0e59fb8eb11c31e1d26c5d376eb57d8eeee7156469ae770b"],
113
+ addresses: ["fc0f8a536fe657ebbfa7a3b81bee6053c73debec"],
114
+ payload_hashes: ["84efe9b19a752d3d997cfe5e7c336b1b090669fc0172f649825b2f24c8d82876"],
115
+ payload_schemas: ["network.xyo.id"],
116
+ previous_hashes: [null],
117
+ schema: import_boundwitness_model.BoundWitnessSchema,
118
+ timestamp: 1666830779473
119
+ }
120
+ ];
121
+ var randomizedSampleAddressHistory = [
122
+ {
123
+ _signatures: ["35c4aa262694cdf6c72f473e4e2a4b164b35a5f228a6ed1c8345b8a6b7b0d192d6868fc038a09258f2b7016d04157640d7555109102e3c072556f8c4c002543f"],
124
+ addresses: ["fc0f8a536fe657ebbfa7a3b81bee6053c73debec"],
125
+ payload_hashes: ["b01dd00648fafa4488ff461c812e80e5c657939da8c7d4bb056177e241554449"],
126
+ payload_schemas: ["network.xyo.id"],
127
+ previous_hashes: ["7456e3a653f6b3cac3ee0204cef37152eeb8cfeef3e20a0e177abf7ec36e0236"],
128
+ schema: import_boundwitness_model.BoundWitnessSchema,
129
+ timestamp: 1666830946487
130
+ },
131
+ {
132
+ _signatures: ["79960dd5c590a1007bc526729a3ffee3153bb37ace383485ed298b3ba94939fffade54980a02c57119238bd9984d2860b822d29dbb36b04251fab83354b5a7cc"],
133
+ addresses: ["fc0f8a536fe657ebbfa7a3b81bee6053c73debec"],
134
+ payload_hashes: ["5ebf3c990e08174bcf3987dc94ff0a4ec33b6ba806d3f3ec50e0966395fc1c76"],
135
+ payload_schemas: ["network.xyo.id"],
136
+ previous_hashes: ["9ae219b4d71a5c46321a21cdef08540fafe7e6d51440ba34699883bdaf15e61d"],
137
+ schema: import_boundwitness_model.BoundWitnessSchema,
138
+ timestamp: 1666830864908
139
+ },
140
+ {
141
+ _signatures: ["186de1122640fc9d6577765e0b0f6822860994a0fbd1f80354963f89eebc3da01d0a68c36d2c6facab89bd777964c0d5b76103eb35b7900cc69bb1b90231117e"],
142
+ addresses: ["fc0f8a536fe657ebbfa7a3b81bee6053c73debec"],
143
+ payload_hashes: ["97e693d0eb86eec1ca28f2bb0c77ddaae821fd0a9adc51c1521cdd754e2e207d"],
144
+ payload_schemas: ["network.xyo.id"],
145
+ previous_hashes: ["8f914f739a96cb8baffaf156724240e4d51ab94cd4a374754c4e8f8281dc4191"],
146
+ schema: import_boundwitness_model.BoundWitnessSchema,
147
+ timestamp: 1666830950083
148
+ },
149
+ {
150
+ _signatures: ["f273d8a8587ec2c6c9e91416eec66fdd441156f9ce2fb54e3e78e885aa792017e10ea36af44d9453422ffbafd58732a80387ab57c93ae0618b09aa4847f5e457"],
151
+ addresses: ["fc0f8a536fe657ebbfa7a3b81bee6053c73debec"],
152
+ payload_hashes: ["03be02066ed31dc92ffd371a48026eac5770a8647160704b70e8dca8fc64cb0a"],
153
+ payload_schemas: ["network.xyo.id"],
154
+ previous_hashes: ["053d47a27012548dc0b3bb469e6598c7a48e81d3a552a790b455922cdb0750ba"],
155
+ schema: import_boundwitness_model.BoundWitnessSchema,
156
+ timestamp: 1666830867311
157
+ },
158
+ {
159
+ _signatures: ["2ddd7f65ad5ccdce83318f47040db7f45ef76142d2bb9c549241ac59619bf00a671f1ca5755d4e4b0e59fb8eb11c31e1d26c5d376eb57d8eeee7156469ae770b"],
160
+ addresses: ["fc0f8a536fe657ebbfa7a3b81bee6053c73debec"],
161
+ payload_hashes: ["84efe9b19a752d3d997cfe5e7c336b1b090669fc0172f649825b2f24c8d82876"],
162
+ payload_schemas: ["network.xyo.id"],
163
+ previous_hashes: [null],
164
+ schema: import_boundwitness_model.BoundWitnessSchema,
165
+ timestamp: 1666830779473
166
+ },
167
+ {
168
+ _signatures: ["03830c7e9345a80390524543eb4ca097530bafa5d109b91a5a328399fcffe5af3a32b3a66658c045d013cf9b4fd598cafc9374bd0004d0c1bb2224ac812b855a"],
169
+ addresses: ["fc0f8a536fe657ebbfa7a3b81bee6053c73debec"],
170
+ payload_hashes: ["ce405ae29915ea7b5f62a87c316bf4f46052c7bb0a36e67e621fedb1ec96fec5"],
171
+ payload_schemas: ["network.xyo.id"],
172
+ previous_hashes: ["322e48abf142b99635ea51c73d7d6225c04514348ffd3c37399c39b0e17d4972"],
173
+ schema: import_boundwitness_model.BoundWitnessSchema,
174
+ timestamp: 1666830860155
175
+ }
176
+ ];
177
+
178
+ // src/sampleBlock.ts
179
+ var sampleBlock = {
180
+ _signatures: ["d0969a4edd2cbb55f879bb68733a36509dab7516c52e3066fd2e248ee80f98e36bdd56a0711140cfbc55106d4c65fe7ed58df8c03c5d360b34d3c74ea3b6fe1f"],
181
+ addresses: ["9c6df83b84297985d3ccc1f721ba1c2e3608c751", "BF005E04EF223aa18c0fBFF6B41BbB0227c45A48"],
182
+ payload_hashes: [
183
+ "43df96261884ec99e0d7667120d036065c1f6a88dbb999f30d7c820dc9a37ee5",
184
+ "31b3a835ebad2b6f2d6cc16ec855b41f237116f52b515aac9a8f555fec05fa3e",
185
+ "97e693d0eb86eec1ca28f2bb0c77ddaae821fd0a9adc51c1521cdd754e2e207d",
186
+ "be39d7b3b3383e65405236c0c314e4601eb5e98859266fef4e5caf22b16d5706",
187
+ "21ab79e5fae74ccc22d611a42732f9257e7a29a4da744e51ec99feda948e1115",
188
+ "bd5825ee3cefa969ded2dd1a35d9f28a9a0f312703e7f57bf8554ccda24f0b5f"
189
+ ],
190
+ payload_schemas: [
191
+ "network.xyo.location",
192
+ "network.xyo.id",
193
+ "network.xyo.id",
194
+ "network.xyo.payload",
195
+ "network.xyo.location.range.answer",
196
+ "network.xyo.location.range.query"
197
+ ],
198
+ previous_hashes: [null],
199
+ schema: "network.xyo.boundwitness"
200
+ };
201
+ var sampleBlockWithBoundWitnessPayload = {
202
+ _signatures: ["d0969a4edd2cbb55f879bb68733a36509dab7516c52e3066fd2e248ee80f98e36bdd56a0711140cfbc55106d4c65fe7ed58df8c03c5d360b34d3c74ea3b6fe1f"],
203
+ addresses: ["9c6df83b84297985d3ccc1f721ba1c2e3608c751", "BF005E04EF223aa18c0fBFF6B41BbB0227c45A48"],
204
+ payload_hashes: [
205
+ "43df96261884ec99e0d7667120d036065c1f6a88dbb999f30d7c820dc9a37ee5",
206
+ "31b3a835ebad2b6f2d6cc16ec855b41f237116f52b515aac9a8f555fec05fa3e",
207
+ "97e693d0eb86eec1ca28f2bb0c77ddaae821fd0a9adc51c1521cdd754e2e207d",
208
+ "be39d7b3b3383e65405236c0c314e4601eb5e98859266fef4e5caf22b16d5706",
209
+ "21ab79e5fae74ccc22d611a42732f9257e7a29a4da744e51ec99feda948e1115",
210
+ "bd5825ee3cefa969ded2dd1a35d9f28a9a0f312703e7f57bf8554ccda24f0b5f"
211
+ ],
212
+ payload_schemas: [
213
+ "network.xyo.boundwitness",
214
+ "network.xyo.id",
215
+ "network.xyo.id",
216
+ "network.xyo.payload",
217
+ "network.xyo.location.range.answer",
218
+ "network.xyo.location.range.query"
219
+ ],
220
+ previous_hashes: [null],
221
+ schema: "network.xyo.boundwitness"
222
+ };
223
+ var sampleBlockWithPayloads = {
224
+ _archive: "temp",
225
+ _client: "js",
226
+ _hash: "b31230e7f3386a63acc64cb5f89e5353d5f9379b3bd3ae7385c47b2e600fcbb2",
227
+ _payloads: [
228
+ {
229
+ _archive: "temp",
230
+ _client: "js",
231
+ _hash: "ebeb156c9aa0db6e5bf9fe3bfcab5e7f2765235587667adc34c1e8966f899349",
232
+ _observeDuration: 48,
233
+ _timestamp: 1651520931057,
234
+ definition: {
235
+ $id: "'network.xyo.payload'",
236
+ $schema: "http://json-schema.org/draft-07/schema#",
237
+ properties: {
238
+ schema: {
239
+ type: "'string'"
240
+ }
241
+ },
242
+ required: ["'schema'"],
243
+ type: "'object'"
244
+ },
245
+ schema: "network.xyo.payload"
246
+ },
247
+ {
248
+ _archive: "temp",
249
+ _client: "js",
250
+ _hash: "930443bfebbdd0c9d14d8787def961ab41838fe9681f64acdad82c84e8803b59",
251
+ _observeDuration: 47,
252
+ _timestamp: 1651520931057,
253
+ salt: "117243fd-ee33-45af-b82c-d2cfeb1f85c9",
254
+ schema: "network.xyo.id"
255
+ }
256
+ ],
257
+ _signatures: ["0c742ec946ae28759e997dab4a7d3ca2fa1315e76b6a60c985bd6508b1f870f0ce914a927e15af6ed84f113be4b14ee1a432a896fc1294fc33fa1bb557f1ad6a"],
258
+ _timestamp: 1651520931051,
259
+ addresses: ["9e828f8ba1e8e212398b0fb8ef2a6167e91db24c"],
260
+ payload_hashes: [
261
+ "ebeb156c9aa0db6e5bf9fe3bfcab5e7f2765235587667adc34c1e8966f899349",
262
+ "930443bfebbdd0c9d14d8787def961ab41838fe9681f64acdad82c84e8803b59"
263
+ ],
264
+ payload_schemas: ["network.xyo.payload", "network.xyo.id"],
265
+ previous_hashes: [null],
266
+ schema: "network.xyo.boundwitness"
267
+ };
268
+
269
+ // src/sampleCoinGeckoPayload.ts
270
+ var sampleCoinGeckoPayload = {
271
+ assets: {
272
+ ada: {
273
+ btc: 2121e-8,
274
+ eth: 28602e-8,
275
+ eur: 0.455045,
276
+ usd: 0.451912
277
+ },
278
+ btc: {
279
+ btc: 1,
280
+ eth: 13.480925,
281
+ eur: 21444,
282
+ usd: 21297
283
+ },
284
+ busd: {
285
+ btc: 4691e-8,
286
+ eth: 63254e-8,
287
+ eur: 1.006,
288
+ usd: 0.999271
289
+ },
290
+ doge: {
291
+ btc: 315e-8,
292
+ eth: 4251e-8,
293
+ eur: 0.067639,
294
+ usd: 0.067173
295
+ },
296
+ dot: {
297
+ btc: 33957e-8,
298
+ eth: 457909e-8,
299
+ eur: 7.28,
300
+ usd: 7.23
301
+ },
302
+ eth: {
303
+ btc: 0.07416836,
304
+ eth: 1,
305
+ eur: 1590.95,
306
+ usd: 1580
307
+ },
308
+ sol: {
309
+ btc: 162396e-8,
310
+ eth: 0.02189873,
311
+ eur: 34.83,
312
+ usd: 34.59
313
+ },
314
+ usdc: {
315
+ btc: 4691e-8,
316
+ eth: 63259e-8,
317
+ eur: 1.006,
318
+ usd: 0.999341
319
+ },
320
+ usdt: {
321
+ btc: 4697e-8,
322
+ eth: 63328e-8,
323
+ eur: 1.008,
324
+ usd: 1.001
325
+ },
326
+ wbtc: {
327
+ btc: 0.99985708,
328
+ eth: 13.482839,
329
+ eur: 21447,
330
+ usd: 21300
331
+ },
332
+ xyo: {
333
+ btc: 406347e-12,
334
+ eth: 548e-8,
335
+ eur: 871642e-8,
336
+ usd: 86564e-7
337
+ }
338
+ },
339
+ schema: "network.xyo.crypto.market.coingecko",
340
+ timestamp: 1661188759757
341
+ };
342
+
343
+ // src/sampleEthereumGasDivinerPayload.ts
344
+ var sampleEthereumGasDivinerPayload = {
345
+ baseFee: 13.3646505198,
346
+ feePerGas: {
347
+ high: 17.3060964302,
348
+ low: 12.155000000000001,
349
+ medium: 12.5625,
350
+ veryHigh: 16.5462485885
351
+ },
352
+ priorityFeePerGas: {
353
+ high: 1.075,
354
+ low: 0.7466666666666667,
355
+ medium: 0.8566666666666668,
356
+ veryHigh: 1.2766666666666666
357
+ },
358
+ schema: "network.xyo.blockchain.ethereum.gas",
359
+ timestamp: 1669819808305
360
+ };
361
+ var sampleEthereumGasDivinerPayloadMissingFees = {
362
+ feePerGas: {},
363
+ priorityFeePerGas: {},
364
+ schema: "network.xyo.blockchain.ethereum.gas",
365
+ timestamp: 1659071465718
366
+ };
367
+
368
+ // src/sampleGasPricePayloads/blocknative.ts
369
+ var sampleBlocknativeGasPricePayload = {
370
+ blockPrices: [
371
+ {
372
+ baseFeePerGas: 26.32847478,
373
+ blockNumber: 16134624,
374
+ estimatedPrices: [
375
+ {
376
+ confidence: 99,
377
+ maxFeePerGas: 41.86,
378
+ maxPriorityFeePerGas: 1.18,
379
+ price: 27
380
+ },
381
+ {
382
+ confidence: 95,
383
+ maxFeePerGas: 41.54,
384
+ maxPriorityFeePerGas: 0.86,
385
+ price: 27
386
+ },
387
+ {
388
+ confidence: 90,
389
+ maxFeePerGas: 41.15,
390
+ maxPriorityFeePerGas: 0.47,
391
+ price: 26
392
+ },
393
+ {
394
+ confidence: 80,
395
+ maxFeePerGas: 41,
396
+ maxPriorityFeePerGas: 0.32,
397
+ price: 26
398
+ },
399
+ {
400
+ confidence: 70,
401
+ maxFeePerGas: 40.93,
402
+ maxPriorityFeePerGas: 0.25,
403
+ price: 26
404
+ }
405
+ ],
406
+ estimatedTransactionCount: 186
407
+ }
408
+ ],
409
+ currentBlockNumber: 16134623,
410
+ estimatedBaseFees: [
411
+ {
412
+ "pending+1": [
413
+ {
414
+ baseFee: 29.62,
415
+ confidence: 99
416
+ }
417
+ ]
418
+ },
419
+ {
420
+ "pending+2": [
421
+ {
422
+ baseFee: 33.33,
423
+ confidence: 99
424
+ }
425
+ ]
426
+ },
427
+ {
428
+ "pending+3": [
429
+ {
430
+ baseFee: 37.4,
431
+ confidence: 99
432
+ }
433
+ ]
434
+ },
435
+ {
436
+ "pending+4": [
437
+ {
438
+ baseFee: 39.26,
439
+ confidence: 99
440
+ }
441
+ ]
442
+ },
443
+ {
444
+ "pending+5": [
445
+ {
446
+ baseFee: 40.68,
447
+ confidence: 99
448
+ }
449
+ ]
450
+ }
451
+ ],
452
+ maxPrice: 64,
453
+ msSinceLastBlock: 9645,
454
+ network: "main",
455
+ schema: "network.xyo.blockchain.ethereum.gas.blocknative",
456
+ system: "ethereum",
457
+ timestamp: 1670437800246,
458
+ unit: "gwei"
459
+ };
460
+
461
+ // src/sampleGasPricePayloads/etherchainV1.ts
462
+ var sampleEtherchainV1GasPricePayload = {
463
+ currentBaseFee: 28.3,
464
+ fast: 0.9,
465
+ fastest: 1.5,
466
+ recommendedBaseFee: 57.5,
467
+ safeLow: 0.2,
468
+ schema: "network.xyo.blockchain.ethereum.gas.etherchain.v1",
469
+ standard: 0.4,
470
+ timestamp: 1670437800313
471
+ };
472
+
473
+ // src/sampleGasPricePayloads/etherchainV2.ts
474
+ var sampleEtherchainV2GasPricePayload = {
475
+ code: 200,
476
+ data: {
477
+ fast: 26423463713,
478
+ priceUSD: 1229.43,
479
+ rapid: 37143856713,
480
+ slow: 13e9,
481
+ standard: 21366997291,
482
+ timestamp: 1670437795342
483
+ },
484
+ schema: "network.xyo.blockchain.ethereum.gas.etherchain.v2",
485
+ timestamp: 1670437800338
486
+ };
487
+
488
+ // src/sampleGasPricePayloads/ethers.ts
489
+ var sampleEthersGasPricePayload = {
490
+ gasPrice: 26770943129,
491
+ lastBaseFeePerGas: 26494335502,
492
+ maxFeePerGas: 54488671004,
493
+ maxPriorityFeePerGas: 15e8,
494
+ schema: "network.xyo.blockchain.ethereum.gas.ethers",
495
+ timestamp: 1670437800345
496
+ };
497
+
498
+ // src/sampleGasPricePayloads/etherscan.ts
499
+ var sampleEtherscanGasPricePayload = {
500
+ message: "OK",
501
+ result: {
502
+ FastGasPrice: "35",
503
+ LastBlock: "16134573",
504
+ ProposeGasPrice: "35",
505
+ SafeGasPrice: "34",
506
+ gasUsedRatio: "0.4491729,0.440816333333333,0.480461266666667,0.373305033333333,0.322907566666667",
507
+ suggestBaseFee: "33.952097068"
508
+ },
509
+ schema: "network.xyo.blockchain.ethereum.gas.etherscan",
510
+ status: "1",
511
+ timestamp: 1670437200510
512
+ };
513
+
514
+ // src/sampleGasPricePayloads/ethGasStation.ts
515
+ var sampleEthGasStationGasPricePayload = {
516
+ baseFee: 37,
517
+ blockNumber: 16134572,
518
+ blockTime: 11.88,
519
+ gasPrice: {
520
+ fast: 84,
521
+ instant: 97,
522
+ standard: 53
523
+ },
524
+ nextBaseFee: 37,
525
+ priorityFee: {
526
+ fast: 5,
527
+ instant: 14,
528
+ standard: 2
529
+ },
530
+ schema: "network.xyo.blockchain.ethereum.gas.ethgasstation",
531
+ timestamp: 1670437200687
532
+ };
533
+
534
+ // src/samplePayload.ts
535
+ var import_payload_builder = require("@xyo-network/payload-builder");
536
+ var samplePayloadFromBuilder = {
537
+ ...new import_payload_builder.PayloadBuilder({ schema: "network.xyo.temp" }).fields({ test: "hello" }).build(),
538
+ _archive: "temp"
539
+ };
540
+ var sampleIdPayload = {
541
+ salt: "81b2372a-b4f0-4ab5-8642-c4e6de46a1cf",
542
+ schema: "network.xyo.id"
543
+ };
544
+ var sampleSystemInfoBrowserPayload = {
545
+ bowser: {
546
+ browser: {
547
+ name: "Chrome",
548
+ version: "104.0.0.0"
549
+ },
550
+ engine: {
551
+ name: "Blink"
552
+ },
553
+ os: {
554
+ name: "Windows",
555
+ version: "NT 10.0",
556
+ versionName: "10"
557
+ },
558
+ platform: {
559
+ type: "desktop"
560
+ }
561
+ },
562
+ schema: "network.xyo.system.info.browser"
563
+ };
564
+
565
+ // src/sampleUniswapPayload.ts
566
+ var sampleUniswapPayload = {
567
+ pairs: [
568
+ {
569
+ tokens: [
570
+ {
571
+ address: "0x55296f69f40Ea6d20E478533C15A6B08B654E758",
572
+ symbol: "xyo",
573
+ value: 688928e-11
574
+ },
575
+ {
576
+ address: "0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2",
577
+ symbol: "weth",
578
+ value: 145153
579
+ }
580
+ ]
581
+ },
582
+ {
583
+ tokens: [
584
+ {
585
+ address: "0x55296f69f40Ea6d20E478533C15A6B08B654E758",
586
+ symbol: "xyo",
587
+ value: 0.0119766
588
+ },
589
+ {
590
+ address: "0xdAC17F958D2ee523a2206206994597C13D831ec7",
591
+ symbol: "usdt",
592
+ value: 83.496
593
+ }
594
+ ]
595
+ },
596
+ {
597
+ tokens: [
598
+ {
599
+ address: "0x55296f69f40Ea6d20E478533C15A6B08B654E758",
600
+ symbol: "xyo",
601
+ value: 0.0119815
602
+ },
603
+ {
604
+ address: "0x6B175474E89094C44Da98b954EedeAC495271d0F",
605
+ symbol: "dai",
606
+ value: 83.4619
607
+ }
608
+ ]
609
+ },
610
+ {
611
+ tokens: [
612
+ {
613
+ address: "0x2260FAC5E5542a773Aa44fBCfeDf7C193bc2C599",
614
+ symbol: "wbtc",
615
+ value: 1985210
616
+ },
617
+ {
618
+ address: "0x55296f69f40Ea6d20E478533C15A6B08B654E758",
619
+ symbol: "xyo",
620
+ value: 503725e-12
621
+ }
622
+ ]
623
+ },
624
+ {
625
+ tokens: [
626
+ {
627
+ address: "0x514910771AF9Ca656af840dff83E8264EcF986CA",
628
+ symbol: "link",
629
+ value: 632.648
630
+ },
631
+ {
632
+ address: "0x55296f69f40Ea6d20E478533C15A6B08B654E758",
633
+ symbol: "xyo",
634
+ value: 158066e-8
635
+ }
636
+ ]
637
+ },
638
+ {
639
+ tokens: [
640
+ {
641
+ address: "0x2260FAC5E5542a773Aa44fBCfeDf7C193bc2C599",
642
+ symbol: "wbtc",
643
+ value: 13.8399
644
+ },
645
+ {
646
+ address: "0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2",
647
+ symbol: "weth",
648
+ value: 0.072255
649
+ }
650
+ ]
651
+ },
652
+ {
653
+ tokens: [
654
+ {
655
+ address: "0x6B175474E89094C44Da98b954EedeAC495271d0F",
656
+ symbol: "dai",
657
+ value: 1.00004
658
+ },
659
+ {
660
+ address: "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48",
661
+ symbol: "usdc",
662
+ value: 0.999964
663
+ }
664
+ ]
665
+ },
666
+ {
667
+ tokens: [
668
+ {
669
+ address: "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48",
670
+ symbol: "usdc",
671
+ value: 575766e-9
672
+ },
673
+ {
674
+ address: "0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2",
675
+ symbol: "weth",
676
+ value: 1736.82
677
+ }
678
+ ]
679
+ },
680
+ {
681
+ tokens: [
682
+ {
683
+ address: "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48",
684
+ symbol: "usdc",
685
+ value: 577657e-9
686
+ },
687
+ {
688
+ address: "0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2",
689
+ symbol: "weth",
690
+ value: 1731.13
691
+ }
692
+ ]
693
+ },
694
+ {
695
+ tokens: [
696
+ {
697
+ address: "0x6B175474E89094C44Da98b954EedeAC495271d0F",
698
+ symbol: "dai",
699
+ value: 1.00002
700
+ },
701
+ {
702
+ address: "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48",
703
+ symbol: "usdc",
704
+ value: 0.999983
705
+ }
706
+ ]
707
+ },
708
+ {
709
+ tokens: [
710
+ {
711
+ address: "0x853d955aCEf822Db058eb8505911ED77F175b99e",
712
+ symbol: "frax",
713
+ value: 0.999829
714
+ },
715
+ {
716
+ address: "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48",
717
+ symbol: "usdc",
718
+ value: 1.00017
719
+ }
720
+ ]
721
+ },
722
+ {
723
+ tokens: [
724
+ {
725
+ address: "0x2260FAC5E5542a773Aa44fBCfeDf7C193bc2C599",
726
+ symbol: "wbtc",
727
+ value: 23967.5
728
+ },
729
+ {
730
+ address: "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48",
731
+ symbol: "usdc",
732
+ value: 417232e-10
733
+ }
734
+ ]
735
+ },
736
+ {
737
+ tokens: [
738
+ {
739
+ address: "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48",
740
+ symbol: "usdc",
741
+ value: 0.999756
742
+ },
743
+ {
744
+ address: "0xdAC17F958D2ee523a2206206994597C13D831ec7",
745
+ symbol: "usdt",
746
+ value: 1.00024
747
+ }
748
+ ]
749
+ }
750
+ ],
751
+ schema: "network.xyo.crypto.market.uniswap",
752
+ timestamp: 1659071465718
753
+ };
754
+ var payloadDataMissingPairs = {
755
+ pairs: [],
756
+ schema: "network.xyo.crypto.market.uniswap",
757
+ timestamp: 1659071465718
758
+ };
759
+
760
+ // src/useAppThemeDecorator.tsx
761
+ var import_lodash2 = require("@xylabs/lodash");
762
+
763
+ // ../../../../node_modules/@xylabs/react-invertible-theme/dist/index.mjs
764
+ var import_material2 = require("@mui/material");
765
+ var import_react = require("react");
766
+ var import_jsx_runtime2 = require("react/jsx-runtime");
767
+ var import_material3 = require("@mui/material");
768
+ var import_react2 = require("react");
769
+ var import_react3 = require("react");
770
+ var import_material4 = require("@mui/material");
771
+ var import_lodash = require("@xylabs/lodash");
772
+ var import_react4 = require("react");
773
+ var import_jsx_runtime3 = require("react/jsx-runtime");
774
+ var InvertibleThemeContext = (0, import_react3.createContext)({
775
+ options: {}
776
+ });
777
+ var useInvertibleThemeProvider = () => {
778
+ return (0, import_react4.useContext)(InvertibleThemeContext);
779
+ };
780
+ var resolveThemeColors = (options) => {
781
+ const theme = (0, import_material4.createTheme)(options);
782
+ return (0, import_lodash.merge)({}, (0, import_lodash.cloneDeep)(options), {
783
+ palette: {
784
+ text: {
785
+ primary: theme.palette?.getContrastText(theme.palette.primary.main),
786
+ secondary: theme.palette?.getContrastText(theme.palette.secondary.main)
787
+ }
788
+ }
789
+ });
790
+ };
791
+ var InvertibleThemeProvider = ({
792
+ options,
793
+ children,
794
+ dark,
795
+ resolve = false,
796
+ scoped = false,
797
+ invert = false,
798
+ noResponsiveFonts,
799
+ darkTheme,
800
+ darkOptions,
801
+ lightOptions
802
+ }) => {
803
+ const parentContext = useInvertibleThemeProvider();
804
+ const clonedOptions = (0, import_lodash.cloneDeep)(options ?? parentContext.options ?? {});
805
+ const clonedDarkOptions = (0, import_lodash.cloneDeep)(darkOptions ?? darkTheme ?? parentContext.darkOptions);
806
+ const clonedLightOptions = (0, import_lodash.cloneDeep)(lightOptions ?? parentContext.lightOptions);
807
+ clonedOptions.palette = clonedOptions.palette ?? {};
808
+ if (invert) {
809
+ clonedOptions.palette.mode = clonedOptions.palette.mode === "dark" ? "light" : "dark";
810
+ }
811
+ if (dark !== void 0) {
812
+ clonedOptions.palette.mode = dark ? "dark" : "light";
813
+ }
814
+ const modeOptions = clonedOptions.palette.mode === "dark" ? clonedDarkOptions : clonedLightOptions;
815
+ let themeOptions2 = (0, import_lodash.merge)({}, clonedOptions, modeOptions);
816
+ if (resolve) {
817
+ themeOptions2 = resolveThemeColors(themeOptions2);
818
+ }
819
+ const theme = noResponsiveFonts ? (0, import_material4.createTheme)(themeOptions2) : (0, import_material4.responsiveFontSizes)((0, import_material4.createTheme)(themeOptions2));
820
+ const Provider = () => {
821
+ return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(InvertibleThemeContext.Provider, { value: { darkOptions: clonedDarkOptions, lightOptions: clonedLightOptions, options: clonedOptions }, children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_material4.ThemeProvider, { theme, children }) });
822
+ };
823
+ return scoped ? /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_material4.ScopedCssBaseline, { children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(Provider, {}) }) : /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(Provider, {});
824
+ };
825
+
826
+ // src/useAppThemeDecorator.tsx
827
+ var import_react_theme = require("@xyo-network/react-theme");
828
+ var import_storybook_dark_mode = require("storybook-dark-mode");
829
+ var import_jsx_runtime4 = require("react/jsx-runtime");
830
+ var useAppThemeDecorator = (Story, { args }) => {
831
+ const darkMode = (0, import_storybook_dark_mode.useDarkMode)();
832
+ const mergedThemeOptions = (0, import_lodash2.merge)(import_react_theme.themeOptions, import_react_theme.appThemeOptions);
833
+ return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
834
+ InvertibleThemeProvider,
835
+ {
836
+ dark: darkMode,
837
+ options: mergedThemeOptions,
838
+ lightOptions: import_react_theme.partialAppLightThemeOptions,
839
+ darkOptions: import_react_theme.partialAppDarkThemeOptions,
840
+ children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(Story, { ...args })
841
+ }
842
+ );
843
+ };
844
+
845
+ // src/WithMapboxSetup.tsx
846
+ var import_react_map = require("@xyo-network/react-map");
847
+ var import_jsx_runtime5 = require("react/jsx-runtime");
848
+ var WithMapboxSetup = (Story, context) => {
849
+ return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(import_react_map.MapboxAccessTokenProvider, { defaultAccessToken: process.env.STORYBOOK_MAPBOX_TOKEN, children: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(Story, { ...context }) });
850
+ };
851
+
852
+ // src/WithRefDecorator.tsx
853
+ var import_material5 = require("@mui/material");
854
+ var import_react5 = require("react");
855
+ var import_jsx_runtime6 = require("react/jsx-runtime");
856
+ var WithRefDecorator = (Story, args) => {
857
+ const ref = (0, import_react5.useRef)(null);
858
+ const onClick = () => {
859
+ if (ref.current) {
860
+ ref.current.style.color = "green";
861
+ }
862
+ };
863
+ args.args.ref = ref;
864
+ return /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(import_jsx_runtime6.Fragment, { children: [
865
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_material5.Button, { onClick, variant: "contained", children: "Change to green" }),
866
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(Story, { ...args })
867
+ ] });
868
+ };
869
+ // Annotate the CommonJS export names for ESM import in node:
870
+ 0 && (module.exports = {
871
+ DefaultSeedPhrase,
872
+ DeprecateStory,
873
+ WithMapboxSetup,
874
+ WithRefDecorator,
875
+ payloadDataMissingPairs,
876
+ randomizedSampleAddressHistory,
877
+ sampleAddressHistory,
878
+ sampleBlock,
879
+ sampleBlockWithBoundWitnessPayload,
880
+ sampleBlockWithPayloads,
881
+ sampleBlocknativeGasPricePayload,
882
+ sampleCoinGeckoPayload,
883
+ sampleEthGasStationGasPricePayload,
884
+ sampleEtherchainV1GasPricePayload,
885
+ sampleEtherchainV2GasPricePayload,
886
+ sampleEthereumGasDivinerPayload,
887
+ sampleEthereumGasDivinerPayloadMissingFees,
888
+ sampleEthersGasPricePayload,
889
+ sampleEtherscanGasPricePayload,
890
+ sampleIdPayload,
891
+ samplePayloadFromBuilder,
892
+ sampleSystemInfoBrowserPayload,
893
+ sampleUniswapPayload,
894
+ useAppThemeDecorator
895
+ });
896
+ //# sourceMappingURL=index.js.map