@wormhole-foundation/sdk-definitions 4.23.0 → 5.0.0-beta.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 (332) hide show
  1. package/dist/esm/layout-items/chain.d.ts +2 -3
  2. package/dist/esm/layout-items/chain.d.ts.map +1 -1
  3. package/dist/esm/protocol.d.ts +1 -1
  4. package/dist/esm/protocol.d.ts.map +1 -1
  5. package/dist/esm/protocols/governance/layout.d.ts +78 -78
  6. package/dist/esm/protocols/portico/porticoLayout.d.ts +4 -4
  7. package/dist/esm/protocols/relayer/relayerLayout.d.ts +16 -16
  8. package/dist/esm/protocols/tbtc/tbtcLayout.d.ts +8 -8
  9. package/dist/esm/protocols/tokenBridge/automaticTokenBridgeLayout.d.ts +4 -4
  10. package/dist/esm/protocols/tokenBridge/executorTokenBridgeLayout.d.ts +4 -4
  11. package/dist/esm/protocols/tokenBridge/tokenBridgeLayout.d.ts +18 -18
  12. package/dist/esm/vaa/registration.d.ts +1 -1
  13. package/dist/esm/vaa/registration.d.ts.map +1 -1
  14. package/dist/esm/vaa/vaa.d.ts +4 -4
  15. package/package.json +15 -47
  16. package/dist/cjs/address.d.ts +0 -53
  17. package/dist/cjs/address.d.ts.map +0 -1
  18. package/dist/cjs/address.js +0 -66
  19. package/dist/cjs/address.js.map +0 -1
  20. package/dist/cjs/attestation.d.ts +0 -53
  21. package/dist/cjs/attestation.d.ts.map +0 -1
  22. package/dist/cjs/attestation.js +0 -23
  23. package/dist/cjs/attestation.js.map +0 -1
  24. package/dist/cjs/chain.d.ts +0 -217
  25. package/dist/cjs/chain.d.ts.map +0 -1
  26. package/dist/cjs/chain.js +0 -301
  27. package/dist/cjs/chain.js.map +0 -1
  28. package/dist/cjs/contracts.d.ts +0 -31
  29. package/dist/cjs/contracts.d.ts.map +0 -1
  30. package/dist/cjs/contracts.js +0 -46
  31. package/dist/cjs/contracts.js.map +0 -1
  32. package/dist/cjs/index.d.ts +0 -18
  33. package/dist/cjs/index.d.ts.map +0 -1
  34. package/dist/cjs/index.js +0 -47
  35. package/dist/cjs/index.js.map +0 -1
  36. package/dist/cjs/layout-items/amount.d.ts +0 -5
  37. package/dist/cjs/layout-items/amount.d.ts.map +0 -1
  38. package/dist/cjs/layout-items/amount.js +0 -8
  39. package/dist/cjs/layout-items/amount.js.map +0 -1
  40. package/dist/cjs/layout-items/boolean.d.ts +0 -9
  41. package/dist/cjs/layout-items/boolean.d.ts.map +0 -1
  42. package/dist/cjs/layout-items/boolean.js +0 -12
  43. package/dist/cjs/layout-items/boolean.js.map +0 -1
  44. package/dist/cjs/layout-items/chain.d.ts +0 -86
  45. package/dist/cjs/layout-items/chain.d.ts.map +0 -1
  46. package/dist/cjs/layout-items/chain.js +0 -33
  47. package/dist/cjs/layout-items/chain.js.map +0 -1
  48. package/dist/cjs/layout-items/circle.d.ts +0 -9
  49. package/dist/cjs/layout-items/circle.d.ts.map +0 -1
  50. package/dist/cjs/layout-items/circle.js +0 -12
  51. package/dist/cjs/layout-items/circle.js.map +0 -1
  52. package/dist/cjs/layout-items/date.d.ts +0 -5
  53. package/dist/cjs/layout-items/date.d.ts.map +0 -1
  54. package/dist/cjs/layout-items/date.js +0 -8
  55. package/dist/cjs/layout-items/date.js.map +0 -1
  56. package/dist/cjs/layout-items/guardianSet.d.ts +0 -5
  57. package/dist/cjs/layout-items/guardianSet.d.ts.map +0 -1
  58. package/dist/cjs/layout-items/guardianSet.js +0 -8
  59. package/dist/cjs/layout-items/guardianSet.js.map +0 -1
  60. package/dist/cjs/layout-items/index.d.ts +0 -12
  61. package/dist/cjs/layout-items/index.d.ts.map +0 -1
  62. package/dist/cjs/layout-items/index.js +0 -28
  63. package/dist/cjs/layout-items/index.js.map +0 -1
  64. package/dist/cjs/layout-items/payloadId.d.ts +0 -8
  65. package/dist/cjs/layout-items/payloadId.d.ts.map +0 -1
  66. package/dist/cjs/layout-items/payloadId.js +0 -12
  67. package/dist/cjs/layout-items/payloadId.js.map +0 -1
  68. package/dist/cjs/layout-items/sequence.d.ts +0 -5
  69. package/dist/cjs/layout-items/sequence.d.ts.map +0 -1
  70. package/dist/cjs/layout-items/sequence.js +0 -8
  71. package/dist/cjs/layout-items/sequence.js.map +0 -1
  72. package/dist/cjs/layout-items/signature.d.ts +0 -41
  73. package/dist/cjs/layout-items/signature.d.ts.map +0 -1
  74. package/dist/cjs/layout-items/signature.js +0 -18
  75. package/dist/cjs/layout-items/signature.js.map +0 -1
  76. package/dist/cjs/layout-items/string.d.ts +0 -13
  77. package/dist/cjs/layout-items/string.d.ts.map +0 -1
  78. package/dist/cjs/layout-items/string.js +0 -22
  79. package/dist/cjs/layout-items/string.js.map +0 -1
  80. package/dist/cjs/layout-items/universalAddress.d.ts +0 -10
  81. package/dist/cjs/layout-items/universalAddress.d.ts.map +0 -1
  82. package/dist/cjs/layout-items/universalAddress.js +0 -13
  83. package/dist/cjs/layout-items/universalAddress.js.map +0 -1
  84. package/dist/cjs/package.json +0 -1
  85. package/dist/cjs/platform.d.ts +0 -70
  86. package/dist/cjs/platform.d.ts.map +0 -1
  87. package/dist/cjs/platform.js +0 -38
  88. package/dist/cjs/platform.js.map +0 -1
  89. package/dist/cjs/protocol.d.ts +0 -44
  90. package/dist/cjs/protocol.d.ts.map +0 -1
  91. package/dist/cjs/protocol.js +0 -50
  92. package/dist/cjs/protocol.js.map +0 -1
  93. package/dist/cjs/protocols/circleBridge/automaticCircleBridgeLayout.d.ts +0 -216
  94. package/dist/cjs/protocols/circleBridge/automaticCircleBridgeLayout.d.ts.map +0 -1
  95. package/dist/cjs/protocols/circleBridge/automaticCircleBridgeLayout.js +0 -41
  96. package/dist/cjs/protocols/circleBridge/automaticCircleBridgeLayout.js.map +0 -1
  97. package/dist/cjs/protocols/circleBridge/circleBridge.d.ts +0 -134
  98. package/dist/cjs/protocols/circleBridge/circleBridge.d.ts.map +0 -1
  99. package/dist/cjs/protocols/circleBridge/circleBridge.js +0 -38
  100. package/dist/cjs/protocols/circleBridge/circleBridge.js.map +0 -1
  101. package/dist/cjs/protocols/circleBridge/circleBridgeLayout.d.ts +0 -172
  102. package/dist/cjs/protocols/circleBridge/circleBridgeLayout.d.ts.map +0 -1
  103. package/dist/cjs/protocols/circleBridge/circleBridgeLayout.js +0 -38
  104. package/dist/cjs/protocols/circleBridge/circleBridgeLayout.js.map +0 -1
  105. package/dist/cjs/protocols/circleBridge/index.d.ts +0 -5
  106. package/dist/cjs/protocols/circleBridge/index.d.ts.map +0 -1
  107. package/dist/cjs/protocols/circleBridge/index.js +0 -20
  108. package/dist/cjs/protocols/circleBridge/index.js.map +0 -1
  109. package/dist/cjs/protocols/core/core.d.ts +0 -75
  110. package/dist/cjs/protocols/core/core.d.ts.map +0 -1
  111. package/dist/cjs/protocols/core/core.js +0 -4
  112. package/dist/cjs/protocols/core/core.js.map +0 -1
  113. package/dist/cjs/protocols/core/index.d.ts +0 -3
  114. package/dist/cjs/protocols/core/index.d.ts.map +0 -1
  115. package/dist/cjs/protocols/core/index.js +0 -18
  116. package/dist/cjs/protocols/core/index.js.map +0 -1
  117. package/dist/cjs/protocols/executor/api.d.ts +0 -67
  118. package/dist/cjs/protocols/executor/api.d.ts.map +0 -1
  119. package/dist/cjs/protocols/executor/api.js +0 -88
  120. package/dist/cjs/protocols/executor/api.js.map +0 -1
  121. package/dist/cjs/protocols/executor/index.d.ts +0 -4
  122. package/dist/cjs/protocols/executor/index.d.ts.map +0 -1
  123. package/dist/cjs/protocols/executor/index.js +0 -20
  124. package/dist/cjs/protocols/executor/index.js.map +0 -1
  125. package/dist/cjs/protocols/executor/relayInstruction.d.ts +0 -124
  126. package/dist/cjs/protocols/executor/relayInstruction.d.ts.map +0 -1
  127. package/dist/cjs/protocols/executor/relayInstruction.js +0 -38
  128. package/dist/cjs/protocols/executor/relayInstruction.js.map +0 -1
  129. package/dist/cjs/protocols/executor/signedQuote.d.ts +0 -102
  130. package/dist/cjs/protocols/executor/signedQuote.d.ts.map +0 -1
  131. package/dist/cjs/protocols/executor/signedQuote.js +0 -46
  132. package/dist/cjs/protocols/executor/signedQuote.js.map +0 -1
  133. package/dist/cjs/protocols/governance/gateway.d.ts +0 -16
  134. package/dist/cjs/protocols/governance/gateway.d.ts.map +0 -1
  135. package/dist/cjs/protocols/governance/gateway.js +0 -4
  136. package/dist/cjs/protocols/governance/gateway.js.map +0 -1
  137. package/dist/cjs/protocols/governance/generalPurpose.d.ts +0 -16
  138. package/dist/cjs/protocols/governance/generalPurpose.d.ts.map +0 -1
  139. package/dist/cjs/protocols/governance/generalPurpose.js +0 -4
  140. package/dist/cjs/protocols/governance/generalPurpose.js.map +0 -1
  141. package/dist/cjs/protocols/governance/globalAccountant.d.ts +0 -17
  142. package/dist/cjs/protocols/governance/globalAccountant.d.ts.map +0 -1
  143. package/dist/cjs/protocols/governance/globalAccountant.js +0 -10
  144. package/dist/cjs/protocols/governance/globalAccountant.js.map +0 -1
  145. package/dist/cjs/protocols/governance/ibcReceiver.d.ts +0 -16
  146. package/dist/cjs/protocols/governance/ibcReceiver.d.ts.map +0 -1
  147. package/dist/cjs/protocols/governance/ibcReceiver.js +0 -4
  148. package/dist/cjs/protocols/governance/ibcReceiver.js.map +0 -1
  149. package/dist/cjs/protocols/governance/index.d.ts +0 -7
  150. package/dist/cjs/protocols/governance/index.d.ts.map +0 -1
  151. package/dist/cjs/protocols/governance/index.js +0 -18
  152. package/dist/cjs/protocols/governance/index.js.map +0 -1
  153. package/dist/cjs/protocols/governance/layout.d.ts +0 -1187
  154. package/dist/cjs/protocols/governance/layout.d.ts.map +0 -1
  155. package/dist/cjs/protocols/governance/layout.js +0 -253
  156. package/dist/cjs/protocols/governance/layout.js.map +0 -1
  157. package/dist/cjs/protocols/governance/wormchainGovernance.d.ts +0 -16
  158. package/dist/cjs/protocols/governance/wormchainGovernance.d.ts.map +0 -1
  159. package/dist/cjs/protocols/governance/wormchainGovernance.js +0 -4
  160. package/dist/cjs/protocols/governance/wormchainGovernance.js.map +0 -1
  161. package/dist/cjs/protocols/ibc/ibc.d.ts +0 -97
  162. package/dist/cjs/protocols/ibc/ibc.d.ts.map +0 -1
  163. package/dist/cjs/protocols/ibc/ibc.js +0 -79
  164. package/dist/cjs/protocols/ibc/ibc.js.map +0 -1
  165. package/dist/cjs/protocols/ibc/index.d.ts +0 -3
  166. package/dist/cjs/protocols/ibc/index.d.ts.map +0 -1
  167. package/dist/cjs/protocols/ibc/index.js +0 -18
  168. package/dist/cjs/protocols/ibc/index.js.map +0 -1
  169. package/dist/cjs/protocols/index.d.ts +0 -10
  170. package/dist/cjs/protocols/index.d.ts.map +0 -1
  171. package/dist/cjs/protocols/index.js +0 -26
  172. package/dist/cjs/protocols/index.js.map +0 -1
  173. package/dist/cjs/protocols/nftBridge/index.d.ts +0 -2
  174. package/dist/cjs/protocols/nftBridge/index.d.ts.map +0 -1
  175. package/dist/cjs/protocols/nftBridge/index.js +0 -18
  176. package/dist/cjs/protocols/nftBridge/index.js.map +0 -1
  177. package/dist/cjs/protocols/nftBridge/nftBridge.d.ts +0 -13
  178. package/dist/cjs/protocols/nftBridge/nftBridge.d.ts.map +0 -1
  179. package/dist/cjs/protocols/nftBridge/nftBridge.js +0 -4
  180. package/dist/cjs/protocols/nftBridge/nftBridge.js.map +0 -1
  181. package/dist/cjs/protocols/portico/index.d.ts +0 -3
  182. package/dist/cjs/protocols/portico/index.d.ts.map +0 -1
  183. package/dist/cjs/protocols/portico/index.js +0 -19
  184. package/dist/cjs/protocols/portico/index.js.map +0 -1
  185. package/dist/cjs/protocols/portico/portico.d.ts +0 -71
  186. package/dist/cjs/protocols/portico/portico.d.ts.map +0 -1
  187. package/dist/cjs/protocols/portico/portico.js +0 -25
  188. package/dist/cjs/protocols/portico/portico.js.map +0 -1
  189. package/dist/cjs/protocols/portico/porticoLayout.d.ts +0 -321
  190. package/dist/cjs/protocols/portico/porticoLayout.d.ts.map +0 -1
  191. package/dist/cjs/protocols/portico/porticoLayout.js +0 -44
  192. package/dist/cjs/protocols/portico/porticoLayout.js.map +0 -1
  193. package/dist/cjs/protocols/relayer/index.d.ts +0 -3
  194. package/dist/cjs/protocols/relayer/index.d.ts.map +0 -1
  195. package/dist/cjs/protocols/relayer/index.js +0 -18
  196. package/dist/cjs/protocols/relayer/index.js.map +0 -1
  197. package/dist/cjs/protocols/relayer/relayer.d.ts +0 -22
  198. package/dist/cjs/protocols/relayer/relayer.d.ts.map +0 -1
  199. package/dist/cjs/protocols/relayer/relayer.js +0 -4
  200. package/dist/cjs/protocols/relayer/relayer.js.map +0 -1
  201. package/dist/cjs/protocols/relayer/relayerLayout.d.ts +0 -430
  202. package/dist/cjs/protocols/relayer/relayerLayout.d.ts.map +0 -1
  203. package/dist/cjs/protocols/relayer/relayerLayout.js +0 -75
  204. package/dist/cjs/protocols/relayer/relayerLayout.js.map +0 -1
  205. package/dist/cjs/protocols/tbtc/index.d.ts +0 -3
  206. package/dist/cjs/protocols/tbtc/index.d.ts.map +0 -1
  207. package/dist/cjs/protocols/tbtc/index.js +0 -19
  208. package/dist/cjs/protocols/tbtc/index.js.map +0 -1
  209. package/dist/cjs/protocols/tbtc/tbtc.d.ts +0 -35
  210. package/dist/cjs/protocols/tbtc/tbtc.d.ts.map +0 -1
  211. package/dist/cjs/protocols/tbtc/tbtc.js +0 -24
  212. package/dist/cjs/protocols/tbtc/tbtc.js.map +0 -1
  213. package/dist/cjs/protocols/tbtc/tbtcLayout.d.ts +0 -142
  214. package/dist/cjs/protocols/tbtc/tbtcLayout.d.ts.map +0 -1
  215. package/dist/cjs/protocols/tbtc/tbtcLayout.js +0 -20
  216. package/dist/cjs/protocols/tbtc/tbtcLayout.js.map +0 -1
  217. package/dist/cjs/protocols/tokenBridge/automaticTokenBridgeLayout.d.ts +0 -115
  218. package/dist/cjs/protocols/tokenBridge/automaticTokenBridgeLayout.d.ts.map +0 -1
  219. package/dist/cjs/protocols/tokenBridge/automaticTokenBridgeLayout.js +0 -21
  220. package/dist/cjs/protocols/tokenBridge/automaticTokenBridgeLayout.js.map +0 -1
  221. package/dist/cjs/protocols/tokenBridge/executorTokenBridgeLayout.d.ts +0 -87
  222. package/dist/cjs/protocols/tokenBridge/executorTokenBridgeLayout.d.ts.map +0 -1
  223. package/dist/cjs/protocols/tokenBridge/executorTokenBridgeLayout.js +0 -14
  224. package/dist/cjs/protocols/tokenBridge/executorTokenBridgeLayout.js.map +0 -1
  225. package/dist/cjs/protocols/tokenBridge/index.d.ts +0 -6
  226. package/dist/cjs/protocols/tokenBridge/index.d.ts.map +0 -1
  227. package/dist/cjs/protocols/tokenBridge/index.js +0 -21
  228. package/dist/cjs/protocols/tokenBridge/index.js.map +0 -1
  229. package/dist/cjs/protocols/tokenBridge/tokenBridge.d.ts +0 -235
  230. package/dist/cjs/protocols/tokenBridge/tokenBridge.d.ts.map +0 -1
  231. package/dist/cjs/protocols/tokenBridge/tokenBridge.js +0 -39
  232. package/dist/cjs/protocols/tokenBridge/tokenBridge.js.map +0 -1
  233. package/dist/cjs/protocols/tokenBridge/tokenBridgeLayout.d.ts +0 -286
  234. package/dist/cjs/protocols/tokenBridge/tokenBridgeLayout.d.ts.map +0 -1
  235. package/dist/cjs/protocols/tokenBridge/tokenBridgeLayout.js +0 -70
  236. package/dist/cjs/protocols/tokenBridge/tokenBridgeLayout.js.map +0 -1
  237. package/dist/cjs/registry.d.ts +0 -20
  238. package/dist/cjs/registry.d.ts.map +0 -1
  239. package/dist/cjs/registry.js +0 -3
  240. package/dist/cjs/registry.js.map +0 -1
  241. package/dist/cjs/rpc.d.ts +0 -4
  242. package/dist/cjs/rpc.d.ts.map +0 -1
  243. package/dist/cjs/rpc.js +0 -3
  244. package/dist/cjs/rpc.js.map +0 -1
  245. package/dist/cjs/signature.d.ts +0 -16
  246. package/dist/cjs/signature.d.ts.map +0 -1
  247. package/dist/cjs/signature.js +0 -52
  248. package/dist/cjs/signature.js.map +0 -1
  249. package/dist/cjs/signer.d.ts +0 -53
  250. package/dist/cjs/signer.d.ts.map +0 -1
  251. package/dist/cjs/signer.js +0 -51
  252. package/dist/cjs/signer.js.map +0 -1
  253. package/dist/cjs/testing/index.d.ts +0 -3
  254. package/dist/cjs/testing/index.d.ts.map +0 -1
  255. package/dist/cjs/testing/index.js +0 -29
  256. package/dist/cjs/testing/index.js.map +0 -1
  257. package/dist/cjs/testing/mocks/api.d.ts +0 -7
  258. package/dist/cjs/testing/mocks/api.d.ts.map +0 -1
  259. package/dist/cjs/testing/mocks/api.js +0 -14
  260. package/dist/cjs/testing/mocks/api.js.map +0 -1
  261. package/dist/cjs/testing/mocks/chain.d.ts +0 -8
  262. package/dist/cjs/testing/mocks/chain.d.ts.map +0 -1
  263. package/dist/cjs/testing/mocks/chain.js +0 -15
  264. package/dist/cjs/testing/mocks/chain.js.map +0 -1
  265. package/dist/cjs/testing/mocks/guardian.d.ts +0 -25
  266. package/dist/cjs/testing/mocks/guardian.d.ts.map +0 -1
  267. package/dist/cjs/testing/mocks/guardian.js +0 -77
  268. package/dist/cjs/testing/mocks/guardian.js.map +0 -1
  269. package/dist/cjs/testing/mocks/index.d.ts +0 -6
  270. package/dist/cjs/testing/mocks/index.d.ts.map +0 -1
  271. package/dist/cjs/testing/mocks/index.js +0 -22
  272. package/dist/cjs/testing/mocks/index.js.map +0 -1
  273. package/dist/cjs/testing/mocks/platform.d.ts +0 -15
  274. package/dist/cjs/testing/mocks/platform.d.ts.map +0 -1
  275. package/dist/cjs/testing/mocks/platform.js +0 -98
  276. package/dist/cjs/testing/mocks/platform.js.map +0 -1
  277. package/dist/cjs/testing/mocks/rpc.d.ts +0 -7
  278. package/dist/cjs/testing/mocks/rpc.d.ts.map +0 -1
  279. package/dist/cjs/testing/mocks/rpc.js +0 -14
  280. package/dist/cjs/testing/mocks/rpc.js.map +0 -1
  281. package/dist/cjs/testing/mocks/tokenBridge.d.ts +0 -19
  282. package/dist/cjs/testing/mocks/tokenBridge.d.ts.map +0 -1
  283. package/dist/cjs/testing/mocks/tokenBridge.js +0 -47
  284. package/dist/cjs/testing/mocks/tokenBridge.js.map +0 -1
  285. package/dist/cjs/testing/utils/address.d.ts +0 -9
  286. package/dist/cjs/testing/utils/address.d.ts.map +0 -1
  287. package/dist/cjs/testing/utils/address.js +0 -65
  288. package/dist/cjs/testing/utils/address.js.map +0 -1
  289. package/dist/cjs/testing/utils/index.d.ts +0 -3
  290. package/dist/cjs/testing/utils/index.d.ts.map +0 -1
  291. package/dist/cjs/testing/utils/index.js +0 -25
  292. package/dist/cjs/testing/utils/index.js.map +0 -1
  293. package/dist/cjs/testing/utils/vaa.d.ts +0 -10
  294. package/dist/cjs/testing/utils/vaa.d.ts.map +0 -1
  295. package/dist/cjs/testing/utils/vaa.js +0 -16
  296. package/dist/cjs/testing/utils/vaa.js.map +0 -1
  297. package/dist/cjs/types.d.ts +0 -94
  298. package/dist/cjs/types.d.ts.map +0 -1
  299. package/dist/cjs/types.js +0 -125
  300. package/dist/cjs/types.js.map +0 -1
  301. package/dist/cjs/universalAddress.d.ts +0 -24
  302. package/dist/cjs/universalAddress.d.ts.map +0 -1
  303. package/dist/cjs/universalAddress.js +0 -79
  304. package/dist/cjs/universalAddress.js.map +0 -1
  305. package/dist/cjs/unsignedTransaction.d.ts +0 -13
  306. package/dist/cjs/unsignedTransaction.d.ts.map +0 -1
  307. package/dist/cjs/unsignedTransaction.js +0 -3
  308. package/dist/cjs/unsignedTransaction.js.map +0 -1
  309. package/dist/cjs/utils.d.ts +0 -7
  310. package/dist/cjs/utils.d.ts.map +0 -1
  311. package/dist/cjs/utils.js +0 -15
  312. package/dist/cjs/utils.js.map +0 -1
  313. package/dist/cjs/vaa/create.d.ts +0 -15
  314. package/dist/cjs/vaa/create.d.ts.map +0 -1
  315. package/dist/cjs/vaa/create.js +0 -34
  316. package/dist/cjs/vaa/create.js.map +0 -1
  317. package/dist/cjs/vaa/functions.d.ts +0 -98
  318. package/dist/cjs/vaa/functions.d.ts.map +0 -1
  319. package/dist/cjs/vaa/functions.js +0 -225
  320. package/dist/cjs/vaa/functions.js.map +0 -1
  321. package/dist/cjs/vaa/index.d.ts +0 -5
  322. package/dist/cjs/vaa/index.d.ts.map +0 -1
  323. package/dist/cjs/vaa/index.js +0 -21
  324. package/dist/cjs/vaa/index.js.map +0 -1
  325. package/dist/cjs/vaa/registration.d.ts +0 -19
  326. package/dist/cjs/vaa/registration.d.ts.map +0 -1
  327. package/dist/cjs/vaa/registration.js +0 -19
  328. package/dist/cjs/vaa/registration.js.map +0 -1
  329. package/dist/cjs/vaa/vaa.d.ts +0 -190
  330. package/dist/cjs/vaa/vaa.d.ts.map +0 -1
  331. package/dist/cjs/vaa/vaa.js +0 -31
  332. package/dist/cjs/vaa/vaa.js.map +0 -1
