@bsv/sdk 1.1.33 → 1.2.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (214) hide show
  1. package/dist/cjs/mod.js +4 -0
  2. package/dist/cjs/mod.js.map +1 -1
  3. package/dist/cjs/package.json +4 -3
  4. package/dist/cjs/src/auth/Certificate.js +163 -0
  5. package/dist/cjs/src/auth/Certificate.js.map +1 -0
  6. package/dist/cjs/src/auth/index.js +9 -0
  7. package/dist/cjs/src/auth/index.js.map +1 -0
  8. package/dist/cjs/src/compat/BSM.js +17 -7
  9. package/dist/cjs/src/compat/BSM.js.map +1 -1
  10. package/dist/cjs/src/compat/ECIES.js +17 -7
  11. package/dist/cjs/src/compat/ECIES.js.map +1 -1
  12. package/dist/cjs/src/compat/HD.js +17 -7
  13. package/dist/cjs/src/compat/HD.js.map +1 -1
  14. package/dist/cjs/src/compat/Mnemonic.js +17 -7
  15. package/dist/cjs/src/compat/Mnemonic.js.map +1 -1
  16. package/dist/cjs/src/compat/index.js +17 -7
  17. package/dist/cjs/src/compat/index.js.map +1 -1
  18. package/dist/cjs/src/messages/index.js +17 -7
  19. package/dist/cjs/src/messages/index.js.map +1 -1
  20. package/dist/cjs/src/overlay-tools/LookupResolver.js +170 -0
  21. package/dist/cjs/src/overlay-tools/LookupResolver.js.map +1 -0
  22. package/dist/cjs/src/overlay-tools/OverlayAdminTokenTemplate.js +69 -0
  23. package/dist/cjs/src/overlay-tools/OverlayAdminTokenTemplate.js.map +1 -0
  24. package/dist/cjs/src/overlay-tools/SHIPBroadcaster.js +336 -0
  25. package/dist/cjs/src/overlay-tools/SHIPBroadcaster.js.map +1 -0
  26. package/dist/cjs/src/overlay-tools/index.js +29 -0
  27. package/dist/cjs/src/overlay-tools/index.js.map +1 -0
  28. package/dist/cjs/src/primitives/PrivateKey.js +17 -7
  29. package/dist/cjs/src/primitives/PrivateKey.js.map +1 -1
  30. package/dist/cjs/src/primitives/TransactionSignature.js +17 -7
  31. package/dist/cjs/src/primitives/TransactionSignature.js.map +1 -1
  32. package/dist/cjs/src/primitives/index.js +17 -7
  33. package/dist/cjs/src/primitives/index.js.map +1 -1
  34. package/dist/cjs/src/script/Spend.js +17 -7
  35. package/dist/cjs/src/script/Spend.js.map +1 -1
  36. package/dist/cjs/src/script/templates/PushDrop.js +218 -0
  37. package/dist/cjs/src/script/templates/PushDrop.js.map +1 -0
  38. package/dist/cjs/src/script/templates/index.js +3 -1
  39. package/dist/cjs/src/script/templates/index.js.map +1 -1
  40. package/dist/cjs/src/transaction/http/DefaultHttpClient.js +1 -1
  41. package/dist/cjs/src/transaction/http/DefaultHttpClient.js.map +1 -1
  42. package/dist/cjs/src/wallet/CachedKeyDeriver.js +177 -0
  43. package/dist/cjs/src/wallet/CachedKeyDeriver.js.map +1 -0
  44. package/dist/cjs/src/wallet/KeyDeriver.js +174 -0
  45. package/dist/cjs/src/wallet/KeyDeriver.js.map +1 -0
  46. package/dist/cjs/src/wallet/ProtoWallet.js +245 -0
  47. package/dist/cjs/src/wallet/ProtoWallet.js.map +1 -0
  48. package/dist/cjs/src/wallet/Wallet.interfaces.js +3 -0
  49. package/dist/cjs/src/wallet/Wallet.interfaces.js.map +1 -0
  50. package/dist/cjs/src/wallet/WalletClient.js +181 -0
  51. package/dist/cjs/src/wallet/WalletClient.js.map +1 -0
  52. package/dist/cjs/src/wallet/WalletError.js +28 -0
  53. package/dist/cjs/src/wallet/WalletError.js.map +1 -0
  54. package/dist/cjs/src/wallet/index.js +34 -0
  55. package/dist/cjs/src/wallet/index.js.map +1 -0
  56. package/dist/cjs/src/wallet/substrates/HTTPWalletWire.js +45 -0
  57. package/dist/cjs/src/wallet/substrates/HTTPWalletWire.js.map +1 -0
  58. package/dist/cjs/src/wallet/substrates/WalletWire.js +3 -0
  59. package/dist/cjs/src/wallet/substrates/WalletWire.js.map +1 -0
  60. package/dist/cjs/src/wallet/substrates/WalletWireCalls.js +36 -0
  61. package/dist/cjs/src/wallet/substrates/WalletWireCalls.js.map +1 -0
  62. package/dist/cjs/src/wallet/substrates/WalletWireProcessor.js +1821 -0
  63. package/dist/cjs/src/wallet/substrates/WalletWireProcessor.js.map +1 -0
  64. package/dist/cjs/src/wallet/substrates/WalletWireTransceiver.js +1305 -0
  65. package/dist/cjs/src/wallet/substrates/WalletWireTransceiver.js.map +1 -0
  66. package/dist/cjs/src/wallet/substrates/XDM.js +130 -0
  67. package/dist/cjs/src/wallet/substrates/XDM.js.map +1 -0
  68. package/dist/cjs/src/wallet/substrates/index.js +33 -0
  69. package/dist/cjs/src/wallet/substrates/index.js.map +1 -0
  70. package/dist/cjs/src/wallet/substrates/window.CWI.js +102 -0
  71. package/dist/cjs/src/wallet/substrates/window.CWI.js.map +1 -0
  72. package/dist/cjs/tsconfig.cjs.tsbuildinfo +1 -1
  73. package/dist/esm/mod.js +4 -0
  74. package/dist/esm/mod.js.map +1 -1
  75. package/dist/esm/src/auth/Certificate.js +185 -0
  76. package/dist/esm/src/auth/Certificate.js.map +1 -0
  77. package/dist/esm/src/auth/index.js +2 -0
  78. package/dist/esm/src/auth/index.js.map +1 -0
  79. package/dist/esm/src/overlay-tools/LookupResolver.js +167 -0
  80. package/dist/esm/src/overlay-tools/LookupResolver.js.map +1 -0
  81. package/dist/esm/src/overlay-tools/OverlayAdminTokenTemplate.js +64 -0
  82. package/dist/esm/src/overlay-tools/OverlayAdminTokenTemplate.js.map +1 -0
  83. package/dist/esm/src/overlay-tools/SHIPBroadcaster.js +335 -0
  84. package/dist/esm/src/overlay-tools/SHIPBroadcaster.js.map +1 -0
  85. package/dist/esm/src/overlay-tools/index.js +6 -0
  86. package/dist/esm/src/overlay-tools/index.js.map +1 -0
  87. package/dist/esm/src/script/templates/PushDrop.js +215 -0
  88. package/dist/esm/src/script/templates/PushDrop.js.map +1 -0
  89. package/dist/esm/src/script/templates/index.js +1 -0
  90. package/dist/esm/src/script/templates/index.js.map +1 -1
  91. package/dist/esm/src/transaction/http/DefaultHttpClient.js +1 -1
  92. package/dist/esm/src/transaction/http/DefaultHttpClient.js.map +1 -1
  93. package/dist/esm/src/wallet/CachedKeyDeriver.js +174 -0
  94. package/dist/esm/src/wallet/CachedKeyDeriver.js.map +1 -0
  95. package/dist/esm/src/wallet/KeyDeriver.js +172 -0
  96. package/dist/esm/src/wallet/KeyDeriver.js.map +1 -0
  97. package/dist/esm/src/wallet/ProtoWallet.js +207 -0
  98. package/dist/esm/src/wallet/ProtoWallet.js.map +1 -0
  99. package/dist/esm/src/wallet/Wallet.interfaces.js +2 -0
  100. package/dist/esm/src/wallet/Wallet.interfaces.js.map +1 -0
  101. package/dist/esm/src/wallet/WalletClient.js +177 -0
  102. package/dist/esm/src/wallet/WalletClient.js.map +1 -0
  103. package/dist/esm/src/wallet/WalletError.js +25 -0
  104. package/dist/esm/src/wallet/WalletError.js.map +1 -0
  105. package/dist/esm/src/wallet/index.js +9 -0
  106. package/dist/esm/src/wallet/index.js.map +1 -0
  107. package/dist/esm/src/wallet/substrates/HTTPWalletWire.js +42 -0
  108. package/dist/esm/src/wallet/substrates/HTTPWalletWire.js.map +1 -0
  109. package/dist/esm/src/wallet/substrates/WalletWire.js +2 -0
  110. package/dist/esm/src/wallet/substrates/WalletWire.js.map +1 -0
  111. package/dist/esm/src/wallet/substrates/WalletWireCalls.js +34 -0
  112. package/dist/esm/src/wallet/substrates/WalletWireCalls.js.map +1 -0
  113. package/dist/esm/src/wallet/substrates/WalletWireProcessor.js +1816 -0
  114. package/dist/esm/src/wallet/substrates/WalletWireProcessor.js.map +1 -0
  115. package/dist/esm/src/wallet/substrates/WalletWireTransceiver.js +1300 -0
  116. package/dist/esm/src/wallet/substrates/WalletWireTransceiver.js.map +1 -0
  117. package/dist/esm/src/wallet/substrates/XDM.js +128 -0
  118. package/dist/esm/src/wallet/substrates/XDM.js.map +1 -0
  119. package/dist/esm/src/wallet/substrates/index.js +8 -0
  120. package/dist/esm/src/wallet/substrates/index.js.map +1 -0
  121. package/dist/esm/src/wallet/substrates/window.CWI.js +100 -0
  122. package/dist/esm/src/wallet/substrates/window.CWI.js.map +1 -0
  123. package/dist/esm/tsconfig.esm.tsbuildinfo +1 -1
  124. package/dist/types/mod.d.ts +4 -0
  125. package/dist/types/mod.d.ts.map +1 -1
  126. package/dist/types/src/auth/Certificate.d.ts +76 -0
  127. package/dist/types/src/auth/Certificate.d.ts.map +1 -0
  128. package/dist/types/src/auth/index.d.ts +2 -0
  129. package/dist/types/src/auth/index.d.ts.map +1 -0
  130. package/dist/types/src/overlay-tools/LookupResolver.d.ts +71 -0
  131. package/dist/types/src/overlay-tools/LookupResolver.d.ts.map +1 -0
  132. package/dist/types/src/overlay-tools/OverlayAdminTokenTemplate.d.ts +44 -0
  133. package/dist/types/src/overlay-tools/OverlayAdminTokenTemplate.d.ts.map +1 -0
  134. package/dist/types/src/overlay-tools/SHIPBroadcaster.d.ts +90 -0
  135. package/dist/types/src/overlay-tools/SHIPBroadcaster.d.ts.map +1 -0
  136. package/dist/types/src/overlay-tools/index.d.ts +6 -0
  137. package/dist/types/src/overlay-tools/index.d.ts.map +1 -0
  138. package/dist/types/src/script/templates/PushDrop.d.ts +53 -0
  139. package/dist/types/src/script/templates/PushDrop.d.ts.map +1 -0
  140. package/dist/types/src/script/templates/index.d.ts +1 -0
  141. package/dist/types/src/script/templates/index.d.ts.map +1 -1
  142. package/dist/types/src/wallet/CachedKeyDeriver.d.ts +92 -0
  143. package/dist/types/src/wallet/CachedKeyDeriver.d.ts.map +1 -0
  144. package/dist/types/src/wallet/KeyDeriver.d.ts +72 -0
  145. package/dist/types/src/wallet/KeyDeriver.d.ts.map +1 -0
  146. package/dist/types/src/wallet/ProtoWallet.d.ts +415 -0
  147. package/dist/types/src/wallet/ProtoWallet.d.ts.map +1 -0
  148. package/dist/types/src/wallet/Wallet.interfaces.d.ts +996 -0
  149. package/dist/types/src/wallet/Wallet.interfaces.d.ts.map +1 -0
  150. package/dist/types/src/wallet/WalletClient.d.ts +182 -0
  151. package/dist/types/src/wallet/WalletClient.d.ts.map +1 -0
  152. package/dist/types/src/wallet/WalletError.d.ts +14 -0
  153. package/dist/types/src/wallet/WalletError.d.ts.map +1 -0
  154. package/dist/types/src/wallet/index.d.ts +9 -0
  155. package/dist/types/src/wallet/index.d.ts.map +1 -0
  156. package/dist/types/src/wallet/substrates/HTTPWalletWire.d.ts +9 -0
  157. package/dist/types/src/wallet/substrates/HTTPWalletWire.d.ts.map +1 -0
  158. package/dist/types/src/wallet/substrates/WalletWire.d.ts +7 -0
  159. package/dist/types/src/wallet/substrates/WalletWire.d.ts.map +1 -0
  160. package/dist/types/src/wallet/substrates/WalletWireCalls.d.ts +33 -0
  161. package/dist/types/src/wallet/substrates/WalletWireCalls.d.ts.map +1 -0
  162. package/dist/types/src/wallet/substrates/WalletWireProcessor.d.ts +18 -0
  163. package/dist/types/src/wallet/substrates/WalletWireProcessor.d.ts.map +1 -0
  164. package/dist/types/src/wallet/substrates/WalletWireTransceiver.d.ts +196 -0
  165. package/dist/types/src/wallet/substrates/WalletWireTransceiver.d.ts.map +1 -0
  166. package/dist/types/src/wallet/substrates/XDM.d.ts +412 -0
  167. package/dist/types/src/wallet/substrates/XDM.d.ts.map +1 -0
  168. package/dist/types/src/wallet/substrates/index.d.ts +8 -0
  169. package/dist/types/src/wallet/substrates/index.d.ts.map +1 -0
  170. package/dist/types/src/wallet/substrates/window.CWI.d.ts +410 -0
  171. package/dist/types/src/wallet/substrates/window.CWI.d.ts.map +1 -0
  172. package/dist/types/tsconfig.types.tsbuildinfo +1 -1
  173. package/dist/umd/bundle.js +1 -1
  174. package/docs/overlay-tools.md +537 -0
  175. package/docs/script.md +135 -0
  176. package/docs/totp.md +119 -0
  177. package/docs/wallet-substrates.md +10 -0
  178. package/docs/wallet.md +3718 -0
  179. package/mod.ts +5 -1
  180. package/package.json +44 -3
  181. package/src/auth/Certificate.ts +233 -0
  182. package/src/auth/__tests/Certificate.test.ts +282 -0
  183. package/src/auth/index.ts +1 -0
  184. package/src/overlay-tools/LookupResolver.ts +228 -0
  185. package/src/overlay-tools/OverlayAdminTokenTemplate.ts +79 -0
  186. package/src/overlay-tools/SHIPBroadcaster.ts +405 -0
  187. package/src/overlay-tools/__tests/LookupResolver.test.ts +1403 -0
  188. package/src/overlay-tools/__tests/OverlayAdminTokenTemplate.test.ts +69 -0
  189. package/src/overlay-tools/__tests/SHIPBroadcaster.test.ts +904 -0
  190. package/src/overlay-tools/index.ts +5 -0
  191. package/src/script/templates/PushDrop.ts +246 -0
  192. package/src/script/templates/__tests/PushDrop.test.ts +158 -0
  193. package/src/script/templates/index.ts +1 -0
  194. package/src/transaction/http/DefaultHttpClient.ts +1 -1
  195. package/src/wallet/CachedKeyDeriver.ts +193 -0
  196. package/src/wallet/KeyDeriver.ts +178 -0
  197. package/src/wallet/ProtoWallet.ts +732 -0
  198. package/src/wallet/Wallet.interfaces.ts +1170 -0
  199. package/src/wallet/WalletClient.ts +201 -0
  200. package/src/wallet/WalletError.ts +27 -0
  201. package/src/wallet/__tests/CachedKeyDeriver.test.ts +322 -0
  202. package/src/wallet/__tests/KeyDeriver.test.ts +118 -0
  203. package/src/wallet/__tests/ProtoWallet.test.ts +543 -0
  204. package/src/wallet/index.ts +8 -0
  205. package/src/wallet/substrates/HTTPWalletWire.ts +47 -0
  206. package/src/wallet/substrates/WalletWire.ts +6 -0
  207. package/src/wallet/substrates/WalletWireCalls.ts +34 -0
  208. package/src/wallet/substrates/WalletWireProcessor.ts +2046 -0
  209. package/src/wallet/substrates/WalletWireTransceiver.ts +1454 -0
  210. package/src/wallet/substrates/XDM.ts +157 -0
  211. package/src/wallet/substrates/__tests/WalletWire.integration.test.ts +2194 -0
  212. package/src/wallet/substrates/__tests/XDM.test.ts +659 -0
  213. package/src/wallet/substrates/index.ts +7 -0
  214. package/src/wallet/substrates/window.CWI.ts +133 -0
