@virtuals-protocol/acp-node-v2 0.1.3 → 0.1.5

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 (271) hide show
  1. package/dist/clientFactory.d.ts +1 -2
  2. package/dist/clientFactory.d.ts.map +1 -1
  3. package/dist/clientFactory.js +1 -5
  4. package/dist/clientFactory.js.map +1 -1
  5. package/dist/core/constants.d.ts +4 -0
  6. package/dist/core/constants.d.ts.map +1 -1
  7. package/dist/core/constants.js +13 -0
  8. package/dist/core/constants.js.map +1 -1
  9. package/dist/core/solana/constants.d.ts +5 -0
  10. package/dist/core/solana/constants.d.ts.map +1 -0
  11. package/dist/core/solana/constants.js +5 -0
  12. package/dist/core/solana/constants.js.map +1 -0
  13. package/dist/core/solana/generated/acp/accounts/acpState.d.ts +60 -0
  14. package/dist/core/solana/generated/acp/accounts/acpState.d.ts.map +1 -0
  15. package/dist/core/solana/generated/acp/accounts/acpState.js +68 -0
  16. package/dist/core/solana/generated/acp/accounts/acpState.js.map +1 -0
  17. package/dist/core/solana/generated/acp/accounts/hookWhitelist.d.ts +37 -0
  18. package/dist/core/solana/generated/acp/accounts/hookWhitelist.d.ts.map +1 -0
  19. package/dist/core/solana/generated/acp/accounts/hookWhitelist.js +59 -0
  20. package/dist/core/solana/generated/acp/accounts/hookWhitelist.js.map +1 -0
  21. package/dist/core/solana/generated/acp/accounts/index.d.ts +11 -0
  22. package/dist/core/solana/generated/acp/accounts/index.d.ts.map +1 -0
  23. package/dist/core/solana/generated/acp/accounts/index.js +11 -0
  24. package/dist/core/solana/generated/acp/accounts/index.js.map +1 -0
  25. package/dist/core/solana/generated/acp/accounts/job.d.ts +89 -0
  26. package/dist/core/solana/generated/acp/accounts/job.d.ts.map +1 -0
  27. package/dist/core/solana/generated/acp/accounts/job.js +83 -0
  28. package/dist/core/solana/generated/acp/accounts/job.js.map +1 -0
  29. package/dist/core/solana/generated/acp/errors/agenticCommerceV3.d.ts +94 -0
  30. package/dist/core/solana/generated/acp/errors/agenticCommerceV3.d.ts.map +1 -0
  31. package/dist/core/solana/generated/acp/errors/agenticCommerceV3.js +135 -0
  32. package/dist/core/solana/generated/acp/errors/agenticCommerceV3.js.map +1 -0
  33. package/dist/core/solana/generated/acp/errors/index.d.ts +9 -0
  34. package/dist/core/solana/generated/acp/errors/index.d.ts.map +1 -0
  35. package/dist/core/solana/generated/acp/errors/index.js +9 -0
  36. package/dist/core/solana/generated/acp/errors/index.js.map +1 -0
  37. package/dist/core/solana/generated/acp/index.d.ts +14 -0
  38. package/dist/core/solana/generated/acp/index.d.ts.map +1 -0
  39. package/dist/core/solana/generated/acp/index.js +14 -0
  40. package/dist/core/solana/generated/acp/index.js.map +1 -0
  41. package/dist/core/solana/generated/acp/instructions/acceptAuthority.d.ts +47 -0
  42. package/dist/core/solana/generated/acp/instructions/acceptAuthority.d.ts.map +1 -0
  43. package/dist/core/solana/generated/acp/instructions/acceptAuthority.js +88 -0
  44. package/dist/core/solana/generated/acp/instructions/acceptAuthority.js.map +1 -0
  45. package/dist/core/solana/generated/acp/instructions/addHookWhitelist.d.ts +64 -0
  46. package/dist/core/solana/generated/acp/instructions/addHookWhitelist.d.ts.map +1 -0
  47. package/dist/core/solana/generated/acp/instructions/addHookWhitelist.js +140 -0
  48. package/dist/core/solana/generated/acp/instructions/addHookWhitelist.js.map +1 -0
  49. package/dist/core/solana/generated/acp/instructions/claimRefund.d.ts +74 -0
  50. package/dist/core/solana/generated/acp/instructions/claimRefund.d.ts.map +1 -0
  51. package/dist/core/solana/generated/acp/instructions/claimRefund.js +142 -0
  52. package/dist/core/solana/generated/acp/instructions/claimRefund.js.map +1 -0
  53. package/dist/core/solana/generated/acp/instructions/complete.d.ts +108 -0
  54. package/dist/core/solana/generated/acp/instructions/complete.d.ts.map +1 -0
  55. package/dist/core/solana/generated/acp/instructions/complete.js +190 -0
  56. package/dist/core/solana/generated/acp/instructions/complete.js.map +1 -0
  57. package/dist/core/solana/generated/acp/instructions/createJob.d.ts +83 -0
  58. package/dist/core/solana/generated/acp/instructions/createJob.d.ts.map +1 -0
  59. package/dist/core/solana/generated/acp/instructions/createJob.js +137 -0
  60. package/dist/core/solana/generated/acp/instructions/createJob.js.map +1 -0
  61. package/dist/core/solana/generated/acp/instructions/fund.d.ts +99 -0
  62. package/dist/core/solana/generated/acp/instructions/fund.d.ts.map +1 -0
  63. package/dist/core/solana/generated/acp/instructions/fund.js +126 -0
  64. package/dist/core/solana/generated/acp/instructions/fund.js.map +1 -0
  65. package/dist/core/solana/generated/acp/instructions/index.d.ts +23 -0
  66. package/dist/core/solana/generated/acp/instructions/index.d.ts.map +1 -0
  67. package/dist/core/solana/generated/acp/instructions/index.js +23 -0
  68. package/dist/core/solana/generated/acp/instructions/index.js.map +1 -0
  69. package/dist/core/solana/generated/acp/instructions/initialize.d.ts +76 -0
  70. package/dist/core/solana/generated/acp/instructions/initialize.d.ts.map +1 -0
  71. package/dist/core/solana/generated/acp/instructions/initialize.js +141 -0
  72. package/dist/core/solana/generated/acp/instructions/initialize.js.map +1 -0
  73. package/dist/core/solana/generated/acp/instructions/nominateAuthority.d.ts +52 -0
  74. package/dist/core/solana/generated/acp/instructions/nominateAuthority.d.ts.map +1 -0
  75. package/dist/core/solana/generated/acp/instructions/nominateAuthority.js +96 -0
  76. package/dist/core/solana/generated/acp/instructions/nominateAuthority.js.map +1 -0
  77. package/dist/core/solana/generated/acp/instructions/reject.d.ts +88 -0
  78. package/dist/core/solana/generated/acp/instructions/reject.d.ts.map +1 -0
  79. package/dist/core/solana/generated/acp/instructions/reject.js +168 -0
  80. package/dist/core/solana/generated/acp/instructions/reject.js.map +1 -0
  81. package/dist/core/solana/generated/acp/instructions/removeHookWhitelist.d.ts +56 -0
  82. package/dist/core/solana/generated/acp/instructions/removeHookWhitelist.d.ts.map +1 -0
  83. package/dist/core/solana/generated/acp/instructions/removeHookWhitelist.js +112 -0
  84. package/dist/core/solana/generated/acp/instructions/removeHookWhitelist.js.map +1 -0
  85. package/dist/core/solana/generated/acp/instructions/setBudget.d.ts +56 -0
  86. package/dist/core/solana/generated/acp/instructions/setBudget.d.ts.map +1 -0
  87. package/dist/core/solana/generated/acp/instructions/setBudget.js +90 -0
  88. package/dist/core/solana/generated/acp/instructions/setBudget.js.map +1 -0
  89. package/dist/core/solana/generated/acp/instructions/setEvaluatorFee.d.ts +52 -0
  90. package/dist/core/solana/generated/acp/instructions/setEvaluatorFee.d.ts.map +1 -0
  91. package/dist/core/solana/generated/acp/instructions/setEvaluatorFee.js +96 -0
  92. package/dist/core/solana/generated/acp/instructions/setEvaluatorFee.js.map +1 -0
  93. package/dist/core/solana/generated/acp/instructions/setPlatformFee.d.ts +56 -0
  94. package/dist/core/solana/generated/acp/instructions/setPlatformFee.d.ts.map +1 -0
  95. package/dist/core/solana/generated/acp/instructions/setPlatformFee.js +98 -0
  96. package/dist/core/solana/generated/acp/instructions/setPlatformFee.js.map +1 -0
  97. package/dist/core/solana/generated/acp/instructions/setProvider.d.ts +50 -0
  98. package/dist/core/solana/generated/acp/instructions/setProvider.d.ts.map +1 -0
  99. package/dist/core/solana/generated/acp/instructions/setProvider.js +85 -0
  100. package/dist/core/solana/generated/acp/instructions/setProvider.js.map +1 -0
  101. package/dist/core/solana/generated/acp/instructions/submit.d.ts +150 -0
  102. package/dist/core/solana/generated/acp/instructions/submit.d.ts.map +1 -0
  103. package/dist/core/solana/generated/acp/instructions/submit.js +214 -0
  104. package/dist/core/solana/generated/acp/instructions/submit.js.map +1 -0
  105. package/dist/core/solana/generated/acp/pdas/acpState.d.ts +12 -0
  106. package/dist/core/solana/generated/acp/pdas/acpState.d.ts.map +1 -0
  107. package/dist/core/solana/generated/acp/pdas/acpState.js +18 -0
  108. package/dist/core/solana/generated/acp/pdas/acpState.js.map +1 -0
  109. package/dist/core/solana/generated/acp/pdas/hookWhitelist.d.ts +15 -0
  110. package/dist/core/solana/generated/acp/pdas/hookWhitelist.d.ts.map +1 -0
  111. package/dist/core/solana/generated/acp/pdas/hookWhitelist.js +21 -0
  112. package/dist/core/solana/generated/acp/pdas/hookWhitelist.js.map +1 -0
  113. package/dist/core/solana/generated/acp/pdas/index.d.ts +10 -0
  114. package/dist/core/solana/generated/acp/pdas/index.d.ts.map +1 -0
  115. package/dist/core/solana/generated/acp/pdas/index.js +10 -0
  116. package/dist/core/solana/generated/acp/pdas/index.js.map +1 -0
  117. package/dist/core/solana/generated/acp/programs/agenticCommerceV3.d.ts +71 -0
  118. package/dist/core/solana/generated/acp/programs/agenticCommerceV3.d.ts.map +1 -0
  119. package/dist/core/solana/generated/acp/programs/agenticCommerceV3.js +209 -0
  120. package/dist/core/solana/generated/acp/programs/agenticCommerceV3.js.map +1 -0
  121. package/dist/core/solana/generated/acp/programs/index.d.ts +9 -0
  122. package/dist/core/solana/generated/acp/programs/index.d.ts.map +1 -0
  123. package/dist/core/solana/generated/acp/programs/index.js +9 -0
  124. package/dist/core/solana/generated/acp/programs/index.js.map +1 -0
  125. package/dist/core/solana/generated/acp/shared/index.d.ts +50 -0
  126. package/dist/core/solana/generated/acp/shared/index.d.ts.map +1 -0
  127. package/dist/core/solana/generated/acp/shared/index.js +87 -0
  128. package/dist/core/solana/generated/acp/shared/index.js.map +1 -0
  129. package/dist/core/solana/generated/acp/types/index.d.ts +9 -0
  130. package/dist/core/solana/generated/acp/types/index.d.ts.map +1 -0
  131. package/dist/core/solana/generated/acp/types/index.js +9 -0
  132. package/dist/core/solana/generated/acp/types/index.js.map +1 -0
  133. package/dist/core/solana/generated/acp/types/jobCreated.d.ts +11 -0
  134. package/dist/core/solana/generated/acp/types/jobCreated.d.ts.map +1 -0
  135. package/dist/core/solana/generated/acp/types/jobCreated.js +12 -0
  136. package/dist/core/solana/generated/acp/types/jobCreated.js.map +1 -0
  137. package/dist/core/solana/generated/acp/types/jobState.d.ts +27 -0
  138. package/dist/core/solana/generated/acp/types/jobState.d.ts.map +1 -0
  139. package/dist/core/solana/generated/acp/types/jobState.js +33 -0
  140. package/dist/core/solana/generated/acp/types/jobState.js.map +1 -0
  141. package/dist/core/solana/generated/fund-transfer-hook/accounts/fundRequestIntentId.d.ts +35 -0
  142. package/dist/core/solana/generated/fund-transfer-hook/accounts/fundRequestIntentId.d.ts.map +1 -0
  143. package/dist/core/solana/generated/fund-transfer-hook/accounts/fundRequestIntentId.js +64 -0
  144. package/dist/core/solana/generated/fund-transfer-hook/accounts/fundRequestIntentId.js.map +1 -0
  145. package/dist/core/solana/generated/fund-transfer-hook/accounts/hookMetadata.d.ts +33 -0
  146. package/dist/core/solana/generated/fund-transfer-hook/accounts/hookMetadata.d.ts.map +1 -0
  147. package/dist/core/solana/generated/fund-transfer-hook/accounts/hookMetadata.js +59 -0
  148. package/dist/core/solana/generated/fund-transfer-hook/accounts/hookMetadata.js.map +1 -0
  149. package/dist/core/solana/generated/fund-transfer-hook/accounts/hookState.d.ts +38 -0
  150. package/dist/core/solana/generated/fund-transfer-hook/accounts/hookState.d.ts.map +1 -0
  151. package/dist/core/solana/generated/fund-transfer-hook/accounts/hookState.js +62 -0
  152. package/dist/core/solana/generated/fund-transfer-hook/accounts/hookState.js.map +1 -0
  153. package/dist/core/solana/generated/fund-transfer-hook/accounts/index.d.ts +13 -0
  154. package/dist/core/solana/generated/fund-transfer-hook/accounts/index.d.ts.map +1 -0
  155. package/dist/core/solana/generated/fund-transfer-hook/accounts/index.js +13 -0
  156. package/dist/core/solana/generated/fund-transfer-hook/accounts/index.js.map +1 -0
  157. package/dist/core/solana/generated/fund-transfer-hook/accounts/intent.d.ts +61 -0
  158. package/dist/core/solana/generated/fund-transfer-hook/accounts/intent.d.ts.map +1 -0
  159. package/dist/core/solana/generated/fund-transfer-hook/accounts/intent.js +77 -0
  160. package/dist/core/solana/generated/fund-transfer-hook/accounts/intent.js.map +1 -0
  161. package/dist/core/solana/generated/fund-transfer-hook/accounts/providerEscrowIntentId.d.ts +35 -0
  162. package/dist/core/solana/generated/fund-transfer-hook/accounts/providerEscrowIntentId.d.ts.map +1 -0
  163. package/dist/core/solana/generated/fund-transfer-hook/accounts/providerEscrowIntentId.js +64 -0
  164. package/dist/core/solana/generated/fund-transfer-hook/accounts/providerEscrowIntentId.js.map +1 -0
  165. package/dist/core/solana/generated/fund-transfer-hook/index.d.ts +12 -0
  166. package/dist/core/solana/generated/fund-transfer-hook/index.d.ts.map +1 -0
  167. package/dist/core/solana/generated/fund-transfer-hook/index.js +12 -0
  168. package/dist/core/solana/generated/fund-transfer-hook/index.js.map +1 -0
  169. package/dist/core/solana/generated/fund-transfer-hook/instructions/acceptAuthority.d.ts +47 -0
  170. package/dist/core/solana/generated/fund-transfer-hook/instructions/acceptAuthority.d.ts.map +1 -0
  171. package/dist/core/solana/generated/fund-transfer-hook/instructions/acceptAuthority.js +88 -0
  172. package/dist/core/solana/generated/fund-transfer-hook/instructions/acceptAuthority.js.map +1 -0
  173. package/dist/core/solana/generated/fund-transfer-hook/instructions/afterAction.d.ts +56 -0
  174. package/dist/core/solana/generated/fund-transfer-hook/instructions/afterAction.d.ts.map +1 -0
  175. package/dist/core/solana/generated/fund-transfer-hook/instructions/afterAction.js +92 -0
  176. package/dist/core/solana/generated/fund-transfer-hook/instructions/afterAction.js.map +1 -0
  177. package/dist/core/solana/generated/fund-transfer-hook/instructions/beforeAction.d.ts +52 -0
  178. package/dist/core/solana/generated/fund-transfer-hook/instructions/beforeAction.d.ts.map +1 -0
  179. package/dist/core/solana/generated/fund-transfer-hook/instructions/beforeAction.js +90 -0
  180. package/dist/core/solana/generated/fund-transfer-hook/instructions/beforeAction.js.map +1 -0
  181. package/dist/core/solana/generated/fund-transfer-hook/instructions/claimEscrowRefund.d.ts +86 -0
  182. package/dist/core/solana/generated/fund-transfer-hook/instructions/claimEscrowRefund.d.ts.map +1 -0
  183. package/dist/core/solana/generated/fund-transfer-hook/instructions/claimEscrowRefund.js +169 -0
  184. package/dist/core/solana/generated/fund-transfer-hook/instructions/claimEscrowRefund.js.map +1 -0
  185. package/dist/core/solana/generated/fund-transfer-hook/instructions/closeIntent.d.ts +114 -0
  186. package/dist/core/solana/generated/fund-transfer-hook/instructions/closeIntent.d.ts.map +1 -0
  187. package/dist/core/solana/generated/fund-transfer-hook/instructions/closeIntent.js +120 -0
  188. package/dist/core/solana/generated/fund-transfer-hook/instructions/closeIntent.js.map +1 -0
  189. package/dist/core/solana/generated/fund-transfer-hook/instructions/index.d.ts +15 -0
  190. package/dist/core/solana/generated/fund-transfer-hook/instructions/index.d.ts.map +1 -0
  191. package/dist/core/solana/generated/fund-transfer-hook/instructions/index.js +15 -0
  192. package/dist/core/solana/generated/fund-transfer-hook/instructions/index.js.map +1 -0
  193. package/dist/core/solana/generated/fund-transfer-hook/instructions/initialize.d.ts +67 -0
  194. package/dist/core/solana/generated/fund-transfer-hook/instructions/initialize.d.ts.map +1 -0
  195. package/dist/core/solana/generated/fund-transfer-hook/instructions/initialize.js +138 -0
  196. package/dist/core/solana/generated/fund-transfer-hook/instructions/initialize.js.map +1 -0
  197. package/dist/core/solana/generated/fund-transfer-hook/instructions/nominateAuthority.d.ts +52 -0
  198. package/dist/core/solana/generated/fund-transfer-hook/instructions/nominateAuthority.d.ts.map +1 -0
  199. package/dist/core/solana/generated/fund-transfer-hook/instructions/nominateAuthority.js +96 -0
  200. package/dist/core/solana/generated/fund-transfer-hook/instructions/nominateAuthority.js.map +1 -0
  201. package/dist/core/solana/generated/fund-transfer-hook/pdas/escrowAuthority.d.ts +15 -0
  202. package/dist/core/solana/generated/fund-transfer-hook/pdas/escrowAuthority.d.ts.map +1 -0
  203. package/dist/core/solana/generated/fund-transfer-hook/pdas/escrowAuthority.js +22 -0
  204. package/dist/core/solana/generated/fund-transfer-hook/pdas/escrowAuthority.js.map +1 -0
  205. package/dist/core/solana/generated/fund-transfer-hook/pdas/hookMetadata.d.ts +12 -0
  206. package/dist/core/solana/generated/fund-transfer-hook/pdas/hookMetadata.d.ts.map +1 -0
  207. package/dist/core/solana/generated/fund-transfer-hook/pdas/hookMetadata.js +20 -0
  208. package/dist/core/solana/generated/fund-transfer-hook/pdas/hookMetadata.js.map +1 -0
  209. package/dist/core/solana/generated/fund-transfer-hook/pdas/hookState.d.ts +12 -0
  210. package/dist/core/solana/generated/fund-transfer-hook/pdas/hookState.d.ts.map +1 -0
  211. package/dist/core/solana/generated/fund-transfer-hook/pdas/hookState.js +18 -0
  212. package/dist/core/solana/generated/fund-transfer-hook/pdas/hookState.js.map +1 -0
  213. package/dist/core/solana/generated/fund-transfer-hook/pdas/index.d.ts +13 -0
  214. package/dist/core/solana/generated/fund-transfer-hook/pdas/index.d.ts.map +1 -0
  215. package/dist/core/solana/generated/fund-transfer-hook/pdas/index.js +13 -0
  216. package/dist/core/solana/generated/fund-transfer-hook/pdas/index.js.map +1 -0
  217. package/dist/core/solana/generated/fund-transfer-hook/pdas/intent.d.ts +15 -0
  218. package/dist/core/solana/generated/fund-transfer-hook/pdas/intent.d.ts.map +1 -0
  219. package/dist/core/solana/generated/fund-transfer-hook/pdas/intent.js +19 -0
  220. package/dist/core/solana/generated/fund-transfer-hook/pdas/intent.js.map +1 -0
  221. package/dist/core/solana/generated/fund-transfer-hook/pdas/providerEscrowIntentId.d.ts +15 -0
  222. package/dist/core/solana/generated/fund-transfer-hook/pdas/providerEscrowIntentId.d.ts.map +1 -0
  223. package/dist/core/solana/generated/fund-transfer-hook/pdas/providerEscrowIntentId.js +22 -0
  224. package/dist/core/solana/generated/fund-transfer-hook/pdas/providerEscrowIntentId.js.map +1 -0
  225. package/dist/core/solana/generated/fund-transfer-hook/programs/fundTransferHook.d.ts +49 -0
  226. package/dist/core/solana/generated/fund-transfer-hook/programs/fundTransferHook.d.ts.map +1 -0
  227. package/dist/core/solana/generated/fund-transfer-hook/programs/fundTransferHook.js +129 -0
  228. package/dist/core/solana/generated/fund-transfer-hook/programs/fundTransferHook.js.map +1 -0
  229. package/dist/core/solana/generated/fund-transfer-hook/programs/index.d.ts +9 -0
  230. package/dist/core/solana/generated/fund-transfer-hook/programs/index.d.ts.map +1 -0
  231. package/dist/core/solana/generated/fund-transfer-hook/programs/index.js +9 -0
  232. package/dist/core/solana/generated/fund-transfer-hook/programs/index.js.map +1 -0
  233. package/dist/core/solana/generated/fund-transfer-hook/shared/index.d.ts +50 -0
  234. package/dist/core/solana/generated/fund-transfer-hook/shared/index.d.ts.map +1 -0
  235. package/dist/core/solana/generated/fund-transfer-hook/shared/index.js +87 -0
  236. package/dist/core/solana/generated/fund-transfer-hook/shared/index.js.map +1 -0
  237. package/dist/core/solana/wallet.d.ts +49 -0
  238. package/dist/core/solana/wallet.d.ts.map +1 -0
  239. package/dist/core/solana/wallet.js +119 -0
  240. package/dist/core/solana/wallet.js.map +1 -0
  241. package/dist/events/socketTransport.d.ts +18 -0
  242. package/dist/events/socketTransport.d.ts.map +1 -0
  243. package/dist/events/socketTransport.js +117 -0
  244. package/dist/events/socketTransport.js.map +1 -0
  245. package/dist/index.d.ts +4 -1
  246. package/dist/index.d.ts.map +1 -1
  247. package/dist/index.js +5 -1
  248. package/dist/index.js.map +1 -1
  249. package/dist/providers/evm/privyAlchemyEvmProviderAdapter.js +1 -1
  250. package/dist/providers/evm/privyAlchemyEvmProviderAdapter.js.map +1 -1
  251. package/dist/providers/providerAuthClient.d.ts +8 -2
  252. package/dist/providers/providerAuthClient.d.ts.map +1 -1
  253. package/dist/providers/providerAuthClient.js +6 -12
  254. package/dist/providers/providerAuthClient.js.map +1 -1
  255. package/dist/providers/solana/keypairSolanaProviderAdapter.d.ts +16 -0
  256. package/dist/providers/solana/keypairSolanaProviderAdapter.d.ts.map +1 -0
  257. package/dist/providers/solana/keypairSolanaProviderAdapter.js +68 -0
  258. package/dist/providers/solana/keypairSolanaProviderAdapter.js.map +1 -0
  259. package/dist/providers/solana/privySolanaProviderAdapter.d.ts +54 -0
  260. package/dist/providers/solana/privySolanaProviderAdapter.d.ts.map +1 -0
  261. package/dist/providers/solana/privySolanaProviderAdapter.js +357 -0
  262. package/dist/providers/solana/privySolanaProviderAdapter.js.map +1 -0
  263. package/dist/providers/solana/solanaProviderAdapter.d.ts +5 -1
  264. package/dist/providers/solana/solanaProviderAdapter.d.ts.map +1 -1
  265. package/dist/providers/solana/solanaProviderAdapter.js +17 -1
  266. package/dist/providers/solana/solanaProviderAdapter.js.map +1 -1
  267. package/dist/providers/types.d.ts +11 -6
  268. package/dist/providers/types.d.ts.map +1 -1
  269. package/dist/providers/types.js +1 -1
  270. package/dist/providers/types.js.map +1 -1
  271. package/package.json +3 -2
