@sentio/sdk 2.0.0-rc.8 → 2.0.0

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 (503) hide show
  1. package/lib/aptos/api.d.ts +5 -0
  2. package/lib/aptos/api.js +21 -0
  3. package/lib/aptos/api.js.map +1 -0
  4. package/lib/aptos/aptos-plugin.d.ts +14 -0
  5. package/lib/aptos/aptos-plugin.js +146 -0
  6. package/lib/aptos/aptos-plugin.js.map +1 -0
  7. package/lib/aptos/aptos-processor.d.ts +72 -0
  8. package/lib/aptos/aptos-processor.js +201 -0
  9. package/lib/aptos/aptos-processor.js.map +1 -0
  10. package/lib/aptos/builtin/0x1.d.ts +1914 -0
  11. package/lib/aptos/builtin/0x1.js +2727 -0
  12. package/lib/aptos/builtin/0x1.js.map +1 -0
  13. package/lib/aptos/builtin/0x3.d.ts +491 -0
  14. package/lib/aptos/builtin/0x3.js +496 -0
  15. package/lib/aptos/builtin/0x3.js.map +1 -0
  16. package/lib/aptos/builtin/index.d.ts +2 -0
  17. package/lib/aptos/builtin/index.js +6 -0
  18. package/lib/aptos/builtin/index.js.map +1 -0
  19. package/lib/aptos/codegen/codegen.d.ts +21 -0
  20. package/lib/aptos/codegen/codegen.js +384 -0
  21. package/lib/aptos/codegen/codegen.js.map +1 -0
  22. package/lib/aptos/codegen/index.d.ts +1 -0
  23. package/lib/aptos/codegen/index.js +2 -0
  24. package/lib/aptos/codegen/index.js.map +1 -0
  25. package/lib/aptos/codegen/run.d.ts +1 -0
  26. package/lib/aptos/codegen/run.js +12 -0
  27. package/lib/aptos/codegen/run.js.map +1 -0
  28. package/lib/aptos/codegen/typegen.d.ts +18 -0
  29. package/lib/aptos/codegen/typegen.js +145 -0
  30. package/lib/aptos/codegen/typegen.js.map +1 -0
  31. package/lib/aptos/codegen/typegen.test.d.ts +1 -0
  32. package/lib/aptos/codegen/typegen.test.js.map +1 -0
  33. package/lib/aptos/context.d.ts +21 -0
  34. package/lib/aptos/context.js +59 -0
  35. package/lib/aptos/context.js.map +1 -0
  36. package/lib/aptos/index.d.ts +9 -0
  37. package/lib/aptos/index.js +8 -0
  38. package/lib/aptos/index.js.map +1 -0
  39. package/lib/aptos/models.d.ts +29 -0
  40. package/lib/aptos/models.js +2 -0
  41. package/lib/aptos/models.js.map +1 -0
  42. package/lib/aptos/move-coder.d.ts +22 -0
  43. package/lib/aptos/move-coder.js +162 -0
  44. package/lib/aptos/move-coder.js.map +1 -0
  45. package/lib/aptos/move-types.d.ts +10 -0
  46. package/lib/aptos/move-types.js +2 -0
  47. package/lib/aptos/move-types.js.map +1 -0
  48. package/lib/aptos/network.d.ts +11 -0
  49. package/lib/aptos/network.js +27 -0
  50. package/lib/aptos/network.js.map +1 -0
  51. package/lib/aptos/tests/aptos.test.d.ts +1 -0
  52. package/lib/aptos/tests/aptos.test.js.map +1 -0
  53. package/lib/aptos/tests/souffl3.d.ts +1 -0
  54. package/lib/aptos/tests/souffl3.js +44 -0
  55. package/lib/aptos/tests/souffl3.js.map +1 -0
  56. package/lib/aptos/tests/types/index.d.ts +3 -0
  57. package/lib/aptos/tests/types/index.js +7 -0
  58. package/lib/aptos/tests/types/index.js.map +1 -0
  59. package/lib/aptos/tests/types/reserved.d.ts +345 -0
  60. package/lib/aptos/tests/types/reserved.js +301 -0
  61. package/lib/aptos/tests/types/reserved.js.map +1 -0
  62. package/lib/aptos/tests/types/soffl3.d.ts +812 -0
  63. package/lib/aptos/tests/types/soffl3.js +548 -0
  64. package/lib/aptos/tests/types/soffl3.js.map +1 -0
  65. package/lib/aptos/tests/types/souffle.d.ts +340 -0
  66. package/lib/aptos/tests/types/souffle.js +295 -0
  67. package/lib/aptos/tests/types/souffle.js.map +1 -0
  68. package/lib/aptos/types.d.ts +9 -0
  69. package/lib/aptos/types.js +130 -0
  70. package/lib/aptos/types.js.map +1 -0
  71. package/lib/aptos/types.test.d.ts +1 -0
  72. package/lib/aptos/types.test.js.map +1 -0
  73. package/lib/aptos/utils.d.ts +7 -0
  74. package/lib/aptos/utils.js +20 -0
  75. package/lib/aptos/utils.js.map +1 -0
  76. package/lib/core/big-decimal.d.ts +2 -0
  77. package/lib/core/big-decimal.js +8 -0
  78. package/lib/core/big-decimal.js.map +1 -1
  79. package/lib/{utils → core}/chain.d.ts +0 -0
  80. package/lib/{utils → core}/chain.js +0 -0
  81. package/lib/core/chain.js.map +1 -0
  82. package/lib/core/index.d.ts +2 -4
  83. package/lib/core/index.js +2 -4
  84. package/lib/core/index.js.map +1 -1
  85. package/lib/core/numberish.d.ts +0 -2
  86. package/lib/core/numberish.js +0 -9
  87. package/lib/core/numberish.js.map +1 -1
  88. package/lib/core/sui-plugin.js +1 -1
  89. package/lib/core/sui-plugin.js.map +1 -1
  90. package/lib/core/sui-processor.d.ts +1 -1
  91. package/lib/core/sui-processor.js +1 -1
  92. package/lib/core/sui-processor.js.map +1 -1
  93. package/lib/eth/account-processor.d.ts +4 -4
  94. package/lib/eth/account-processor.js +4 -4
  95. package/lib/eth/account-processor.js.map +1 -1
  96. package/lib/eth/base-processor-template.d.ts +6 -5
  97. package/lib/eth/base-processor-template.js +1 -1
  98. package/lib/eth/base-processor-template.js.map +1 -1
  99. package/lib/eth/base-processor.d.ts +6 -5
  100. package/lib/eth/base-processor.js +3 -2
  101. package/lib/eth/base-processor.js.map +1 -1
  102. package/lib/{core → eth}/bind-options.d.ts +0 -0
  103. package/lib/{core → eth}/bind-options.js +0 -0
  104. package/lib/eth/bind-options.js.map +1 -0
  105. package/lib/eth/binds.d.ts +2 -2
  106. package/lib/eth/binds.js +1 -1
  107. package/lib/eth/binds.js.map +1 -1
  108. package/lib/{builtin → eth/builtin}/eacaggregatorproxy/index.d.ts +0 -0
  109. package/lib/{builtin → eth/builtin}/eacaggregatorproxy/index.js +0 -0
  110. package/lib/eth/builtin/eacaggregatorproxy/index.js.map +1 -0
  111. package/lib/{builtin → eth/builtin}/eacaggregatorproxy/test-utils.d.ts +0 -0
  112. package/lib/{builtin → eth/builtin}/eacaggregatorproxy/test-utils.js +0 -0
  113. package/lib/eth/builtin/eacaggregatorproxy/test-utils.js.map +1 -0
  114. package/lib/{builtin → eth/builtin}/erc1155/index.d.ts +0 -0
  115. package/lib/{builtin → eth/builtin}/erc1155/index.js +0 -0
  116. package/lib/eth/builtin/erc1155/index.js.map +1 -0
  117. package/lib/{builtin → eth/builtin}/erc1155/test-utils.d.ts +0 -0
  118. package/lib/{builtin → eth/builtin}/erc1155/test-utils.js +0 -0
  119. package/lib/eth/builtin/erc1155/test-utils.js.map +1 -0
  120. package/lib/{builtin → eth/builtin}/erc20/index.d.ts +0 -0
  121. package/lib/{builtin → eth/builtin}/erc20/index.js +0 -0
  122. package/lib/eth/builtin/erc20/index.js.map +1 -0
  123. package/lib/{builtin → eth/builtin}/erc20/test-utils.d.ts +0 -0
  124. package/lib/{builtin → eth/builtin}/erc20/test-utils.js +0 -0
  125. package/lib/eth/builtin/erc20/test-utils.js.map +1 -0
  126. package/lib/{builtin → eth/builtin}/erc20bytes/index.d.ts +0 -0
  127. package/lib/{builtin → eth/builtin}/erc20bytes/index.js +0 -0
  128. package/lib/eth/builtin/erc20bytes/index.js.map +1 -0
  129. package/lib/{builtin → eth/builtin}/erc20bytes/test-utils.d.ts +0 -0
  130. package/lib/{builtin → eth/builtin}/erc20bytes/test-utils.js +0 -0
  131. package/lib/eth/builtin/erc20bytes/test-utils.js.map +1 -0
  132. package/lib/{builtin → eth/builtin}/erc721/index.d.ts +0 -0
  133. package/lib/{builtin → eth/builtin}/erc721/index.js +0 -0
  134. package/lib/eth/builtin/erc721/index.js.map +1 -0
  135. package/lib/{builtin → eth/builtin}/erc721/test-utils.d.ts +0 -0
  136. package/lib/{builtin → eth/builtin}/erc721/test-utils.js +0 -0
  137. package/lib/eth/builtin/erc721/test-utils.js.map +1 -0
  138. package/lib/{builtin → eth/builtin}/index.d.ts +0 -0
  139. package/lib/{builtin → eth/builtin}/index.js +0 -0
  140. package/lib/eth/builtin/index.js.map +1 -0
  141. package/lib/{builtin → eth/builtin}/internal/EACAggregatorProxy.d.ts +5 -5
  142. package/lib/{builtin → eth/builtin}/internal/EACAggregatorProxy.js +0 -0
  143. package/lib/eth/builtin/internal/EACAggregatorProxy.js.map +1 -0
  144. package/lib/{builtin → eth/builtin}/internal/ERC1155.d.ts +5 -5
  145. package/lib/{builtin → eth/builtin}/internal/ERC1155.js +0 -0
  146. package/lib/eth/builtin/internal/ERC1155.js.map +1 -0
  147. package/lib/{builtin → eth/builtin}/internal/ERC20.d.ts +4 -4
  148. package/lib/{builtin → eth/builtin}/internal/ERC20.js +0 -0
  149. package/lib/eth/builtin/internal/ERC20.js.map +1 -0
  150. package/lib/{builtin → eth/builtin}/internal/ERC20Bytes.d.ts +3 -3
  151. package/lib/{builtin → eth/builtin}/internal/ERC20Bytes.js +0 -0
  152. package/lib/eth/builtin/internal/ERC20Bytes.js.map +1 -0
  153. package/lib/{builtin → eth/builtin}/internal/ERC721.d.ts +4 -4
  154. package/lib/{builtin → eth/builtin}/internal/ERC721.js +0 -0
  155. package/lib/eth/builtin/internal/ERC721.js.map +1 -0
  156. package/lib/{builtin → eth/builtin}/internal/WETH9.d.ts +5 -5
  157. package/lib/{builtin → eth/builtin}/internal/WETH9.js +0 -0
  158. package/lib/eth/builtin/internal/WETH9.js.map +1 -0
  159. package/lib/{builtin → eth/builtin}/internal/common.d.ts +4 -2
  160. package/lib/{builtin → eth/builtin}/internal/common.js +0 -0
  161. package/lib/eth/builtin/internal/common.js.map +1 -0
  162. package/lib/{builtin → eth/builtin}/internal/eacaggregatorproxy_processor.d.ts +5 -5
  163. package/lib/{builtin → eth/builtin}/internal/eacaggregatorproxy_processor.js +92 -182
  164. package/lib/eth/builtin/internal/eacaggregatorproxy_processor.js.map +1 -0
  165. package/lib/{builtin → eth/builtin}/internal/erc1155_processor.d.ts +5 -5
  166. package/lib/{builtin → eth/builtin}/internal/erc1155_processor.js +27 -52
  167. package/lib/eth/builtin/internal/erc1155_processor.js.map +1 -0
  168. package/lib/{builtin → eth/builtin}/internal/erc20_processor.d.ts +4 -4
  169. package/lib/{builtin → eth/builtin}/internal/erc20_processor.js +42 -82
  170. package/lib/eth/builtin/internal/erc20_processor.js.map +1 -0
  171. package/lib/{builtin → eth/builtin}/internal/erc20bytes_processor.d.ts +3 -3
  172. package/lib/{builtin → eth/builtin}/internal/erc20bytes_processor.js +32 -62
  173. package/lib/eth/builtin/internal/erc20bytes_processor.js.map +1 -0
  174. package/lib/{builtin → eth/builtin}/internal/erc721_processor.d.ts +4 -4
  175. package/lib/{builtin → eth/builtin}/internal/erc721_processor.js +47 -92
  176. package/lib/eth/builtin/internal/erc721_processor.js.map +1 -0
  177. package/lib/{builtin → eth/builtin}/internal/factories/EACAggregatorProxy__factory.d.ts +1 -1
  178. package/lib/{builtin → eth/builtin}/internal/factories/EACAggregatorProxy__factory.js +0 -0
  179. package/lib/eth/builtin/internal/factories/EACAggregatorProxy__factory.js.map +1 -0
  180. package/lib/{builtin → eth/builtin}/internal/factories/ERC1155__factory.d.ts +1 -1
  181. package/lib/{builtin → eth/builtin}/internal/factories/ERC1155__factory.js +0 -0
  182. package/lib/eth/builtin/internal/factories/ERC1155__factory.js.map +1 -0
  183. package/lib/{builtin → eth/builtin}/internal/factories/ERC20Bytes__factory.d.ts +1 -1
  184. package/lib/{builtin → eth/builtin}/internal/factories/ERC20Bytes__factory.js +0 -0
  185. package/lib/eth/builtin/internal/factories/ERC20Bytes__factory.js.map +1 -0
  186. package/lib/{builtin → eth/builtin}/internal/factories/ERC20__factory.d.ts +1 -1
  187. package/lib/{builtin → eth/builtin}/internal/factories/ERC20__factory.js +0 -0
  188. package/lib/eth/builtin/internal/factories/ERC20__factory.js.map +1 -0
  189. package/lib/{builtin → eth/builtin}/internal/factories/ERC721__factory.d.ts +1 -1
  190. package/lib/{builtin → eth/builtin}/internal/factories/ERC721__factory.js +0 -0
  191. package/lib/eth/builtin/internal/factories/ERC721__factory.js.map +1 -0
  192. package/lib/{builtin → eth/builtin}/internal/factories/WETH9__factory.d.ts +1 -1
  193. package/lib/{builtin → eth/builtin}/internal/factories/WETH9__factory.js +0 -0
  194. package/lib/eth/builtin/internal/factories/WETH9__factory.js.map +1 -0
  195. package/lib/{builtin → eth/builtin}/internal/factories/index.d.ts +0 -0
  196. package/lib/{builtin → eth/builtin}/internal/factories/index.js +0 -0
  197. package/lib/eth/builtin/internal/factories/index.js.map +1 -0
  198. package/lib/{builtin → eth/builtin}/internal/index.d.ts +0 -0
  199. package/lib/{builtin → eth/builtin}/internal/index.js +0 -0
  200. package/lib/eth/builtin/internal/index.js.map +1 -0
  201. package/lib/{builtin → eth/builtin}/internal/weth9_processor.d.ts +5 -5
  202. package/lib/{builtin → eth/builtin}/internal/weth9_processor.js +32 -62
  203. package/lib/eth/builtin/internal/weth9_processor.js.map +1 -0
  204. package/lib/{builtin → eth/builtin}/weth9/index.d.ts +0 -0
  205. package/lib/{builtin → eth/builtin}/weth9/index.js +0 -0
  206. package/lib/eth/builtin/weth9/index.js.map +1 -0
  207. package/lib/{builtin → eth/builtin}/weth9/test-utils.d.ts +0 -0
  208. package/lib/{builtin → eth/builtin}/weth9/test-utils.js +0 -0
  209. package/lib/eth/builtin/weth9/test-utils.js.map +1 -0
  210. package/lib/eth/codegen/codegen.d.ts +1 -0
  211. package/lib/eth/codegen/codegen.js +53 -0
  212. package/lib/eth/codegen/codegen.js.map +1 -0
  213. package/lib/{target-ethers-sentio/index.d.cts → eth/codegen/ethers-sentio.d.ts} +1 -1
  214. package/lib/eth/codegen/ethers-sentio.js +57 -0
  215. package/lib/eth/codegen/ethers-sentio.js.map +1 -0
  216. package/lib/{target-ethers-sentio/event-handler.d.cts → eth/codegen/event-handler.d.ts} +0 -0
  217. package/lib/eth/codegen/event-handler.js +46 -0
  218. package/lib/eth/codegen/event-handler.js.map +1 -0
  219. package/lib/{target-ethers-sentio/file.d.cts → eth/codegen/file.d.ts} +0 -0
  220. package/lib/{target-ethers-sentio/file.cjs → eth/codegen/file.js} +28 -35
  221. package/lib/eth/codegen/file.js.map +1 -0
  222. package/lib/{target-ethers-sentio/functions-handler.d.cts → eth/codegen/functions-handler.d.ts} +0 -0
  223. package/lib/{target-ethers-sentio/functions-handler.cjs → eth/codegen/functions-handler.js} +13 -18
  224. package/lib/eth/codegen/functions-handler.js.map +1 -0
  225. package/lib/eth/codegen/index.d.ts +1 -0
  226. package/lib/eth/codegen/index.js +2 -0
  227. package/lib/eth/codegen/index.js.map +1 -0
  228. package/lib/eth/codegen/run.d.ts +2 -0
  229. package/lib/eth/codegen/run.js +12 -0
  230. package/lib/eth/codegen/run.js.map +1 -0
  231. package/lib/{target-ethers-sentio/types.d.cts → eth/codegen/types.d.ts} +0 -0
  232. package/lib/{target-ethers-sentio/types.cjs → eth/codegen/types.js} +4 -10
  233. package/lib/eth/codegen/types.js.map +1 -0
  234. package/lib/{target-ethers-sentio/view-function.d.cts → eth/codegen/view-function.d.ts} +0 -0
  235. package/lib/eth/codegen/view-function.js +62 -0
  236. package/lib/eth/codegen/view-function.js.map +1 -0
  237. package/lib/{core → eth}/context.d.ts +5 -4
  238. package/lib/{core → eth}/context.js +7 -8
  239. package/lib/eth/context.js.map +1 -0
  240. package/lib/eth/error.d.ts +1 -0
  241. package/lib/eth/error.js +3 -0
  242. package/lib/eth/error.js.map +1 -0
  243. package/lib/eth/eth.d.ts +13 -0
  244. package/lib/{error.js → eth/eth.js} +20 -14
  245. package/lib/eth/eth.js.map +1 -0
  246. package/lib/eth/generic-processor.d.ts +2 -2
  247. package/lib/eth/generic-processor.js +2 -2
  248. package/lib/eth/generic-processor.js.map +1 -1
  249. package/lib/eth/generic-processor.test.js.map +1 -1
  250. package/lib/eth/index.d.ts +5 -1
  251. package/lib/eth/index.js +5 -1
  252. package/lib/eth/index.js.map +1 -1
  253. package/lib/eth/provider.js +3 -2
  254. package/lib/eth/provider.js.map +1 -1
  255. package/lib/index.d.ts +1 -3
  256. package/lib/index.js +1 -5
  257. package/lib/index.js.map +1 -1
  258. package/lib/jest.config.d.ts +9 -0
  259. package/lib/jest.config.js +9 -0
  260. package/lib/jest.config.js.map +1 -0
  261. package/lib/solana/builtin/index.d.ts +1 -0
  262. package/lib/solana/builtin/index.js +2 -0
  263. package/lib/solana/builtin/index.js.map +1 -0
  264. package/lib/solana/builtin/spl-token-processor.d.ts +39 -0
  265. package/lib/solana/builtin/spl-token-processor.js +254 -0
  266. package/lib/solana/builtin/spl-token-processor.js.map +1 -0
  267. package/lib/solana/builtin/types.d.ts +427 -0
  268. package/lib/solana/builtin/types.js +200 -0
  269. package/lib/solana/builtin/types.js.map +1 -0
  270. package/lib/solana/codegen/codegen.d.ts +1 -0
  271. package/lib/solana/codegen/codegen.js +122 -0
  272. package/lib/solana/codegen/codegen.js.map +1 -0
  273. package/lib/solana/codegen/index.d.ts +1 -0
  274. package/lib/solana/codegen/index.js +2 -0
  275. package/lib/solana/codegen/index.js.map +1 -0
  276. package/lib/solana/codegen/run.d.ts +2 -0
  277. package/lib/solana/codegen/run.js +12 -0
  278. package/lib/solana/codegen/run.js.map +1 -0
  279. package/lib/solana/index.d.ts +4 -0
  280. package/lib/solana/index.js +5 -0
  281. package/lib/solana/index.js.map +1 -0
  282. package/lib/solana/solana-context.d.ts +9 -0
  283. package/lib/solana/solana-context.js +28 -0
  284. package/lib/solana/solana-context.js.map +1 -0
  285. package/lib/solana/solana-options.d.ts +10 -0
  286. package/lib/solana/solana-options.js +10 -0
  287. package/lib/solana/solana-options.js.map +1 -0
  288. package/lib/solana/solana-plugin.d.ts +9 -0
  289. package/lib/solana/solana-plugin.js +87 -0
  290. package/lib/solana/solana-plugin.js.map +1 -0
  291. package/lib/solana/solana-processor.d.ts +43 -0
  292. package/lib/solana/solana-processor.js +72 -0
  293. package/lib/solana/solana-processor.js.map +1 -0
  294. package/lib/solana/tests/solana.test.d.ts +1 -0
  295. package/lib/solana/tests/solana.test.js.map +1 -0
  296. package/lib/solana/tests/types/basic_1.d.ts +26 -0
  297. package/lib/solana/tests/types/basic_1.js +63 -0
  298. package/lib/solana/tests/types/basic_1.js.map +1 -0
  299. package/lib/solana/tests/types/basic_1_processor.d.ts +21 -0
  300. package/lib/solana/tests/types/basic_1_processor.js +35 -0
  301. package/lib/solana/tests/types/basic_1_processor.js.map +1 -0
  302. package/lib/solana/tests/types/token_bridge.d.ts +29 -0
  303. package/lib/solana/tests/types/token_bridge.js +938 -0
  304. package/lib/solana/tests/types/token_bridge.js.map +1 -0
  305. package/lib/solana/tests/types/token_bridge_processor.d.ts +212 -0
  306. package/lib/solana/tests/types/token_bridge_processor.js +134 -0
  307. package/lib/solana/tests/types/token_bridge_processor.js.map +1 -0
  308. package/lib/solana/tests/wormhole-token-bridge.d.ts +15 -0
  309. package/lib/solana/tests/wormhole-token-bridge.js +79 -0
  310. package/lib/solana/tests/wormhole-token-bridge.js.map +1 -0
  311. package/lib/testing/test-processor-server.js +1 -1
  312. package/lib/testing/test-processor-server.js.map +1 -1
  313. package/lib/testing/test-provider.js +1 -1
  314. package/lib/testing/test-provider.js.map +1 -1
  315. package/lib/tsup.config.ts +3 -0
  316. package/lib/utils/conversion.d.ts +0 -5
  317. package/lib/utils/conversion.js +21 -20
  318. package/lib/utils/conversion.js.map +1 -1
  319. package/lib/utils/dex-price.js +2 -2
  320. package/lib/utils/dex-price.js.map +1 -1
  321. package/lib/utils/index.d.ts +4 -4
  322. package/lib/utils/index.js +4 -4
  323. package/lib/utils/index.js.map +1 -1
  324. package/lib/utils/token.d.ts +0 -1
  325. package/lib/utils/token.js +17 -28
  326. package/lib/utils/token.js.map +1 -1
  327. package/package.json +42 -20
  328. package/src/aptos/abis/0x1.json +9205 -0
  329. package/src/aptos/abis/0x3.json +1515 -0
  330. package/src/aptos/api.ts +23 -0
  331. package/src/aptos/aptos-plugin.ts +183 -0
  332. package/src/aptos/aptos-processor.ts +331 -0
  333. package/src/aptos/builtin/0x1.ts +4685 -0
  334. package/src/aptos/builtin/0x3.ts +1010 -0
  335. package/src/aptos/builtin/index.ts +5 -0
  336. package/src/aptos/codegen/codegen.ts +461 -0
  337. package/src/aptos/codegen/index.ts +1 -0
  338. package/src/aptos/codegen/run.ts +13 -0
  339. package/src/aptos/codegen/tsconfig.json +8 -0
  340. package/src/aptos/codegen/typegen.ts +165 -0
  341. package/src/aptos/context.ts +72 -0
  342. package/src/aptos/index.ts +10 -0
  343. package/src/aptos/models.ts +37 -0
  344. package/src/aptos/move-coder.ts +199 -0
  345. package/src/aptos/move-types.ts +11 -0
  346. package/src/aptos/network.ts +29 -0
  347. package/src/aptos/tests/abis/reserved.json +402 -0
  348. package/src/aptos/tests/abis/soffl3.json +1411 -0
  349. package/src/aptos/tests/abis/souffle.json +389 -0
  350. package/src/aptos/tests/souffl3.ts +57 -0
  351. package/src/aptos/tests/types/index.ts +6 -0
  352. package/src/aptos/tests/types/reserved.ts +781 -0
  353. package/src/aptos/tests/types/soffl3.ts +1567 -0
  354. package/src/aptos/tests/types/souffle.ts +780 -0
  355. package/src/aptos/types.ts +149 -0
  356. package/src/aptos/utils.ts +26 -0
  357. package/src/core/big-decimal.ts +11 -0
  358. package/src/{utils → core}/chain.ts +0 -0
  359. package/src/core/index.ts +2 -5
  360. package/src/core/numberish.ts +0 -11
  361. package/src/core/sui-plugin.ts +1 -1
  362. package/src/core/sui-processor.ts +1 -1
  363. package/src/{abis → eth/abis}/EACAggregatorProxy.json +0 -0
  364. package/src/{abis → eth/abis}/ERC1155.json +0 -0
  365. package/src/{abis → eth/abis}/ERC20.json +0 -0
  366. package/src/{abis → eth/abis}/ERC20Bytes.json +0 -0
  367. package/src/{abis → eth/abis}/ERC721.json +0 -0
  368. package/src/{abis → eth/abis}/WETH9.json +0 -0
  369. package/src/eth/account-processor.ts +7 -7
  370. package/src/eth/base-processor-template.ts +5 -4
  371. package/src/eth/base-processor.ts +10 -20
  372. package/src/{core → eth}/bind-options.ts +0 -0
  373. package/src/eth/binds.ts +2 -2
  374. package/src/{builtin → eth/builtin}/eacaggregatorproxy/index.ts +0 -0
  375. package/src/{builtin → eth/builtin}/eacaggregatorproxy/test-utils.ts +0 -0
  376. package/src/{builtin → eth/builtin}/erc1155/index.ts +0 -0
  377. package/src/{builtin → eth/builtin}/erc1155/test-utils.ts +0 -0
  378. package/src/{builtin → eth/builtin}/erc20/index.ts +0 -0
  379. package/src/{builtin → eth/builtin}/erc20/test-utils.ts +0 -0
  380. package/src/{builtin → eth/builtin}/erc20bytes/index.ts +0 -0
  381. package/src/{builtin → eth/builtin}/erc20bytes/test-utils.ts +0 -0
  382. package/src/{builtin → eth/builtin}/erc721/index.ts +0 -0
  383. package/src/{builtin → eth/builtin}/erc721/test-utils.ts +0 -0
  384. package/src/{builtin → eth/builtin}/index.ts +0 -0
  385. package/src/{builtin → eth/builtin}/internal/EACAggregatorProxy.ts +5 -9
  386. package/src/{builtin → eth/builtin}/internal/ERC1155.ts +5 -9
  387. package/src/{builtin → eth/builtin}/internal/ERC20.ts +4 -7
  388. package/src/{builtin → eth/builtin}/internal/ERC20Bytes.ts +3 -5
  389. package/src/{builtin → eth/builtin}/internal/ERC721.ts +4 -7
  390. package/src/{builtin → eth/builtin}/internal/WETH9.ts +5 -9
  391. package/src/eth/builtin/internal/common.ts +22 -0
  392. package/src/{builtin → eth/builtin}/internal/eacaggregatorproxy_processor.ts +92 -164
  393. package/src/{builtin → eth/builtin}/internal/erc1155_processor.ts +27 -51
  394. package/src/{builtin → eth/builtin}/internal/erc20_processor.ts +42 -74
  395. package/src/{builtin → eth/builtin}/internal/erc20bytes_processor.ts +32 -56
  396. package/src/{builtin → eth/builtin}/internal/erc721_processor.ts +47 -83
  397. package/src/{builtin → eth/builtin}/internal/factories/EACAggregatorProxy__factory.ts +1 -1
  398. package/src/{builtin → eth/builtin}/internal/factories/ERC1155__factory.ts +1 -1
  399. package/src/{builtin → eth/builtin}/internal/factories/ERC20Bytes__factory.ts +1 -1
  400. package/src/{builtin → eth/builtin}/internal/factories/ERC20__factory.ts +1 -1
  401. package/src/{builtin → eth/builtin}/internal/factories/ERC721__factory.ts +1 -1
  402. package/src/{builtin → eth/builtin}/internal/factories/WETH9__factory.ts +1 -1
  403. package/src/{builtin → eth/builtin}/internal/factories/index.ts +0 -0
  404. package/src/{builtin → eth/builtin}/internal/index.ts +0 -0
  405. package/src/{builtin → eth/builtin}/internal/weth9_processor.ts +32 -56
  406. package/src/{builtin → eth/builtin}/weth9/index.ts +0 -0
  407. package/src/{builtin → eth/builtin}/weth9/test-utils.ts +0 -0
  408. package/src/eth/codegen/codegen.ts +62 -0
  409. package/src/{target-ethers-sentio/index.cts → eth/codegen/ethers-sentio.ts} +2 -2
  410. package/src/{target-ethers-sentio/event-handler.cts → eth/codegen/event-handler.ts} +2 -2
  411. package/src/{target-ethers-sentio/file.cts → eth/codegen/file.ts} +7 -7
  412. package/src/{target-ethers-sentio/functions-handler.cts → eth/codegen/functions-handler.ts} +4 -4
  413. package/src/eth/codegen/index.ts +1 -0
  414. package/src/eth/codegen/run.ts +12 -0
  415. package/src/eth/codegen/tsconfig.json +8 -0
  416. package/src/{target-ethers-sentio/types.cts → eth/codegen/types.ts} +1 -1
  417. package/src/{target-ethers-sentio/view-function.cts → eth/codegen/view-function.ts} +7 -12
  418. package/src/{core → eth}/context.ts +8 -9
  419. package/src/eth/error.ts +4 -0
  420. package/src/eth/eth.ts +56 -0
  421. package/src/eth/generic-processor.ts +3 -3
  422. package/src/eth/index.ts +6 -2
  423. package/src/eth/provider.ts +4 -3
  424. package/src/index.ts +1 -6
  425. package/src/jest.config.ts +8 -0
  426. package/src/solana/builtin/index.ts +1 -0
  427. package/src/solana/builtin/spl-token-processor.ts +298 -0
  428. package/src/solana/builtin/types.ts +279 -0
  429. package/src/solana/codegen/codegen.ts +140 -0
  430. package/src/solana/codegen/index.ts +1 -0
  431. package/src/solana/codegen/run.ts +12 -0
  432. package/src/solana/codegen/tsconfig.json +8 -0
  433. package/src/solana/index.ts +4 -0
  434. package/src/solana/solana-context.ts +30 -0
  435. package/src/solana/solana-options.ts +11 -0
  436. package/src/solana/solana-plugin.ts +103 -0
  437. package/src/solana/solana-processor.ts +102 -0
  438. package/src/solana/tests/abis/basic_1.json +62 -0
  439. package/src/solana/tests/abis/token_bridge.json +937 -0
  440. package/src/solana/tests/types/basic_1.ts +62 -0
  441. package/src/solana/tests/types/basic_1_processor.ts +42 -0
  442. package/src/solana/tests/types/token_bridge.ts +937 -0
  443. package/src/solana/tests/types/token_bridge_processor.ts +150 -0
  444. package/src/solana/tests/wormhole-token-bridge.ts +96 -0
  445. package/src/testing/test-processor-server.ts +1 -1
  446. package/src/testing/test-provider.ts +1 -1
  447. package/src/tsup.config.ts +3 -0
  448. package/src/utils/conversion.ts +21 -25
  449. package/src/utils/dex-price.ts +2 -3
  450. package/src/utils/index.ts +4 -4
  451. package/src/utils/token.ts +19 -30
  452. package/lib/builtin/eacaggregatorproxy/index.js.map +0 -1
  453. package/lib/builtin/eacaggregatorproxy/test-utils.js.map +0 -1
  454. package/lib/builtin/erc1155/index.js.map +0 -1
  455. package/lib/builtin/erc1155/test-utils.js.map +0 -1
  456. package/lib/builtin/erc20/index.js.map +0 -1
  457. package/lib/builtin/erc20/test-utils.js.map +0 -1
  458. package/lib/builtin/erc20bytes/index.js.map +0 -1
  459. package/lib/builtin/erc20bytes/test-utils.js.map +0 -1
  460. package/lib/builtin/erc721/index.js.map +0 -1
  461. package/lib/builtin/erc721/test-utils.js.map +0 -1
  462. package/lib/builtin/index.js.map +0 -1
  463. package/lib/builtin/internal/EACAggregatorProxy.js.map +0 -1
  464. package/lib/builtin/internal/ERC1155.js.map +0 -1
  465. package/lib/builtin/internal/ERC20.js.map +0 -1
  466. package/lib/builtin/internal/ERC20Bytes.js.map +0 -1
  467. package/lib/builtin/internal/ERC721.js.map +0 -1
  468. package/lib/builtin/internal/WETH9.js.map +0 -1
  469. package/lib/builtin/internal/common.js.map +0 -1
  470. package/lib/builtin/internal/eacaggregatorproxy_processor.js.map +0 -1
  471. package/lib/builtin/internal/erc1155_processor.js.map +0 -1
  472. package/lib/builtin/internal/erc20_processor.js.map +0 -1
  473. package/lib/builtin/internal/erc20bytes_processor.js.map +0 -1
  474. package/lib/builtin/internal/erc721_processor.js.map +0 -1
  475. package/lib/builtin/internal/factories/EACAggregatorProxy__factory.js.map +0 -1
  476. package/lib/builtin/internal/factories/ERC1155__factory.js.map +0 -1
  477. package/lib/builtin/internal/factories/ERC20Bytes__factory.js.map +0 -1
  478. package/lib/builtin/internal/factories/ERC20__factory.js.map +0 -1
  479. package/lib/builtin/internal/factories/ERC721__factory.js.map +0 -1
  480. package/lib/builtin/internal/factories/WETH9__factory.js.map +0 -1
  481. package/lib/builtin/internal/factories/index.js.map +0 -1
  482. package/lib/builtin/internal/index.js.map +0 -1
  483. package/lib/builtin/internal/weth9_processor.js.map +0 -1
  484. package/lib/builtin/weth9/index.js.map +0 -1
  485. package/lib/builtin/weth9/test-utils.js.map +0 -1
  486. package/lib/core/bind-options.js.map +0 -1
  487. package/lib/core/context.js.map +0 -1
  488. package/lib/error.d.ts +0 -7
  489. package/lib/error.js.map +0 -1
  490. package/lib/target-ethers-sentio/event-handler.cjs +0 -52
  491. package/lib/target-ethers-sentio/event-handler.cjs.map +0 -1
  492. package/lib/target-ethers-sentio/file.cjs.map +0 -1
  493. package/lib/target-ethers-sentio/functions-handler.cjs.map +0 -1
  494. package/lib/target-ethers-sentio/index.cjs +0 -61
  495. package/lib/target-ethers-sentio/index.cjs.map +0 -1
  496. package/lib/target-ethers-sentio/types.cjs.map +0 -1
  497. package/lib/target-ethers-sentio/view-function.cjs +0 -74
  498. package/lib/target-ethers-sentio/view-function.cjs.map +0 -1
  499. package/lib/utils/chain.js.map +0 -1
  500. package/src/builtin/internal/common.ts +0 -46
  501. package/src/error.ts +0 -45
  502. package/src/target-ethers-sentio/.eslintrc.json +0 -14
  503. package/src/target-ethers-sentio/tsconfig.json +0 -9