@@ -0,0 +1,90 @@
1
+ import { Transaction, BroadcastResponse, BroadcastFailure, Broadcaster } from '../transaction/index.js';
2
+ import LookupResolver from './LookupResolver.js';
3
+ /**
4
+ * Tagged BEEF
5
+ *
6
+ * @description
7
+ * Tagged BEEF ([Background Evaluation Extended Format](https://brc.dev/62)) structure. Comprises a transaction, its SPV information, and the overlay topics where its inclusion is requested.
8
+ */
9
+ export interface TaggedBEEF {
10
+ beef: number[];
11
+ topics: string[];
12
+ }
13
+ /**
14
+ * Instructs the Overlay Services Engine about which outputs to admit and which previous outputs to retain. Returned by a Topic Manager.
15
+ */
16
+ export interface AdmittanceInstructions {
17
+ /**
18
+ * The indices of all admissable outputs into the managed topic from the provided transaction.
19
+ */
20
+ outputsToAdmit: number[];
21
+ /**
22
+ * The indices of all inputs from the provided transaction which spend previously-admitted outputs that should be retained for historical record-keeping.
23
+ */
24
+ coinsToRetain: number[];
25
+ }
26
+ /**
27
+ * Submitted Transaction Execution AcKnowledgment
28
+ *
29
+ * @description
30
+ * Comprises the topics where a transaction was submitted, and for each one, the output indices for the UTXOs newly admitted into the topics, and the coins retained.
31
+ * An object whose keys are topic names and whose values are topical admittance instructions denoting the state of the submitted transaction with respect to the associated topic.
32
+ */
33
+ export type STEAK = Record<string, AdmittanceInstructions>;
34
+ /** Configuration options for the SHIP broadcaster. */
35
+ export interface SHIPBroadcasterConfig {
36
+ /** The facilitator used to make requests to Overlay Services hosts. */
37
+ facilitator?: OverlayBroadcastFacilitator;
38
+ /** The resolver used to locate suitable hosts with SHIP */
39
+ resolver: LookupResolver;
40
+ /** Determines which topics (all, any, or a specific list) must be present within all STEAKs received from every host for the broadcast to be considered a success. By default, all hosts must acknowledge all topics. */
41
+ requireAcknowledgmentFromAllHostsForTopics?: 'all' | 'any' | string[];
42
+ /** Determines which topics (all, any, or a specific list) must be present within STEAK received from at least one host for the broadcast to be considered a success. */
43
+ requireAcknowledgmentFromAnyHostForTopics?: 'all' | 'any' | string[];
44
+ /** Determines a mapping whose keys are specific hosts and whose values are the topics (all, any, or a specific list) that must be present within the STEAK received by the given hosts, in order for the broadcast to be considered a success. */
45
+ requireAcknowledgmentFromSpecificHostsForTopics?: Record<string, 'all' | 'any' | string[]>;
46
+ }
47
+ /** Facilitates transaction broadcasts that return STEAK. */
48
+ export interface OverlayBroadcastFacilitator {
49
+ send: (url: string, taggedBEEF: TaggedBEEF) => Promise<STEAK>;
50
+ }
51
+ export declare class HTTPSOverlayBroadcastFacilitator implements OverlayBroadcastFacilitator {
52
+ httpClient: typeof fetch;
53
+ constructor(httpClient?: typeof fetch);
54
+ send(url: string, taggedBEEF: TaggedBEEF): Promise<STEAK>;
55
+ }
56
+ /**
57
+ * Represents a SHIP transaction broadcaster.
58
+ */
59
+ export default class SHIPCast implements Broadcaster {
60
+ private readonly topics;
61
+ private readonly facilitator;
62
+ private readonly resolver;
63
+ private readonly requireAcknowledgmentFromAllHostsForTopics;
64
+ private readonly requireAcknowledgmentFromAnyHostForTopics;
65
+ private readonly requireAcknowledgmentFromSpecificHostsForTopics;
66
+ /**
67
+ * Constructs an instance of the SHIP broadcaster.
68
+ *
69
+ * @param {string[]} topics - The list of SHIP topic names where transactions are to be sent.
70
+ * @param {SHIPBroadcasterConfig} config - Configuration options for the SHIP broadcaster.
71
+ */
72
+ constructor(topics: string[], config?: SHIPBroadcasterConfig);
73
+ /**
74
+ * Broadcasts a transaction to Overlay Services via SHIP.
75
+ *
76
+ * @param {Transaction} tx - The transaction to be sent.
77
+ * @returns {Promise<BroadcastResponse | BroadcastFailure>} A promise that resolves to either a success or failure response.
78
+ */
79
+ broadcast(tx: Transaction): Promise<BroadcastResponse | BroadcastFailure>;
80
+ private checkAcknowledgmentFromAllHosts;
81
+ private checkAcknowledgmentFromAnyHost;
82
+ private checkAcknowledgmentFromSpecificHosts;
83
+ /**
84
+ * Finds which hosts are interested in transactions tagged with the given set of topics.
85
+ *
86
+ * @returns A mapping of URLs for hosts interested in this transaction. Keys are URLs, values are which of our topics the specific host cares about.
87
+ */
88
+ private findInterestedHosts;
89
+ }
90
+ //# sourceMappingURL=SHIPBroadcaster.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SHIPBroadcaster.d.ts","sourceRoot":"","sources":["../../../../src/overlay-tools/SHIPBroadcaster.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,iBAAiB,EAAE,gBAAgB,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAA;AACvG,OAAO,cAAc,MAAM,qBAAqB,CAAA;AAGhD;;;;;GAKG;AACH,MAAM,WAAW,UAAU;IACzB,IAAI,EAAE,MAAM,EAAE,CAAA;IACd,MAAM,EAAE,MAAM,EAAE,CAAA;CACjB;AAED;;GAEG;AACH,MAAM,WAAW,sBAAsB;IACrC;;SAEK;IACL,cAAc,EAAE,MAAM,EAAE,CAAA;IAExB;;SAEK;IACL,aAAa,EAAE,MAAM,EAAE,CAAA;CACxB;AAED;;;;;;GAMG;AACH,MAAM,MAAM,KAAK,GAAG,MAAM,CAAC,MAAM,EAAE,sBAAsB,CAAC,CAAA;AAE1D,sDAAsD;AACtD,MAAM,WAAW,qBAAqB;IACpC,uEAAuE;IACvE,WAAW,CAAC,EAAE,2BAA2B,CAAA;IACzC,2DAA2D;IAC3D,QAAQ,EAAE,cAAc,CAAA;IACxB,yNAAyN;IACzN,0CAA0C,CAAC,EAAE,KAAK,GAAG,KAAK,GAAG,MAAM,EAAE,CAAA;IACrE,wKAAwK;IACxK,yCAAyC,CAAC,EAAE,KAAK,GAAG,KAAK,GAAG,MAAM,EAAE,CAAA;IACpE,kPAAkP;IAClP,+CAA+C,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,KAAK,GAAG,KAAK,GAAG,MAAM,EAAE,CAAC,CAAA;CAC3F;AAED,4DAA4D;AAC5D,MAAM,WAAW,2BAA2B;IAC1C,IAAI,EAAE,CAAC,GAAG,EAAE,MAAM,EAAE,UAAU,EAAE,UAAU,KAAK,OAAO,CAAC,KAAK,CAAC,CAAA;CAC9D;AAED,qBAAa,gCAAiC,YAAW,2BAA2B;IAClF,UAAU,EAAE,OAAO,KAAK,CAAA;gBAEZ,UAAU,eAAQ;IAIxB,IAAI,CAAC,GAAG,EAAE,MAAM,EAAE,UAAU,EAAE,UAAU,GAAG,OAAO,CAAC,KAAK,CAAC;CAkBhE;AAED;;GAEG;AACH,MAAM,CAAC,OAAO,OAAO,QAAS,YAAW,WAAW;IAClD,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAU;IACjC,OAAO,CAAC,QAAQ,CAAC,WAAW,CAA6B;IACzD,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAAgB;IACzC,OAAO,CAAC,QAAQ,CAAC,0CAA0C,CAA0B;IACrF,OAAO,CAAC,QAAQ,CAAC,yCAAyC,CAA0B;IACpF,OAAO,CAAC,QAAQ,CAAC,+CAA+C,CAA0C;IAE1G;;;;;SAKK;gBACO,MAAM,EAAE,MAAM,EAAE,EAAE,MAAM,CAAC,EAAE,qBAAqB;IAqB5D;;;;;SAKK;IACC,SAAS,CAAC,EAAE,EAAE,WAAW,GAAG,OAAO,CAAC,iBAAiB,GAAG,gBAAgB,CAAC;IA6I/E,OAAO,CAAC,+BAA+B;IAwBvC,OAAO,CAAC,8BAA8B;IA6BtC,OAAO,CAAC,oCAAoC;IAyC5C;;;;SAIK;YACS,mBAAmB;CAmClC"}
@@ -0,0 +1,6 @@
1
+ export * from './LookupResolver.js';
2
+ export * from './SHIPBroadcaster.js';
3
+ export { default as OverlayAdminTokenTemplate } from './OverlayAdminTokenTemplate.js';
4
+ export { default as LookupResolver } from './LookupResolver.js';
5
+ export { default as SHIPBroadcaster } from './SHIPBroadcaster.js';
6
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/overlay-tools/index.ts"],"names":[],"mappings":"AAAA,cAAc,qBAAqB,CAAA;AACnC,cAAc,sBAAsB,CAAA;AACpC,OAAO,EAAE,OAAO,IAAI,yBAAyB,EAAE,MAAM,gCAAgC,CAAA;AACrF,OAAO,EAAE,OAAO,IAAI,cAAc,EAAE,MAAM,qBAAqB,CAAA;AAC/D,OAAO,EAAE,OAAO,IAAI,eAAe,EAAE,MAAM,sBAAsB,CAAA"}
@@ -0,0 +1,53 @@
1
+ import { ScriptTemplate, LockingScript, UnlockingScript } from '../index.js';
2
+ import { PublicKey } from '../../primitives/index.js';
3
+ import { Wallet } from '../../wallet/Wallet.interfaces.js';
4
+ import { Transaction } from '../../transaction/index.js';
5
+ export default class PushDrop implements ScriptTemplate {
6
+ wallet: Wallet;
7
+ /**
8
+ * Decodes a PushDrop script back into its token fields and the locking public key. If a signature was present, it will be the last field returned.
9
+ * Warning: Only works with a P2PK lock at the beginning of the script.
10
+ * @param script PushDrop script to decode back into token fields
11
+ * @returns An object containing PushDrop token fields and the locking public key. If a signature was included, it will be the last field.
12
+ */
13
+ static decode(script: LockingScript): {
14
+ lockingPublicKey: PublicKey;
15
+ fields: number[][];
16
+ };
17
+ /**
18
+ * Constructs a new instance of the PushDrop class.
19
+ *
20
+ * @param {Wallet} wallet - The wallet interface used for creating signatures and accessing public keys.
21
+ */
22
+ constructor(wallet: Wallet);
23
+ /**
24
+ * Creates a PushDrop locking script with arbitrary data fields and a public key lock.
25
+ *
26
+ * @param {number[][]} fields - The token fields to include in the locking script.
27
+ * @param {[0 | 1 | 2, string]} protocolID - The protocol ID to use.
28
+ * @param {string} keyID - The key ID to use.
29
+ * @param {string} counterparty - The counterparty involved in the transaction, "self" or "anyone".
30
+ * @param {boolean} [forSelf=false] - Flag indicating if the lock is for the creator (default no).
31
+ * @param {boolean} [includeSignature=true] - Flag indicating if a signature should be included in the script (default yes).
32
+ * @returns {Promise<LockingScript>} The generated PushDrop locking script.
33
+ */
34
+ lock(fields: number[][], protocolID: [0 | 1 | 2, string], keyID: string, counterparty: string, forSelf?: boolean, includeSignature?: boolean, lockPosition?: 'before' | 'after'): Promise<LockingScript>;
35
+ /**
36
+ * Creates an unlocking script for spending a PushDrop token output.
37
+ *
38
+ * @param {[0 | 1 | 2, string]} protocolID - The protocol ID to use.
39
+ * @param {string} keyID - The key ID to use.
40
+ * @param {string} counterparty - The counterparty involved in the transaction, "self" or "anyone".
41
+ * @param {string} [sourceTXID] - The TXID of the source transaction.
42
+ * @param {number} [sourceSatoshis] - The number of satoshis in the source output.
43
+ * @param {LockingScript} [lockingScript] - The locking script of the source output.
44
+ * @param {'all' | 'none' | 'single'} [signOutputs='all'] - Specifies which outputs to sign.
45
+ * @param {boolean} [anyoneCanPay=false] - Specifies if the anyone-can-pay flag is set.
46
+ * @returns {Object} An object containing functions to sign the transaction and estimate the script length.
47
+ */
48
+ unlock(protocolID: [0 | 1 | 2, string], keyID: string, counterparty: string, signOutputs?: 'all' | 'none' | 'single', anyoneCanPay?: boolean, sourceSatoshis?: number, lockingScript?: LockingScript): {
49
+ sign: (tx: Transaction, inputIndex: number) => Promise<UnlockingScript>;
50
+ estimateLength: () => Promise<73>;
51
+ };
52
+ }
53
+ //# sourceMappingURL=PushDrop.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"PushDrop.d.ts","sourceRoot":"","sources":["../../../../../src/script/templates/PushDrop.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,aAAa,EAAE,eAAe,EAAM,MAAM,aAAa,CAAA;AAChF,OAAO,EAAgD,SAAS,EAAE,MAAM,2BAA2B,CAAA;AACnG,OAAO,EAAE,MAAM,EAAE,MAAM,mCAAmC,CAAA;AAC1D,OAAO,EAAE,WAAW,EAAE,MAAM,4BAA4B,CAAA;AAyCxD,MAAM,CAAC,OAAO,OAAO,QAAS,YAAW,cAAc;IACrD,MAAM,EAAE,MAAM,CAAA;IAEd;;;;;OAKG;IACH,MAAM,CAAC,MAAM,CAAC,MAAM,EAAE,aAAa,GAAG;QAAE,gBAAgB,EAAE,SAAS,CAAC;QAAC,MAAM,EAAE,MAAM,EAAE,EAAE,CAAA;KAAE;IA6BzF;;;;OAIG;gBACS,MAAM,EAAE,MAAM;IAI1B;;;;;;;;;;OAUG;IACG,IAAI,CAAC,MAAM,EAAE,MAAM,EAAE,EAAE,EAAE,UAAU,EAAE,CAAC,CAAC,GAAG,CAAC,GAAG,CAAC,EAAE,MAAM,CAAC,EAAE,KAAK,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM,EAAE,OAAO,UAAQ,EAAE,gBAAgB,UAAO,EAAE,YAAY,GAAE,QAAQ,GAAG,OAAkB,GAAG,OAAO,CAAC,aAAa,CAAC;IA6CnN;;;;;;;;;;;;OAYG;IACH,MAAM,CACJ,UAAU,EAAE,CAAC,CAAC,GAAG,CAAC,GAAG,CAAC,EAAE,MAAM,CAAC,EAC/B,KAAK,EAAE,MAAM,EACb,YAAY,EAAE,MAAM,EACpB,WAAW,GAAE,KAAK,GAAG,MAAM,GAAG,QAAgB,EAC9C,YAAY,UAAQ,EACpB,cAAc,CAAC,EAAE,MAAM,EACvB,aAAa,CAAC,EAAE,aAAa,GAC5B;QACD,IAAI,EAAE,CAAC,EAAE,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,KAAK,OAAO,CAAC,eAAe,CAAC,CAAA;QACvE,cAAc,EAAE,MAAM,OAAO,CAAC,EAAE,CAAC,CAAA;KAClC;CA0EF"}
@@ -1,3 +1,4 @@
1
1
  export { default as P2PKH } from './P2PKH.js';
