@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,217 +0,0 @@
1
- import type { Chain, ChainToPlatform, Network, Platform, Token, TokenSymbol } from "@wormhole-foundation/sdk-base";
2
- import type { ChainAddress, UniversalOrNative } from "./address.js";
3
- import type { WormholeMessageId } from "./attestation.js";
4
- import type { AutomaticCircleBridge, CircleBridge, Contracts, IbcBridge, PorticoBridge, TBTCBridge, WormholeCore } from "./index.js";
5
- import type { PlatformContext } from "./platform.js";
6
- import type { ProtocolInstance, ProtocolInterface, ProtocolName } from "./protocol.js";
7
- import type { AutomaticTokenBridge, TokenBridge, ExecutorTokenBridge } from "./protocols/tokenBridge/tokenBridge.js";
8
- import type { RpcConnection } from "./rpc.js";
9
- import type { ChainConfig, SignedTx, TokenAddress, TokenId } from "./types.js";
10
- /**
11
- * A ChainContext provides a consistent interface for interacting with a chain.
12
- * It holds the configuration for the chain and cached RPC and protocol clients.
13
- *
14
- */
15
- export declare abstract class ChainContext<N extends Network, C extends Chain = Chain, P extends Platform = ChainToPlatform<C>> {
16
- readonly network: N;
17
- readonly chain: C;
18
- readonly config: ChainConfig<N, C>;
19
- readonly platform: PlatformContext<N, P>;
20
- protected rpc?: RpcConnection<P>;
21
- protected protocols: Map<ProtocolName, ProtocolInterface<ProtocolName, N, C>>;
22
- constructor(chain: C, platform: PlatformContext<N, P>, rpc?: RpcConnection<P>);
23
- /**
24
- * Get an RPC connection for this chain, uses the configuration passed in
25
- * the initial constructor
26
- *
27
- * @returns the RPC connection for this chain
28
- */
29
- getRpc(): Promise<RpcConnection<P>>;
30
- /**
31
- * Get the number of decimals for a token
32
- *
33
- * @param token the token to get the decimals for
34
- * @returns the number of decimals for the token
35
- */
36
- getDecimals(token: TokenAddress<C>): Promise<number>;
37
- /**
38
- * Get the balance of a token for a given address
39
- *
40
- * @param walletAddr the address to get the balance for
41
- * @param token the token to get the balance for
42
- * @returns the balance of the token for the address
43
- *
44
- */
45
- getBalance(walletAddr: string, token: TokenAddress<C>): Promise<bigint | null>;
46
- /**
47
- * Get the latest block number seen by the chain according to the RPC
48
- *
49
- * @returns the latest block number
50
- */
51
- getLatestBlock(): Promise<number>;
52
- /**
53
- * Get the latest _finalized_ block number seen by the chain according to the RPC
54
- *
55
- * @returns the latest finalized block number
56
- */
57
- getLatestFinalizedBlock(): Promise<number>;
58
- /**
59
- * Parse the Wormhole Core messages from a transaction
60
- *
61
- * @param txid the transaction to parse
62
- * @returns the Wormhole Core messages emitted by the transaction
63
- */
64
- parseTransaction(txid: string): Promise<WormholeMessageId[]>;
65
- /**
66
- * Send a transaction and wait for it to be confirmed
67
- *
68
- * @param stxns the signed transaction to send
69
- * @returns the transaction hashes of the sent transactions
70
- */
71
- sendWait(stxns: SignedTx[]): Promise<string[]>;
72
- /**
73
- * Get the token data from the local cache if available
74
- * @param symbol the symbol of the token to get
75
- * @returns the token data if available
76
- */
77
- getToken(symbol: TokenSymbol): Token | undefined;
78
- /**
79
- * Get the token id of the wrapped token for the native gas token
80
- *
81
- * @returns the wrapped token for the native gas token
82
- */
83
- getNativeWrappedTokenId(): Promise<TokenId<C>>;
84
- /**
85
- * Get the token account for a given address and token
86
- *
87
- * @remarks
88
- * This is really only useful in the context of Solana but in order
89
- * to provide a consistent interface, we provide it here.
90
- *
91
- * @param address the address to get the token account for
92
- * @param token the token to get the token account for
93
- * @returns the token account for the address and token
94
- */
95
- getTokenAccount(address: UniversalOrNative<C>, token: TokenAddress<C>): Promise<ChainAddress<C>>;
96
- /**
97
- * Check if a token uses the Token2022 program
98
- *
99
- * @remarks
100
- * This is really only useful in the context of Solana but in order
101
- * to provide a consistent interface, we provide it here.
102
- *
103
- * @param token the token to check
104
- * @returns true if the token uses the Token2022 program, false otherwise
105
- */
106
- isToken2022(token: TokenAddress<C>): Promise<boolean>;
107
- /**
108
- * Check to see if a given protocol is supported by this chain
109
- * by checking if it is registered in the platform and the configuration
110
- * is available and correct
111
- *
112
- * @param protocolName the name of the Protocol to check for support
113
- * @returns a boolean indicating if this protocol is supported
114
- */
115
- supportsProtocol(protocolName: ProtocolName): boolean;
116
- /**
117
- * Construct a protocol client for the given protocol
118
- *
119
- * Note: If no contracts are passed, we assume the default contracts should be used
120
- * and that the protocol client is cacheable
121
- *
122
- * @param protocolName The name of the protocol to construct a client for
123
- * @returns An instance of the protocol client that implements the protocol interface for the chain
124
- */
125
- getProtocol<PN extends ProtocolName>(protocolName: PN, contracts?: Contracts, rpc?: RpcConnection<P>): Promise<ProtocolInstance<P, PN, N, C>>;
126
- /**
127
- * Check to see if the Wormhole Core protocol is supported by this chain
128
- * @returns a boolean indicating if this chain supports the Wormhole Core protocol
129
- */
130
- supportsWormholeCore: () => boolean;
131
- /**
132
- * Get the Wormhole Core protocol client for this chain
133
- * @returns the Wormhole Core protocol client for this chain
134
- */
135
- getWormholeCore: () => Promise<WormholeCore<N, C>>;
136
- /**
137
- * Check to see if the Token Bridge protocol is supported by this chain
138
- * @returns a boolean indicating if this chain supports the Token Bridge protocol
139
- */
140
- supportsTokenBridge: () => boolean;
141
- /**
142
- * Get the Token Bridge protocol client for this chain
143
- * @returns the Token Bridge protocol client for this chain
144
- */
145
- getTokenBridge: () => Promise<TokenBridge<N, C>>;
146
- /**
147
- * Check to see if the Automatic Token Bridge protocol is supported by this chain
148
- * @returns a boolean indicating if this chain supports the Automatic Token Bridge protocol
149
- */
150
- supportsAutomaticTokenBridge: () => boolean;
151
- /**
152
- * Get the Automatic Token Bridge protocol client for this chain
153
- * @returns the Automatic Token Bridge protocol client for this chain
154
- */
155
- getAutomaticTokenBridge: () => Promise<AutomaticTokenBridge<N, C>>;
156
- /**
157
- * Check to see if the Executor Token Bridge protocol is supported by this chain
158
- * @returns a boolean indicating if this chain supports the Executor Token Bridge protocol
159
- */
160
- supportsExecutorTokenBridge: () => boolean;
161
- /**
162
- * Get the Executor Token Bridge protocol client for this chain
163
- * @returns the Executor Token Bridge protocol client for this chain
164
- */
165
- getExecutorTokenBridge: () => Promise<ExecutorTokenBridge<N, C>>;
166
- /**
167
- * Check to see if the Circle Bridge protocol is supported by this chain
168
- * @returns a boolean indicating if this chain supports the Circle Bridge protocol
169
- */
170
- supportsCircleBridge: () => boolean;
171
- /**
172
- * Get the Circle Bridge protocol client for this chain
173
- * @returns the Circle Bridge protocol client for this chain
174
- */
175
- getCircleBridge: () => Promise<CircleBridge<N, C>>;
176
- /**
177
- * Check to see if the Automatic Circle Bridge protocol is supported by this chain
178
- * @returns a boolean indicating if this chain supports the Automatic Circle Bridge protocol
179
- */
180
- supportsAutomaticCircleBridge: () => boolean;
181
- /**
182
- * Get the Automatic Circle Bridge protocol client for this chain
183
- * @returns the Automatic Circle Bridge protocol client for this chain
184
- */
185
- getAutomaticCircleBridge: () => Promise<AutomaticCircleBridge<N, C>>;
186
- /**
187
- * Check to see if the IBC Bridge protocol is supported by this chain
188
- * @returns a boolean indicating if this chain supports the IBC Bridge protocol
189
- */
190
- supportsIbcBridge: () => boolean;
191
- /**
192
- * Get the IBC Bridge protocol client for this chain
193
- * @returns the IBC Bridge protocol client for this chain
194
- */
195
- getIbcBridge: () => Promise<IbcBridge<N, C>>;
196
- /**
197
- * Check to see if the Portico Bridge protocol is supported by this chain
198
- * @returns a boolean indicating if this chain supports the Portico Bridge protocol
199
- */
200
- supportsPorticoBridge: () => boolean;
201
- /**
202
- * Get the Portico Bridge protocol client for this chain
203
- * @returns the Portico Bridge protocol client for this chain
204
- */
205
- getPorticoBridge: () => Promise<PorticoBridge<N, C>>;
206
- /**
207
- * Check to see if the TBTC Bridge protocol is supported by this chain
208
- * @returns a boolean indicating if this chain supports the TBTC Bridge protocol
209
- */
210
- supportsTBTCBridge: () => boolean;
211
- /**
212
- * Get the TBTC Bridge protocol client for this chain
213
- * @returns the TBTC Bridge protocol client for this chain
214
- */
215
- getTBTCBridge: () => Promise<TBTCBridge<N, C>>;
216
- }
217
- //# sourceMappingURL=chain.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"chain.d.ts","sourceRoot":"","sources":["../../src/chain.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,KAAK,EACL,eAAe,EACf,OAAO,EACP,QAAQ,EACR,KAAK,EACL,WAAW,EACZ,MAAM,+BAA+B,CAAC;AAEvC,OAAO,KAAK,EAAE,YAAY,EAAE,iBAAiB,EAAE,MAAM,cAAc,CAAC;AAEpE,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AAC1D,OAAO,KAAK,EACV,qBAAqB,EACrB,YAAY,EACZ,SAAS,EACT,SAAS,EACT,aAAa,EACb,UAAU,EACV,YAAY,EACb,MAAM,YAAY,CAAC;AACpB,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC;AACrD,OAAO,KAAK,EAAE,gBAAgB,EAAE,iBAAiB,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAEvF,OAAO,KAAK,EACV,oBAAoB,EACpB,WAAW,EACX,mBAAmB,EACpB,MAAM,wCAAwC,CAAC;AAChD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAC9C,OAAO,KAAK,EAAE,WAAW,EAAE,QAAQ,EAAE,YAAY,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AAG/E;;;;GAIG;AACH,8BAAsB,YAAY,CAChC,CAAC,SAAS,OAAO,EACjB,CAAC,SAAS,KAAK,GAAG,KAAK,EACvB,CAAC,SAAS,QAAQ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oBAAoB,gBAA+C;IACnE;;;OAGG;IACH,eAAe,QAAO,QAAQ,aAAa,CAAC,EAAE,CAAC,CAAC,CAAC,CAAqC;IAEtF;;;OAGG;IACH,6BAA6B,gBAAwD;IACrF;;;OAGG;IACH,wBAAwB,QAAO,QAAQ,sBAAsB,CAAC,EAAE,CAAC,CAAC,CAAC,CACvB;IAE5C;;;OAGG;IACH,iBAAiB,gBAA4C;IAC7D;;;OAGG;IACH,YAAY,QAAO,QAAQ,UAAU,CAAC,EAAE,CAAC,CAAC,CAAC,CAAkC;IAE7E;;;OAGG;IACH,qBAAqB,gBAAgD;IACrE;;;OAGG;IACH,gBAAgB,QAAO,QAAQ,cAAc,CAAC,EAAE,CAAC,CAAC,CAAC,CAAsC;IAEzF;;;OAGG;IACH,kBAAkB,gBAA6C;IAE/D;;;OAGG;IACH,aAAa,QAAO,QAAQ,WAAW,CAAC,EAAE,CAAC,CAAC,CAAC,CAAmC;CACjF"}
package/dist/cjs/chain.js DELETED
@@ -1,301 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.ChainContext = void 0;
4
- const tokens_1 = require("@wormhole-foundation/sdk-base/tokens");
5
- const address_js_1 = require("./address.js");
6
- const protocol_js_1 = require("./protocol.js");
7
- const types_js_1 = require("./types.js");
8
- /**
9
- * A ChainContext provides a consistent interface for interacting with a chain.
10
- * It holds the configuration for the chain and cached RPC and protocol clients.
11
- *
12
- */
13
- class ChainContext {
14
- network;
15
- chain;
16
- config;
17
- platform;
18
- rpc;
19
- // Cached Protocol clients
20
- protocols = new Map();
21
- constructor(chain, platform, rpc) {
22
- this.config = platform.config[chain];
23
- this.platform = platform;
24
- this.chain = this.config.key;
25
- this.network = this.config.network;
26
- this.rpc = rpc;
27
- }
28
- /**
29
- * Get an RPC connection for this chain, uses the configuration passed in
30
- * the initial constructor
31
- *
32
- * @returns the RPC connection for this chain
33
- */
34
- getRpc() {
35
- this.rpc = this.rpc ? this.rpc : this.platform.getRpc(this.chain);
36
- return this.rpc;
37
- }
38
- /**
39
- * Get the number of decimals for a token
40
- *
41
- * @param token the token to get the decimals for
42
- * @returns the number of decimals for the token
43
- */
44
- async getDecimals(token) {
45
- if ((0, types_js_1.isNative)(token))
46
- return this.config.nativeTokenDecimals;
47
- // try to find it in the token cache first
48
- if (this.config.tokenMap) {
49
- const tokenAddress = (0, types_js_1.canonicalAddress)({ chain: this.chain, address: token });
50
- const found = (0, tokens_1.getTokenByAddress)(this.network, this.chain, tokenAddress);
51
- if (found)
52
- return found.decimals;
53
- }
54
- return this.platform.utils().getDecimals(this.network, this.chain, await this.getRpc(), token);
55
- }
56
- /**
57
- * Get the balance of a token for a given address
58
- *
59
- * @param walletAddr the address to get the balance for
60
- * @param token the token to get the balance for
61
- * @returns the balance of the token for the address
62
- *
63
- */
64
- async getBalance(walletAddr, token) {
65
- return this.platform
66
- .utils()
67
- .getBalance(this.network, this.chain, await this.getRpc(), walletAddr, token);
68
- }
69
- /**
70
- * Get the latest block number seen by the chain according to the RPC
71
- *
72
- * @returns the latest block number
73
- */
74
- async getLatestBlock() {
75
- return this.platform.utils().getLatestBlock(await this.getRpc());
76
- }
77
- /**
78
- * Get the latest _finalized_ block number seen by the chain according to the RPC
79
- *
80
- * @returns the latest finalized block number
81
- */
82
- async getLatestFinalizedBlock() {
83
- return this.platform.utils().getLatestFinalizedBlock(await this.getRpc());
84
- }
85
- /**
86
- * Parse the Wormhole Core messages from a transaction
87
- *
88
- * @param txid the transaction to parse
89
- * @returns the Wormhole Core messages emitted by the transaction
90
- */
91
- async parseTransaction(txid) {
92
- return this.platform.parseWormholeMessages(this.chain, await this.getRpc(), txid);
93
- }
94
- /**
95
- * Send a transaction and wait for it to be confirmed
96
- *
97
- * @param stxns the signed transaction to send
98
- * @returns the transaction hashes of the sent transactions
99
- */
100
- async sendWait(stxns) {
101
- return this.platform.utils().sendWait(this.chain, await this.getRpc(), stxns);
102
- }
103
- /**
104
- * Get the token data from the local cache if available
105
- * @param symbol the symbol of the token to get
106
- * @returns the token data if available
107
- */
108
- getToken(symbol) {
109
- if (!this.config.tokenMap)
110
- return;
111
- if (!(symbol in this.config.tokenMap))
112
- return;
113
- return this.config.tokenMap[symbol];
114
- }
115
- /**
116
- * Get the token id of the wrapped token for the native gas token
117
- *
118
- * @returns the wrapped token for the native gas token
119
- */
120
- async getNativeWrappedTokenId() {
121
- // see if we have it configured
122
- if (this.config.wrappedNative) {
123
- const { address } = this.config.wrappedNative;
124
- return { chain: this.chain, address: (0, address_js_1.toNative)(this.chain, address) };
125
- }
126
- // otherwise grab it from the token bridge fn
127
- const tb = await this.getTokenBridge();
128
- return { chain: this.chain, address: await tb.getWrappedNative() };
129
- }
130
- /**
131
- * Get the token account for a given address and token
132
- *
133
- * @remarks
134
- * This is really only useful in the context of Solana but in order
135
- * to provide a consistent interface, we provide it here.
136
- *
137
- * @param address the address to get the token account for
138
- * @param token the token to get the token account for
139
- * @returns the token account for the address and token
140
- */
141
- async getTokenAccount(address, token) {
142
- // Noop by default, override in implementation if necessary
143
- return { chain: this.chain, address };
144
- }
145
- /**
146
- * Check if a token uses the Token2022 program
147
- *
148
- * @remarks
149
- * This is really only useful in the context of Solana but in order
150
- * to provide a consistent interface, we provide it here.
151
- *
152
- * @param token the token to check
153
- * @returns true if the token uses the Token2022 program, false otherwise
154
- */
155
- async isToken2022(token) {
156
- // Return false by default, override in implementation if necessary
157
- return false;
158
- }
159
- /**
160
- * Check to see if a given protocol is supported by this chain
161
- * by checking if it is registered in the platform and the configuration
162
- * is available and correct
163
- *
164
- * @param protocolName the name of the Protocol to check for support
165
- * @returns a boolean indicating if this protocol is supported
166
- */
167
- supportsProtocol(protocolName) {
168
- return (0, protocol_js_1.protocolIsRegistered)(this.chain, protocolName);
169
- }
170
- /**
171
- * Construct a protocol client for the given protocol
172
- *
173
- * Note: If no contracts are passed, we assume the default contracts should be used
174
- * and that the protocol client is cacheable
175
- *
176
- * @param protocolName The name of the protocol to construct a client for
177
- * @returns An instance of the protocol client that implements the protocol interface for the chain
178
- */
179
- async getProtocol(protocolName, contracts, rpc) {
180
- if (!contracts && this.protocols.has(protocolName))
181
- return this.protocols.get(protocolName);
182
- const _contracts = contracts
183
- ? { ...this.config.contracts, ...contracts }
184
- : this.config.contracts;
185
- const _rpc = rpc ?? (await this.getRpc());
186
- const ctor = this.platform.getProtocolInitializer(protocolName);
187
- let protocol;
188
- if (rpc) {
189
- if (contracts)
190
- // TODO: the platforms `getProtocol` does not allow passing contracts
191
- // it would need to be updated to allow this
192
- throw new Error("Custom contracts are currently not supported with custom rpc connection. Add the contracts to the base config.");
193
- // This ultimately calls fromRpc which _should_ handle version fetching
194
- protocol = await this.platform.getProtocol(protocolName, _rpc);
195
- }
196
- else {
197
- if ((0, protocol_js_1.isVersionedProtocolInitializer)(ctor)) {
198
- const version = await ctor.getVersion(_rpc, _contracts);
199
- protocol = new ctor(this.network, this.chain, _rpc, _contracts, version);
200
- }
201
- else {
202
- protocol = new ctor(this.network, this.chain, _rpc, _contracts);
203
- }
204
- }
205
- if (!contracts)
206
- this.protocols.set(protocolName, protocol);
207
- return protocol;
208
- }
209
- /**
210
- * Check to see if the Wormhole Core protocol is supported by this chain
211
- * @returns a boolean indicating if this chain supports the Wormhole Core protocol
212
- */
213
- supportsWormholeCore = () => this.supportsProtocol("WormholeCore");
214
- /**
215
- * Get the Wormhole Core protocol client for this chain
216
- * @returns the Wormhole Core protocol client for this chain
217
- */
218
- getWormholeCore = () => this.getProtocol("WormholeCore");
219
- /**
220
- * Check to see if the Token Bridge protocol is supported by this chain
221
- * @returns a boolean indicating if this chain supports the Token Bridge protocol
222
- */
223
- supportsTokenBridge = () => this.supportsProtocol("TokenBridge");
224
- /**
225
- * Get the Token Bridge protocol client for this chain
226
- * @returns the Token Bridge protocol client for this chain
227
- */
228
- getTokenBridge = () => this.getProtocol("TokenBridge");
229
- /**
230
- * Check to see if the Automatic Token Bridge protocol is supported by this chain
231
- * @returns a boolean indicating if this chain supports the Automatic Token Bridge protocol
232
- */
233
- supportsAutomaticTokenBridge = () => this.supportsProtocol("AutomaticTokenBridge");
234
- /**
235
- * Get the Automatic Token Bridge protocol client for this chain
236
- * @returns the Automatic Token Bridge protocol client for this chain
237
- */
238
- getAutomaticTokenBridge = () => this.getProtocol("AutomaticTokenBridge");
239
- /**
240
- * Check to see if the Executor Token Bridge protocol is supported by this chain
241
- * @returns a boolean indicating if this chain supports the Executor Token Bridge protocol
242
- */
243
- supportsExecutorTokenBridge = () => this.supportsProtocol("ExecutorTokenBridge");
244
- /**
245
- * Get the Executor Token Bridge protocol client for this chain
246
- * @returns the Executor Token Bridge protocol client for this chain
247
- */
248
- getExecutorTokenBridge = () => this.getProtocol("ExecutorTokenBridge");
249
- /**
250
- * Check to see if the Circle Bridge protocol is supported by this chain
251
- * @returns a boolean indicating if this chain supports the Circle Bridge protocol
252
- */
253
- supportsCircleBridge = () => this.supportsProtocol("CircleBridge");
254
- /**
255
- * Get the Circle Bridge protocol client for this chain
256
- * @returns the Circle Bridge protocol client for this chain
257
- */
258
- getCircleBridge = () => this.getProtocol("CircleBridge");
259
- /**
260
- * Check to see if the Automatic Circle Bridge protocol is supported by this chain
261
- * @returns a boolean indicating if this chain supports the Automatic Circle Bridge protocol
262
- */
263
- supportsAutomaticCircleBridge = () => this.supportsProtocol("AutomaticCircleBridge");
264
- /**
265
- * Get the Automatic Circle Bridge protocol client for this chain
266
- * @returns the Automatic Circle Bridge protocol client for this chain
267
- */
268
- getAutomaticCircleBridge = () => this.getProtocol("AutomaticCircleBridge");
269
- /**
270
- * Check to see if the IBC Bridge protocol is supported by this chain
271
- * @returns a boolean indicating if this chain supports the IBC Bridge protocol
272
- */
273
- supportsIbcBridge = () => this.supportsProtocol("IbcBridge");
274
- /**
275
- * Get the IBC Bridge protocol client for this chain
276
- * @returns the IBC Bridge protocol client for this chain
277
- */
278
- getIbcBridge = () => this.getProtocol("IbcBridge");
279
- /**
280
- * Check to see if the Portico Bridge protocol is supported by this chain
281
- * @returns a boolean indicating if this chain supports the Portico Bridge protocol
282
- */
283
- supportsPorticoBridge = () => this.supportsProtocol("PorticoBridge");
284
- /**
285
- * Get the Portico Bridge protocol client for this chain
286
- * @returns the Portico Bridge protocol client for this chain
287
- */
288
- getPorticoBridge = () => this.getProtocol("PorticoBridge");
289
- /**
290
- * Check to see if the TBTC Bridge protocol is supported by this chain
291
- * @returns a boolean indicating if this chain supports the TBTC Bridge protocol
292
- */
293
- supportsTBTCBridge = () => this.supportsProtocol("TBTCBridge");
294
- /**
295
- * Get the TBTC Bridge protocol client for this chain
296
- * @returns the TBTC Bridge protocol client for this chain
297
- */
298
- getTBTCBridge = () => this.getProtocol("TBTCBridge");
299
- }
300
- exports.ChainContext = ChainContext;
301
- //# sourceMappingURL=chain.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"chain.js","sourceRoot":"","sources":["../../src/chain.ts"],"names":[],"mappings":";;;AAQA,iEAAyE;AAEzE,6CAAwC;AAaxC,+CAAqF;AAQrF,yCAAwD;AAExD;;;;GAIG;AACH,MAAsB,YAAY;IAKvB,OAAO,CAAI;IACX,KAAK,CAAI;IACT,MAAM,CAAoB;IAC1B,QAAQ,CAAwB;IAE/B,GAAG,CAAoB;IAEjC,0BAA0B;IAChB,SAAS,GAA6D,IAAI,GAAG,EAAE,CAAC;IAE1F,YAAY,KAAQ,EAAE,QAA+B,EAAE,GAAsB;QAC3E,IAAI,CAAC,MAAM,GAAG,QAAQ,CAAC,MAAM,CAAC,KAAK,CAAE,CAAC;QACtC,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAC;QACzB,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC;QAC7B,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC,MAAM,CAAC,OAAO,CAAC;QACnC,IAAI,CAAC,GAAG,GAAG,GAAG,CAAC;IACjB,CAAC;IAED;;;;;OAKG;IACH,MAAM;QACJ,IAAI,CAAC,GAAG,GAAG,IAAI,CAAC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H,aAAa,GAAG,GAA8B,EAAE,CAAC,IAAI,CAAC,WAAW,CAAC,YAAY,CAAC,CAAC;CACjF;AAxUD,oCAwUC"}
@@ -1,31 +0,0 @@
1
- import type { Chain, Network } from "@wormhole-foundation/sdk-base";
2
- import { contracts } from "@wormhole-foundation/sdk-base";
3
- type UnknownContracts = Record<string, any>;
4
- /** The Contract addresses set in configuration for a given chain */
5
- export type Contracts = {
6
- coreBridge?: string;
7
- tokenBridge?: string;
8
- tokenBridgeRelayer?: string;
9
- executorTokenBridge?: contracts.ExecutorTokenBridgeContracts;
10
- nftBridge?: string;
11
- relayer?: string;
12
- cctp?: contracts.CircleContracts;
13
- gateway?: string;
14
- translator?: string;
15
- portico?: contracts.PorticoContracts;
16
- tbtc?: string;
17
- executor?: string;
18
- customConsistencyLevel?: string;
19
- executorQuoter?: string;
20
- } & UnknownContracts;
21
- /**
22
- *
23
- * Get the contracts for a given network and chain
24
- *
25
- * @param n the network to get contracts for
26
- * @param c the chain to get contracts for
27
- * @returns the contracts for the given network and chain
28
- */
29
- export declare function getContracts(n: Network, c: Chain): Contracts;
30
- export {};
31
- //# sourceMappingURL=contracts.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"contracts.d.ts","sourceRoot":"","sources":["../../src/contracts.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,OAAO,EAAE,MAAM,+BAA+B,CAAC;AACpE,OAAO,EAAE,SAAS,EAAE,MAAM,+BAA+B,CAAC;AAI1D,KAAK,gBAAgB,GAAG,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;AAE5C,oEAAoE;AACpE,MAAM,MAAM,SAAS,GAAG;IACtB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,mBAAmB,CAAC,EAAE,SAAS,CAAC,4BAA4B,CAAC;IAC7D,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,IAAI,CAAC,EAAE,SAAS,CAAC,eAAe,CAAC;IACjC,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,OAAO,CAAC,EAAE,SAAS,CAAC,gBAAgB,CAAC;IACrC,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,sBAAsB,CAAC,EAAE,MAAM,CAAC;IAChC,cAAc,CAAC,EAAE,MAAM,CAAC;CACzB,GAAG,gBAAgB,CAAC;AAErB;;;;;;;GAOG;AACH,wBAAgB,YAAY,CAAC,CAAC,EAAE,OAAO,EAAE,CAAC,EAAE,KAAK,GAAG,SAAS,CAsC5D"}
@@ -1,46 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.getContracts = void 0;
4
- const sdk_base_1 = require("@wormhole-foundation/sdk-base");
5
- /**
6
- *
7
- * Get the contracts for a given network and chain
8
- *
9
- * @param n the network to get contracts for
10
- * @param c the chain to get contracts for
11
- * @returns the contracts for the given network and chain
12
- */
13
- function getContracts(n, c) {
14
- const ct = {
15
- coreBridge: sdk_base_1.contracts.coreBridge.get(n, c),
16
- tokenBridge: sdk_base_1.contracts.tokenBridge.get(n, c),
17
- nftBridge: sdk_base_1.contracts.nftBridge.get(n, c),
18
- relayer: sdk_base_1.contracts.relayer.get(n, c),
19
- tokenBridgeRelayer: sdk_base_1.contracts.tokenBridgeRelayer.get(n, c),
20
- tbtc: sdk_base_1.contracts.tbtc.get(n, c),
21
- executor: sdk_base_1.contracts.executor.get(n, c),
22
- customConsistencyLevel: sdk_base_1.contracts.customConsistencyLevel.get(n, c),
23
- executorQuoter: sdk_base_1.contracts.executorQuoter.get(n, c),
24
- };
25
- if (sdk_base_1.contracts.executorTokenBridge.has(n, c)) {
26
- ct.executorTokenBridge = sdk_base_1.contracts.executorTokenBridge.get(n, c);
27
- }
28
- if (sdk_base_1.contracts.circleContracts.has(n, c)) {
29
- ct.cctp = sdk_base_1.contracts.circleContracts.get(n, c);
30
- }
31
- if (sdk_base_1.contracts.gateway.has(n, c)) {
32
- ct.gateway = sdk_base_1.contracts.gateway.get(n, c);
33
- }
34
- if (sdk_base_1.contracts.translator.has(n, c)) {
35
- ct.translator = sdk_base_1.contracts.translator.get(n, c);
36
- }
37
- if (sdk_base_1.contracts.portico.has(n, c)) {
38
- ct.portico = sdk_base_1.contracts.portico.get(n, c);
39
- }
40
- if (sdk_base_1.contracts.tbtc.has(n, c)) {
41
- ct.tbtc = sdk_base_1.contracts.tbtc.get(n, c);
42
- }
43
- return ct;
44
- }
45
- exports.getContracts = getContracts;
46
- //# sourceMappingURL=contracts.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"contracts.js","sourceRoot":"","sources":["../../src/contracts.ts"],"names":[],"mappings":";;;AACA,4DAA0D;AAwB1D;;;;;;;GAOG;AACH,SAAgB,YAAY,CAAC,CAAU,EAAE,CAAQ;IAC/C,MAAM,EAAE,GAAc;QACpB,UAAU,EAAE,oBAAS,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC,EAAE,CAAC,CAAC;QAC1C,WAAW,EAAE,oBAAS,CAAC,WAAW,CAAC,GAAG,CAAC,CAAC,EAAE,CAAC,CAAC;QAC5C,SAAS,EAAE,oBAAS,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC,EAAE,CAAC,CAAC;QACxC,OAAO,EAAE,oBAAS,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,EAAE,CAAC,CAAC;QACpC,kBAAkB,EAAE,oBAAS,CAAC,kBAAkB,CAAC,GAAG,CAAC,CAAC,EAAE,CAAC,CAAC;QAC1D,IAAI,EAAE,oBAAS,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,CAAC,CAAC;QAC9B,QAAQ,EAAE,oBAAS,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,EA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CAAC,CAAC,EAAE,CAAC;QAC7B,EAAE,CAAC,IAAI,GAAG,oBAAS,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;IACrC,CAAC;IAED,OAAO,EAAE,CAAC;AACZ,CAAC;AAtCD,oCAsCC"}
@@ -1,18 +0,0 @@
1
- export * from "./registry.js";
2
- export * from "./address.js";
3
- export * from "./protocol.js";
4
- export * from "./universalAddress.js";
5
- export * from "./unsignedTransaction.js";
6
- export * from "./vaa/index.js";
7
- export * from "./utils.js";
8
- export * from "./platform.js";
9
- export * from "./chain.js";
10
- export * from "./contracts.js";
11
- export * from "./signature.js";
12
- export * from "./signer.js";
13
- export * from "./rpc.js";
14
- export * from "./attestation.js";
15
- export * from "./types.js";
16
- export * from "./protocols/index.js";
17
- export * as layoutItems from "./layout-items/index.js";
18
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,eAAe,CAAC;AAC9B,cAAc,cAAc,CAAC;AAC7B,cAAc,eAAe,CAAC;AAC9B,cAAc,uBAAuB,CAAC;AACtC,cAAc,0BAA0B,CAAC;AACzC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,YAAY,CAAC;AAC3B,cAAc,eAAe,CAAC;AAC9B,cAAc,YAAY,CAAC;AAC3B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,aAAa,CAAC;AAC5B,cAAc,UAAU,CAAC;AACzB,cAAc,kBAAkB,CAAC;AACjC,cAAc,YAAY,CAAC;AAC3B,cAAc,sBAAsB,CAAC;AACrC,OAAO,KAAK,WAAW,MAAM,yBAAyB,CAAC"}