@@ -1,70 +0,0 @@
1
- import type { Chain, Network, Platform, PlatformToChains } from "@wormhole-foundation/sdk-base";
2
- import type { WormholeMessageId } from "./attestation.js";
3
- import type { ChainContext } from "./chain.js";
4
- import type { ProtocolInitializer, ProtocolInstance, ProtocolName } from "./protocol.js";
5
- import type { IndexerConnection, RpcConnection } from "./rpc.js";
6
- import type { Balances, ChainsConfig, SignedTx, TokenAddress, TokenId, TxHash } from "./types.js";
7
- /**
8
- * PlatformUtils represents the _static_ attributes available on
9
- * the PlatformContext Class
10
- */
11
- export interface PlatformUtils<P extends Platform> {
12
- /** Value for the Platform so we can access it at runtime */
13
- _platform: P;
14
- /** Initialize a new PlatformContext object */
15
- new <N extends Network>(network: N, config?: ChainsConfig<N, P>): PlatformContext<N, P>;
16
- /**
17
- * Check if this chain is supported by this platform
18
- */
19
- isSupportedChain(chain: Chain): boolean;
20
- /** Look up a Chain from its native chain ID
21
- * See implementation for details
22
- * Note: this is _not_ the same as the Wormhole chain id
23
- */
24
- chainFromChainId(chainId: string | bigint): [Network, Chain];
25
- /**
26
- * Given an RPC connection, request the native chain id
27
- * then resolve it to a Wormhole Canonical network and chain name
28
- */
29
- chainFromRpc(rpc: RpcConnection<P>): Promise<[Network, Chain]>;
30
- /** Get the native (gas) token id for a given chain */
31
- nativeTokenId<N extends Network, C extends PlatformToChains<P>>(network: N, chain: C): TokenId<C>;
32
- /** Check if the token passed is the native token id for the argued chain and network */
33
- isNativeTokenId<N extends Network, C extends PlatformToChains<P>>(network: N, chain: C, tokenId: TokenId): boolean;
34
- /** Get the number of decimals for a given token */
35
- getDecimals<C extends PlatformToChains<P>>(network: Network, chain: C, rpc: RpcConnection<P>, token: TokenAddress<C>): Promise<number>;
36
- /** Get the balance of a token for a given wallet address */
37
- getBalance<C extends PlatformToChains<P>>(network: Network, chain: C, rpc: RpcConnection<P>, walletAddr: string, token: TokenAddress<C>): Promise<bigint | null>;
38
- /** Look up the latest block according to the RPC passed */
39
- getLatestBlock(rpc: RpcConnection<P>): Promise<number>;
40
- /** Look up the latest _finalized_ block according to the RPC passed */
41
- getLatestFinalizedBlock(rpc: RpcConnection<P>): Promise<number>;
42
- sendWait<C extends PlatformToChains<P>>(chain: C, rpc: RpcConnection<P>, stxns: SignedTx[]): Promise<TxHash[]>;
43
- }
44
- export interface PlatformIndexerUtils<N extends Network, P extends Platform> {
45
- /** Get balances for all tokens given a wallet address */
46
- getBalances(network: Network, chain: PlatformToChains<P>, rpc: RpcConnection<P>, walletAddress: string, indexer?: IndexerConnection<P>): Promise<Balances>;
47
- }
48
- export declare function supportsIndexerUtils(thing: any): thing is PlatformIndexerUtils<Network, Platform>;
49
- export type StaticPlatformMethods<P extends Platform, I extends PlatformUtils<P>> = InstanceType<I>;
50
- /**
51
- * PlatformContext is an instance of the class that represents a specific Platform
52
- */
53
- export declare abstract class PlatformContext<N extends Network, P extends Platform> {
54
- readonly network: N;
55
- readonly config: ChainsConfig<N, P>;
56
- constructor(network: N, config: ChainsConfig<N, P>);
57
- /** provides access to the static attributes of the PlatformContext class */
58
- utils(): PlatformUtils<P>;
59
- /** Create a new RPC Connection */
60
- abstract getRpc<C extends PlatformToChains<P>>(chain: C): RpcConnection<P> | Promise<RpcConnection<P>>;
61
- /** Create a new Chain context object */
62
- abstract getChain<C extends PlatformToChains<P>>(chain: C, rpc?: RpcConnection<P>): ChainContext<N, C>;
63
- /** Create a new Protocol Client instance by protocol name using the RPC connection to determine the network */
64
- getProtocol<PN extends ProtocolName>(protocol: PN, rpc: RpcConnection<P>): Promise<ProtocolInstance<P, PN, N>>;
65
- /** Get the underlying ProtocolInitializer to construct yourself */
66
- getProtocolInitializer<PN extends ProtocolName>(protocol: PN): ProtocolInitializer<P, PN, Network>;
67
- /** Look up transaction logs and parse out Wormhole messages */
68
- parseWormholeMessages<C extends PlatformToChains<P>>(chain: C, rpc: RpcConnection<P>, txid: TxHash): Promise<WormholeMessageId[]>;
69
- }
70
- //# sourceMappingURL=platform.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"platform.d.ts","sourceRoot":"","sources":["../../src/platform.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,OAAO,EAAE,QAAQ,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AAChG,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AAC1D,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AAC/C,OAAO,KAAK,EAAE,mBAAmB,EAAE,gBAAgB,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAEzF,OAAO,KAAK,EAAE,iBAAiB,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AACjE,OAAO,KAAK,EAAE,QAAQ,EAAE,YAAY,EAAE,QAAQ,EAAE,YAAY,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,YAAY,CAAC;AAElG;;;GAGG;AACH,MAAM,WAAW,aAAa,CAAC,CAAC,SAAS,QAAQ;IAC/C,4DAA4D;IAC5D,SAAS,EAAE,CAAC,CAAC;IAEb,8CAA8C;IAC9C,KAAK,CAAC,SAAS,OAAO,EAAE,OAAO,EAAE,CAAC,EAAE,MAAM,CAAC,EAAE,YAAY,CAAC,CAAC,EAAE,CAAC,CAAC,GAAG,eAAe,CAAC,CAAC,EAAE,CAAC,CA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;IAC5E,KAAK,IAAI,aAAa,CAAC,CAAC,CAAC;IAIzB,kCAAkC;IAClC,QAAQ,CAAC,MAAM,CAAC,CAAC,SAAS,gBAAgB,CAAC,CAAC,CAAC,EAC3C,KAAK,EAAE,CAAC,GACP,aAAa,CAAC,CAAC,CAAC,GAAG,OAAO,CAAC,aAAa,CAAC,CAAC,CAAC,CAAC;IAE/C,wCAAwC;IACxC,QAAQ,CAAC,QAAQ,CAAC,CAAC,SAAS,gBAAgB,CAAC,CAAC,CAAC,EAC7C,KAAK,EAAE,CAAC,EACR,GAAG,CAAC,EAAE,aAAa,CAAC,CAAC,CAAC,GACrB,YAAY,CAAC,CAAC,EAAE,CAAC,CAAC;IAErB,+GAA+G;IAC/G,WAAW,CAAC,EAAE,SAAS,YAAY,EACjC,QAAQ,EAAE,EAAE,EACZ,GAAG,EAAE,aAAa,CAAC,CAAC,CAAC,GACpB,OAAO,CAAC,gBAAgB,CAAC,CAAC,EAAE,EAAE,EAAE,CAAC,CAAC,CAAC;IAItC,mEAAmE;IACnE,sBAAsB,CAAC,EAAE,SAAS,YAAY,EAC5C,QAAQ,EAAE,EAAE,GACX,mBAAmB,CAAC,CAAC,EAAE,EAAE,EAAE,OAAO,CAAC;IAItC,+DAA+D;IACzD,qBAAqB,CAAC,CAAC,SAAS,gBAAgB,CAAC,CAAC,CAAC,EACvD,KAAK,EAAE,CAAC,EACR,GAAG,EAAE,aAAa,CAAC,CAAC,CAAC,EACrB,IAAI,EAAE,MAAM,GACX,OAAO,CAAC,iBAAiB,EAAE,CAAC;CAIhC"}
@@ -1,38 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.PlatformContext = exports.supportsIndexerUtils = void 0;
4
- const protocol_js_1 = require("./protocol.js");
5
- function supportsIndexerUtils(thing) {
6
- return thing.getBalances !== undefined;
7
- }
8
- exports.supportsIndexerUtils = supportsIndexerUtils;
9
- /**
10
- * PlatformContext is an instance of the class that represents a specific Platform
11
- */
12
- class PlatformContext {
13
- network;
14
- config;
15
- constructor(network, config) {
16
- this.network = network;
17
- this.config = config;
18
- }
19
- /** provides access to the static attributes of the PlatformContext class */
20
- utils() {
21
- return this.constructor;
22
- }
23
- /** Create a new Protocol Client instance by protocol name using the RPC connection to determine the network */
24
- getProtocol(protocol, rpc) {
25
- return (0, protocol_js_1.create)(this.utils()._platform, protocol, rpc, this.config);
26
- }
27
- /** Get the underlying ProtocolInitializer to construct yourself */
28
- getProtocolInitializer(protocol) {
29
- return (0, protocol_js_1.getProtocolInitializer)(this.utils()._platform, protocol);
30
- }
31
- /** Look up transaction logs and parse out Wormhole messages */
32
- async parseWormholeMessages(chain, rpc, txid) {
33
- const wc = await this.getProtocol("WormholeCore", rpc);
34
- return wc.parseTransaction(txid);
35
- }
36
- }
37
- exports.PlatformContext = PlatformContext;
38
- //# sourceMappingURL=platform.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"platform.js","sourceRoot":"","sources":["../../src/platform.ts"],"names":[],"mappings":";;;AAIA,+CAA+D;AAqF/D,SAAgB,oBAAoB,CAAC,KAAU;IAC7C,OAAO,KAAK,CAAC,WAAW,KAAK,SAAS,CAAC;AACzC,CAAC;AAFD,oDAEC;AAKD;;GAEG;AACH,MAAsB,eAAe;IAExB;IACA;IAFX,YACW,OAAU,EACV,MAA0B;QAD1B,YAAO,GAAP,OAAO,CAAG;QACV,WAAM,GAAN,MAAM,CAAoB;IAClC,CAAC;IAEJ,4EAA4E;IAC5E,KAAK;QACH,OAAO,IAAI,CAAC,WAAkB,CAAC;IACjC,CAAC;IAaD,+GAA+G;IAC/G,WAAW,CACT,QAAY,EACZ,GAAqB;QAErB,OAAO,IAAA,oBAAM,EAAC,IAAI,CAAC,KAAK,EAAE,CAAC,SAAS,EAAE,QAAQ,EAAE,GAAG,EAAE,IAAI,CAAC,MAAM,CAAC,CAAC;IACpE,CAAC;IAED,mEAAmE;IACnE,sBAAsB,CACpB,QAAY;QAEZ,OAAO,IAAA,oCAAsB,EAAC,IAAI,CAAC,KAAK,EAAE,CAAC,SAAS,EAAE,QAAQ,CAAC,CAAC;IAClE,CAAC;IAED,+DAA+D;IAC/D,KAAK,CAAC,qBAAqB,CACzB,KAAQ,EACR,GAAqB,EACrB,IAAY;QAEZ,MAAM,EAAE,GAAG,MAAM,IAAI,CAAC,WAAW,CAAC,cAAc,EAAE,GAAG,CAAC,CAAC;QACvD,OAAO,EAAE,CAAC,gBAAgB,CAAC,IAAI,CAAC,CAAC;IACnC,CAAC;CACF;AA9CD,0CA8CC"}
@@ -1,44 +0,0 @@
1
- import type { Chain, Network, Platform, PlatformToChains } from "@wormhole-foundation/sdk-base";
2
- import type { Contracts } from "./contracts.js";
3
- import type { WormholeRegistry } from "./registry.js";
4
- import type { RpcConnection } from "./rpc.js";
5
- import type { ChainsConfig } from "./types.js";
6
- /**
7
- * A string type representing the name of a protocol
8
- * derived from the keys of the protocol registry map
9
- */
10
- export type ProtocolName = keyof WormholeRegistry.ProtocolToInterfaceMapping;
11
- /**
12
- * The interface corresponding to the protocol passed in generic parameters
13
- */
14
- export type ProtocolInterface<PN extends ProtocolName, N extends Network, C extends Chain> = WormholeRegistry.ProtocolToInterfaceMapping<N, C>[PN];
15
- export type EmptyPlatformMap<PN extends ProtocolName> = {
16
- [P in Platform]?: ProtocolInitializer<P, PN, Network, PlatformToChains<P>>;
17
- };
18
- /** The platform specific implementation from the registry
19
- * returns the ProtocolInitializer for constructing an instance
20
- * of the Platform implementation
21
- */
22
- export type ProtocolImplementation<P extends Platform, PN extends ProtocolName> = PN extends ProtocolName ? P extends keyof WormholeRegistry.ProtocolToPlatformMapping[PN] ? NonNullable<WormholeRegistry.ProtocolToPlatformMapping[PN][P]> : never : never;
23
- /** The ProtocolInitializer provides a constructor or a static `fromRpc` method
24
- * to create an instance of the ProtocolInterface for a given network and chain
25
- */
26
- export interface ProtocolInitializer<P extends Platform, PN extends ProtocolName, N extends Network, C extends PlatformToChains<P> = PlatformToChains<P>> {
27
- new (network: N, chain: C, connection: RpcConnection<P>, contracts: Contracts, version?: string): ProtocolInterface<PN, N, C>;
28
- /** fromRpc will create a new instance of the Protocol client given the RPC and the config
29
- * @param rpc - the RPC connection to the chain, used to query the chain for its native chain id
30
- * @param config - the ChainsConfig to use to initialize the protocol client
31
- */
32
- fromRpc(rpc: RpcConnection<P>, config: ChainsConfig<Network, P>): Promise<ProtocolInterface<PN, N, C>>;
33
- }
34
- export interface VersionedProtocolInitializer<P extends Platform, PN extends ProtocolName, N extends Network> extends ProtocolInitializer<P, PN, N> {
35
- getVersion(rpc: RpcConnection<P>, Contracts: Contracts): Promise<string>;
36
- }
37
- export declare function isVersionedProtocolInitializer(ctr: ProtocolInitializer<Platform, ProtocolName, Network>): ctr is VersionedProtocolInitializer<Platform, ProtocolName, Network>;
38
- export type ProtocolInstance<P extends Platform, PN extends ProtocolName, N extends Network, C extends PlatformToChains<P> = PlatformToChains<P>> = InstanceType<ProtocolInitializer<P, PN, N, C>>;
39
- /** registerProtocol sets the Platform specific implementation of a given Protocol interface */
40
- export declare function registerProtocol<P extends Platform, PN extends ProtocolName, PI extends ProtocolInitializer<P, PN, Network, PlatformToChains<P>> = ProtocolInitializer<P, PN, Network, PlatformToChains<P>>>(platform: P, protocol: PN, ctr: PI): void;
41
- export declare function protocolIsRegistered<T extends Platform | Chain, PN extends ProtocolName>(chainOrPlatform: T, protocol: PN): boolean;
42
- export declare function getProtocolInitializer<P extends Platform, PN extends ProtocolName>(platform: P, protocol: PN): ProtocolInitializer<P, PN, Network, PlatformToChains<P>>;
43
- export declare const create: <N extends "Mainnet" | "Testnet" | "Devnet", P extends "Solana" | "Algorand" | "Near" | "Sui" | "Aptos" | "Btc" | "Stacks" | "Xrpl" | "Evm" | "Cosmwasm", PN extends keyof WormholeRegistry.ProtocolToInterfaceMapping<"Mainnet" | "Testnet" | "Devnet", "Solana" | "Ethereum" | "Bsc" | "Polygon" | "Avalanche" | "Algorand" | "Klaytn" | "Celo" | "Near" | "Moonbeam" | "Injective" | "Osmosis" | "Sui" | "Aptos" | "Arbitrum" | "Optimism" | "Pythnet" | "Btc" | "Base" | "Sei" | "Linea" | "Berachain" | "Seievm" | "Unichain" | "Worldchain" | "Ink" | "HyperEVM" | "Monad" | "Mezo" | "Fogo" | "Sonic" | "Converge" | "Plume" | "XRPLEVM" | "Plasma" | "CreditCoin" | "Stacks" | "Moca" | "MegaETH" | "Xrpl" | "ZeroGravity" | "Tempo" | "Nexus" | "Arc" | "Wormchain" | "Cosmoshub" | "Evmos" | "Kujira" | "Neutron" | "Celestia" | "Stargaze" | "Seda" | "Dymension" | "Provenance" | "Noble" | "Sepolia" | "ArbitrumSepolia" | "BaseSepolia" | "OptimismSepolia" | "Holesky" | "PolygonSepolia" | "MonadTestnet" | "HyperCore">>(platform: P, protocol: PN, rpc: RpcConnection<P>, config: ChainsConfig<N, P>) => Promise<ProtocolInterface<PN, "Mainnet" | "Testnet" | "Devnet", PlatformToChains<P>>>;
44
- //# sourceMappingURL=protocol.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"protocol.d.ts","sourceRoot":"","sources":["../../src/protocol.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,OAAO,EAAE,QAAQ,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AAEhG,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAChD,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAC;AACtD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAC9C,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AAE/C;;;GAGG;AACH,MAAM,MAAM,YAAY,GAAG,MAAM,gBAAgB,CAAC,0BAA0B,CAAC;AAE7E;;GAEG;AACH,MAAM,MAAM,iBAAiB,CAC3B,EAAE,SAAS,YAAY,EACvB,CAAC,SAAS,OAAO,EACjB,CAAC,SAAS,KAAK,IACb,gBAAg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,EAAE,SAAS,YAAY,EAChF,QAAQ,EAAE,CAAC,EACX,QAAQ,EAAE,EAAE,GACX,mBAAmB,CAAC,CAAC,EAAE,EAAE,EAAE,OAAO,EAAE,gBAAgB,CAAC,CAAC,CAAC,CAAC,CAc1D;AAED,eAAO,MAAM,MAAM,s/BACP,CAAC,YACD,EAAE,OACP,cAAc,CAAC,CAAC,UACb,aAAa,CAAC,EAAE,CAAC,CAAC,0FAI3B,CAAC"}
@@ -1,50 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.create = exports.getProtocolInitializer = exports.protocolIsRegistered = exports.registerProtocol = exports.isVersionedProtocolInitializer = void 0;
4
- const sdk_base_1 = require("@wormhole-foundation/sdk-base");
5
- function isVersionedProtocolInitializer(ctr) {
6
- return "getVersion" in ctr;
7
- }
8
- exports.isVersionedProtocolInitializer = isVersionedProtocolInitializer;
9
- // Runtime registry of protocol implementations from which we can initialize the
10
- // protocol client
11
- const protocolFactory = {};
12
- /** registerProtocol sets the Platform specific implementation of a given Protocol interface */
13
- function registerProtocol(platform, protocol, ctr) {
14
- if (!(protocol in protocolFactory))
15
- protocolFactory[protocol] = {};
16
- const platforms = protocolFactory[protocol];
17
- if (platform in platforms)
18
- throw new Error(`Protocol ${platform} for protocol ${protocol} has already registered`);
19
- protocolFactory[protocol][platform] = ctr;
20
- }
21
- exports.registerProtocol = registerProtocol;
22
- function protocolIsRegistered(chainOrPlatform, protocol) {
23
- const platform = (0, sdk_base_1.isChain)(chainOrPlatform)
24
- ? sdk_base_1.chainToPlatform.get(chainOrPlatform)
25
- : chainOrPlatform;
26
- if (!(protocol in protocolFactory))
27
- return false;
28
- return platform in protocolFactory[protocol];
29
- }
30
- exports.protocolIsRegistered = protocolIsRegistered;
31
- function getProtocolInitializer(platform, protocol) {
32
- if (protocol in protocolFactory) {
33
- const platforms = protocolFactory[protocol];
34
- if (platforms && platform in platforms) {
35
- const pctr = platforms[platform];
36
- if (pctr)
37
- return pctr;
38
- }
39
- }
40
- throw new Error(`No protocols registered for ${platform}:${protocol}. ` +
41
- `This may be because the platform specific protocol implementation is not registered (by installing and importing it)` +
42
- ` or no implementation exists for this platform`);
43
- }
44
- exports.getProtocolInitializer = getProtocolInitializer;
45
- const create = (platform, protocol, rpc, config) => {
46
- const pctr = getProtocolInitializer(platform, protocol);
47
- return pctr.fromRpc(rpc, config);
48
- };
49
- exports.create = create;
50
- //# sourceMappingURL=protocol.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"protocol.js","sourceRoot":"","sources":["../../src/protocol.ts"],"names":[],"mappings":";;;AACA,4DAAyE;AA4EzE,SAAgB,8BAA8B,CAC5C,GAAyD;IAEzD,OAAO,YAAY,IAAI,GAAG,CAAC;AAC7B,CAAC;AAJD,wEAIC;AASD,gFAAgF;AAChF,kBAAkB;AAClB,MAAM,eAAe,GAA8B,EAAE,CAAC;AAEtD,gGAAgG;AAChG,SAAgB,gBAAgB,CAS9B,QAAW,EAAE,QAAY,EAAE,GAAO;IAClC,IAAI,CAAC,CAAC,QAAQ,IAAI,eAAe,CAAC;QAAE,eAAe,CAAC,QAAQ,CAAC,GAAG,EAAE,CAAC;IAEnE,MAAM,SAAS,GAAG,eAAe,CAAC,QAAQ,CAAE,CAAC;IAC7C,IAAI,QAAQ,IAAI,SAAS;QACvB,MAAM,IAAI,KAAK,CAAC,YAAY,QAAQ,iBAAiB,QAAQ,yBAAyB,CAAC,CAAC;IAE1F,eAAe,CAAC,QAAQ,CAAE,CAAC,QAAQ,CAAC,GAAG,GAAG,CAAC;AAC7C,CAAC;AAjBD,4CAiBC;AAED,SAAgB,oBAAoB,CAClC,eAAkB,EAClB,QAAY;IAEZ,MAAM,QAAQ,GAAa,IAAA,kBAAO,EAAC,eAAe,CAAC;QACjD,CAAC,CAAC,0BAAe,CAAC,GAAG,CAAC,eAAe,CAAE;QACvC,CAAC,CAAC,eAAe,CAAC;IACpB,IAAI,CAAC,CAAC,QAAQ,IAAI,eAAe,CAAC;QAAE,OAAO,KAAK,CAAC;IACjD,OAAO,QAAQ,IAAI,eAAe,CAAC,QAAQ,CAAE,CAAC;AAChD,CAAC;AATD,oDASC;AAED,SAAgB,sBAAsB,CACpC,QAAW,EACX,QAAY;IAEZ,IAAI,QAAQ,IAAI,eAAe,EAAE,CAAC;QAChC,MAAM,SAAS,GAAG,eAAe,CAAC,QAAQ,CAAE,CAAC;QAE7C,IAAI,SAAS,IAAI,QAAQ,IAAI,SAAS,EAAE,CAAC;YACvC,MAAM,IAAI,GAAG,SAAS,CAAC,QAAQ,CAAC,CAAC;YACjC,IAAI,IAAI;gBAAE,OAAO,IAAgE,CAAC;QACpF,CAAC;IACH,CAAC;IACD,MAAM,IAAI,KAAK,CACb,+BAA+B,QAAQ,IAAI,QAAQ,IAAI;QACrD,sHAAsH;QACtH,gDAAgD,CACnD,CAAC;AACJ,CAAC;AAjBD,wDAiBC;AAEM,MAAM,MAAM,GAAG,CACpB,QAAW,EACX,QAAY,EACZ,GAAqB,EACrB,MAA0B,EAC1B,EAAE;IACF,MAAM,IAAI,GAAG,sBAAsB,CAAC,QAAQ,EAAE,QAAQ,CAAC,CAAC;IACxD,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,EAAE,MAAM,CAAC,CAAC;AACnC,CAAC,CAAC;AARW,QAAA,MAAM,UAQjB"}
@@ -1,216 +0,0 @@
1
- import type { CustomizableBytes } from "@wormhole-foundation/sdk-base";
2
- import type { RegisterPayloadTypes } from "./../../vaa/index.js";
3
- export declare const depositWithPayloadLayout: <const P extends CustomizableBytes = undefined>(customPayload?: P) => readonly [{
4
- readonly name: "payloadId";
5
- readonly binary: "uint";
6
- readonly size: 1;
7
- readonly custom: 1;
8
- readonly omit: true;
9
- }, {
10
- readonly name: "token";
11
- readonly binary: "bytes";
12
- readonly layout: readonly [{
13
- readonly binary: "bytes";
14
- readonly size: 32;
15
- readonly custom: {
16
- to: (val: Uint8Array) => import("../../universalAddress.js").UniversalAddress;
17
- from: (val: import("../../universalAddress.js").UniversalAddress) => Uint8Array;
18
- };
19
- readonly name: "address";
20
- }, {
21
- readonly binary: "uint";
22
- readonly size: 32;
23
- readonly name: "amount";
24
- }];
25
- }, {
26
- readonly binary: "uint";
27
- readonly size: 4;
28
- readonly name: "sourceDomain";
29
- }, {
30
- readonly binary: "uint";
31
- readonly size: 4;
32
- readonly name: "targetDomain";
33
- }, {
34
- readonly binary: "uint";
35
- readonly size: 8;
36
- readonly name: "nonce";
37
- }, {
38
- readonly binary: "bytes";
39
- readonly size: 32;
40
- readonly custom: {
41
- to: (val: Uint8Array) => import("../../universalAddress.js").UniversalAddress;
42
- from: (val: import("../../universalAddress.js").UniversalAddress) => Uint8Array;
43
- };
44
- readonly name: "caller";
45
- }, {
46
- readonly binary: "bytes";
47
- readonly size: 32;
48
- readonly custom: {
49
- to: (val: Uint8Array) => import("../../universalAddress.js").UniversalAddress;
50
- from: (val: import("../../universalAddress.js").UniversalAddress) => Uint8Array;
51
- };
52
- readonly name: "mintRecipient";
53
- }, import("binary-layout").CustomizableBytesReturn<{
54
- readonly name: "payload";
55
- readonly lengthSize: 2;
56
- }, P>];
57
- export declare const circleConnectPayload: readonly [{
58
- readonly name: "payloadId";
59
- readonly binary: "uint";
60
- readonly size: 1;
61
- readonly custom: 1;
62
- readonly omit: true;
63
- }, {
64
- readonly binary: "uint";
65
- readonly size: 32;
66
- readonly name: "targetRelayerFee";
67
- }, {
68
- readonly binary: "uint";
69
- readonly size: 32;
70
- readonly name: "toNativeTokenAmount";
71
- }, {
72
- readonly binary: "bytes";
73
- readonly size: 32;
74
- readonly custom: {
75
- to: (val: Uint8Array) => import("../../universalAddress.js").UniversalAddress;
76
- from: (val: import("../../universalAddress.js").UniversalAddress) => Uint8Array;
77
- };
78
- readonly name: "targetRecipient";
79
- }];
80
- export declare const automaticCircleBridgeNamedPayloads: readonly [readonly ["DepositWithPayload", readonly [{
81
- readonly name: "payloadId";
82
- readonly binary: "uint";
83
- readonly size: 1;
84
- readonly custom: 1;
85
- readonly omit: true;
86
- }, {
87
- readonly name: "token";
88
- readonly binary: "bytes";
89
- readonly layout: readonly [{
90
- readonly binary: "bytes";
91
- readonly size: 32;
92
- readonly custom: {
93
- to: (val: Uint8Array) => import("../../universalAddress.js").UniversalAddress;
94
- from: (val: import("../../universalAddress.js").UniversalAddress) => Uint8Array;
95
- };
96
- readonly name: "address";
97
- }, {
98
- readonly binary: "uint";
99
- readonly size: 32;
100
- readonly name: "amount";
101
- }];
102
- }, {
103
- readonly binary: "uint";
104
- readonly size: 4;
105
- readonly name: "sourceDomain";
106
- }, {
107
- readonly binary: "uint";
108
- readonly size: 4;
109
- readonly name: "targetDomain";
110
- }, {
111
- readonly binary: "uint";
112
- readonly size: 8;
113
- readonly name: "nonce";
114
- }, {
115
- readonly binary: "bytes";
116
- readonly size: 32;
117
- readonly custom: {
118
- to: (val: Uint8Array) => import("../../universalAddress.js").UniversalAddress;
119
- from: (val: import("../../universalAddress.js").UniversalAddress) => Uint8Array;
120
- };
121
- readonly name: "caller";
122
- }, {
123
- readonly binary: "bytes";
124
- readonly size: 32;
125
- readonly custom: {
126
- to: (val: Uint8Array) => import("../../universalAddress.js").UniversalAddress;
127
- from: (val: import("../../universalAddress.js").UniversalAddress) => Uint8Array;
128
- };
129
- readonly name: "mintRecipient";
130
- }, import("binary-layout").CustomizableBytesReturn<{
131
- readonly name: "payload";
132
- readonly lengthSize: 2;
133
- }, undefined>]], readonly ["TransferWithRelay", readonly [{
134
- readonly name: "payloadId";
135
- readonly binary: "uint";
136
- readonly size: 1;
137
- readonly custom: 1;
138
- readonly omit: true;
139
- }, {
140
- readonly name: "token";
141
- readonly binary: "bytes";
142
- readonly layout: readonly [{
143
- readonly binary: "bytes";
144
- readonly size: 32;
145
- readonly custom: {
146
- to: (val: Uint8Array) => import("../../universalAddress.js").UniversalAddress;
147
- from: (val: import("../../universalAddress.js").UniversalAddress) => Uint8Array;
148
- };
149
- readonly name: "address";
150
- }, {
151
- readonly binary: "uint";
152
- readonly size: 32;
153
- readonly name: "amount";
154
- }];
155
- }, {
156
- readonly binary: "uint";
157
- readonly size: 4;
158
- readonly name: "sourceDomain";
159
- }, {
160
- readonly binary: "uint";
161
- readonly size: 4;
162
- readonly name: "targetDomain";
163
- }, {
164
- readonly binary: "uint";
165
- readonly size: 8;
166
- readonly name: "nonce";
167
- }, {
168
- readonly binary: "bytes";
169
- readonly size: 32;
170
- readonly custom: {
171
- to: (val: Uint8Array) => import("../../universalAddress.js").UniversalAddress;
172
- from: (val: import("../../universalAddress.js").UniversalAddress) => Uint8Array;
173
- };
174
- readonly name: "caller";
175
- }, {
176
- readonly binary: "bytes";
177
- readonly size: 32;
178
- readonly custom: {
179
- to: (val: Uint8Array) => import("../../universalAddress.js").UniversalAddress;
180
- from: (val: import("../../universalAddress.js").UniversalAddress) => Uint8Array;
181
- };
182
- readonly name: "mintRecipient";
183
- }, import("binary-layout").CustomizableBytesReturn<{
184
- readonly name: "payload";
185
- readonly lengthSize: 2;
186
- }, readonly [{
187
- readonly name: "payloadId";
188
- readonly binary: "uint";
189
- readonly size: 1;
190
- readonly custom: 1;
191
- readonly omit: true;
192
- }, {
193
- readonly binary: "uint";
194
- readonly size: 32;
195
- readonly name: "targetRelayerFee";
196
- }, {
197
- readonly binary: "uint";
198
- readonly size: 32;
199
- readonly name: "toNativeTokenAmount";
200
- }, {
201
- readonly binary: "bytes";
202
- readonly size: 32;
203
- readonly custom: {
204
- to: (val: Uint8Array) => import("../../universalAddress.js").UniversalAddress;
205
- from: (val: import("../../universalAddress.js").UniversalAddress) => Uint8Array;
206
- };
207
- readonly name: "targetRecipient";
208
- }]>]]];
209
- import "../../registry.js";
210
- declare module "../../registry.js" {
211
- namespace WormholeRegistry {
212
- interface PayloadLiteralToLayoutMapping extends RegisterPayloadTypes<"AutomaticCircleBridge", typeof automaticCircleBridgeNamedPayloads> {
213
- }
214
- }
215
- }
216
- //# sourceMappingURL=automaticCircleBridgeLayout.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"automaticCircleBridgeLayout.d.ts","sourceRoot":"","sources":["../../../../src/protocols/circleBridge/automaticCircleBridgeLayout.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAU,iBAAiB,EAAE,MAAM,+BAA+B,CAAC;AAS/E,OAAO,KAAK,EAAE,oBAAoB,EAAiB,MAAM,sBAAsB,CAAC;AAIhF,eAAO,MAAM,wBAAwB,kEACnB,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MAkBU,CAAC;AAI9B,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;;;;;;;;EAKvB,CAAC;AAEX,eAAO,MAAM,kCAAkC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MAGb,CAAC;AAGnC,OAAO,mBAAmB,CAAC;AAC3B,OAAO,QAAQ,mBAAmB,CAAC;IACjC,UAAiB,gBAAgB,CAAC;QAChC,UAAU,6BACR,SAAQ,oBAAoB,CAC1B,uBAAuB,EACvB,OAAO,kCAAkC,CAC1C;SAAG;KACP;CACF"}
@@ -1,41 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.automaticCircleBridgeNamedPayloads = exports.circleConnectPayload = exports.depositWithPayloadLayout = void 0;
4
- const sdk_base_1 = require("@wormhole-foundation/sdk-base");
5
- const index_js_1 = require("./../../layout-items/index.js");
6
- const index_js_2 = require("./../../vaa/index.js");
7
- //from here: https://github.com/wormhole-foundation/wormhole-circle-integration/blob/105ad59bad687416527003e0241dee4020889341/evm/src/circle_integration/CircleIntegrationMessages.sol#L25
8
- const depositWithPayloadLayout = (customPayload) => [
9
- (0, index_js_1.payloadIdItem)(1),
10
- {
11
- name: "token",
12
- binary: "bytes",
13
- layout: [
14
- { name: "address", ...index_js_1.universalAddressItem },
15
- { name: "amount", ...index_js_1.amountItem },
16
- ],
17
- },
18
- { name: "sourceDomain", ...index_js_1.circleDomainItem },
19
- { name: "targetDomain", ...index_js_1.circleDomainItem },
20
- { name: "nonce", ...index_js_1.circleNonceItem },
21
- { name: "caller", ...index_js_1.universalAddressItem },
22
- { name: "mintRecipient", ...index_js_1.universalAddressItem },
23
- (0, sdk_base_1.customizableBytes)({ name: "payload", lengthSize: 2 }, customPayload),
24
- ];
25
- exports.depositWithPayloadLayout = depositWithPayloadLayout;
26
- //from here:
27
- // https://github.com/wormhole-foundation/example-circle-relayer/blob/189becd8d3935decb17383bd2e61b4909cbddc89/evm/src/circle-relayer/CircleRelayerMessages.sol#L16
28
- exports.circleConnectPayload = [
29
- (0, index_js_1.payloadIdItem)(1),
30
- { name: "targetRelayerFee", ...index_js_1.amountItem },
31
- { name: "toNativeTokenAmount", ...index_js_1.amountItem },
32
- { name: "targetRecipient", ...index_js_1.universalAddressItem },
33
- ];
34
- exports.automaticCircleBridgeNamedPayloads = [
35
- ["DepositWithPayload", (0, exports.depositWithPayloadLayout)()],
36
- ["TransferWithRelay", (0, exports.depositWithPayloadLayout)(exports.circleConnectPayload)],
37
- ];
38
- // factory registration:
39
- require("../../registry.js");
40
- (0, index_js_2.registerPayloadTypes)("AutomaticCircleBridge", exports.automaticCircleBridgeNamedPayloads);
41
- //# sourceMappingURL=automaticCircleBridgeLayout.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"automaticCircleBridgeLayout.js","sourceRoot":"","sources":["../../../../src/protocols/circleBridge/automaticCircleBridgeLayout.ts"],"names":[],"mappings":";;;AACA,4DAAkE;AAClE,4DAMuC;AAEvC,mDAA4D;AAE5D,0LAA0L;AACnL,MAAM,wBAAwB,GAAG,CACtC,aAAiB,EACjB,EAAE,CACF;IACE,IAAA,wBAAa,EAAC,CAAC,CAAC;IAChB;QACE,IAAI,EAAE,OAAO;QACb,MAAM,EAAE,OAAO;QACf,MAAM,EAAE;YACN,EAAE,IAAI,EAAE,SAAS,EAAE,GAAG,+BAAoB,EAAE;YAC5C,EAAE,IAAI,EAAE,QAAQ,EAAE,GAAG,qBAAU,EAAE;SAClC;KACF;IACD,EAAE,IAAI,EAAE,cAAc,EAAE,GAAG,2BAAgB,EAAE;IAC7C,EAAE,IAAI,EAAE,cAAc,EAAE,GAAG,2BAAgB,EAAE;IAC7C,EAAE,IAAI,EAAE,OAAO,EAAE,GAAG,0BAAe,EAAE;IACrC,EAAE,IAAI,EAAE,QAAQ,EAAE,GAAG,+BAAoB,EAAE;IAC3C,EAAE,IAAI,EAAE,eAAe,EAAE,GAAG,+BAAoB,EAAE;IAClD,IAAA,4BAAiB,EAAC,EAAE,IAAI,EAAE,SAAS,EAAE,UAAU,EAAE,CAAC,EAAE,EAAE,aAAa,CAAC;CAC3C,CAAC;AAnBjB,QAAA,wBAAwB,4BAmBP;AAE9B,YAAY;AACZ,oKAAoK;AACvJ,QAAA,oBAAoB,GAAG;IAClC,IAAA,wBAAa,EAAC,CAAC,CAAC;IAChB,EAAE,IAAI,EAAE,kBAAkB,EAAE,GAAG,qBAAU,EAAE;IAC3C,EAAE,IAAI,EAAE,qBAAqB,EAAE,GAAG,qBAAU,EAAE;IAC9C,EAAE,IAAI,EAAE,iBAAiB,EAAE,GAAG,+BAAoB,EAAE;CAC5C,CAAC;AAEE,QAAA,kCAAkC,GAAG;IAChD,CAAC,oBAAoB,EAAE,IAAA,gCAAwB,GAAE,CAAC;IAClD,CAAC,mBAAmB,EAAE,IAAA,gCAAwB,EAAC,4BAAoB,CAAC,CAAC;CACrC,CAAC;AAEnC,wBAAwB;AACxB,6BAA2B;AAW3B,IAAA,+BAAoB,EAAC,uBAAuB,EAAE,0CAAkC,CAAC,CAAC"}
@@ -1,134 +0,0 @@
1
- import type { Chain, LayoutToType, Network } from "@wormhole-foundation/sdk-base";
2
- import type { AccountAddress, ChainAddress } from "../../address.js";
3
- import type { CircleMessageId } from "../../attestation.js";
4
- import type { TokenId } from "../../types.js";
5
- import type { UnsignedTransaction } from "../../unsignedTransaction.js";
6
- import "./automaticCircleBridgeLayout.js";
7
- import { circleMessageLayout } from "./circleBridgeLayout.js";
8
- import type { EmptyPlatformMap } from "../../protocol.js";
9
- import type { ProtocolPayload, ProtocolVAA } from "./../../vaa/index.js";
10
- import "../../registry.js";
11
- declare module "../../registry.js" {
12
- namespace WormholeRegistry {
13
- interface ProtocolToInterfaceMapping<N, C> {
14
- CircleBridge: CircleBridge<N, C>;
15
- AutomaticCircleBridge: AutomaticCircleBridge<N, C>;
16
- }
17
- interface ProtocolToPlatformMapping {
18
- CircleBridge: EmptyPlatformMap<"CircleBridge">;
19
- AutomaticCircleBridge: EmptyPlatformMap<"AutomaticCircleBridge">;
20
- }
21
- }
22
- }
23
- export declare namespace CircleBridge {
24
- const _protocol = "CircleBridge";
25
- /** The compile time type for the CircleBridge protocol */
26
- export type ProtocolName = typeof _protocol;
27
- const _payloads: readonly ["Message"];
28
- export type PayloadNames = (typeof _payloads)[number];
29
- export type Message = LayoutToType<typeof circleMessageLayout>;
30
- /** Circle message and attestation if available */
31
- export type Attestation = {
32
- message: Message;
33
- attestation?: string;
34
- };
35
- export const isCircleAttestation: (thing: any) => thing is Attestation;
36
- export const deserialize: (data: Uint8Array) => [CircleBridge.Message, string];
37
- export const serialize: (msg: CircleBridge.Message) => Uint8Array;
38
- export {};
39
- }
40
- export declare namespace AutomaticCircleBridge {
41
- const _protocol = "AutomaticCircleBridge";
42
- export type ProtocolName = typeof _protocol;
43
- const _payloads: readonly ["DepositWithPayload", "TransferWithRelay"];
44
- export type PayloadNames = (typeof _payloads)[number];
45
- /** The VAA types that are emitted from the AutomaticCirlceBridge protocol */
46
- export type VAA<PayloadName extends PayloadNames = PayloadNames> = ProtocolVAA<ProtocolName, PayloadName>;
47
- export type Payload<PayloadName extends PayloadNames = PayloadNames> = ProtocolPayload<ProtocolName, PayloadName>;
48
- export const getTransferDiscriminator: () => import("../../vaa/functions.js").PayloadDiscriminator<"AutomaticCircleBridge:DepositWithPayload" | "AutomaticCircleBridge:TransferWithRelay", false>;
49
- export {};
50
- }
51
- export type CircleTransferMessage = {
52
- from: ChainAddress;
53
- to: ChainAddress;
54
- token: TokenId;
55
- amount: bigint;
56
- message: CircleBridge.Message;
57
- id: CircleMessageId;
58
- };
59
- export type CircleTransferDetails = {
60
- amount: bigint;
61
- from: ChainAddress;
62
- to: ChainAddress;
63
- automatic?: boolean;
64
- payload?: Uint8Array;
65
- nativeGas?: bigint;
66
- };
67
- export declare function isCircleTransferDetails(thing: any): thing is CircleTransferDetails;
68
- /**
69
- * CircleBridge protocol definition, providing a consistent client
70
- * interface to the CircleBridge protocol (CCTP).
71
- *
72
- * Find the source contracts here: ${@link https://github.com/circlefin/evm-cctp-contracts}
73
- *
74
- */
75
- export interface CircleBridge<N extends Network = Network, C extends Chain = Chain> {
76
- /**
77
- * Redeem a circle transfer against the Circle Bridge
78
- *
79
- * @param sender The address of the sender
80
- * @param message The Circle message to redeem
81
- * @param attestation The attestation, from the Circle attestation service
82
- *
83
- * @returns a stream of unsigned transactions to be signed and submitted on chain
84
- */
85
- redeem(sender: AccountAddress<C>, message: CircleBridge.Message, attestation: string): AsyncGenerator<UnsignedTransaction<N, C>>;
86
- /**
87
- * Initiate a transfer through the Circle CCTP Bridge
88
- *
89
- * @param sender the sender of the transaction
90
- * @param recipient the chain and address of the recipient of the transfer
91
- * @param amount how much to send in base units
92
- */
93
- transfer(sender: AccountAddress<C>, recipient: ChainAddress, amount: bigint): AsyncGenerator<UnsignedTransaction<N, C>>;
94
- /**
95
- * Check if a transfer has been completed according to the bridge contract
96
- *
97
- * @param message The message to check
98
- */
99
- isTransferCompleted(message: CircleBridge.Message): Promise<boolean>;
100
- /**
101
- * Grabs the logs from the transaction and parse the circle message
102
- *
103
- * @param txid The transaction hash from which to parse a message
104
- *
105
- * @returns The parsed CircleTransferMessage
106
- */
107
- parseTransactionDetails(txid: string): Promise<CircleTransferMessage>;
108
- }
109
- /**
110
- * AutomaticCircleBridge protocol definition, providing a consistent client
111
- * interface for the CircleBridge protocol with Automatic delivery.
112
- */
113
- export interface AutomaticCircleBridge<N extends Network = Network, C extends Chain = Chain> {
114
- /**
115
- * Get the fee required by the relayer to cover the costs of redemption on the destination chain
116
- *
117
- * @param destination The destination chain for which to get a fee quote
118
- * @returns the fee required by the relayer to cover the costs of redemption on the destination chain
119
- */
120
- getRelayerFee(destination: Chain): Promise<bigint>;
121
- /**
122
- *
123
- * @param sender address of the transaction sender
124
- * @param recipient address of the destination chain recipient
125
- * @param amount how much to send, in base units
126
- * @param nativeGas if set, determines how much native gas should be received by the recipient
127
- */
128
- transfer(sender: AccountAddress<C>, recipient: ChainAddress, amount: bigint, nativeGas?: bigint): AsyncGenerator<UnsignedTransaction<N, C>>;
129
- /** Amount of native tokens a user would receive by swapping x amount of sending tokens */
130
- nativeTokenAmount(amount: bigint): Promise<bigint>;
131
- /** Maximum amount of sending tokens that can be swapped for native tokens */
132
- maxSwapAmount(): Promise<bigint>;
133
- }
134
- //# sourceMappingURL=circleBridge.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"circleBridge.d.ts","sourceRoot":"","sources":["../../../../src/protocols/circleBridge/circleBridge.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,YAAY,EAAE,OAAO,EAAE,MAAM,+BAA+B,CAAC;AAOlF,OAAO,KAAK,EAAE,cAAc,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AACrE,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AAC5D,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,gBAAgB,CAAC;AAC9C,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,8BAA8B,CAAC;AAExE,OAAO,kCAAkC,CAAC;AAC1C,OAAO,EAAE,mBAAmB,EAAE,MAAM,yBAAyB,CAAC;AAE9D,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,mBAA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