@across-protocol/contracts 4.0.13 → 4.0.14-alpha.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 (243) hide show
  1. package/README.md +6 -2
  2. package/dist/deployments/deployments.json +4 -4
  3. package/dist/scripts/svm/buildHelpers/generateSvmClients.js +8 -4
  4. package/dist/scripts/svm/closeRelayerPdas.js +1 -1
  5. package/dist/scripts/svm/fakeFillWithRandomDistribution.js +8 -7
  6. package/dist/scripts/svm/findFillStatusPdaFromEvent.js +1 -1
  7. package/dist/scripts/svm/nativeDeposit.js +3 -3
  8. package/dist/scripts/svm/queryEvents.js +1 -1
  9. package/dist/scripts/svm/queryEventsV2.js +1 -1
  10. package/dist/scripts/svm/queryFills.js +1 -1
  11. package/dist/scripts/svm/simpleDeposit.js +3 -3
  12. package/dist/scripts/svm/simpleFakeRelayerRepayment.js +19 -12
  13. package/dist/scripts/svm/simpleFill.js +2 -2
  14. package/dist/src/svm/assets/idl/svm_spoke.json +122 -70
  15. package/dist/src/svm/assets/svm_spoke.d.ts +122 -70
  16. package/dist/src/svm/clients/SvmSpoke/errors/svmSpoke.d.ts +37 -31
  17. package/dist/src/svm/clients/SvmSpoke/errors/svmSpoke.js +55 -46
  18. package/dist/src/svm/clients/SvmSpoke/instructions/bridgeTokensToHubPool.js +1 -1
  19. package/dist/src/svm/clients/SvmSpoke/instructions/claimRelayerRefund.js +1 -1
  20. package/dist/src/svm/clients/SvmSpoke/instructions/deposit.d.ts +2 -2
  21. package/dist/src/svm/clients/SvmSpoke/instructions/deposit.js +4 -4
  22. package/dist/src/svm/clients/SvmSpoke/instructions/depositNow.d.ts +2 -2
  23. package/dist/src/svm/clients/SvmSpoke/instructions/depositNow.js +4 -4
  24. package/dist/src/svm/clients/SvmSpoke/instructions/executeRelayerRefundLeaf.js +1 -1
  25. package/dist/src/svm/clients/SvmSpoke/instructions/executeRelayerRefundLeafDeferred.js +1 -1
  26. package/dist/src/svm/clients/SvmSpoke/instructions/executeSlowRelayLeaf.js +2 -2
  27. package/dist/src/svm/clients/SvmSpoke/instructions/fillRelay.js +1 -1
  28. package/dist/src/svm/clients/SvmSpoke/instructions/handleReceiveMessage.d.ts +1 -1
  29. package/dist/src/svm/clients/SvmSpoke/instructions/handleReceiveMessage.js +6 -6
  30. package/dist/src/svm/clients/SvmSpoke/instructions/unsafeDeposit.d.ts +2 -2
  31. package/dist/src/svm/clients/SvmSpoke/instructions/unsafeDeposit.js +4 -4
  32. package/dist/src/svm/clients/SvmSpoke/programs/svmSpoke.d.ts +2 -2
  33. package/dist/src/svm/clients/SvmSpoke/programs/svmSpoke.js +1 -1
  34. package/dist/src/svm/clients/SvmSpoke/types/filledRelay.d.ts +2 -2
  35. package/dist/src/svm/clients/SvmSpoke/types/filledRelay.js +2 -2
  36. package/dist/src/svm/clients/SvmSpoke/types/fundsDeposited.d.ts +2 -2
  37. package/dist/src/svm/clients/SvmSpoke/types/fundsDeposited.js +2 -2
  38. package/dist/src/svm/clients/SvmSpoke/types/relayData.d.ts +2 -2
  39. package/dist/src/svm/clients/SvmSpoke/types/relayData.js +2 -2
  40. package/dist/src/svm/clients/SvmSpoke/types/requestedSlowFill.d.ts +2 -2
  41. package/dist/src/svm/clients/SvmSpoke/types/requestedSlowFill.js +2 -2
  42. package/dist/src/svm/clients/index.d.ts +1 -3
  43. package/dist/src/svm/clients/index.js +1 -5
  44. package/dist/src/svm/web3-v1/helpers.d.ts +6 -6
  45. package/dist/src/svm/web3-v1/helpers.js +2 -2
  46. package/dist/src/svm/web3-v1/relayHashUtils.js +3 -3
  47. package/dist/src/svm/web3-v1/solanaProgramUtils.d.ts +1 -1
  48. package/dist/src/svm/web3-v1/solanaProgramUtils.js +17 -7
  49. package/dist/src/types/svm.d.ts +3 -3
  50. package/dist/target/types/svm_spoke.d.ts +122 -70
  51. package/dist/test/svm/SvmSpoke.Deposit.js +21 -3
  52. package/dist/test/svm/SvmSpoke.Fill.AcrossPlus.js +3 -3
  53. package/dist/test/svm/SvmSpoke.Fill.js +3 -3
  54. package/dist/test/svm/SvmSpoke.SlowFill.AcrossPlus.js +3 -3
  55. package/dist/test/svm/SvmSpoke.SlowFill.js +2 -2
  56. package/dist/test/svm/SvmSpoke.common.js +1 -1
  57. package/package.json +4 -4
  58. package/dist/src/svm/clients/MessageTransmitter/accounts/index.d.ts +0 -10
  59. package/dist/src/svm/clients/MessageTransmitter/accounts/index.js +0 -26
  60. package/dist/src/svm/clients/MessageTransmitter/accounts/messageSent.d.ts +0 -28
  61. package/dist/src/svm/clients/MessageTransmitter/accounts/messageSent.js +0 -64
  62. package/dist/src/svm/clients/MessageTransmitter/accounts/messageTransmitter.d.ts +0 -46
  63. package/dist/src/svm/clients/MessageTransmitter/accounts/messageTransmitter.js +0 -82
  64. package/dist/src/svm/clients/MessageTransmitter/accounts/usedNonces.d.ts +0 -31
  65. package/dist/src/svm/clients/MessageTransmitter/accounts/usedNonces.js +0 -70
  66. package/dist/src/svm/clients/MessageTransmitter/errors/index.d.ts +0 -8
  67. package/dist/src/svm/clients/MessageTransmitter/errors/index.js +0 -24
  68. package/dist/src/svm/clients/MessageTransmitter/errors/messageTransmitter.d.ts +0 -83
  69. package/dist/src/svm/clients/MessageTransmitter/errors/messageTransmitter.js +0 -124
  70. package/dist/src/svm/clients/MessageTransmitter/index.d.ts +0 -12
  71. package/dist/src/svm/clients/MessageTransmitter/index.js +0 -28
  72. package/dist/src/svm/clients/MessageTransmitter/instructions/acceptOwnership.d.ts +0 -45
  73. package/dist/src/svm/clients/MessageTransmitter/instructions/acceptOwnership.js +0 -85
  74. package/dist/src/svm/clients/MessageTransmitter/instructions/disableAttester.d.ts +0 -55
  75. package/dist/src/svm/clients/MessageTransmitter/instructions/disableAttester.js +0 -105
  76. package/dist/src/svm/clients/MessageTransmitter/instructions/enableAttester.d.ts +0 -55
  77. package/dist/src/svm/clients/MessageTransmitter/instructions/enableAttester.js +0 -105
  78. package/dist/src/svm/clients/MessageTransmitter/instructions/getNoncePda.d.ts +0 -43
  79. package/dist/src/svm/clients/MessageTransmitter/instructions/getNoncePda.js +0 -82
  80. package/dist/src/svm/clients/MessageTransmitter/instructions/index.d.ts +0 -25
  81. package/dist/src/svm/clients/MessageTransmitter/instructions/index.js +0 -41
  82. package/dist/src/svm/clients/MessageTransmitter/instructions/initialize.d.ts +0 -70
  83. package/dist/src/svm/clients/MessageTransmitter/instructions/initialize.js +0 -123
  84. package/dist/src/svm/clients/MessageTransmitter/instructions/isNonceUsed.d.ts +0 -42
  85. package/dist/src/svm/clients/MessageTransmitter/instructions/isNonceUsed.js +0 -77
  86. package/dist/src/svm/clients/MessageTransmitter/instructions/pause.d.ts +0 -45
  87. package/dist/src/svm/clients/MessageTransmitter/instructions/pause.js +0 -85
  88. package/dist/src/svm/clients/MessageTransmitter/instructions/receiveMessage.d.ts +0 -67
  89. package/dist/src/svm/clients/MessageTransmitter/instructions/receiveMessage.js +0 -113
  90. package/dist/src/svm/clients/MessageTransmitter/instructions/reclaimEventAccount.d.ts +0 -48
  91. package/dist/src/svm/clients/MessageTransmitter/instructions/reclaimEventAccount.js +0 -94
  92. package/dist/src/svm/clients/MessageTransmitter/instructions/replaceMessage.d.ts +0 -64
  93. package/dist/src/svm/clients/MessageTransmitter/instructions/replaceMessage.js +0 -132
  94. package/dist/src/svm/clients/MessageTransmitter/instructions/sendMessage.d.ts +0 -61
  95. package/dist/src/svm/clients/MessageTransmitter/instructions/sendMessage.js +0 -112
  96. package/dist/src/svm/clients/MessageTransmitter/instructions/sendMessageWithCaller.d.ts +0 -64
  97. package/dist/src/svm/clients/MessageTransmitter/instructions/sendMessageWithCaller.js +0 -117
  98. package/dist/src/svm/clients/MessageTransmitter/instructions/setMaxMessageBodySize.d.ts +0 -49
  99. package/dist/src/svm/clients/MessageTransmitter/instructions/setMaxMessageBodySize.js +0 -94
  100. package/dist/src/svm/clients/MessageTransmitter/instructions/setSignatureThreshold.d.ts +0 -49
  101. package/dist/src/svm/clients/MessageTransmitter/instructions/setSignatureThreshold.js +0 -97
  102. package/dist/src/svm/clients/MessageTransmitter/instructions/transferOwnership.d.ts +0 -49
  103. package/dist/src/svm/clients/MessageTransmitter/instructions/transferOwnership.js +0 -91
  104. package/dist/src/svm/clients/MessageTransmitter/instructions/unpause.d.ts +0 -45
  105. package/dist/src/svm/clients/MessageTransmitter/instructions/unpause.js +0 -85
  106. package/dist/src/svm/clients/MessageTransmitter/instructions/updateAttesterManager.d.ts +0 -49
  107. package/dist/src/svm/clients/MessageTransmitter/instructions/updateAttesterManager.js +0 -94
  108. package/dist/src/svm/clients/MessageTransmitter/instructions/updatePauser.d.ts +0 -49
  109. package/dist/src/svm/clients/MessageTransmitter/instructions/updatePauser.js +0 -91
  110. package/dist/src/svm/clients/MessageTransmitter/programs/index.d.ts +0 -8
  111. package/dist/src/svm/clients/MessageTransmitter/programs/index.js +0 -24
  112. package/dist/src/svm/clients/MessageTransmitter/programs/messageTransmitter.d.ts +0 -78
  113. package/dist/src/svm/clients/MessageTransmitter/programs/messageTransmitter.js +0 -112
  114. package/dist/src/svm/clients/MessageTransmitter/shared/index.d.ts +0 -49
  115. package/dist/src/svm/clients/MessageTransmitter/shared/index.js +0 -94
  116. package/dist/src/svm/clients/MessageTransmitter/types/attesterDisabled.d.ts +0 -15
  117. package/dist/src/svm/clients/MessageTransmitter/types/attesterDisabled.js +0 -22
  118. package/dist/src/svm/clients/MessageTransmitter/types/attesterEnabled.d.ts +0 -15
  119. package/dist/src/svm/clients/MessageTransmitter/types/attesterEnabled.js +0 -22
  120. package/dist/src/svm/clients/MessageTransmitter/types/attesterManagerUpdated.d.ts +0 -16
  121. package/dist/src/svm/clients/MessageTransmitter/types/attesterManagerUpdated.js +0 -28
  122. package/dist/src/svm/clients/MessageTransmitter/types/handleReceiveMessageParams.d.ts +0 -18
  123. package/dist/src/svm/clients/MessageTransmitter/types/handleReceiveMessageParams.js +0 -32
  124. package/dist/src/svm/clients/MessageTransmitter/types/index.d.ts +0 -20
  125. package/dist/src/svm/clients/MessageTransmitter/types/index.js +0 -36
  126. package/dist/src/svm/clients/MessageTransmitter/types/mathError.d.ts +0 -17
  127. package/dist/src/svm/clients/MessageTransmitter/types/mathError.js +0 -29
  128. package/dist/src/svm/clients/MessageTransmitter/types/maxMessageBodySizeUpdated.d.ts +0 -17
  129. package/dist/src/svm/clients/MessageTransmitter/types/maxMessageBodySizeUpdated.js +0 -22
  130. package/dist/src/svm/clients/MessageTransmitter/types/messageReceived.d.ts +0 -25
  131. package/dist/src/svm/clients/MessageTransmitter/types/messageReceived.js +0 -34
  132. package/dist/src/svm/clients/MessageTransmitter/types/ownershipTransferStarted.d.ts +0 -16
  133. package/dist/src/svm/clients/MessageTransmitter/types/ownershipTransferStarted.js +0 -28
  134. package/dist/src/svm/clients/MessageTransmitter/types/ownershipTransferred.d.ts +0 -16
  135. package/dist/src/svm/clients/MessageTransmitter/types/ownershipTransferred.js +0 -28
  136. package/dist/src/svm/clients/MessageTransmitter/types/pause.d.ts +0 -13
  137. package/dist/src/svm/clients/MessageTransmitter/types/pause.js +0 -22
  138. package/dist/src/svm/clients/MessageTransmitter/types/pauserChanged.d.ts +0 -15
  139. package/dist/src/svm/clients/MessageTransmitter/types/pauserChanged.js +0 -22
  140. package/dist/src/svm/clients/MessageTransmitter/types/signatureThresholdUpdated.d.ts +0 -16
  141. package/dist/src/svm/clients/MessageTransmitter/types/signatureThresholdUpdated.js +0 -28
  142. package/dist/src/svm/clients/MessageTransmitter/types/unpause.d.ts +0 -13
  143. package/dist/src/svm/clients/MessageTransmitter/types/unpause.js +0 -22
  144. package/dist/src/svm/clients/TokenMessengerMinter/accounts/index.d.ts +0 -12
  145. package/dist/src/svm/clients/TokenMessengerMinter/accounts/index.js +0 -28
  146. package/dist/src/svm/clients/TokenMessengerMinter/accounts/localToken.d.ts +0 -43
  147. package/dist/src/svm/clients/TokenMessengerMinter/accounts/localToken.js +0 -82
  148. package/dist/src/svm/clients/TokenMessengerMinter/accounts/remoteTokenMessenger.d.ts +0 -29
  149. package/dist/src/svm/clients/TokenMessengerMinter/accounts/remoteTokenMessenger.js +0 -71
  150. package/dist/src/svm/clients/TokenMessengerMinter/accounts/tokenMessenger.d.ts +0 -35
  151. package/dist/src/svm/clients/TokenMessengerMinter/accounts/tokenMessenger.js +0 -74
  152. package/dist/src/svm/clients/TokenMessengerMinter/accounts/tokenMinter.d.ts +0 -33
  153. package/dist/src/svm/clients/TokenMessengerMinter/accounts/tokenMinter.js +0 -72
  154. package/dist/src/svm/clients/TokenMessengerMinter/accounts/tokenPair.d.ts +0 -33
  155. package/dist/src/svm/clients/TokenMessengerMinter/accounts/tokenPair.js +0 -72
  156. package/dist/src/svm/clients/TokenMessengerMinter/errors/index.d.ts +0 -8
  157. package/dist/src/svm/clients/TokenMessengerMinter/errors/index.js +0 -24
  158. package/dist/src/svm/clients/TokenMessengerMinter/errors/tokenMessengerMinter.d.ts +0 -45
  159. package/dist/src/svm/clients/TokenMessengerMinter/errors/tokenMessengerMinter.js +0 -67
  160. package/dist/src/svm/clients/TokenMessengerMinter/index.d.ts +0 -12
  161. package/dist/src/svm/clients/TokenMessengerMinter/index.js +0 -28
  162. package/dist/src/svm/clients/TokenMessengerMinter/instructions/acceptOwnership.d.ts +0 -45
  163. package/dist/src/svm/clients/TokenMessengerMinter/instructions/acceptOwnership.js +0 -82
  164. package/dist/src/svm/clients/TokenMessengerMinter/instructions/addLocalToken.d.ts +0 -63
  165. package/dist/src/svm/clients/TokenMessengerMinter/instructions/addLocalToken.js +0 -115
  166. package/dist/src/svm/clients/TokenMessengerMinter/instructions/addRemoteTokenMessenger.d.ts +0 -61
  167. package/dist/src/svm/clients/TokenMessengerMinter/instructions/addRemoteTokenMessenger.js +0 -110
  168. package/dist/src/svm/clients/TokenMessengerMinter/instructions/burnTokenCustody.d.ts +0 -64
  169. package/dist/src/svm/clients/TokenMessengerMinter/instructions/burnTokenCustody.js +0 -117
  170. package/dist/src/svm/clients/TokenMessengerMinter/instructions/depositForBurn.d.ts +0 -94
  171. package/dist/src/svm/clients/TokenMessengerMinter/instructions/depositForBurn.js +0 -161
  172. package/dist/src/svm/clients/TokenMessengerMinter/instructions/depositForBurnWithCaller.d.ts +0 -97
  173. package/dist/src/svm/clients/TokenMessengerMinter/instructions/depositForBurnWithCaller.js +0 -166
  174. package/dist/src/svm/clients/TokenMessengerMinter/instructions/handleReceiveMessage.d.ts +0 -79
  175. package/dist/src/svm/clients/TokenMessengerMinter/instructions/handleReceiveMessage.js +0 -132
  176. package/dist/src/svm/clients/TokenMessengerMinter/instructions/index.d.ts +0 -26
  177. package/dist/src/svm/clients/TokenMessengerMinter/instructions/index.js +0 -42
  178. package/dist/src/svm/clients/TokenMessengerMinter/instructions/initialize.d.ts +0 -73
  179. package/dist/src/svm/clients/TokenMessengerMinter/instructions/initialize.js +0 -124
  180. package/dist/src/svm/clients/TokenMessengerMinter/instructions/linkTokenPair.d.ts +0 -64
  181. package/dist/src/svm/clients/TokenMessengerMinter/instructions/linkTokenPair.js +0 -109
  182. package/dist/src/svm/clients/TokenMessengerMinter/instructions/pause.d.ts +0 -45
  183. package/dist/src/svm/clients/TokenMessengerMinter/instructions/pause.js +0 -82
  184. package/dist/src/svm/clients/TokenMessengerMinter/instructions/removeLocalToken.d.ts +0 -57
  185. package/dist/src/svm/clients/TokenMessengerMinter/instructions/removeLocalToken.js +0 -105
  186. package/dist/src/svm/clients/TokenMessengerMinter/instructions/removeRemoteTokenMessenger.d.ts +0 -51
  187. package/dist/src/svm/clients/TokenMessengerMinter/instructions/removeRemoteTokenMessenger.js +0 -94
  188. package/dist/src/svm/clients/TokenMessengerMinter/instructions/replaceDepositForBurn.d.ts +0 -79
  189. package/dist/src/svm/clients/TokenMessengerMinter/instructions/replaceDepositForBurn.js +0 -150
  190. package/dist/src/svm/clients/TokenMessengerMinter/instructions/setMaxBurnAmountPerMessage.d.ts +0 -52
  191. package/dist/src/svm/clients/TokenMessengerMinter/instructions/setMaxBurnAmountPerMessage.js +0 -97
  192. package/dist/src/svm/clients/TokenMessengerMinter/instructions/setTokenController.d.ts +0 -52
  193. package/dist/src/svm/clients/TokenMessengerMinter/instructions/setTokenController.js +0 -91
  194. package/dist/src/svm/clients/TokenMessengerMinter/instructions/transferOwnership.d.ts +0 -49
  195. package/dist/src/svm/clients/TokenMessengerMinter/instructions/transferOwnership.js +0 -88
  196. package/dist/src/svm/clients/TokenMessengerMinter/instructions/unlinkTokenPair.d.ts +0 -51
  197. package/dist/src/svm/clients/TokenMessengerMinter/instructions/unlinkTokenPair.js +0 -91
  198. package/dist/src/svm/clients/TokenMessengerMinter/instructions/unpause.d.ts +0 -45
  199. package/dist/src/svm/clients/TokenMessengerMinter/instructions/unpause.js +0 -82
  200. package/dist/src/svm/clients/TokenMessengerMinter/instructions/updatePauser.d.ts +0 -52
  201. package/dist/src/svm/clients/TokenMessengerMinter/instructions/updatePauser.js +0 -91
  202. package/dist/src/svm/clients/TokenMessengerMinter/programs/index.d.ts +0 -8
  203. package/dist/src/svm/clients/TokenMessengerMinter/programs/index.js +0 -24
  204. package/dist/src/svm/clients/TokenMessengerMinter/programs/tokenMessengerMinter.d.ts +0 -83
  205. package/dist/src/svm/clients/TokenMessengerMinter/programs/tokenMessengerMinter.js +0 -124
  206. package/dist/src/svm/clients/TokenMessengerMinter/shared/index.d.ts +0 -49
  207. package/dist/src/svm/clients/TokenMessengerMinter/shared/index.js +0 -94
  208. package/dist/src/svm/clients/TokenMessengerMinter/types/depositForBurn.d.ts +0 -31
  209. package/dist/src/svm/clients/TokenMessengerMinter/types/depositForBurn.js +0 -40
  210. package/dist/src/svm/clients/TokenMessengerMinter/types/index.d.ts +0 -24
  211. package/dist/src/svm/clients/TokenMessengerMinter/types/index.js +0 -40
  212. package/dist/src/svm/clients/TokenMessengerMinter/types/localTokenAdded.d.ts +0 -16
  213. package/dist/src/svm/clients/TokenMessengerMinter/types/localTokenAdded.js +0 -28
  214. package/dist/src/svm/clients/TokenMessengerMinter/types/localTokenRemoved.d.ts +0 -16
  215. package/dist/src/svm/clients/TokenMessengerMinter/types/localTokenRemoved.js +0 -28
  216. package/dist/src/svm/clients/TokenMessengerMinter/types/mintAndWithdraw.d.ts +0 -21
  217. package/dist/src/svm/clients/TokenMessengerMinter/types/mintAndWithdraw.js +0 -30
  218. package/dist/src/svm/clients/TokenMessengerMinter/types/ownershipTransferStarted.d.ts +0 -16
  219. package/dist/src/svm/clients/TokenMessengerMinter/types/ownershipTransferStarted.js +0 -28
  220. package/dist/src/svm/clients/TokenMessengerMinter/types/ownershipTransferred.d.ts +0 -16
  221. package/dist/src/svm/clients/TokenMessengerMinter/types/ownershipTransferred.js +0 -28
  222. package/dist/src/svm/clients/TokenMessengerMinter/types/pause.d.ts +0 -13
  223. package/dist/src/svm/clients/TokenMessengerMinter/types/pause.js +0 -22
  224. package/dist/src/svm/clients/TokenMessengerMinter/types/pauserChanged.d.ts +0 -15
  225. package/dist/src/svm/clients/TokenMessengerMinter/types/pauserChanged.js +0 -22
  226. package/dist/src/svm/clients/TokenMessengerMinter/types/remoteTokenMessengerAdded.d.ts +0 -16
  227. package/dist/src/svm/clients/TokenMessengerMinter/types/remoteTokenMessengerAdded.js +0 -28
  228. package/dist/src/svm/clients/TokenMessengerMinter/types/remoteTokenMessengerRemoved.d.ts +0 -16
  229. package/dist/src/svm/clients/TokenMessengerMinter/types/remoteTokenMessengerRemoved.js +0 -28
  230. package/dist/src/svm/clients/TokenMessengerMinter/types/setBurnLimitPerMessage.d.ts +0 -19
  231. package/dist/src/svm/clients/TokenMessengerMinter/types/setBurnLimitPerMessage.js +0 -28
  232. package/dist/src/svm/clients/TokenMessengerMinter/types/setTokenController.d.ts +0 -15
  233. package/dist/src/svm/clients/TokenMessengerMinter/types/setTokenController.js +0 -22
  234. package/dist/src/svm/clients/TokenMessengerMinter/types/tokenCustodyBurned.d.ts +0 -19
  235. package/dist/src/svm/clients/TokenMessengerMinter/types/tokenCustodyBurned.js +0 -28
  236. package/dist/src/svm/clients/TokenMessengerMinter/types/tokenMinterError.d.ts +0 -23
  237. package/dist/src/svm/clients/TokenMessengerMinter/types/tokenMinterError.js +0 -35
  238. package/dist/src/svm/clients/TokenMessengerMinter/types/tokenPairLinked.d.ts +0 -17
  239. package/dist/src/svm/clients/TokenMessengerMinter/types/tokenPairLinked.js +0 -30
  240. package/dist/src/svm/clients/TokenMessengerMinter/types/tokenPairUnlinked.d.ts +0 -17
  241. package/dist/src/svm/clients/TokenMessengerMinter/types/tokenPairUnlinked.js +0 -30
  242. package/dist/src/svm/clients/TokenMessengerMinter/types/unpause.d.ts +0 -13
  243. package/dist/src/svm/clients/TokenMessengerMinter/types/unpause.js +0 -22
