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