@ercworldio/blockchain-shared 1.0.0-dev.10
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 +669 -0
- package/build/chains/networks_prod-bu.json +568 -0
- package/build/chains/networks_prod-dz.json +510 -0
- package/build/chains/networks_prod.json +553 -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 +87 -0
- package/build/interfaces/config.d.ts.map +1 -0
- package/build/interfaces/config.js +7 -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 +442 -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 +46 -0
- package/build/services/ClaimJobService.d.ts.map +1 -0
- package/build/services/ClaimJobService.js +407 -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 +42 -0
- package/build/services/DepositAddressService.d.ts.map +1 -0
- package/build/services/DepositAddressService.js +275 -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 +65 -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 +111 -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 +52 -0
- package/build/services/Redis.d.ts.map +1 -0
- package/build/services/Redis.js +364 -0
- package/build/services/RedisListQueue.d.ts +15 -0
- package/build/services/RedisListQueue.d.ts.map +1 -0
- package/build/services/RedisListQueue.js +87 -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 +53 -0
- package/build/services/SweepJobService.d.ts.map +1 -0
- package/build/services/SweepJobService.js +725 -0
- package/build/services/TimerManager.d.ts +44 -0
- package/build/services/TimerManager.d.ts.map +1 -0
- package/build/services/TimerManager.js +239 -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 +372 -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 +122 -0
- package/build/services/solana/escrow/services/EscrowAdminUtility.d.ts.map +1 -0
- package/build/services/solana/escrow/services/EscrowAdminUtility.js +665 -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 +87 -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 +151 -0
- package/build/utils/solana.d.ts.map +1 -0
- package/build/utils/solana.js +674 -0
- package/package.json +107 -0
|
@@ -0,0 +1,372 @@
|
|
|
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 web3_js_1 = require("@solana/web3.js");
|
|
16
|
+
// import { ServerConfig } from "../config/server-config";
|
|
17
|
+
const TransactionsErrors_1 = __importDefault(require("../errors/TransactionsErrors"));
|
|
18
|
+
const WalletManager_1 = __importDefault(require("./WalletManager"));
|
|
19
|
+
const custodial_1 = require("../utils/custodial");
|
|
20
|
+
const AccountingService_1 = __importDefault(require("./AccountingService"));
|
|
21
|
+
const ClaimJobService_1 = __importDefault(require("./ClaimJobService"));
|
|
22
|
+
const ChainManager_1 = __importDefault(require("./ChainManager"));
|
|
23
|
+
const ethers_1 = require("ethers");
|
|
24
|
+
const ProviderManager_1 = __importDefault(require("./ProviderManager"));
|
|
25
|
+
const Escrow_1 = __importDefault(require("../contracts/Escrow"));
|
|
26
|
+
const Wallets_1 = require("../utils/Wallets");
|
|
27
|
+
const Utility_1 = require("../utils/Utility");
|
|
28
|
+
const constants_1 = require("../constants");
|
|
29
|
+
class WithdrawalManager extends TransactionsErrors_1.default {
|
|
30
|
+
constructor(dbPool, config) {
|
|
31
|
+
super();
|
|
32
|
+
this.handle_get_withdraw_request = (id) => __awaiter(this, void 0, void 0, function* () {
|
|
33
|
+
const accounting = new AccountingService_1.default(this.dbPool, this.config);
|
|
34
|
+
return accounting.get_crypto_withdrawal_request(id);
|
|
35
|
+
});
|
|
36
|
+
// TODO : Implement check for withdraw request
|
|
37
|
+
this.get_withdraw_request = (id) => __awaiter(this, void 0, void 0, function* () {
|
|
38
|
+
const withdraw_request = yield this.handle_get_withdraw_request(id);
|
|
39
|
+
if (!withdraw_request)
|
|
40
|
+
throw new Error(this.NotExistWithdrawRequest());
|
|
41
|
+
return withdraw_request;
|
|
42
|
+
});
|
|
43
|
+
// Check if receiver address is the same one used for the deposit
|
|
44
|
+
this.is_source_address = (user_id, address, blockchain) => __awaiter(this, void 0, void 0, function* () {
|
|
45
|
+
const accounting_service = new AccountingService_1.default(this.dbPool, this.config);
|
|
46
|
+
const is_valid_address = yield accounting_service.deposit_address_exists_by_user(user_id, address, blockchain);
|
|
47
|
+
return is_valid_address;
|
|
48
|
+
});
|
|
49
|
+
// Calls the escrow contract to check if the request id is fulfilled
|
|
50
|
+
this.is_available_request_id = (request_id, chain_id) => __awaiter(this, void 0, void 0, function* () {
|
|
51
|
+
const escrow_config = yield ChainManager_1.default.getInstance(this.config).getEscrowContractForChain(parseInt(chain_id));
|
|
52
|
+
const provider = ProviderManager_1.default.getInstance(this.config).getNewProvider(chain_id);
|
|
53
|
+
const funds_manager = WalletManager_1.default.getInstance(this.config, this.dbPool).getEscrowFundsManagerWallet("evm");
|
|
54
|
+
// TODO remove signer from here
|
|
55
|
+
const escrow_manager = new Escrow_1.default(escrow_config.addresses[0], provider.provider, funds_manager.connect(provider.provider));
|
|
56
|
+
const used_ids = yield escrow_manager.get_used_request_ids([request_id]);
|
|
57
|
+
if (used_ids.length > 0)
|
|
58
|
+
return false;
|
|
59
|
+
return true;
|
|
60
|
+
});
|
|
61
|
+
this.estimate_batch_withdraw_cost = (blockchain, chain_id, queue) => __awaiter(this, void 0, void 0, function* () {
|
|
62
|
+
if (blockchain !== "solana" && blockchain !== "evm")
|
|
63
|
+
throw new Error();
|
|
64
|
+
if (queue.length === 0)
|
|
65
|
+
return { estimation_map: new Map(), updated_queue: [] };
|
|
66
|
+
const accounting = new AccountingService_1.default(this.dbPool, this.config);
|
|
67
|
+
// Get native token price in usdt
|
|
68
|
+
const token_price = yield (0, Utility_1.retryWithExponentialBackoff)(() => accounting.get_crypto_rate(chain_id));
|
|
69
|
+
// Estimate total transaction cost with batch withdrawal
|
|
70
|
+
const { estimate, tx_count } = yield this.get_estimate_for_batch(blockchain, chain_id, queue);
|
|
71
|
+
const { estimation_map, updated_queue } = this.calculate_estimate_for_user(blockchain, token_price, estimate, tx_count, queue);
|
|
72
|
+
return { estimation_map, updated_queue };
|
|
73
|
+
});
|
|
74
|
+
// Estimates the cost to be paid by the user when their transaction is included in a batch withdrawal
|
|
75
|
+
this.estimate_cost_for_user = (blockchain, chain_id, receiver, token, display_currency, user_id) => __awaiter(this, void 0, void 0, function* () {
|
|
76
|
+
if (blockchain !== constants_1.BLOCKCHAINS.SOLANA && blockchain !== constants_1.BLOCKCHAINS.EVM && blockchain !== constants_1.BLOCKCHAINS.TRON)
|
|
77
|
+
throw new Error();
|
|
78
|
+
// // TODO remove this dummy return
|
|
79
|
+
// if (blockchain === BLOCKCHAINS.TRON) {
|
|
80
|
+
// return {
|
|
81
|
+
// estimate_units: Number(0),
|
|
82
|
+
// estimate_in_decimals: 0,
|
|
83
|
+
// estimate_in_usdt: 0,
|
|
84
|
+
// estimate_in_usdt_decimals: 0,
|
|
85
|
+
// token_price: 0,
|
|
86
|
+
// estimate_in_usdt_precision: 0
|
|
87
|
+
// }
|
|
88
|
+
// }
|
|
89
|
+
const accounting = new AccountingService_1.default(this.dbPool, this.config);
|
|
90
|
+
// Get max batch size based on blockchain type
|
|
91
|
+
const max_batch_size = blockchain === "evm" ? this.config.serverConfig.maxTransactionsPerTxEvm : this.config.serverConfig.maxInstructionsPerTxSolana;
|
|
92
|
+
// Get withdrawal requests in queue
|
|
93
|
+
const recent_queue = yield this.claim_jobs_service.get_next_queued_jobs(blockchain, chain_id, max_batch_size);
|
|
94
|
+
// Validate token
|
|
95
|
+
const target_token = ChainManager_1.default.getInstance(this.config).get_payment_token_for_chain(blockchain, chain_id, token);
|
|
96
|
+
if ((0, Wallets_1.normalizeAddress)(target_token.address, blockchain) !== (0, Wallets_1.normalizeAddress)(token, blockchain))
|
|
97
|
+
throw new Error(this.UnexpectedPaymentToken());
|
|
98
|
+
// Estimate total transaction cost with batch withdrawal
|
|
99
|
+
const { estimate, estimate_decimals, tx_count } = yield this.get_estimate_for_batch(blockchain, chain_id, recent_queue, { token, receiver, user_id });
|
|
100
|
+
// Handle no user
|
|
101
|
+
if (estimate === BigInt(0))
|
|
102
|
+
return {
|
|
103
|
+
estimate_units: Number(0),
|
|
104
|
+
estimate_in_decimals: 0,
|
|
105
|
+
estimate_in_usdt: 0,
|
|
106
|
+
estimate_in_usdt_decimals: 0,
|
|
107
|
+
token_price: 0,
|
|
108
|
+
estimate_in_usdt_precision: 0
|
|
109
|
+
};
|
|
110
|
+
// Get native token price in usdt
|
|
111
|
+
const token_price = yield accounting.get_crypto_rate(chain_id);
|
|
112
|
+
if (blockchain === constants_1.BLOCKCHAINS.TRON) {
|
|
113
|
+
const estimate_usdt_decimals = Number((estimate_decimals * token_price).toPrecision(5));
|
|
114
|
+
const display_exchange_rate = yield accounting.convert_amount_to_currency(estimate_usdt_decimals, "USD", display_currency);
|
|
115
|
+
// Return user estimation
|
|
116
|
+
return {
|
|
117
|
+
estimate_units: Number(estimate),
|
|
118
|
+
estimate_in_decimals: estimate_decimals,
|
|
119
|
+
estimate_in_usdt: (0, ethers_1.parseUnits)(estimate_usdt_decimals.toString(), 6),
|
|
120
|
+
estimate_in_usdt_decimals: display_exchange_rate,
|
|
121
|
+
token_price,
|
|
122
|
+
estimate_in_usdt_precision: estimate_usdt_decimals
|
|
123
|
+
};
|
|
124
|
+
}
|
|
125
|
+
else {
|
|
126
|
+
// Calculate payable cost for user
|
|
127
|
+
const { estimation_map, user_cost } = this.calculate_estimate_for_user(blockchain, token_price, estimate, tx_count, recent_queue);
|
|
128
|
+
const display_exchange_rate = yield accounting.convert_amount_to_currency(user_cost.estimate_in_usdt_decimals, "USD", display_currency);
|
|
129
|
+
// Return user estimation
|
|
130
|
+
return {
|
|
131
|
+
estimate_units: Number(user_cost.estimate_units),
|
|
132
|
+
estimate_in_decimals: user_cost.estimate_in_decimals,
|
|
133
|
+
estimate_in_usdt: user_cost.estimate_in_usdt,
|
|
134
|
+
// estimate_in_usdt_decimals: user_estimate.estimate_in_usdt_decimals,
|
|
135
|
+
estimate_in_usdt_decimals: display_exchange_rate,
|
|
136
|
+
token_price,
|
|
137
|
+
estimate_in_usdt_precision: user_cost.estimate_in_usdt_decimals
|
|
138
|
+
};
|
|
139
|
+
}
|
|
140
|
+
});
|
|
141
|
+
// TODO: CHECK THIS LOGIC
|
|
142
|
+
this.get_estimate_for_batch = (blockchain, chain_id, queue, extra_config) => __awaiter(this, void 0, void 0, function* () {
|
|
143
|
+
var _a;
|
|
144
|
+
// Get funds manager wallet
|
|
145
|
+
// TODO remove signer from here
|
|
146
|
+
const funds_manager = WalletManager_1.default.getInstance(this.config, this.dbPool).getEscrowFundsManagerWallet(blockchain);
|
|
147
|
+
if (blockchain === 'solana') {
|
|
148
|
+
const user_count = queue.length === 0 ? 1 : queue.length;
|
|
149
|
+
return { estimate: BigInt(5000), estimate_decimals: Number(ethers_1.ethers.formatUnits(5000, 9)), tx_count: user_count };
|
|
150
|
+
}
|
|
151
|
+
else if (blockchain === "evm") {
|
|
152
|
+
// Build evm batch withdraw payload
|
|
153
|
+
const payloads = queue.map(j => ({
|
|
154
|
+
amount_in_tokens: j.amount,
|
|
155
|
+
requestId: j.request_id,
|
|
156
|
+
token: j.token,
|
|
157
|
+
receiver: j.receiver
|
|
158
|
+
}));
|
|
159
|
+
// In case queue is empty, push a mock tx for gas estimation only
|
|
160
|
+
// amount_in_tokens = 1 (minimum unit) to avoid triggering balance checks in the contract
|
|
161
|
+
if (payloads.length === 0 && (extra_config === null || extra_config === void 0 ? void 0 : extra_config.token)) {
|
|
162
|
+
payloads.push({
|
|
163
|
+
amount_in_tokens: BigInt(1),
|
|
164
|
+
requestId: 0,
|
|
165
|
+
token: extra_config.token,
|
|
166
|
+
receiver: funds_manager.address
|
|
167
|
+
});
|
|
168
|
+
}
|
|
169
|
+
// Estimate cost to call `batch_withdraw`
|
|
170
|
+
const transaction_cost = yield (0, custodial_1.estimate_escrow_method_call_cost)(chain_id, payloads, this.dbPool, this.config);
|
|
171
|
+
return { estimate: transaction_cost, estimate_decimals: Number(ethers_1.ethers.formatEther(transaction_cost)), tx_count: payloads.length };
|
|
172
|
+
}
|
|
173
|
+
// Implement tron estimation
|
|
174
|
+
else if (blockchain === constants_1.BLOCKCHAINS.TRON) {
|
|
175
|
+
const tronFeeConfig = (_a = ChainManager_1.default.getInstance(this.config).getChainConfigForChainIdSync(parseInt(chain_id))) === null || _a === void 0 ? void 0 : _a.tronConfig;
|
|
176
|
+
if (!tronFeeConfig) {
|
|
177
|
+
return { estimate: BigInt(0), estimate_decimals: 0, tx_count: queue.length };
|
|
178
|
+
}
|
|
179
|
+
if ((extra_config === null || extra_config === void 0 ? void 0 : extra_config.token) && (extra_config.token === ethers_1.ethers.ZeroAddress.slice(2) || extra_config.token === ethers_1.ethers.ZeroAddress) || (extra_config === null || extra_config === void 0 ? void 0 : extra_config.token) === 'TRX') {
|
|
180
|
+
return { estimate: BigInt(tronFeeConfig.trxTransferCost), estimate_decimals: Number(ethers_1.ethers.formatUnits(tronFeeConfig.trxTransferCost, 6)), tx_count: 1 };
|
|
181
|
+
}
|
|
182
|
+
else {
|
|
183
|
+
return { estimate: BigInt(tronFeeConfig.trc20TransferCost), estimate_decimals: Number(ethers_1.ethers.formatUnits(tronFeeConfig.trc20TransferCost, 6)), tx_count: 1 };
|
|
184
|
+
}
|
|
185
|
+
}
|
|
186
|
+
else
|
|
187
|
+
throw new Error(this.UnsupportedResource("Blockchain type"));
|
|
188
|
+
});
|
|
189
|
+
// Calculates the average cost per transaction in a batch
|
|
190
|
+
// Returns parsed estimation (decimals, units,..)
|
|
191
|
+
// TODO: CHECK THIS LOGIC
|
|
192
|
+
this.calculate_cost_per_job = (blockchain, token_price, total_fee, job_count) => {
|
|
193
|
+
const user_estimate = BigInt(total_fee) / BigInt(job_count);
|
|
194
|
+
let estimate_in_decimals = 0;
|
|
195
|
+
if (blockchain === "evm") {
|
|
196
|
+
estimate_in_decimals = parseFloat((0, ethers_1.formatEther)(user_estimate.toString()));
|
|
197
|
+
}
|
|
198
|
+
else if (blockchain === "solana") {
|
|
199
|
+
estimate_in_decimals = parseFloat((0, ethers_1.formatUnits)(user_estimate, 9));
|
|
200
|
+
}
|
|
201
|
+
else
|
|
202
|
+
throw new Error(this.UnsupportedResource(`Blockchain ${blockchain}`));
|
|
203
|
+
let estimate_in_usdt_decimals = token_price * estimate_in_decimals;
|
|
204
|
+
let estimate_in_usdt_wei = (0, ethers_1.parseUnits)(estimate_in_usdt_decimals.toFixed(5), 6);
|
|
205
|
+
// Discard fee if less than threshold
|
|
206
|
+
if (Number(estimate_in_usdt_decimals) < Number(this.config.serverConfig.minPayableWithdrawalFee)) {
|
|
207
|
+
let estimation = {
|
|
208
|
+
user_job_count: 1,
|
|
209
|
+
estimate_units: BigInt(0),
|
|
210
|
+
estimate_in_decimals: 0,
|
|
211
|
+
estimate_in_usdt: BigInt(0),
|
|
212
|
+
estimate_in_usdt_decimals: 0,
|
|
213
|
+
token_price
|
|
214
|
+
};
|
|
215
|
+
return estimation;
|
|
216
|
+
}
|
|
217
|
+
let estimation = {
|
|
218
|
+
user_job_count: 1,
|
|
219
|
+
estimate_units: user_estimate,
|
|
220
|
+
estimate_in_decimals,
|
|
221
|
+
estimate_in_usdt: estimate_in_usdt_wei,
|
|
222
|
+
estimate_in_usdt_decimals: estimate_in_usdt_decimals,
|
|
223
|
+
token_price
|
|
224
|
+
};
|
|
225
|
+
return estimation;
|
|
226
|
+
};
|
|
227
|
+
// Given a queue of jobs, calculates each user's share of the batch cost
|
|
228
|
+
// Returns mapping of userid to total cost and a queue with adjusted amounts
|
|
229
|
+
this.calculate_estimate_for_user = (blockchain, token_price, total_fee, tx_count, queue) => {
|
|
230
|
+
// Userid to estimation map
|
|
231
|
+
const user_map = new Map();
|
|
232
|
+
const user_cost = this.calculate_cost_per_job(blockchain, token_price, total_fee, tx_count);
|
|
233
|
+
// Calculate cost per unit = total_fee / tx_count (user_job_count is always 1 in calculate_cost_per_job)
|
|
234
|
+
const unit_cost = BigInt(user_cost.estimate_units) / BigInt(user_cost.user_job_count);
|
|
235
|
+
// Calculate new amounts including the payable fee
|
|
236
|
+
const updated_queue = queue.map(j => {
|
|
237
|
+
if (blockchain === constants_1.BLOCKCHAINS.SOLANA) {
|
|
238
|
+
// Solana native token
|
|
239
|
+
if (new web3_js_1.PublicKey(j.token).toBase58() === web3_js_1.SystemProgram.programId.toBase58()) {
|
|
240
|
+
// Intentional in-place mutation: mutates the original ClaimJobs object so spread picks up the updated amount
|
|
241
|
+
if (unit_cost < BigInt(j.amount))
|
|
242
|
+
j.amount = BigInt(j.amount) - unit_cost;
|
|
243
|
+
// TODO: Drop this job since the cost is higher than amount
|
|
244
|
+
return Object.assign(Object.assign({}, j), { fee_data: user_cost });
|
|
245
|
+
}
|
|
246
|
+
else {
|
|
247
|
+
// SPL token
|
|
248
|
+
return this.parse_cost_stable_coin(blockchain, user_cost, j, unit_cost, token_price);
|
|
249
|
+
}
|
|
250
|
+
}
|
|
251
|
+
else if (blockchain === constants_1.BLOCKCHAINS.EVM) {
|
|
252
|
+
// Directly deduct from native amount
|
|
253
|
+
if (j.token === ethers_1.ethers.ZeroAddress) {
|
|
254
|
+
// Intentional in-place mutation: mutates the original ClaimJobs object so spread picks up the updated amount
|
|
255
|
+
if (unit_cost < BigInt(j.amount))
|
|
256
|
+
j.amount = BigInt(j.amount) - unit_cost;
|
|
257
|
+
return Object.assign(Object.assign({}, j), { fee_data: user_cost });
|
|
258
|
+
}
|
|
259
|
+
else {
|
|
260
|
+
// ERC20
|
|
261
|
+
return this.parse_cost_stable_coin(blockchain, user_cost, j, unit_cost, token_price);
|
|
262
|
+
}
|
|
263
|
+
}
|
|
264
|
+
else
|
|
265
|
+
throw new Error(this.UnsupportedResource(`blockchain ${blockchain}`));
|
|
266
|
+
});
|
|
267
|
+
// Populate estimation_map: aggregate per-user total cost (user may have multiple jobs)
|
|
268
|
+
const user_job_counts = new Map();
|
|
269
|
+
queue.forEach(j => { var _a; return user_job_counts.set(j.user_id, ((_a = user_job_counts.get(j.user_id)) !== null && _a !== void 0 ? _a : 0) + 1); });
|
|
270
|
+
for (const [uid, count] of user_job_counts.entries()) {
|
|
271
|
+
user_map.set(uid, {
|
|
272
|
+
user_job_count: count,
|
|
273
|
+
estimate_units: user_cost.estimate_units * BigInt(count),
|
|
274
|
+
estimate_in_decimals: user_cost.estimate_in_decimals * count,
|
|
275
|
+
estimate_in_usdt: user_cost.estimate_in_usdt * BigInt(count),
|
|
276
|
+
estimate_in_usdt_decimals: user_cost.estimate_in_usdt_decimals * count,
|
|
277
|
+
token_price
|
|
278
|
+
});
|
|
279
|
+
}
|
|
280
|
+
return { estimation_map: user_map, updated_queue, user_cost };
|
|
281
|
+
};
|
|
282
|
+
this.parse_cost_stable_coin = (blockchain, user_cost, job, unit_cost, token_price) => {
|
|
283
|
+
// Calculate value in usdt to deduct
|
|
284
|
+
const native_decimals = blockchain === 'evm' ? 18 : 9;
|
|
285
|
+
const unit_cost_decimals = (0, ethers_1.formatUnits)(unit_cost, native_decimals);
|
|
286
|
+
const cost_in_usdt = parseFloat((0, ethers_1.formatUnits)(unit_cost, native_decimals)) * token_price;
|
|
287
|
+
const cost_in_usdt_truncated = cost_in_usdt.toFixed(5);
|
|
288
|
+
const cost_in_usdt_wei = (0, ethers_1.parseUnits)(cost_in_usdt_truncated.toString(), job.decimals);
|
|
289
|
+
if (BigInt(cost_in_usdt_wei) < BigInt(job.amount)) {
|
|
290
|
+
const new_amount = BigInt(job.amount) - BigInt(cost_in_usdt_wei);
|
|
291
|
+
job.amount = new_amount;
|
|
292
|
+
}
|
|
293
|
+
return Object.assign(Object.assign({}, job), { fee_data: Object.assign(Object.assign({}, user_cost), { estimate_in_usdt: cost_in_usdt_wei, estimate_in_usdt_decimals: parseFloat(cost_in_usdt_truncated), estimate_units: unit_cost, estimate_in_decimals: parseFloat(unit_cost_decimals) }) });
|
|
294
|
+
};
|
|
295
|
+
this.calculate_estimate_for_user_deprecated = (blockchain, token_price, user_ids, total_fee, tx_count, queue) => {
|
|
296
|
+
let estimate_in_decimals = 0;
|
|
297
|
+
// Userid to estimation map
|
|
298
|
+
const user_map = new Map();
|
|
299
|
+
for (let user_id of user_ids) {
|
|
300
|
+
// Filter out jobs belonging to this user id
|
|
301
|
+
const user_job_count = queue.filter(j => j.user_id === user_id).length || 1;
|
|
302
|
+
const user_estimate = BigInt(total_fee) * BigInt(user_job_count) / BigInt(tx_count);
|
|
303
|
+
if (blockchain === "evm") {
|
|
304
|
+
estimate_in_decimals = parseFloat((0, ethers_1.formatEther)(user_estimate.toString()));
|
|
305
|
+
}
|
|
306
|
+
else if (blockchain === "solana") {
|
|
307
|
+
estimate_in_decimals = parseFloat((0, ethers_1.formatUnits)(user_estimate, 9));
|
|
308
|
+
}
|
|
309
|
+
else
|
|
310
|
+
throw new Error(this.UnsupportedResource(`Blockchain ${blockchain}`));
|
|
311
|
+
let estimate_in_usdt_decimals = token_price * estimate_in_decimals;
|
|
312
|
+
let estimate_in_usdt_wei = (0, ethers_1.parseUnits)(estimate_in_usdt_decimals.toFixed(5), 6);
|
|
313
|
+
// Discard fee if less than threshold
|
|
314
|
+
if (Number(estimate_in_usdt_decimals) < Number(this.config.serverConfig.minPayableWithdrawalFee)) {
|
|
315
|
+
let estimation = {
|
|
316
|
+
user_job_count,
|
|
317
|
+
estimate_units: BigInt(0),
|
|
318
|
+
estimate_in_decimals: 0,
|
|
319
|
+
estimate_in_usdt: BigInt(0),
|
|
320
|
+
estimate_in_usdt_decimals: 0,
|
|
321
|
+
token_price
|
|
322
|
+
};
|
|
323
|
+
user_map.set(user_id, estimation);
|
|
324
|
+
continue;
|
|
325
|
+
}
|
|
326
|
+
let estimation = {
|
|
327
|
+
user_job_count,
|
|
328
|
+
estimate_units: user_estimate,
|
|
329
|
+
estimate_in_decimals,
|
|
330
|
+
estimate_in_usdt: estimate_in_usdt_wei,
|
|
331
|
+
estimate_in_usdt_decimals: estimate_in_usdt_decimals,
|
|
332
|
+
token_price
|
|
333
|
+
};
|
|
334
|
+
user_map.set(user_id, estimation);
|
|
335
|
+
}
|
|
336
|
+
// Calculate new amounts including the payable fee
|
|
337
|
+
const updated_queue = queue.map(j => {
|
|
338
|
+
const user_cost = user_map.get(j.user_id);
|
|
339
|
+
const native_decimals = blockchain === 'evm' ? 18 : 9;
|
|
340
|
+
// TODO: Handle error
|
|
341
|
+
if (!user_cost)
|
|
342
|
+
throw new Error();
|
|
343
|
+
// Calculate cost on avg in native tokens
|
|
344
|
+
const unit_cost = BigInt(user_cost.estimate_units) / BigInt(user_cost.user_job_count);
|
|
345
|
+
const unit_cost_decimals = (0, ethers_1.formatUnits)(unit_cost, native_decimals);
|
|
346
|
+
// Directly deduct form native amount
|
|
347
|
+
if (j.token === ethers_1.ethers.ZeroAddress) {
|
|
348
|
+
if (unit_cost < BigInt(j.amount)) {
|
|
349
|
+
j.amount = BigInt(j.amount) - unit_cost;
|
|
350
|
+
}
|
|
351
|
+
return Object.assign(Object.assign({}, j), { fee_data: user_cost });
|
|
352
|
+
}
|
|
353
|
+
else {
|
|
354
|
+
// Calculate value in usdt to deduct
|
|
355
|
+
const cost_in_usdt = parseFloat((0, ethers_1.formatUnits)(unit_cost, native_decimals)) * token_price;
|
|
356
|
+
const cost_in_usdt_truncated = cost_in_usdt.toFixed(5);
|
|
357
|
+
const cost_in_usdt_wei = (0, ethers_1.parseUnits)(cost_in_usdt_truncated.toString(), j.decimals);
|
|
358
|
+
if (BigInt(cost_in_usdt_wei) < BigInt(j.amount)) {
|
|
359
|
+
const new_amount = BigInt(j.amount) - BigInt(cost_in_usdt_wei);
|
|
360
|
+
j.amount = new_amount;
|
|
361
|
+
}
|
|
362
|
+
return Object.assign(Object.assign({}, j), { fee_data: Object.assign(Object.assign({}, user_cost), { estimate_in_usdt: cost_in_usdt_wei, estimate_in_usdt_decimals: parseFloat(cost_in_usdt_truncated), estimate_units: unit_cost, estimate_in_decimals: parseFloat(unit_cost_decimals) }) });
|
|
363
|
+
}
|
|
364
|
+
});
|
|
365
|
+
return { estimation_map: user_map, updated_queue };
|
|
366
|
+
};
|
|
367
|
+
this.dbPool = dbPool;
|
|
368
|
+
this.claim_jobs_service = new ClaimJobService_1.default(this.dbPool);
|
|
369
|
+
this.config = config;
|
|
370
|
+
}
|
|
371
|
+
}
|
|
372
|
+
exports.default = WithdrawalManager;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import BaseErrors from '../errors/errors';
|
|
2
|
+
interface RunningProcess {
|
|
3
|
+
pid: number;
|
|
4
|
+
start_timestamp: number;
|
|
5
|
+
start_date: Date;
|
|
6
|
+
}
|
|
7
|
+
declare class Worker extends BaseErrors {
|
|
8
|
+
private cronJob;
|
|
9
|
+
private task;
|
|
10
|
+
private schedule;
|
|
11
|
+
private is_executing;
|
|
12
|
+
private allow_parallel_execution;
|
|
13
|
+
private current_task;
|
|
14
|
+
worker_name: string;
|
|
15
|
+
private logger;
|
|
16
|
+
constructor(schedule: string, allow_parallel_execution: boolean | undefined, task: () => Promise<void>, name?: string);
|
|
17
|
+
start: () => void;
|
|
18
|
+
stop: () => void;
|
|
19
|
+
private handle_process;
|
|
20
|
+
private add_process;
|
|
21
|
+
private remove_process;
|
|
22
|
+
get_processes: () => RunningProcess | null;
|
|
23
|
+
}
|
|
24
|
+
export default Worker;
|
|
25
|
+
//# sourceMappingURL=Worker.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Worker.d.ts","sourceRoot":"","sources":["../../src/services/Worker.ts"],"names":[],"mappings":"AACA,OAAO,UAAU,MAAM,kBAAkB,CAAC;AAG1C,UAAU,cAAc;IACpB,GAAG,EAAE,MAAM,CAAC;IACZ,eAAe,EAAE,MAAM,CAAC;IACxB,UAAU,EAAE,IAAI,CAAC;CACpB;AAED,cAAM,MAAO,SAAQ,UAAU;IAC3B,OAAO,CAAC,OAAO,CAAmC;IAClD,OAAO,CAAC,IAAI,CAAC;IACb,OAAO,CAAC,QAAQ,CAAC;IACjB,OAAO,CAAC,YAAY,CAAkB;IACtC,OAAO,CAAC,wBAAwB,CAAkB;IAClD,OAAO,CAAC,YAAY,CAAwB;IAErC,WAAW,EAAE,MAAM,CAAC;IAC3B,OAAO,CAAC,MAAM,CAAS;gBACX,QAAQ,EAAE,MAAM,EAAE,wBAAwB,EAAE,OAAO,YAAQ,EAAE,IAAI,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,EAAE,IAAI,GAAE,MAAiB;IAWpH,KAAK,aAWX;IAGM,IAAI,aAOV;IAGD,OAAO,CAAC,cAAc,CAoBrB;IAED,OAAO,CAAC,WAAW,CAGlB;IAED,OAAO,CAAC,cAAc,CAErB;IAEM,aAAa,8BAEnB;CAGJ;AAED,eAAe,MAAM,CAAC"}
|
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
35
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
36
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
37
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
38
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
39
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
40
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
41
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
42
|
+
});
|
|
43
|
+
};
|
|
44
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
45
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
46
|
+
};
|
|
47
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
48
|
+
const cron = __importStar(require("node-cron"));
|
|
49
|
+
const errors_1 = __importDefault(require("../errors/errors"));
|
|
50
|
+
const Logger_1 = require("../utils/Logger");
|
|
51
|
+
class Worker extends errors_1.default {
|
|
52
|
+
constructor(schedule, allow_parallel_execution = false, task, name = "worker") {
|
|
53
|
+
super();
|
|
54
|
+
this.cronJob = null;
|
|
55
|
+
this.is_executing = false;
|
|
56
|
+
this.allow_parallel_execution = false;
|
|
57
|
+
// Default scheduled every 10 seconds
|
|
58
|
+
this.start = () => {
|
|
59
|
+
if (!this.schedule)
|
|
60
|
+
throw new Error(`${this.worker_name}: Worker is not initialized`);
|
|
61
|
+
if (this.cronJob) {
|
|
62
|
+
this.logger.info(`${this.worker_name}: Worker already running.`);
|
|
63
|
+
throw new Error(`${this.worker_name}: Worker already running`);
|
|
64
|
+
}
|
|
65
|
+
this.cronJob = cron.schedule(this.schedule, () => __awaiter(this, void 0, void 0, function* () { return yield this.handle_process(); }), { timezone: 'UTC' });
|
|
66
|
+
this.cronJob.start();
|
|
67
|
+
this.logger.info(`${this.worker_name}: Worker schedueler started.`);
|
|
68
|
+
return;
|
|
69
|
+
};
|
|
70
|
+
// Deschedule cron
|
|
71
|
+
this.stop = () => {
|
|
72
|
+
if (this.cronJob) {
|
|
73
|
+
this.cronJob.stop();
|
|
74
|
+
this.cronJob.destroy();
|
|
75
|
+
this.cronJob = null;
|
|
76
|
+
this.logger.info(`${this.worker_name}: Worker cron job stopped`);
|
|
77
|
+
}
|
|
78
|
+
};
|
|
79
|
+
this.handle_process = () => __awaiter(this, void 0, void 0, function* () {
|
|
80
|
+
try {
|
|
81
|
+
if (this.is_executing && !this.allow_parallel_execution) {
|
|
82
|
+
this.logger.info(`${this.worker_name}: Previous worker process still running. Skipping...`);
|
|
83
|
+
return;
|
|
84
|
+
}
|
|
85
|
+
this.is_executing = true;
|
|
86
|
+
this.add_process(process.pid);
|
|
87
|
+
yield this.task();
|
|
88
|
+
}
|
|
89
|
+
catch (error) {
|
|
90
|
+
this.logger.error(`${this.worker_name}: Error during scheduled task:`, { data: { error } });
|
|
91
|
+
}
|
|
92
|
+
finally {
|
|
93
|
+
this.remove_process();
|
|
94
|
+
this.is_executing = false;
|
|
95
|
+
}
|
|
96
|
+
});
|
|
97
|
+
this.add_process = (pid) => {
|
|
98
|
+
const now = new Date();
|
|
99
|
+
this.current_task = { pid, start_timestamp: now.getTime(), start_date: now };
|
|
100
|
+
};
|
|
101
|
+
this.remove_process = () => {
|
|
102
|
+
this.current_task = null;
|
|
103
|
+
};
|
|
104
|
+
this.get_processes = () => {
|
|
105
|
+
return this.current_task;
|
|
106
|
+
};
|
|
107
|
+
this.worker_name = name;
|
|
108
|
+
this.schedule = schedule;
|
|
109
|
+
this.task = task;
|
|
110
|
+
this.allow_parallel_execution = allow_parallel_execution;
|
|
111
|
+
this.current_task = null;
|
|
112
|
+
this.logger = (0, Logger_1.createLogger)(`Worker`, `Worker`);
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
exports.default = Worker;
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
import { Connection, Keypair, PublicKey } from "@solana/web3.js";
|
|
2
|
+
import * as anchor from "@coral-xyz/anchor";
|
|
3
|
+
import { Escrow } from "./types/escrow";
|
|
4
|
+
import { BatchReceiver, SignAllTransactionsInterface, SignTransactionInterface } from "./types/types";
|
|
5
|
+
interface AdditionalConstructorParams {
|
|
6
|
+
signer_keypair?: Keypair;
|
|
7
|
+
localnet: boolean;
|
|
8
|
+
}
|
|
9
|
+
declare class SolanaEscrowAdmin {
|
|
10
|
+
provider: anchor.AnchorProvider;
|
|
11
|
+
program: anchor.Program<Escrow>;
|
|
12
|
+
private adminUtility;
|
|
13
|
+
private signer?;
|
|
14
|
+
connection: Connection;
|
|
15
|
+
constructor(escrowAddress: string, walletPublicKey: PublicKey, signTransaction: SignTransactionInterface, signAllTransactions: SignAllTransactionsInterface, chainId: string, additionalParams?: AdditionalConstructorParams);
|
|
16
|
+
/**
|
|
17
|
+
*
|
|
18
|
+
* @returns anchor.Idl - the escrowprogram's Idl file
|
|
19
|
+
*/
|
|
20
|
+
private get_idl;
|
|
21
|
+
/**
|
|
22
|
+
*
|
|
23
|
+
* @returns User's withdrawal nonce count
|
|
24
|
+
*/
|
|
25
|
+
get_withdraw_nonce: () => Promise<number>;
|
|
26
|
+
/**
|
|
27
|
+
* Checks the state of the program (paused/unpaused)
|
|
28
|
+
* @returns true/false - True for paused, false for unpaused
|
|
29
|
+
*/
|
|
30
|
+
is_paused: () => Promise<boolean>;
|
|
31
|
+
/**
|
|
32
|
+
* Checks if the wallet is an admin
|
|
33
|
+
* @param wallet_address Target wallet to check
|
|
34
|
+
* @returns
|
|
35
|
+
*/
|
|
36
|
+
is_admin: (wallet_address: string) => Promise<boolean>;
|
|
37
|
+
/**
|
|
38
|
+
* Checks if the token is an accepted payment token
|
|
39
|
+
* @param token_address
|
|
40
|
+
* @returns
|
|
41
|
+
*/
|
|
42
|
+
is_payment_token: (token_address: string) => Promise<boolean>;
|
|
43
|
+
get_balances: () => Promise<[string, number][]>;
|
|
44
|
+
/**
|
|
45
|
+
* Gets the payment tokens list
|
|
46
|
+
* @returns string[]
|
|
47
|
+
*/
|
|
48
|
+
get_payment_tokens: () => Promise<string[]>;
|
|
49
|
+
/**
|
|
50
|
+
* Get admins
|
|
51
|
+
* @returns string[]
|
|
52
|
+
*/
|
|
53
|
+
get_admins: () => Promise<string[]>;
|
|
54
|
+
/**
|
|
55
|
+
* Adds a token to the payment token list
|
|
56
|
+
* @param token_address
|
|
57
|
+
* @returns
|
|
58
|
+
*/
|
|
59
|
+
add_payment_token: (token_address: string) => Promise<string>;
|
|
60
|
+
/**
|
|
61
|
+
* Remove a token from the payment token list
|
|
62
|
+
* @param token_address
|
|
63
|
+
* @returns
|
|
64
|
+
*/
|
|
65
|
+
remove_payment_token: (token_address: string) => Promise<string>;
|
|
66
|
+
/**
|
|
67
|
+
* Give the admin role to a wallet
|
|
68
|
+
* @param wallet_address
|
|
69
|
+
* @returns string - transaction signature
|
|
70
|
+
*/
|
|
71
|
+
add_admin: (wallet_address: string) => Promise<string>;
|
|
72
|
+
/**
|
|
73
|
+
* Remove the admin role from a wallet
|
|
74
|
+
* @param wallet_address
|
|
75
|
+
* @returns string - transaction signature
|
|
76
|
+
*/
|
|
77
|
+
remove_admin: (wallet_address: string) => Promise<string>;
|
|
78
|
+
/**
|
|
79
|
+
* Pause/unpause the program state
|
|
80
|
+
* @param target_state
|
|
81
|
+
* @returns string - transaction signature
|
|
82
|
+
*/
|
|
83
|
+
set_pause_state: (target_state: boolean) => Promise<string>;
|
|
84
|
+
withdraw_batch: (token_address: string, receivers: BatchReceiver[]) => Promise<string>;
|
|
85
|
+
/**
|
|
86
|
+
*
|
|
87
|
+
* @param token_address Address of the token to withdraw
|
|
88
|
+
* @param amount_in_decimals amount in human readable decimal format. eg. 0.1SOL
|
|
89
|
+
* @param receiver_address Wallet address of the receiver
|
|
90
|
+
* @returns string - transaction signature
|
|
91
|
+
*/
|
|
92
|
+
withdraw: (token_address: string, amount_in_decimals: number, receiver_address: string) => Promise<string | undefined>;
|
|
93
|
+
/**
|
|
94
|
+
*
|
|
95
|
+
* @param token_address Address of the token to deposit
|
|
96
|
+
* @param amount_in_decimals Amount in human readable decimal format. eg 0.1SOL
|
|
97
|
+
* @returns string - transaction signature
|
|
98
|
+
*/
|
|
99
|
+
deposit: (token_address: string, amount_in_decimals: number) => Promise<string>;
|
|
100
|
+
}
|
|
101
|
+
export default SolanaEscrowAdmin;
|
|
102
|
+
//# sourceMappingURL=SolanaEscrowAdmin.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SolanaEscrowAdmin.d.ts","sourceRoot":"","sources":["../../../../src/services/solana/escrow/SolanaEscrowAdmin.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,OAAO,EAAE,SAAS,EAAqC,MAAM,iBAAiB,CAAC;AAEpG,OAAO,KAAK,MAAM,MAAM,mBAAmB,CAAC;AAE5C,OAAO,EAAE,MAAM,EAAE,MAAM,gBAAgB,CAAC;AAExC,OAAO,EAAE,aAAa,EAAE,4BAA4B,EAAE,wBAAwB,EAAE,MAAM,eAAe,CAAC;AAkBtG,UAAU,2BAA2B;IACjC,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,QAAQ,EAAE,OAAO,CAAC;CACrB;AAED,cAAM,iBAAiB;IACZ,QAAQ,EAAE,MAAM,CAAC,cAAc,CAAC;IAChC,OAAO,EAAE,MAAM,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC;IACvC,OAAO,CAAC,YAAY,CAAqB;IACzC,OAAO,CAAC,MAAM,CAAC,CAAU;IAClB,UAAU,EAAE,UAAU,CAAC;gBAG1B,aAAa,EAAE,MAAM,EACrB,eAAe,EAAE,SAAS,EAC1B,eAAe,EAAE,wBAAwB,EACzC,mBAAmB,EAAE,4BAA4B,EACjD,OAAO,EAAE,MAAM,EACf,gBAAgB,CAAC,EAAE,2BAA2B;IA8BlD;;;OAGG;IACH,OAAO,CAAC,OAAO,CAGb;IAEF;;;OAGG;IACI,kBAAkB,wBAGvB;IAKF;;;OAGG;IACI,SAAS,yBAEf;IAED;;;;OAIG;IACI,QAAQ,GAAU,gBAAgB,MAAM,sBAE9C;IAED;;;;OAIG;IACI,gBAAgB,GAAU,eAAe,MAAM,sBAErD;IAEM,YAAY,oCAElB;IAGD;;;OAGG;IACI,kBAAkB,0BAExB;IAED;;;OAGG;IACI,UAAU,0BAEhB;IAED;;;;OAIG;IACI,iBAAiB,GAAU,eAAe,MAAM,qBAEtD;IAED;;;;OAIG;IACI,oBAAoB,GAAU,eAAe,MAAM,qBAEzD;IAED;;;;OAIG;IACI,SAAS,GAAU,gBAAgB,MAAM,qBAE/C;IAGD;;;;OAIG;IACI,YAAY,GAAU,gBAAgB,MAAM,qBAElD;IAED;;;;OAIG;IACI,eAAe,GAAU,cAAc,OAAO,qBAEpD;IAIM,cAAc,GAAU,eAAe,MAAM,EAAE,WAAW,aAAa,EAAE,qBAE/E;IAGD;;;;;;OAMG;IACI,QAAQ,GAAU,eAAe,MAAM,EAAE,oBAAoB,MAAM,EAAE,kBAAkB,MAAM,iCAEnG;IAED;;;;;OAKG;IACI,OAAO,GAAU,eAAe,MAAM,EAAE,oBAAoB,MAAM,qBAExE;CAKJ;AAED,eAAe,iBAAiB,CAAC"}
|