@@ -5,7 +5,7 @@
5
5
  * IDL can be found at `target/idl/svm_spoke.json`.
6
6
  */
7
7
  export type SvmSpoke = {
8
- "address": "JAZWcGrpSWNPTBj8QtJ9UyQqhJCDhG9GJkDeMf5NQBiq";
8
+ "address": "4Jg83Lhggz2EdzSsDX2NVcEK56F25jJKK5btUbHAU4Xu";
9
9
  "metadata": {
10
10
  "name": "svmSpoke";
11
11
  "version": "0.1.0";
@@ -751,6 +751,7 @@ export type SvmSpoke = {
751
751
  "amount will be sent to the relayer on their repayment chain of choice as a refund following an optimistic",
752
752
  "challenge window in the HubPool, less a system fee.",
753
753
  "- output_amount: The amount of output tokens that the relayer will send to the recipient on the destination.",
754
+ "This is big-endian encoded as a 32-byte array to match its underlying byte representation on EVM side.",
754
755
  "- destination_chain_id: The destination chain identifier where the fill should be made.",
755
756
  "- exclusive_relayer: The relayer that will be exclusively allowed to fill this deposit before the exclusivity",
756
757
  "deadline timestamp. This must be a valid, non-zero address if the exclusivity deadline is greater than the",
@@ -992,7 +993,12 @@ export type SvmSpoke = {
992
993
  },
993
994
  {
994
995
  "name": "outputAmount";
995
- "type": "u64";
996
+ "type": {
997
+ "array": [
998
+ "u8",
999
+ 32
1000
+ ];
1001
+ };
996
1002
  },
997
1003
  {
998
1004
  "name": "destinationChainId";
@@ -1252,7 +1258,12 @@ export type SvmSpoke = {
1252
1258
  },
1253
1259
  {
1254
1260
  "name": "outputAmount";
1255
- "type": "u64";
1261
+ "type": {
1262
+ "array": [
1263
+ "u8",
1264
+ 32
1265
+ ];
1266
+ };
1256
1267
  },
1257
1268
  {
1258
1269
  "name": "destinationChainId";
@@ -2344,6 +2355,7 @@ export type SvmSpoke = {
2344
2355
  "token on the repayment chain will be sent as a refund to the caller.",
2345
2356
  "- output_token: The token that the caller will send to the recipient on this chain.",
2346
2357
  "- input_amount: This amount, less a system fee, will be sent to the caller on their repayment chain.",
2358
+ "This is big-endian encoded as a 32-byte array to match its underlying byte representation on EVM side",
2347
2359
  "- output_amount: The amount of output tokens that the caller will send to the recipient.",
2348
2360
  "- origin_chain_id: The origin chain identifier.",
2349
2361
  "- exclusive_relayer: The relayer that will be exclusively allowed to fill this deposit before the",
@@ -2723,38 +2735,38 @@ export type SvmSpoke = {
2723
2735
  {
2724
2736
  "kind": "const";
2725
2737
  "value": [
2726
- 255,
2727
- 9,
2728
- 170,
2729
- 45,
2730
- 62,
2731
- 177,
2732
- 188,
2733
- 157,
2734
- 161,
2735
- 158,
2736
- 130,
2737
- 38,
2738
- 73,
2739
- 48,
2740
- 225,
2741
- 61,
2742
- 57,
2743
- 147,
2744
- 225,
2745
- 22,
2746
- 15,
2747
- 48,
2748
- 57,
2749
- 239,
2750
- 33,
2751
- 175,
2752
- 209,
2753
- 86,
2754
- 83,
2755
- 118,
2738
+ 49,
2739
+ 26,
2740
+ 43,
2741
+ 82,
2742
+ 76,
2756
2743
  239,
2757
- 202
2744
+ 117,
2745
+ 32,
2746
+ 212,
2747
+ 230,
2748
+ 107,
2749
+ 40,
2750
+ 205,
2751
+ 152,
2752
+ 207,
2753
+ 87,
2754
+ 23,
2755
+ 16,
2756
+ 110,
2757
+ 169,
2758
+ 19,
2759
+ 114,
2760
+ 44,
2761
+ 25,
2762
+ 207,
2763
+ 28,
2764
+ 149,
2765
+ 223,
2766
+ 193,
2767
+ 138,
2768
+ 247,
2769
+ 52
2758
2770
  ];
2759
2771
  }
2760
2772
  ];
@@ -2847,7 +2859,7 @@ export type SvmSpoke = {
2847
2859
  },
2848
2860
  {
2849
2861
  "name": "program";
2850
- "address": "JAZWcGrpSWNPTBj8QtJ9UyQqhJCDhG9GJkDeMf5NQBiq";
2862
+ "address": "4Jg83Lhggz2EdzSsDX2NVcEK56F25jJKK5btUbHAU4Xu";
2851
2863
  }
2852
2864
  ];
2853
2865
  "args": [
@@ -4102,7 +4114,12 @@ export type SvmSpoke = {
4102
4114
  },
4103
4115
  {
4104
4116
  "name": "outputAmount";
4105
- "type": "u64";
4117
+ "type": {
4118
+ "array": [
4119
+ "u8",
4120
+ 32
4121
+ ];
4122
+ };
4106
4123
  },
4107
4124
  {
4108
4125
  "name": "destinationChainId";
@@ -4511,78 +4528,93 @@ export type SvmSpoke = {
4511
4528
  "errors": [
4512
4529
  {
4513
4530
  "code": 6000;
4514
- "name": "invalidQuoteTimestamp";
4515
- "msg": "Invalid quote timestamp!";
4531
+ "name": "notOwner";
4532
+ "msg": "Only the owner can call this function!";
4516
4533
  },
4517
4534
  {
4518
4535
  "code": 6001;
4519
- "name": "invalidFillDeadline";
4520
- "msg": "Invalid fill deadline!";
4536
+ "name": "invalidRelayHash";
4537
+ "msg": "Invalid relay hash!";
4521
4538
  },
4522
4539
  {
4523
4540
  "code": 6002;
4524
- "name": "notExclusiveRelayer";
4525
- "msg": "Caller is not the exclusive relayer and exclusivity deadline has not passed!";
4541
+ "name": "canOnlyCloseFillStatusPdaIfFillDeadlinePassed";
4542
+ "msg": "The fill deadline has not passed!";
4526
4543
  },
4527
4544
  {
4528
4545
  "code": 6003;
4529
- "name": "noSlowFillsInExclusivityWindow";
4530
- "msg": "The Deposit is still within the exclusivity window!";
4546
+ "name": "notRelayer";
4547
+ "msg": "The caller is not the relayer!";
4531
4548
  },
4532
4549
  {
4533
4550
  "code": 6004;
4534
- "name": "relayFilled";
4535
- "msg": "The relay has already been filled!";
4551
+ "name": "cannotSetCurrentTime";
4552
+ "msg": "Cannot set time if not in test mode!";
4536
4553
  },
4537
4554
  {
4538
4555
  "code": 6005;
4539
- "name": "invalidSlowFillRequest";
4540
- "msg": "Slow fill requires status of Unfilled!";
4556
+ "name": "invalidRemoteDomain";
4557
+ "msg": "Invalid remote domain!";
4541
4558
  },
4542
4559
  {
4543
4560
  "code": 6006;
4544
- "name": "expiredFillDeadline";
4545
- "msg": "The fill deadline has passed!";
4561
+ "name": "invalidRemoteSender";
4562
+ "msg": "Invalid remote sender!";
4546
4563
  },
4547
4564
  {
4548
4565
  "code": 6007;
4549
- "name": "invalidMerkleProof";
4550
- "msg": "Invalid Merkle proof!";
4566
+ "name": "invalidMint";
4567
+ "msg": "Invalid mint!";
4551
4568
  },
4552
4569
  {
4553
4570
  "code": 6008;
4554
- "name": "invalidChainId";
4555
- "msg": "Invalid chain id!";
4571
+ "name": "exceededPendingBridgeAmount";
4572
+ "msg": "Exceeded pending bridge amount to HubPool!";
4556
4573
  },
4557
4574
  {
4558
4575
  "code": 6009;
4559
- "name": "invalidMerkleLeaf";
4560
- "msg": "Invalid Merkle leaf!";
4576
+ "name": "paramsWriteOverflow";
4577
+ "msg": "Overflow writing to parameters account!";
4561
4578
  },
4562
4579
  {
4563
4580
  "code": 6010;
4564
- "name": "claimedMerkleLeaf";
4565
- "msg": "Leaf already claimed!";
4581
+ "name": "invalidRefund";
4582
+ "msg": "Invalid refund address!";
4566
4583
  },
4567
4584
  {
4568
4585
  "code": 6011;
4569
- "name": "depositsArePaused";
4570
- "msg": "Deposits are currently paused!";
4586
+ "name": "zeroRefundClaim";
4587
+ "msg": "Zero relayer refund claim!";
4571
4588
  },
4572
4589
  {
4573
4590
  "code": 6012;
4574
- "name": "fillsArePaused";
4575
- "msg": "Fills are currently paused!";
4591
+ "name": "nonZeroRefundClaim";
4592
+ "msg": "Cannot close non-zero relayer refund claim!";
4576
4593
  },
4577
4594
  {
4578
4595
  "code": 6013;
4579
- "name": "insufficientSpokePoolBalanceToExecuteLeaf";
4580
- "msg": "Insufficient spoke pool balance to execute leaf";
4596
+ "name": "invalidClaimInitializer";
4597
+ "msg": "Invalid claim initializer!";
4581
4598
  },
4582
4599
  {
4583
4600
  "code": 6014;
4584
- "name": "invalidExclusiveRelayer";
4585
- "msg": "Invalid exclusive relayer!";
4601
+ "name": "invalidRefundTokenAccount";
4602
+ "msg": "Invalid refund token account!";
4603
+ },
4604
+ {
4605
+ "code": 6015;
4606
+ "name": "invalidProductionSeed";
4607
+ "msg": "Seed must be 0 in production!";
4608
+ },
4609
+ {
4610
+ "code": 6016;
4611
+ "name": "invalidAtaCreationAccounts";
4612
+ "msg": "Invalid remaining accounts for ATA creation!";
4613
+ },
4614
+ {
4615
+ "code": 6017;
4616
+ "name": "invalidDelegatePda";
4617
+ "msg": "Invalid delegate PDA!";
4586
4618
  }
4587
4619
  ];
4588
4620
  "types": [
@@ -4857,7 +4889,12 @@ export type SvmSpoke = {
4857
4889
  },
4858
4890
  {
4859
4891
  "name": "inputAmount";
4860
- "type": "u64";
4892
+ "type": {
4893
+ "array": [
4894
+ "u8",
4895
+ 32
4896
+ ];
4897
+ };
4861
4898
  },
4862
4899
  {
4863
4900
  "name": "outputAmount";
@@ -4943,7 +4980,12 @@ export type SvmSpoke = {
4943
4980
  },
4944
4981
  {
4945
4982
  "name": "outputAmount";
4946
- "type": "u64";
4983
+ "type": {
4984
+ "array": [
4985
+ "u8",
4986
+ 32
4987
+ ];
4988
+ };
4947
4989
  },
4948
4990
  {
4949
4991
  "name": "destinationChainId";
@@ -5064,7 +5106,12 @@ export type SvmSpoke = {
5064
5106
  },
5065
5107
  {
5066
5108
  "name": "inputAmount";
5067
- "type": "u64";
5109
+ "type": {
5110
+ "array": [
5111
+ "u8",
5112
+ 32
5113
+ ];
5114
+ };
5068
5115
  },
5069
5116
  {
5070
5117
  "name": "outputAmount";
@@ -5228,7 +5275,12 @@ export type SvmSpoke = {
5228
5275
  },
5229
5276
  {
5230
5277
  "name": "inputAmount";
5231
- "type": "u64";
5278
+ "type": {
5279
+ "array": [
5280
+ "u8",
5281
+ 32
5282
+ ];
5283
+ };
5232
5284
  },
5233
5285
  {
5234
5286
  "name": "outputAmount";
@@ -6,37 +6,43 @@
6
6
  * @see https://github.com/codama-idl/codama
7
7
  */
8
8
  import { type Address, type SOLANA_ERROR__INSTRUCTION_ERROR__CUSTOM, type SolanaError } from '@solana/kit';
9
- /** InvalidQuoteTimestamp: Invalid quote timestamp! */
10
- export declare const SVM_SPOKE_ERROR__INVALID_QUOTE_TIMESTAMP = 6000;
11
- /** InvalidFillDeadline: Invalid fill deadline! */
12
- export declare const SVM_SPOKE_ERROR__INVALID_FILL_DEADLINE = 6001;
13
- /** NotExclusiveRelayer: Caller is not the exclusive relayer and exclusivity deadline has not passed! */
14
- export declare const SVM_SPOKE_ERROR__NOT_EXCLUSIVE_RELAYER = 6002;
15
- /** NoSlowFillsInExclusivityWindow: The Deposit is still within the exclusivity window! */
16
- export declare const SVM_SPOKE_ERROR__NO_SLOW_FILLS_IN_EXCLUSIVITY_WINDOW = 6003;
17
- /** RelayFilled: The relay has already been filled! */
18
- export declare const SVM_SPOKE_ERROR__RELAY_FILLED = 6004;
19
- /** InvalidSlowFillRequest: Slow fill requires status of Unfilled! */
20
- export declare const SVM_SPOKE_ERROR__INVALID_SLOW_FILL_REQUEST = 6005;
21
- /** ExpiredFillDeadline: The fill deadline has passed! */
22
- export declare const SVM_SPOKE_ERROR__EXPIRED_FILL_DEADLINE = 6006;
23
- /** InvalidMerkleProof: Invalid Merkle proof! */
24
- export declare const SVM_SPOKE_ERROR__INVALID_MERKLE_PROOF = 6007;
25
- /** InvalidChainId: Invalid chain id! */
26
- export declare const SVM_SPOKE_ERROR__INVALID_CHAIN_ID = 6008;
27
- /** InvalidMerkleLeaf: Invalid Merkle leaf! */
28
- export declare const SVM_SPOKE_ERROR__INVALID_MERKLE_LEAF = 6009;
29
- /** ClaimedMerkleLeaf: Leaf already claimed! */
30
- export declare const SVM_SPOKE_ERROR__CLAIMED_MERKLE_LEAF = 6010;
31
- /** DepositsArePaused: Deposits are currently paused! */
32
- export declare const SVM_SPOKE_ERROR__DEPOSITS_ARE_PAUSED = 6011;
33
- /** FillsArePaused: Fills are currently paused! */
34
- export declare const SVM_SPOKE_ERROR__FILLS_ARE_PAUSED = 6012;
35
- /** InsufficientSpokePoolBalanceToExecuteLeaf: Insufficient spoke pool balance to execute leaf */
36
- export declare const SVM_SPOKE_ERROR__INSUFFICIENT_SPOKE_POOL_BALANCE_TO_EXECUTE_LEAF = 6013;
37
- /** InvalidExclusiveRelayer: Invalid exclusive relayer! */
38
- export declare const SVM_SPOKE_ERROR__INVALID_EXCLUSIVE_RELAYER = 6014;
39
- export type SvmSpokeError = typeof SVM_SPOKE_ERROR__CLAIMED_MERKLE_LEAF | typeof SVM_SPOKE_ERROR__DEPOSITS_ARE_PAUSED | typeof SVM_SPOKE_ERROR__EXPIRED_FILL_DEADLINE | typeof SVM_SPOKE_ERROR__FILLS_ARE_PAUSED | typeof SVM_SPOKE_ERROR__INSUFFICIENT_SPOKE_POOL_BALANCE_TO_EXECUTE_LEAF | typeof SVM_SPOKE_ERROR__INVALID_CHAIN_ID | typeof SVM_SPOKE_ERROR__INVALID_EXCLUSIVE_RELAYER | typeof SVM_SPOKE_ERROR__INVALID_FILL_DEADLINE | typeof SVM_SPOKE_ERROR__INVALID_MERKLE_LEAF | typeof SVM_SPOKE_ERROR__INVALID_MERKLE_PROOF | typeof SVM_SPOKE_ERROR__INVALID_QUOTE_TIMESTAMP | typeof SVM_SPOKE_ERROR__INVALID_SLOW_FILL_REQUEST | typeof SVM_SPOKE_ERROR__NO_SLOW_FILLS_IN_EXCLUSIVITY_WINDOW | typeof SVM_SPOKE_ERROR__NOT_EXCLUSIVE_RELAYER | typeof SVM_SPOKE_ERROR__RELAY_FILLED;
9
+ /** NotOwner: Only the owner can call this function! */
10
+ export declare const SVM_SPOKE_ERROR__NOT_OWNER = 6000;
11
+ /** InvalidRelayHash: Invalid relay hash! */
12
+ export declare const SVM_SPOKE_ERROR__INVALID_RELAY_HASH = 6001;
13
+ /** CanOnlyCloseFillStatusPdaIfFillDeadlinePassed: The fill deadline has not passed! */
14
+ export declare const SVM_SPOKE_ERROR__CAN_ONLY_CLOSE_FILL_STATUS_PDA_IF_FILL_DEADLINE_PASSED = 6002;
15
+ /** NotRelayer: The caller is not the relayer! */
16
+ export declare const SVM_SPOKE_ERROR__NOT_RELAYER = 6003;
17
+ /** CannotSetCurrentTime: Cannot set time if not in test mode! */
18
+ export declare const SVM_SPOKE_ERROR__CANNOT_SET_CURRENT_TIME = 6004;
19
+ /** InvalidRemoteDomain: Invalid remote domain! */
20
+ export declare const SVM_SPOKE_ERROR__INVALID_REMOTE_DOMAIN = 6005;
21
+ /** InvalidRemoteSender: Invalid remote sender! */
22
+ export declare const SVM_SPOKE_ERROR__INVALID_REMOTE_SENDER = 6006;
23
+ /** InvalidMint: Invalid mint! */
24
+ export declare const SVM_SPOKE_ERROR__INVALID_MINT = 6007;
25
+ /** ExceededPendingBridgeAmount: Exceeded pending bridge amount to HubPool! */
26
+ export declare const SVM_SPOKE_ERROR__EXCEEDED_PENDING_BRIDGE_AMOUNT = 6008;
27
+ /** ParamsWriteOverflow: Overflow writing to parameters account! */
28
+ export declare const SVM_SPOKE_ERROR__PARAMS_WRITE_OVERFLOW = 6009;
29
+ /** InvalidRefund: Invalid refund address! */
30
+ export declare const SVM_SPOKE_ERROR__INVALID_REFUND = 6010;
31
+ /** ZeroRefundClaim: Zero relayer refund claim! */
32
+ export declare const SVM_SPOKE_ERROR__ZERO_REFUND_CLAIM = 6011;
33
+ /** NonZeroRefundClaim: Cannot close non-zero relayer refund claim! */
34
+ export declare const SVM_SPOKE_ERROR__NON_ZERO_REFUND_CLAIM = 6012;
35
+ /** InvalidClaimInitializer: Invalid claim initializer! */
36
+ export declare const SVM_SPOKE_ERROR__INVALID_CLAIM_INITIALIZER = 6013;
37
+ /** InvalidRefundTokenAccount: Invalid refund token account! */
38
+ export declare const SVM_SPOKE_ERROR__INVALID_REFUND_TOKEN_ACCOUNT = 6014;
39
+ /** InvalidProductionSeed: Seed must be 0 in production! */
40
+ export declare const SVM_SPOKE_ERROR__INVALID_PRODUCTION_SEED = 6015;
41
+ /** InvalidATACreationAccounts: Invalid remaining accounts for ATA creation! */
42
+ export declare const SVM_SPOKE_ERROR__INVALID_A_T_A_CREATION_ACCOUNTS = 6016;
43
+ /** InvalidDelegatePda: Invalid delegate PDA! */
44
+ export declare const SVM_SPOKE_ERROR__INVALID_DELEGATE_PDA = 6017;
45
+ export type SvmSpokeError = typeof SVM_SPOKE_ERROR__CANNOT_SET_CURRENT_TIME | typeof SVM_SPOKE_ERROR__CAN_ONLY_CLOSE_FILL_STATUS_PDA_IF_FILL_DEADLINE_PASSED | typeof SVM_SPOKE_ERROR__EXCEEDED_PENDING_BRIDGE_AMOUNT | typeof SVM_SPOKE_ERROR__INVALID_A_T_A_CREATION_ACCOUNTS | typeof SVM_SPOKE_ERROR__INVALID_CLAIM_INITIALIZER | typeof SVM_SPOKE_ERROR__INVALID_DELEGATE_PDA | typeof SVM_SPOKE_ERROR__INVALID_MINT | typeof SVM_SPOKE_ERROR__INVALID_PRODUCTION_SEED | typeof SVM_SPOKE_ERROR__INVALID_REFUND | typeof SVM_SPOKE_ERROR__INVALID_REFUND_TOKEN_ACCOUNT | typeof SVM_SPOKE_ERROR__INVALID_RELAY_HASH | typeof SVM_SPOKE_ERROR__INVALID_REMOTE_DOMAIN | typeof SVM_SPOKE_ERROR__INVALID_REMOTE_SENDER | typeof SVM_SPOKE_ERROR__NON_ZERO_REFUND_CLAIM | typeof SVM_SPOKE_ERROR__NOT_OWNER | typeof SVM_SPOKE_ERROR__NOT_RELAYER | typeof SVM_SPOKE_ERROR__PARAMS_WRITE_OVERFLOW | typeof SVM_SPOKE_ERROR__ZERO_REFUND_CLAIM;
40
46
  export declare function getSvmSpokeErrorMessage(code: SvmSpokeError): string;
41
47
  export declare function isSvmSpokeError<TProgramErrorCode extends SvmSpokeError>(error: unknown, transactionMessage: {
42
48
  instructions: Record<number, {
@@ -7,59 +7,68 @@
7
7
  * @see https://github.com/codama-idl/codama
8
8
  */
9
9
  Object.defineProperty(exports, "__esModule", { value: true });
10
- exports.SVM_SPOKE_ERROR__INVALID_EXCLUSIVE_RELAYER = exports.SVM_SPOKE_ERROR__INSUFFICIENT_SPOKE_POOL_BALANCE_TO_EXECUTE_LEAF = exports.SVM_SPOKE_ERROR__FILLS_ARE_PAUSED = exports.SVM_SPOKE_ERROR__DEPOSITS_ARE_PAUSED = exports.SVM_SPOKE_ERROR__CLAIMED_MERKLE_LEAF = exports.SVM_SPOKE_ERROR__INVALID_MERKLE_LEAF = exports.SVM_SPOKE_ERROR__INVALID_CHAIN_ID = exports.SVM_SPOKE_ERROR__INVALID_MERKLE_PROOF = exports.SVM_SPOKE_ERROR__EXPIRED_FILL_DEADLINE = exports.SVM_SPOKE_ERROR__INVALID_SLOW_FILL_REQUEST = exports.SVM_SPOKE_ERROR__RELAY_FILLED = exports.SVM_SPOKE_ERROR__NO_SLOW_FILLS_IN_EXCLUSIVITY_WINDOW = exports.SVM_SPOKE_ERROR__NOT_EXCLUSIVE_RELAYER = exports.SVM_SPOKE_ERROR__INVALID_FILL_DEADLINE = exports.SVM_SPOKE_ERROR__INVALID_QUOTE_TIMESTAMP = void 0;
10
+ exports.SVM_SPOKE_ERROR__INVALID_DELEGATE_PDA = exports.SVM_SPOKE_ERROR__INVALID_A_T_A_CREATION_ACCOUNTS = exports.SVM_SPOKE_ERROR__INVALID_PRODUCTION_SEED = exports.SVM_SPOKE_ERROR__INVALID_REFUND_TOKEN_ACCOUNT = exports.SVM_SPOKE_ERROR__INVALID_CLAIM_INITIALIZER = exports.SVM_SPOKE_ERROR__NON_ZERO_REFUND_CLAIM = exports.SVM_SPOKE_ERROR__ZERO_REFUND_CLAIM = exports.SVM_SPOKE_ERROR__INVALID_REFUND = exports.SVM_SPOKE_ERROR__PARAMS_WRITE_OVERFLOW = exports.SVM_SPOKE_ERROR__EXCEEDED_PENDING_BRIDGE_AMOUNT = exports.SVM_SPOKE_ERROR__INVALID_MINT = exports.SVM_SPOKE_ERROR__INVALID_REMOTE_SENDER = exports.SVM_SPOKE_ERROR__INVALID_REMOTE_DOMAIN = exports.SVM_SPOKE_ERROR__CANNOT_SET_CURRENT_TIME = exports.SVM_SPOKE_ERROR__NOT_RELAYER = exports.SVM_SPOKE_ERROR__CAN_ONLY_CLOSE_FILL_STATUS_PDA_IF_FILL_DEADLINE_PASSED = exports.SVM_SPOKE_ERROR__INVALID_RELAY_HASH = exports.SVM_SPOKE_ERROR__NOT_OWNER = void 0;
11
11
  exports.getSvmSpokeErrorMessage = getSvmSpokeErrorMessage;
12
12
  exports.isSvmSpokeError = isSvmSpokeError;
13
13
  const kit_1 = require("@solana/kit");
14
14
  const programs_1 = require("../programs");
15
- /** InvalidQuoteTimestamp: Invalid quote timestamp! */
16
- exports.SVM_SPOKE_ERROR__INVALID_QUOTE_TIMESTAMP = 0x1770; // 6000
17
- /** InvalidFillDeadline: Invalid fill deadline! */
18
- exports.SVM_SPOKE_ERROR__INVALID_FILL_DEADLINE = 0x1771; // 6001
19
- /** NotExclusiveRelayer: Caller is not the exclusive relayer and exclusivity deadline has not passed! */
20
- exports.SVM_SPOKE_ERROR__NOT_EXCLUSIVE_RELAYER = 0x1772; // 6002
21
- /** NoSlowFillsInExclusivityWindow: The Deposit is still within the exclusivity window! */
22
- exports.SVM_SPOKE_ERROR__NO_SLOW_FILLS_IN_EXCLUSIVITY_WINDOW = 0x1773; // 6003
23
- /** RelayFilled: The relay has already been filled! */
24
- exports.SVM_SPOKE_ERROR__RELAY_FILLED = 0x1774; // 6004
25
- /** InvalidSlowFillRequest: Slow fill requires status of Unfilled! */
26
- exports.SVM_SPOKE_ERROR__INVALID_SLOW_FILL_REQUEST = 0x1775; // 6005
27
- /** ExpiredFillDeadline: The fill deadline has passed! */
28
- exports.SVM_SPOKE_ERROR__EXPIRED_FILL_DEADLINE = 0x1776; // 6006
29
- /** InvalidMerkleProof: Invalid Merkle proof! */
30
- exports.SVM_SPOKE_ERROR__INVALID_MERKLE_PROOF = 0x1777; // 6007
31
- /** InvalidChainId: Invalid chain id! */
32
- exports.SVM_SPOKE_ERROR__INVALID_CHAIN_ID = 0x1778; // 6008
33
- /** InvalidMerkleLeaf: Invalid Merkle leaf! */
34
- exports.SVM_SPOKE_ERROR__INVALID_MERKLE_LEAF = 0x1779; // 6009
35
- /** ClaimedMerkleLeaf: Leaf already claimed! */
36
- exports.SVM_SPOKE_ERROR__CLAIMED_MERKLE_LEAF = 0x177a; // 6010
37
- /** DepositsArePaused: Deposits are currently paused! */
38
- exports.SVM_SPOKE_ERROR__DEPOSITS_ARE_PAUSED = 0x177b; // 6011
39
- /** FillsArePaused: Fills are currently paused! */
40
- exports.SVM_SPOKE_ERROR__FILLS_ARE_PAUSED = 0x177c; // 6012
41
- /** InsufficientSpokePoolBalanceToExecuteLeaf: Insufficient spoke pool balance to execute leaf */
42
- exports.SVM_SPOKE_ERROR__INSUFFICIENT_SPOKE_POOL_BALANCE_TO_EXECUTE_LEAF = 0x177d; // 6013
43
- /** InvalidExclusiveRelayer: Invalid exclusive relayer! */
44
- exports.SVM_SPOKE_ERROR__INVALID_EXCLUSIVE_RELAYER = 0x177e; // 6014
15
+ /** NotOwner: Only the owner can call this function! */
16
+ exports.SVM_SPOKE_ERROR__NOT_OWNER = 0x1770; // 6000
17
+ /** InvalidRelayHash: Invalid relay hash! */
18
+ exports.SVM_SPOKE_ERROR__INVALID_RELAY_HASH = 0x1771; // 6001
19
+ /** CanOnlyCloseFillStatusPdaIfFillDeadlinePassed: The fill deadline has not passed! */
20
+ exports.SVM_SPOKE_ERROR__CAN_ONLY_CLOSE_FILL_STATUS_PDA_IF_FILL_DEADLINE_PASSED = 0x1772; // 6002
21
+ /** NotRelayer: The caller is not the relayer! */
22
+ exports.SVM_SPOKE_ERROR__NOT_RELAYER = 0x1773; // 6003
23
+ /** CannotSetCurrentTime: Cannot set time if not in test mode! */
24
+ exports.SVM_SPOKE_ERROR__CANNOT_SET_CURRENT_TIME = 0x1774; // 6004
25
+ /** InvalidRemoteDomain: Invalid remote domain! */
26
+ exports.SVM_SPOKE_ERROR__INVALID_REMOTE_DOMAIN = 0x1775; // 6005
27
+ /** InvalidRemoteSender: Invalid remote sender! */
28
+ exports.SVM_SPOKE_ERROR__INVALID_REMOTE_SENDER = 0x1776; // 6006
29
+ /** InvalidMint: Invalid mint! */
30
+ exports.SVM_SPOKE_ERROR__INVALID_MINT = 0x1777; // 6007
31
+ /** ExceededPendingBridgeAmount: Exceeded pending bridge amount to HubPool! */
32
+ exports.SVM_SPOKE_ERROR__EXCEEDED_PENDING_BRIDGE_AMOUNT = 0x1778; // 6008
33
+ /** ParamsWriteOverflow: Overflow writing to parameters account! */
34
+ exports.SVM_SPOKE_ERROR__PARAMS_WRITE_OVERFLOW = 0x1779; // 6009
35
+ /** InvalidRefund: Invalid refund address! */
36
+ exports.SVM_SPOKE_ERROR__INVALID_REFUND = 0x177a; // 6010
37
+ /** ZeroRefundClaim: Zero relayer refund claim! */
38
+ exports.SVM_SPOKE_ERROR__ZERO_REFUND_CLAIM = 0x177b; // 6011
39
+ /** NonZeroRefundClaim: Cannot close non-zero relayer refund claim! */
40
+ exports.SVM_SPOKE_ERROR__NON_ZERO_REFUND_CLAIM = 0x177c; // 6012
41
+ /** InvalidClaimInitializer: Invalid claim initializer! */
42
+ exports.SVM_SPOKE_ERROR__INVALID_CLAIM_INITIALIZER = 0x177d; // 6013
43
+ /** InvalidRefundTokenAccount: Invalid refund token account! */
44
+ exports.SVM_SPOKE_ERROR__INVALID_REFUND_TOKEN_ACCOUNT = 0x177e; // 6014
45
+ /** InvalidProductionSeed: Seed must be 0 in production! */
46
+ exports.SVM_SPOKE_ERROR__INVALID_PRODUCTION_SEED = 0x177f; // 6015
47
+ /** InvalidATACreationAccounts: Invalid remaining accounts for ATA creation! */
48
+ exports.SVM_SPOKE_ERROR__INVALID_A_T_A_CREATION_ACCOUNTS = 0x1780; // 6016
49
+ /** InvalidDelegatePda: Invalid delegate PDA! */
50
+ exports.SVM_SPOKE_ERROR__INVALID_DELEGATE_PDA = 0x1781; // 6017
45
51
  let svmSpokeErrorMessages;
46
52
  if (process.env.NODE_ENV !== 'production') {
47
53
  svmSpokeErrorMessages = {
48
- [exports.SVM_SPOKE_ERROR__CLAIMED_MERKLE_LEAF]: `Leaf already claimed!`,
49
- [exports.SVM_SPOKE_ERROR__DEPOSITS_ARE_PAUSED]: `Deposits are currently paused!`,
50
- [exports.SVM_SPOKE_ERROR__EXPIRED_FILL_DEADLINE]: `The fill deadline has passed!`,
51
- [exports.SVM_SPOKE_ERROR__FILLS_ARE_PAUSED]: `Fills are currently paused!`,
52
- [exports.SVM_SPOKE_ERROR__INSUFFICIENT_SPOKE_POOL_BALANCE_TO_EXECUTE_LEAF]: `Insufficient spoke pool balance to execute leaf`,
53
- [exports.SVM_SPOKE_ERROR__INVALID_CHAIN_ID]: `Invalid chain id!`,
54
- [exports.SVM_SPOKE_ERROR__INVALID_EXCLUSIVE_RELAYER]: `Invalid exclusive relayer!`,
55
- [exports.SVM_SPOKE_ERROR__INVALID_FILL_DEADLINE]: `Invalid fill deadline!`,
56
- [exports.SVM_SPOKE_ERROR__INVALID_MERKLE_LEAF]: `Invalid Merkle leaf!`,
57
- [exports.SVM_SPOKE_ERROR__INVALID_MERKLE_PROOF]: `Invalid Merkle proof!`,
58
- [exports.SVM_SPOKE_ERROR__INVALID_QUOTE_TIMESTAMP]: `Invalid quote timestamp!`,
59
- [exports.SVM_SPOKE_ERROR__INVALID_SLOW_FILL_REQUEST]: `Slow fill requires status of Unfilled!`,
60
- [exports.SVM_SPOKE_ERROR__NO_SLOW_FILLS_IN_EXCLUSIVITY_WINDOW]: `The Deposit is still within the exclusivity window!`,
61
- [exports.SVM_SPOKE_ERROR__NOT_EXCLUSIVE_RELAYER]: `Caller is not the exclusive relayer and exclusivity deadline has not passed!`,
62
- [exports.SVM_SPOKE_ERROR__RELAY_FILLED]: `The relay has already been filled!`,
54
+ [exports.SVM_SPOKE_ERROR__CANNOT_SET_CURRENT_TIME]: `Cannot set time if not in test mode!`,
55
+ [exports.SVM_SPOKE_ERROR__CAN_ONLY_CLOSE_FILL_STATUS_PDA_IF_FILL_DEADLINE_PASSED]: `The fill deadline has not passed!`,
56
+ [exports.SVM_SPOKE_ERROR__EXCEEDED_PENDING_BRIDGE_AMOUNT]: `Exceeded pending bridge amount to HubPool!`,
57
+ [exports.SVM_SPOKE_ERROR__INVALID_A_T_A_CREATION_ACCOUNTS]: `Invalid remaining accounts for ATA creation!`,
58
+ [exports.SVM_SPOKE_ERROR__INVALID_CLAIM_INITIALIZER]: `Invalid claim initializer!`,
59
+ [exports.SVM_SPOKE_ERROR__INVALID_DELEGATE_PDA]: `Invalid delegate PDA!`,
60
+ [exports.SVM_SPOKE_ERROR__INVALID_MINT]: `Invalid mint!`,
61
+ [exports.SVM_SPOKE_ERROR__INVALID_PRODUCTION_SEED]: `Seed must be 0 in production!`,
62
+ [exports.SVM_SPOKE_ERROR__INVALID_REFUND]: `Invalid refund address!`,
63
+ [exports.SVM_SPOKE_ERROR__INVALID_REFUND_TOKEN_ACCOUNT]: `Invalid refund token account!`,
64
+ [exports.SVM_SPOKE_ERROR__INVALID_RELAY_HASH]: `Invalid relay hash!`,
65
+ [exports.SVM_SPOKE_ERROR__INVALID_REMOTE_DOMAIN]: `Invalid remote domain!`,
66
+ [exports.SVM_SPOKE_ERROR__INVALID_REMOTE_SENDER]: `Invalid remote sender!`,
67
+ [exports.SVM_SPOKE_ERROR__NON_ZERO_REFUND_CLAIM]: `Cannot close non-zero relayer refund claim!`,
68
+ [exports.SVM_SPOKE_ERROR__NOT_OWNER]: `Only the owner can call this function!`,
69
+ [exports.SVM_SPOKE_ERROR__NOT_RELAYER]: `The caller is not the relayer!`,
70
+ [exports.SVM_SPOKE_ERROR__PARAMS_WRITE_OVERFLOW]: `Overflow writing to parameters account!`,
71
+ [exports.SVM_SPOKE_ERROR__ZERO_REFUND_CLAIM]: `Zero relayer refund claim!`,
63
72
  };
64
73
  }
65
74
  function getSvmSpokeErrorMessage(code) {
@@ -114,7 +114,7 @@ async function getBridgeTokensToHubPoolInstructionAsync(input, config) {
114
114
  }
115
115
  if (!accounts.vault.value) {
116
116
  accounts.vault.value = await (0, kit_1.getProgramDerivedAddress)({
117
- programAddress: 'ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL',
117
+ programAddress,
118
118
  seeds: [
119
119
  (0, kit_1.getAddressEncoder)().encode((0, shared_1.expectAddress)(accounts.state.value)),
120
120
  (0, kit_1.getAddressEncoder)().encode((0, shared_1.expectAddress)(accounts.tokenProgram.value)),
@@ -60,7 +60,7 @@ async function getClaimRelayerRefundInstructionAsync(input, config) {
60
60
  }
61
61
  if (!accounts.vault.value) {
62
62
  accounts.vault.value = await (0, kit_1.getProgramDerivedAddress)({
63
- programAddress: 'ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL',
63
+ programAddress,
64
64
  seeds: [
65
65
  (0, kit_1.getAddressEncoder)().encode((0, shared_1.expectAddress)(accounts.state.value)),
66
66
  (0, kit_1.getAddressEncoder)().encode((0, shared_1.expectAddress)(accounts.tokenProgram.value)),
@@ -30,7 +30,7 @@ export type DepositInstructionData = {
30
30
  inputToken: Address;
31
31
  outputToken: Address;
32
32
  inputAmount: bigint;
33
- outputAmount: bigint;
33
+ outputAmount: ReadonlyUint8Array;
34
34
  destinationChainId: bigint;
35
35
  exclusiveRelayer: Address;
36
36
  quoteTimestamp: number;
@@ -44,7 +44,7 @@ export type DepositInstructionDataArgs = {
44
44
  inputToken: Address;
45
45
  outputToken: Address;
46
46
  inputAmount: number | bigint;
47
- outputAmount: number | bigint;
47
+ outputAmount: ReadonlyUint8Array;
48
48
  destinationChainId: number | bigint;
49
49
  exclusiveRelayer: Address;
50
50
  quoteTimestamp: number;
@@ -32,7 +32,7 @@ function getDepositInstructionDataEncoder() {
32
32
  ['inputToken', (0, kit_1.getAddressEncoder)()],
33
33
  ['outputToken', (0, kit_1.getAddressEncoder)()],
34
34
  ['inputAmount', (0, kit_1.getU64Encoder)()],
35
- ['outputAmount', (0, kit_1.getU64Encoder)()],
35
+ ['outputAmount', (0, kit_1.fixEncoderSize)((0, kit_1.getBytesEncoder)(), 32)],
36
36
  ['destinationChainId', (0, kit_1.getU64Encoder)()],
37
37
  ['exclusiveRelayer', (0, kit_1.getAddressEncoder)()],
38
38
  ['quoteTimestamp', (0, kit_1.getU32Encoder)()],
@@ -49,7 +49,7 @@ function getDepositInstructionDataDecoder() {
49
49
  ['inputToken', (0, kit_1.getAddressDecoder)()],
50
50
  ['outputToken', (0, kit_1.getAddressDecoder)()],
51
51
  ['inputAmount', (0, kit_1.getU64Decoder)()],
52
- ['outputAmount', (0, kit_1.getU64Decoder)()],
52
+ ['outputAmount', (0, kit_1.fixDecoderSize)((0, kit_1.getBytesDecoder)(), 32)],
53
53
  ['destinationChainId', (0, kit_1.getU64Decoder)()],
54
54
  ['exclusiveRelayer', (0, kit_1.getAddressDecoder)()],
55
55
  ['quoteTimestamp', (0, kit_1.getU32Decoder)()],
@@ -94,7 +94,7 @@ async function getDepositInstructionAsync(input, config) {
94
94
  }
95
95
  if (!accounts.depositorTokenAccount.value) {
96
96
  accounts.depositorTokenAccount.value = await (0, kit_1.getProgramDerivedAddress)({
97
- programAddress: 'ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL',
97
+ programAddress,
98
98
  seeds: [
99
99
  (0, kit_1.getAddressEncoder)().encode((0, shared_1.expectSome)(args.depositor)),
100
100
  (0, kit_1.getAddressEncoder)().encode((0, shared_1.expectAddress)(accounts.tokenProgram.value)),
@@ -104,7 +104,7 @@ async function getDepositInstructionAsync(input, config) {
104
104
  }
105
105
  if (!accounts.vault.value) {
106
106
  accounts.vault.value = await (0, kit_1.getProgramDerivedAddress)({
107
- programAddress: 'ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL',
107
+ programAddress,
108
108
  seeds: [
109
109
  (0, kit_1.getAddressEncoder)().encode((0, shared_1.expectAddress)(accounts.state.value)),
110
110
  (0, kit_1.getAddressEncoder)().encode((0, shared_1.expectAddress)(accounts.tokenProgram.value)),
@@ -30,7 +30,7 @@ export type DepositNowInstructionData = {
30
30
  inputToken: Address;
31
31
  outputToken: Address;
32
32
  inputAmount: bigint;
33
- outputAmount: bigint;
33
+ outputAmount: ReadonlyUint8Array;
34
34
  destinationChainId: bigint;
35
35
  exclusiveRelayer: Address;
36
36
  fillDeadlineOffset: number;
@@ -43,7 +43,7 @@ export type DepositNowInstructionDataArgs = {
43
43
  inputToken: Address;
44
44
  outputToken: Address;
45
45
  inputAmount: number | bigint;
46
- outputAmount: number | bigint;
46
+ outputAmount: ReadonlyUint8Array;
47
47
  destinationChainId: number | bigint;
48
48
  exclusiveRelayer: Address;
49
49
  fillDeadlineOffset: number;