@ercworldio/blockchain-shared 1.0.0-dev.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -0
- package/build/chains/ChainDefinition.d.ts +2 -0
- package/build/chains/ChainDefinition.d.ts.map +1 -0
- package/build/chains/ChainDefinition.js +84 -0
- package/build/chains/Provider.d.ts +20 -0
- package/build/chains/Provider.d.ts.map +1 -0
- package/build/chains/Provider.js +85 -0
- package/build/chains/RPC.d.ts +34 -0
- package/build/chains/RPC.d.ts.map +1 -0
- package/build/chains/RPC.js +147 -0
- package/build/chains/chain_to_ticker.json +28 -0
- package/build/chains/chains.json +513 -0
- package/build/chains/chains_stg-bu.json +513 -0
- package/build/chains/chains_v2.json +494 -0
- package/build/chains/escrow-contracts/10143.json +8 -0
- package/build/chains/escrow-contracts/97.json +8 -0
- package/build/chains/event_listener_config_escrows.json +699 -0
- package/build/chains/networks_dev.json +715 -0
- package/build/chains/networks_prod-bu.json +542 -0
- package/build/chains/networks_prod.json +541 -0
- package/build/chains/networks_stg-bu.json +568 -0
- package/build/chains/networks_stg-dz.json +451 -0
- package/build/chains/networks_stg.json +541 -0
- package/build/chains/networks_stg_drizzle.json +130 -0
- package/build/chains/rpcs.d.ts +30 -0
- package/build/chains/rpcs.d.ts.map +1 -0
- package/build/chains/rpcs.js +138 -0
- package/build/constants.d.ts +34 -0
- package/build/constants.d.ts.map +1 -0
- package/build/constants.js +40 -0
- package/build/contracts/Escrow.d.ts +162 -0
- package/build/contracts/Escrow.d.ts.map +1 -0
- package/build/contracts/Escrow.js +359 -0
- package/build/contracts/EscrowErrors.d.ts +75 -0
- package/build/contracts/EscrowErrors.d.ts.map +1 -0
- package/build/contracts/EscrowErrors.js +47 -0
- package/build/contracts/artifacts/ERC20Mock.json +344 -0
- package/build/contracts/artifacts/Erc20.json +344 -0
- package/build/contracts/artifacts/ErrorAbi.json +1847 -0
- package/build/contracts/artifacts/Escrow.json +1545 -0
- package/build/contracts/contract-events/AccessControlEvents.d.ts +51 -0
- package/build/contracts/contract-events/AccessControlEvents.d.ts.map +1 -0
- package/build/contracts/contract-events/AccessControlEvents.js +83 -0
- package/build/contracts/contract-events/CoverageInfo.d.ts +16 -0
- package/build/contracts/contract-events/CoverageInfo.d.ts.map +1 -0
- package/build/contracts/contract-events/CoverageInfo.js +135 -0
- package/build/contracts/contract-events/Erc20Events.d.ts +23 -0
- package/build/contracts/contract-events/Erc20Events.d.ts.map +1 -0
- package/build/contracts/contract-events/Erc20Events.js +52 -0
- package/build/contracts/contract-events/EscrowEvents.d.ts +64 -0
- package/build/contracts/contract-events/EscrowEvents.d.ts.map +1 -0
- package/build/contracts/contract-events/EscrowEvents.js +142 -0
- package/build/contracts/contract-events/types/AccessControlEvents.d.ts +9 -0
- package/build/contracts/contract-events/types/AccessControlEvents.d.ts.map +1 -0
- package/build/contracts/contract-events/types/AccessControlEvents.js +2 -0
- package/build/contracts/contract-events/types/events.d.ts +24 -0
- package/build/contracts/contract-events/types/events.d.ts.map +1 -0
- package/build/contracts/contract-events/types/events.js +2 -0
- package/build/contracts/deployment/avalanche/contracts.json +37 -0
- package/build/contracts/deployment/bitlayer/contracts.json +50 -0
- package/build/contracts/deployment/bsc/contracts.json +62 -0
- package/build/contracts/deployment/config.d.ts +4 -0
- package/build/contracts/deployment/config.d.ts.map +1 -0
- package/build/contracts/deployment/config.js +19 -0
- package/build/contracts/deployment/fantom/contracts.json +61 -0
- package/build/contracts/deployment/mumbai/contracts.json +43 -0
- package/build/contracts/deployment/polygon/contracts.json +43 -0
- package/build/contracts/deployment/sepolia/contracts.json +62 -0
- package/build/contracts/typechain-types/@openzeppelin/contracts/access/AccessControl.d.ts +160 -0
- package/build/contracts/typechain-types/@openzeppelin/contracts/access/AccessControl.d.ts.map +1 -0
- package/build/contracts/typechain-types/@openzeppelin/contracts/access/AccessControl.js +2 -0
- package/build/contracts/typechain-types/@openzeppelin/contracts/access/IAccessControl.d.ts +148 -0
- package/build/contracts/typechain-types/@openzeppelin/contracts/access/IAccessControl.d.ts.map +1 -0
- package/build/contracts/typechain-types/@openzeppelin/contracts/access/IAccessControl.js +2 -0
- package/build/contracts/typechain-types/@openzeppelin/contracts/access/Ownable.d.ts +55 -0
- package/build/contracts/typechain-types/@openzeppelin/contracts/access/Ownable.d.ts.map +1 -0
- package/build/contracts/typechain-types/@openzeppelin/contracts/access/Ownable.js +2 -0
- package/build/contracts/typechain-types/@openzeppelin/contracts/access/index.d.ts +4 -0
- package/build/contracts/typechain-types/@openzeppelin/contracts/access/index.d.ts.map +1 -0
- package/build/contracts/typechain-types/@openzeppelin/contracts/access/index.js +2 -0
- package/build/contracts/typechain-types/@openzeppelin/contracts/index.d.ts +9 -0
- package/build/contracts/typechain-types/@openzeppelin/contracts/index.d.ts.map +1 -0
- package/build/contracts/typechain-types/@openzeppelin/contracts/index.js +2 -0
- package/build/contracts/typechain-types/@openzeppelin/contracts/interfaces/IERC5267.d.ts +79 -0
- package/build/contracts/typechain-types/@openzeppelin/contracts/interfaces/IERC5267.d.ts.map +1 -0
- package/build/contracts/typechain-types/@openzeppelin/contracts/interfaces/IERC5267.js +2 -0
- package/build/contracts/typechain-types/@openzeppelin/contracts/interfaces/draft-IERC6093.sol/IERC1155Errors.d.ts +21 -0
- package/build/contracts/typechain-types/@openzeppelin/contracts/interfaces/draft-IERC6093.sol/IERC1155Errors.d.ts.map +1 -0
- package/build/contracts/typechain-types/@openzeppelin/contracts/interfaces/draft-IERC6093.sol/IERC1155Errors.js +2 -0
- package/build/contracts/typechain-types/@openzeppelin/contracts/interfaces/draft-IERC6093.sol/IERC20Errors.d.ts +21 -0
- package/build/contracts/typechain-types/@openzeppelin/contracts/interfaces/draft-IERC6093.sol/IERC20Errors.d.ts.map +1 -0
- package/build/contracts/typechain-types/@openzeppelin/contracts/interfaces/draft-IERC6093.sol/IERC20Errors.js +2 -0
- package/build/contracts/typechain-types/@openzeppelin/contracts/interfaces/draft-IERC6093.sol/IERC721Errors.d.ts +21 -0
- package/build/contracts/typechain-types/@openzeppelin/contracts/interfaces/draft-IERC6093.sol/IERC721Errors.d.ts.map +1 -0
- package/build/contracts/typechain-types/@openzeppelin/contracts/interfaces/draft-IERC6093.sol/IERC721Errors.js +2 -0
- package/build/contracts/typechain-types/@openzeppelin/contracts/interfaces/draft-IERC6093.sol/index.d.ts +4 -0
- package/build/contracts/typechain-types/@openzeppelin/contracts/interfaces/draft-IERC6093.sol/index.d.ts.map +1 -0
- package/build/contracts/typechain-types/@openzeppelin/contracts/interfaces/draft-IERC6093.sol/index.js +2 -0
- package/build/contracts/typechain-types/@openzeppelin/contracts/interfaces/index.d.ts +4 -0
- package/build/contracts/typechain-types/@openzeppelin/contracts/interfaces/index.d.ts.map +1 -0
- package/build/contracts/typechain-types/@openzeppelin/contracts/interfaces/index.js +2 -0
- package/build/contracts/typechain-types/@openzeppelin/contracts/token/ERC20/ERC20.d.ts +142 -0
- package/build/contracts/typechain-types/@openzeppelin/contracts/token/ERC20/ERC20.d.ts.map +1 -0
- package/build/contracts/typechain-types/@openzeppelin/contracts/token/ERC20/ERC20.js +2 -0
- package/build/contracts/typechain-types/@openzeppelin/contracts/token/ERC20/IERC20.d.ts +130 -0
- package/build/contracts/typechain-types/@openzeppelin/contracts/token/ERC20/IERC20.d.ts.map +1 -0
- package/build/contracts/typechain-types/@openzeppelin/contracts/token/ERC20/IERC20.js +2 -0
- package/build/contracts/typechain-types/@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.d.ts +142 -0
- package/build/contracts/typechain-types/@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.d.ts.map +1 -0
- package/build/contracts/typechain-types/@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.js +2 -0
- package/build/contracts/typechain-types/@openzeppelin/contracts/token/ERC20/extensions/index.d.ts +2 -0
- package/build/contracts/typechain-types/@openzeppelin/contracts/token/ERC20/extensions/index.d.ts.map +1 -0
- package/build/contracts/typechain-types/@openzeppelin/contracts/token/ERC20/extensions/index.js +2 -0
- package/build/contracts/typechain-types/@openzeppelin/contracts/token/ERC20/index.d.ts +5 -0
- package/build/contracts/typechain-types/@openzeppelin/contracts/token/ERC20/index.d.ts.map +1 -0
- package/build/contracts/typechain-types/@openzeppelin/contracts/token/ERC20/index.js +2 -0
- package/build/contracts/typechain-types/@openzeppelin/contracts/token/index.d.ts +3 -0
- package/build/contracts/typechain-types/@openzeppelin/contracts/token/index.d.ts.map +1 -0
- package/build/contracts/typechain-types/@openzeppelin/contracts/token/index.js +2 -0
- package/build/contracts/typechain-types/@openzeppelin/contracts/utils/ShortStrings.d.ts +21 -0
- package/build/contracts/typechain-types/@openzeppelin/contracts/utils/ShortStrings.d.ts.map +1 -0
- package/build/contracts/typechain-types/@openzeppelin/contracts/utils/ShortStrings.js +2 -0
- package/build/contracts/typechain-types/@openzeppelin/contracts/utils/Strings.d.ts +21 -0
- package/build/contracts/typechain-types/@openzeppelin/contracts/utils/Strings.d.ts.map +1 -0
- package/build/contracts/typechain-types/@openzeppelin/contracts/utils/Strings.js +2 -0
- package/build/contracts/typechain-types/@openzeppelin/contracts/utils/cryptography/EIP712.d.ts +79 -0
- package/build/contracts/typechain-types/@openzeppelin/contracts/utils/cryptography/EIP712.d.ts.map +1 -0
- package/build/contracts/typechain-types/@openzeppelin/contracts/utils/cryptography/EIP712.js +2 -0
- package/build/contracts/typechain-types/@openzeppelin/contracts/utils/cryptography/index.d.ts +2 -0
- package/build/contracts/typechain-types/@openzeppelin/contracts/utils/cryptography/index.d.ts.map +1 -0
- package/build/contracts/typechain-types/@openzeppelin/contracts/utils/cryptography/index.js +2 -0
- package/build/contracts/typechain-types/@openzeppelin/contracts/utils/index.d.ts +9 -0
- package/build/contracts/typechain-types/@openzeppelin/contracts/utils/index.d.ts.map +1 -0
- package/build/contracts/typechain-types/@openzeppelin/contracts/utils/index.js +2 -0
- package/build/contracts/typechain-types/@openzeppelin/contracts/utils/introspection/ERC165.d.ts +30 -0
- package/build/contracts/typechain-types/@openzeppelin/contracts/utils/introspection/ERC165.d.ts.map +1 -0
- package/build/contracts/typechain-types/@openzeppelin/contracts/utils/introspection/ERC165.js +2 -0
- package/build/contracts/typechain-types/@openzeppelin/contracts/utils/introspection/IERC165.d.ts +30 -0
- package/build/contracts/typechain-types/@openzeppelin/contracts/utils/introspection/IERC165.d.ts.map +1 -0
- package/build/contracts/typechain-types/@openzeppelin/contracts/utils/introspection/IERC165.js +2 -0
- package/build/contracts/typechain-types/@openzeppelin/contracts/utils/introspection/index.d.ts +3 -0
- package/build/contracts/typechain-types/@openzeppelin/contracts/utils/introspection/index.d.ts.map +1 -0
- package/build/contracts/typechain-types/@openzeppelin/contracts/utils/introspection/index.js +2 -0
- package/build/contracts/typechain-types/@openzeppelin/contracts/utils/math/SafeCast.d.ts +21 -0
- package/build/contracts/typechain-types/@openzeppelin/contracts/utils/math/SafeCast.d.ts.map +1 -0
- package/build/contracts/typechain-types/@openzeppelin/contracts/utils/math/SafeCast.js +2 -0
- package/build/contracts/typechain-types/@openzeppelin/contracts/utils/math/index.d.ts +2 -0
- package/build/contracts/typechain-types/@openzeppelin/contracts/utils/math/index.d.ts.map +1 -0
- package/build/contracts/typechain-types/@openzeppelin/contracts/utils/math/index.js +2 -0
- package/build/contracts/typechain-types/@openzeppelin/contracts-upgradeable/index.d.ts +3 -0
- package/build/contracts/typechain-types/@openzeppelin/contracts-upgradeable/index.d.ts.map +1 -0
- package/build/contracts/typechain-types/@openzeppelin/contracts-upgradeable/index.js +2 -0
- package/build/contracts/typechain-types/@openzeppelin/contracts-upgradeable/proxy/index.d.ts +3 -0
- package/build/contracts/typechain-types/@openzeppelin/contracts-upgradeable/proxy/index.d.ts.map +1 -0
- package/build/contracts/typechain-types/@openzeppelin/contracts-upgradeable/proxy/index.js +2 -0
- package/build/contracts/typechain-types/@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.d.ts +37 -0
- package/build/contracts/typechain-types/@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.d.ts.map +1 -0
- package/build/contracts/typechain-types/@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.js +2 -0
- package/build/contracts/typechain-types/@openzeppelin/contracts-upgradeable/proxy/utils/index.d.ts +2 -0
- package/build/contracts/typechain-types/@openzeppelin/contracts-upgradeable/proxy/utils/index.d.ts.map +1 -0
- package/build/contracts/typechain-types/@openzeppelin/contracts-upgradeable/proxy/utils/index.js +2 -0
- package/build/contracts/typechain-types/@openzeppelin/index.d.ts +5 -0
- package/build/contracts/typechain-types/@openzeppelin/index.d.ts.map +1 -0
- package/build/contracts/typechain-types/@openzeppelin/index.js +2 -0
- package/build/contracts/typechain-types/common.d.ts +51 -0
- package/build/contracts/typechain-types/common.d.ts.map +1 -0
- package/build/contracts/typechain-types/common.js +2 -0
- package/build/contracts/typechain-types/contracts/escrow/Escrow.d.ts +856 -0
- package/build/contracts/typechain-types/contracts/escrow/Escrow.d.ts.map +1 -0
- package/build/contracts/typechain-types/contracts/escrow/Escrow.js +2 -0
- package/build/contracts/typechain-types/contracts/escrow/EscrowAccessControl.d.ts +218 -0
- package/build/contracts/typechain-types/contracts/escrow/EscrowAccessControl.d.ts.map +1 -0
- package/build/contracts/typechain-types/contracts/escrow/EscrowAccessControl.js +2 -0
- package/build/contracts/typechain-types/contracts/escrow/EscrowErrors.d.ts +21 -0
- package/build/contracts/typechain-types/contracts/escrow/EscrowErrors.d.ts.map +1 -0
- package/build/contracts/typechain-types/contracts/escrow/EscrowErrors.js +2 -0
- package/build/contracts/typechain-types/contracts/escrow/EscrowSignature.d.ts +120 -0
- package/build/contracts/typechain-types/contracts/escrow/EscrowSignature.d.ts.map +1 -0
- package/build/contracts/typechain-types/contracts/escrow/EscrowSignature.js +2 -0
- package/build/contracts/typechain-types/contracts/escrow/TokensWhitelist.d.ts +82 -0
- package/build/contracts/typechain-types/contracts/escrow/TokensWhitelist.d.ts.map +1 -0
- package/build/contracts/typechain-types/contracts/escrow/TokensWhitelist.js +2 -0
- package/build/contracts/typechain-types/contracts/escrow/index.d.ts +6 -0
- package/build/contracts/typechain-types/contracts/escrow/index.d.ts.map +1 -0
- package/build/contracts/typechain-types/contracts/escrow/index.js +2 -0
- package/build/contracts/typechain-types/contracts/index.d.ts +5 -0
- package/build/contracts/typechain-types/contracts/index.d.ts.map +1 -0
- package/build/contracts/typechain-types/contracts/index.js +2 -0
- package/build/contracts/typechain-types/contracts/mock/erc20/ERC20Mock.d.ts +146 -0
- package/build/contracts/typechain-types/contracts/mock/erc20/ERC20Mock.d.ts.map +1 -0
- package/build/contracts/typechain-types/contracts/mock/erc20/ERC20Mock.js +2 -0
- package/build/contracts/typechain-types/contracts/mock/erc20/index.d.ts +2 -0
- package/build/contracts/typechain-types/contracts/mock/erc20/index.d.ts.map +1 -0
- package/build/contracts/typechain-types/contracts/mock/erc20/index.js +2 -0
- package/build/contracts/typechain-types/contracts/mock/index.d.ts +3 -0
- package/build/contracts/typechain-types/contracts/mock/index.d.ts.map +1 -0
- package/build/contracts/typechain-types/contracts/mock/index.js +2 -0
- package/build/contracts/typechain-types/factories/@openzeppelin/contracts/access/AccessControl__factory.d.ts +182 -0
- package/build/contracts/typechain-types/factories/@openzeppelin/contracts/access/AccessControl__factory.d.ts.map +1 -0
- package/build/contracts/typechain-types/factories/@openzeppelin/contracts/access/AccessControl__factory.js +244 -0
- package/build/contracts/typechain-types/factories/@openzeppelin/contracts/access/IAccessControl__factory.d.ts +158 -0
- package/build/contracts/typechain-types/factories/@openzeppelin/contracts/access/IAccessControl__factory.d.ts.map +1 -0
- package/build/contracts/typechain-types/factories/@openzeppelin/contracts/access/IAccessControl__factory.js +212 -0
- package/build/contracts/typechain-types/factories/@openzeppelin/contracts/access/Ownable__factory.d.ts +65 -0
- package/build/contracts/typechain-types/factories/@openzeppelin/contracts/access/Ownable__factory.d.ts.map +1 -0
- package/build/contracts/typechain-types/factories/@openzeppelin/contracts/access/Ownable__factory.js +93 -0
- package/build/contracts/typechain-types/factories/@openzeppelin/contracts/access/index.d.ts +4 -0
- package/build/contracts/typechain-types/factories/@openzeppelin/contracts/access/index.d.ts.map +1 -0
- package/build/contracts/typechain-types/factories/@openzeppelin/contracts/access/index.js +12 -0
- package/build/contracts/typechain-types/factories/@openzeppelin/contracts/index.d.ts +5 -0
- package/build/contracts/typechain-types/factories/@openzeppelin/contracts/index.d.ts.map +1 -0
- package/build/contracts/typechain-types/factories/@openzeppelin/contracts/index.js +43 -0
- package/build/contracts/typechain-types/factories/@openzeppelin/contracts/interfaces/IERC5267__factory.d.ts +47 -0
- package/build/contracts/typechain-types/factories/@openzeppelin/contracts/interfaces/IERC5267__factory.d.ts.map +1 -0
- package/build/contracts/typechain-types/factories/@openzeppelin/contracts/interfaces/IERC5267__factory.js +68 -0
- package/build/contracts/typechain-types/factories/@openzeppelin/contracts/interfaces/draft-IERC6093.sol/IERC1155Errors__factory.d.ts +84 -0
- package/build/contracts/typechain-types/factories/@openzeppelin/contracts/interfaces/draft-IERC6093.sol/IERC1155Errors__factory.d.ts.map +1 -0
- package/build/contracts/typechain-types/factories/@openzeppelin/contracts/interfaces/draft-IERC6093.sol/IERC1155Errors__factory.js +121 -0
- package/build/contracts/typechain-types/factories/@openzeppelin/contracts/interfaces/draft-IERC6093.sol/IERC20Errors__factory.d.ts +72 -0
- package/build/contracts/typechain-types/factories/@openzeppelin/contracts/interfaces/draft-IERC6093.sol/IERC20Errors__factory.d.ts.map +1 -0
- package/build/contracts/typechain-types/factories/@openzeppelin/contracts/interfaces/draft-IERC6093.sol/IERC20Errors__factory.js +105 -0
- package/build/contracts/typechain-types/factories/@openzeppelin/contracts/interfaces/draft-IERC6093.sol/IERC721Errors__factory.d.ts +84 -0
- package/build/contracts/typechain-types/factories/@openzeppelin/contracts/interfaces/draft-IERC6093.sol/IERC721Errors__factory.d.ts.map +1 -0
- package/build/contracts/typechain-types/factories/@openzeppelin/contracts/interfaces/draft-IERC6093.sol/IERC721Errors__factory.js +122 -0
- package/build/contracts/typechain-types/factories/@openzeppelin/contracts/interfaces/draft-IERC6093.sol/index.d.ts +4 -0
- package/build/contracts/typechain-types/factories/@openzeppelin/contracts/interfaces/draft-IERC6093.sol/index.d.ts.map +1 -0
- package/build/contracts/typechain-types/factories/@openzeppelin/contracts/interfaces/draft-IERC6093.sol/index.js +12 -0
- package/build/contracts/typechain-types/factories/@openzeppelin/contracts/interfaces/index.d.ts +3 -0
- package/build/contracts/typechain-types/factories/@openzeppelin/contracts/interfaces/index.d.ts.map +1 -0
- package/build/contracts/typechain-types/factories/@openzeppelin/contracts/interfaces/index.js +42 -0
- package/build/contracts/typechain-types/factories/@openzeppelin/contracts/token/ERC20/ERC20__factory.d.ts +242 -0
- package/build/contracts/typechain-types/factories/@openzeppelin/contracts/token/ERC20/ERC20__factory.d.ts.map +1 -0
- package/build/contracts/typechain-types/factories/@openzeppelin/contracts/token/ERC20/ERC20__factory.js +327 -0
- package/build/contracts/typechain-types/factories/@openzeppelin/contracts/token/ERC20/IERC20__factory.d.ts +148 -0
- package/build/contracts/typechain-types/factories/@openzeppelin/contracts/token/ERC20/IERC20__factory.d.ts.map +1 -0
- package/build/contracts/typechain-types/factories/@openzeppelin/contracts/token/ERC20/IERC20__factory.js +202 -0
- package/build/contracts/typechain-types/factories/@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata__factory.d.ts +178 -0
- package/build/contracts/typechain-types/factories/@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata__factory.d.ts.map +1 -0
- package/build/contracts/typechain-types/factories/@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata__factory.js +241 -0
- package/build/contracts/typechain-types/factories/@openzeppelin/contracts/token/ERC20/extensions/index.d.ts +2 -0
- package/build/contracts/typechain-types/factories/@openzeppelin/contracts/token/ERC20/extensions/index.d.ts.map +1 -0
- package/build/contracts/typechain-types/factories/@openzeppelin/contracts/token/ERC20/extensions/index.js +8 -0
- package/build/contracts/typechain-types/factories/@openzeppelin/contracts/token/ERC20/index.d.ts +4 -0
- package/build/contracts/typechain-types/factories/@openzeppelin/contracts/token/ERC20/index.d.ts.map +1 -0
- package/build/contracts/typechain-types/factories/@openzeppelin/contracts/token/ERC20/index.js +44 -0
- package/build/contracts/typechain-types/factories/@openzeppelin/contracts/token/index.d.ts +2 -0
- package/build/contracts/typechain-types/factories/@openzeppelin/contracts/token/index.d.ts.map +1 -0
- package/build/contracts/typechain-types/factories/@openzeppelin/contracts/token/index.js +40 -0
- package/build/contracts/typechain-types/factories/@openzeppelin/contracts/utils/ShortStrings__factory.d.ts +35 -0
- package/build/contracts/typechain-types/factories/@openzeppelin/contracts/utils/ShortStrings__factory.d.ts.map +1 -0
- package/build/contracts/typechain-types/factories/@openzeppelin/contracts/utils/ShortStrings__factory.js +55 -0
- package/build/contracts/typechain-types/factories/@openzeppelin/contracts/utils/Strings__factory.d.ts +43 -0
- package/build/contracts/typechain-types/factories/@openzeppelin/contracts/utils/Strings__factory.d.ts.map +1 -0
- package/build/contracts/typechain-types/factories/@openzeppelin/contracts/utils/Strings__factory.js +65 -0
- package/build/contracts/typechain-types/factories/@openzeppelin/contracts/utils/cryptography/EIP712__factory.d.ts +59 -0
- package/build/contracts/typechain-types/factories/@openzeppelin/contracts/utils/cryptography/EIP712__factory.d.ts.map +1 -0
- package/build/contracts/typechain-types/factories/@openzeppelin/contracts/utils/cryptography/EIP712__factory.js +84 -0
- package/build/contracts/typechain-types/factories/@openzeppelin/contracts/utils/cryptography/index.d.ts +2 -0
- package/build/contracts/typechain-types/factories/@openzeppelin/contracts/utils/cryptography/index.d.ts.map +1 -0
- package/build/contracts/typechain-types/factories/@openzeppelin/contracts/utils/cryptography/index.js +8 -0
- package/build/contracts/typechain-types/factories/@openzeppelin/contracts/utils/index.d.ts +6 -0
- package/build/contracts/typechain-types/factories/@openzeppelin/contracts/utils/index.d.ts.map +1 -0
- package/build/contracts/typechain-types/factories/@openzeppelin/contracts/utils/index.js +46 -0
- package/build/contracts/typechain-types/factories/@openzeppelin/contracts/utils/introspection/ERC165__factory.d.ts +22 -0
- package/build/contracts/typechain-types/factories/@openzeppelin/contracts/utils/introspection/ERC165__factory.d.ts.map +1 -0
- package/build/contracts/typechain-types/factories/@openzeppelin/contracts/utils/introspection/ERC165__factory.js +38 -0
- package/build/contracts/typechain-types/factories/@openzeppelin/contracts/utils/introspection/IERC165__factory.d.ts +22 -0
- package/build/contracts/typechain-types/factories/@openzeppelin/contracts/utils/introspection/IERC165__factory.d.ts.map +1 -0
- package/build/contracts/typechain-types/factories/@openzeppelin/contracts/utils/introspection/IERC165__factory.js +38 -0
- package/build/contracts/typechain-types/factories/@openzeppelin/contracts/utils/introspection/index.d.ts +3 -0
- package/build/contracts/typechain-types/factories/@openzeppelin/contracts/utils/introspection/index.d.ts.map +1 -0
- package/build/contracts/typechain-types/factories/@openzeppelin/contracts/utils/introspection/index.js +10 -0
- package/build/contracts/typechain-types/factories/@openzeppelin/contracts/utils/math/SafeCast__factory.d.ts +63 -0
- package/build/contracts/typechain-types/factories/@openzeppelin/contracts/utils/math/SafeCast__factory.d.ts.map +1 -0
- package/build/contracts/typechain-types/factories/@openzeppelin/contracts/utils/math/SafeCast__factory.js +93 -0
- package/build/contracts/typechain-types/factories/@openzeppelin/contracts/utils/math/index.d.ts +2 -0
- package/build/contracts/typechain-types/factories/@openzeppelin/contracts/utils/math/index.d.ts.map +1 -0
- package/build/contracts/typechain-types/factories/@openzeppelin/contracts/utils/math/index.js +8 -0
- package/build/contracts/typechain-types/factories/@openzeppelin/contracts-upgradeable/index.d.ts +2 -0
- package/build/contracts/typechain-types/factories/@openzeppelin/contracts-upgradeable/index.d.ts.map +1 -0
- package/build/contracts/typechain-types/factories/@openzeppelin/contracts-upgradeable/index.js +40 -0
- package/build/contracts/typechain-types/factories/@openzeppelin/contracts-upgradeable/proxy/index.d.ts +2 -0
- package/build/contracts/typechain-types/factories/@openzeppelin/contracts-upgradeable/proxy/index.d.ts.map +1 -0
- package/build/contracts/typechain-types/factories/@openzeppelin/contracts-upgradeable/proxy/index.js +40 -0
- package/build/contracts/typechain-types/factories/@openzeppelin/contracts-upgradeable/proxy/utils/Initializable__factory.d.ts +26 -0
- package/build/contracts/typechain-types/factories/@openzeppelin/contracts-upgradeable/proxy/utils/Initializable__factory.d.ts.map +1 -0
- package/build/contracts/typechain-types/factories/@openzeppelin/contracts-upgradeable/proxy/utils/Initializable__factory.js +42 -0
- package/build/contracts/typechain-types/factories/@openzeppelin/contracts-upgradeable/proxy/utils/index.d.ts +2 -0
- package/build/contracts/typechain-types/factories/@openzeppelin/contracts-upgradeable/proxy/utils/index.d.ts.map +1 -0
- package/build/contracts/typechain-types/factories/@openzeppelin/contracts-upgradeable/proxy/utils/index.js +8 -0
- package/build/contracts/typechain-types/factories/@openzeppelin/index.d.ts +3 -0
- package/build/contracts/typechain-types/factories/@openzeppelin/index.d.ts.map +1 -0
- package/build/contracts/typechain-types/factories/@openzeppelin/index.js +41 -0
- package/build/contracts/typechain-types/factories/contracts/escrow/EscrowAccessControl__factory.d.ts +415 -0
- package/build/contracts/typechain-types/factories/contracts/escrow/EscrowAccessControl__factory.d.ts.map +1 -0
- package/build/contracts/typechain-types/factories/contracts/escrow/EscrowAccessControl__factory.js +547 -0
- package/build/contracts/typechain-types/factories/contracts/escrow/EscrowErrors__factory.d.ts +151 -0
- package/build/contracts/typechain-types/factories/contracts/escrow/EscrowErrors__factory.d.ts.map +1 -0
- package/build/contracts/typechain-types/factories/contracts/escrow/EscrowErrors__factory.js +205 -0
- package/build/contracts/typechain-types/factories/contracts/escrow/EscrowSignature__factory.d.ts +151 -0
- package/build/contracts/typechain-types/factories/contracts/escrow/EscrowSignature__factory.d.ts.map +1 -0
- package/build/contracts/typechain-types/factories/contracts/escrow/EscrowSignature__factory.js +205 -0
- package/build/contracts/typechain-types/factories/contracts/escrow/Escrow__factory.d.ts +1217 -0
- package/build/contracts/typechain-types/factories/contracts/escrow/Escrow__factory.d.ts.map +1 -0
- package/build/contracts/typechain-types/factories/contracts/escrow/Escrow__factory.js +1582 -0
- package/build/contracts/typechain-types/factories/contracts/escrow/TokensWhitelist__factory.d.ts +99 -0
- package/build/contracts/typechain-types/factories/contracts/escrow/TokensWhitelist__factory.d.ts.map +1 -0
- package/build/contracts/typechain-types/factories/contracts/escrow/TokensWhitelist__factory.js +139 -0
- package/build/contracts/typechain-types/factories/contracts/escrow/index.d.ts +6 -0
- package/build/contracts/typechain-types/factories/contracts/escrow/index.d.ts.map +1 -0
- package/build/contracts/typechain-types/factories/contracts/escrow/index.js +16 -0
- package/build/contracts/typechain-types/factories/contracts/index.d.ts +3 -0
- package/build/contracts/typechain-types/factories/contracts/index.d.ts.map +1 -0
- package/build/contracts/typechain-types/factories/contracts/index.js +41 -0
- package/build/contracts/typechain-types/factories/contracts/mock/erc20/ERC20Mock__factory.d.ts +283 -0
- package/build/contracts/typechain-types/factories/contracts/mock/erc20/ERC20Mock__factory.d.ts.map +1 -0
- package/build/contracts/typechain-types/factories/contracts/mock/erc20/ERC20Mock__factory.js +381 -0
- package/build/contracts/typechain-types/factories/contracts/mock/erc20/index.d.ts +2 -0
- package/build/contracts/typechain-types/factories/contracts/mock/erc20/index.d.ts.map +1 -0
- package/build/contracts/typechain-types/factories/contracts/mock/erc20/index.js +8 -0
- package/build/contracts/typechain-types/factories/contracts/mock/index.d.ts +2 -0
- package/build/contracts/typechain-types/factories/contracts/mock/index.d.ts.map +1 -0
- package/build/contracts/typechain-types/factories/contracts/mock/index.js +40 -0
- package/build/contracts/typechain-types/factories/index.d.ts +3 -0
- package/build/contracts/typechain-types/factories/index.d.ts.map +1 -0
- package/build/contracts/typechain-types/factories/index.js +41 -0
- package/build/contracts/typechain-types/index.d.ts +52 -0
- package/build/contracts/typechain-types/index.d.ts.map +1 -0
- package/build/contracts/typechain-types/index.js +83 -0
- package/build/contracts/types/escrow.d.ts +42 -0
- package/build/contracts/types/escrow.d.ts.map +1 -0
- package/build/contracts/types/escrow.js +20 -0
- package/build/entities/Checkpoint.d.ts +11 -0
- package/build/entities/Checkpoint.d.ts.map +1 -0
- package/build/entities/Checkpoint.js +52 -0
- package/build/entities/ClaimHistory.d.ts +17 -0
- package/build/entities/ClaimHistory.d.ts.map +1 -0
- package/build/entities/ClaimHistory.js +73 -0
- package/build/entities/ClaimJob.d.ts +27 -0
- package/build/entities/ClaimJob.d.ts.map +1 -0
- package/build/entities/ClaimJob.js +113 -0
- package/build/entities/CryptoConfirmationLocks.d.ts +14 -0
- package/build/entities/CryptoConfirmationLocks.d.ts.map +1 -0
- package/build/entities/CryptoConfirmationLocks.js +65 -0
- package/build/entities/DepositAddress.d.ts +12 -0
- package/build/entities/DepositAddress.d.ts.map +1 -0
- package/build/entities/DepositAddress.js +56 -0
- package/build/entities/DepositWalletBalance.d.ts +16 -0
- package/build/entities/DepositWalletBalance.d.ts.map +1 -0
- package/build/entities/DepositWalletBalance.js +72 -0
- package/build/entities/SweepHistory.d.ts +16 -0
- package/build/entities/SweepHistory.d.ts.map +1 -0
- package/build/entities/SweepHistory.js +72 -0
- package/build/entities/SweepJob.d.ts +26 -0
- package/build/entities/SweepJob.d.ts.map +1 -0
- package/build/entities/SweepJob.js +116 -0
- package/build/entities/WalletIndex.d.ts +8 -0
- package/build/entities/WalletIndex.d.ts.map +1 -0
- package/build/entities/WalletIndex.js +40 -0
- package/build/errors/AdminErrors.d.ts +25 -0
- package/build/errors/AdminErrors.d.ts.map +1 -0
- package/build/errors/AdminErrors.js +45 -0
- package/build/errors/AlchemyErrors.d.ts +34 -0
- package/build/errors/AlchemyErrors.d.ts.map +1 -0
- package/build/errors/AlchemyErrors.js +79 -0
- package/build/errors/BalanceErrors.d.ts +23 -0
- package/build/errors/BalanceErrors.d.ts.map +1 -0
- package/build/errors/BalanceErrors.js +45 -0
- package/build/errors/DatabaseErrors.d.ts +25 -0
- package/build/errors/DatabaseErrors.d.ts.map +1 -0
- package/build/errors/DatabaseErrors.js +49 -0
- package/build/errors/TransactionsErrors.d.ts +37 -0
- package/build/errors/TransactionsErrors.d.ts.map +1 -0
- package/build/errors/TransactionsErrors.js +95 -0
- package/build/errors/VoltageErrors.d.ts +29 -0
- package/build/errors/VoltageErrors.d.ts.map +1 -0
- package/build/errors/VoltageErrors.js +69 -0
- package/build/errors/WalletErrors.d.ts +26 -0
- package/build/errors/WalletErrors.d.ts.map +1 -0
- package/build/errors/WalletErrors.js +55 -0
- package/build/errors/errors.d.ts +74 -0
- package/build/errors/errors.d.ts.map +1 -0
- package/build/errors/errors.js +117 -0
- package/build/errors/index.d.ts +81 -0
- package/build/errors/index.d.ts.map +1 -0
- package/build/errors/index.js +78 -0
- package/build/index.d.ts +95 -0
- package/build/index.d.ts.map +1 -0
- package/build/index.js +208 -0
- package/build/interfaces/config.d.ts +75 -0
- package/build/interfaces/config.d.ts.map +1 -0
- package/build/interfaces/config.js +2 -0
- package/build/interfaces/database.d.ts +29 -0
- package/build/interfaces/database.d.ts.map +1 -0
- package/build/interfaces/database.js +2 -0
- package/build/interfaces.d.ts +311 -0
- package/build/interfaces.d.ts.map +1 -0
- package/build/interfaces.js +12 -0
- package/build/services/AccountingService.d.ts +34 -0
- package/build/services/AccountingService.d.ts.map +1 -0
- package/build/services/AccountingService.js +239 -0
- package/build/services/AlchemyService.d.ts +47 -0
- package/build/services/AlchemyService.d.ts.map +1 -0
- package/build/services/AlchemyService.js +239 -0
- package/build/services/AlchemyWebhookSignature.d.ts +16 -0
- package/build/services/AlchemyWebhookSignature.d.ts.map +1 -0
- package/build/services/AlchemyWebhookSignature.js +119 -0
- package/build/services/AlchemyWebhooks.d.ts +87 -0
- package/build/services/AlchemyWebhooks.d.ts.map +1 -0
- package/build/services/AlchemyWebhooks.js +406 -0
- package/build/services/AsyncTTLCache.d.ts +12 -0
- package/build/services/AsyncTTLCache.d.ts.map +1 -0
- package/build/services/AsyncTTLCache.js +67 -0
- package/build/services/AzureEventHubHandler.d.ts +32 -0
- package/build/services/AzureEventHubHandler.d.ts.map +1 -0
- package/build/services/AzureEventHubHandler.js +139 -0
- package/build/services/BalanceService.d.ts +39 -0
- package/build/services/BalanceService.d.ts.map +1 -0
- package/build/services/BalanceService.js +482 -0
- package/build/services/ChainManager.d.ts +86 -0
- package/build/services/ChainManager.d.ts.map +1 -0
- package/build/services/ChainManager.js +440 -0
- package/build/services/ClaimHistoryService.d.ts +40 -0
- package/build/services/ClaimHistoryService.d.ts.map +1 -0
- package/build/services/ClaimHistoryService.js +121 -0
- package/build/services/ClaimJobService.d.ts +45 -0
- package/build/services/ClaimJobService.d.ts.map +1 -0
- package/build/services/ClaimJobService.js +398 -0
- package/build/services/CryptoConfirmationLocksService.d.ts +13 -0
- package/build/services/CryptoConfirmationLocksService.d.ts.map +1 -0
- package/build/services/CryptoConfirmationLocksService.js +46 -0
- package/build/services/CryptoKeysManager.d.ts +16 -0
- package/build/services/CryptoKeysManager.d.ts.map +1 -0
- package/build/services/CryptoKeysManager.js +136 -0
- package/build/services/DepositAddressService.d.ts +41 -0
- package/build/services/DepositAddressService.d.ts.map +1 -0
- package/build/services/DepositAddressService.js +264 -0
- package/build/services/ElasticSearch.d.ts +19 -0
- package/build/services/ElasticSearch.d.ts.map +1 -0
- package/build/services/ElasticSearch.js +104 -0
- package/build/services/EventsHandler.d.ts +11 -0
- package/build/services/EventsHandler.d.ts.map +1 -0
- package/build/services/EventsHandler.js +39 -0
- package/build/services/EventsService.d.ts +44 -0
- package/build/services/EventsService.d.ts.map +1 -0
- package/build/services/EventsService.js +234 -0
- package/build/services/InvoiceQueue.d.ts +56 -0
- package/build/services/InvoiceQueue.d.ts.map +1 -0
- package/build/services/InvoiceQueue.js +297 -0
- package/build/services/KeyVaultService.d.ts +14 -0
- package/build/services/KeyVaultService.d.ts.map +1 -0
- package/build/services/KeyVaultService.js +92 -0
- package/build/services/PriceCache.d.ts +19 -0
- package/build/services/PriceCache.d.ts.map +1 -0
- package/build/services/PriceCache.js +125 -0
- package/build/services/ProviderManager.d.ts +41 -0
- package/build/services/ProviderManager.d.ts.map +1 -0
- package/build/services/ProviderManager.js +106 -0
- package/build/services/QuicknodeWebhookSignature.d.ts +14 -0
- package/build/services/QuicknodeWebhookSignature.d.ts.map +1 -0
- package/build/services/QuicknodeWebhookSignature.js +119 -0
- package/build/services/Redis.d.ts +41 -0
- package/build/services/Redis.d.ts.map +1 -0
- package/build/services/Redis.js +317 -0
- package/build/services/RedisListQueue.d.ts +15 -0
- package/build/services/RedisListQueue.d.ts.map +1 -0
- package/build/services/RedisListQueue.js +81 -0
- package/build/services/RedisPubSub.d.ts +41 -0
- package/build/services/RedisPubSub.d.ts.map +1 -0
- package/build/services/RedisPubSub.js +254 -0
- package/build/services/RedisQueue.d.ts +18 -0
- package/build/services/RedisQueue.d.ts.map +1 -0
- package/build/services/RedisQueue.js +82 -0
- package/build/services/StorageService.d.ts +12 -0
- package/build/services/StorageService.d.ts.map +1 -0
- package/build/services/StorageService.js +92 -0
- package/build/services/SweepHistoryService.d.ts +15 -0
- package/build/services/SweepHistoryService.d.ts.map +1 -0
- package/build/services/SweepHistoryService.js +52 -0
- package/build/services/SweepJobService.d.ts +52 -0
- package/build/services/SweepJobService.d.ts.map +1 -0
- package/build/services/SweepJobService.js +716 -0
- package/build/services/TimerManager.d.ts +44 -0
- package/build/services/TimerManager.d.ts.map +1 -0
- package/build/services/TimerManager.js +231 -0
- package/build/services/WalletIndexService.d.ts +11 -0
- package/build/services/WalletIndexService.d.ts.map +1 -0
- package/build/services/WalletIndexService.js +73 -0
- package/build/services/WalletManager.d.ts +42 -0
- package/build/services/WalletManager.d.ts.map +1 -0
- package/build/services/WalletManager.js +359 -0
- package/build/services/WithdrawalManager.d.ts +51 -0
- package/build/services/WithdrawalManager.d.ts.map +1 -0
- package/build/services/WithdrawalManager.js +368 -0
- package/build/services/Worker.d.ts +25 -0
- package/build/services/Worker.d.ts.map +1 -0
- package/build/services/Worker.js +115 -0
- package/build/services/solana/escrow/SolanaEscrowAdmin.d.ts +102 -0
- package/build/services/solana/escrow/SolanaEscrowAdmin.d.ts.map +1 -0
- package/build/services/solana/escrow/SolanaEscrowAdmin.js +209 -0
- package/build/services/solana/escrow/SolanaEscrowInteraction.d.ts +50 -0
- package/build/services/solana/escrow/SolanaEscrowInteraction.d.ts.map +1 -0
- package/build/services/solana/escrow/SolanaEscrowInteraction.js +235 -0
- package/build/services/solana/escrow/idl/escrow.json +2941 -0
- package/build/services/solana/escrow/index.d.ts +5 -0
- package/build/services/solana/escrow/index.d.ts.map +1 -0
- package/build/services/solana/escrow/index.js +20 -0
- package/build/services/solana/escrow/services/Errors.d.ts +19 -0
- package/build/services/solana/escrow/services/Errors.d.ts.map +1 -0
- package/build/services/solana/escrow/services/Errors.js +29 -0
- package/build/services/solana/escrow/services/EscrowAdminUtility.d.ts +121 -0
- package/build/services/solana/escrow/services/EscrowAdminUtility.d.ts.map +1 -0
- package/build/services/solana/escrow/services/EscrowAdminUtility.js +663 -0
- package/build/services/solana/escrow/services/EscrowService.d.ts +15 -0
- package/build/services/solana/escrow/services/EscrowService.d.ts.map +1 -0
- package/build/services/solana/escrow/services/EscrowService.js +155 -0
- package/build/services/solana/escrow/services/EscrowUtility.d.ts +58 -0
- package/build/services/solana/escrow/services/EscrowUtility.d.ts.map +1 -0
- package/build/services/solana/escrow/services/EscrowUtility.js +318 -0
- package/build/services/solana/escrow/services/TokenAccountService.d.ts +10 -0
- package/build/services/solana/escrow/services/TokenAccountService.d.ts.map +1 -0
- package/build/services/solana/escrow/services/TokenAccountService.js +145 -0
- package/build/services/solana/escrow/services/TransactionsService.d.ts +12 -0
- package/build/services/solana/escrow/services/TransactionsService.d.ts.map +1 -0
- package/build/services/solana/escrow/services/TransactionsService.js +44 -0
- package/build/services/solana/escrow/services/index.d.ts +7 -0
- package/build/services/solana/escrow/services/index.d.ts.map +1 -0
- package/build/services/solana/escrow/services/index.js +22 -0
- package/build/services/solana/escrow/types/custom.d.ts +14 -0
- package/build/services/solana/escrow/types/custom.d.ts.map +1 -0
- package/build/services/solana/escrow/types/custom.js +2 -0
- package/build/services/solana/escrow/types/escrow.d.ts +2948 -0
- package/build/services/solana/escrow/types/escrow.d.ts.map +1 -0
- package/build/services/solana/escrow/types/escrow.js +2 -0
- package/build/services/solana/escrow/types/index.d.ts +3 -0
- package/build/services/solana/escrow/types/index.d.ts.map +1 -0
- package/build/services/solana/escrow/types/index.js +18 -0
- package/build/services/solana/escrow/types/types.d.ts +19 -0
- package/build/services/solana/escrow/types/types.d.ts.map +1 -0
- package/build/services/solana/escrow/types/types.js +2 -0
- package/build/services/solana/index.d.ts +2 -0
- package/build/services/solana/index.d.ts.map +1 -0
- package/build/services/solana/index.js +17 -0
- package/build/services/tron/index.d.ts +5 -0
- package/build/services/tron/index.d.ts.map +1 -0
- package/build/services/tron/index.js +21 -0
- package/build/services/tron/services/BitQueryQueue.d.ts +13 -0
- package/build/services/tron/services/BitQueryQueue.d.ts.map +1 -0
- package/build/services/tron/services/BitQueryQueue.js +22 -0
- package/build/services/tron/services/BitQuerySubscription.d.ts +5 -0
- package/build/services/tron/services/BitQuerySubscription.d.ts.map +1 -0
- package/build/services/tron/services/BitQuerySubscription.js +7 -0
- package/build/services/tron/services/Escrow.d.ts +1 -0
- package/build/services/tron/services/Escrow.d.ts.map +1 -0
- package/build/services/tron/services/Escrow.js +1 -0
- package/build/services/tron/services/Transactions.d.ts +33 -0
- package/build/services/tron/services/Transactions.d.ts.map +1 -0
- package/build/services/tron/services/Transactions.js +164 -0
- package/build/services/tron/services/TronCustodialWallet.d.ts +17 -0
- package/build/services/tron/services/TronCustodialWallet.d.ts.map +1 -0
- package/build/services/tron/services/TronCustodialWallet.js +46 -0
- package/build/services/tron/services/TronFundingWallet.d.ts +30 -0
- package/build/services/tron/services/TronFundingWallet.d.ts.map +1 -0
- package/build/services/tron/services/TronFundingWallet.js +57 -0
- package/build/services/tron/services/TronHelper.d.ts +11 -0
- package/build/services/tron/services/TronHelper.d.ts.map +1 -0
- package/build/services/tron/services/TronHelper.js +29 -0
- package/build/services/tron/services/TronHotWallet.d.ts +29 -0
- package/build/services/tron/services/TronHotWallet.d.ts.map +1 -0
- package/build/services/tron/services/TronHotWallet.js +168 -0
- package/build/services/tron/services/TronSigner.d.ts +12 -0
- package/build/services/tron/services/TronSigner.d.ts.map +1 -0
- package/build/services/tron/services/TronSigner.js +51 -0
- package/build/services/tron/services/TronWallet.d.ts +32 -0
- package/build/services/tron/services/TronWallet.d.ts.map +1 -0
- package/build/services/tron/services/TronWallet.js +110 -0
- package/build/services/tron/types/bitquery.d.ts +26 -0
- package/build/services/tron/types/bitquery.d.ts.map +1 -0
- package/build/services/tron/types/bitquery.js +3 -0
- package/build/services/tron/types/index.d.ts +3 -0
- package/build/services/tron/types/index.d.ts.map +1 -0
- package/build/services/tron/types/index.js +18 -0
- package/build/services/tron/types/transactions.d.ts +36 -0
- package/build/services/tron/types/transactions.d.ts.map +1 -0
- package/build/services/tron/types/transactions.js +3 -0
- package/build/services/tron/types/tron_helper.d.ts +25 -0
- package/build/services/tron/types/tron_helper.d.ts.map +1 -0
- package/build/services/tron/types/tron_helper.js +3 -0
- package/build/services/types/RedisPubSub.d.ts +11 -0
- package/build/services/types/RedisPubSub.d.ts.map +1 -0
- package/build/services/types/RedisPubSub.js +15 -0
- package/build/services/types/accounting_service.d.ts +7 -0
- package/build/services/types/accounting_service.d.ts.map +1 -0
- package/build/services/types/accounting_service.js +2 -0
- package/build/services/types/alchemy.d.ts +243 -0
- package/build/services/types/alchemy.d.ts.map +1 -0
- package/build/services/types/alchemy.js +3 -0
- package/build/services/types/azure_event_hub_handler.d.ts +18 -0
- package/build/services/types/azure_event_hub_handler.d.ts.map +1 -0
- package/build/services/types/azure_event_hub_handler.js +20 -0
- package/build/services/types/balance_service.d.ts +10 -0
- package/build/services/types/balance_service.d.ts.map +1 -0
- package/build/services/types/balance_service.js +2 -0
- package/build/services/types/chain_manager.d.ts +49 -0
- package/build/services/types/chain_manager.d.ts.map +1 -0
- package/build/services/types/chain_manager.js +2 -0
- package/build/services/types/claim.d.ts +42 -0
- package/build/services/types/claim.d.ts.map +1 -0
- package/build/services/types/claim.js +2 -0
- package/build/services/types/claim_job_service.d.ts +54 -0
- package/build/services/types/claim_job_service.d.ts.map +1 -0
- package/build/services/types/claim_job_service.js +2 -0
- package/build/services/types/crypto_confirmation_locks_service.d.ts +6 -0
- package/build/services/types/crypto_confirmation_locks_service.d.ts.map +1 -0
- package/build/services/types/crypto_confirmation_locks_service.js +2 -0
- package/build/services/types/events_service.d.ts +57 -0
- package/build/services/types/events_service.d.ts.map +1 -0
- package/build/services/types/events_service.js +2 -0
- package/build/services/types/index.d.ts +16 -0
- package/build/services/types/index.d.ts.map +1 -0
- package/build/services/types/index.js +31 -0
- package/build/services/types/lightning.d.ts +129 -0
- package/build/services/types/lightning.d.ts.map +1 -0
- package/build/services/types/lightning.js +2 -0
- package/build/services/types/quicknode.d.ts +7 -0
- package/build/services/types/quicknode.d.ts.map +1 -0
- package/build/services/types/quicknode.js +2 -0
- package/build/services/types/sweep_job_service.d.ts +9 -0
- package/build/services/types/sweep_job_service.d.ts.map +1 -0
- package/build/services/types/sweep_job_service.js +3 -0
- package/build/services/types/timer_manager.d.ts +6 -0
- package/build/services/types/timer_manager.d.ts.map +1 -0
- package/build/services/types/timer_manager.js +2 -0
- package/build/services/types/wallet_manager.d.ts +36 -0
- package/build/services/types/wallet_manager.d.ts.map +1 -0
- package/build/services/types/wallet_manager.js +2 -0
- package/build/services/types/withdrawal.d.ts +48 -0
- package/build/services/types/withdrawal.d.ts.map +1 -0
- package/build/services/types/withdrawal.js +50 -0
- package/build/services/types/withdrawal_manager.d.ts +14 -0
- package/build/services/types/withdrawal_manager.d.ts.map +1 -0
- package/build/services/types/withdrawal_manager.js +2 -0
- package/build/services/utils/alchemy.d.ts +6 -0
- package/build/services/utils/alchemy.d.ts.map +1 -0
- package/build/services/utils/alchemy.js +155 -0
- package/build/services/utils/graphql.d.ts +2 -0
- package/build/services/utils/graphql.d.ts.map +1 -0
- package/build/services/utils/graphql.js +46 -0
- package/build/utils/AsyncRateLimiter.d.ts +23 -0
- package/build/utils/AsyncRateLimiter.d.ts.map +1 -0
- package/build/utils/AsyncRateLimiter.js +84 -0
- package/build/utils/AsyncTTLCache.d.ts +12 -0
- package/build/utils/AsyncTTLCache.d.ts.map +1 -0
- package/build/utils/AsyncTTLCache.js +69 -0
- package/build/utils/Logger.d.ts +67 -0
- package/build/utils/Logger.d.ts.map +1 -0
- package/build/utils/Logger.js +171 -0
- package/build/utils/MemoryMonitor.d.ts +12 -0
- package/build/utils/MemoryMonitor.d.ts.map +1 -0
- package/build/utils/MemoryMonitor.js +59 -0
- package/build/utils/Parsing.d.ts +13 -0
- package/build/utils/Parsing.d.ts.map +1 -0
- package/build/utils/Parsing.js +84 -0
- package/build/utils/RpcLimiter.d.ts +10 -0
- package/build/utils/RpcLimiter.d.ts.map +1 -0
- package/build/utils/RpcLimiter.js +28 -0
- package/build/utils/Utility.d.ts +23 -0
- package/build/utils/Utility.d.ts.map +1 -0
- package/build/utils/Utility.js +211 -0
- package/build/utils/Wallets.d.ts +4 -0
- package/build/utils/Wallets.d.ts.map +1 -0
- package/build/utils/Wallets.js +68 -0
- package/build/utils/custodial.d.ts +32 -0
- package/build/utils/custodial.d.ts.map +1 -0
- package/build/utils/custodial.js +291 -0
- package/build/utils/solana.d.ts +150 -0
- package/build/utils/solana.d.ts.map +1 -0
- package/build/utils/solana.js +658 -0
- package/package.json +107 -0
|
@@ -0,0 +1,359 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
12
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
13
|
+
};
|
|
14
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
|
+
const ethers_1 = require("ethers");
|
|
16
|
+
const Escrow_json_1 = __importDefault(require("./artifacts/Escrow.json"));
|
|
17
|
+
const ERC20Mock_json_1 = __importDefault(require("./artifacts/ERC20Mock.json"));
|
|
18
|
+
const EscrowErrors_1 = require("./EscrowErrors");
|
|
19
|
+
const TransactionsErrors_1 = __importDefault(require("../errors/TransactionsErrors"));
|
|
20
|
+
const escrow_1 = require("./types/escrow");
|
|
21
|
+
/**
|
|
22
|
+
* Class to interact with the escrow contract
|
|
23
|
+
* @author @0xgio - Georgio Diab
|
|
24
|
+
*/
|
|
25
|
+
class EscrowInteraction extends TransactionsErrors_1.default {
|
|
26
|
+
constructor(escrowAddress, provider, signer) {
|
|
27
|
+
super();
|
|
28
|
+
this.signer = null;
|
|
29
|
+
this.provider = null;
|
|
30
|
+
this.CONFIRMATIONS = 1;
|
|
31
|
+
this.provider = provider;
|
|
32
|
+
this.escrowContract = new ethers_1.Contract(escrowAddress, Escrow_json_1.default, provider);
|
|
33
|
+
if (signer) {
|
|
34
|
+
this.signer = signer.connect(provider);
|
|
35
|
+
this.escrowContract = this.escrowContract.connect(this.signer);
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
/**
|
|
39
|
+
* Connect signer wallet to contract for writing operations
|
|
40
|
+
* @param signer Signer object to connect to the contract
|
|
41
|
+
*/
|
|
42
|
+
setSigner(signer) {
|
|
43
|
+
this.signer = signer;
|
|
44
|
+
this.escrowContract = this.escrowContract.connect(signer);
|
|
45
|
+
}
|
|
46
|
+
/** CONTRACT GETTERS */
|
|
47
|
+
/**
|
|
48
|
+
* Get the nonce of a user
|
|
49
|
+
* @param userAddress Address of the user to get the nonce of
|
|
50
|
+
* @returns Nonce of the user as a number
|
|
51
|
+
*/
|
|
52
|
+
getNonce_deprecated(userAddress) {
|
|
53
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
54
|
+
try {
|
|
55
|
+
if (!this.provider) {
|
|
56
|
+
throw new Error("Provider not set");
|
|
57
|
+
}
|
|
58
|
+
const nonce = yield this.escrowContract.nonces(userAddress);
|
|
59
|
+
return Number(nonce);
|
|
60
|
+
}
|
|
61
|
+
catch (e) {
|
|
62
|
+
return null;
|
|
63
|
+
}
|
|
64
|
+
});
|
|
65
|
+
}
|
|
66
|
+
/**
|
|
67
|
+
* Get the nonce of a user
|
|
68
|
+
* @param userAddress Address of the user to get the nonce of
|
|
69
|
+
* @param opType Type of escrow operation (deposit or withdraw)
|
|
70
|
+
* @returns Nonce of the user as a number
|
|
71
|
+
*/
|
|
72
|
+
getNonce(userAddress, opType) {
|
|
73
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
74
|
+
try {
|
|
75
|
+
if (!this.provider) {
|
|
76
|
+
throw new Error("Provider not set");
|
|
77
|
+
}
|
|
78
|
+
const _operationType = escrow_1.OperationType[opType];
|
|
79
|
+
const nonce = yield this.escrowContract.getNonce(userAddress, _operationType);
|
|
80
|
+
return Number(nonce);
|
|
81
|
+
}
|
|
82
|
+
catch (e) {
|
|
83
|
+
const errorResult = this.decodeRevertError(e);
|
|
84
|
+
// return null;
|
|
85
|
+
throw errorResult;
|
|
86
|
+
}
|
|
87
|
+
});
|
|
88
|
+
}
|
|
89
|
+
/** CONTRACT WRITERS */
|
|
90
|
+
fundWallets(payload) {
|
|
91
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
92
|
+
try {
|
|
93
|
+
if (!this.provider) {
|
|
94
|
+
throw new Error("Provider not set");
|
|
95
|
+
}
|
|
96
|
+
if (!this.signer) {
|
|
97
|
+
throw new Error("Signer not connected to contract.");
|
|
98
|
+
}
|
|
99
|
+
const tx = yield this.escrowContract.fundWallets(payload.wallets, payload.amount);
|
|
100
|
+
const receipt = yield tx.wait();
|
|
101
|
+
if (!receipt)
|
|
102
|
+
throw new Error("Failed to send transaction");
|
|
103
|
+
return {
|
|
104
|
+
status: escrow_1.TransactionStatus.SUCCESS,
|
|
105
|
+
transactionHash: tx.hash,
|
|
106
|
+
receipt,
|
|
107
|
+
fee: receipt.fee
|
|
108
|
+
};
|
|
109
|
+
}
|
|
110
|
+
catch (e) {
|
|
111
|
+
const errorResult = this.decodeRevertError(e);
|
|
112
|
+
return {
|
|
113
|
+
status: escrow_1.TransactionStatus.FAILED,
|
|
114
|
+
transactionHash: null,
|
|
115
|
+
receipt: null,
|
|
116
|
+
error: Object.assign({}, errorResult)
|
|
117
|
+
};
|
|
118
|
+
}
|
|
119
|
+
});
|
|
120
|
+
}
|
|
121
|
+
batchSweepERC20(payload) {
|
|
122
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
123
|
+
try {
|
|
124
|
+
if (!this.signer) {
|
|
125
|
+
throw new Error("Signer not set");
|
|
126
|
+
}
|
|
127
|
+
let tx = yield this.escrowContract.batchSweepERC20(payload);
|
|
128
|
+
let receipt = yield tx.wait(this.CONFIRMATIONS);
|
|
129
|
+
if (!receipt)
|
|
130
|
+
throw new Error(this.UnexpectedError("Failed to retrieve transaction receipt"));
|
|
131
|
+
return {
|
|
132
|
+
status: escrow_1.TransactionStatus.SUCCESS,
|
|
133
|
+
transactionHash: tx.hash,
|
|
134
|
+
fee: receipt.fee,
|
|
135
|
+
receipt,
|
|
136
|
+
};
|
|
137
|
+
}
|
|
138
|
+
catch (e) {
|
|
139
|
+
const errorResult = this.decodeRevertError(e);
|
|
140
|
+
return {
|
|
141
|
+
status: escrow_1.TransactionStatus.FAILED,
|
|
142
|
+
transactionHash: null,
|
|
143
|
+
receipt: null,
|
|
144
|
+
error: Object.assign({}, errorResult)
|
|
145
|
+
};
|
|
146
|
+
}
|
|
147
|
+
});
|
|
148
|
+
}
|
|
149
|
+
get_used_request_ids(ids) {
|
|
150
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
151
|
+
try {
|
|
152
|
+
if (!ids.length)
|
|
153
|
+
return [];
|
|
154
|
+
const used_ids = yield this.escrowContract.get_used_ids(ids);
|
|
155
|
+
if (used_ids.every(r => r === BigInt(0)))
|
|
156
|
+
return [];
|
|
157
|
+
return used_ids.map(id => Number(id));
|
|
158
|
+
}
|
|
159
|
+
catch (e) {
|
|
160
|
+
const errorResult = this.decodeRevertError(e);
|
|
161
|
+
throw new Error(errorResult.message);
|
|
162
|
+
}
|
|
163
|
+
});
|
|
164
|
+
}
|
|
165
|
+
admin_batch_withdraw(payloads, token_price) {
|
|
166
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
167
|
+
let success = [];
|
|
168
|
+
let failed = [];
|
|
169
|
+
let dropped = [];
|
|
170
|
+
let cancel = [];
|
|
171
|
+
const executed_at = new Date();
|
|
172
|
+
try {
|
|
173
|
+
if (!this.signer)
|
|
174
|
+
throw new Error("Signer not set");
|
|
175
|
+
if (!payloads.length)
|
|
176
|
+
return {
|
|
177
|
+
status: escrow_1.TransactionStatus.FAILED,
|
|
178
|
+
transactionHash: null,
|
|
179
|
+
receipt: null,
|
|
180
|
+
data: {
|
|
181
|
+
success,
|
|
182
|
+
failed,
|
|
183
|
+
dropped,
|
|
184
|
+
cancel
|
|
185
|
+
}
|
|
186
|
+
};
|
|
187
|
+
let tx = yield this.escrowContract.batch_withdraw(payloads);
|
|
188
|
+
let receipt = yield tx.wait(this.CONFIRMATIONS);
|
|
189
|
+
if (!receipt)
|
|
190
|
+
throw new Error(this.UnexpectedError("Failed to retrieve transaction receipt"));
|
|
191
|
+
success = payloads.map(p => p.requestId);
|
|
192
|
+
const fee_per_transaction = receipt.fee / BigInt(payloads.length);
|
|
193
|
+
const fee_per_tx_decimals = parseFloat((0, ethers_1.formatEther)(fee_per_transaction));
|
|
194
|
+
const fee_per_tx_usd_decimals = fee_per_tx_decimals * token_price;
|
|
195
|
+
const fee_per_tx_usd = (0, ethers_1.parseUnits)(fee_per_tx_decimals.toFixed(5), 6);
|
|
196
|
+
return {
|
|
197
|
+
status: escrow_1.TransactionStatus.SUCCESS,
|
|
198
|
+
transactionHash: tx.hash,
|
|
199
|
+
fee: receipt.fee,
|
|
200
|
+
feePerTx: fee_per_transaction,
|
|
201
|
+
feePerTxDecimals: fee_per_tx_decimals,
|
|
202
|
+
feePerTxUsd: fee_per_tx_usd,
|
|
203
|
+
feePerTxUsdDecimals: fee_per_tx_usd_decimals,
|
|
204
|
+
receipt,
|
|
205
|
+
executed_at,
|
|
206
|
+
data: {
|
|
207
|
+
success,
|
|
208
|
+
failed,
|
|
209
|
+
dropped,
|
|
210
|
+
cancel
|
|
211
|
+
}
|
|
212
|
+
};
|
|
213
|
+
}
|
|
214
|
+
catch (e) {
|
|
215
|
+
const errorResult = this.decodeRevertError(e);
|
|
216
|
+
return {
|
|
217
|
+
status: escrow_1.TransactionStatus.FAILED,
|
|
218
|
+
transactionHash: null,
|
|
219
|
+
receipt: null,
|
|
220
|
+
executed_at,
|
|
221
|
+
error: Object.assign({}, errorResult),
|
|
222
|
+
data: {
|
|
223
|
+
success,
|
|
224
|
+
failed,
|
|
225
|
+
dropped,
|
|
226
|
+
cancel
|
|
227
|
+
}
|
|
228
|
+
};
|
|
229
|
+
}
|
|
230
|
+
});
|
|
231
|
+
}
|
|
232
|
+
/**
|
|
233
|
+
* Entry point for withdraw, requires signer to be set
|
|
234
|
+
* @param amount Amount of tokens to withdraw in decimal format. e.g: 1.5 ETH
|
|
235
|
+
* @param requestId Withdrawal request ID from backend
|
|
236
|
+
* @param tokenAddress Address of the token to withdraw. e.g: 0x0000000000000000000000000000000000000000 for ether
|
|
237
|
+
* @param receiverAddress Address of the token receiver wallet
|
|
238
|
+
* @param signature v,r,s values of the signature
|
|
239
|
+
* @returns
|
|
240
|
+
*/
|
|
241
|
+
withdraw(amount, requestId, tokenAddress, receiverAddress, signature) {
|
|
242
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
243
|
+
try {
|
|
244
|
+
if (!this.signer) {
|
|
245
|
+
throw new Error("Signer not set");
|
|
246
|
+
}
|
|
247
|
+
let amountInWei;
|
|
248
|
+
if (tokenAddress === ethers_1.ZeroAddress) {
|
|
249
|
+
amountInWei = ethers_1.ethers.parseEther(amount.toString());
|
|
250
|
+
}
|
|
251
|
+
else {
|
|
252
|
+
// Get the decimals from the token contract
|
|
253
|
+
const tokenContract = new ethers_1.Contract(tokenAddress, ERC20Mock_json_1.default, this.provider);
|
|
254
|
+
const decimals = yield tokenContract.decimals();
|
|
255
|
+
amountInWei = ethers_1.ethers.parseUnits(amount.toString(), decimals);
|
|
256
|
+
}
|
|
257
|
+
const tx = yield this.escrowContract.withdraw(amountInWei, requestId, tokenAddress, receiverAddress, signature);
|
|
258
|
+
const receipt = yield tx.wait(this.CONFIRMATIONS);
|
|
259
|
+
if (!receipt)
|
|
260
|
+
throw new Error(this.UnexpectedError("Failed to retrieve transaction receipt"));
|
|
261
|
+
return {
|
|
262
|
+
status: escrow_1.TransactionStatus.SUCCESS,
|
|
263
|
+
fee: receipt.fee,
|
|
264
|
+
transactionHash: tx.hash,
|
|
265
|
+
receipt
|
|
266
|
+
};
|
|
267
|
+
}
|
|
268
|
+
catch (e) {
|
|
269
|
+
const errorResult = this.decodeRevertError(e);
|
|
270
|
+
return {
|
|
271
|
+
status: escrow_1.TransactionStatus.FAILED,
|
|
272
|
+
transactionHash: null,
|
|
273
|
+
receipt: null,
|
|
274
|
+
error: Object.assign({}, errorResult)
|
|
275
|
+
};
|
|
276
|
+
}
|
|
277
|
+
});
|
|
278
|
+
}
|
|
279
|
+
// Depositing native token (Ether)
|
|
280
|
+
_depositEther(amountInWei_1) {
|
|
281
|
+
return __awaiter(this, arguments, void 0, function* (amountInWei, bonusCode = "", signature) {
|
|
282
|
+
try {
|
|
283
|
+
if (!this.signer) {
|
|
284
|
+
throw new Error("Signer not set");
|
|
285
|
+
}
|
|
286
|
+
if (!amountInWei) {
|
|
287
|
+
throw new Error("Failed to convert amount to wei");
|
|
288
|
+
}
|
|
289
|
+
const tx = yield this.escrowContract.deposit(bonusCode, signature, {
|
|
290
|
+
value: ethers_1.ethers.toBigInt(amountInWei)
|
|
291
|
+
});
|
|
292
|
+
const receipt = yield tx.wait(this.CONFIRMATIONS);
|
|
293
|
+
return {
|
|
294
|
+
status: escrow_1.TransactionStatus.SUCCESS,
|
|
295
|
+
transactionHash: tx.hash,
|
|
296
|
+
receipt
|
|
297
|
+
};
|
|
298
|
+
}
|
|
299
|
+
catch (e) {
|
|
300
|
+
const errorResult = this.decodeRevertError(e);
|
|
301
|
+
return {
|
|
302
|
+
status: escrow_1.TransactionStatus.FAILED,
|
|
303
|
+
transactionHash: null,
|
|
304
|
+
receipt: null,
|
|
305
|
+
error: Object.assign({}, errorResult)
|
|
306
|
+
};
|
|
307
|
+
}
|
|
308
|
+
});
|
|
309
|
+
}
|
|
310
|
+
// Depositing ERC20 token
|
|
311
|
+
_depositERC20(amountInTokenUnits_1, tokenAddress_1) {
|
|
312
|
+
return __awaiter(this, arguments, void 0, function* (amountInTokenUnits, tokenAddress, bonusCode = "", signature, signer) {
|
|
313
|
+
try {
|
|
314
|
+
const EscrowAddress = yield this.escrowContract.getAddress();
|
|
315
|
+
// Initialize token contract
|
|
316
|
+
const tokenContract = new ethers_1.Contract(tokenAddress, ERC20Mock_json_1.default, this.signer);
|
|
317
|
+
// Request approval only if the token is not already approved for spending by escrow contract
|
|
318
|
+
const allowance = yield tokenContract.allowance(yield signer.getAddress(), EscrowAddress);
|
|
319
|
+
if (allowance < ethers_1.ethers.toBigInt(amountInTokenUnits)) {
|
|
320
|
+
const approveTx = yield tokenContract.approve(EscrowAddress, amountInTokenUnits);
|
|
321
|
+
yield approveTx.wait(this.CONFIRMATIONS);
|
|
322
|
+
}
|
|
323
|
+
const depositTx = yield this.escrowContract.depositErc20(amountInTokenUnits, tokenAddress, bonusCode, signature);
|
|
324
|
+
const depositReceipt = yield depositTx.wait(this.CONFIRMATIONS);
|
|
325
|
+
return {
|
|
326
|
+
status: escrow_1.TransactionStatus.SUCCESS,
|
|
327
|
+
transactionHash: depositTx.hash,
|
|
328
|
+
receipt: depositReceipt,
|
|
329
|
+
};
|
|
330
|
+
}
|
|
331
|
+
catch (e) {
|
|
332
|
+
const errorResult = this.decodeRevertError(e);
|
|
333
|
+
return {
|
|
334
|
+
status: escrow_1.TransactionStatus.FAILED,
|
|
335
|
+
transactionHash: null,
|
|
336
|
+
receipt: null,
|
|
337
|
+
error: Object.assign({}, errorResult)
|
|
338
|
+
};
|
|
339
|
+
}
|
|
340
|
+
});
|
|
341
|
+
}
|
|
342
|
+
decodeRevertError(error) {
|
|
343
|
+
// Decode error data
|
|
344
|
+
if (error.data) {
|
|
345
|
+
const decodedError = this.escrowContract.interface.parseError(error.data);
|
|
346
|
+
if (decodedError) {
|
|
347
|
+
// Decoded error
|
|
348
|
+
let parsedError = (0, EscrowErrors_1.parseDecodedError)(decodedError);
|
|
349
|
+
return parsedError;
|
|
350
|
+
}
|
|
351
|
+
}
|
|
352
|
+
// Error cannot be decoded
|
|
353
|
+
return {
|
|
354
|
+
name: "UnknownError",
|
|
355
|
+
message: error.message
|
|
356
|
+
};
|
|
357
|
+
}
|
|
358
|
+
}
|
|
359
|
+
exports.default = EscrowInteraction;
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
import { ErrorDescription } from "ethers";
|
|
2
|
+
export interface ContractBusyError {
|
|
3
|
+
name: "ContractBusy";
|
|
4
|
+
args: [];
|
|
5
|
+
}
|
|
6
|
+
export interface ContractPausedError {
|
|
7
|
+
name: "ContractPaused";
|
|
8
|
+
args: [];
|
|
9
|
+
}
|
|
10
|
+
export interface InvalidSignatureError {
|
|
11
|
+
name: "InvalidSignature";
|
|
12
|
+
args: [];
|
|
13
|
+
}
|
|
14
|
+
export interface SignatureAlreadyUsedError {
|
|
15
|
+
name: "SignatureAlreadyUsed";
|
|
16
|
+
args: [];
|
|
17
|
+
}
|
|
18
|
+
export interface ZeroValueError {
|
|
19
|
+
name: "ZeroValue";
|
|
20
|
+
args: [];
|
|
21
|
+
}
|
|
22
|
+
export interface ZeroAddressError {
|
|
23
|
+
name: "ZeroAddress";
|
|
24
|
+
args: [];
|
|
25
|
+
}
|
|
26
|
+
export interface RequestAlreadyFulfilledError {
|
|
27
|
+
name: "RequestAlreadyFulfilled";
|
|
28
|
+
args: [];
|
|
29
|
+
}
|
|
30
|
+
export interface EtherDirectTransferNotAllowedError {
|
|
31
|
+
name: "EtherDirectTransferNotAllowed";
|
|
32
|
+
args: [];
|
|
33
|
+
}
|
|
34
|
+
export interface DepositOnlyERC20Error {
|
|
35
|
+
name: "DepositOnlyERC20";
|
|
36
|
+
args: [];
|
|
37
|
+
}
|
|
38
|
+
export interface TokenNotAllowedError {
|
|
39
|
+
name: "TokenNotAllowed";
|
|
40
|
+
args: [string];
|
|
41
|
+
}
|
|
42
|
+
export interface InsufficientBalanceError {
|
|
43
|
+
name: "InsufficientBalance";
|
|
44
|
+
args: [string, string, number, number];
|
|
45
|
+
}
|
|
46
|
+
export interface InsufficientReservesError {
|
|
47
|
+
name: "InsufficientReserves";
|
|
48
|
+
args: [];
|
|
49
|
+
}
|
|
50
|
+
export interface TransferError {
|
|
51
|
+
name: "TransferError";
|
|
52
|
+
args: [];
|
|
53
|
+
}
|
|
54
|
+
export interface NotAdminError {
|
|
55
|
+
name: "NotAdmin";
|
|
56
|
+
args: [];
|
|
57
|
+
}
|
|
58
|
+
export interface NotAuthorizedError {
|
|
59
|
+
name: "NotAuthorized";
|
|
60
|
+
args: [];
|
|
61
|
+
}
|
|
62
|
+
type ErrorName = "NotAuthorized" | "NotAdmin" | "TransferError" | "InsufficientReserves" | "InsufficientBalance" | "TokenNotAllowed" | "DepositOnlyERC20" | "EtherDirectTransferNotAllowed" | "RequestAlreadyFulfilled" | "ZeroAddress" | "ZeroValue" | "SignatureAlreadyUsed" | "InvalidSignature" | "ContractPaused" | "ContractBusy" | "UnknownError";
|
|
63
|
+
export interface EscrowErrorMessage {
|
|
64
|
+
name: ErrorName;
|
|
65
|
+
message: string;
|
|
66
|
+
data?: any;
|
|
67
|
+
}
|
|
68
|
+
export interface ErrorObject {
|
|
69
|
+
[key: string]: string;
|
|
70
|
+
message: string;
|
|
71
|
+
data: string;
|
|
72
|
+
}
|
|
73
|
+
export declare const parseDecodedError: (decodedError: ErrorDescription) => EscrowErrorMessage;
|
|
74
|
+
export {};
|
|
75
|
+
//# sourceMappingURL=EscrowErrors.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"EscrowErrors.d.ts","sourceRoot":"","sources":["../../src/contracts/EscrowErrors.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,QAAQ,CAAC;AAE1C,MAAM,WAAW,iBAAiB;IAC9B,IAAI,EAAE,cAAc,CAAC;IACrB,IAAI,EAAE,EAAE,CAAC;CACZ;AAED,MAAM,WAAW,mBAAmB;IAChC,IAAI,EAAE,gBAAgB,CAAC;IACvB,IAAI,EAAE,EAAE,CAAC;CACZ;AAED,MAAM,WAAW,qBAAqB;IAClC,IAAI,EAAE,kBAAkB,CAAC;IACzB,IAAI,EAAE,EAAE,CAAC;CACZ;AAED,MAAM,WAAW,yBAAyB;IACtC,IAAI,EAAE,sBAAsB,CAAC;IAC7B,IAAI,EAAE,EAAE,CAAC;CACZ;AAED,MAAM,WAAW,cAAc;IAC3B,IAAI,EAAE,WAAW,CAAC;IAClB,IAAI,EAAE,EAAE,CAAC;CACZ;AAED,MAAM,WAAW,gBAAgB;IAC7B,IAAI,EAAE,aAAa,CAAC;IACpB,IAAI,EAAE,EAAE,CAAC;CACZ;AAED,MAAM,WAAW,4BAA4B;IACzC,IAAI,EAAE,yBAAyB,CAAC;IAChC,IAAI,EAAE,EAAE,CAAC;CACZ;AAED,MAAM,WAAW,kCAAkC;IAC/C,IAAI,EAAE,+BAA+B,CAAC;IACtC,IAAI,EAAE,EAAE,CAAC;CACZ;AAED,MAAM,WAAW,qBAAqB;IAClC,IAAI,EAAE,kBAAkB,CAAC;IACzB,IAAI,EAAE,EAAE,CAAC;CACZ;AAED,MAAM,WAAW,oBAAoB;IACjC,IAAI,EAAE,iBAAiB,CAAC;IACxB,IAAI,EAAE,CAAC,MAAM,CAAC,CAAC;CAClB;AAED,MAAM,WAAW,wBAAwB;IACrC,IAAI,EAAE,qBAAqB,CAAC;IAC5B,IAAI,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,CAAC;CAC1C;AAED,MAAM,WAAW,yBAAyB;IACtC,IAAI,EAAE,sBAAsB,CAAC;IAC7B,IAAI,EAAE,EAAE,CAAC;CACZ;AAED,MAAM,WAAW,aAAa;IAC1B,IAAI,EAAE,eAAe,CAAC;IACtB,IAAI,EAAE,EAAE,CAAC;CACZ;AAED,MAAM,WAAW,aAAa;IAC1B,IAAI,EAAE,UAAU,CAAC;IACjB,IAAI,EAAE,EAAE,CAAC;CACZ;AAED,MAAM,WAAW,kBAAkB;IAC/B,IAAI,EAAE,eAAe,CAAC;IACtB,IAAI,EAAE,EAAE,CAAC;CACZ;AAID,KAAK,SAAS,GACR,eAAe,GACf,UAAU,GACV,eAAe,GACf,sBAAsB,GACtB,qBAAqB,GACrB,iBAAiB,GACjB,kBAAkB,GAClB,+BAA+B,GAC/B,yBAAyB,GACzB,aAAa,GACb,WAAW,GACX,sBAAsB,GACtB,kBAAkB,GAClB,gBAAgB,GAChB,cAAc,GACd,cAAc,CAAC;AAErB,MAAM,WAAW,kBAAkB;IAC/B,IAAI,EAAE,SAAS,CAAC;IAChB,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,CAAC,EAAE,GAAG,CAAC;CACd;AAED,MAAM,WAAW,WAAW;IACxB,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAAC;IACtB,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,EAAE,MAAM,CAAC;CAChB;AAED,eAAO,MAAM,iBAAiB,GAAI,cAAc,gBAAgB,KAAG,kBA2ClE,CAAC"}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.parseDecodedError = void 0;
|
|
4
|
+
const parseDecodedError = (decodedError) => {
|
|
5
|
+
switch (decodedError.name) {
|
|
6
|
+
case "ContractPaused":
|
|
7
|
+
return { name: decodedError.name, message: `Contract is currently paused by the administrators.` };
|
|
8
|
+
case "ContractBusy":
|
|
9
|
+
return { name: decodedError.name, message: `Contract is busy with another tranasction.` };
|
|
10
|
+
case "ContractBusy":
|
|
11
|
+
return { name: decodedError.name, message: `Contract is busy with another tranasction.` };
|
|
12
|
+
case "DepositOnlyERC20":
|
|
13
|
+
return { name: decodedError.name, message: `Only ERC20 tokend deposits are allowed.` };
|
|
14
|
+
case "EtherDirectTransferNotAllowed":
|
|
15
|
+
return {
|
|
16
|
+
name: decodedError.name,
|
|
17
|
+
message: `Direct transfer of native token to the contract is not allowed. Please use the deposit methods instead.`
|
|
18
|
+
};
|
|
19
|
+
case "InvalidSignature":
|
|
20
|
+
return { name: decodedError.name, message: `Transaction signature does not match.` };
|
|
21
|
+
case "InsufficientReserves":
|
|
22
|
+
return { name: decodedError.name, message: `Contract token balance is low.` };
|
|
23
|
+
// case "InsufficientBalance":
|
|
24
|
+
// const [holder, token, available, requested] = decodedError.args;
|
|
25
|
+
// return { name: decodedError.name, message: `Balance of ${holder} of token: ${token} is low. Requested ${requested}, but has ${available}. ` }
|
|
26
|
+
case "NotAuthorized":
|
|
27
|
+
return { name: decodedError.name, message: `User is not authorized for this action.` };
|
|
28
|
+
case "NotAdmin":
|
|
29
|
+
return { name: decodedError.name, message: `Admin role required for this action.` };
|
|
30
|
+
case "RequestAlreadyFulfilled":
|
|
31
|
+
return { name: decodedError.name, message: `Withdraw request already fulfilled. No tokens for withdrawal.`, data: { requestId: Number(decodedError.args[0]) } };
|
|
32
|
+
case "TransferError":
|
|
33
|
+
return { name: decodedError.name, message: `Token transfer failed.` };
|
|
34
|
+
case "SignatureAlreadyUsed":
|
|
35
|
+
return { name: decodedError.name, message: `Transaction cannot be repeated.` };
|
|
36
|
+
case "TokenNotAllowed":
|
|
37
|
+
const [tokenAddress] = decodedError.args;
|
|
38
|
+
return { name: decodedError.name, message: `Transfer of token ${tokenAddress} is not allowed.` };
|
|
39
|
+
case "ZeroAddress":
|
|
40
|
+
return { name: decodedError.name, message: `Transfer to the Ethereum Zero Address is not allowed.` };
|
|
41
|
+
case "ZeroValue":
|
|
42
|
+
return { name: decodedError.name, message: `Token amount cannot be zero.` };
|
|
43
|
+
default:
|
|
44
|
+
return { name: "UnknownError", message: "Unexpected error occured." };
|
|
45
|
+
}
|
|
46
|
+
};
|
|
47
|
+
exports.parseDecodedError = parseDecodedError;
|