@@ -0,0 +1,1010 @@
1
+ /* Autogenerated file. Do not edit manually. */
2
+ /* tslint:disable */
3
+ /* eslint-disable */
4
+
5
+ /* Generated modules for account 0x3 */
6
+
7
+ import {
8
+ MoveCoder,
9
+ AptosBindOptions,
10
+ AptosBaseProcessor,
11
+ TypedEventInstance,
12
+ AptosNetwork,
13
+ TypedEntryFunctionPayload,
14
+ AptosContext,
15
+ CallFilter,
16
+ } from "@sentio/sdk/aptos";
17
+ import { AptosFetchConfig } from "@sentio/protos";
18
+ import { Address, MoveModule } from "@sentio/sdk/aptos";
19
+
20
+ import * as _0x1 from "./0x1.js";
21
+
22
+ export class token extends AptosBaseProcessor {
23
+ constructor(options: AptosBindOptions) {
24
+ super("token", options);
25
+ }
26
+ static DEFAULT_OPTIONS: AptosBindOptions = {
27
+ address: "0x3",
28
+ network: AptosNetwork.MAIN_NET,
29
+ };
30
+
31
+ static bind(options: Partial<AptosBindOptions> = {}): token {
32
+ return new token({ ...token.DEFAULT_OPTIONS, ...options });
33
+ }
34
+
35
+ onEntryBurn(
36
+ func: (call: token.BurnPayload, ctx: AptosContext) => void,
37
+ filter?: CallFilter,
38
+ fetchConfig?: AptosFetchConfig
39
+ ): token {
40
+ this.onEntryFunctionCall(
41
+ func,
42
+ {
43
+ ...filter,
44
+ function: "token::burn",
45
+ },
46
+ fetchConfig
47
+ );
48
+ return this;
49
+ }
50
+
51
+ onEntryBurnByCreator(
52
+ func: (call: token.BurnByCreatorPayload, ctx: AptosContext) => void,
53
+ filter?: CallFilter,
54
+ fetchConfig?: AptosFetchConfig
55
+ ): token {
56
+ this.onEntryFunctionCall(
57
+ func,
58
+ {
59
+ ...filter,
60
+ function: "token::burn_by_creator",
61
+ },
62
+ fetchConfig
63
+ );
64
+ return this;
65
+ }
66
+
67
+ onEntryCreateCollectionScript(
68
+ func: (
69
+ call: token.CreateCollectionScriptPayload,
70
+ ctx: AptosContext
71
+ ) => void,
72
+ filter?: CallFilter,
73
+ fetchConfig?: AptosFetchConfig
74
+ ): token {
75
+ this.onEntryFunctionCall(
76
+ func,
77
+ {
78
+ ...filter,
79
+ function: "token::create_collection_script",
80
+ },
81
+ fetchConfig
82
+ );
83
+ return this;
84
+ }
85
+
86
+ onEntryCreateTokenScript(
87
+ func: (call: token.CreateTokenScriptPayload, ctx: AptosContext) => void,
88
+ filter?: CallFilter,
89
+ fetchConfig?: AptosFetchConfig
90
+ ): token {
91
+ this.onEntryFunctionCall(
92
+ func,
93
+ {
94
+ ...filter,
95
+ function: "token::create_token_script",
96
+ },
97
+ fetchConfig
98
+ );
99
+ return this;
100
+ }
101
+
102
+ onEntryDirectTransferScript(
103
+ func: (call: token.DirectTransferScriptPayload, ctx: AptosContext) => void,
104
+ filter?: CallFilter,
105
+ fetchConfig?: AptosFetchConfig
106
+ ): token {
107
+ this.onEntryFunctionCall(
108
+ func,
109
+ {
110
+ ...filter,
111
+ function: "token::direct_transfer_script",
112
+ },
113
+ fetchConfig
114
+ );
115
+ return this;
116
+ }
117
+
118
+ onEntryInitializeTokenScript(
119
+ func: (call: token.InitializeTokenScriptPayload, ctx: AptosContext) => void,
120
+ filter?: CallFilter,
121
+ fetchConfig?: AptosFetchConfig
122
+ ): token {
123
+ this.onEntryFunctionCall(
124
+ func,
125
+ {
126
+ ...filter,
127
+ function: "token::initialize_token_script",
128
+ },
129
+ fetchConfig
130
+ );
131
+ return this;
132
+ }
133
+
134
+ onEntryMintScript(
135
+ func: (call: token.MintScriptPayload, ctx: AptosContext) => void,
136
+ filter?: CallFilter,
137
+ fetchConfig?: AptosFetchConfig
138
+ ): token {
139
+ this.onEntryFunctionCall(
140
+ func,
141
+ {
142
+ ...filter,
143
+ function: "token::mint_script",
144
+ },
145
+ fetchConfig
146
+ );
147
+ return this;
148
+ }
149
+
150
+ onEntryMutateTokenProperties(
151
+ func: (call: token.MutateTokenPropertiesPayload, ctx: AptosContext) => void,
152
+ filter?: CallFilter,
153
+ fetchConfig?: AptosFetchConfig
154
+ ): token {
155
+ this.onEntryFunctionCall(
156
+ func,
157
+ {
158
+ ...filter,
159
+ function: "token::mutate_token_properties",
160
+ },
161
+ fetchConfig
162
+ );
163
+ return this;
164
+ }
165
+
166
+ onEntryOptInDirectTransfer(
167
+ func: (call: token.OptInDirectTransferPayload, ctx: AptosContext) => void,
168
+ filter?: CallFilter,
169
+ fetchConfig?: AptosFetchConfig
170
+ ): token {
171
+ this.onEntryFunctionCall(
172
+ func,
173
+ {
174
+ ...filter,
175
+ function: "token::opt_in_direct_transfer",
176
+ },
177
+ fetchConfig
178
+ );
179
+ return this;
180
+ }
181
+
182
+ onEventCreateCollectionEvent(
183
+ func: (
184
+ event: token.CreateCollectionEventInstance,
185
+ ctx: AptosContext
186
+ ) => void,
187
+ fetchConfig?: AptosFetchConfig
188
+ ): token {
189
+ this.onEvent(
190
+ func,
191
+ {
192
+ type: "token::CreateCollectionEvent",
193
+ },
194
+ fetchConfig
195
+ );
196
+ return this;
197
+ }
198
+
199
+ onEventCreateTokenDataEvent(
200
+ func: (
201
+ event: token.CreateTokenDataEventInstance,
202
+ ctx: AptosContext
203
+ ) => void,
204
+ fetchConfig?: AptosFetchConfig
205
+ ): token {
206
+ this.onEvent(
207
+ func,
208
+ {
209
+ type: "token::CreateTokenDataEvent",
210
+ },
211
+ fetchConfig
212
+ );
213
+ return this;
214
+ }
215
+
216
+ onEventMintTokenEvent(
217
+ func: (event: token.MintTokenEventInstance, ctx: AptosContext) => void,
218
+ fetchConfig?: AptosFetchConfig
219
+ ): token {
220
+ this.onEvent(
221
+ func,
222
+ {
223
+ type: "token::MintTokenEvent",
224
+ },
225
+ fetchConfig
226
+ );
227
+ return this;
228
+ }
229
+
230
+ onEventDepositEvent(
231
+ func: (event: token.DepositEventInstance, ctx: AptosContext) => void,
232
+ fetchConfig?: AptosFetchConfig
233
+ ): token {
234
+ this.onEvent(
235
+ func,
236
+ {
237
+ type: "token::DepositEvent",
238
+ },
239
+ fetchConfig
240
+ );
241
+ return this;
242
+ }
243
+
244
+ onEventWithdrawEvent(
245
+ func: (event: token.WithdrawEventInstance, ctx: AptosContext) => void,
246
+ fetchConfig?: AptosFetchConfig
247
+ ): token {
248
+ this.onEvent(
249
+ func,
250
+ {
251
+ type: "token::WithdrawEvent",
252
+ },
253
+ fetchConfig
254
+ );
255
+ return this;
256
+ }
257
+
258
+ onEventBurnTokenEvent(
259
+ func: (event: token.BurnTokenEventInstance, ctx: AptosContext) => void,
260
+ fetchConfig?: AptosFetchConfig
261
+ ): token {
262
+ this.onEvent(
263
+ func,
264
+ {
265
+ type: "token::BurnTokenEvent",
266
+ },
267
+ fetchConfig
268
+ );
269
+ return this;
270
+ }
271
+
272
+ onEventMutateTokenPropertyMapEvent(
273
+ func: (
274
+ event: token.MutateTokenPropertyMapEventInstance,
275
+ ctx: AptosContext
276
+ ) => void,
277
+ fetchConfig?: AptosFetchConfig
278
+ ): token {
279
+ this.onEvent(
280
+ func,
281
+ {
282
+ type: "token::MutateTokenPropertyMapEvent",
283
+ },
284
+ fetchConfig
285
+ );
286
+ return this;
287
+ }
288
+
289
+ loadTypesInternal(registry: MoveCoder) {
290
+ loadAllTypes(registry);
291
+ }
292
+ }
293
+
294
+ export namespace token {
295
+ export class BurnTokenEvent {
296
+ static TYPE_QNAME = "0x3::token::BurnTokenEvent";
297
+ id: token.TokenId;
298
+ amount: bigint;
299
+ }
300
+
301
+ export interface BurnTokenEventInstance
302
+ extends TypedEventInstance<BurnTokenEvent> {
303
+ data_decoded: BurnTokenEvent;
304
+ type_arguments: [];
305
+ }
306
+
307
+ export class CollectionData {
308
+ static TYPE_QNAME = "0x3::token::CollectionData";
309
+ description: string;
310
+ name: string;
311
+ uri: string;
312
+ supply: bigint;
313
+ maximum: bigint;
314
+ mutability_config: token.CollectionMutabilityConfig;
315
+ }
316
+
317
+ export class CollectionMutabilityConfig {
318
+ static TYPE_QNAME = "0x3::token::CollectionMutabilityConfig";
319
+ description: Boolean;
320
+ uri: Boolean;
321
+ maximum: Boolean;
322
+ }
323
+
324
+ export class Collections {
325
+ static TYPE_QNAME = "0x3::token::Collections";
326
+ collection_data: _0x1.table.Table<string, token.CollectionData>;
327
+ token_data: _0x1.table.Table<token.TokenDataId, token.TokenData>;
328
+ create_collection_events: _0x1.event.EventHandle<token.CreateCollectionEvent>;
329
+ create_token_data_events: _0x1.event.EventHandle<token.CreateTokenDataEvent>;
330
+ mint_token_events: _0x1.event.EventHandle<token.MintTokenEvent>;
331
+ }
332
+
333
+ export class CreateCollectionEvent {
334
+ static TYPE_QNAME = "0x3::token::CreateCollectionEvent";
335
+ creator: Address;
336
+ collection_name: string;
337
+ uri: string;
338
+ description: string;
339
+ maximum: bigint;
340
+ }
341
+
342
+ export interface CreateCollectionEventInstance
343
+ extends TypedEventInstance<CreateCollectionEvent> {
344
+ data_decoded: CreateCollectionEvent;
345
+ type_arguments: [];
346
+ }
347
+
348
+ export class CreateTokenDataEvent {
349
+ static TYPE_QNAME = "0x3::token::CreateTokenDataEvent";
350
+ id: token.TokenDataId;
351
+ description: string;
352
+ maximum: bigint;
353
+ uri: string;
354
+ royalty_payee_address: Address;
355
+ royalty_points_denominator: bigint;
356
+ royalty_points_numerator: bigint;
357
+ name: string;
358
+ mutability_config: token.TokenMutabilityConfig;
359
+ property_keys: string[];
360
+ property_values: string[];
361
+ property_types: string[];
362
+ }
363
+
364
+ export interface CreateTokenDataEventInstance
365
+ extends TypedEventInstance<CreateTokenDataEvent> {
366
+ data_decoded: CreateTokenDataEvent;
367
+ type_arguments: [];
368
+ }
369
+
370
+ export class DepositEvent {
371
+ static TYPE_QNAME = "0x3::token::DepositEvent";
372
+ id: token.TokenId;
373
+ amount: bigint;
374
+ }
375
+
376
+ export interface DepositEventInstance
377
+ extends TypedEventInstance<DepositEvent> {
378
+ data_decoded: DepositEvent;
379
+ type_arguments: [];
380
+ }
381
+
382
+ export class MintTokenEvent {
383
+ static TYPE_QNAME = "0x3::token::MintTokenEvent";
384
+ id: token.TokenDataId;
385
+ amount: bigint;
386
+ }
387
+
388
+ export interface MintTokenEventInstance
389
+ extends TypedEventInstance<MintTokenEvent> {
390
+ data_decoded: MintTokenEvent;
391
+ type_arguments: [];
392
+ }
393
+
394
+ export class MutateTokenPropertyMapEvent {
395
+ static TYPE_QNAME = "0x3::token::MutateTokenPropertyMapEvent";
396
+ old_id: token.TokenId;
397
+ new_id: token.TokenId;
398
+ keys: string[];
399
+ values: string[];
400
+ types: string[];
401
+ }
402
+
403
+ export interface MutateTokenPropertyMapEventInstance
404
+ extends TypedEventInstance<MutateTokenPropertyMapEvent> {
405
+ data_decoded: MutateTokenPropertyMapEvent;
406
+ type_arguments: [];
407
+ }
408
+
409
+ export class Royalty {
410
+ static TYPE_QNAME = "0x3::token::Royalty";
411
+ royalty_points_numerator: bigint;
412
+ royalty_points_denominator: bigint;
413
+ payee_address: Address;
414
+ }
415
+
416
+ export class Token {
417
+ static TYPE_QNAME = "0x3::token::Token";
418
+ id: token.TokenId;
419
+ amount: bigint;
420
+ token_properties: property_map.PropertyMap;
421
+ }
422
+
423
+ export class TokenData {
424
+ static TYPE_QNAME = "0x3::token::TokenData";
425
+ maximum: bigint;
426
+ largest_property_version: bigint;
427
+ supply: bigint;
428
+ uri: string;
429
+ royalty: token.Royalty;
430
+ name: string;
431
+ description: string;
432
+ default_properties: property_map.PropertyMap;
433
+ mutability_config: token.TokenMutabilityConfig;
434
+ }
435
+
436
+ export class TokenDataId {
437
+ static TYPE_QNAME = "0x3::token::TokenDataId";
438
+ creator: Address;
439
+ collection: string;
440
+ name: string;
441
+ }
442
+
443
+ export class TokenId {
444
+ static TYPE_QNAME = "0x3::token::TokenId";
445
+ token_data_id: token.TokenDataId;
446
+ property_version: bigint;
447
+ }
448
+
449
+ export class TokenMutabilityConfig {
450
+ static TYPE_QNAME = "0x3::token::TokenMutabilityConfig";
451
+ maximum: Boolean;
452
+ uri: Boolean;
453
+ royalty: Boolean;
454
+ description: Boolean;
455
+ properties: Boolean;
456
+ }
457
+
458
+ export class TokenStore {
459
+ static TYPE_QNAME = "0x3::token::TokenStore";
460
+ tokens: _0x1.table.Table<token.TokenId, token.Token>;
461
+ direct_transfer: Boolean;
462
+ deposit_events: _0x1.event.EventHandle<token.DepositEvent>;
463
+ withdraw_events: _0x1.event.EventHandle<token.WithdrawEvent>;
464
+ burn_events: _0x1.event.EventHandle<token.BurnTokenEvent>;
465
+ mutate_token_property_events: _0x1.event.EventHandle<token.MutateTokenPropertyMapEvent>;
466
+ }
467
+
468
+ export class WithdrawCapability {
469
+ static TYPE_QNAME = "0x3::token::WithdrawCapability";
470
+ token_owner: Address;
471
+ token_id: token.TokenId;
472
+ amount: bigint;
473
+ expiration_sec: bigint;
474
+ }
475
+
476
+ export class WithdrawEvent {
477
+ static TYPE_QNAME = "0x3::token::WithdrawEvent";
478
+ id: token.TokenId;
479
+ amount: bigint;
480
+ }
481
+
482
+ export interface WithdrawEventInstance
483
+ extends TypedEventInstance<WithdrawEvent> {
484
+ data_decoded: WithdrawEvent;
485
+ type_arguments: [];
486
+ }
487
+
488
+ export interface BurnPayload
489
+ extends TypedEntryFunctionPayload<
490
+ [Address, string, string, bigint, bigint]
491
+ > {
492
+ arguments_decoded: [Address, string, string, bigint, bigint];
493
+ type_arguments: [];
494
+ }
495
+
496
+ export interface BurnByCreatorPayload
497
+ extends TypedEntryFunctionPayload<
498
+ [Address, string, string, bigint, bigint]
499
+ > {
500
+ arguments_decoded: [Address, string, string, bigint, bigint];
501
+ type_arguments: [];
502
+ }
503
+
504
+ export interface CreateCollectionScriptPayload
505
+ extends TypedEntryFunctionPayload<
506
+ [string, string, string, bigint, Boolean[]]
507
+ > {
508
+ arguments_decoded: [string, string, string, bigint, Boolean[]];
509
+ type_arguments: [];
510
+ }
511
+
512
+ export interface CreateTokenScriptPayload
513
+ extends TypedEntryFunctionPayload<
514
+ [
515
+ string,
516
+ string,
517
+ string,
518
+ bigint,
519
+ bigint,
520
+ string,
521
+ Address,
522
+ bigint,
523
+ bigint,
524
+ Boolean[],
525
+ string[],
526
+ string[],
527
+ string[]
528
+ ]
529
+ > {
530
+ arguments_decoded: [
531
+ string,
532
+ string,
533
+ string,
534
+ bigint,
535
+ bigint,
536
+ string,
537
+ Address,
538
+ bigint,
539
+ bigint,
540
+ Boolean[],
541
+ string[],
542
+ string[],
543
+ string[]
544
+ ];
545
+ type_arguments: [];
546
+ }
547
+
548
+ export interface DirectTransferScriptPayload
549
+ extends TypedEntryFunctionPayload<
550
+ [Address, Address, string, string, bigint, bigint]
551
+ > {
552
+ arguments_decoded: [Address, Address, string, string, bigint, bigint];
553
+ type_arguments: [];
554
+ }
555
+
556
+ export interface InitializeTokenScriptPayload
557
+ extends TypedEntryFunctionPayload<[]> {
558
+ arguments_decoded: [];
559
+ type_arguments: [];
560
+ }
561
+
562
+ export interface MintScriptPayload
563
+ extends TypedEntryFunctionPayload<[Address, string, string, bigint]> {
564
+ arguments_decoded: [Address, string, string, bigint];
565
+ type_arguments: [];
566
+ }
567
+
568
+ export interface MutateTokenPropertiesPayload
569
+ extends TypedEntryFunctionPayload<
570
+ [
571
+ Address,
572
+ Address,
573
+ string,
574
+ string,
575
+ bigint,
576
+ bigint,
577
+ string[],
578
+ string[],
579
+ string[]
580
+ ]
581
+ > {
582
+ arguments_decoded: [
583
+ Address,
584
+ Address,
585
+ string,
586
+ string,
587
+ bigint,
588
+ bigint,
589
+ string[],
590
+ string[],
591
+ string[]
592
+ ];
593
+ type_arguments: [];
594
+ }
595
+
596
+ export interface OptInDirectTransferPayload
597
+ extends TypedEntryFunctionPayload<[Boolean]> {
598
+ arguments_decoded: [Boolean];
599
+ type_arguments: [];
600
+ }
601
+
602
+ export function loadTypes(_r: MoveCoder) {
603
+ loadAllTypes(_r);
604
+ }
605
+ export const ABI: MoveModule = JSON.parse(
606
+ '{"address":"0x3","name":"token","friends":[],"exposed_functions":[{"name":"balance_of","visibility":"public","is_entry":false,"generic_type_params":[],"params":["address","0x3::token::TokenId"],"return":["u64"]},{"name":"burn","visibility":"public","is_entry":true,"generic_type_params":[],"params":["&signer","address","0x1::string::String","0x1::string::String","u64","u64"],"return":[]},{"name":"burn_by_creator","visibility":"public","is_entry":true,"generic_type_params":[],"params":["&signer","address","0x1::string::String","0x1::string::String","u64","u64"],"return":[]},{"name":"check_collection_exists","visibility":"public","is_entry":false,"generic_type_params":[],"params":["address","0x1::string::String"],"return":["bool"]},{"name":"check_tokendata_exists","visibility":"public","is_entry":false,"generic_type_params":[],"params":["address","0x1::string::String","0x1::string::String"],"return":["bool"]},{"name":"create_collection","visibility":"public","is_entry":false,"generic_type_params":[],"params":["&signer","0x1::string::String","0x1::string::String","0x1::string::String","u64","vector<bool>"],"return":[]},{"name":"create_collection_mutability_config","visibility":"public","is_entry":false,"generic_type_params":[],"params":["&vector<bool>"],"return":["0x3::token::CollectionMutabilityConfig"]},{"name":"create_collection_script","visibility":"public","is_entry":true,"generic_type_params":[],"params":["&signer","0x1::string::String","0x1::string::String","0x1::string::String","u64","vector<bool>"],"return":[]},{"name":"create_token_data_id","visibility":"public","is_entry":false,"generic_type_params":[],"params":["address","0x1::string::String","0x1::string::String"],"return":["0x3::token::TokenDataId"]},{"name":"create_token_id","visibility":"public","is_entry":false,"generic_type_params":[],"params":["0x3::token::TokenDataId","u64"],"return":["0x3::token::TokenId"]},{"name":"create_token_id_raw","visibility":"public","is_entry":false,"generic_type_params":[],"params":["address","0x1::string::String","0x1::string::String","u64"],"return":["0x3::token::TokenId"]},{"name":"create_token_mutability_config","visibility":"public","is_entry":false,"generic_type_params":[],"params":["&vector<bool>"],"return":["0x3::token::TokenMutabilityConfig"]},{"name":"create_token_script","visibility":"public","is_entry":true,"generic_type_params":[],"params":["&signer","0x1::string::String","0x1::string::String","0x1::string::String","u64","u64","0x1::string::String","address","u64","u64","vector<bool>","vector<0x1::string::String>","vector<vector<u8>>","vector<0x1::string::String>"],"return":[]},{"name":"create_tokendata","visibility":"public","is_entry":false,"generic_type_params":[],"params":["&signer","0x1::string::String","0x1::string::String","0x1::string::String","u64","0x1::string::String","address","u64","u64","0x3::token::TokenMutabilityConfig","vector<0x1::string::String>","vector<vector<u8>>","vector<0x1::string::String>"],"return":["0x3::token::TokenDataId"]},{"name":"create_withdraw_capability","visibility":"public","is_entry":false,"generic_type_params":[],"params":["&signer","0x3::token::TokenId","u64","u64"],"return":["0x3::token::WithdrawCapability"]},{"name":"deposit_token","visibility":"public","is_entry":false,"generic_type_params":[],"params":["&signer","0x3::token::Token"],"return":[]},{"name":"direct_deposit_with_opt_in","visibility":"public","is_entry":false,"generic_type_params":[],"params":["address","0x3::token::Token"],"return":[]},{"name":"direct_transfer","visibility":"public","is_entry":false,"generic_type_params":[],"params":["&signer","&signer","0x3::token::TokenId","u64"],"return":[]},{"name":"direct_transfer_script","visibility":"public","is_entry":true,"generic_type_params":[],"params":["&signer","&signer","address","0x1::string::String","0x1::string::String","u64","u64"],"return":[]},{"name":"get_collection_supply","visibility":"public","is_entry":false,"generic_type_params":[],"params":["address","0x1::string::String"],"return":["0x1::option::Option<u64>"]},{"name":"get_property_map","visibility":"public","is_entry":false,"generic_type_params":[],"params":["address","0x3::token::TokenId"],"return":["0x3::property_map::PropertyMap"]},{"name":"get_royalty","visibility":"public","is_entry":false,"generic_type_params":[],"params":["0x3::token::TokenId"],"return":["0x3::token::Royalty"]},{"name":"get_royalty_denominator","visibility":"public","is_entry":false,"generic_type_params":[],"params":["&0x3::token::Royalty"],"return":["u64"]},{"name":"get_royalty_numerator","visibility":"public","is_entry":false,"generic_type_params":[],"params":["&0x3::token::Royalty"],"return":["u64"]},{"name":"get_royalty_payee","visibility":"public","is_entry":false,"generic_type_params":[],"params":["&0x3::token::Royalty"],"return":["address"]},{"name":"get_token_amount","visibility":"public","is_entry":false,"generic_type_params":[],"params":["&0x3::token::Token"],"return":["u64"]},{"name":"get_token_data_id_fields","visibility":"public","is_entry":false,"generic_type_params":[],"params":["&0x3::token::TokenDataId"],"return":["address","0x1::string::String","0x1::string::String"]},{"name":"get_token_id","visibility":"public","is_entry":false,"generic_type_params":[],"params":["&0x3::token::Token"],"return":["0x3::token::TokenId"]},{"name":"get_token_id_fields","visibility":"public","is_entry":false,"generic_type_params":[],"params":["&0x3::token::TokenId"],"return":["address","0x1::string::String","0x1::string::String","u64"]},{"name":"get_token_supply","visibility":"public","is_entry":false,"generic_type_params":[],"params":["address","0x3::token::TokenDataId"],"return":["0x1::option::Option<u64>"]},{"name":"get_tokendata_largest_property_version","visibility":"public","is_entry":false,"generic_type_params":[],"params":["address","0x3::token::TokenDataId"],"return":["u64"]},{"name":"get_tokendata_uri","visibility":"public","is_entry":false,"generic_type_params":[],"params":["address","0x3::token::TokenDataId"],"return":["0x1::string::String"]},{"name":"has_token_store","visibility":"public","is_entry":false,"generic_type_params":[],"params":["address"],"return":["bool"]},{"name":"initialize_token","visibility":"public","is_entry":false,"generic_type_params":[],"params":["&signer","0x3::token::TokenId"],"return":[]},{"name":"initialize_token_script","visibility":"public","is_entry":true,"generic_type_params":[],"params":["&signer"],"return":[]},{"name":"initialize_token_store","visibility":"public","is_entry":false,"generic_type_params":[],"params":["&signer"],"return":[]},{"name":"merge","visibility":"public","is_entry":false,"generic_type_params":[],"params":["&mut 0x3::token::Token","0x3::token::Token"],"return":[]},{"name":"mint_script","visibility":"public","is_entry":true,"generic_type_params":[],"params":["&signer","address","0x1::string::String","0x1::string::String","u64"],"return":[]},{"name":"mint_token","visibility":"public","is_entry":false,"generic_type_params":[],"params":["&signer","0x3::token::TokenDataId","u64"],"return":["0x3::token::TokenId"]},{"name":"mint_token_to","visibility":"public","is_entry":false,"generic_type_params":[],"params":["&signer","address","0x3::token::TokenDataId","u64"],"return":[]},{"name":"mutate_one_token","visibility":"public","is_entry":false,"generic_type_params":[],"params":["&signer","address","0x3::token::TokenId","vector<0x1::string::String>","vector<vector<u8>>","vector<0x1::string::String>"],"return":["0x3::token::TokenId"]},{"name":"mutate_token_properties","visibility":"public","is_entry":true,"generic_type_params":[],"params":["&signer","address","address","0x1::string::String","0x1::string::String","u64","u64","vector<0x1::string::String>","vector<vector<u8>>","vector<0x1::string::String>"],"return":[]},{"name":"mutate_tokendata_property","visibility":"public","is_entry":false,"generic_type_params":[],"params":["&signer","0x3::token::TokenDataId","vector<0x1::string::String>","vector<vector<u8>>","vector<0x1::string::String>"],"return":[]},{"name":"mutate_tokendata_uri","visibility":"public","is_entry":false,"generic_type_params":[],"params":["&signer","0x3::token::TokenDataId","0x1::string::String"],"return":[]},{"name":"opt_in_direct_transfer","visibility":"public","is_entry":true,"generic_type_params":[],"params":["&signer","bool"],"return":[]},{"name":"split","visibility":"public","is_entry":false,"generic_type_params":[],"params":["&mut 0x3::token::Token","u64"],"return":["0x3::token::Token"]},{"name":"token_id","visibility":"public","is_entry":false,"generic_type_params":[],"params":["&0x3::token::Token"],"return":["&0x3::token::TokenId"]},{"name":"transfer","visibility":"public","is_entry":false,"generic_type_params":[],"params":["&signer","0x3::token::TokenId","address","u64"],"return":[]},{"name":"withdraw_token","visibility":"public","is_entry":false,"generic_type_params":[],"params":["&signer","0x3::token::TokenId","u64"],"return":["0x3::token::Token"]},{"name":"withdraw_with_capability","visibility":"public","is_entry":false,"generic_type_params":[],"params":["0x3::token::WithdrawCapability"],"return":["0x3::token::Token"]}],"structs":[{"name":"BurnTokenEvent","is_native":false,"abilities":["drop","store"],"generic_type_params":[],"fields":[{"name":"id","type":"0x3::token::TokenId"},{"name":"amount","type":"u64"}]},{"name":"CollectionData","is_native":false,"abilities":["store"],"generic_type_params":[],"fields":[{"name":"description","type":"0x1::string::String"},{"name":"name","type":"0x1::string::String"},{"name":"uri","type":"0x1::string::String"},{"name":"supply","type":"u64"},{"name":"maximum","type":"u64"},{"name":"mutability_config","type":"0x3::token::CollectionMutabilityConfig"}]},{"name":"CollectionMutabilityConfig","is_native":false,"abilities":["copy","drop","store"],"generic_type_params":[],"fields":[{"name":"description","type":"bool"},{"name":"uri","type":"bool"},{"name":"maximum","type":"bool"}]},{"name":"Collections","is_native":false,"abilities":["key"],"generic_type_params":[],"fields":[{"name":"collection_data","type":"0x1::table::Table<0x1::string::String, 0x3::token::CollectionData>"},{"name":"token_data","type":"0x1::table::Table<0x3::token::TokenDataId, 0x3::token::TokenData>"},{"name":"create_collection_events","type":"0x1::event::EventHandle<0x3::token::CreateCollectionEvent>"},{"name":"create_token_data_events","type":"0x1::event::EventHandle<0x3::token::CreateTokenDataEvent>"},{"name":"mint_token_events","type":"0x1::event::EventHandle<0x3::token::MintTokenEvent>"}]},{"name":"CreateCollectionEvent","is_native":false,"abilities":["drop","store"],"generic_type_params":[],"fields":[{"name":"creator","type":"address"},{"name":"collection_name","type":"0x1::string::String"},{"name":"uri","type":"0x1::string::String"},{"name":"description","type":"0x1::string::String"},{"name":"maximum","type":"u64"}]},{"name":"CreateTokenDataEvent","is_native":false,"abilities":["drop","store"],"generic_type_params":[],"fields":[{"name":"id","type":"0x3::token::TokenDataId"},{"name":"description","type":"0x1::string::String"},{"name":"maximum","type":"u64"},{"name":"uri","type":"0x1::string::String"},{"name":"royalty_payee_address","type":"address"},{"name":"royalty_points_denominator","type":"u64"},{"name":"royalty_points_numerator","type":"u64"},{"name":"name","type":"0x1::string::String"},{"name":"mutability_config","type":"0x3::token::TokenMutabilityConfig"},{"name":"property_keys","type":"vector<0x1::string::String>"},{"name":"property_values","type":"vector<vector<u8>>"},{"name":"property_types","type":"vector<0x1::string::String>"}]},{"name":"DepositEvent","is_native":false,"abilities":["drop","store"],"generic_type_params":[],"fields":[{"name":"id","type":"0x3::token::TokenId"},{"name":"amount","type":"u64"}]},{"name":"MintTokenEvent","is_native":false,"abilities":["drop","store"],"generic_type_params":[],"fields":[{"name":"id","type":"0x3::token::TokenDataId"},{"name":"amount","type":"u64"}]},{"name":"MutateTokenPropertyMapEvent","is_native":false,"abilities":["drop","store"],"generic_type_params":[],"fields":[{"name":"old_id","type":"0x3::token::TokenId"},{"name":"new_id","type":"0x3::token::TokenId"},{"name":"keys","type":"vector<0x1::string::String>"},{"name":"values","type":"vector<vector<u8>>"},{"name":"types","type":"vector<0x1::string::String>"}]},{"name":"Royalty","is_native":false,"abilities":["copy","drop","store"],"generic_type_params":[],"fields":[{"name":"royalty_points_numerator","type":"u64"},{"name":"royalty_points_denominator","type":"u64"},{"name":"payee_address","type":"address"}]},{"name":"Token","is_native":false,"abilities":["store"],"generic_type_params":[],"fields":[{"name":"id","type":"0x3::token::TokenId"},{"name":"amount","type":"u64"},{"name":"token_properties","type":"0x3::property_map::PropertyMap"}]},{"name":"TokenData","is_native":false,"abilities":["store"],"generic_type_params":[],"fields":[{"name":"maximum","type":"u64"},{"name":"largest_property_version","type":"u64"},{"name":"supply","type":"u64"},{"name":"uri","type":"0x1::string::String"},{"name":"royalty","type":"0x3::token::Royalty"},{"name":"name","type":"0x1::string::String"},{"name":"description","type":"0x1::string::String"},{"name":"default_properties","type":"0x3::property_map::PropertyMap"},{"name":"mutability_config","type":"0x3::token::TokenMutabilityConfig"}]},{"name":"TokenDataId","is_native":false,"abilities":["copy","drop","store"],"generic_type_params":[],"fields":[{"name":"creator","type":"address"},{"name":"collection","type":"0x1::string::String"},{"name":"name","type":"0x1::string::String"}]},{"name":"TokenId","is_native":false,"abilities":["copy","drop","store"],"generic_type_params":[],"fields":[{"name":"token_data_id","type":"0x3::token::TokenDataId"},{"name":"property_version","type":"u64"}]},{"name":"TokenMutabilityConfig","is_native":false,"abilities":["copy","drop","store"],"generic_type_params":[],"fields":[{"name":"maximum","type":"bool"},{"name":"uri","type":"bool"},{"name":"royalty","type":"bool"},{"name":"description","type":"bool"},{"name":"properties","type":"bool"}]},{"name":"TokenStore","is_native":false,"abilities":["key"],"generic_type_params":[],"fields":[{"name":"tokens","type":"0x1::table::Table<0x3::token::TokenId, 0x3::token::Token>"},{"name":"direct_transfer","type":"bool"},{"name":"deposit_events","type":"0x1::event::EventHandle<0x3::token::DepositEvent>"},{"name":"withdraw_events","type":"0x1::event::EventHandle<0x3::token::WithdrawEvent>"},{"name":"burn_events","type":"0x1::event::EventHandle<0x3::token::BurnTokenEvent>"},{"name":"mutate_token_property_events","type":"0x1::event::EventHandle<0x3::token::MutateTokenPropertyMapEvent>"}]},{"name":"WithdrawCapability","is_native":false,"abilities":["drop","store"],"generic_type_params":[],"fields":[{"name":"token_owner","type":"address"},{"name":"token_id","type":"0x3::token::TokenId"},{"name":"amount","type":"u64"},{"name":"expiration_sec","type":"u64"}]},{"name":"WithdrawEvent","is_native":false,"abilities":["drop","store"],"generic_type_params":[],"fields":[{"name":"id","type":"0x3::token::TokenId"},{"name":"amount","type":"u64"}]}]}'
607
+ );
608
+ }
609
+
610
+ export namespace property_map {
611
+ export class PropertyMap {
612
+ static TYPE_QNAME = "0x3::property_map::PropertyMap";
613
+ map: _0x1.simple_map.SimpleMap<string, property_map.PropertyValue>;
614
+ }
615
+
616
+ export class PropertyValue {
617
+ static TYPE_QNAME = "0x3::property_map::PropertyValue";
618
+ value: string;
619
+ type: string;
620
+ }
621
+
622
+ export function loadTypes(_r: MoveCoder) {
623
+ loadAllTypes(_r);
624
+ }
625
+ export const ABI: MoveModule = JSON.parse(
626
+ '{"address":"0x3","name":"property_map","friends":[],"exposed_functions":[{"name":"add","visibility":"public","is_entry":false,"generic_type_params":[],"params":["&mut 0x3::property_map::PropertyMap","0x1::string::String","0x3::property_map::PropertyValue"],"return":[]},{"name":"borrow","visibility":"public","is_entry":false,"generic_type_params":[],"params":["&0x3::property_map::PropertyMap","&0x1::string::String"],"return":["&0x3::property_map::PropertyValue"]},{"name":"borrow_type","visibility":"public","is_entry":false,"generic_type_params":[],"params":["&0x3::property_map::PropertyValue"],"return":["0x1::string::String"]},{"name":"borrow_value","visibility":"public","is_entry":false,"generic_type_params":[],"params":["&0x3::property_map::PropertyValue"],"return":["vector<u8>"]},{"name":"contains_key","visibility":"public","is_entry":false,"generic_type_params":[],"params":["&0x3::property_map::PropertyMap","&0x1::string::String"],"return":["bool"]},{"name":"create_property_value","visibility":"public","is_entry":false,"generic_type_params":[{"constraints":["copy"]}],"params":["&T0"],"return":["0x3::property_map::PropertyValue"]},{"name":"create_property_value_raw","visibility":"public","is_entry":false,"generic_type_params":[],"params":["vector<u8>","0x1::string::String"],"return":["0x3::property_map::PropertyValue"]},{"name":"empty","visibility":"public","is_entry":false,"generic_type_params":[],"params":[],"return":["0x3::property_map::PropertyMap"]},{"name":"length","visibility":"public","is_entry":false,"generic_type_params":[],"params":["&0x3::property_map::PropertyMap"],"return":["u64"]},{"name":"new","visibility":"public","is_entry":false,"generic_type_params":[],"params":["vector<0x1::string::String>","vector<vector<u8>>","vector<0x1::string::String>"],"return":["0x3::property_map::PropertyMap"]},{"name":"read_address","visibility":"public","is_entry":false,"generic_type_params":[],"params":["&0x3::property_map::PropertyMap","&0x1::string::String"],"return":["address"]},{"name":"read_bool","visibility":"public","is_entry":false,"generic_type_params":[],"params":["&0x3::property_map::PropertyMap","&0x1::string::String"],"return":["bool"]},{"name":"read_string","visibility":"public","is_entry":false,"generic_type_params":[],"params":["&0x3::property_map::PropertyMap","&0x1::string::String"],"return":["0x1::string::String"]},{"name":"read_u128","visibility":"public","is_entry":false,"generic_type_params":[],"params":["&0x3::property_map::PropertyMap","&0x1::string::String"],"return":["u128"]},{"name":"read_u64","visibility":"public","is_entry":false,"generic_type_params":[],"params":["&0x3::property_map::PropertyMap","&0x1::string::String"],"return":["u64"]},{"name":"read_u8","visibility":"public","is_entry":false,"generic_type_params":[],"params":["&0x3::property_map::PropertyMap","&0x1::string::String"],"return":["u8"]},{"name":"remove","visibility":"public","is_entry":false,"generic_type_params":[],"params":["&mut 0x3::property_map::PropertyMap","&0x1::string::String"],"return":["0x1::string::String","0x3::property_map::PropertyValue"]},{"name":"update_property_map","visibility":"public","is_entry":false,"generic_type_params":[],"params":["&mut 0x3::property_map::PropertyMap","vector<0x1::string::String>","vector<vector<u8>>","vector<0x1::string::String>"],"return":[]},{"name":"update_property_value","visibility":"public","is_entry":false,"generic_type_params":[],"params":["&mut 0x3::property_map::PropertyMap","&0x1::string::String","0x3::property_map::PropertyValue"],"return":[]}],"structs":[{"name":"PropertyMap","is_native":false,"abilities":["copy","drop","store"],"generic_type_params":[],"fields":[{"name":"map","type":"0x1::simple_map::SimpleMap<0x1::string::String, 0x3::property_map::PropertyValue>"}]},{"name":"PropertyValue","is_native":false,"abilities":["copy","drop","store"],"generic_type_params":[],"fields":[{"name":"value","type":"vector<u8>"},{"name":"type","type":"0x1::string::String"}]}]}'
627
+ );
628
+ }
629
+
630
+ export class token_coin_swap extends AptosBaseProcessor {
631
+ constructor(options: AptosBindOptions) {
632
+ super("token_coin_swap", options);
633
+ }
634
+ static DEFAULT_OPTIONS: AptosBindOptions = {
635
+ address: "0x3",
636
+ network: AptosNetwork.MAIN_NET,
637
+ };
638
+
639
+ static bind(options: Partial<AptosBindOptions> = {}): token_coin_swap {
640
+ return new token_coin_swap({
641
+ ...token_coin_swap.DEFAULT_OPTIONS,
642
+ ...options,
643
+ });
644
+ }
645
+
646
+ onEntryListTokenForSwap(
647
+ func: (
648
+ call: token_coin_swap.ListTokenForSwapPayload,
649
+ ctx: AptosContext
650
+ ) => void,
651
+ filter?: CallFilter,
652
+ fetchConfig?: AptosFetchConfig
653
+ ): token_coin_swap {
654
+ this.onEntryFunctionCall(
655
+ func,
656
+ {
657
+ ...filter,
658
+ function: "token_coin_swap::list_token_for_swap",
659
+ },
660
+ fetchConfig
661
+ );
662
+ return this;
663
+ }
664
+
665
+ onEventTokenListingEvent(
666
+ func: (
667
+ event: token_coin_swap.TokenListingEventInstance,
668
+ ctx: AptosContext
669
+ ) => void,
670
+ fetchConfig?: AptosFetchConfig
671
+ ): token_coin_swap {
672
+ this.onEvent(
673
+ func,
674
+ {
675
+ type: "token_coin_swap::TokenListingEvent",
676
+ },
677
+ fetchConfig
678
+ );
679
+ return this;
680
+ }
681
+
682
+ onEventTokenSwapEvent(
683
+ func: (
684
+ event: token_coin_swap.TokenSwapEventInstance,
685
+ ctx: AptosContext
686
+ ) => void,
687
+ fetchConfig?: AptosFetchConfig
688
+ ): token_coin_swap {
689
+ this.onEvent(
690
+ func,
691
+ {
692
+ type: "token_coin_swap::TokenSwapEvent",
693
+ },
694
+ fetchConfig
695
+ );
696
+ return this;
697
+ }
698
+
699
+ loadTypesInternal(registry: MoveCoder) {
700
+ loadAllTypes(registry);
701
+ }
702
+ }
703
+
704
+ export namespace token_coin_swap {
705
+ export class TokenCoinSwap<T0> {
706
+ static TYPE_QNAME = "0x3::token_coin_swap::TokenCoinSwap";
707
+ token_amount: bigint;
708
+ min_price_per_token: bigint;
709
+ }
710
+
711
+ export class TokenEscrow {
712
+ static TYPE_QNAME = "0x3::token_coin_swap::TokenEscrow";
713
+ token: token.Token;
714
+ locked_until_secs: bigint;
715
+ }
716
+
717
+ export class TokenListingEvent {
718
+ static TYPE_QNAME = "0x3::token_coin_swap::TokenListingEvent";
719
+ token_id: token.TokenId;
720
+ amount: bigint;
721
+ min_price: bigint;
722
+ locked_until_secs: bigint;
723
+ coin_type_info: _0x1.type_info.TypeInfo;
724
+ }
725
+
726
+ export interface TokenListingEventInstance
727
+ extends TypedEventInstance<TokenListingEvent> {
728
+ data_decoded: TokenListingEvent;
729
+ type_arguments: [];
730
+ }
731
+
732
+ export class TokenListings<T0> {
733
+ static TYPE_QNAME = "0x3::token_coin_swap::TokenListings";
734
+ listings: _0x1.table.Table<
735
+ token.TokenId,
736
+ token_coin_swap.TokenCoinSwap<T0>
737
+ >;
738
+ listing_events: _0x1.event.EventHandle<token_coin_swap.TokenListingEvent>;
739
+ swap_events: _0x1.event.EventHandle<token_coin_swap.TokenSwapEvent>;
740
+ }
741
+
742
+ export class TokenStoreEscrow {
743
+ static TYPE_QNAME = "0x3::token_coin_swap::TokenStoreEscrow";
744
+ token_escrows: _0x1.table.Table<token.TokenId, token_coin_swap.TokenEscrow>;
745
+ }
746
+
747
+ export class TokenSwapEvent {
748
+ static TYPE_QNAME = "0x3::token_coin_swap::TokenSwapEvent";
749
+ token_id: token.TokenId;
750
+ token_buyer: Address;
751
+ token_amount: bigint;
752
+ coin_amount: bigint;
753
+ coin_type_info: _0x1.type_info.TypeInfo;
754
+ }
755
+
756
+ export interface TokenSwapEventInstance
757
+ extends TypedEventInstance<TokenSwapEvent> {
758
+ data_decoded: TokenSwapEvent;
759
+ type_arguments: [];
760
+ }
761
+
762
+ export interface ListTokenForSwapPayload<T0 = any>
763
+ extends TypedEntryFunctionPayload<
764
+ [Address, string, string, bigint, bigint, bigint, bigint]
765
+ > {
766
+ arguments_decoded: [
767
+ Address,
768
+ string,
769
+ string,
770
+ bigint,
771
+ bigint,
772
+ bigint,
773
+ bigint
774
+ ];
775
+ type_arguments: [string];
776
+ }
777
+
778
+ export function loadTypes(_r: MoveCoder) {
779
+ loadAllTypes(_r);
780
+ }
781
+ export const ABI: MoveModule = JSON.parse(
782
+ '{"address":"0x3","name":"token_coin_swap","friends":[],"exposed_functions":[{"name":"cancel_token_listing","visibility":"public","is_entry":false,"generic_type_params":[{"constraints":[]}],"params":["&signer","0x3::token::TokenId","u64"],"return":[]},{"name":"deposit_token_to_escrow","visibility":"public","is_entry":false,"generic_type_params":[],"params":["&signer","0x3::token::TokenId","0x3::token::Token","u64"],"return":[]},{"name":"does_listing_exist","visibility":"public","is_entry":false,"generic_type_params":[{"constraints":[]}],"params":["address","0x3::token::TokenId"],"return":["bool"]},{"name":"exchange_coin_for_token","visibility":"public","is_entry":false,"generic_type_params":[{"constraints":[]}],"params":["&signer","u64","address","address","0x1::string::String","0x1::string::String","u64","u64"],"return":[]},{"name":"list_token_for_swap","visibility":"public","is_entry":true,"generic_type_params":[{"constraints":[]}],"params":["&signer","address","0x1::string::String","0x1::string::String","u64","u64","u64","u64"],"return":[]},{"name":"withdraw_token_from_escrow","visibility":"public","is_entry":false,"generic_type_params":[],"params":["&signer","0x3::token::TokenId","u64"],"return":["0x3::token::Token"]}],"structs":[{"name":"TokenCoinSwap","is_native":false,"abilities":["drop","store"],"generic_type_params":[{"constraints":[]}],"fields":[{"name":"token_amount","type":"u64"},{"name":"min_price_per_token","type":"u64"}]},{"name":"TokenEscrow","is_native":false,"abilities":["store"],"generic_type_params":[],"fields":[{"name":"token","type":"0x3::token::Token"},{"name":"locked_until_secs","type":"u64"}]},{"name":"TokenListingEvent","is_native":false,"abilities":["drop","store"],"generic_type_params":[],"fields":[{"name":"token_id","type":"0x3::token::TokenId"},{"name":"amount","type":"u64"},{"name":"min_price","type":"u64"},{"name":"locked_until_secs","type":"u64"},{"name":"coin_type_info","type":"0x1::type_info::TypeInfo"}]},{"name":"TokenListings","is_native":false,"abilities":["key"],"generic_type_params":[{"constraints":[]}],"fields":[{"name":"listings","type":"0x1::table::Table<0x3::token::TokenId, 0x3::token_coin_swap::TokenCoinSwap<T0>>"},{"name":"listing_events","type":"0x1::event::EventHandle<0x3::token_coin_swap::TokenListingEvent>"},{"name":"swap_events","type":"0x1::event::EventHandle<0x3::token_coin_swap::TokenSwapEvent>"}]},{"name":"TokenStoreEscrow","is_native":false,"abilities":["key"],"generic_type_params":[],"fields":[{"name":"token_escrows","type":"0x1::table::Table<0x3::token::TokenId, 0x3::token_coin_swap::TokenEscrow>"}]},{"name":"TokenSwapEvent","is_native":false,"abilities":["drop","store"],"generic_type_params":[],"fields":[{"name":"token_id","type":"0x3::token::TokenId"},{"name":"token_buyer","type":"address"},{"name":"token_amount","type":"u64"},{"name":"coin_amount","type":"u64"},{"name":"coin_type_info","type":"0x1::type_info::TypeInfo"}]}]}'
783
+ );
784
+ }
785
+
786
+ export class token_transfers extends AptosBaseProcessor {
787
+ constructor(options: AptosBindOptions) {
788
+ super("token_transfers", options);
789
+ }
790
+ static DEFAULT_OPTIONS: AptosBindOptions = {
791
+ address: "0x3",
792
+ network: AptosNetwork.MAIN_NET,
793
+ };
794
+
795
+ static bind(options: Partial<AptosBindOptions> = {}): token_transfers {
796
+ return new token_transfers({
797
+ ...token_transfers.DEFAULT_OPTIONS,
798
+ ...options,
799
+ });
800
+ }
801
+
802
+ onEntryCancelOfferScript(
803
+ func: (
804
+ call: token_transfers.CancelOfferScriptPayload,
805
+ ctx: AptosContext
806
+ ) => void,
807
+ filter?: CallFilter,
808
+ fetchConfig?: AptosFetchConfig
809
+ ): token_transfers {
810
+ this.onEntryFunctionCall(
811
+ func,
812
+ {
813
+ ...filter,
814
+ function: "token_transfers::cancel_offer_script",
815
+ },
816
+ fetchConfig
817
+ );
818
+ return this;
819
+ }
820
+
821
+ onEntryClaimScript(
822
+ func: (call: token_transfers.ClaimScriptPayload, ctx: AptosContext) => void,
823
+ filter?: CallFilter,
824
+ fetchConfig?: AptosFetchConfig
825
+ ): token_transfers {
826
+ this.onEntryFunctionCall(
827
+ func,
828
+ {
829
+ ...filter,
830
+ function: "token_transfers::claim_script",
831
+ },
832
+ fetchConfig
833
+ );
834
+ return this;
835
+ }
836
+
837
+ onEntryOfferScript(
838
+ func: (call: token_transfers.OfferScriptPayload, ctx: AptosContext) => void,
839
+ filter?: CallFilter,
840
+ fetchConfig?: AptosFetchConfig
841
+ ): token_transfers {
842
+ this.onEntryFunctionCall(
843
+ func,
844
+ {
845
+ ...filter,
846
+ function: "token_transfers::offer_script",
847
+ },
848
+ fetchConfig
849
+ );
850
+ return this;
851
+ }
852
+
853
+ onEventTokenOfferEvent(
854
+ func: (
855
+ event: token_transfers.TokenOfferEventInstance,
856
+ ctx: AptosContext
857
+ ) => void,
858
+ fetchConfig?: AptosFetchConfig
859
+ ): token_transfers {
860
+ this.onEvent(
861
+ func,
862
+ {
863
+ type: "token_transfers::TokenOfferEvent",
864
+ },
865
+ fetchConfig
866
+ );
867
+ return this;
868
+ }
869
+
870
+ onEventTokenCancelOfferEvent(
871
+ func: (
872
+ event: token_transfers.TokenCancelOfferEventInstance,
873
+ ctx: AptosContext
874
+ ) => void,
875
+ fetchConfig?: AptosFetchConfig
876
+ ): token_transfers {
877
+ this.onEvent(
878
+ func,
879
+ {
880
+ type: "token_transfers::TokenCancelOfferEvent",
881
+ },
882
+ fetchConfig
883
+ );
884
+ return this;
885
+ }
886
+
887
+ onEventTokenClaimEvent(
888
+ func: (
889
+ event: token_transfers.TokenClaimEventInstance,
890
+ ctx: AptosContext
891
+ ) => void,
892
+ fetchConfig?: AptosFetchConfig
893
+ ): token_transfers {
894
+ this.onEvent(
895
+ func,
896
+ {
897
+ type: "token_transfers::TokenClaimEvent",
898
+ },
899
+ fetchConfig
900
+ );
901
+ return this;
902
+ }
903
+
904
+ loadTypesInternal(registry: MoveCoder) {
905
+ loadAllTypes(registry);
906
+ }
907
+ }
908
+
909
+ export namespace token_transfers {
910
+ export class PendingClaims {
911
+ static TYPE_QNAME = "0x3::token_transfers::PendingClaims";
912
+ pending_claims: _0x1.table.Table<token_transfers.TokenOfferId, token.Token>;
913
+ offer_events: _0x1.event.EventHandle<token_transfers.TokenOfferEvent>;
914
+ cancel_offer_events: _0x1.event.EventHandle<token_transfers.TokenCancelOfferEvent>;
915
+ claim_events: _0x1.event.EventHandle<token_transfers.TokenClaimEvent>;
916
+ }
917
+
918
+ export class TokenCancelOfferEvent {
919
+ static TYPE_QNAME = "0x3::token_transfers::TokenCancelOfferEvent";
920
+ to_address: Address;
921
+ token_id: token.TokenId;
922
+ amount: bigint;
923
+ }
924
+
925
+ export interface TokenCancelOfferEventInstance
926
+ extends TypedEventInstance<TokenCancelOfferEvent> {
927
+ data_decoded: TokenCancelOfferEvent;
928
+ type_arguments: [];
929
+ }
930
+
931
+ export class TokenClaimEvent {
932
+ static TYPE_QNAME = "0x3::token_transfers::TokenClaimEvent";
933
+ to_address: Address;
934
+ token_id: token.TokenId;
935
+ amount: bigint;
936
+ }
937
+
938
+ export interface TokenClaimEventInstance
939
+ extends TypedEventInstance<TokenClaimEvent> {
940
+ data_decoded: TokenClaimEvent;
941
+ type_arguments: [];
942
+ }
943
+
944
+ export class TokenOfferEvent {
945
+ static TYPE_QNAME = "0x3::token_transfers::TokenOfferEvent";
946
+ to_address: Address;
947
+ token_id: token.TokenId;
948
+ amount: bigint;
949
+ }
950
+
951
+ export interface TokenOfferEventInstance
952
+ extends TypedEventInstance<TokenOfferEvent> {
953
+ data_decoded: TokenOfferEvent;
954
+ type_arguments: [];
955
+ }
956
+
957
+ export class TokenOfferId {
958
+ static TYPE_QNAME = "0x3::token_transfers::TokenOfferId";
959
+ to_addr: Address;
960
+ token_id: token.TokenId;
961
+ }
962
+
963
+ export interface CancelOfferScriptPayload
964
+ extends TypedEntryFunctionPayload<
965
+ [Address, Address, Address, string, string, bigint]
966
+ > {
967
+ arguments_decoded: [Address, Address, Address, string, string, bigint];
968
+ type_arguments: [];
969
+ }
970
+
971
+ export interface ClaimScriptPayload
972
+ extends TypedEntryFunctionPayload<
973
+ [Address, Address, Address, string, string, bigint]
974
+ > {
975
+ arguments_decoded: [Address, Address, Address, string, string, bigint];
976
+ type_arguments: [];
977
+ }
978
+
979
+ export interface OfferScriptPayload
980
+ extends TypedEntryFunctionPayload<
981
+ [Address, Address, Address, string, string, bigint, bigint]
982
+ > {
983
+ arguments_decoded: [
984
+ Address,
985
+ Address,
986
+ Address,
987
+ string,
988
+ string,
989
+ bigint,
990
+ bigint
991
+ ];
992
+ type_arguments: [];
993
+ }
994
+
995
+ export function loadTypes(_r: MoveCoder) {
996
+ loadAllTypes(_r);
997
+ }
998
+ export const ABI: MoveModule = JSON.parse(
999
+ '{"address":"0x3","name":"token_transfers","friends":[],"exposed_functions":[{"name":"cancel_offer","visibility":"public","is_entry":false,"generic_type_params":[],"params":["&signer","address","0x3::token::TokenId"],"return":[]},{"name":"cancel_offer_script","visibility":"public","is_entry":true,"generic_type_params":[],"params":["signer","address","address","0x1::string::String","0x1::string::String","u64"],"return":[]},{"name":"claim","visibility":"public","is_entry":false,"generic_type_params":[],"params":["&signer","address","0x3::token::TokenId"],"return":[]},{"name":"claim_script","visibility":"public","is_entry":true,"generic_type_params":[],"params":["signer","address","address","0x1::string::String","0x1::string::String","u64"],"return":[]},{"name":"offer","visibility":"public","is_entry":false,"generic_type_params":[],"params":["&signer","address","0x3::token::TokenId","u64"],"return":[]},{"name":"offer_script","visibility":"public","is_entry":true,"generic_type_params":[],"params":["signer","address","address","0x1::string::String","0x1::string::String","u64","u64"],"return":[]}],"structs":[{"name":"PendingClaims","is_native":false,"abilities":["key"],"generic_type_params":[],"fields":[{"name":"pending_claims","type":"0x1::table::Table<0x3::token_transfers::TokenOfferId, 0x3::token::Token>"},{"name":"offer_events","type":"0x1::event::EventHandle<0x3::token_transfers::TokenOfferEvent>"},{"name":"cancel_offer_events","type":"0x1::event::EventHandle<0x3::token_transfers::TokenCancelOfferEvent>"},{"name":"claim_events","type":"0x1::event::EventHandle<0x3::token_transfers::TokenClaimEvent>"}]},{"name":"TokenCancelOfferEvent","is_native":false,"abilities":["drop","store"],"generic_type_params":[],"fields":[{"name":"to_address","type":"address"},{"name":"token_id","type":"0x3::token::TokenId"},{"name":"amount","type":"u64"}]},{"name":"TokenClaimEvent","is_native":false,"abilities":["drop","store"],"generic_type_params":[],"fields":[{"name":"to_address","type":"address"},{"name":"token_id","type":"0x3::token::TokenId"},{"name":"amount","type":"u64"}]},{"name":"TokenOfferEvent","is_native":false,"abilities":["drop","store"],"generic_type_params":[],"fields":[{"name":"to_address","type":"address"},{"name":"token_id","type":"0x3::token::TokenId"},{"name":"amount","type":"u64"}]},{"name":"TokenOfferId","is_native":false,"abilities":["copy","drop","store"],"generic_type_params":[],"fields":[{"name":"to_addr","type":"address"},{"name":"token_id","type":"0x3::token::TokenId"}]}]}'
1000
+ );
1001
+ }
1002
+
1003
+ export function loadAllTypes(_r: MoveCoder) {
1004
+ _0x1.loadAllTypes(_r);
1005
+
1006
+ _r.load(token.ABI);
1007
+ _r.load(property_map.ABI);
1008
+ _r.load(token_coin_swap.ABI);
1009
+ _r.load(token_transfers.ABI);
1010
+ }