@sentio/sdk 2.0.0-rc.2 → 2.0.0-rc.21
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.
- package/lib/aptos/api.d.ts +5 -0
- package/lib/aptos/api.js +21 -0
- package/lib/aptos/api.js.map +1 -0
- package/lib/aptos/aptos-plugin.d.ts +14 -0
- package/lib/aptos/aptos-plugin.js +146 -0
- package/lib/aptos/aptos-plugin.js.map +1 -0
- package/lib/aptos/aptos-processor.d.ts +72 -0
- package/lib/aptos/aptos-processor.js +201 -0
- package/lib/aptos/aptos-processor.js.map +1 -0
- package/lib/aptos/builtin/0x1.d.ts +1914 -0
- package/lib/aptos/builtin/0x1.js +2727 -0
- package/lib/aptos/builtin/0x1.js.map +1 -0
- package/lib/aptos/builtin/0x3.d.ts +491 -0
- package/lib/aptos/builtin/0x3.js +496 -0
- package/lib/aptos/builtin/0x3.js.map +1 -0
- package/lib/aptos/builtin/index.d.ts +2 -0
- package/lib/aptos/builtin/index.js +6 -0
- package/lib/aptos/builtin/index.js.map +1 -0
- package/lib/aptos/codegen/codegen.d.ts +21 -0
- package/lib/aptos/codegen/codegen.js +380 -0
- package/lib/aptos/codegen/codegen.js.map +1 -0
- package/lib/aptos/codegen/index.d.ts +1 -0
- package/lib/aptos/codegen/index.js +2 -0
- package/lib/aptos/codegen/index.js.map +1 -0
- package/lib/aptos/codegen/typegen.d.ts +18 -0
- package/lib/aptos/codegen/typegen.js +145 -0
- package/lib/aptos/codegen/typegen.js.map +1 -0
- package/lib/{core/generic-processor.test.d.ts → aptos/codegen/typegen.test.d.ts} +0 -0
- package/lib/aptos/codegen/typegen.test.js.map +1 -0
- package/lib/aptos/context.d.ts +21 -0
- package/lib/aptos/context.js +59 -0
- package/lib/aptos/context.js.map +1 -0
- package/lib/aptos/index.d.ts +9 -0
- package/lib/aptos/index.js +8 -0
- package/lib/aptos/index.js.map +1 -0
- package/lib/aptos/models.d.ts +27 -0
- package/lib/aptos/models.js +2 -0
- package/lib/aptos/models.js.map +1 -0
- package/lib/aptos/move-coder.d.ts +22 -0
- package/lib/aptos/move-coder.js +162 -0
- package/lib/aptos/move-coder.js.map +1 -0
- package/lib/aptos/move-types.d.ts +10 -0
- package/lib/aptos/move-types.js +2 -0
- package/lib/aptos/move-types.js.map +1 -0
- package/lib/aptos/network.d.ts +11 -0
- package/lib/aptos/network.js +27 -0
- package/lib/aptos/network.js.map +1 -0
- package/lib/aptos/run-codegen.d.ts +1 -0
- package/lib/aptos/run-codegen.js +12 -0
- package/lib/aptos/run-codegen.js.map +1 -0
- package/lib/aptos/tests/aptos.test.d.ts +1 -0
- package/lib/aptos/tests/aptos.test.js.map +1 -0
- package/lib/aptos/tests/souffl3.d.ts +1 -0
- package/lib/aptos/tests/souffl3.js +44 -0
- package/lib/aptos/tests/souffl3.js.map +1 -0
- package/lib/aptos/tests/types/index.d.ts +3 -0
- package/lib/aptos/tests/types/index.js +7 -0
- package/lib/aptos/tests/types/index.js.map +1 -0
- package/lib/aptos/tests/types/reserved.d.ts +345 -0
- package/lib/aptos/tests/types/reserved.js +301 -0
- package/lib/aptos/tests/types/reserved.js.map +1 -0
- package/lib/aptos/tests/types/soffl3.d.ts +812 -0
- package/lib/aptos/tests/types/soffl3.js +548 -0
- package/lib/aptos/tests/types/soffl3.js.map +1 -0
- package/lib/aptos/tests/types/souffle.d.ts +340 -0
- package/lib/aptos/tests/types/souffle.js +295 -0
- package/lib/aptos/tests/types/souffle.js.map +1 -0
- package/lib/aptos/types.d.ts +9 -0
- package/lib/aptos/types.js +130 -0
- package/lib/aptos/types.js.map +1 -0
- package/lib/aptos/types.test.d.ts +1 -0
- package/lib/aptos/types.test.js.map +1 -0
- package/lib/aptos/utils.d.ts +7 -0
- package/lib/aptos/utils.js +20 -0
- package/lib/aptos/utils.js.map +1 -0
- package/lib/core/base-context.d.ts +4 -4
- package/lib/core/base-context.js +7 -11
- package/lib/core/base-context.js.map +1 -1
- package/lib/core/big-decimal.d.ts +2 -0
- package/lib/core/big-decimal.js +11 -7
- package/lib/core/big-decimal.js.map +1 -1
- package/lib/{utils → core}/chain.d.ts +0 -0
- package/lib/{utils → core}/chain.js +7 -12
- package/lib/core/chain.js.map +1 -0
- package/lib/core/core-plugin.js +9 -13
- package/lib/core/core-plugin.js.map +1 -1
- package/lib/core/event-tracker.d.ts +2 -2
- package/lib/core/event-tracker.js +6 -13
- package/lib/core/event-tracker.js.map +1 -1
- package/lib/core/exporter.d.ts +2 -2
- package/lib/core/exporter.js +4 -9
- package/lib/core/exporter.js.map +1 -1
- package/lib/core/index.d.ts +10 -9
- package/lib/core/index.js +10 -32
- package/lib/core/index.js.map +1 -1
- package/lib/core/logger.d.ts +2 -2
- package/lib/core/logger.js +7 -11
- package/lib/core/logger.js.map +1 -1
- package/lib/core/metadata.d.ts +4 -0
- package/lib/core/metadata.js +21 -7
- package/lib/core/metadata.js.map +1 -1
- package/lib/core/meter.d.ts +3 -7
- package/lib/core/meter.js +22 -57
- package/lib/core/meter.js.map +1 -1
- package/lib/core/meter.test.js.map +1 -1
- package/lib/core/numberish.d.ts +1 -3
- package/lib/core/numberish.js +11 -26
- package/lib/core/numberish.js.map +1 -1
- package/lib/core/numberish.test.js.map +1 -1
- package/lib/core/sui-plugin.js +12 -16
- package/lib/core/sui-plugin.js.map +1 -1
- package/lib/core/sui-processor.d.ts +1 -1
- package/lib/core/sui-processor.js +6 -12
- package/lib/core/sui-processor.js.map +1 -1
- package/lib/eth/account-processor-state.d.ts +1 -1
- package/lib/eth/account-processor-state.js +2 -6
- package/lib/eth/account-processor-state.js.map +1 -1
- package/lib/eth/account-processor.d.ts +7 -7
- package/lib/eth/account-processor.js +23 -27
- package/lib/eth/account-processor.js.map +1 -1
- package/lib/eth/base-processor-template.d.ts +9 -8
- package/lib/eth/base-processor-template.js +8 -14
- package/lib/eth/base-processor-template.js.map +1 -1
- package/lib/eth/base-processor.d.ts +8 -7
- package/lib/eth/base-processor.js +21 -27
- package/lib/eth/base-processor.js.map +1 -1
- package/lib/{core → eth}/bind-options.d.ts +0 -0
- package/lib/eth/bind-options.js +40 -0
- package/lib/eth/bind-options.js.map +1 -0
- package/lib/eth/binds.d.ts +3 -3
- package/lib/eth/binds.js +11 -19
- package/lib/eth/binds.js.map +1 -1
- package/lib/eth/builtin/eacaggregatorproxy/index.d.ts +3 -0
- package/lib/eth/builtin/eacaggregatorproxy/index.js +7 -0
- package/lib/eth/builtin/eacaggregatorproxy/index.js.map +1 -0
- package/lib/{builtin → eth/builtin}/eacaggregatorproxy/test-utils.d.ts +1 -1
- package/lib/{builtin → eth/builtin}/eacaggregatorproxy/test-utils.js +9 -16
- package/lib/eth/builtin/eacaggregatorproxy/test-utils.js.map +1 -0
- package/lib/eth/builtin/erc1155/index.d.ts +3 -0
- package/lib/eth/builtin/erc1155/index.js +7 -0
- package/lib/eth/builtin/erc1155/index.js.map +1 -0
- package/lib/{builtin → eth/builtin}/erc1155/test-utils.d.ts +1 -1
- package/lib/{builtin → eth/builtin}/erc1155/test-utils.js +9 -16
- package/lib/eth/builtin/erc1155/test-utils.js.map +1 -0
- package/lib/eth/builtin/erc20/index.d.ts +3 -0
- package/lib/eth/builtin/erc20/index.js +7 -0
- package/lib/eth/builtin/erc20/index.js.map +1 -0
- package/lib/{builtin → eth/builtin}/erc20/test-utils.d.ts +1 -1
- package/lib/{builtin → eth/builtin}/erc20/test-utils.js +7 -13
- package/lib/eth/builtin/erc20/test-utils.js.map +1 -0
- package/lib/eth/builtin/erc20bytes/index.d.ts +3 -0
- package/lib/eth/builtin/erc20bytes/index.js +7 -0
- package/lib/eth/builtin/erc20bytes/index.js.map +1 -0
- package/lib/{builtin → eth/builtin}/erc20bytes/test-utils.d.ts +1 -1
- package/lib/{builtin → eth/builtin}/erc20bytes/test-utils.js +5 -10
- package/lib/eth/builtin/erc20bytes/test-utils.js.map +1 -0
- package/lib/eth/builtin/erc721/index.d.ts +3 -0
- package/lib/eth/builtin/erc721/index.js +7 -0
- package/lib/eth/builtin/erc721/index.js.map +1 -0
- package/lib/{builtin → eth/builtin}/erc721/test-utils.d.ts +1 -1
- package/lib/{builtin → eth/builtin}/erc721/test-utils.js +7 -13
- package/lib/eth/builtin/erc721/test-utils.js.map +1 -0
- package/lib/eth/builtin/index.d.ts +8 -0
- package/lib/eth/builtin/index.js +9 -0
- package/lib/eth/builtin/index.js.map +1 -0
- package/lib/{builtin → eth/builtin}/internal/EACAggregatorProxy.d.ts +6 -6
- package/lib/eth/builtin/internal/EACAggregatorProxy.js +2 -0
- package/lib/eth/builtin/internal/EACAggregatorProxy.js.map +1 -0
- package/lib/{builtin → eth/builtin}/internal/ERC1155.d.ts +6 -6
- package/lib/eth/builtin/internal/ERC1155.js +2 -0
- package/lib/eth/builtin/internal/ERC1155.js.map +1 -0
- package/lib/{builtin → eth/builtin}/internal/ERC20.d.ts +5 -5
- package/lib/eth/builtin/internal/ERC20.js +2 -0
- package/lib/eth/builtin/internal/ERC20.js.map +1 -0
- package/lib/{builtin → eth/builtin}/internal/ERC20Bytes.d.ts +4 -4
- package/lib/eth/builtin/internal/ERC20Bytes.js +2 -0
- package/lib/eth/builtin/internal/ERC20Bytes.js.map +1 -0
- package/lib/{builtin → eth/builtin}/internal/ERC721.d.ts +5 -5
- package/lib/eth/builtin/internal/ERC721.js +2 -0
- package/lib/eth/builtin/internal/ERC721.js.map +1 -0
- package/lib/{builtin → eth/builtin}/internal/WETH9.d.ts +6 -6
- package/lib/eth/builtin/internal/WETH9.js +2 -0
- package/lib/eth/builtin/internal/WETH9.js.map +1 -0
- package/lib/{builtin → eth/builtin}/internal/common.d.ts +4 -2
- package/lib/{builtin → eth/builtin}/internal/common.js +1 -2
- package/lib/eth/builtin/internal/common.js.map +1 -0
- package/lib/{builtin → eth/builtin}/internal/eacaggregatorproxy_processor.d.ts +3 -3
- package/lib/{builtin → eth/builtin}/internal/eacaggregatorproxy_processor.js +123 -221
- package/lib/eth/builtin/internal/eacaggregatorproxy_processor.js.map +1 -0
- package/lib/{builtin → eth/builtin}/internal/erc1155_processor.d.ts +3 -3
- package/lib/{builtin → eth/builtin}/internal/erc1155_processor.js +45 -78
- package/lib/eth/builtin/internal/erc1155_processor.js.map +1 -0
- package/lib/{builtin → eth/builtin}/internal/erc20_processor.d.ts +3 -3
- package/lib/{builtin → eth/builtin}/internal/erc20_processor.js +63 -111
- package/lib/eth/builtin/internal/erc20_processor.js.map +1 -0
- package/lib/{builtin → eth/builtin}/internal/erc20bytes_processor.d.ts +3 -3
- package/lib/{builtin → eth/builtin}/internal/erc20bytes_processor.js +51 -89
- package/lib/eth/builtin/internal/erc20bytes_processor.js.map +1 -0
- package/lib/{builtin → eth/builtin}/internal/erc721_processor.d.ts +3 -3
- package/lib/{builtin → eth/builtin}/internal/erc721_processor.js +69 -122
- package/lib/eth/builtin/internal/erc721_processor.js.map +1 -0
- package/lib/{builtin → eth/builtin}/internal/factories/EACAggregatorProxy__factory.d.ts +1 -1
- package/lib/{builtin → eth/builtin}/internal/factories/EACAggregatorProxy__factory.js +4 -8
- package/lib/eth/builtin/internal/factories/EACAggregatorProxy__factory.js.map +1 -0
- package/lib/{builtin → eth/builtin}/internal/factories/ERC1155__factory.d.ts +1 -1
- package/lib/{builtin → eth/builtin}/internal/factories/ERC1155__factory.js +4 -8
- package/lib/eth/builtin/internal/factories/ERC1155__factory.js.map +1 -0
- package/lib/{builtin → eth/builtin}/internal/factories/ERC20Bytes__factory.d.ts +1 -1
- package/lib/{builtin → eth/builtin}/internal/factories/ERC20Bytes__factory.js +4 -8
- package/lib/eth/builtin/internal/factories/ERC20Bytes__factory.js.map +1 -0
- package/lib/{builtin → eth/builtin}/internal/factories/ERC20__factory.d.ts +1 -1
- package/lib/{builtin → eth/builtin}/internal/factories/ERC20__factory.js +4 -8
- package/lib/eth/builtin/internal/factories/ERC20__factory.js.map +1 -0
- package/lib/{builtin → eth/builtin}/internal/factories/ERC721__factory.d.ts +1 -1
- package/lib/{builtin → eth/builtin}/internal/factories/ERC721__factory.js +4 -8
- package/lib/eth/builtin/internal/factories/ERC721__factory.js.map +1 -0
- package/lib/{builtin → eth/builtin}/internal/factories/WETH9__factory.d.ts +1 -1
- package/lib/{builtin → eth/builtin}/internal/factories/WETH9__factory.js +4 -8
- package/lib/eth/builtin/internal/factories/WETH9__factory.js.map +1 -0
- package/lib/eth/builtin/internal/factories/index.d.ts +6 -0
- package/lib/eth/builtin/internal/factories/index.js +10 -0
- package/lib/eth/builtin/internal/factories/index.js.map +1 -0
- package/lib/eth/builtin/internal/index.d.ts +13 -0
- package/lib/eth/builtin/internal/index.js +8 -0
- package/lib/eth/builtin/internal/index.js.map +1 -0
- package/lib/{builtin → eth/builtin}/internal/weth9_processor.d.ts +3 -3
- package/lib/{builtin → eth/builtin}/internal/weth9_processor.js +51 -89
- package/lib/eth/builtin/internal/weth9_processor.js.map +1 -0
- package/lib/eth/builtin/weth9/index.d.ts +3 -0
- package/lib/eth/builtin/weth9/index.js +7 -0
- package/lib/eth/builtin/weth9/index.js.map +1 -0
- package/lib/{builtin → eth/builtin}/weth9/test-utils.d.ts +1 -1
- package/lib/{builtin → eth/builtin}/weth9/test-utils.js +9 -16
- package/lib/eth/builtin/weth9/test-utils.js.map +1 -0
- package/lib/eth/codegen/codegen.d.ts +1 -0
- package/lib/eth/codegen/codegen.js +53 -0
- package/lib/eth/codegen/codegen.js.map +1 -0
- package/lib/{target-ethers-sentio/index.d.ts → eth/codegen/ethers-sentio.d.ts} +1 -1
- package/lib/eth/codegen/ethers-sentio.js +57 -0
- package/lib/eth/codegen/ethers-sentio.js.map +1 -0
- package/lib/{target-ethers-sentio → eth/codegen}/event-handler.d.ts +0 -0
- package/lib/eth/codegen/event-handler.js +46 -0
- package/lib/eth/codegen/event-handler.js.map +1 -0
- package/lib/{target-ethers-sentio → eth/codegen}/file.d.ts +0 -0
- package/lib/{target-ethers-sentio → eth/codegen}/file.js +33 -39
- package/lib/eth/codegen/file.js.map +1 -0
- package/lib/{target-ethers-sentio → eth/codegen}/functions-handler.d.ts +0 -0
- package/lib/{target-ethers-sentio → eth/codegen}/functions-handler.js +12 -18
- package/lib/eth/codegen/functions-handler.js.map +1 -0
- package/lib/eth/codegen/index.d.ts +1 -0
- package/lib/eth/codegen/index.js +2 -0
- package/lib/eth/codegen/index.js.map +1 -0
- package/lib/{target-ethers-sentio → eth/codegen}/types.d.ts +0 -0
- package/lib/{target-ethers-sentio → eth/codegen}/types.js +3 -9
- package/lib/eth/codegen/types.js.map +1 -0
- package/lib/{target-ethers-sentio → eth/codegen}/view-function.d.ts +0 -0
- package/lib/eth/codegen/view-function.js +62 -0
- package/lib/eth/codegen/view-function.js.map +1 -0
- package/lib/{core → eth}/context.d.ts +5 -5
- package/lib/{core → eth}/context.js +14 -23
- package/lib/eth/context.js.map +1 -0
- package/lib/eth/error.d.ts +1 -0
- package/lib/eth/error.js +3 -0
- package/lib/eth/error.js.map +1 -0
- package/lib/eth/eth-plugin.js +30 -34
- package/lib/eth/eth-plugin.js.map +1 -1
- package/lib/eth/eth.d.ts +13 -0
- package/lib/eth/eth.js +44 -0
- package/lib/eth/eth.js.map +1 -0
- package/lib/eth/generic-processor.d.ts +3 -3
- package/lib/eth/generic-processor.js +9 -13
- package/lib/eth/generic-processor.js.map +1 -1
- package/lib/eth/generic-processor.test.d.ts +1 -0
- package/lib/eth/generic-processor.test.js.map +1 -0
- package/lib/eth/index.d.ts +11 -6
- package/lib/eth/index.js +10 -14
- package/lib/eth/index.js.map +1 -1
- package/lib/eth/provider.js +13 -17
- package/lib/eth/provider.js.map +1 -1
- package/lib/eth/run-codegen.d.ts +2 -0
- package/lib/eth/run-codegen.js +12 -0
- package/lib/eth/run-codegen.js.map +1 -0
- package/lib/eth/trace.js +1 -2
- package/lib/eth/trace.js.map +1 -1
- package/lib/index.d.ts +2 -5
- package/lib/index.js +3 -18
- package/lib/index.js.map +1 -1
- package/lib/jest.config.d.ts +9 -0
- package/lib/jest.config.js +9 -0
- package/lib/jest.config.js.map +1 -0
- package/lib/promise-or-void.js +1 -2
- package/lib/solana/builtin/index.d.ts +1 -0
- package/lib/solana/builtin/index.js +2 -0
- package/lib/solana/builtin/index.js.map +1 -0
- package/lib/solana/builtin/spl-token-processor.d.ts +39 -0
- package/lib/solana/builtin/spl-token-processor.js +254 -0
- package/lib/solana/builtin/spl-token-processor.js.map +1 -0
- package/lib/solana/builtin/types.d.ts +427 -0
- package/lib/solana/builtin/types.js +200 -0
- package/lib/solana/builtin/types.js.map +1 -0
- package/lib/solana/codegen/codegen.d.ts +1 -0
- package/lib/solana/codegen/codegen.js +122 -0
- package/lib/solana/codegen/codegen.js.map +1 -0
- package/lib/solana/codegen/index.d.ts +1 -0
- package/lib/solana/codegen/index.js +2 -0
- package/lib/solana/codegen/index.js.map +1 -0
- package/lib/solana/index.d.ts +4 -0
- package/lib/solana/index.js +5 -0
- package/lib/solana/index.js.map +1 -0
- package/lib/solana/run-codegen.d.ts +2 -0
- package/lib/solana/run-codegen.js +12 -0
- package/lib/solana/run-codegen.js.map +1 -0
- package/lib/solana/solana-context.d.ts +9 -0
- package/lib/solana/solana-context.js +28 -0
- package/lib/solana/solana-context.js.map +1 -0
- package/lib/solana/solana-options.d.ts +10 -0
- package/lib/solana/solana-options.js +10 -0
- package/lib/solana/solana-options.js.map +1 -0
- package/lib/solana/solana-plugin.d.ts +9 -0
- package/lib/solana/solana-plugin.js +87 -0
- package/lib/solana/solana-plugin.js.map +1 -0
- package/lib/solana/solana-processor.d.ts +43 -0
- package/lib/solana/solana-processor.js +72 -0
- package/lib/solana/solana-processor.js.map +1 -0
- package/lib/solana/tests/solana.test.d.ts +1 -0
- package/lib/solana/tests/solana.test.js.map +1 -0
- package/lib/solana/tests/types/basic_1.d.ts +26 -0
- package/lib/solana/tests/types/basic_1.js +63 -0
- package/lib/solana/tests/types/basic_1.js.map +1 -0
- package/lib/solana/tests/types/basic_1_processor.d.ts +21 -0
- package/lib/solana/tests/types/basic_1_processor.js +35 -0
- package/lib/solana/tests/types/basic_1_processor.js.map +1 -0
- package/lib/solana/tests/types/token_bridge.d.ts +29 -0
- package/lib/solana/tests/types/token_bridge.js +938 -0
- package/lib/solana/tests/types/token_bridge.js.map +1 -0
- package/lib/solana/tests/types/token_bridge_processor.d.ts +212 -0
- package/lib/solana/tests/types/token_bridge_processor.js +134 -0
- package/lib/solana/tests/types/token_bridge_processor.js.map +1 -0
- package/lib/solana/tests/wormhole-token-bridge.d.ts +15 -0
- package/lib/solana/tests/wormhole-token-bridge.js +79 -0
- package/lib/solana/tests/wormhole-token-bridge.js.map +1 -0
- package/lib/testing/index.d.ts +3 -2
- package/lib/testing/index.js +3 -10
- package/lib/testing/index.js.map +1 -1
- package/lib/testing/metric-utils.d.ts +1 -1
- package/lib/testing/metric-utils.js +7 -13
- package/lib/testing/metric-utils.js.map +1 -1
- package/lib/testing/test-processor-server.d.ts +3 -4
- package/lib/testing/test-processor-server.js +24 -29
- package/lib/testing/test-processor-server.js.map +1 -1
- package/lib/testing/test-provider.js +5 -9
- package/lib/testing/test-provider.js.map +1 -1
- package/lib/tsup.config.ts +31 -0
- package/lib/utils/conversion.d.ts +0 -5
- package/lib/utils/conversion.js +22 -27
- package/lib/utils/conversion.js.map +1 -1
- package/lib/utils/dex-price.js +14 -19
- package/lib/utils/dex-price.js.map +1 -1
- package/lib/utils/dex-price.test.js.map +1 -1
- package/lib/utils/erc20.test.js.map +1 -1
- package/lib/utils/index.d.ts +3 -4
- package/lib/utils/index.js +3 -8
- package/lib/utils/index.js.map +1 -1
- package/lib/utils/price.d.ts +11 -11
- package/lib/utils/price.js +10 -16
- package/lib/utils/price.js.map +1 -1
- package/lib/utils/token.d.ts +1 -2
- package/lib/utils/token.js +23 -40
- package/lib/utils/token.js.map +1 -1
- package/package.json +51 -25
- package/src/aptos/abis/0x1.json +9205 -0
- package/src/aptos/abis/0x3.json +1515 -0
- package/src/aptos/api.ts +23 -0
- package/src/aptos/aptos-plugin.ts +183 -0
- package/src/aptos/aptos-processor.ts +331 -0
- package/src/aptos/builtin/0x1.ts +4685 -0
- package/src/aptos/builtin/0x3.ts +1010 -0
- package/src/{builtin/weth9 → aptos/builtin}/index.ts +2 -3
- package/src/aptos/codegen/codegen.ts +457 -0
- package/src/aptos/codegen/index.ts +1 -0
- package/src/aptos/codegen/tsconfig.json +8 -0
- package/src/aptos/codegen/typegen.ts +165 -0
- package/src/aptos/context.ts +72 -0
- package/src/aptos/index.ts +10 -0
- package/src/aptos/models.ts +35 -0
- package/src/aptos/move-coder.ts +199 -0
- package/src/aptos/move-types.ts +11 -0
- package/src/aptos/network.ts +29 -0
- package/src/aptos/run-codegen.ts +13 -0
- package/src/aptos/tests/abis/reserved.json +402 -0
- package/src/aptos/tests/abis/soffl3.json +1411 -0
- package/src/aptos/tests/abis/souffle.json +389 -0
- package/src/aptos/tests/souffl3.ts +57 -0
- package/src/aptos/tests/types/index.ts +6 -0
- package/src/aptos/tests/types/reserved.ts +781 -0
- package/src/aptos/tests/types/soffl3.ts +1567 -0
- package/src/aptos/tests/types/souffle.ts +780 -0
- package/src/aptos/types.ts +149 -0
- package/src/aptos/utils.ts +26 -0
- package/src/core/base-context.ts +4 -4
- package/src/core/big-decimal.ts +11 -0
- package/src/{utils → core}/chain.ts +0 -0
- package/src/core/core-plugin.ts +3 -3
- package/src/core/event-tracker.ts +2 -2
- package/src/core/exporter.ts +3 -3
- package/src/core/index.ts +10 -10
- package/src/core/logger.ts +2 -2
- package/src/core/metadata.ts +23 -2
- package/src/core/meter.ts +3 -26
- package/src/core/numberish.ts +1 -12
- package/src/core/sui-plugin.ts +2 -2
- package/src/core/sui-processor.ts +1 -1
- package/src/{abis → eth/abis}/EACAggregatorProxy.json +0 -0
- package/src/{abis → eth/abis}/ERC1155.json +0 -0
- package/src/{abis → eth/abis}/ERC20.json +0 -0
- package/src/{abis → eth/abis}/ERC20Bytes.json +0 -0
- package/src/{abis → eth/abis}/ERC721.json +0 -0
- package/src/{abis → eth/abis}/WETH9.json +0 -0
- package/src/eth/account-processor-state.ts +1 -1
- package/src/eth/account-processor.ts +11 -11
- package/src/eth/base-processor-template.ts +8 -7
- package/src/eth/base-processor.ts +12 -22
- package/src/{core → eth}/bind-options.ts +0 -0
- package/src/eth/binds.ts +3 -3
- package/src/eth/builtin/eacaggregatorproxy/index.ts +7 -0
- package/src/{builtin → eth/builtin}/eacaggregatorproxy/test-utils.ts +1 -1
- package/src/eth/builtin/erc1155/index.ts +7 -0
- package/src/{builtin → eth/builtin}/erc1155/test-utils.ts +1 -1
- package/src/eth/builtin/erc20/index.ts +7 -0
- package/src/{builtin → eth/builtin}/erc20/test-utils.ts +1 -1
- package/src/eth/builtin/erc20bytes/index.ts +7 -0
- package/src/{builtin → eth/builtin}/erc20bytes/test-utils.ts +1 -1
- package/src/eth/builtin/erc721/index.ts +7 -0
- package/src/{builtin → eth/builtin}/erc721/test-utils.ts +1 -1
- package/src/eth/builtin/index.ts +8 -0
- package/src/{builtin → eth/builtin}/internal/EACAggregatorProxy.ts +6 -10
- package/src/{builtin → eth/builtin}/internal/ERC1155.ts +6 -10
- package/src/{builtin → eth/builtin}/internal/ERC20.ts +5 -8
- package/src/{builtin → eth/builtin}/internal/ERC20Bytes.ts +4 -6
- package/src/{builtin → eth/builtin}/internal/ERC721.ts +5 -8
- package/src/{builtin → eth/builtin}/internal/WETH9.ts +6 -10
- package/src/eth/builtin/internal/common.ts +22 -0
- package/src/{builtin → eth/builtin}/internal/eacaggregatorproxy_processor.ts +93 -165
- package/src/{builtin → eth/builtin}/internal/erc1155_processor.ts +28 -52
- package/src/{builtin → eth/builtin}/internal/erc20_processor.ts +43 -75
- package/src/{builtin → eth/builtin}/internal/erc20bytes_processor.ts +33 -57
- package/src/{builtin → eth/builtin}/internal/erc721_processor.ts +48 -84
- package/src/{builtin → eth/builtin}/internal/factories/EACAggregatorProxy__factory.ts +1 -1
- package/src/{builtin → eth/builtin}/internal/factories/ERC1155__factory.ts +1 -1
- package/src/{builtin → eth/builtin}/internal/factories/ERC20Bytes__factory.ts +1 -1
- package/src/{builtin → eth/builtin}/internal/factories/ERC20__factory.ts +1 -1
- package/src/{builtin → eth/builtin}/internal/factories/ERC721__factory.ts +1 -1
- package/src/{builtin → eth/builtin}/internal/factories/WETH9__factory.ts +1 -1
- package/src/eth/builtin/internal/factories/index.ts +9 -0
- package/src/eth/builtin/internal/index.ts +16 -0
- package/src/{builtin → eth/builtin}/internal/weth9_processor.ts +33 -57
- package/src/eth/builtin/weth9/index.ts +7 -0
- package/src/{builtin → eth/builtin}/weth9/test-utils.ts +1 -1
- package/src/eth/codegen/codegen.ts +62 -0
- package/src/{target-ethers-sentio/index.ts → eth/codegen/ethers-sentio.ts} +5 -2
- package/src/{target-ethers-sentio → eth/codegen}/event-handler.ts +2 -2
- package/src/{target-ethers-sentio → eth/codegen}/file.ts +13 -12
- package/src/{target-ethers-sentio → eth/codegen}/functions-handler.ts +4 -5
- package/src/eth/codegen/index.ts +1 -0
- package/src/eth/codegen/tsconfig.json +8 -0
- package/src/{target-ethers-sentio → eth/codegen}/types.ts +1 -1
- package/src/{target-ethers-sentio → eth/codegen}/view-function.ts +7 -12
- package/src/{core → eth}/context.ts +5 -6
- package/src/eth/error.ts +4 -0
- package/src/eth/eth-plugin.ts +3 -3
- package/src/eth/eth.ts +56 -0
- package/src/eth/generic-processor.ts +5 -5
- package/src/eth/index.ts +12 -6
- package/src/eth/provider.ts +4 -3
- package/src/eth/run-codegen.ts +12 -0
- package/src/index.ts +2 -9
- package/src/jest.config.ts +8 -0
- package/src/solana/builtin/index.ts +1 -0
- package/src/solana/builtin/spl-token-processor.ts +298 -0
- package/src/solana/builtin/types.ts +279 -0
- package/src/solana/codegen/codegen.ts +140 -0
- package/src/solana/codegen/index.ts +1 -0
- package/src/solana/codegen/tsconfig.json +8 -0
- package/src/solana/index.ts +4 -0
- package/src/solana/run-codegen.ts +13 -0
- package/src/solana/solana-context.ts +30 -0
- package/src/solana/solana-options.ts +11 -0
- package/src/solana/solana-plugin.ts +103 -0
- package/src/solana/solana-processor.ts +102 -0
- package/src/solana/tests/abis/basic_1.json +62 -0
- package/src/solana/tests/abis/token_bridge.json +937 -0
- package/src/solana/tests/types/basic_1.ts +62 -0
- package/src/solana/tests/types/basic_1_processor.ts +42 -0
- package/src/solana/tests/types/token_bridge.ts +937 -0
- package/src/solana/tests/types/token_bridge_processor.ts +150 -0
- package/src/solana/tests/wormhole-token-bridge.ts +96 -0
- package/src/testing/index.ts +3 -3
- package/src/testing/metric-utils.ts +2 -2
- package/src/testing/test-processor-server.ts +5 -5
- package/src/testing/test-provider.ts +1 -1
- package/src/tsup.config.ts +31 -0
- package/src/utils/conversion.ts +21 -25
- package/src/utils/dex-price.ts +4 -5
- package/src/utils/index.ts +3 -4
- package/src/utils/price.ts +1 -1
- package/src/utils/token.ts +20 -31
- package/lib/builtin/eacaggregatorproxy/index.d.ts +0 -2
- package/lib/builtin/eacaggregatorproxy/index.js +0 -9
- package/lib/builtin/eacaggregatorproxy/index.js.map +0 -1
- package/lib/builtin/eacaggregatorproxy/test-utils.js.map +0 -1
- package/lib/builtin/erc1155/index.d.ts +0 -2
- package/lib/builtin/erc1155/index.js +0 -9
- package/lib/builtin/erc1155/index.js.map +0 -1
- package/lib/builtin/erc1155/test-utils.js.map +0 -1
- package/lib/builtin/erc20/index.d.ts +0 -2
- package/lib/builtin/erc20/index.js +0 -9
- package/lib/builtin/erc20/index.js.map +0 -1
- package/lib/builtin/erc20/test-utils.js.map +0 -1
- package/lib/builtin/erc20bytes/index.d.ts +0 -2
- package/lib/builtin/erc20bytes/index.js +0 -9
- package/lib/builtin/erc20bytes/index.js.map +0 -1
- package/lib/builtin/erc20bytes/test-utils.js.map +0 -1
- package/lib/builtin/erc721/index.d.ts +0 -2
- package/lib/builtin/erc721/index.js +0 -9
- package/lib/builtin/erc721/index.js.map +0 -1
- package/lib/builtin/erc721/test-utils.js.map +0 -1
- package/lib/builtin/index.d.ts +0 -4
- package/lib/builtin/index.js +0 -9
- package/lib/builtin/index.js.map +0 -1
- package/lib/builtin/internal/EACAggregatorProxy.js +0 -3
- package/lib/builtin/internal/EACAggregatorProxy.js.map +0 -1
- package/lib/builtin/internal/ERC1155.js +0 -3
- package/lib/builtin/internal/ERC1155.js.map +0 -1
- package/lib/builtin/internal/ERC20.js +0 -3
- package/lib/builtin/internal/ERC20.js.map +0 -1
- package/lib/builtin/internal/ERC20Bytes.js +0 -3
- package/lib/builtin/internal/ERC20Bytes.js.map +0 -1
- package/lib/builtin/internal/ERC721.js +0 -3
- package/lib/builtin/internal/ERC721.js.map +0 -1
- package/lib/builtin/internal/WETH9.js +0 -3
- package/lib/builtin/internal/WETH9.js.map +0 -1
- package/lib/builtin/internal/common.js.map +0 -1
- package/lib/builtin/internal/eacaggregatorproxy_processor.js.map +0 -1
- package/lib/builtin/internal/erc1155_processor.js.map +0 -1
- package/lib/builtin/internal/erc20_processor.js.map +0 -1
- package/lib/builtin/internal/erc20bytes_processor.js.map +0 -1
- package/lib/builtin/internal/erc721_processor.js.map +0 -1
- package/lib/builtin/internal/factories/EACAggregatorProxy__factory.js.map +0 -1
- package/lib/builtin/internal/factories/ERC1155__factory.js.map +0 -1
- package/lib/builtin/internal/factories/ERC20Bytes__factory.js.map +0 -1
- package/lib/builtin/internal/factories/ERC20__factory.js.map +0 -1
- package/lib/builtin/internal/factories/ERC721__factory.js.map +0 -1
- package/lib/builtin/internal/factories/WETH9__factory.js.map +0 -1
- package/lib/builtin/internal/factories/index.d.ts +0 -6
- package/lib/builtin/internal/factories/index.js +0 -19
- package/lib/builtin/internal/factories/index.js.map +0 -1
- package/lib/builtin/internal/index.d.ts +0 -13
- package/lib/builtin/internal/index.js +0 -18
- package/lib/builtin/internal/index.js.map +0 -1
- package/lib/builtin/internal/weth9_processor.js.map +0 -1
- package/lib/builtin/weth9/index.d.ts +0 -2
- package/lib/builtin/weth9/index.js +0 -9
- package/lib/builtin/weth9/index.js.map +0 -1
- package/lib/builtin/weth9/test-utils.js.map +0 -1
- package/lib/core/bind-options.js +0 -47
- package/lib/core/bind-options.js.map +0 -1
- package/lib/core/context.js.map +0 -1
- package/lib/core/generic-processor.test.js.map +0 -1
- package/lib/error.d.ts +0 -7
- package/lib/error.js +0 -43
- package/lib/error.js.map +0 -1
- package/lib/target-ethers-sentio/event-handler.js +0 -52
- package/lib/target-ethers-sentio/event-handler.js.map +0 -1
- package/lib/target-ethers-sentio/file.js.map +0 -1
- package/lib/target-ethers-sentio/functions-handler.js.map +0 -1
- package/lib/target-ethers-sentio/index.js +0 -58
- package/lib/target-ethers-sentio/index.js.map +0 -1
- package/lib/target-ethers-sentio/types.js.map +0 -1
- package/lib/target-ethers-sentio/view-function.js +0 -74
- package/lib/target-ethers-sentio/view-function.js.map +0 -1
- package/lib/utils/chain.js.map +0 -1
- package/lib/webpack.config.js +0 -50
- package/src/builtin/eacaggregatorproxy/index.ts +0 -6
- package/src/builtin/erc1155/index.ts +0 -6
- package/src/builtin/erc20/index.ts +0 -6
- package/src/builtin/erc20bytes/index.ts +0 -6
- package/src/builtin/erc721/index.ts +0 -6
- package/src/builtin/index.ts +0 -4
- package/src/builtin/internal/common.ts +0 -46
- package/src/builtin/internal/factories/index.ts +0 -9
- package/src/builtin/internal/index.ts +0 -16
- package/src/error.ts +0 -45
- package/src/target-ethers-sentio/.eslintrc.json +0 -14
- package/src/target-ethers-sentio/tsconfig.json +0 -9
- package/src/webpack.config.js +0 -50
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"0x3.js","sourceRoot":"","sources":["../../../src/aptos/builtin/0x3.ts"],"names":[],"mappings":"AAAA,+CAA+C;AAC/C,oBAAoB;AACpB,oBAAoB;AAEpB,uCAAuC;AAEvC,OAAO,EAGL,kBAAkB,EAElB,YAAY,GAIb,MAAM,mBAAmB,CAAC;AAI3B,OAAO,KAAK,IAAI,MAAM,UAAU,CAAC;AAEjC,MAAM,OAAO,KAAM,SAAQ,kBAAkB;IAC3C,YAAY,OAAyB;QACnC,KAAK,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC;IAC1B,CAAC;IAC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enerated file. Do not edit manually. */\n/* tslint:disable */\n/* eslint-disable */\n\n/* Generated modules for account 0x3 */\n\nimport {\n MoveCoder,\n AptosBindOptions,\n AptosBaseProcessor,\n TypedEventInstance,\n AptosNetwork,\n TypedEntryFunctionPayload,\n AptosContext,\n CallFilter,\n} from \"@sentio/sdk/aptos\";\nimport { AptosFetchConfig } from \"@sentio/protos\";\nimport { Address, MoveModule } from \"@sentio/sdk/aptos\";\n\nimport * as _0x1 from \"./0x1.js\";\n\nexport class token extends AptosBaseProcessor {\n constructor(options: AptosBindOptions) {\n super(\"token\", options);\n }\n static DEFAULT_OPTIONS: AptosBindOptions = {\n address: \"0x3\",\n network: AptosNetwork.MAIN_NET,\n };\n\n static bind(options: Partial<AptosBindOptions> = {}): token {\n return new token({ ...token.DEFAULT_OPTIONS, ...options });\n }\n\n onEntryBurn(\n func: (call: token.BurnPayload, ctx: AptosContext) => void,\n filter?: CallFilter,\n fetchConfig?: AptosFetchConfig\n ): token {\n this.onEntryFunctionCall(\n func,\n {\n ...filter,\n function: \"token::burn\",\n },\n fetchConfig\n );\n return this;\n }\n\n onEntryBurnByCreator(\n func: (call: token.BurnByCreatorPayload, ctx: AptosContext) => void,\n filter?: CallFilter,\n fetchConfig?: AptosFetchConfig\n ): token {\n this.onEntryFunctionCall(\n func,\n {\n ...filter,\n function: \"token::burn_by_creator\",\n },\n fetchConfig\n );\n return this;\n }\n\n onEntryCreateCollectionScript(\n func: (\n call: token.CreateCollectionScriptPayload,\n ctx: AptosContext\n ) => void,\n filter?: CallFilter,\n fetchConfig?: AptosFetchConfig\n ): token {\n this.onEntryFunctionCall(\n func,\n {\n ...filter,\n function: \"token::create_collection_script\",\n },\n fetchConfig\n );\n return this;\n }\n\n onEntryCreateTokenScript(\n func: (call: token.CreateTokenScriptPayload, ctx: AptosContext) => void,\n filter?: CallFilter,\n fetchConfig?: AptosFetchConfig\n ): token {\n this.onEntryFunctionCall(\n func,\n {\n ...filter,\n function: \"token::create_token_script\",\n },\n fetchConfig\n );\n return this;\n }\n\n onEntryDirectTransferScript(\n func: (call: token.DirectTransferScriptPayload, ctx: AptosContext) => void,\n filter?: CallFilter,\n fetchConfig?: AptosFetchConfig\n ): token {\n this.onEntryFunctionCall(\n func,\n {\n ...filter,\n function: \"token::direct_transfer_script\",\n },\n fetchConfig\n );\n return this;\n }\n\n onEntryInitializeTokenScript(\n func: (call: token.InitializeTokenScriptPayload, ctx: AptosContext) => void,\n filter?: CallFilter,\n fetchConfig?: AptosFetchConfig\n ): token {\n this.onEntryFunctionCall(\n func,\n {\n ...filter,\n function: \"token::initialize_token_script\",\n },\n fetchConfig\n );\n return this;\n }\n\n onEntryMintScript(\n func: (call: token.MintScriptPayload, ctx: AptosContext) => void,\n filter?: CallFilter,\n fetchConfig?: AptosFetchConfig\n ): token {\n this.onEntryFunctionCall(\n func,\n {\n ...filter,\n function: \"token::mint_script\",\n },\n fetchConfig\n );\n return this;\n }\n\n onEntryMutateTokenProperties(\n func: (call: token.MutateTokenPropertiesPayload, ctx: AptosContext) => void,\n filter?: CallFilter,\n fetchConfig?: AptosFetchConfig\n ): token {\n this.onEntryFunctionCall(\n func,\n {\n ...filter,\n function: \"token::mutate_token_properties\",\n },\n fetchConfig\n );\n return this;\n }\n\n onEntryOptInDirectTransfer(\n func: (call: token.OptInDirectTransferPayload, ctx: AptosContext) => void,\n filter?: CallFilter,\n fetchConfig?: AptosFetchConfig\n ): token {\n this.onEntryFunctionCall(\n func,\n {\n ...filter,\n function: \"token::opt_in_direct_transfer\",\n },\n fetchConfig\n );\n return this;\n }\n\n onEventCreateCollectionEvent(\n func: (\n event: token.CreateCollectionEventInstance,\n ctx: AptosContext\n ) => void,\n fetchConfig?: AptosFetchConfig\n ): token {\n this.onEvent(\n func,\n {\n type: \"token::CreateCollectionEvent\",\n },\n fetchConfig\n );\n return this;\n }\n\n onEventCreateTokenDataEvent(\n func: (\n event: token.CreateTokenDataEventInstance,\n ctx: AptosContext\n ) => void,\n fetchConfig?: AptosFetchConfig\n ): token {\n this.onEvent(\n func,\n {\n type: \"token::CreateTokenDataEvent\",\n },\n fetchConfig\n );\n return this;\n }\n\n onEventMintTokenEvent(\n func: (event: token.MintTokenEventInstance, ctx: AptosContext) => void,\n fetchConfig?: AptosFetchConfig\n ): token {\n this.onEvent(\n func,\n {\n type: \"token::MintTokenEvent\",\n },\n fetchConfig\n );\n return this;\n }\n\n onEventDepositEvent(\n func: (event: token.DepositEventInstance, ctx: AptosContext) => void,\n fetchConfig?: AptosFetchConfig\n ): token {\n this.onEvent(\n func,\n {\n type: \"token::DepositEvent\",\n },\n fetchConfig\n );\n return this;\n }\n\n onEventWithdrawEvent(\n func: (event: token.WithdrawEventInstance, ctx: AptosContext) => void,\n fetchConfig?: AptosFetchConfig\n ): token {\n this.onEvent(\n func,\n {\n type: \"token::WithdrawEvent\",\n },\n fetchConfig\n );\n return this;\n }\n\n onEventBurnTokenEvent(\n func: (event: token.BurnTokenEventInstance, ctx: AptosContext) => void,\n fetchConfig?: AptosFetchConfig\n ): token {\n this.onEvent(\n func,\n {\n type: \"token::BurnTokenEvent\",\n },\n fetchConfig\n );\n return this;\n }\n\n onEventMutateTokenPropertyMapEvent(\n func: (\n event: token.MutateTokenPropertyMapEventInstance,\n ctx: AptosContext\n ) => void,\n fetchConfig?: AptosFetchConfig\n ): token {\n this.onEvent(\n func,\n {\n type: \"token::MutateTokenPropertyMapEvent\",\n },\n fetchConfig\n );\n return this;\n }\n\n loadTypesInternal(registry: MoveCoder) {\n loadAllTypes(registry);\n }\n}\n\nexport namespace token {\n export class BurnTokenEvent {\n static TYPE_QNAME = \"0x3::token::BurnTokenEvent\";\n id: token.TokenId;\n amount: bigint;\n }\n\n export interface BurnTokenEventInstance\n extends TypedEventInstance<BurnTokenEvent> {\n data_decoded: BurnTokenEvent;\n type_arguments: [];\n }\n\n export class CollectionData {\n static TYPE_QNAME = \"0x3::token::CollectionData\";\n description: string;\n name: string;\n uri: string;\n supply: bigint;\n maximum: bigint;\n mutability_config: token.CollectionMutabilityConfig;\n }\n\n export class CollectionMutabilityConfig {\n static TYPE_QNAME = \"0x3::token::CollectionMutabilityConfig\";\n description: Boolean;\n uri: Boolean;\n maximum: Boolean;\n }\n\n export class Collections {\n static TYPE_QNAME = \"0x3::token::Collections\";\n collection_data: _0x1.table.Table<string, token.CollectionData>;\n token_data: _0x1.table.Table<token.TokenDataId, token.TokenData>;\n create_collection_events: _0x1.event.EventHandle<token.CreateCollectionEvent>;\n create_token_data_events: _0x1.event.EventHandle<token.CreateTokenDataEvent>;\n mint_token_events: _0x1.event.EventHandle<token.MintTokenEvent>;\n }\n\n export class CreateCollectionEvent {\n static TYPE_QNAME = \"0x3::token::CreateCollectionEvent\";\n creator: Address;\n collection_name: string;\n uri: string;\n description: string;\n maximum: bigint;\n }\n\n export interface CreateCollectionEventInstance\n extends TypedEventInstance<CreateCollectionEvent> {\n data_decoded: CreateCollectionEvent;\n type_arguments: [];\n }\n\n export class CreateTokenDataEvent {\n static TYPE_QNAME = \"0x3::token::CreateTokenDataEvent\";\n id: token.TokenDataId;\n description: string;\n maximum: bigint;\n uri: string;\n royalty_payee_address: Address;\n royalty_points_denominator: bigint;\n royalty_points_numerator: bigint;\n name: string;\n mutability_config: token.TokenMutabilityConfig;\n property_keys: string[];\n property_values: string[];\n property_types: string[];\n }\n\n export interface CreateTokenDataEventInstance\n extends TypedEventInstance<CreateTokenDataEvent> {\n data_decoded: CreateTokenDataEvent;\n type_arguments: [];\n }\n\n export class DepositEvent {\n static TYPE_QNAME = \"0x3::token::DepositEvent\";\n id: token.TokenId;\n amount: bigint;\n }\n\n export interface DepositEventInstance\n extends TypedEventInstance<DepositEvent> {\n data_decoded: DepositEvent;\n type_arguments: [];\n }\n\n export class MintTokenEvent {\n static TYPE_QNAME = \"0x3::token::MintTokenEvent\";\n id: token.TokenDataId;\n amount: bigint;\n }\n\n export interface MintTokenEventInstance\n extends TypedEventInstance<MintTokenEvent> {\n data_decoded: MintTokenEvent;\n type_arguments: [];\n }\n\n export class MutateTokenPropertyMapEvent {\n static TYPE_QNAME = \"0x3::token::MutateTokenPropertyMapEvent\";\n old_id: token.TokenId;\n new_id: token.TokenId;\n keys: string[];\n values: string[];\n types: string[];\n }\n\n export interface MutateTokenPropertyMapEventInstance\n extends TypedEventInstance<MutateTokenPropertyMapEvent> {\n data_decoded: MutateTokenPropertyMapEvent;\n type_arguments: [];\n }\n\n export class Royalty {\n static TYPE_QNAME = \"0x3::token::Royalty\";\n royalty_points_numerator: bigint;\n royalty_points_denominator: bigint;\n payee_address: Address;\n }\n\n export class Token {\n static TYPE_QNAME = \"0x3::token::Token\";\n id: token.TokenId;\n amount: bigint;\n token_properties: property_map.PropertyMap;\n }\n\n export class TokenData {\n static TYPE_QNAME = \"0x3::token::TokenData\";\n maximum: bigint;\n largest_property_version: bigint;\n supply: bigint;\n uri: string;\n royalty: token.Royalty;\n name: string;\n description: string;\n default_properties: property_map.PropertyMap;\n mutability_config: token.TokenMutabilityConfig;\n }\n\n export class TokenDataId {\n static TYPE_QNAME = \"0x3::token::TokenDataId\";\n creator: Address;\n collection: string;\n name: string;\n }\n\n export class TokenId {\n static TYPE_QNAME = \"0x3::token::TokenId\";\n token_data_id: token.TokenDataId;\n property_version: bigint;\n }\n\n export class TokenMutabilityConfig {\n static TYPE_QNAME = \"0x3::token::TokenMutabilityConfig\";\n maximum: Boolean;\n uri: Boolean;\n royalty: Boolean;\n description: Boolean;\n properties: Boolean;\n }\n\n export class TokenStore {\n static TYPE_QNAME = \"0x3::token::TokenStore\";\n tokens: _0x1.table.Table<token.TokenId, token.Token>;\n direct_transfer: Boolean;\n deposit_events: _0x1.event.EventHandle<token.DepositEvent>;\n withdraw_events: _0x1.event.EventHandle<token.WithdrawEvent>;\n burn_events: _0x1.event.EventHandle<token.BurnTokenEvent>;\n mutate_token_property_events: _0x1.event.EventHandle<token.MutateTokenPropertyMapEvent>;\n }\n\n export class WithdrawCapability {\n static TYPE_QNAME = \"0x3::token::WithdrawCapability\";\n token_owner: Address;\n token_id: token.TokenId;\n amount: bigint;\n expiration_sec: bigint;\n }\n\n export class WithdrawEvent {\n static TYPE_QNAME = \"0x3::token::WithdrawEvent\";\n id: token.TokenId;\n amount: bigint;\n }\n\n export interface WithdrawEventInstance\n extends TypedEventInstance<WithdrawEvent> {\n data_decoded: WithdrawEvent;\n type_arguments: [];\n }\n\n export interface BurnPayload\n extends TypedEntryFunctionPayload<\n [Address, string, string, bigint, bigint]\n > {\n arguments_decoded: [Address, string, string, bigint, bigint];\n type_arguments: [];\n }\n\n export interface BurnByCreatorPayload\n extends TypedEntryFunctionPayload<\n [Address, string, string, bigint, bigint]\n > {\n arguments_decoded: [Address, string, string, bigint, bigint];\n type_arguments: [];\n }\n\n export interface CreateCollectionScriptPayload\n extends TypedEntryFunctionPayload<\n [string, string, string, bigint, Boolean[]]\n > {\n arguments_decoded: [string, string, string, bigint, Boolean[]];\n type_arguments: [];\n }\n\n export interface CreateTokenScriptPayload\n extends TypedEntryFunctionPayload<\n [\n string,\n string,\n string,\n bigint,\n bigint,\n string,\n Address,\n bigint,\n bigint,\n Boolean[],\n string[],\n string[],\n string[]\n ]\n > {\n arguments_decoded: [\n string,\n string,\n string,\n bigint,\n bigint,\n string,\n Address,\n bigint,\n bigint,\n Boolean[],\n string[],\n string[],\n string[]\n ];\n type_arguments: [];\n }\n\n export interface DirectTransferScriptPayload\n extends TypedEntryFunctionPayload<\n [Address, Address, string, string, bigint, bigint]\n > {\n arguments_decoded: [Address, Address, string, string, bigint, bigint];\n type_arguments: [];\n }\n\n export interface InitializeTokenScriptPayload\n extends TypedEntryFunctionPayload<[]> {\n arguments_decoded: [];\n type_arguments: [];\n }\n\n export interface MintScriptPayload\n extends TypedEntryFunctionPayload<[Address, string, string, bigint]> {\n arguments_decoded: [Address, string, string, bigint];\n type_arguments: [];\n }\n\n export interface MutateTokenPropertiesPayload\n extends TypedEntryFunctionPayload<\n [\n Address,\n Address,\n string,\n string,\n bigint,\n bigint,\n string[],\n string[],\n string[]\n ]\n > {\n arguments_decoded: [\n Address,\n Address,\n string,\n string,\n bigint,\n bigint,\n string[],\n string[],\n string[]\n ];\n type_arguments: [];\n }\n\n export interface OptInDirectTransferPayload\n extends TypedEntryFunctionPayload<[Boolean]> {\n arguments_decoded: [Boolean];\n type_arguments: [];\n }\n\n export function loadTypes(_r: MoveCoder) {\n loadAllTypes(_r);\n }\n export const ABI: MoveModule = JSON.parse(\n '{\"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\"}]}]}'\n );\n}\n\nexport namespace property_map {\n export class PropertyMap {\n static TYPE_QNAME = \"0x3::property_map::PropertyMap\";\n map: _0x1.simple_map.SimpleMap<string, property_map.PropertyValue>;\n }\n\n export class PropertyValue {\n static TYPE_QNAME = \"0x3::property_map::PropertyValue\";\n value: string;\n type: string;\n }\n\n export function loadTypes(_r: MoveCoder) {\n loadAllTypes(_r);\n }\n export const ABI: MoveModule = JSON.parse(\n '{\"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\"}]}]}'\n );\n}\n\nexport class token_coin_swap extends AptosBaseProcessor {\n constructor(options: AptosBindOptions) {\n super(\"token_coin_swap\", options);\n }\n static DEFAULT_OPTIONS: AptosBindOptions = {\n address: \"0x3\",\n network: AptosNetwork.MAIN_NET,\n };\n\n static bind(options: Partial<AptosBindOptions> = {}): token_coin_swap {\n return new token_coin_swap({\n ...token_coin_swap.DEFAULT_OPTIONS,\n ...options,\n });\n }\n\n onEntryListTokenForSwap(\n func: (\n call: token_coin_swap.ListTokenForSwapPayload,\n ctx: AptosContext\n ) => void,\n filter?: CallFilter,\n fetchConfig?: AptosFetchConfig\n ): token_coin_swap {\n this.onEntryFunctionCall(\n func,\n {\n ...filter,\n function: \"token_coin_swap::list_token_for_swap\",\n },\n fetchConfig\n );\n return this;\n }\n\n onEventTokenListingEvent(\n func: (\n event: token_coin_swap.TokenListingEventInstance,\n ctx: AptosContext\n ) => void,\n fetchConfig?: AptosFetchConfig\n ): token_coin_swap {\n this.onEvent(\n func,\n {\n type: \"token_coin_swap::TokenListingEvent\",\n },\n fetchConfig\n );\n return this;\n }\n\n onEventTokenSwapEvent(\n func: (\n event: token_coin_swap.TokenSwapEventInstance,\n ctx: AptosContext\n ) => void,\n fetchConfig?: AptosFetchConfig\n ): token_coin_swap {\n this.onEvent(\n func,\n {\n type: \"token_coin_swap::TokenSwapEvent\",\n },\n fetchConfig\n );\n return this;\n }\n\n loadTypesInternal(registry: MoveCoder) {\n loadAllTypes(registry);\n }\n}\n\nexport namespace token_coin_swap {\n export class TokenCoinSwap<T0> {\n static TYPE_QNAME = \"0x3::token_coin_swap::TokenCoinSwap\";\n token_amount: bigint;\n min_price_per_token: bigint;\n }\n\n export class TokenEscrow {\n static TYPE_QNAME = \"0x3::token_coin_swap::TokenEscrow\";\n token: token.Token;\n locked_until_secs: bigint;\n }\n\n export class TokenListingEvent {\n static TYPE_QNAME = \"0x3::token_coin_swap::TokenListingEvent\";\n token_id: token.TokenId;\n amount: bigint;\n min_price: bigint;\n locked_until_secs: bigint;\n coin_type_info: _0x1.type_info.TypeInfo;\n }\n\n export interface TokenListingEventInstance\n extends TypedEventInstance<TokenListingEvent> {\n data_decoded: TokenListingEvent;\n type_arguments: [];\n }\n\n export class TokenListings<T0> {\n static TYPE_QNAME = \"0x3::token_coin_swap::TokenListings\";\n listings: _0x1.table.Table<\n token.TokenId,\n token_coin_swap.TokenCoinSwap<T0>\n >;\n listing_events: _0x1.event.EventHandle<token_coin_swap.TokenListingEvent>;\n swap_events: _0x1.event.EventHandle<token_coin_swap.TokenSwapEvent>;\n }\n\n export class TokenStoreEscrow {\n static TYPE_QNAME = \"0x3::token_coin_swap::TokenStoreEscrow\";\n token_escrows: _0x1.table.Table<token.TokenId, token_coin_swap.TokenEscrow>;\n }\n\n export class TokenSwapEvent {\n static TYPE_QNAME = \"0x3::token_coin_swap::TokenSwapEvent\";\n token_id: token.TokenId;\n token_buyer: Address;\n token_amount: bigint;\n coin_amount: bigint;\n coin_type_info: _0x1.type_info.TypeInfo;\n }\n\n export interface TokenSwapEventInstance\n extends TypedEventInstance<TokenSwapEvent> {\n data_decoded: TokenSwapEvent;\n type_arguments: [];\n }\n\n export interface ListTokenForSwapPayload<T0 = any>\n extends TypedEntryFunctionPayload<\n [Address, string, string, bigint, bigint, bigint, bigint]\n > {\n arguments_decoded: [\n Address,\n string,\n string,\n bigint,\n bigint,\n bigint,\n bigint\n ];\n type_arguments: [string];\n }\n\n export function loadTypes(_r: MoveCoder) {\n loadAllTypes(_r);\n }\n export const ABI: MoveModule = JSON.parse(\n '{\"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\"}]}]}'\n );\n}\n\nexport class token_transfers extends AptosBaseProcessor {\n constructor(options: AptosBindOptions) {\n super(\"token_transfers\", options);\n }\n static DEFAULT_OPTIONS: AptosBindOptions = {\n address: \"0x3\",\n network: AptosNetwork.MAIN_NET,\n };\n\n static bind(options: Partial<AptosBindOptions> = {}): token_transfers {\n return new token_transfers({\n ...token_transfers.DEFAULT_OPTIONS,\n ...options,\n });\n }\n\n onEntryCancelOfferScript(\n func: (\n call: token_transfers.CancelOfferScriptPayload,\n ctx: AptosContext\n ) => void,\n filter?: CallFilter,\n fetchConfig?: AptosFetchConfig\n ): token_transfers {\n this.onEntryFunctionCall(\n func,\n {\n ...filter,\n function: \"token_transfers::cancel_offer_script\",\n },\n fetchConfig\n );\n return this;\n }\n\n onEntryClaimScript(\n func: (call: token_transfers.ClaimScriptPayload, ctx: AptosContext) => void,\n filter?: CallFilter,\n fetchConfig?: AptosFetchConfig\n ): token_transfers {\n this.onEntryFunctionCall(\n func,\n {\n ...filter,\n function: \"token_transfers::claim_script\",\n },\n fetchConfig\n );\n return this;\n }\n\n onEntryOfferScript(\n func: (call: token_transfers.OfferScriptPayload, ctx: AptosContext) => void,\n filter?: CallFilter,\n fetchConfig?: AptosFetchConfig\n ): token_transfers {\n this.onEntryFunctionCall(\n func,\n {\n ...filter,\n function: \"token_transfers::offer_script\",\n },\n fetchConfig\n );\n return this;\n }\n\n onEventTokenOfferEvent(\n func: (\n event: token_transfers.TokenOfferEventInstance,\n ctx: AptosContext\n ) => void,\n fetchConfig?: AptosFetchConfig\n ): token_transfers {\n this.onEvent(\n func,\n {\n type: \"token_transfers::TokenOfferEvent\",\n },\n fetchConfig\n );\n return this;\n }\n\n onEventTokenCancelOfferEvent(\n func: (\n event: token_transfers.TokenCancelOfferEventInstance,\n ctx: AptosContext\n ) => void,\n fetchConfig?: AptosFetchConfig\n ): token_transfers {\n this.onEvent(\n func,\n {\n type: \"token_transfers::TokenCancelOfferEvent\",\n },\n fetchConfig\n );\n return this;\n }\n\n onEventTokenClaimEvent(\n func: (\n event: token_transfers.TokenClaimEventInstance,\n ctx: AptosContext\n ) => void,\n fetchConfig?: AptosFetchConfig\n ): token_transfers {\n this.onEvent(\n func,\n {\n type: \"token_transfers::TokenClaimEvent\",\n },\n fetchConfig\n );\n return this;\n }\n\n loadTypesInternal(registry: MoveCoder) {\n loadAllTypes(registry);\n }\n}\n\nexport namespace token_transfers {\n export class PendingClaims {\n static TYPE_QNAME = \"0x3::token_transfers::PendingClaims\";\n pending_claims: _0x1.table.Table<token_transfers.TokenOfferId, token.Token>;\n offer_events: _0x1.event.EventHandle<token_transfers.TokenOfferEvent>;\n cancel_offer_events: _0x1.event.EventHandle<token_transfers.TokenCancelOfferEvent>;\n claim_events: _0x1.event.EventHandle<token_transfers.TokenClaimEvent>;\n }\n\n export class TokenCancelOfferEvent {\n static TYPE_QNAME = \"0x3::token_transfers::TokenCancelOfferEvent\";\n to_address: Address;\n token_id: token.TokenId;\n amount: bigint;\n }\n\n export interface TokenCancelOfferEventInstance\n extends TypedEventInstance<TokenCancelOfferEvent> {\n data_decoded: TokenCancelOfferEvent;\n type_arguments: [];\n }\n\n export class TokenClaimEvent {\n static TYPE_QNAME = \"0x3::token_transfers::TokenClaimEvent\";\n to_address: Address;\n token_id: token.TokenId;\n amount: bigint;\n }\n\n export interface TokenClaimEventInstance\n extends TypedEventInstance<TokenClaimEvent> {\n data_decoded: TokenClaimEvent;\n type_arguments: [];\n }\n\n export class TokenOfferEvent {\n static TYPE_QNAME = \"0x3::token_transfers::TokenOfferEvent\";\n to_address: Address;\n token_id: token.TokenId;\n amount: bigint;\n }\n\n export interface TokenOfferEventInstance\n extends TypedEventInstance<TokenOfferEvent> {\n data_decoded: TokenOfferEvent;\n type_arguments: [];\n }\n\n export class TokenOfferId {\n static TYPE_QNAME = \"0x3::token_transfers::TokenOfferId\";\n to_addr: Address;\n token_id: token.TokenId;\n }\n\n export interface CancelOfferScriptPayload\n extends TypedEntryFunctionPayload<\n [Address, Address, Address, string, string, bigint]\n > {\n arguments_decoded: [Address, Address, Address, string, string, bigint];\n type_arguments: [];\n }\n\n export interface ClaimScriptPayload\n extends TypedEntryFunctionPayload<\n [Address, Address, Address, string, string, bigint]\n > {\n arguments_decoded: [Address, Address, Address, string, string, bigint];\n type_arguments: [];\n }\n\n export interface OfferScriptPayload\n extends TypedEntryFunctionPayload<\n [Address, Address, Address, string, string, bigint, bigint]\n > {\n arguments_decoded: [\n Address,\n Address,\n Address,\n string,\n string,\n bigint,\n bigint\n ];\n type_arguments: [];\n }\n\n export function loadTypes(_r: MoveCoder) {\n loadAllTypes(_r);\n }\n export const ABI: MoveModule = JSON.parse(\n '{\"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\"}]}]}'\n );\n}\n\nexport function loadAllTypes(_r: MoveCoder) {\n _0x1.loadAllTypes(_r);\n\n _r.load(token.ABI);\n _r.load(property_map.ABI);\n _r.load(token_coin_swap.ABI);\n _r.load(token_transfers.ABI);\n}\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/aptos/builtin/index.ts"],"names":[],"mappings":"AAAA,+CAA+C;AAC/C,oBAAoB;AACpB,oBAAoB;AACpB,OAAO,KAAK,IAAI,MAAM,UAAU,CAAA;AAChC,OAAO,KAAK,IAAI,MAAM,UAAU,CAAA","sourcesContent":["/* Autogenerated file. Do not edit manually. */\n/* tslint:disable */\n/* eslint-disable */\nexport * as _0x1 from './0x1.js'\nexport * as _0x3 from './0x3.js'\n"]}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { MoveModuleBytecode } from '../move-types.js';
|
|
2
|
+
import { AccountRegister } from './typegen.js';
|
|
3
|
+
import { AptosNetwork } from '../network.js';
|
|
4
|
+
export declare function codegen(abisDir: string, outDir?: string): Promise<void>;
|
|
5
|
+
interface OutputFile {
|
|
6
|
+
fileName: string;
|
|
7
|
+
fileContent: string;
|
|
8
|
+
}
|
|
9
|
+
interface Config {
|
|
10
|
+
fileName: string;
|
|
11
|
+
outputDir: string;
|
|
12
|
+
network: AptosNetwork;
|
|
13
|
+
}
|
|
14
|
+
export declare class AccountCodegen {
|
|
15
|
+
modules: MoveModuleBytecode[];
|
|
16
|
+
config: Config;
|
|
17
|
+
loader: AccountRegister;
|
|
18
|
+
constructor(loader: AccountRegister, modules: MoveModuleBytecode[], config: Config);
|
|
19
|
+
generate(): OutputFile[];
|
|
20
|
+
}
|
|
21
|
+
export {};
|
|
@@ -0,0 +1,380 @@
|
|
|
1
|
+
import * as fs from 'fs';
|
|
2
|
+
import * as path from 'path';
|
|
3
|
+
import { format } from 'prettier';
|
|
4
|
+
import { AccountModulesImportInfo, AccountRegister, generateType, normalizeToJSName } from './typegen.js';
|
|
5
|
+
import { getMeaningfulFunctionParams, isFrameworkAccount, moduleQname, SPLITTER } from '../utils.js';
|
|
6
|
+
import chalk from 'chalk';
|
|
7
|
+
import { AptosNetwork, getAptosChainName } from '../network.js';
|
|
8
|
+
import { parseMoveType } from '../types.js';
|
|
9
|
+
import { AptosClient } from 'aptos-sdk';
|
|
10
|
+
import { camelCase } from 'lodash-es';
|
|
11
|
+
export async function codegen(abisDir, outDir = 'src/types/aptos') {
|
|
12
|
+
if (!fs.existsSync(abisDir)) {
|
|
13
|
+
return;
|
|
14
|
+
}
|
|
15
|
+
console.log(chalk.green('Generated Types for Aptos'));
|
|
16
|
+
await generate(abisDir, outDir);
|
|
17
|
+
}
|
|
18
|
+
function getRpcEndpoint(network) {
|
|
19
|
+
switch (network) {
|
|
20
|
+
case AptosNetwork.TEST_NET:
|
|
21
|
+
return 'https://testnet.aptoslabs.com/';
|
|
22
|
+
}
|
|
23
|
+
return 'https://mainnet.aptoslabs.com/';
|
|
24
|
+
}
|
|
25
|
+
function getRpcClient(network) {
|
|
26
|
+
return new AptosClient(getRpcEndpoint(network));
|
|
27
|
+
}
|
|
28
|
+
async function generate(srcDir, outputDir) {
|
|
29
|
+
await generateForNetwork(srcDir, outputDir, AptosNetwork.MAIN_NET);
|
|
30
|
+
await generateForNetwork(path.join(srcDir, 'testnet'), path.join(outputDir, 'testnet'), AptosNetwork.TEST_NET);
|
|
31
|
+
}
|
|
32
|
+
async function generateForNetwork(srcDir, outputDir, network) {
|
|
33
|
+
if (!fs.existsSync(srcDir)) {
|
|
34
|
+
return;
|
|
35
|
+
}
|
|
36
|
+
if (network === AptosNetwork.TEST_NET) {
|
|
37
|
+
console.log('Found testnet directory, generate code for testnet modules');
|
|
38
|
+
}
|
|
39
|
+
const files = fs.readdirSync(srcDir);
|
|
40
|
+
outputDir = path.resolve(outputDir);
|
|
41
|
+
const outputs = [];
|
|
42
|
+
fs.mkdirSync(outputDir, { recursive: true });
|
|
43
|
+
const loader = new AccountRegister();
|
|
44
|
+
// when generating user code, don't need to generate framework account
|
|
45
|
+
loader.accountImports.set('0x1', new AccountModulesImportInfo('0x1', '0x1'));
|
|
46
|
+
loader.accountImports.set('0x2', new AccountModulesImportInfo('0x2', '0x2'));
|
|
47
|
+
loader.accountImports.set('0x3', new AccountModulesImportInfo('0x3', '0x3'));
|
|
48
|
+
const client = getRpcClient(network);
|
|
49
|
+
for (const file of files) {
|
|
50
|
+
if (!file.endsWith('.json')) {
|
|
51
|
+
continue;
|
|
52
|
+
}
|
|
53
|
+
const fullPath = path.resolve(srcDir, file);
|
|
54
|
+
const modules = JSON.parse(fs.readFileSync(fullPath, 'utf-8'));
|
|
55
|
+
for (const module of modules) {
|
|
56
|
+
if (module.abi) {
|
|
57
|
+
loader.register(module.abi, path.basename(file, '.json'));
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
const codeGen = new AccountCodegen(loader, modules, {
|
|
61
|
+
fileName: path.basename(file, '.json'),
|
|
62
|
+
outputDir: outputDir,
|
|
63
|
+
network,
|
|
64
|
+
});
|
|
65
|
+
outputs.push(...codeGen.generate());
|
|
66
|
+
}
|
|
67
|
+
while (loader.pendingAccounts.size > 0) {
|
|
68
|
+
for (const account of loader.pendingAccounts) {
|
|
69
|
+
console.log(`download dependent module for account ${account} at ${getAptosChainName(network)}`);
|
|
70
|
+
try {
|
|
71
|
+
const modules = await client.getAccountModules(account);
|
|
72
|
+
fs.writeFileSync(path.resolve(srcDir, account + '.json'), JSON.stringify(modules, null, '\t'));
|
|
73
|
+
for (const module of modules) {
|
|
74
|
+
if (module.abi) {
|
|
75
|
+
loader.register(module.abi, account);
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
const codeGen = new AccountCodegen(loader, modules, {
|
|
79
|
+
fileName: account,
|
|
80
|
+
outputDir: outputDir,
|
|
81
|
+
network,
|
|
82
|
+
});
|
|
83
|
+
outputs.push(...codeGen.generate());
|
|
84
|
+
}
|
|
85
|
+
catch (e) {
|
|
86
|
+
console.error(chalk.red('Error downloading account module, check if you choose the right network,or download account modules manually into your director'));
|
|
87
|
+
console.error(e);
|
|
88
|
+
process.exit(1);
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
for (const output of outputs) {
|
|
93
|
+
const content = format(output.fileContent, { parser: 'typescript' });
|
|
94
|
+
fs.writeFileSync(path.join(outputDir, output.fileName), content);
|
|
95
|
+
}
|
|
96
|
+
const rootFile = path.join(outputDir, 'index.ts');
|
|
97
|
+
fs.writeFileSync(rootFile, `/* Autogenerated file. Do not edit manually. */
|
|
98
|
+
/* tslint:disable */
|
|
99
|
+
/* eslint-disable */
|
|
100
|
+
`);
|
|
101
|
+
for (const output of outputs) {
|
|
102
|
+
const parsed = path.parse(output.fileName);
|
|
103
|
+
const content = `export * as _${parsed.name} from './${parsed.name}.js'\n`;
|
|
104
|
+
fs.appendFileSync(rootFile, content);
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
export class AccountCodegen {
|
|
108
|
+
modules;
|
|
109
|
+
config;
|
|
110
|
+
loader;
|
|
111
|
+
constructor(loader, modules, config) {
|
|
112
|
+
// const json = fs.readFileSync(config.srcFile, 'utf-8')
|
|
113
|
+
this.modules = modules;
|
|
114
|
+
this.config = config;
|
|
115
|
+
this.loader = loader;
|
|
116
|
+
}
|
|
117
|
+
generate() {
|
|
118
|
+
if (!this.modules) {
|
|
119
|
+
return [];
|
|
120
|
+
}
|
|
121
|
+
// const baseName = path.basename(this.config.fileName, '.json')
|
|
122
|
+
let address;
|
|
123
|
+
for (const module of this.modules) {
|
|
124
|
+
if (module.abi && module.abi.address) {
|
|
125
|
+
address = module.abi.address;
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
if (!address) {
|
|
129
|
+
return [];
|
|
130
|
+
}
|
|
131
|
+
const imports = `
|
|
132
|
+
import {
|
|
133
|
+
MoveCoder, AptosBindOptions, AptosBaseProcessor,
|
|
134
|
+
TypedEventInstance, AptosNetwork, TypedEntryFunctionPayload,
|
|
135
|
+
AptosContext, CallFilter
|
|
136
|
+
} from "@sentio/sdk/aptos"
|
|
137
|
+
import { AptosFetchConfig } from "@sentio/protos"
|
|
138
|
+
import { Address, MoveModule } from "@sentio/sdk/aptos"
|
|
139
|
+
`;
|
|
140
|
+
const dependedAccounts = [];
|
|
141
|
+
const moduleImports = [];
|
|
142
|
+
const info = this.loader.accountImports.get(address);
|
|
143
|
+
if (info) {
|
|
144
|
+
for (const [account] of info.imports.entries()) {
|
|
145
|
+
// Remap to user's filename if possible, TODO codepath not well tested
|
|
146
|
+
const tsAccountModule = './' + (this.loader.accountImports.get(account)?.moduleName || account);
|
|
147
|
+
if (isFrameworkAccount(account) && !isFrameworkAccount(address)) {
|
|
148
|
+
// Decide where to find runtime library
|
|
149
|
+
moduleImports.push(`import { _${account} } from "@sentio/sdk/aptos/builtin"`);
|
|
150
|
+
}
|
|
151
|
+
else {
|
|
152
|
+
moduleImports.push(`import * as _${account} from "${tsAccountModule}.js"`);
|
|
153
|
+
}
|
|
154
|
+
dependedAccounts.push(account);
|
|
155
|
+
}
|
|
156
|
+
}
|
|
157
|
+
const source = `
|
|
158
|
+
/* Autogenerated file. Do not edit manually. */
|
|
159
|
+
/* tslint:disable */
|
|
160
|
+
/* eslint-disable */
|
|
161
|
+
|
|
162
|
+
/* Generated modules for account ${address} */
|
|
163
|
+
|
|
164
|
+
${imports}
|
|
165
|
+
|
|
166
|
+
${moduleImports.join('\n')}
|
|
167
|
+
|
|
168
|
+
${this.modules.map((m) => generateModule(m, this.config.network)).join('\n')}
|
|
169
|
+
|
|
170
|
+
export function loadAllTypes(_r: MoveCoder) {
|
|
171
|
+
${dependedAccounts.map((a) => `_${a}.loadAllTypes(_r)`).join('\n')}
|
|
172
|
+
|
|
173
|
+
${this.modules
|
|
174
|
+
.map((m) => {
|
|
175
|
+
return `_r.load(${normalizeToJSName(m.abi.name)}.ABI)`;
|
|
176
|
+
})
|
|
177
|
+
.join('\n')}
|
|
178
|
+
}
|
|
179
|
+
`; // source
|
|
180
|
+
return [
|
|
181
|
+
{
|
|
182
|
+
fileName: this.config.fileName + '.ts',
|
|
183
|
+
fileContent: source,
|
|
184
|
+
},
|
|
185
|
+
];
|
|
186
|
+
}
|
|
187
|
+
}
|
|
188
|
+
function generateNetworkOption(network) {
|
|
189
|
+
switch (network) {
|
|
190
|
+
case AptosNetwork.TEST_NET:
|
|
191
|
+
return 'TEST_NET';
|
|
192
|
+
}
|
|
193
|
+
return 'MAIN_NET';
|
|
194
|
+
}
|
|
195
|
+
function generateModule(moduleByteCode, network) {
|
|
196
|
+
if (!moduleByteCode.abi) {
|
|
197
|
+
return '';
|
|
198
|
+
}
|
|
199
|
+
const module = moduleByteCode.abi;
|
|
200
|
+
const functions = module.exposed_functions.map((f) => generateOnEntryFunctions(module, f)).filter((s) => s !== '');
|
|
201
|
+
const eventStructs = getEventStructs(module);
|
|
202
|
+
const eventTypes = new Set(eventStructs.keys());
|
|
203
|
+
const events = Array.from(eventStructs.values())
|
|
204
|
+
.map((e) => generateOnEvents(module, e))
|
|
205
|
+
.filter((s) => s !== '');
|
|
206
|
+
const structs = module.structs.map((s) => generateStructs(module, s, eventTypes));
|
|
207
|
+
const callArgs = module.exposed_functions.map((f) => generateCallArgsStructs(module, f));
|
|
208
|
+
const moduleName = normalizeToJSName(module.name);
|
|
209
|
+
let processor = '';
|
|
210
|
+
if (functions.length > 0 || events.length > 0) {
|
|
211
|
+
processor = `export class ${moduleName} extends AptosBaseProcessor {
|
|
212
|
+
|
|
213
|
+
constructor(options: AptosBindOptions) {
|
|
214
|
+
super("${module.name}", options)
|
|
215
|
+
}
|
|
216
|
+
static DEFAULT_OPTIONS: AptosBindOptions = {
|
|
217
|
+
address: "${module.address}",
|
|
218
|
+
network: AptosNetwork.${generateNetworkOption(network)}
|
|
219
|
+
}
|
|
220
|
+
|
|
221
|
+
static bind(options: Partial<AptosBindOptions> = {}): ${moduleName} {
|
|
222
|
+
return new ${moduleName}({ ...${moduleName}.DEFAULT_OPTIONS, ...options })
|
|
223
|
+
}
|
|
224
|
+
|
|
225
|
+
${functions.join('\n')}
|
|
226
|
+
|
|
227
|
+
${events.join('\n')}
|
|
228
|
+
|
|
229
|
+
loadTypesInternal(registry: MoveCoder) {
|
|
230
|
+
loadAllTypes(registry)
|
|
231
|
+
}
|
|
232
|
+
}
|
|
233
|
+
`;
|
|
234
|
+
}
|
|
235
|
+
return `
|
|
236
|
+
${processor}
|
|
237
|
+
|
|
238
|
+
export namespace ${moduleName} {
|
|
239
|
+
${structs.join('\n')}
|
|
240
|
+
|
|
241
|
+
${callArgs.join('\n')}
|
|
242
|
+
|
|
243
|
+
export function loadTypes(_r: MoveCoder) {
|
|
244
|
+
loadAllTypes(_r)
|
|
245
|
+
}
|
|
246
|
+
export const ABI: MoveModule = JSON.parse('${JSON.stringify(module)}')
|
|
247
|
+
}
|
|
248
|
+
`;
|
|
249
|
+
}
|
|
250
|
+
function generateStructs(module, struct, events) {
|
|
251
|
+
const genericString = generateStructTypeParameters(struct);
|
|
252
|
+
const genericStringAny = generateStructTypeParameters(struct, true);
|
|
253
|
+
const structName = normalizeToJSName(struct.name);
|
|
254
|
+
const fields = struct.fields.map((field) => {
|
|
255
|
+
return `${field.name}: ${generateType(field.type, module.address)}`;
|
|
256
|
+
});
|
|
257
|
+
let eventPayload = '';
|
|
258
|
+
if (events.has(moduleQname(module) + SPLITTER + struct.name)) {
|
|
259
|
+
eventPayload = `
|
|
260
|
+
export interface ${structName}Instance extends
|
|
261
|
+
TypedEventInstance<${structName}${genericStringAny}> {
|
|
262
|
+
data_decoded: ${structName}${genericStringAny}
|
|
263
|
+
type_arguments: [${struct.generic_type_params.map((_) => 'string').join(', ')}]
|
|
264
|
+
}
|
|
265
|
+
`;
|
|
266
|
+
}
|
|
267
|
+
return `
|
|
268
|
+
export class ${structName}${genericString} {
|
|
269
|
+
static TYPE_QNAME = '${module.address}::${module.name}::${struct.name}'
|
|
270
|
+
${fields.join('\n')}
|
|
271
|
+
}
|
|
272
|
+
|
|
273
|
+
${eventPayload}
|
|
274
|
+
`;
|
|
275
|
+
}
|
|
276
|
+
function generateFunctionTypeParameters(func) {
|
|
277
|
+
let genericString = '';
|
|
278
|
+
if (func.generic_type_params && func.generic_type_params.length > 0) {
|
|
279
|
+
const params = func.generic_type_params
|
|
280
|
+
.map((v, idx) => {
|
|
281
|
+
return `T${idx}=any`;
|
|
282
|
+
})
|
|
283
|
+
.join(',');
|
|
284
|
+
genericString = `<${params}>`;
|
|
285
|
+
}
|
|
286
|
+
return genericString;
|
|
287
|
+
}
|
|
288
|
+
function generateStructTypeParameters(struct, useAny = false) {
|
|
289
|
+
let genericString = '';
|
|
290
|
+
if (struct.generic_type_params && struct.generic_type_params.length > 0) {
|
|
291
|
+
const params = struct.generic_type_params
|
|
292
|
+
.map((v, idx) => {
|
|
293
|
+
return useAny ? 'any' : 'T' + idx;
|
|
294
|
+
})
|
|
295
|
+
.join(',');
|
|
296
|
+
genericString = `<${params}>`;
|
|
297
|
+
}
|
|
298
|
+
return genericString;
|
|
299
|
+
}
|
|
300
|
+
function generateCallArgsStructs(module, func) {
|
|
301
|
+
if (!func.is_entry) {
|
|
302
|
+
return;
|
|
303
|
+
}
|
|
304
|
+
const fields = getMeaningfulFunctionParams(func).map((param) => {
|
|
305
|
+
return `${generateType(param, module.address)}`;
|
|
306
|
+
});
|
|
307
|
+
const camelFuncName = capitalizeFirstChar(camelCase(func.name));
|
|
308
|
+
const genericString = generateFunctionTypeParameters(func);
|
|
309
|
+
return `
|
|
310
|
+
export interface ${camelFuncName}Payload${genericString}
|
|
311
|
+
extends TypedEntryFunctionPayload<[${fields.join(',')}]> {
|
|
312
|
+
arguments_decoded: [${fields.join(',')}],
|
|
313
|
+
type_arguments: [${func.generic_type_params.map((_) => 'string').join(', ')}]
|
|
314
|
+
}
|
|
315
|
+
`;
|
|
316
|
+
}
|
|
317
|
+
function generateOnEntryFunctions(module, func) {
|
|
318
|
+
if (!func.is_entry) {
|
|
319
|
+
return '';
|
|
320
|
+
}
|
|
321
|
+
// const genericString = generateFunctionTypeParameters(func)
|
|
322
|
+
const moduleName = normalizeToJSName(module.name);
|
|
323
|
+
const camelFuncName = capitalizeFirstChar(camelCase(func.name));
|
|
324
|
+
const source = `
|
|
325
|
+
onEntry${camelFuncName}(func: (call: ${moduleName}.${camelFuncName}Payload, ctx: AptosContext) => void, filter?: CallFilter, fetchConfig?: AptosFetchConfig): ${moduleName} {
|
|
326
|
+
this.onEntryFunctionCall(func, {
|
|
327
|
+
...filter,
|
|
328
|
+
function: '${module.name}::${func.name}'
|
|
329
|
+
},
|
|
330
|
+
fetchConfig)
|
|
331
|
+
return this
|
|
332
|
+
}`;
|
|
333
|
+
return source;
|
|
334
|
+
}
|
|
335
|
+
function getEventStructs(module) {
|
|
336
|
+
const qname = moduleQname(module);
|
|
337
|
+
const structMap = new Map();
|
|
338
|
+
const eventMap = new Map();
|
|
339
|
+
for (const struct of module.structs) {
|
|
340
|
+
structMap.set(qname + SPLITTER + struct.name, struct);
|
|
341
|
+
}
|
|
342
|
+
for (const struct of module.structs) {
|
|
343
|
+
for (const field of struct.fields) {
|
|
344
|
+
const t = parseMoveType(field.type);
|
|
345
|
+
if (t.qname === '0x1::event::EventHandle') {
|
|
346
|
+
const event = t.typeArgs[0].qname;
|
|
347
|
+
const eventStruct = structMap.get(event);
|
|
348
|
+
if (eventStruct) {
|
|
349
|
+
eventMap.set(event, eventStruct);
|
|
350
|
+
}
|
|
351
|
+
}
|
|
352
|
+
}
|
|
353
|
+
}
|
|
354
|
+
return eventMap;
|
|
355
|
+
}
|
|
356
|
+
function generateOnEvents(module, struct) {
|
|
357
|
+
// for struct that has drop + store
|
|
358
|
+
// if (!isEvent(struct, module)) {
|
|
359
|
+
// return ''
|
|
360
|
+
// }
|
|
361
|
+
// const genericString = generateStructTypeParameters(struct)
|
|
362
|
+
const moduleName = normalizeToJSName(module.name);
|
|
363
|
+
const source = `
|
|
364
|
+
onEvent${struct.name}(func: (event: ${moduleName}.${normalizeToJSName(struct.name)}Instance, ctx: AptosContext) => void, fetchConfig?: AptosFetchConfig): ${moduleName} {
|
|
365
|
+
this.onEvent(func, {
|
|
366
|
+
type: '${module.name}::${struct.name}'
|
|
367
|
+
},
|
|
368
|
+
fetchConfig)
|
|
369
|
+
return this
|
|
370
|
+
}
|
|
371
|
+
`;
|
|
372
|
+
return source;
|
|
373
|
+
}
|
|
374
|
+
function capitalizeFirstChar(input) {
|
|
375
|
+
if (!input) {
|
|
376
|
+
return input;
|
|
377
|
+
}
|
|
378
|
+
return input[0].toUpperCase() + (input.length > 1 ? input.substring(1) : '');
|
|
379
|
+
}
|
|
380
|
+
//# sourceMappingURL=codegen.js.map
|