@@ -0,0 +1,12 @@
1
+ /**
2
+ * This code was AUTOGENERATED using the Codama library.
3
+ * Please DO NOT EDIT THIS FILE, instead use visitors
4
+ * to add features, then rerun Codama to update it.
5
+ *
6
+ * @see https://github.com/codama-idl/codama
7
+ */
8
+ export * from "./accounts/index.js";
9
+ export * from "./instructions/index.js";
10
+ export * from "./pdas/index.js";
11
+ export * from "./programs/index.js";
12
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/core/solana/generated/fund-transfer-hook/index.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,cAAc,qBAAqB,CAAC;AACpC,cAAc,yBAAyB,CAAC;AACxC,cAAc,iBAAiB,CAAC;AAChC,cAAc,qBAAqB,CAAC"}
@@ -0,0 +1,47 @@
1
+ /**
2
+ * This code was AUTOGENERATED using the Codama library.
3
+ * Please DO NOT EDIT THIS FILE, instead use visitors
4
+ * to add features, then rerun Codama to update it.
5
+ *
6
+ * @see https://github.com/codama-idl/codama
7
+ */
8
+ import { type AccountMeta, type AccountSignerMeta, type Address, type FixedSizeCodec, type FixedSizeDecoder, type FixedSizeEncoder, type Instruction, type InstructionWithAccounts, type InstructionWithData, type ReadonlySignerAccount, type ReadonlyUint8Array, type TransactionSigner, type WritableAccount } from "@solana/kit";
9
+ import { FUND_TRANSFER_HOOK_PROGRAM_ADDRESS } from "../programs/index.js";
10
+ export declare const ACCEPT_AUTHORITY_DISCRIMINATOR: Uint8Array<ArrayBuffer>;
11
+ export declare function getAcceptAuthorityDiscriminatorBytes(): ReadonlyUint8Array;
12
+ export type AcceptAuthorityInstruction<TProgram extends string = typeof FUND_TRANSFER_HOOK_PROGRAM_ADDRESS, TAccountNewAuthority extends string | AccountMeta<string> = string, TAccountHookState extends string | AccountMeta<string> = string, TRemainingAccounts extends readonly AccountMeta<string>[] = []> = Instruction<TProgram> & InstructionWithData<ReadonlyUint8Array> & InstructionWithAccounts<[
13
+ TAccountNewAuthority extends string ? ReadonlySignerAccount<TAccountNewAuthority> & AccountSignerMeta<TAccountNewAuthority> : TAccountNewAuthority,
14
+ TAccountHookState extends string ? WritableAccount<TAccountHookState> : TAccountHookState,
15
+ ...TRemainingAccounts
16
+ ]>;
17
+ export type AcceptAuthorityInstructionData = {
18
+ discriminator: ReadonlyUint8Array;
19
+ };
20
+ export type AcceptAuthorityInstructionDataArgs = {};
21
+ export declare function getAcceptAuthorityInstructionDataEncoder(): FixedSizeEncoder<AcceptAuthorityInstructionDataArgs>;
22
+ export declare function getAcceptAuthorityInstructionDataDecoder(): FixedSizeDecoder<AcceptAuthorityInstructionData>;
23
+ export declare function getAcceptAuthorityInstructionDataCodec(): FixedSizeCodec<AcceptAuthorityInstructionDataArgs, AcceptAuthorityInstructionData>;
24
+ export type AcceptAuthorityAsyncInput<TAccountNewAuthority extends string = string, TAccountHookState extends string = string> = {
25
+ newAuthority: TransactionSigner<TAccountNewAuthority>;
26
+ hookState?: Address<TAccountHookState>;
27
+ };
28
+ export declare function getAcceptAuthorityInstructionAsync<TAccountNewAuthority extends string, TAccountHookState extends string, TProgramAddress extends Address = typeof FUND_TRANSFER_HOOK_PROGRAM_ADDRESS>(input: AcceptAuthorityAsyncInput<TAccountNewAuthority, TAccountHookState>, config?: {
29
+ programAddress?: TProgramAddress;
30
+ }): Promise<AcceptAuthorityInstruction<TProgramAddress, TAccountNewAuthority, TAccountHookState>>;
31
+ export type AcceptAuthorityInput<TAccountNewAuthority extends string = string, TAccountHookState extends string = string> = {
32
+ newAuthority: TransactionSigner<TAccountNewAuthority>;
33
+ hookState: Address<TAccountHookState>;
34
+ };
35
+ export declare function getAcceptAuthorityInstruction<TAccountNewAuthority extends string, TAccountHookState extends string, TProgramAddress extends Address = typeof FUND_TRANSFER_HOOK_PROGRAM_ADDRESS>(input: AcceptAuthorityInput<TAccountNewAuthority, TAccountHookState>, config?: {
36
+ programAddress?: TProgramAddress;
37
+ }): AcceptAuthorityInstruction<TProgramAddress, TAccountNewAuthority, TAccountHookState>;
38
+ export type ParsedAcceptAuthorityInstruction<TProgram extends string = typeof FUND_TRANSFER_HOOK_PROGRAM_ADDRESS, TAccountMetas extends readonly AccountMeta[] = readonly AccountMeta[]> = {
39
+ programAddress: Address<TProgram>;
40
+ accounts: {
41
+ newAuthority: TAccountMetas[0];
42
+ hookState: TAccountMetas[1];
43
+ };
44
+ data: AcceptAuthorityInstructionData;
45
+ };
46
+ export declare function parseAcceptAuthorityInstruction<TProgram extends string, TAccountMetas extends readonly AccountMeta[]>(instruction: Instruction<TProgram> & InstructionWithAccounts<TAccountMetas> & InstructionWithData<ReadonlyUint8Array>): ParsedAcceptAuthorityInstruction<TProgram, TAccountMetas>;
47
+ //# sourceMappingURL=acceptAuthority.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"acceptAuthority.d.ts","sourceRoot":"","sources":["../../../../../../src/core/solana/generated/fund-transfer-hook/instructions/acceptAuthority.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EASL,KAAK,WAAW,EAChB,KAAK,iBAAiB,EACtB,KAAK,OAAO,EACZ,KAAK,cAAc,EACnB,KAAK,gBAAgB,EACrB,KAAK,gBAAgB,EACrB,KAAK,WAAW,EAChB,KAAK,uBAAuB,EAC5B,KAAK,mBAAmB,EACxB,KAAK,qBAAqB,EAC1B,KAAK,kBAAkB,EACvB,KAAK,iBAAiB,EACtB,KAAK,eAAe,EACrB,MAAM,aAAa,CAAC;AAErB,OAAO,EAAE,kCAAkC,EAAE,MAAM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C,CAAC;AAEF,wBAAgB,+BAA+B,CAC7C,QAAQ,SAAS,MAAM,EACvB,aAAa,SAAS,SAAS,WAAW,EAAE,EAE5C,WAAW,EAAE,WAAW,CAAC,QAAQ,CAAC,GAChC,uBAAuB,CAAC,aAAa,CAAC,GACtC,mBAAmB,CAAC,kBAAkB,CAAC,GACxC,gCAAgC,CAAC,QAAQ,EAAE,aAAa,CAAC,CAgB3D"}
@@ -0,0 +1,88 @@
1
+ /**
2
+ * This code was AUTOGENERATED using the Codama library.
3
+ * Please DO NOT EDIT THIS FILE, instead use visitors
4
+ * to add features, then rerun Codama to update it.
5
+ *
6
+ * @see https://github.com/codama-idl/codama
7
+ */
8
+ import { combineCodec, fixDecoderSize, fixEncoderSize, getBytesDecoder, getBytesEncoder, getStructDecoder, getStructEncoder, transformEncoder, } from "@solana/kit";
9
+ import { findHookStatePda } from "../pdas/index.js";
10
+ import { FUND_TRANSFER_HOOK_PROGRAM_ADDRESS } from "../programs/index.js";
11
+ import { getAccountMetaFactory } from "../shared/index.js";
12
+ export const ACCEPT_AUTHORITY_DISCRIMINATOR = new Uint8Array([
13
+ 107, 86, 198, 91, 33, 12, 107, 160,
14
+ ]);
15
+ export function getAcceptAuthorityDiscriminatorBytes() {
16
+ return fixEncoderSize(getBytesEncoder(), 8).encode(ACCEPT_AUTHORITY_DISCRIMINATOR);
17
+ }
18
+ export function getAcceptAuthorityInstructionDataEncoder() {
19
+ return transformEncoder(getStructEncoder([["discriminator", fixEncoderSize(getBytesEncoder(), 8)]]), (value) => ({ ...value, discriminator: ACCEPT_AUTHORITY_DISCRIMINATOR }));
20
+ }
21
+ export function getAcceptAuthorityInstructionDataDecoder() {
22
+ return getStructDecoder([
23
+ ["discriminator", fixDecoderSize(getBytesDecoder(), 8)],
24
+ ]);
25
+ }
26
+ export function getAcceptAuthorityInstructionDataCodec() {
27
+ return combineCodec(getAcceptAuthorityInstructionDataEncoder(), getAcceptAuthorityInstructionDataDecoder());
28
+ }
29
+ export async function getAcceptAuthorityInstructionAsync(input, config) {
30
+ // Program address.
31
+ const programAddress = config?.programAddress ?? FUND_TRANSFER_HOOK_PROGRAM_ADDRESS;
32
+ // Original accounts.
33
+ const originalAccounts = {
34
+ newAuthority: { value: input.newAuthority ?? null, isWritable: false },
35
+ hookState: { value: input.hookState ?? null, isWritable: true },
36
+ };
37
+ const accounts = originalAccounts;
38
+ // Resolve default values.
39
+ if (!accounts.hookState.value) {
40
+ accounts.hookState.value = await findHookStatePda();
41
+ }
42
+ const getAccountMeta = getAccountMetaFactory(programAddress, "programId");
43
+ return Object.freeze({
44
+ accounts: [
45
+ getAccountMeta(accounts.newAuthority),
46
+ getAccountMeta(accounts.hookState),
47
+ ],
48
+ data: getAcceptAuthorityInstructionDataEncoder().encode({}),
49
+ programAddress,
50
+ });
51
+ }
52
+ export function getAcceptAuthorityInstruction(input, config) {
53
+ // Program address.
54
+ const programAddress = config?.programAddress ?? FUND_TRANSFER_HOOK_PROGRAM_ADDRESS;
55
+ // Original accounts.
56
+ const originalAccounts = {
57
+ newAuthority: { value: input.newAuthority ?? null, isWritable: false },
58
+ hookState: { value: input.hookState ?? null, isWritable: true },
59
+ };
60
+ const accounts = originalAccounts;
61
+ const getAccountMeta = getAccountMetaFactory(programAddress, "programId");
62
+ return Object.freeze({
63
+ accounts: [
64
+ getAccountMeta(accounts.newAuthority),
65
+ getAccountMeta(accounts.hookState),
66
+ ],
67
+ data: getAcceptAuthorityInstructionDataEncoder().encode({}),
68
+ programAddress,
69
+ });
70
+ }
71
+ export function parseAcceptAuthorityInstruction(instruction) {
72
+ if (instruction.accounts.length < 2) {
73
+ // TODO: Coded error.
74
+ throw new Error("Not enough accounts");
75
+ }
76
+ let accountIndex = 0;
77
+ const getNextAccount = () => {
78
+ const accountMeta = instruction.accounts[accountIndex];
79
+ accountIndex += 1;
80
+ return accountMeta;
81
+ };
82
+ return {
83
+ programAddress: instruction.programAddress,
84
+ accounts: { newAuthority: getNextAccount(), hookState: getNextAccount() },
85
+ data: getAcceptAuthorityInstructionDataDecoder().decode(instruction.data),
86
+ };
87
+ }
88
+ //# sourceMappingURL=acceptAuthority.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"acceptAuthority.js","sourceRoot":"","sources":["../../../../../../src/core/solana/generated/fund-transfer-hook/instructions/acceptAuthority.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EACL,YAAY,EACZ,cAAc,EACd,cAAc,EACd,eAAe,EACf,eAAe,EACf,gBAAgB,EAChB,gBAAgB,EAChB,gBAAgB,GAcjB,MAAM,aAAa,CAAC;AACrB,OAAO,EAAE,gBAAgB,EAAE,MAAM,kBAAkB,CAAC;AACpD,OAAO,EAAE,kCAAkC,EAAE,MAAM,sBAAsB,CAAC;AAC1E,OAAO,EAAE,qBAAqB,EAAwB,MAAM,oBAAoB,CAAC;AAEjF,MAAM,CAAC,MAAM,8BAA8B,GAAG,IAAI,UAAU,CAAC;IAC3D,GAAG,EAAE,EAAE,EAAE,GAAG,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,GAAG,EAAE,GAAG;CACnC,CAAC,CAAC;AAEH,MAAM,UAAU,oCAAoC;IAClD,OAAO,cAAc,CAAC,eAAe,EAAE,EAAE,CAAC,CAAC,CAAC,MAAM,CAChD,8BAA8B,CAC/B,CAAC;AACJ,CAAC;AA4BD,MAAM,UAAU,wCAAwC;IACtD,OAAO,gBAAgB,CACrB,gBAAgB,CAAC,CAAC,CAAC,eAAe,EAAE,cAAc,CAAC,eAAe,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,EAC3E,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC,EAAE,GAAG,KAAK,EAAE,aAAa,EAAE,8BAA8B,EAAE,CAAC,CACzE,CAAC;AACJ,CAAC;AAED,MAAM,UAAU,wCAAwC;IACtD,OAAO,gBAAgB,CAAC;QACtB,CAAC,eAAe,EAAE,cAAc,CAAC,eAAe,EAAE,EAAE,CAAC,CAAC,CAAC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OGENERATED using the Codama library.
3
+ * Please DO NOT EDIT THIS FILE, instead use visitors
4
+ * to add features, then rerun Codama to update it.
5
+ *
6
+ * @see https://github.com/codama-idl/codama
7
+ */
8
+ import { type AccountMeta, type Address, type Codec, type Decoder, type Encoder, type Instruction, type InstructionWithAccounts, type InstructionWithData, type ReadonlyUint8Array, type WritableAccount } from "@solana/kit";
9
+ import { FUND_TRANSFER_HOOK_PROGRAM_ADDRESS } from "../programs/index.js";
10
+ export declare const AFTER_ACTION_DISCRIMINATOR: Uint8Array<ArrayBuffer>;
11
+ export declare function getAfterActionDiscriminatorBytes(): ReadonlyUint8Array;
12
+ export type AfterActionInstruction<TProgram extends string = typeof FUND_TRANSFER_HOOK_PROGRAM_ADDRESS, TAccountHookState extends string | AccountMeta<string> = string, TRemainingAccounts extends readonly AccountMeta<string>[] = []> = Instruction<TProgram> & InstructionWithData<ReadonlyUint8Array> & InstructionWithAccounts<[
13
+ TAccountHookState extends string ? WritableAccount<TAccountHookState> : TAccountHookState,
14
+ ...TRemainingAccounts
15
+ ]>;
16
+ export type AfterActionInstructionData = {
17
+ discriminator: ReadonlyUint8Array;
18
+ jobId: bigint;
19
+ action: number;
20
+ optParams: ReadonlyUint8Array;
21
+ };
22
+ export type AfterActionInstructionDataArgs = {
23
+ jobId: number | bigint;
24
+ action: number;
25
+ optParams: ReadonlyUint8Array;
26
+ };
27
+ export declare function getAfterActionInstructionDataEncoder(): Encoder<AfterActionInstructionDataArgs>;
28
+ export declare function getAfterActionInstructionDataDecoder(): Decoder<AfterActionInstructionData>;
29
+ export declare function getAfterActionInstructionDataCodec(): Codec<AfterActionInstructionDataArgs, AfterActionInstructionData>;
30
+ export type AfterActionAsyncInput<TAccountHookState extends string = string> = {
31
+ hookState?: Address<TAccountHookState>;
32
+ jobId: AfterActionInstructionDataArgs["jobId"];
33
+ action: AfterActionInstructionDataArgs["action"];
34
+ optParams: AfterActionInstructionDataArgs["optParams"];
35
+ };
36
+ export declare function getAfterActionInstructionAsync<TAccountHookState extends string, TProgramAddress extends Address = typeof FUND_TRANSFER_HOOK_PROGRAM_ADDRESS>(input: AfterActionAsyncInput<TAccountHookState>, config?: {
37
+ programAddress?: TProgramAddress;
38
+ }): Promise<AfterActionInstruction<TProgramAddress, TAccountHookState>>;
39
+ export type AfterActionInput<TAccountHookState extends string = string> = {
40
+ hookState: Address<TAccountHookState>;
41
+ jobId: AfterActionInstructionDataArgs["jobId"];
42
+ action: AfterActionInstructionDataArgs["action"];
43
+ optParams: AfterActionInstructionDataArgs["optParams"];
44
+ };
45
+ export declare function getAfterActionInstruction<TAccountHookState extends string, TProgramAddress extends Address = typeof FUND_TRANSFER_HOOK_PROGRAM_ADDRESS>(input: AfterActionInput<TAccountHookState>, config?: {
46
+ programAddress?: TProgramAddress;
47
+ }): AfterActionInstruction<TProgramAddress, TAccountHookState>;
48
+ export type ParsedAfterActionInstruction<TProgram extends string = typeof FUND_TRANSFER_HOOK_PROGRAM_ADDRESS, TAccountMetas extends readonly AccountMeta[] = readonly AccountMeta[]> = {
49
+ programAddress: Address<TProgram>;
50
+ accounts: {
51
+ hookState: TAccountMetas[0];
52
+ };
53
+ data: AfterActionInstructionData;
54
+ };
55
+ export declare function parseAfterActionInstruction<TProgram extends string, TAccountMetas extends readonly AccountMeta[]>(instruction: Instruction<TProgram> & InstructionWithAccounts<TAccountMetas> & InstructionWithData<ReadonlyUint8Array>): ParsedAfterActionInstruction<TProgram, TAccountMetas>;
56
+ //# sourceMappingURL=afterAction.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"afterAction.d.ts","sourceRoot":"","sources":["../../../../../../src/core/solana/generated/fund-transfer-hook/instructions/afterAction.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAiBL,KAAK,WAAW,EAChB,KAAK,OAAO,EACZ,KAAK,KAAK,EACV,KAAK,OAAO,EACZ,KAAK,OAAO,EACZ,KAAK,WAAW,EAChB,KAAK,uBAAuB,EAC5B,KAAK,mBAAmB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AAE,aAAa,CAAC,CAAC,CAAC,CAAC;KAC7B,CAAC;IACF,IAAI,EAAE,0BAA0B,CAAC;CAClC,CAAC;AAEF,wBAAgB,2BAA2B,CACzC,QAAQ,SAAS,MAAM,EACvB,aAAa,SAAS,SAAS,WAAW,EAAE,EAE5C,WAAW,EAAE,WAAW,CAAC,QAAQ,CAAC,GAChC,uBAAuB,CAAC,aAAa,CAAC,GACtC,mBAAmB,CAAC,kBAAkB,CAAC,GACxC,4BAA4B,CAAC,QAAQ,EAAE,aAAa,CAAC,CAgBvD"}
@@ -0,0 +1,92 @@
1
+ /**
2
+ * This code was AUTOGENERATED using the Codama library.
3
+ * Please DO NOT EDIT THIS FILE, instead use visitors
4
+ * to add features, then rerun Codama to update it.
5
+ *
6
+ * @see https://github.com/codama-idl/codama
7
+ */
8
+ import { addDecoderSizePrefix, addEncoderSizePrefix, combineCodec, fixDecoderSize, fixEncoderSize, getBytesDecoder, getBytesEncoder, getStructDecoder, getStructEncoder, getU32Decoder, getU32Encoder, getU64Decoder, getU64Encoder, getU8Decoder, getU8Encoder, transformEncoder, } from "@solana/kit";
9
+ import { findHookStatePda } from "../pdas/index.js";
10
+ import { FUND_TRANSFER_HOOK_PROGRAM_ADDRESS } from "../programs/index.js";
11
+ import { getAccountMetaFactory } from "../shared/index.js";
12
+ export const AFTER_ACTION_DISCRIMINATOR = new Uint8Array([
13
+ 100, 247, 61, 195, 161, 140, 250, 73,
14
+ ]);
15
+ export function getAfterActionDiscriminatorBytes() {
16
+ return fixEncoderSize(getBytesEncoder(), 8).encode(AFTER_ACTION_DISCRIMINATOR);
17
+ }
18
+ export function getAfterActionInstructionDataEncoder() {
19
+ return transformEncoder(getStructEncoder([
20
+ ["discriminator", fixEncoderSize(getBytesEncoder(), 8)],
21
+ ["jobId", getU64Encoder()],
22
+ ["action", getU8Encoder()],
23
+ ["optParams", addEncoderSizePrefix(getBytesEncoder(), getU32Encoder())],
24
+ ]), (value) => ({ ...value, discriminator: AFTER_ACTION_DISCRIMINATOR }));
25
+ }
26
+ export function getAfterActionInstructionDataDecoder() {
27
+ return getStructDecoder([
28
+ ["discriminator", fixDecoderSize(getBytesDecoder(), 8)],
29
+ ["jobId", getU64Decoder()],
30
+ ["action", getU8Decoder()],
31
+ ["optParams", addDecoderSizePrefix(getBytesDecoder(), getU32Decoder())],
32
+ ]);
33
+ }
34
+ export function getAfterActionInstructionDataCodec() {
35
+ return combineCodec(getAfterActionInstructionDataEncoder(), getAfterActionInstructionDataDecoder());
36
+ }
37
+ export async function getAfterActionInstructionAsync(input, config) {
38
+ // Program address.
39
+ const programAddress = config?.programAddress ?? FUND_TRANSFER_HOOK_PROGRAM_ADDRESS;
40
+ // Original accounts.
41
+ const originalAccounts = {
42
+ hookState: { value: input.hookState ?? null, isWritable: true },
43
+ };
44
+ const accounts = originalAccounts;
45
+ // Original args.
46
+ const args = { ...input };
47
+ // Resolve default values.
48
+ if (!accounts.hookState.value) {
49
+ accounts.hookState.value = await findHookStatePda();
50
+ }
51
+ const getAccountMeta = getAccountMetaFactory(programAddress, "programId");
52
+ return Object.freeze({
53
+ accounts: [getAccountMeta(accounts.hookState)],
54
+ data: getAfterActionInstructionDataEncoder().encode(args),
55
+ programAddress,
56
+ });
57
+ }
58
+ export function getAfterActionInstruction(input, config) {
59
+ // Program address.
60
+ const programAddress = config?.programAddress ?? FUND_TRANSFER_HOOK_PROGRAM_ADDRESS;
61
+ // Original accounts.
62
+ const originalAccounts = {
63
+ hookState: { value: input.hookState ?? null, isWritable: true },
64
+ };
65
+ const accounts = originalAccounts;
66
+ // Original args.
67
+ const args = { ...input };
68
+ const getAccountMeta = getAccountMetaFactory(programAddress, "programId");
69
+ return Object.freeze({
70
+ accounts: [getAccountMeta(accounts.hookState)],
71
+ data: getAfterActionInstructionDataEncoder().encode(args),
72
+ programAddress,
73
+ });
74
+ }
75
+ export function parseAfterActionInstruction(instruction) {
76
+ if (instruction.accounts.length < 1) {
77
+ // TODO: Coded error.
78
+ throw new Error("Not enough accounts");
79
+ }
80
+ let accountIndex = 0;
81
+ const getNextAccount = () => {
82
+ const accountMeta = instruction.accounts[accountIndex];
83
+ accountIndex += 1;
84
+ return accountMeta;
85
+ };
86
+ return {
87
+ programAddress: instruction.programAddress,
88
+ accounts: { hookState: getNextAccount() },
89
+ data: getAfterActionInstructionDataDecoder().decode(instruction.data),
90
+ };
91
+ }
92
+ //# sourceMappingURL=afterAction.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"afterAction.js","sourceRoot":"","sources":["../../../../../../src/core/solana/generated/fund-transfer-hook/instructions/afterAction.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EACL,oBAAoB,EACpB,oBAAoB,EACpB,YAAY,EACZ,cAAc,EACd,cAAc,EACd,eAAe,EACf,eAAe,EACf,gBAAgB,EAChB,gBAAgB,EAChB,aAAa,EACb,aAAa,EACb,aAAa,EACb,aAAa,EACb,YAAY,EACZ,YAAY,EACZ,gBAAgB,GAWjB,MAAM,aAAa,CAAC;AACrB,OAAO,EAAE,gBAAgB,EAAE,MAAM,kBAAkB,CAAC;AACpD,OAAO,EAAE,kCAAkC,EAAE,MAAM,sBAAsB,CAAC;AAC1E,OAAO,EAAE,qBAAqB,EAAwB,MAAM,oBAAoB,CAAC;AAEjF,MAAM,CAAC,MAAM,0BAA0B,GAAG,IAAI,UAAU,CAAC;IACvD,GAAG,EAAE,GAAG,EAAE,EAAE,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,EAAE;CACrC,CAAC,CAAC;AAEH,MAAM,UAAU,gCAAgC;IAC9C,OAAO,cAAc,CAAC,eAAe,EAAE,EAAE,CAAC,CAAC,CAAC,MAAM,CAChD,0BAA0B,CAC3B,CAAC;AACJ,CAAC;AA8BD,MAAM,UAAU,oCAAoC;IAClD,OAAO,gBAAgB,CACrB,gBAAgB,CAAC;QACf,CAAC,eAAe,EAAE,cAAc,CAAC,eAAe,EAAE,EAAE,CAAC,CAAC,CAA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C,CAAC;IACrB,MAAM,cAAc,GAAG,GAAG,EAAE;QAC1B,MAAM,WAAW,GAAI,WAAW,CAAC,QAA0B,CAAC,YAAY,CAAE,CAAC;QAC3E,YAAY,IAAI,CAAC,CAAC;QAClB,OAAO,WAAW,CAAC;IACrB,CAAC,CAAC;IACF,OAAO;QACL,cAAc,EAAE,WAAW,CAAC,cAAc;QAC1C,QAAQ,EAAE,EAAE,SAAS,EAAE,cAAc,EAAE,EAAE;QACzC,IAAI,EAAE,oCAAoC,EAAE,CAAC,MAAM,CAAC,WAAW,CAAC,IAAI,CAAC;KACtE,CAAC;AACJ,CAAC"}
@@ -0,0 +1,52 @@
1
+ /**
2
+ * This code was AUTOGENERATED using the Codama library.
3
+ * Please DO NOT EDIT THIS FILE, instead use visitors
4
+ * to add features, then rerun Codama to update it.
5
+ *
6
+ * @see https://github.com/codama-idl/codama
7
+ */
8
+ import { type AccountMeta, type Address, type FixedSizeCodec, type FixedSizeDecoder, type FixedSizeEncoder, type Instruction, type InstructionWithAccounts, type InstructionWithData, type ReadonlyAccount, type ReadonlyUint8Array } from "@solana/kit";
9
+ import { FUND_TRANSFER_HOOK_PROGRAM_ADDRESS } from "../programs/index.js";
10
+ export declare const BEFORE_ACTION_DISCRIMINATOR: Uint8Array<ArrayBuffer>;
11
+ export declare function getBeforeActionDiscriminatorBytes(): ReadonlyUint8Array;
12
+ export type BeforeActionInstruction<TProgram extends string = typeof FUND_TRANSFER_HOOK_PROGRAM_ADDRESS, TAccountHookState extends string | AccountMeta<string> = string, TRemainingAccounts extends readonly AccountMeta<string>[] = []> = Instruction<TProgram> & InstructionWithData<ReadonlyUint8Array> & InstructionWithAccounts<[
13
+ TAccountHookState extends string ? ReadonlyAccount<TAccountHookState> : TAccountHookState,
14
+ ...TRemainingAccounts
15
+ ]>;
16
+ export type BeforeActionInstructionData = {
17
+ discriminator: ReadonlyUint8Array;
18
+ jobId: bigint;
19
+ action: number;
20
+ };
21
+ export type BeforeActionInstructionDataArgs = {
22
+ jobId: number | bigint;
23
+ action: number;
24
+ };
25
+ export declare function getBeforeActionInstructionDataEncoder(): FixedSizeEncoder<BeforeActionInstructionDataArgs>;
26
+ export declare function getBeforeActionInstructionDataDecoder(): FixedSizeDecoder<BeforeActionInstructionData>;
27
+ export declare function getBeforeActionInstructionDataCodec(): FixedSizeCodec<BeforeActionInstructionDataArgs, BeforeActionInstructionData>;
28
+ export type BeforeActionAsyncInput<TAccountHookState extends string = string> = {
29
+ hookState?: Address<TAccountHookState>;
30
+ jobId: BeforeActionInstructionDataArgs["jobId"];
31
+ action: BeforeActionInstructionDataArgs["action"];
32
+ };
33
+ export declare function getBeforeActionInstructionAsync<TAccountHookState extends string, TProgramAddress extends Address = typeof FUND_TRANSFER_HOOK_PROGRAM_ADDRESS>(input: BeforeActionAsyncInput<TAccountHookState>, config?: {
34
+ programAddress?: TProgramAddress;
35
+ }): Promise<BeforeActionInstruction<TProgramAddress, TAccountHookState>>;
36
+ export type BeforeActionInput<TAccountHookState extends string = string> = {
37
+ hookState: Address<TAccountHookState>;
38
+ jobId: BeforeActionInstructionDataArgs["jobId"];
39
+ action: BeforeActionInstructionDataArgs["action"];
40
+ };
41
+ export declare function getBeforeActionInstruction<TAccountHookState extends string, TProgramAddress extends Address = typeof FUND_TRANSFER_HOOK_PROGRAM_ADDRESS>(input: BeforeActionInput<TAccountHookState>, config?: {
42
+ programAddress?: TProgramAddress;
43
+ }): BeforeActionInstruction<TProgramAddress, TAccountHookState>;
44
+ export type ParsedBeforeActionInstruction<TProgram extends string = typeof FUND_TRANSFER_HOOK_PROGRAM_ADDRESS, TAccountMetas extends readonly AccountMeta[] = readonly AccountMeta[]> = {
45
+ programAddress: Address<TProgram>;
46
+ accounts: {
47
+ hookState: TAccountMetas[0];
48
+ };
49
+ data: BeforeActionInstructionData;
50
+ };
51
+ export declare function parseBeforeActionInstruction<TProgram extends string, TAccountMetas extends readonly AccountMeta[]>(instruction: Instruction<TProgram> & InstructionWithAccounts<TAccountMetas> & InstructionWithData<ReadonlyUint8Array>): ParsedBeforeActionInstruction<TProgram, TAccountMetas>;
52
+ //# sourceMappingURL=beforeAction.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"beforeAction.d.ts","sourceRoot":"","sources":["../../../../../../src/core/solana/generated/fund-transfer-hook/instructions/beforeAction.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAaL,KAAK,WAAW,EAChB,KAAK,OAAO,EACZ,KAAK,cAAc,EACnB,KAAK,gBAAgB,EACrB,KAAK,gBAAgB,EACrB,KAAK,WAAW,EAChB,KAAK,uBAAuB,EAC5B,KAAK,mBAAmB,EACxB,KAAK,eAAe,EACpB,KAAK,kBAAkB,EACxB,MAAM,aAAa,CAAC;AAErB,OAAO,EAAE,kCAAkC,EAAE,MAAM,sBAAsB,CAAC;AAG1E,eAAO,MAAM,2BAA2B,yBAEtC,CAAC;AAEH,wBAAgB,iCAAiC,uBAIhD;AAED,MAAM,MAAM,uBAAuB,CACjC,QAAQ,SAAS,MAAM,GAAG,OAAO,kCAAkC,EACnE,iBAAiB,SAAS,MAAM,GAAG,WAAW,CAAC,MAAM,CAAC,GAAG,MAAM,EAC/D,kBAAkB,SAAS,SAAS,WAAW,CAAC,MAAM,CAAC,EAAE,GAAG,EAAE,IAC5D,WAAW,CAAC,QAAQ,CAAC,GACvB,mBAAmB,CAAC,kBAAkB,CAAC,GACvC,uBAAuB,CACrB;IACE,iBAAiB,SAAS,MAAM,GAC5B,eAAe,CAAC,iBAAiB,CAAC,GAClC,iBAAiB;IACrB,GAAG,kBAAkB;CACtB,CACF,CAAC;AAEJ,MAAM,MAAM,2BAA2B,GAAG;IACxC,aAAa,EAAE,kBAAkB,CAAC;IAClC,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;CAChB,CAAC;AAEF,MAAM,MAAM,+BAA+B,GAAG;IAC5C,KAAK,EAAE,MAAM,GAAG,MAAM,CAAC;IACvB,MAAM,EAAE,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BAAiB,CAAC,CAyB7D;AAED,MAAM,MAAM,6BAA6B,CACvC,QAAQ,SAAS,MAAM,GAAG,OAAO,kCAAkC,EACnE,aAAa,SAAS,SAAS,WAAW,EAAE,GAAG,SAAS,WAAW,EAAE,IACnE;IACF,cAAc,EAAE,OAAO,CAAC,QAAQ,CAAC,CAAC;IAClC,QAAQ,EAAE;QACR,SAAS,EAAE,aAAa,CAAC,CAAC,CAAC,CAAC;KAC7B,CAAC;IACF,IAAI,EAAE,2BAA2B,CAAC;CACnC,CAAC;AAEF,wBAAgB,4BAA4B,CAC1C,QAAQ,SAAS,MAAM,EACvB,aAAa,SAAS,SAAS,WAAW,EAAE,EAE5C,WAAW,EAAE,WAAW,CAAC,QAAQ,CAAC,GAChC,uBAAuB,CAAC,aAAa,CAAC,GACtC,mBAAmB,CAAC,kBAAkB,CAAC,GACxC,6BAA6B,CAAC,QAAQ,EAAE,aAAa,CAAC,CAgBxD"}
@@ -0,0 +1,90 @@
1
+ /**
2
+ * This code was AUTOGENERATED using the Codama library.
3
+ * Please DO NOT EDIT THIS FILE, instead use visitors
4
+ * to add features, then rerun Codama to update it.
5
+ *
6
+ * @see https://github.com/codama-idl/codama
7
+ */
8
+ import { combineCodec, fixDecoderSize, fixEncoderSize, getBytesDecoder, getBytesEncoder, getStructDecoder, getStructEncoder, getU64Decoder, getU64Encoder, getU8Decoder, getU8Encoder, transformEncoder, } from "@solana/kit";
9
+ import { findHookStatePda } from "../pdas/index.js";
10
+ import { FUND_TRANSFER_HOOK_PROGRAM_ADDRESS } from "../programs/index.js";
11
+ import { getAccountMetaFactory } from "../shared/index.js";
12
+ export const BEFORE_ACTION_DISCRIMINATOR = new Uint8Array([
13
+ 5, 61, 71, 243, 197, 108, 160, 137,
14
+ ]);
15
+ export function getBeforeActionDiscriminatorBytes() {
16
+ return fixEncoderSize(getBytesEncoder(), 8).encode(BEFORE_ACTION_DISCRIMINATOR);
17
+ }
18
+ export function getBeforeActionInstructionDataEncoder() {
19
+ return transformEncoder(getStructEncoder([
20
+ ["discriminator", fixEncoderSize(getBytesEncoder(), 8)],
21
+ ["jobId", getU64Encoder()],
22
+ ["action", getU8Encoder()],
23
+ ]), (value) => ({ ...value, discriminator: BEFORE_ACTION_DISCRIMINATOR }));
24
+ }
25
+ export function getBeforeActionInstructionDataDecoder() {
26
+ return getStructDecoder([
27
+ ["discriminator", fixDecoderSize(getBytesDecoder(), 8)],
28
+ ["jobId", getU64Decoder()],
29
+ ["action", getU8Decoder()],
30
+ ]);
31
+ }
32
+ export function getBeforeActionInstructionDataCodec() {
33
+ return combineCodec(getBeforeActionInstructionDataEncoder(), getBeforeActionInstructionDataDecoder());
34
+ }
35
+ export async function getBeforeActionInstructionAsync(input, config) {
36
+ // Program address.
37
+ const programAddress = config?.programAddress ?? FUND_TRANSFER_HOOK_PROGRAM_ADDRESS;
38
+ // Original accounts.
39
+ const originalAccounts = {
40
+ hookState: { value: input.hookState ?? null, isWritable: false },
41
+ };
42
+ const accounts = originalAccounts;
43
+ // Original args.
44
+ const args = { ...input };
45
+ // Resolve default values.
46
+ if (!accounts.hookState.value) {
47
+ accounts.hookState.value = await findHookStatePda();
48
+ }
49
+ const getAccountMeta = getAccountMetaFactory(programAddress, "programId");
50
+ return Object.freeze({
51
+ accounts: [getAccountMeta(accounts.hookState)],
52
+ data: getBeforeActionInstructionDataEncoder().encode(args),
53
+ programAddress,
54
+ });
55
+ }
56
+ export function getBeforeActionInstruction(input, config) {
57
+ // Program address.
58
+ const programAddress = config?.programAddress ?? FUND_TRANSFER_HOOK_PROGRAM_ADDRESS;
59
+ // Original accounts.
60
+ const originalAccounts = {
61
+ hookState: { value: input.hookState ?? null, isWritable: false },
62
+ };
63
+ const accounts = originalAccounts;
64
+ // Original args.
65
+ const args = { ...input };
66
+ const getAccountMeta = getAccountMetaFactory(programAddress, "programId");
67
+ return Object.freeze({
68
+ accounts: [getAccountMeta(accounts.hookState)],
69
+ data: getBeforeActionInstructionDataEncoder().encode(args),
70
+ programAddress,
71
+ });
72
+ }
73
+ export function parseBeforeActionInstruction(instruction) {
74
+ if (instruction.accounts.length < 1) {
75
+ // TODO: Coded error.
76
+ throw new Error("Not enough accounts");
77
+ }
78
+ let accountIndex = 0;
79
+ const getNextAccount = () => {
80
+ const accountMeta = instruction.accounts[accountIndex];
81
+ accountIndex += 1;
82
+ return accountMeta;
83
+ };
84
+ return {
85
+ programAddress: instruction.programAddress,
86
+ accounts: { hookState: getNextAccount() },
87
+ data: getBeforeActionInstructionDataDecoder().decode(instruction.data),
88
+ };
89
+ }
90
+ //# sourceMappingURL=beforeAction.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"beforeAction.js","sourceRoot":"","sources":["../../../../../../src/core/solana/generated/fund-transfer-hook/instructions/beforeAction.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EACL,YAAY,EACZ,cAAc,EACd,cAAc,EACd,eAAe,EACf,eAAe,EACf,gBAAgB,EAChB,gBAAgB,EAChB,aAAa,EACb,aAAa,EACb,YAAY,EACZ,YAAY,EACZ,gBAAgB,GAWjB,MAAM,aAAa,CAAC;AACrB,OAAO,EAAE,gBAAgB,EAAE,MAAM,kBAAkB,CAAC;AACpD,OAAO,EAAE,kCAAkC,EAAE,MAAM,sBAAsB,CAAC;AAC1E,OAAO,EAAE,qBAAqB,EAAwB,MAAM,oBAAoB,CAAC;AAEjF,MAAM,CAAC,MAAM,2BAA2B,GAAG,IAAI,UAAU,CAAC;IACxD,CAAC,EAAE,EAAE,EAAE,EAAE,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG;CACnC,CAAC,CAAC;AAEH,MAAM,UAAU,iCAAiC;IAC/C,OAAO,cAAc,CAAC,eAAe,EAAE,EAAE,CAAC,CAAC,CAAC,MAAM,CAChD,2BAA2B,CAC5B,CAAC;AACJ,CAAC;AA4BD,MAAM,UAAU,qCAAqC;IACnD,OAAO,gBAAgB,CACrB,gBAAgB,CAAC;QACf,CA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AE,CAAC;QAC3E,YAAY,IAAI,CAAC,CAAC;QAClB,OAAO,WAAW,CAAC;IACrB,CAAC,CAAC;IACF,OAAO;QACL,cAAc,EAAE,WAAW,CAAC,cAAc;QAC1C,QAAQ,EAAE,EAAE,SAAS,EAAE,cAAc,EAAE,EAAE;QACzC,IAAI,EAAE,qCAAqC,EAAE,CAAC,MAAM,CAAC,WAAW,CAAC,IAAI,CAAC;KACvE,CAAC;AACJ,CAAC"}
@@ -0,0 +1,86 @@
1
+ /**
2
+ * This code was AUTOGENERATED using the Codama library.
3
+ * Please DO NOT EDIT THIS FILE, instead use visitors
4
+ * to add features, then rerun Codama to update it.
5
+ *
6
+ * @see https://github.com/codama-idl/codama
7
+ */
8
+ import { type AccountMeta, type AccountSignerMeta, type Address, type FixedSizeCodec, type FixedSizeDecoder, type FixedSizeEncoder, type Instruction, type InstructionWithAccounts, type InstructionWithData, type ReadonlyAccount, type ReadonlySignerAccount, type ReadonlyUint8Array, type TransactionSigner, type WritableAccount } from "@solana/kit";
9
+ import { FUND_TRANSFER_HOOK_PROGRAM_ADDRESS } from "../programs/index.js";
10
+ export declare const CLAIM_ESCROW_REFUND_DISCRIMINATOR: Uint8Array<ArrayBuffer>;
11
+ export declare function getClaimEscrowRefundDiscriminatorBytes(): ReadonlyUint8Array;
12
+ export type ClaimEscrowRefundInstruction<TProgram extends string = typeof FUND_TRANSFER_HOOK_PROGRAM_ADDRESS, TAccountCaller extends string | AccountMeta<string> = string, TAccountHookState extends string | AccountMeta<string> = string, TAccountJobAccount extends string | AccountMeta<string> = string, TAccountProviderEscrowIntentId extends string | AccountMeta<string> = string, TAccountIntent extends string | AccountMeta<string> = string, TAccountEscrowVault extends string | AccountMeta<string> = string, TAccountProviderTokenAccount extends string | AccountMeta<string> = string, TAccountEscrowAuthority extends string | AccountMeta<string> = string, TAccountTokenProgram extends string | AccountMeta<string> = "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA", TRemainingAccounts extends readonly AccountMeta<string>[] = []> = Instruction<TProgram> & InstructionWithData<ReadonlyUint8Array> & InstructionWithAccounts<[
13
+ TAccountCaller extends string ? ReadonlySignerAccount<TAccountCaller> & AccountSignerMeta<TAccountCaller> : TAccountCaller,
14
+ TAccountHookState extends string ? ReadonlyAccount<TAccountHookState> : TAccountHookState,
15
+ TAccountJobAccount extends string ? ReadonlyAccount<TAccountJobAccount> : TAccountJobAccount,
16
+ TAccountProviderEscrowIntentId extends string ? ReadonlyAccount<TAccountProviderEscrowIntentId> : TAccountProviderEscrowIntentId,
17
+ TAccountIntent extends string ? WritableAccount<TAccountIntent> : TAccountIntent,
18
+ TAccountEscrowVault extends string ? WritableAccount<TAccountEscrowVault> : TAccountEscrowVault,
19
+ TAccountProviderTokenAccount extends string ? WritableAccount<TAccountProviderTokenAccount> : TAccountProviderTokenAccount,
20
+ TAccountEscrowAuthority extends string ? ReadonlyAccount<TAccountEscrowAuthority> : TAccountEscrowAuthority,
21
+ TAccountTokenProgram extends string ? ReadonlyAccount<TAccountTokenProgram> : TAccountTokenProgram,
22
+ ...TRemainingAccounts
23
+ ]>;
24
+ export type ClaimEscrowRefundInstructionData = {
25
+ discriminator: ReadonlyUint8Array;
26
+ jobId: bigint;
27
+ };
28
+ export type ClaimEscrowRefundInstructionDataArgs = {
29
+ jobId: number | bigint;
30
+ };
31
+ export declare function getClaimEscrowRefundInstructionDataEncoder(): FixedSizeEncoder<ClaimEscrowRefundInstructionDataArgs>;
32
+ export declare function getClaimEscrowRefundInstructionDataDecoder(): FixedSizeDecoder<ClaimEscrowRefundInstructionData>;
33
+ export declare function getClaimEscrowRefundInstructionDataCodec(): FixedSizeCodec<ClaimEscrowRefundInstructionDataArgs, ClaimEscrowRefundInstructionData>;
34
+ export type ClaimEscrowRefundAsyncInput<TAccountCaller extends string = string, TAccountHookState extends string = string, TAccountJobAccount extends string = string, TAccountProviderEscrowIntentId extends string = string, TAccountIntent extends string = string, TAccountEscrowVault extends string = string, TAccountProviderTokenAccount extends string = string, TAccountEscrowAuthority extends string = string, TAccountTokenProgram extends string = string> = {
35
+ caller: TransactionSigner<TAccountCaller>;
36
+ hookState?: Address<TAccountHookState>;
37
+ jobAccount: Address<TAccountJobAccount>;
38
+ providerEscrowIntentId?: Address<TAccountProviderEscrowIntentId>;
39
+ intent: Address<TAccountIntent>;
40
+ /** Escrow vault holding the escrowed tokens */
41
+ escrowVault: Address<TAccountEscrowVault>;
42
+ /** Provider's token account to receive refund */
43
+ providerTokenAccount: Address<TAccountProviderTokenAccount>;
44
+ escrowAuthority?: Address<TAccountEscrowAuthority>;
45
+ tokenProgram?: Address<TAccountTokenProgram>;
46
+ jobId: ClaimEscrowRefundInstructionDataArgs["jobId"];
47
+ };
48
+ export declare function getClaimEscrowRefundInstructionAsync<TAccountCaller extends string, TAccountHookState extends string, TAccountJobAccount extends string, TAccountProviderEscrowIntentId extends string, TAccountIntent extends string, TAccountEscrowVault extends string, TAccountProviderTokenAccount extends string, TAccountEscrowAuthority extends string, TAccountTokenProgram extends string, TProgramAddress extends Address = typeof FUND_TRANSFER_HOOK_PROGRAM_ADDRESS>(input: ClaimEscrowRefundAsyncInput<TAccountCaller, TAccountHookState, TAccountJobAccount, TAccountProviderEscrowIntentId, TAccountIntent, TAccountEscrowVault, TAccountProviderTokenAccount, TAccountEscrowAuthority, TAccountTokenProgram>, config?: {
49
+ programAddress?: TProgramAddress;
50
+ }): Promise<ClaimEscrowRefundInstruction<TProgramAddress, TAccountCaller, TAccountHookState, TAccountJobAccount, TAccountProviderEscrowIntentId, TAccountIntent, TAccountEscrowVault, TAccountProviderTokenAccount, TAccountEscrowAuthority, TAccountTokenProgram>>;
51
+ export type ClaimEscrowRefundInput<TAccountCaller extends string = string, TAccountHookState extends string = string, TAccountJobAccount extends string = string, TAccountProviderEscrowIntentId extends string = string, TAccountIntent extends string = string, TAccountEscrowVault extends string = string, TAccountProviderTokenAccount extends string = string, TAccountEscrowAuthority extends string = string, TAccountTokenProgram extends string = string> = {
52
+ caller: TransactionSigner<TAccountCaller>;
53
+ hookState: Address<TAccountHookState>;
54
+ jobAccount: Address<TAccountJobAccount>;
55
+ providerEscrowIntentId: Address<TAccountProviderEscrowIntentId>;
56
+ intent: Address<TAccountIntent>;
57
+ /** Escrow vault holding the escrowed tokens */
58
+ escrowVault: Address<TAccountEscrowVault>;
59
+ /** Provider's token account to receive refund */
60
+ providerTokenAccount: Address<TAccountProviderTokenAccount>;
61
+ escrowAuthority: Address<TAccountEscrowAuthority>;
62
+ tokenProgram?: Address<TAccountTokenProgram>;
63
+ jobId: ClaimEscrowRefundInstructionDataArgs["jobId"];
64
+ };
65
+ export declare function getClaimEscrowRefundInstruction<TAccountCaller extends string, TAccountHookState extends string, TAccountJobAccount extends string, TAccountProviderEscrowIntentId extends string, TAccountIntent extends string, TAccountEscrowVault extends string, TAccountProviderTokenAccount extends string, TAccountEscrowAuthority extends string, TAccountTokenProgram extends string, TProgramAddress extends Address = typeof FUND_TRANSFER_HOOK_PROGRAM_ADDRESS>(input: ClaimEscrowRefundInput<TAccountCaller, TAccountHookState, TAccountJobAccount, TAccountProviderEscrowIntentId, TAccountIntent, TAccountEscrowVault, TAccountProviderTokenAccount, TAccountEscrowAuthority, TAccountTokenProgram>, config?: {
66
+ programAddress?: TProgramAddress;
67
+ }): ClaimEscrowRefundInstruction<TProgramAddress, TAccountCaller, TAccountHookState, TAccountJobAccount, TAccountProviderEscrowIntentId, TAccountIntent, TAccountEscrowVault, TAccountProviderTokenAccount, TAccountEscrowAuthority, TAccountTokenProgram>;
68
+ export type ParsedClaimEscrowRefundInstruction<TProgram extends string = typeof FUND_TRANSFER_HOOK_PROGRAM_ADDRESS, TAccountMetas extends readonly AccountMeta[] = readonly AccountMeta[]> = {
69
+ programAddress: Address<TProgram>;
70
+ accounts: {
71
+ caller: TAccountMetas[0];
72
+ hookState: TAccountMetas[1];
73
+ jobAccount: TAccountMetas[2];
74
+ providerEscrowIntentId: TAccountMetas[3];
75
+ intent: TAccountMetas[4];
76
+ /** Escrow vault holding the escrowed tokens */
77
+ escrowVault: TAccountMetas[5];
78
+ /** Provider's token account to receive refund */
79
+ providerTokenAccount: TAccountMetas[6];
80
+ escrowAuthority: TAccountMetas[7];
81
+ tokenProgram: TAccountMetas[8];
82
+ };
83
+ data: ClaimEscrowRefundInstructionData;
84
+ };
85
+ export declare function parseClaimEscrowRefundInstruction<TProgram extends string, TAccountMetas extends readonly AccountMeta[]>(instruction: Instruction<TProgram> & InstructionWithAccounts<TAccountMetas> & InstructionWithData<ReadonlyUint8Array>): ParsedClaimEscrowRefundInstruction<TProgram, TAccountMetas>;
86
+ //# sourceMappingURL=claimEscrowRefund.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"claimEscrowRefund.d.ts","sourceRoot":"","sources":["../../../../../../src/core/solana/generated/fund-transfer-hook/instructions/claimEscrowRefund.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAWL,KAAK,WAAW,EAChB,KAAK,iBAAiB,EACtB,KAAK,OAAO,EACZ,KAAK,cAAc,EACnB,KAAK,gBAAgB,EACrB,KAAK,gBAAgB,EACrB,KAAK,WAAW,EAChB,KAAK,uBAAuB,EAC5B,KAAK,mBAAmB,EACxB,KAAK,eAAe,EACpB,KAAK,qBAAqB,EAC1B,KAAK,kBAAkB,EACvB,KAAK,iBAAiB,EACtB,KAAK,eAAe,EACrB,MAAM,aAAa,CAAC;AAMrB,OAAO,EAAE,kCAAkC,EAAE,MAAM,sBAAsB,CAAC;AAO1E,eAAO,MAAM,iCAAiC,yBAE5C,CAAC;AAEH,wBAAgB,sCAAsC,uBAIrD;AAED,MAAM,MAAM,4BAA4B,CACtC,QAAQ,SAAS,MAAM,GAAG,OAAO,kCAAkC,EACnE,cAAc,SAAS,MAAM,GAAG,WAAW,CAAC,MAAM,CAAC,GAAG,MAAM,EAC5D,iBAAiB,SAAS,MAAM,GAAG,WAAW,CAAC,MAAM,CAAC,GAAG,MAAM,EAC/D,kBAAkB,SAAS,MA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