@virtuals-protocol/acp-node-v2 0.1.2 → 0.1.4

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 (303) hide show
  1. package/README.md +9 -20
  2. package/dist/acpAgent.d.ts +2 -2
  3. package/dist/acpAgent.d.ts.map +1 -1
  4. package/dist/acpAgent.js +6 -6
  5. package/dist/acpAgent.js.map +1 -1
  6. package/dist/clientFactory.d.ts +1 -2
  7. package/dist/clientFactory.d.ts.map +1 -1
  8. package/dist/clientFactory.js +1 -5
  9. package/dist/clientFactory.js.map +1 -1
  10. package/dist/core/agentAuth.d.ts +22 -0
  11. package/dist/core/agentAuth.d.ts.map +1 -0
  12. package/dist/core/agentAuth.js +27 -0
  13. package/dist/core/agentAuth.js.map +1 -0
  14. package/dist/core/approvalGate.d.ts +28 -0
  15. package/dist/core/approvalGate.d.ts.map +1 -0
  16. package/dist/core/approvalGate.js +63 -0
  17. package/dist/core/approvalGate.js.map +1 -0
  18. package/dist/core/chains.d.ts +1 -0
  19. package/dist/core/chains.d.ts.map +1 -1
  20. package/dist/core/chains.js +12 -1
  21. package/dist/core/chains.js.map +1 -1
  22. package/dist/core/constants.d.ts +6 -0
  23. package/dist/core/constants.d.ts.map +1 -1
  24. package/dist/core/constants.js +18 -0
  25. package/dist/core/constants.js.map +1 -1
  26. package/dist/core/solana/constants.d.ts +5 -0
  27. package/dist/core/solana/constants.d.ts.map +1 -0
  28. package/dist/core/solana/constants.js +5 -0
  29. package/dist/core/solana/constants.js.map +1 -0
  30. package/dist/core/solana/generated/acp/accounts/acpState.d.ts +60 -0
  31. package/dist/core/solana/generated/acp/accounts/acpState.d.ts.map +1 -0
  32. package/dist/core/solana/generated/acp/accounts/acpState.js +68 -0
  33. package/dist/core/solana/generated/acp/accounts/acpState.js.map +1 -0
  34. package/dist/core/solana/generated/acp/accounts/hookWhitelist.d.ts +37 -0
  35. package/dist/core/solana/generated/acp/accounts/hookWhitelist.d.ts.map +1 -0
  36. package/dist/core/solana/generated/acp/accounts/hookWhitelist.js +59 -0
  37. package/dist/core/solana/generated/acp/accounts/hookWhitelist.js.map +1 -0
  38. package/dist/core/solana/generated/acp/accounts/index.d.ts +11 -0
  39. package/dist/core/solana/generated/acp/accounts/index.d.ts.map +1 -0
  40. package/dist/core/solana/generated/acp/accounts/index.js +11 -0
  41. package/dist/core/solana/generated/acp/accounts/index.js.map +1 -0
  42. package/dist/core/solana/generated/acp/accounts/job.d.ts +89 -0
  43. package/dist/core/solana/generated/acp/accounts/job.d.ts.map +1 -0
  44. package/dist/core/solana/generated/acp/accounts/job.js +83 -0
  45. package/dist/core/solana/generated/acp/accounts/job.js.map +1 -0
  46. package/dist/core/solana/generated/acp/errors/agenticCommerceV3.d.ts +94 -0
  47. package/dist/core/solana/generated/acp/errors/agenticCommerceV3.d.ts.map +1 -0
  48. package/dist/core/solana/generated/acp/errors/agenticCommerceV3.js +135 -0
  49. package/dist/core/solana/generated/acp/errors/agenticCommerceV3.js.map +1 -0
  50. package/dist/core/solana/generated/acp/errors/index.d.ts +9 -0
  51. package/dist/core/solana/generated/acp/errors/index.d.ts.map +1 -0
  52. package/dist/core/solana/generated/acp/errors/index.js +9 -0
  53. package/dist/core/solana/generated/acp/errors/index.js.map +1 -0
  54. package/dist/core/solana/generated/acp/index.d.ts +14 -0
  55. package/dist/core/solana/generated/acp/index.d.ts.map +1 -0
  56. package/dist/core/solana/generated/acp/index.js +14 -0
  57. package/dist/core/solana/generated/acp/index.js.map +1 -0
  58. package/dist/core/solana/generated/acp/instructions/acceptAuthority.d.ts +47 -0
  59. package/dist/core/solana/generated/acp/instructions/acceptAuthority.d.ts.map +1 -0
  60. package/dist/core/solana/generated/acp/instructions/acceptAuthority.js +88 -0
  61. package/dist/core/solana/generated/acp/instructions/acceptAuthority.js.map +1 -0
  62. package/dist/core/solana/generated/acp/instructions/addHookWhitelist.d.ts +64 -0
  63. package/dist/core/solana/generated/acp/instructions/addHookWhitelist.d.ts.map +1 -0
  64. package/dist/core/solana/generated/acp/instructions/addHookWhitelist.js +140 -0
  65. package/dist/core/solana/generated/acp/instructions/addHookWhitelist.js.map +1 -0
  66. package/dist/core/solana/generated/acp/instructions/claimRefund.d.ts +74 -0
  67. package/dist/core/solana/generated/acp/instructions/claimRefund.d.ts.map +1 -0
  68. package/dist/core/solana/generated/acp/instructions/claimRefund.js +142 -0
  69. package/dist/core/solana/generated/acp/instructions/claimRefund.js.map +1 -0
  70. package/dist/core/solana/generated/acp/instructions/complete.d.ts +108 -0
  71. package/dist/core/solana/generated/acp/instructions/complete.d.ts.map +1 -0
  72. package/dist/core/solana/generated/acp/instructions/complete.js +190 -0
  73. package/dist/core/solana/generated/acp/instructions/complete.js.map +1 -0
  74. package/dist/core/solana/generated/acp/instructions/createJob.d.ts +83 -0
  75. package/dist/core/solana/generated/acp/instructions/createJob.d.ts.map +1 -0
  76. package/dist/core/solana/generated/acp/instructions/createJob.js +137 -0
  77. package/dist/core/solana/generated/acp/instructions/createJob.js.map +1 -0
  78. package/dist/core/solana/generated/acp/instructions/fund.d.ts +99 -0
  79. package/dist/core/solana/generated/acp/instructions/fund.d.ts.map +1 -0
  80. package/dist/core/solana/generated/acp/instructions/fund.js +126 -0
  81. package/dist/core/solana/generated/acp/instructions/fund.js.map +1 -0
  82. package/dist/core/solana/generated/acp/instructions/index.d.ts +23 -0
  83. package/dist/core/solana/generated/acp/instructions/index.d.ts.map +1 -0
  84. package/dist/core/solana/generated/acp/instructions/index.js +23 -0
  85. package/dist/core/solana/generated/acp/instructions/index.js.map +1 -0
  86. package/dist/core/solana/generated/acp/instructions/initialize.d.ts +76 -0
  87. package/dist/core/solana/generated/acp/instructions/initialize.d.ts.map +1 -0
  88. package/dist/core/solana/generated/acp/instructions/initialize.js +141 -0
  89. package/dist/core/solana/generated/acp/instructions/initialize.js.map +1 -0
  90. package/dist/core/solana/generated/acp/instructions/nominateAuthority.d.ts +52 -0
  91. package/dist/core/solana/generated/acp/instructions/nominateAuthority.d.ts.map +1 -0
  92. package/dist/core/solana/generated/acp/instructions/nominateAuthority.js +96 -0
  93. package/dist/core/solana/generated/acp/instructions/nominateAuthority.js.map +1 -0
  94. package/dist/core/solana/generated/acp/instructions/reject.d.ts +88 -0
  95. package/dist/core/solana/generated/acp/instructions/reject.d.ts.map +1 -0
  96. package/dist/core/solana/generated/acp/instructions/reject.js +168 -0
  97. package/dist/core/solana/generated/acp/instructions/reject.js.map +1 -0
  98. package/dist/core/solana/generated/acp/instructions/removeHookWhitelist.d.ts +56 -0
  99. package/dist/core/solana/generated/acp/instructions/removeHookWhitelist.d.ts.map +1 -0
  100. package/dist/core/solana/generated/acp/instructions/removeHookWhitelist.js +112 -0
  101. package/dist/core/solana/generated/acp/instructions/removeHookWhitelist.js.map +1 -0
  102. package/dist/core/solana/generated/acp/instructions/setBudget.d.ts +56 -0
  103. package/dist/core/solana/generated/acp/instructions/setBudget.d.ts.map +1 -0
  104. package/dist/core/solana/generated/acp/instructions/setBudget.js +90 -0
  105. package/dist/core/solana/generated/acp/instructions/setBudget.js.map +1 -0
  106. package/dist/core/solana/generated/acp/instructions/setEvaluatorFee.d.ts +52 -0
  107. package/dist/core/solana/generated/acp/instructions/setEvaluatorFee.d.ts.map +1 -0
  108. package/dist/core/solana/generated/acp/instructions/setEvaluatorFee.js +96 -0
  109. package/dist/core/solana/generated/acp/instructions/setEvaluatorFee.js.map +1 -0
  110. package/dist/core/solana/generated/acp/instructions/setPlatformFee.d.ts +56 -0
  111. package/dist/core/solana/generated/acp/instructions/setPlatformFee.d.ts.map +1 -0
  112. package/dist/core/solana/generated/acp/instructions/setPlatformFee.js +98 -0
  113. package/dist/core/solana/generated/acp/instructions/setPlatformFee.js.map +1 -0
  114. package/dist/core/solana/generated/acp/instructions/setProvider.d.ts +50 -0
  115. package/dist/core/solana/generated/acp/instructions/setProvider.d.ts.map +1 -0
  116. package/dist/core/solana/generated/acp/instructions/setProvider.js +85 -0
  117. package/dist/core/solana/generated/acp/instructions/setProvider.js.map +1 -0
  118. package/dist/core/solana/generated/acp/instructions/submit.d.ts +150 -0
  119. package/dist/core/solana/generated/acp/instructions/submit.d.ts.map +1 -0
  120. package/dist/core/solana/generated/acp/instructions/submit.js +214 -0
  121. package/dist/core/solana/generated/acp/instructions/submit.js.map +1 -0
  122. package/dist/core/solana/generated/acp/pdas/acpState.d.ts +12 -0
  123. package/dist/core/solana/generated/acp/pdas/acpState.d.ts.map +1 -0
  124. package/dist/core/solana/generated/acp/pdas/acpState.js +18 -0
  125. package/dist/core/solana/generated/acp/pdas/acpState.js.map +1 -0
  126. package/dist/core/solana/generated/acp/pdas/hookWhitelist.d.ts +15 -0
  127. package/dist/core/solana/generated/acp/pdas/hookWhitelist.d.ts.map +1 -0
  128. package/dist/core/solana/generated/acp/pdas/hookWhitelist.js +21 -0
  129. package/dist/core/solana/generated/acp/pdas/hookWhitelist.js.map +1 -0
  130. package/dist/core/solana/generated/acp/pdas/index.d.ts +10 -0
  131. package/dist/core/solana/generated/acp/pdas/index.d.ts.map +1 -0
  132. package/dist/core/solana/generated/acp/pdas/index.js +10 -0
  133. package/dist/core/solana/generated/acp/pdas/index.js.map +1 -0
  134. package/dist/core/solana/generated/acp/programs/agenticCommerceV3.d.ts +71 -0
  135. package/dist/core/solana/generated/acp/programs/agenticCommerceV3.d.ts.map +1 -0
  136. package/dist/core/solana/generated/acp/programs/agenticCommerceV3.js +209 -0
  137. package/dist/core/solana/generated/acp/programs/agenticCommerceV3.js.map +1 -0
  138. package/dist/core/solana/generated/acp/programs/index.d.ts +9 -0
  139. package/dist/core/solana/generated/acp/programs/index.d.ts.map +1 -0
  140. package/dist/core/solana/generated/acp/programs/index.js +9 -0
  141. package/dist/core/solana/generated/acp/programs/index.js.map +1 -0
  142. package/dist/core/solana/generated/acp/shared/index.d.ts +50 -0
  143. package/dist/core/solana/generated/acp/shared/index.d.ts.map +1 -0
  144. package/dist/core/solana/generated/acp/shared/index.js +87 -0
  145. package/dist/core/solana/generated/acp/shared/index.js.map +1 -0
  146. package/dist/core/solana/generated/acp/types/index.d.ts +9 -0
  147. package/dist/core/solana/generated/acp/types/index.d.ts.map +1 -0
  148. package/dist/core/solana/generated/acp/types/index.js +9 -0
  149. package/dist/core/solana/generated/acp/types/index.js.map +1 -0
  150. package/dist/core/solana/generated/acp/types/jobCreated.d.ts +11 -0
  151. package/dist/core/solana/generated/acp/types/jobCreated.d.ts.map +1 -0
  152. package/dist/core/solana/generated/acp/types/jobCreated.js +12 -0
  153. package/dist/core/solana/generated/acp/types/jobCreated.js.map +1 -0
  154. package/dist/core/solana/generated/acp/types/jobState.d.ts +27 -0
  155. package/dist/core/solana/generated/acp/types/jobState.d.ts.map +1 -0
  156. package/dist/core/solana/generated/acp/types/jobState.js +33 -0
  157. package/dist/core/solana/generated/acp/types/jobState.js.map +1 -0
  158. package/dist/core/solana/generated/fund-transfer-hook/accounts/fundRequestIntentId.d.ts +35 -0
  159. package/dist/core/solana/generated/fund-transfer-hook/accounts/fundRequestIntentId.d.ts.map +1 -0
  160. package/dist/core/solana/generated/fund-transfer-hook/accounts/fundRequestIntentId.js +64 -0
  161. package/dist/core/solana/generated/fund-transfer-hook/accounts/fundRequestIntentId.js.map +1 -0
  162. package/dist/core/solana/generated/fund-transfer-hook/accounts/hookMetadata.d.ts +33 -0
  163. package/dist/core/solana/generated/fund-transfer-hook/accounts/hookMetadata.d.ts.map +1 -0
  164. package/dist/core/solana/generated/fund-transfer-hook/accounts/hookMetadata.js +59 -0
  165. package/dist/core/solana/generated/fund-transfer-hook/accounts/hookMetadata.js.map +1 -0
  166. package/dist/core/solana/generated/fund-transfer-hook/accounts/hookState.d.ts +38 -0
  167. package/dist/core/solana/generated/fund-transfer-hook/accounts/hookState.d.ts.map +1 -0
  168. package/dist/core/solana/generated/fund-transfer-hook/accounts/hookState.js +62 -0
  169. package/dist/core/solana/generated/fund-transfer-hook/accounts/hookState.js.map +1 -0
  170. package/dist/core/solana/generated/fund-transfer-hook/accounts/index.d.ts +13 -0
  171. package/dist/core/solana/generated/fund-transfer-hook/accounts/index.d.ts.map +1 -0
  172. package/dist/core/solana/generated/fund-transfer-hook/accounts/index.js +13 -0
  173. package/dist/core/solana/generated/fund-transfer-hook/accounts/index.js.map +1 -0
  174. package/dist/core/solana/generated/fund-transfer-hook/accounts/intent.d.ts +61 -0
  175. package/dist/core/solana/generated/fund-transfer-hook/accounts/intent.d.ts.map +1 -0
  176. package/dist/core/solana/generated/fund-transfer-hook/accounts/intent.js +77 -0
  177. package/dist/core/solana/generated/fund-transfer-hook/accounts/intent.js.map +1 -0
  178. package/dist/core/solana/generated/fund-transfer-hook/accounts/providerEscrowIntentId.d.ts +35 -0
  179. package/dist/core/solana/generated/fund-transfer-hook/accounts/providerEscrowIntentId.d.ts.map +1 -0
  180. package/dist/core/solana/generated/fund-transfer-hook/accounts/providerEscrowIntentId.js +64 -0
  181. package/dist/core/solana/generated/fund-transfer-hook/accounts/providerEscrowIntentId.js.map +1 -0
  182. package/dist/core/solana/generated/fund-transfer-hook/index.d.ts +12 -0
  183. package/dist/core/solana/generated/fund-transfer-hook/index.d.ts.map +1 -0
  184. package/dist/core/solana/generated/fund-transfer-hook/index.js +12 -0
  185. package/dist/core/solana/generated/fund-transfer-hook/index.js.map +1 -0
  186. package/dist/core/solana/generated/fund-transfer-hook/instructions/acceptAuthority.d.ts +47 -0
  187. package/dist/core/solana/generated/fund-transfer-hook/instructions/acceptAuthority.d.ts.map +1 -0
  188. package/dist/core/solana/generated/fund-transfer-hook/instructions/acceptAuthority.js +88 -0
  189. package/dist/core/solana/generated/fund-transfer-hook/instructions/acceptAuthority.js.map +1 -0
  190. package/dist/core/solana/generated/fund-transfer-hook/instructions/afterAction.d.ts +56 -0
  191. package/dist/core/solana/generated/fund-transfer-hook/instructions/afterAction.d.ts.map +1 -0
  192. package/dist/core/solana/generated/fund-transfer-hook/instructions/afterAction.js +92 -0
  193. package/dist/core/solana/generated/fund-transfer-hook/instructions/afterAction.js.map +1 -0
  194. package/dist/core/solana/generated/fund-transfer-hook/instructions/beforeAction.d.ts +52 -0
  195. package/dist/core/solana/generated/fund-transfer-hook/instructions/beforeAction.d.ts.map +1 -0
  196. package/dist/core/solana/generated/fund-transfer-hook/instructions/beforeAction.js +90 -0
  197. package/dist/core/solana/generated/fund-transfer-hook/instructions/beforeAction.js.map +1 -0
  198. package/dist/core/solana/generated/fund-transfer-hook/instructions/claimEscrowRefund.d.ts +86 -0
  199. package/dist/core/solana/generated/fund-transfer-hook/instructions/claimEscrowRefund.d.ts.map +1 -0
  200. package/dist/core/solana/generated/fund-transfer-hook/instructions/claimEscrowRefund.js +169 -0
  201. package/dist/core/solana/generated/fund-transfer-hook/instructions/claimEscrowRefund.js.map +1 -0
  202. package/dist/core/solana/generated/fund-transfer-hook/instructions/closeIntent.d.ts +114 -0
  203. package/dist/core/solana/generated/fund-transfer-hook/instructions/closeIntent.d.ts.map +1 -0
  204. package/dist/core/solana/generated/fund-transfer-hook/instructions/closeIntent.js +120 -0
  205. package/dist/core/solana/generated/fund-transfer-hook/instructions/closeIntent.js.map +1 -0
  206. package/dist/core/solana/generated/fund-transfer-hook/instructions/index.d.ts +15 -0
  207. package/dist/core/solana/generated/fund-transfer-hook/instructions/index.d.ts.map +1 -0
  208. package/dist/core/solana/generated/fund-transfer-hook/instructions/index.js +15 -0
  209. package/dist/core/solana/generated/fund-transfer-hook/instructions/index.js.map +1 -0
  210. package/dist/core/solana/generated/fund-transfer-hook/instructions/initialize.d.ts +67 -0
  211. package/dist/core/solana/generated/fund-transfer-hook/instructions/initialize.d.ts.map +1 -0
  212. package/dist/core/solana/generated/fund-transfer-hook/instructions/initialize.js +138 -0
  213. package/dist/core/solana/generated/fund-transfer-hook/instructions/initialize.js.map +1 -0
  214. package/dist/core/solana/generated/fund-transfer-hook/instructions/nominateAuthority.d.ts +52 -0
  215. package/dist/core/solana/generated/fund-transfer-hook/instructions/nominateAuthority.d.ts.map +1 -0
  216. package/dist/core/solana/generated/fund-transfer-hook/instructions/nominateAuthority.js +96 -0
  217. package/dist/core/solana/generated/fund-transfer-hook/instructions/nominateAuthority.js.map +1 -0
  218. package/dist/core/solana/generated/fund-transfer-hook/pdas/escrowAuthority.d.ts +15 -0
  219. package/dist/core/solana/generated/fund-transfer-hook/pdas/escrowAuthority.d.ts.map +1 -0
  220. package/dist/core/solana/generated/fund-transfer-hook/pdas/escrowAuthority.js +22 -0
  221. package/dist/core/solana/generated/fund-transfer-hook/pdas/escrowAuthority.js.map +1 -0
  222. package/dist/core/solana/generated/fund-transfer-hook/pdas/hookMetadata.d.ts +12 -0
  223. package/dist/core/solana/generated/fund-transfer-hook/pdas/hookMetadata.d.ts.map +1 -0
  224. package/dist/core/solana/generated/fund-transfer-hook/pdas/hookMetadata.js +20 -0
  225. package/dist/core/solana/generated/fund-transfer-hook/pdas/hookMetadata.js.map +1 -0
  226. package/dist/core/solana/generated/fund-transfer-hook/pdas/hookState.d.ts +12 -0
  227. package/dist/core/solana/generated/fund-transfer-hook/pdas/hookState.d.ts.map +1 -0
  228. package/dist/core/solana/generated/fund-transfer-hook/pdas/hookState.js +18 -0
  229. package/dist/core/solana/generated/fund-transfer-hook/pdas/hookState.js.map +1 -0
  230. package/dist/core/solana/generated/fund-transfer-hook/pdas/index.d.ts +13 -0
  231. package/dist/core/solana/generated/fund-transfer-hook/pdas/index.d.ts.map +1 -0
  232. package/dist/core/solana/generated/fund-transfer-hook/pdas/index.js +13 -0
  233. package/dist/core/solana/generated/fund-transfer-hook/pdas/index.js.map +1 -0
  234. package/dist/core/solana/generated/fund-transfer-hook/pdas/intent.d.ts +15 -0
  235. package/dist/core/solana/generated/fund-transfer-hook/pdas/intent.d.ts.map +1 -0
  236. package/dist/core/solana/generated/fund-transfer-hook/pdas/intent.js +19 -0
  237. package/dist/core/solana/generated/fund-transfer-hook/pdas/intent.js.map +1 -0
  238. package/dist/core/solana/generated/fund-transfer-hook/pdas/providerEscrowIntentId.d.ts +15 -0
  239. package/dist/core/solana/generated/fund-transfer-hook/pdas/providerEscrowIntentId.d.ts.map +1 -0
  240. package/dist/core/solana/generated/fund-transfer-hook/pdas/providerEscrowIntentId.js +22 -0
  241. package/dist/core/solana/generated/fund-transfer-hook/pdas/providerEscrowIntentId.js.map +1 -0
  242. package/dist/core/solana/generated/fund-transfer-hook/programs/fundTransferHook.d.ts +49 -0
  243. package/dist/core/solana/generated/fund-transfer-hook/programs/fundTransferHook.d.ts.map +1 -0
  244. package/dist/core/solana/generated/fund-transfer-hook/programs/fundTransferHook.js +129 -0
  245. package/dist/core/solana/generated/fund-transfer-hook/programs/fundTransferHook.js.map +1 -0
  246. package/dist/core/solana/generated/fund-transfer-hook/programs/index.d.ts +9 -0
  247. package/dist/core/solana/generated/fund-transfer-hook/programs/index.d.ts.map +1 -0
  248. package/dist/core/solana/generated/fund-transfer-hook/programs/index.js +9 -0
  249. package/dist/core/solana/generated/fund-transfer-hook/programs/index.js.map +1 -0
  250. package/dist/core/solana/generated/fund-transfer-hook/shared/index.d.ts +50 -0
  251. package/dist/core/solana/generated/fund-transfer-hook/shared/index.d.ts.map +1 -0
  252. package/dist/core/solana/generated/fund-transfer-hook/shared/index.js +87 -0
  253. package/dist/core/solana/generated/fund-transfer-hook/shared/index.js.map +1 -0
  254. package/dist/core/solana/wallet.d.ts +49 -0
  255. package/dist/core/solana/wallet.d.ts.map +1 -0
  256. package/dist/core/solana/wallet.js +119 -0
  257. package/dist/core/solana/wallet.js.map +1 -0
  258. package/dist/events/acpHttpClient.d.ts.map +1 -1
  259. package/dist/events/acpHttpClient.js +12 -3
  260. package/dist/events/acpHttpClient.js.map +1 -1
  261. package/dist/events/socketTransport.d.ts +18 -0
  262. package/dist/events/socketTransport.d.ts.map +1 -0
  263. package/dist/events/socketTransport.js +117 -0
  264. package/dist/events/socketTransport.js.map +1 -0
  265. package/dist/events/sseTransport.d.ts +9 -2
  266. package/dist/events/sseTransport.d.ts.map +1 -1
  267. package/dist/events/sseTransport.js +100 -40
  268. package/dist/events/sseTransport.js.map +1 -1
  269. package/dist/events/types.d.ts +3 -2
  270. package/dist/events/types.d.ts.map +1 -1
  271. package/dist/index.d.ts +7 -3
  272. package/dist/index.d.ts.map +1 -1
  273. package/dist/index.js +7 -2
  274. package/dist/index.js.map +1 -1
  275. package/dist/providers/evm/privyAlchemyEvmProviderAdapter.d.ts +12 -2
  276. package/dist/providers/evm/privyAlchemyEvmProviderAdapter.d.ts.map +1 -1
  277. package/dist/providers/evm/privyAlchemyEvmProviderAdapter.js +264 -60
  278. package/dist/providers/evm/privyAlchemyEvmProviderAdapter.js.map +1 -1
  279. package/dist/providers/evm/types.d.ts +24 -0
  280. package/dist/providers/evm/types.d.ts.map +1 -0
  281. package/dist/providers/evm/types.js +2 -0
  282. package/dist/providers/evm/types.js.map +1 -0
  283. package/dist/providers/providerAuthClient.d.ts +8 -2
  284. package/dist/providers/providerAuthClient.d.ts.map +1 -1
  285. package/dist/providers/providerAuthClient.js +3 -3
  286. package/dist/providers/providerAuthClient.js.map +1 -1
  287. package/dist/providers/solana/keypairSolanaProviderAdapter.d.ts +16 -0
  288. package/dist/providers/solana/keypairSolanaProviderAdapter.d.ts.map +1 -0
  289. package/dist/providers/solana/keypairSolanaProviderAdapter.js +68 -0
  290. package/dist/providers/solana/keypairSolanaProviderAdapter.js.map +1 -0
  291. package/dist/providers/solana/privySolanaProviderAdapter.d.ts +54 -0
  292. package/dist/providers/solana/privySolanaProviderAdapter.d.ts.map +1 -0
  293. package/dist/providers/solana/privySolanaProviderAdapter.js +357 -0
  294. package/dist/providers/solana/privySolanaProviderAdapter.js.map +1 -0
  295. package/dist/providers/solana/solanaProviderAdapter.d.ts +5 -1
  296. package/dist/providers/solana/solanaProviderAdapter.d.ts.map +1 -1
  297. package/dist/providers/solana/solanaProviderAdapter.js +17 -1
  298. package/dist/providers/solana/solanaProviderAdapter.js.map +1 -1
  299. package/dist/providers/types.d.ts +11 -6
  300. package/dist/providers/types.d.ts.map +1 -1
  301. package/dist/providers/types.js +1 -1
  302. package/dist/providers/types.js.map +1 -1
  303. package/package.json +3 -2