2
2
  export { default as RPuzzle } from './RPuzzle.js';
3
+ export { default as PushDrop } from './PushDrop.js';
3
4
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/script/templates/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,KAAK,EAAE,MAAM,YAAY,CAAA;AAC7C,OAAO,EAAE,OAAO,IAAI,OAAO,EAAE,MAAM,cAAc,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/script/templates/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,KAAK,EAAE,MAAM,YAAY,CAAA;AAC7C,OAAO,EAAE,OAAO,IAAI,OAAO,EAAE,MAAM,cAAc,CAAA;AACjD,OAAO,EAAE,OAAO,IAAI,QAAQ,EAAE,MAAM,eAAe,CAAA"}
@@ -0,0 +1,92 @@
1
+ import { PrivateKey, PublicKey, SymmetricKey } from '../primitives/index.js';
2
+ /**
3
+ * A cached version of KeyDeriver that caches the results of key derivation methods.
4
+ * This is useful for optimizing performance when the same keys are derived multiple times.
5
+ * It supports configurable cache size with sane defaults and maintains cache entries using LRU (Least Recently Used) eviction policy.
6
+ */
7
+ export default class CachedKeyDeriver {
8
+ private readonly keyDeriver;
9
+ private readonly cache;
10
+ private readonly maxCacheSize;
11
+ /**
12
+ * Initializes the CachedKeyDeriver instance with a root private key and optional cache settings.
13
+ * @param {PrivateKey | 'anyone'} rootKey - The root private key or the string 'anyone'.
14
+ * @param {Object} [options] - Optional settings for the cache.
15
+ * @param {number} [options.maxCacheSize=1000] - The maximum number of entries to store in the cache.
16
+ */
17
+ constructor(rootKey: PrivateKey | 'anyone', options?: {
18
+ maxCacheSize?: number;
19
+ });
20
+ /**
21
+ * Derives a public key based on protocol ID, key ID, and counterparty.
22
+ * Caches the result for future calls with the same parameters.
23
+ * @param {[0 | 1 | 2, string]} protocolID - The protocol ID including a security level and protocol name.
24
+ * @param {string} keyID - The key identifier.
25
+ * @param {PublicKey | string | 'self' | 'anyone'} counterparty - The counterparty's public key or a predefined value ('self' or 'anyone').
26
+ * @param {boolean} [forSelf=false] - Whether deriving for self.
27
+ * @returns {PublicKey} - The derived public key.
28
+ */
29
+ derivePublicKey(protocolID: [0 | 1 | 2, string], keyID: string, counterparty: PublicKey | string | 'self' | 'anyone', forSelf?: boolean): PublicKey;
30
+ /**
31
+ * Derives a private key based on protocol ID, key ID, and counterparty.
32
+ * Caches the result for future calls with the same parameters.
33
+ * @param {[0 | 1 | 2, string]} protocolID - The protocol ID including a security level and protocol name.
34
+ * @param {string} keyID - The key identifier.
35
+ * @param {PublicKey | string | 'self' | 'anyone'} counterparty - The counterparty's public key or a predefined value ('self' or 'anyone').
36
+ * @returns {PrivateKey} - The derived private key.
37
+ */
38
+ derivePrivateKey(protocolID: [0 | 1 | 2, string], keyID: string, counterparty: PublicKey | string | 'self' | 'anyone'): PrivateKey;
39
+ /**
40
+ * Derives a symmetric key based on protocol ID, key ID, and counterparty.
41
+ * Caches the result for future calls with the same parameters.
42
+ * @param {[0 | 1 | 2, string]} protocolID - The protocol ID including a security level and protocol name.
43
+ * @param {string} keyID - The key identifier.
44
+ * @param {PublicKey | string | 'self' | 'anyone'} counterparty - The counterparty's public key or a predefined value ('self' or 'anyone').
45
+ * @returns {SymmetricKey} - The derived symmetric key.
46
+ * @throws {Error} - Throws an error if attempting to derive a symmetric key for 'anyone'.
47
+ */
48
+ deriveSymmetricKey(protocolID: [0 | 1 | 2, string], keyID: string, counterparty: PublicKey | string | 'self' | 'anyone'): SymmetricKey;
49
+ /**
50
+ * Reveals the shared secret between the root key and the counterparty.
51
+ * Caches the result for future calls with the same parameters.
52
+ * @param {PublicKey | string | 'self' | 'anyone'} counterparty - The counterparty's public key or a predefined value ('self' or 'anyone').
53
+ * @returns {number[]} - The shared secret as a number array.
54
+ * @throws {Error} - Throws an error if attempting to reveal a shared secret for 'self'.
55
+ */
56
+ revealCounterpartySecret(counterparty: PublicKey | string | 'self' | 'anyone'): number[];
57
+ /**
58
+ * Reveals the specific key association for a given protocol ID, key ID, and counterparty.
59
+ * Caches the result for future calls with the same parameters.
60
+ * @param {PublicKey | string | 'self' | 'anyone'} counterparty - The counterparty's public key or a predefined value ('self' or 'anyone').
61
+ * @param {[0 | 1 | 2, string]} protocolID - The protocol ID including a security level and protocol name.
62
+ * @param {string} keyID - The key identifier.
63
+ * @returns {number[]} - The specific key association as a number array.
64
+ */
65
+ revealSpecificSecret(counterparty: PublicKey | string | 'self' | 'anyone', protocolID: [0 | 1 | 2, string], keyID: string): number[];
66
+ /**
67
+ * Generates a unique cache key based on the method name and input parameters.
68
+ * @param {string} methodName - The name of the method.
69
+ * @param {...any} args - The arguments passed to the method.
70
+ * @returns {string} - The generated cache key.
71
+ */
72
+ private generateCacheKey;
73
+ /**
74
+ * Serializes an argument to a string for use in a cache key.
75
+ * @param {any} arg - The argument to serialize.
76
+ * @returns {string} - The serialized argument.
77
+ */
78
+ private serializeArgument;
79
+ /**
80
+ * Retrieves an item from the cache and updates its position to reflect recent use.
81
+ * @param {string} cacheKey - The key of the cached item.
82
+ * @returns {any} - The cached value.
83
+ */
84
+ private cacheGet;
85
+ /**
86
+ * Adds an item to the cache and evicts the least recently used item if necessary.
87
+ * @param {string} cacheKey - The key of the item to cache.
88
+ * @param {any} value - The value to cache.
89
+ */
90
+ private cacheSet;
91
+ }
92
+ //# sourceMappingURL=CachedKeyDeriver.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"CachedKeyDeriver.d.ts","sourceRoot":"","sources":["../../../../src/wallet/CachedKeyDeriver.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAA;AAG5E;;;;GAIG;AACH,MAAM,CAAC,OAAO,OAAO,gBAAgB;IACnC,OAAO,CAAC,QAAQ,CAAC,UAAU,CAAY;IACvC,OAAO,CAAC,QAAQ,CAAC,KAAK,CAAkB;IACxC,OAAO,CAAC,QAAQ,CAAC,YAAY,CAAQ;IAErC;;;;;SAKK;gBACO,OAAO,EAAE,UAAU,GAAG,QAAQ,EAAE,OAAO,CAAC,EAAE;QAAE,YAAY,CAAC,EAAE,MAAM,CAAA;KAAE;IAM/E;;;;;;;;SAQK;IACL,eAAe,CACb,UAAU,EAAE,CAAC,CAAC,GAAG,CAAC,GAAG,CAAC,EAAE,MAAM,CAAC,EAC/B,KAAK,EAAE,MAAM,EACb,YAAY,EAAE,SAAS,GAAG,MAAM,GAAG,MAAM,GAAG,QAAQ,EACpD,OAAO,GAAE,OAAe,GACvB,SAAS;IAWZ;;;;;;;SAOK;IACL,gBAAgB,CACd,UAAU,EAAE,CAAC,CAAC,GAAG,CAAC,GAAG,CAAC,EAAE,MAAM,CAAC,EAC/B,KAAK,EAAE,MAAM,EACb,YAAY,EAAE,SAAS,GAAG,MAAM,GAAG,MAAM,GAAG,QAAQ,GACnD,UAAU;IAWb;;;;;;;;SAQK;IACL,kBAAkB,CAChB,UAAU,EAAE,CAAC,CAAC,GAAG,CAAC,GAAG,CAAC,EAAE,MAAM,CAAC,EAC/B,KAAK,EAAE,MAAM,EACb,YAAY,EAAE,SAAS,GAAG,MAAM,GAAG,MAAM,GAAG,QAAQ,GACnD,YAAY;IAWf;;;;;;SAMK;IACL,wBAAwB,CAAC,YAAY,EAAE,SAAS,GAAG,MAAM,GAAG,MAAM,GAAG,QAAQ,GAAG,MAAM,EAAE;IAWxF;;;;;;;SAOK;IACL,oBAAoB,CAClB,YAAY,EAAE,SAAS,GAAG,MAAM,GAAG,MAAM,GAAG,QAAQ,EACpD,UAAU,EAAE,CAAC,CAAC,GAAG,CAAC,GAAG,CAAC,EAAE,MAAM,CAAC,EAC/B,KAAK,EAAE,MAAM,GACZ,MAAM,EAAE;IAWX;;;;;SAKK;IACL,OAAO,CAAC,gBAAgB;IAKxB;;;;SAIK;IACL,OAAO,CAAC,iBAAiB;IAYzB;;;;SAIK;IACL,OAAO,CAAC,QAAQ;IAQhB;;;;SAIK;IACL,OAAO,CAAC,QAAQ;CAQjB"}
@@ -0,0 +1,72 @@
1
+ import { PrivateKey, PublicKey, SymmetricKey } from '../primitives/index.js';
2
+ /**
3
+ * Class responsible for deriving various types of keys using a root private key.
4
+ * It supports deriving public and private keys, symmetric keys, and revealing key linkages.
5
+ */
6
+ export default class KeyDeriver {
7
+ rootKey: PrivateKey;
8
+ /**
9
+ * Initializes the KeyDeriver instance with a root private key.
10
+ * @param {PrivateKey | 'anyone'} rootKey - The root private key or the string 'anyone'.
11
+ */
12
+ constructor(rootKey: PrivateKey | 'anyone');
13
+ /**
14
+ * Derives a public key based on protocol ID, key ID, and counterparty.
15
+ * @param {[0 | 1 | 2, string]} protocolID - The protocol ID including a security level and protocol name.
16
+ * @param {string} keyID - The key identifier.
17
+ * @param {PublicKey | string | 'self' | 'anyone'} counterparty - The counterparty's public key or a predefined value ('self' or 'anyone').
18
+ * @param {boolean} [forSelf=false] - Whether deriving for self.
19
+ * @returns {PublicKey} - The derived public key.
20
+ */
21
+ derivePublicKey(protocolID: [0 | 1 | 2, string], keyID: string, counterparty: PublicKey | string | 'self' | 'anyone', forSelf?: boolean): PublicKey;
22
+ /**
23
+ * Derives a private key based on protocol ID, key ID, and counterparty.
24
+ * @param {[0 | 1 | 2, string]} protocolID - The protocol ID including a security level and protocol name.
25
+ * @param {string} keyID - The key identifier.
26
+ * @param {PublicKey | string | 'self' | 'anyone'} counterparty - The counterparty's public key or a predefined value ('self' or 'anyone').
27
+ * @returns {PrivateKey} - The derived private key.
28
+ */
29
+ derivePrivateKey(protocolID: [0 | 1 | 2, string], keyID: string, counterparty: PublicKey | string | 'self' | 'anyone'): PrivateKey;
30
+ /**
31
+ * Derives a symmetric key based on protocol ID, key ID, and counterparty.
32
+ * Note: Symmetric keys should not be derivable by everyone due to security risks.
33
+ * @param {[0 | 1 | 2, string]} protocolID - The protocol ID including a security level and protocol name.
34
+ * @param {string} keyID - The key identifier.
35
+ * @param {PublicKey | string | 'self' | 'anyone'} counterparty - The counterparty's public key or a predefined value ('self' or 'anyone').
36
+ * @returns {SymmetricKey} - The derived symmetric key.
37
+ * @throws {Error} - Throws an error if attempting to derive a symmetric key for 'anyone'.
38
+ */
39
+ deriveSymmetricKey(protocolID: [0 | 1 | 2, string], keyID: string, counterparty: PublicKey | string | 'self' | 'anyone'): SymmetricKey;
40
+ /**
41
+ * Reveals the shared secret between the root key and the counterparty.
42
+ * Note: This should not be used for 'self'.
43
+ * @param {PublicKey | string | 'self' | 'anyone'} counterparty - The counterparty's public key or a predefined value ('self' or 'anyone').
44
+ * @returns {number[]} - The shared secret as a number array.
45
+ * @throws {Error} - Throws an error if attempting to reveal a shared secret for 'self'.
46
+ */
47
+ revealCounterpartySecret(counterparty: PublicKey | string | 'self' | 'anyone'): number[];
48
+ /**
49
+ * Reveals the specific key association for a given protocol ID, key ID, and counterparty.
50
+ * @param {PublicKey | string | 'self' | 'anyone'} counterparty - The counterparty's public key or a predefined value ('self' or 'anyone').
51
+ * @param {[0 | 1 | 2, string]} protocolID - The protocol ID including a security level and protocol name.
52
+ * @param {string} keyID - The key identifier.
53
+ * @returns {number[]} - The specific key association as a number array.
54
+ */
55
+ revealSpecificSecret(counterparty: PublicKey | string | 'self' | 'anyone', protocolID: [0 | 1 | 2, string], keyID: string): number[];
56
+ /**
57
+ * Normalizes the counterparty to a public key.
58
+ * @param {PublicKey | string | 'self' | 'anyone'} counterparty - The counterparty's public key or a predefined value ('self' or 'anyone').
59
+ * @returns {PublicKey} - The normalized counterparty public key.
60
+ * @throws {Error} - Throws an error if the counterparty is invalid.
61
+ */
62
+ private normalizeCounterparty;
63
+ /**
64
+ * Computes the invoice number based on the protocol ID and key ID.
65
+ * @param {[0 | 1 | 2, string]} protocolID - The protocol ID including a security level and protocol name.
66
+ * @param {string} keyID - The key identifier.
67
+ * @returns {string} - The computed invoice number.
68
+ * @throws {Error} - Throws an error if protocol ID or key ID are invalid.
69
+ */
70
+ private computeInvoiceNumber;
71
+ }
72
+ //# sourceMappingURL=KeyDeriver.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"KeyDeriver.d.ts","sourceRoot":"","sources":["../../../../src/wallet/KeyDeriver.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,YAAY,EAAe,MAAM,wBAAwB,CAAA;AAEzF;;;GAGG;AACH,MAAM,CAAC,OAAO,OAAO,UAAU;IAC7B,OAAO,EAAE,UAAU,CAAA;IAEnB;;;SAGK;gBACO,OAAO,EAAE,UAAU,GAAG,QAAQ;IAQ1C;;;;;;;SAOK;IACL,eAAe,CAAC,UAAU,EAAE,CAAC,CAAC,GAAG,CAAC,GAAG,CAAC,EAAE,MAAM,CAAC,EAAE,KAAK,EAAE,MAAM,EAAE,YAAY,EAAE,SAAS,GAAG,MAAM,GAAG,MAAM,GAAG,QAAQ,EAAE,OAAO,GAAE,OAAe,GAAG,SAAS;IAS1J;;;;;;SAMK;IACL,gBAAgB,CAAC,UAAU,EAAE,CAAC,CAAC,GAAG,CAAC,GAAG,CAAC,EAAE,MAAM,CAAC,EAAE,KAAK,EAAE,MAAM,EAAE,YAAY,EAAE,SAAS,GAAG,MAAM,GAAG,MAAM,GAAG,QAAQ,GAAG,UAAU;IAKlI;;;;;;;;SAQK;IACL,kBAAkB,CAAC,UAAU,EAAE,CAAC,CAAC,GAAG,CAAC,GAAG,CAAC,EAAE,MAAM,CAAC,EAAE,KAAK,EAAE,MAAM,EAAE,YAAY,EAAE,SAAS,GAAG,MAAM,GAAG,MAAM,GAAG,QAAQ,GAAG,YAAY;IAYtI;;;;;;SAMK;IACL,wBAAwB,CAAC,YAAY,EAAE,SAAS,GAAG,MAAM,GAAG,MAAM,GAAG,QAAQ,GAAG,MAAM,EAAE;IAkBxF;;;;;;SAMK;IACL,oBAAoB,CAAC,YAAY,EAAE,SAAS,GAAG,MAAM,GAAG,MAAM,GAAG,QAAQ,EAAE,UAAU,EAAE,CAAC,CAAC,GAAG,CAAC,GAAG,CAAC,EAAE,MAAM,CAAC,EAAE,KAAK,EAAE,MAAM,GAAG,MAAM,EAAE;IAOpI;;;;;SAKK;IACL,OAAO,CAAC,qBAAqB;IAc7B;;;;;;SAMK;IACL,OAAO,CAAC,oBAAoB;CAwC7B"}