@@ -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,EACxB,KAAK,kBAAkB,EACvB,KAAK,eAAe,EACrB,MAAM,aAAa,CAAC;AAErB,OAAO,EAAE,kCAAkC,EAAE,MAAM,sBAAsB,CAAC;AAG1E,eAAO,MAAM,0BAA0B,yBAErC,CAAC;AAEH,wBAAgB,gCAAgC,uBAI/C;AAED,MAAM,MAAM,sBAAsB,CAChC,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,0BAA0B,GAAG;IACvC,aAAa,EAAE,kBAAkB,CAAC;IAClC,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;IACf,SAAS,EAAE,kBAAkB,CAAC;CAC/B,CAAC;AAEF,MAAM,MAAM,8BAA8B,GAAG;IAC3C,KAAK,EAAE,MAAM,GAAG,MAAM,CAAC;IACvB,MAAM,EAAE,MAAM,CAAC;IACf,SAAS,EAAE,kBAAkB,CAAC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M,CAAC,EAAE;IAAE,cAAc,CAAC,EAAE,eAAe,CAAA;CAAE,GAC5C,sBAAsB,CAAC,eAAe,EAAE,iBAAiB,CAAC,CAyB5D;AAED,MAAM,MAAM,4BAA4B,CACtC,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,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,G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AC,CAAC;QAC9C,IAAI,EAAE,oCAAoC,EAAE,CAAC,MAAM,CACjD,IAAsC,CACvC;QACD,cAAc;KAC+C,CAAC,CAAC;AACnE,CAAC;AAaD,MAAM,UAAU,2BAA2B,CAIzC,WAEyC;IAEzC,IAAI,WAAW,CAAC,QAAQ,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;QACpC,qBAAqB;QACrB,MAAM,IAAI,KAAK,CAAC,qBAAqB,CAAC,CAAC;IACzC,CAAC;IACD,IAAI,YAAY,GAAG,CAAC,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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AC,OAAO,CAAC,CAAC;IAChD,MAAM,EAAE,+BAA+B,CAAC,QAAQ,CAAC,CAAC;CACnD,CAAC;AAEF,wBAAgB,0BAA0B,CACxC,iBAAiB,SAAS,MAAM,EAChC,eAAe,SAAS,OAAO,GAAG,OAAO,kCAAkC,EAE3E,KAAK,EAAE,iBAAiB,CAAC,iBAAiB,CAAC,EAC3C,MAAM,CAAC,EAAE;IAAE,cAAc,CAAC,EAAE,eAAe,CAAA;CAAE,GAC5C,uBAAuB,CAAC,eAAe,EAAE,iBAAiB,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,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;AACpE,CAAC;AAaD,MAAM,UAAU,4BAA4B,CAI1C,WAEyC;IAEzC,IAAI,WAAW,CAAC,QAAQ,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;QACpC,qBAAqB;QACrB,MAAM,IAAI,KAAK,CAAC,qBAAqB,CAAC,CAAC;IACzC,CAAC;IACD,IAAI,YAAY,GAAG,CAAC,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,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,E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B,aAAa,SAAS,SAAS,WAAW,EAAE,EAE5C,WAAW,EAAE,WAAW,CAAC,QAAQ,CAAC,GAChC,uBAAuB,CAAC,aAAa,CAAC,GACtC,mBAAmB,CAAC,kBAAkB,CAAC,GACxC,kCAAkC,CAAC,QAAQ,EAAE,aAAa,CAAC,CA0B7D"}
@@ -0,0 +1,169 @@
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, transformEncoder, } from "@solana/kit";
9
+ import { findEscrowAuthorityPda, findHookStatePda, findProviderEscrowIntentIdPda, } from "../pdas/index.js";
10
+ import { FUND_TRANSFER_HOOK_PROGRAM_ADDRESS } from "../programs/index.js";
11
+ import { expectSome, getAccountMetaFactory, } from "../shared/index.js";
12
+ export const CLAIM_ESCROW_REFUND_DISCRIMINATOR = new Uint8Array([
13
+ 180, 244, 255, 206, 147, 149, 56, 223,
14
+ ]);
15
+ export function getClaimEscrowRefundDiscriminatorBytes() {
16
+ return fixEncoderSize(getBytesEncoder(), 8).encode(CLAIM_ESCROW_REFUND_DISCRIMINATOR);
17
+ }
18
+ export function getClaimEscrowRefundInstructionDataEncoder() {
19
+ return transformEncoder(getStructEncoder([
20
+ ["discriminator", fixEncoderSize(getBytesEncoder(), 8)],
21
+ ["jobId", getU64Encoder()],
22
+ ]), (value) => ({ ...value, discriminator: CLAIM_ESCROW_REFUND_DISCRIMINATOR }));
23
+ }
24
+ export function getClaimEscrowRefundInstructionDataDecoder() {
25
+ return getStructDecoder([
26
+ ["discriminator", fixDecoderSize(getBytesDecoder(), 8)],
27
+ ["jobId", getU64Decoder()],
28
+ ]);
29
+ }
30
+ export function getClaimEscrowRefundInstructionDataCodec() {
31
+ return combineCodec(getClaimEscrowRefundInstructionDataEncoder(), getClaimEscrowRefundInstructionDataDecoder());
32
+ }
33
+ export async function getClaimEscrowRefundInstructionAsync(input, config) {
34
+ // Program address.
35
+ const programAddress = config?.programAddress ?? FUND_TRANSFER_HOOK_PROGRAM_ADDRESS;
36
+ // Original accounts.
37
+ const originalAccounts = {
38
+ caller: { value: input.caller ?? null, isWritable: false },
39
+ hookState: { value: input.hookState ?? null, isWritable: false },
40
+ jobAccount: { value: input.jobAccount ?? null, isWritable: false },
41
+ providerEscrowIntentId: {
42
+ value: input.providerEscrowIntentId ?? null,
43
+ isWritable: false,
44
+ },
45
+ intent: { value: input.intent ?? null, isWritable: true },
46
+ escrowVault: { value: input.escrowVault ?? null, isWritable: true },
47
+ providerTokenAccount: {
48
+ value: input.providerTokenAccount ?? null,
49
+ isWritable: true,
50
+ },
51
+ escrowAuthority: {
52
+ value: input.escrowAuthority ?? null,
53
+ isWritable: false,
54
+ },
55
+ tokenProgram: { value: input.tokenProgram ?? null, isWritable: false },
56
+ };
57
+ const accounts = originalAccounts;
58
+ // Original args.
59
+ const args = { ...input };
60
+ // Resolve default values.
61
+ if (!accounts.hookState.value) {
62
+ accounts.hookState.value = await findHookStatePda();
63
+ }
64
+ if (!accounts.providerEscrowIntentId.value) {
65
+ accounts.providerEscrowIntentId.value = await findProviderEscrowIntentIdPda({ jobId: expectSome(args.jobId) });
66
+ }
67
+ if (!accounts.escrowAuthority.value) {
68
+ accounts.escrowAuthority.value = await findEscrowAuthorityPda({
69
+ jobId: expectSome(args.jobId),
70
+ });
71
+ }
72
+ if (!accounts.tokenProgram.value) {
73
+ accounts.tokenProgram.value =
74
+ "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA";
75
+ }
76
+ const getAccountMeta = getAccountMetaFactory(programAddress, "programId");
77
+ return Object.freeze({
78
+ accounts: [
79
+ getAccountMeta(accounts.caller),
80
+ getAccountMeta(accounts.hookState),
81
+ getAccountMeta(accounts.jobAccount),
82
+ getAccountMeta(accounts.providerEscrowIntentId),
83
+ getAccountMeta(accounts.intent),
84
+ getAccountMeta(accounts.escrowVault),
85
+ getAccountMeta(accounts.providerTokenAccount),
86
+ getAccountMeta(accounts.escrowAuthority),
87
+ getAccountMeta(accounts.tokenProgram),
88
+ ],
89
+ data: getClaimEscrowRefundInstructionDataEncoder().encode(args),
90
+ programAddress,
91
+ });
92
+ }
93
+ export function getClaimEscrowRefundInstruction(input, config) {
94
+ // Program address.
95
+ const programAddress = config?.programAddress ?? FUND_TRANSFER_HOOK_PROGRAM_ADDRESS;
96
+ // Original accounts.
97
+ const originalAccounts = {
98
+ caller: { value: input.caller ?? null, isWritable: false },
99
+ hookState: { value: input.hookState ?? null, isWritable: false },
100
+ jobAccount: { value: input.jobAccount ?? null, isWritable: false },
101
+ providerEscrowIntentId: {
102
+ value: input.providerEscrowIntentId ?? null,
103
+ isWritable: false,
104
+ },
105
+ intent: { value: input.intent ?? null, isWritable: true },
106
+ escrowVault: { value: input.escrowVault ?? null, isWritable: true },
107
+ providerTokenAccount: {
108
+ value: input.providerTokenAccount ?? null,
109
+ isWritable: true,
110
+ },
111
+ escrowAuthority: {
112
+ value: input.escrowAuthority ?? null,
113
+ isWritable: false,
114
+ },
115
+ tokenProgram: { value: input.tokenProgram ?? null, isWritable: false },
116
+ };
117
+ const accounts = originalAccounts;
118
+ // Original args.
119
+ const args = { ...input };
120
+ // Resolve default values.
121
+ if (!accounts.tokenProgram.value) {
122
+ accounts.tokenProgram.value =
123
+ "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA";
124
+ }
125
+ const getAccountMeta = getAccountMetaFactory(programAddress, "programId");
126
+ return Object.freeze({
127
+ accounts: [
128
+ getAccountMeta(accounts.caller),
129
+ getAccountMeta(accounts.hookState),
130
+ getAccountMeta(accounts.jobAccount),
131
+ getAccountMeta(accounts.providerEscrowIntentId),
132
+ getAccountMeta(accounts.intent),
133
+ getAccountMeta(accounts.escrowVault),
134
+ getAccountMeta(accounts.providerTokenAccount),
135
+ getAccountMeta(accounts.escrowAuthority),
136
+ getAccountMeta(accounts.tokenProgram),
137
+ ],
138
+ data: getClaimEscrowRefundInstructionDataEncoder().encode(args),
139
+ programAddress,
140
+ });
141
+ }
142
+ export function parseClaimEscrowRefundInstruction(instruction) {
143
+ if (instruction.accounts.length < 9) {
144
+ // TODO: Coded error.
145
+ throw new Error("Not enough accounts");
146
+ }
147
+ let accountIndex = 0;
148
+ const getNextAccount = () => {
149
+ const accountMeta = instruction.accounts[accountIndex];
150
+ accountIndex += 1;
151
+ return accountMeta;
152
+ };
153
+ return {
154
+ programAddress: instruction.programAddress,
155
+ accounts: {
156
+ caller: getNextAccount(),
157
+ hookState: getNextAccount(),
158
+ jobAccount: getNextAccount(),
159
+ providerEscrowIntentId: getNextAccount(),
160
+ intent: getNextAccount(),
161
+ escrowVault: getNextAccount(),
162
+ providerTokenAccount: getNextAccount(),
163
+ escrowAuthority: getNextAccount(),
164
+ tokenProgram: getNextAccount(),
165
+ },
166
+ data: getClaimEscrowRefundInstructionDataDecoder().decode(instruction.data),
167
+ };
168
+ }
169
+ //# sourceMappingURL=claimEscrowRefund.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"claimEscrowRefund.js","sourceRoot":"","sources":["../../../../../../src/core/solana/generated/fund-transfer-hook/instructions/claimEscrowRefund.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,gBAAgB,GAejB,MAAM,aAAa,CAAC;AACrB,OAAO,EACL,sBAAsB,EACtB,gBAAgB,EAChB,6BAA6B,GAC9B,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EAAE,kCAAkC,EAAE,MAAM,sBAAsB,CAAC;AAC1E,OAAO,EACL,UAAU,EACV,qBAAqB,GAEtB,MAAM,oBAAoB,CAA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