@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,209 @@
|
|
|
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 idl = __importStar(require("./idl/escrow.json"));
|
|
49
|
+
const web3_js_1 = require("@solana/web3.js");
|
|
50
|
+
const EscrowService = __importStar(require("./services/EscrowService"));
|
|
51
|
+
const anchor = __importStar(require("@coral-xyz/anchor"));
|
|
52
|
+
const EscrowAdminUtility_1 = __importDefault(require("./services/EscrowAdminUtility"));
|
|
53
|
+
const get_connection = (network) => {
|
|
54
|
+
switch (network) {
|
|
55
|
+
case "localnet":
|
|
56
|
+
return new web3_js_1.Connection("http://127.0.0.1:8899", "finalized");
|
|
57
|
+
case "testnet":
|
|
58
|
+
return new web3_js_1.Connection("https://api.testnet.solana.com", "finalized");
|
|
59
|
+
case "devnet":
|
|
60
|
+
return new web3_js_1.Connection("https://api.devnet.solana.com", "finalized");
|
|
61
|
+
case "mainnet":
|
|
62
|
+
return new web3_js_1.Connection("https://api.mainnet-beta.solana.com", "finalized");
|
|
63
|
+
default:
|
|
64
|
+
throw new Error("Unexpected network");
|
|
65
|
+
}
|
|
66
|
+
};
|
|
67
|
+
class SolanaEscrowAdmin {
|
|
68
|
+
constructor(escrowAddress, walletPublicKey, signTransaction, signAllTransactions, chainId, additionalParams) {
|
|
69
|
+
/**
|
|
70
|
+
*
|
|
71
|
+
* @returns anchor.Idl - the escrowprogram's Idl file
|
|
72
|
+
*/
|
|
73
|
+
this.get_idl = () => {
|
|
74
|
+
const target_idl = Object.assign(Object.assign({}, idl), { address: this.program.programId.toBase58() });
|
|
75
|
+
return target_idl;
|
|
76
|
+
};
|
|
77
|
+
/**
|
|
78
|
+
*
|
|
79
|
+
* @returns User's withdrawal nonce count
|
|
80
|
+
*/
|
|
81
|
+
this.get_withdraw_nonce = () => __awaiter(this, void 0, void 0, function* () {
|
|
82
|
+
const nonce = yield EscrowService.getWithdrawNonce(this.program, this.provider.wallet.publicKey, this.provider);
|
|
83
|
+
return Number(nonce.toNumber());
|
|
84
|
+
});
|
|
85
|
+
/**
|
|
86
|
+
* Checks the state of the program (paused/unpaused)
|
|
87
|
+
* @returns true/false - True for paused, false for unpaused
|
|
88
|
+
*/
|
|
89
|
+
this.is_paused = () => __awaiter(this, void 0, void 0, function* () {
|
|
90
|
+
return this.adminUtility.is_paused();
|
|
91
|
+
});
|
|
92
|
+
/**
|
|
93
|
+
* Checks if the wallet is an admin
|
|
94
|
+
* @param wallet_address Target wallet to check
|
|
95
|
+
* @returns
|
|
96
|
+
*/
|
|
97
|
+
this.is_admin = (wallet_address) => __awaiter(this, void 0, void 0, function* () {
|
|
98
|
+
return this.adminUtility.is_admin(wallet_address);
|
|
99
|
+
});
|
|
100
|
+
/**
|
|
101
|
+
* Checks if the token is an accepted payment token
|
|
102
|
+
* @param token_address
|
|
103
|
+
* @returns
|
|
104
|
+
*/
|
|
105
|
+
this.is_payment_token = (token_address) => __awaiter(this, void 0, void 0, function* () {
|
|
106
|
+
return this.adminUtility.is_payment_token(token_address);
|
|
107
|
+
});
|
|
108
|
+
this.get_balances = () => __awaiter(this, void 0, void 0, function* () {
|
|
109
|
+
return this.adminUtility.get_balances();
|
|
110
|
+
});
|
|
111
|
+
/**
|
|
112
|
+
* Gets the payment tokens list
|
|
113
|
+
* @returns string[]
|
|
114
|
+
*/
|
|
115
|
+
this.get_payment_tokens = () => __awaiter(this, void 0, void 0, function* () {
|
|
116
|
+
return this.adminUtility.get_payment_tokens();
|
|
117
|
+
});
|
|
118
|
+
/**
|
|
119
|
+
* Get admins
|
|
120
|
+
* @returns string[]
|
|
121
|
+
*/
|
|
122
|
+
this.get_admins = () => __awaiter(this, void 0, void 0, function* () {
|
|
123
|
+
return this.adminUtility.get_admins();
|
|
124
|
+
});
|
|
125
|
+
/**
|
|
126
|
+
* Adds a token to the payment token list
|
|
127
|
+
* @param token_address
|
|
128
|
+
* @returns
|
|
129
|
+
*/
|
|
130
|
+
this.add_payment_token = (token_address) => __awaiter(this, void 0, void 0, function* () {
|
|
131
|
+
return this.adminUtility.add_payment_token(token_address, this.signer);
|
|
132
|
+
});
|
|
133
|
+
/**
|
|
134
|
+
* Remove a token from the payment token list
|
|
135
|
+
* @param token_address
|
|
136
|
+
* @returns
|
|
137
|
+
*/
|
|
138
|
+
this.remove_payment_token = (token_address) => __awaiter(this, void 0, void 0, function* () {
|
|
139
|
+
return this.adminUtility.remove_payment_token(token_address, this.signer);
|
|
140
|
+
});
|
|
141
|
+
/**
|
|
142
|
+
* Give the admin role to a wallet
|
|
143
|
+
* @param wallet_address
|
|
144
|
+
* @returns string - transaction signature
|
|
145
|
+
*/
|
|
146
|
+
this.add_admin = (wallet_address) => __awaiter(this, void 0, void 0, function* () {
|
|
147
|
+
return this.adminUtility.add_admin(wallet_address, this.signer);
|
|
148
|
+
});
|
|
149
|
+
/**
|
|
150
|
+
* Remove the admin role from a wallet
|
|
151
|
+
* @param wallet_address
|
|
152
|
+
* @returns string - transaction signature
|
|
153
|
+
*/
|
|
154
|
+
this.remove_admin = (wallet_address) => __awaiter(this, void 0, void 0, function* () {
|
|
155
|
+
return this.adminUtility.remove_admin(wallet_address, this.signer);
|
|
156
|
+
});
|
|
157
|
+
/**
|
|
158
|
+
* Pause/unpause the program state
|
|
159
|
+
* @param target_state
|
|
160
|
+
* @returns string - transaction signature
|
|
161
|
+
*/
|
|
162
|
+
this.set_pause_state = (target_state) => __awaiter(this, void 0, void 0, function* () {
|
|
163
|
+
return this.adminUtility.set_pause_state(target_state, this.signer);
|
|
164
|
+
});
|
|
165
|
+
this.withdraw_batch = (token_address, receivers) => __awaiter(this, void 0, void 0, function* () {
|
|
166
|
+
return this.adminUtility.withdraw_batch(token_address, receivers, this.signer);
|
|
167
|
+
});
|
|
168
|
+
/**
|
|
169
|
+
*
|
|
170
|
+
* @param token_address Address of the token to withdraw
|
|
171
|
+
* @param amount_in_decimals amount in human readable decimal format. eg. 0.1SOL
|
|
172
|
+
* @param receiver_address Wallet address of the receiver
|
|
173
|
+
* @returns string - transaction signature
|
|
174
|
+
*/
|
|
175
|
+
this.withdraw = (token_address, amount_in_decimals, receiver_address) => __awaiter(this, void 0, void 0, function* () {
|
|
176
|
+
return this.adminUtility.withdraw(token_address, amount_in_decimals, receiver_address, this.signer);
|
|
177
|
+
});
|
|
178
|
+
/**
|
|
179
|
+
*
|
|
180
|
+
* @param token_address Address of the token to deposit
|
|
181
|
+
* @param amount_in_decimals Amount in human readable decimal format. eg 0.1SOL
|
|
182
|
+
* @returns string - transaction signature
|
|
183
|
+
*/
|
|
184
|
+
this.deposit = (token_address, amount_in_decimals) => __awaiter(this, void 0, void 0, function* () {
|
|
185
|
+
return this.adminUtility.deposit(token_address, amount_in_decimals, this.signer);
|
|
186
|
+
});
|
|
187
|
+
// Use proper network name based on chain id
|
|
188
|
+
const network = chainId === "101" ? "mainnet" : ((additionalParams === null || additionalParams === void 0 ? void 0 : additionalParams.localnet) ? "localnet" : "devnet");
|
|
189
|
+
// Inject address to idl file
|
|
190
|
+
const target_idl = Object.assign(Object.assign({}, idl), { address: escrowAddress });
|
|
191
|
+
// Create connection and provider using the provided wallet and signing methods
|
|
192
|
+
const connection = get_connection(network);
|
|
193
|
+
this.connection = connection;
|
|
194
|
+
// Create anchor provider instance
|
|
195
|
+
const provider = new anchor.AnchorProvider(connection, {
|
|
196
|
+
publicKey: walletPublicKey,
|
|
197
|
+
signTransaction: signTransaction,
|
|
198
|
+
signAllTransactions: signAllTransactions
|
|
199
|
+
});
|
|
200
|
+
// Create anchor Program
|
|
201
|
+
const program = new anchor.Program(target_idl, provider);
|
|
202
|
+
this.program = program;
|
|
203
|
+
this.provider = provider;
|
|
204
|
+
this.adminUtility = EscrowAdminUtility_1.default.createWithCustomProgramId(provider, new web3_js_1.PublicKey(escrowAddress), this.get_idl());
|
|
205
|
+
if (additionalParams === null || additionalParams === void 0 ? void 0 : additionalParams.signer_keypair)
|
|
206
|
+
this.signer = additionalParams.signer_keypair;
|
|
207
|
+
}
|
|
208
|
+
}
|
|
209
|
+
exports.default = SolanaEscrowAdmin;
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import { PublicKey } from "@solana/web3.js";
|
|
2
|
+
import * as anchor from "@coral-xyz/anchor";
|
|
3
|
+
import { Escrow } from "./types";
|
|
4
|
+
import { TransactionStatus } from "../../../contracts/types/escrow";
|
|
5
|
+
import { EncodedWithdrawSignature, SignAllTransactionsInterface, SignTransactionInterface } from "./types/types";
|
|
6
|
+
declare class SolanaEscrowInteraction {
|
|
7
|
+
provider: anchor.AnchorProvider;
|
|
8
|
+
program: anchor.Program<Escrow>;
|
|
9
|
+
private connection;
|
|
10
|
+
constructor(escrowAddress: string, walletPublicKey: PublicKey, signTransaction: SignTransactionInterface, signAllTransactions: SignAllTransactionsInterface, chainId: string);
|
|
11
|
+
/**
|
|
12
|
+
*
|
|
13
|
+
* @returns anchor.Idl - the escrowprogram's Idl file
|
|
14
|
+
*/
|
|
15
|
+
private get_idl;
|
|
16
|
+
/**
|
|
17
|
+
*
|
|
18
|
+
* @returns User's withdrawal nonce count
|
|
19
|
+
*/
|
|
20
|
+
get_withdraw_nonce: () => Promise<number>;
|
|
21
|
+
/**
|
|
22
|
+
* Deposits amount of tokens to the solana escrow program. Supports native and SPL tokens.
|
|
23
|
+
* @param token_address string - Payment token address
|
|
24
|
+
* @param amount_in_decimals number - Amount to deposit in human-readable decimals. eg. 1.5 SOL
|
|
25
|
+
* @returns string - Transaction signature after the tx is confirmed
|
|
26
|
+
*/
|
|
27
|
+
deposit: (token_address: string, amount_in_decimals: number) => Promise<{
|
|
28
|
+
status: TransactionStatus;
|
|
29
|
+
transactionHash: string;
|
|
30
|
+
receipt: null;
|
|
31
|
+
error: null;
|
|
32
|
+
}>;
|
|
33
|
+
/**
|
|
34
|
+
*
|
|
35
|
+
* @param token_address string - Payment token address
|
|
36
|
+
* @param amount_in_decimals number - Amount to deposit in human-readable decimals. e.g 150 USDC
|
|
37
|
+
* @returns string - Transaction signature after the tx is confirmed
|
|
38
|
+
*/
|
|
39
|
+
withdraw: (token_address: string, amount_in_decimals: number, chain_id: 103 | 101, request_id: number, encoded_signature: EncodedWithdrawSignature) => Promise<{
|
|
40
|
+
status: TransactionStatus;
|
|
41
|
+
transactionHash: string;
|
|
42
|
+
receipt: null;
|
|
43
|
+
}>;
|
|
44
|
+
private withdraw_sol;
|
|
45
|
+
private withdraw_spl;
|
|
46
|
+
private deposit_spl;
|
|
47
|
+
private deposit_sol;
|
|
48
|
+
}
|
|
49
|
+
export default SolanaEscrowInteraction;
|
|
50
|
+
//# sourceMappingURL=SolanaEscrowInteraction.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SolanaEscrowInteraction.d.ts","sourceRoot":"","sources":["../../../../src/services/solana/escrow/SolanaEscrowInteraction.ts"],"names":[],"mappings":"AACA,OAAO,EAAmD,SAAS,EAAoD,MAAM,iBAAiB,CAAC;AAG/I,OAAO,KAAK,MAAM,MAAM,mBAAmB,CAAC;AAG5C,OAAO,EAAE,MAAM,EAAE,MAAM,SAAS,CAAC;AACjC,OAAO,EAAE,iBAAiB,EAAE,MAAM,iCAAiC,CAAC;AACpE,OAAO,EAAE,wBAAwB,EAAE,4BAA4B,EAAE,wBAAwB,EAAqB,MAAM,eAAe,CAAC;AAiBpI,cAAM,uBAAuB;IACpB,QAAQ,EAAE,MAAM,CAAC,cAAc,CAAC;IAChC,OAAO,EAAE,MAAM,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC;IAGvC,OAAO,CAAC,UAAU,CAAa;gBAE7B,aAAa,EAAE,MAAM,EACrB,eAAe,EAAE,SAAS,EAC1B,eAAe,EAAE,wBAAwB,EACzC,mBAAmB,EAAE,4BAA4B,EACjD,OAAO,EAAE,MAAM;IAyBjB;;;OAGG;IACH,OAAO,CAAC,OAAO,CAGb;IAEF;;;OAGG;IACI,kBAAkB,wBAGvB;IAEF;;;;;OAKG;IACI,OAAO,GAAU,eAAe,MAAM,EAAE,oBAAoB,MAAM;;;;;OAmBvE;IAEF;;;;;OAKG;IACI,QAAQ,GACb,eAAe,MAAM,EACrB,oBAAoB,MAAM,EAC1B,UAAU,GAAG,GAAG,GAAG,EACnB,YAAY,MAAM,EAClB,mBAAmB,wBAAwB;;;;OA2B3C;IAIF,OAAO,CAAC,YAAY,CAelB;IAIF,OAAO,CAAC,YAAY,CA2BlB;IAIF,OAAO,CAAC,WAAW,CAwBjB;IAIF,OAAO,CAAC,WAAW,CAUjB;CACH;AAED,eAAe,uBAAuB,CAAC"}
|
|
@@ -0,0 +1,235 @@
|
|
|
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 idl = __importStar(require("./idl/escrow.json"));
|
|
49
|
+
const web3_js_1 = require("@solana/web3.js");
|
|
50
|
+
const EscrowUtility_1 = __importDefault(require("./services/EscrowUtility"));
|
|
51
|
+
const EscrowService = __importStar(require("./services/EscrowService"));
|
|
52
|
+
const anchor = __importStar(require("@coral-xyz/anchor"));
|
|
53
|
+
const bs58 = __importStar(require("bs58"));
|
|
54
|
+
const escrow_1 = require("../../../contracts/types/escrow");
|
|
55
|
+
const get_connection = (network) => {
|
|
56
|
+
switch (network) {
|
|
57
|
+
case "localnet":
|
|
58
|
+
return new web3_js_1.Connection("http://127.0.0.1:8899", "finalized");
|
|
59
|
+
case "testnet":
|
|
60
|
+
return new web3_js_1.Connection("https://api.testnet.solana.com", "finalized");
|
|
61
|
+
case "devnet":
|
|
62
|
+
return new web3_js_1.Connection("https://api.devnet.solana.com", "finalized");
|
|
63
|
+
case "mainnet":
|
|
64
|
+
return new web3_js_1.Connection("https://api.mainnet-beta.solana.com", "finalized");
|
|
65
|
+
default:
|
|
66
|
+
throw new Error("Unexpected network");
|
|
67
|
+
}
|
|
68
|
+
};
|
|
69
|
+
class SolanaEscrowInteraction {
|
|
70
|
+
constructor(escrowAddress, walletPublicKey, signTransaction, signAllTransactions, chainId) {
|
|
71
|
+
/**
|
|
72
|
+
*
|
|
73
|
+
* @returns anchor.Idl - the escrowprogram's Idl file
|
|
74
|
+
*/
|
|
75
|
+
this.get_idl = () => {
|
|
76
|
+
const target_idl = Object.assign(Object.assign({}, idl), { address: this.program.programId.toBase58() });
|
|
77
|
+
return target_idl;
|
|
78
|
+
};
|
|
79
|
+
/**
|
|
80
|
+
*
|
|
81
|
+
* @returns User's withdrawal nonce count
|
|
82
|
+
*/
|
|
83
|
+
this.get_withdraw_nonce = () => __awaiter(this, void 0, void 0, function* () {
|
|
84
|
+
const nonce = yield EscrowService.getWithdrawNonce(this.program, this.provider.wallet.publicKey, this.provider);
|
|
85
|
+
return Number(nonce.toNumber());
|
|
86
|
+
});
|
|
87
|
+
/**
|
|
88
|
+
* Deposits amount of tokens to the solana escrow program. Supports native and SPL tokens.
|
|
89
|
+
* @param token_address string - Payment token address
|
|
90
|
+
* @param amount_in_decimals number - Amount to deposit in human-readable decimals. eg. 1.5 SOL
|
|
91
|
+
* @returns string - Transaction signature after the tx is confirmed
|
|
92
|
+
*/
|
|
93
|
+
this.deposit = (token_address, amount_in_decimals) => __awaiter(this, void 0, void 0, function* () {
|
|
94
|
+
// Ensure token addresss is valid
|
|
95
|
+
let token_mint = null;
|
|
96
|
+
try {
|
|
97
|
+
token_mint = new web3_js_1.PublicKey(token_address);
|
|
98
|
+
}
|
|
99
|
+
catch (error) {
|
|
100
|
+
// This erorr shouldnt happen in regular cases
|
|
101
|
+
// If this error happens, it means the payment token address is wrong
|
|
102
|
+
throw new Error("Invalid Solana SPL program address. Please choose another token.");
|
|
103
|
+
}
|
|
104
|
+
// Deposit sol/spl
|
|
105
|
+
switch (token_address) {
|
|
106
|
+
case web3_js_1.SystemProgram.programId.toBase58():
|
|
107
|
+
return this.deposit_sol(amount_in_decimals);
|
|
108
|
+
default:
|
|
109
|
+
if (!token_mint)
|
|
110
|
+
throw new Error("Invalid Solana SPL program address. Please choose another token.");
|
|
111
|
+
return this.deposit_spl(token_mint, amount_in_decimals);
|
|
112
|
+
}
|
|
113
|
+
});
|
|
114
|
+
/**
|
|
115
|
+
*
|
|
116
|
+
* @param token_address string - Payment token address
|
|
117
|
+
* @param amount_in_decimals number - Amount to deposit in human-readable decimals. e.g 150 USDC
|
|
118
|
+
* @returns string - Transaction signature after the tx is confirmed
|
|
119
|
+
*/
|
|
120
|
+
this.withdraw = (token_address, amount_in_decimals, chain_id, request_id, encoded_signature) => __awaiter(this, void 0, void 0, function* () {
|
|
121
|
+
// Validate the token public key
|
|
122
|
+
let token_mint = null;
|
|
123
|
+
try {
|
|
124
|
+
token_mint = new web3_js_1.PublicKey(token_address);
|
|
125
|
+
}
|
|
126
|
+
catch (error) {
|
|
127
|
+
// This erorr shouldnt happen in regular cases
|
|
128
|
+
// If this error happens, it means the payment token address is wrong
|
|
129
|
+
throw new Error("Invalid Solana SPL program address. Please choose another token.");
|
|
130
|
+
}
|
|
131
|
+
// Decode the signature data
|
|
132
|
+
const signature = {
|
|
133
|
+
signature: bs58.decode(encoded_signature.signature),
|
|
134
|
+
message: bs58.decode(encoded_signature.message),
|
|
135
|
+
signer: new web3_js_1.PublicKey(encoded_signature.signer)
|
|
136
|
+
};
|
|
137
|
+
// Handle SOL/SPL
|
|
138
|
+
switch (token_address) {
|
|
139
|
+
case web3_js_1.SystemProgram.programId.toBase58():
|
|
140
|
+
return this.withdraw_sol(amount_in_decimals, chain_id, request_id, signature);
|
|
141
|
+
default:
|
|
142
|
+
if (!token_mint)
|
|
143
|
+
throw new Error("Invalid Solana SPL program address. Please choose another token.");
|
|
144
|
+
return this.withdraw_spl(token_mint, amount_in_decimals, chain_id, request_id, signature);
|
|
145
|
+
}
|
|
146
|
+
});
|
|
147
|
+
/// Internal method
|
|
148
|
+
/// Withdraw SOLANA (native) tokens
|
|
149
|
+
this.withdraw_sol = (amount_in_decimals, chain_id, request_id, signature) => __awaiter(this, void 0, void 0, function* () {
|
|
150
|
+
const escrow_utility = yield EscrowUtility_1.default.createWithCustomProgramId(this.provider, this.program.programId, this.get_idl());
|
|
151
|
+
const tx_sig = yield escrow_utility.withdrawSol(this.provider.wallet.publicKey, amount_in_decimals * web3_js_1.LAMPORTS_PER_SOL, chain_id, request_id, signature);
|
|
152
|
+
return {
|
|
153
|
+
status: escrow_1.TransactionStatus.SUCCESS,
|
|
154
|
+
transactionHash: tx_sig,
|
|
155
|
+
receipt: null
|
|
156
|
+
};
|
|
157
|
+
});
|
|
158
|
+
/// Internal method
|
|
159
|
+
/// Withdraw SPL (USDC) tokens
|
|
160
|
+
this.withdraw_spl = (token_mint, amount_in_decimals, chain_id, request_id, signature) => __awaiter(this, void 0, void 0, function* () {
|
|
161
|
+
const escrow_utility = yield EscrowUtility_1.default.createWithCustomProgramId(this.provider, this.program.programId, this.get_idl());
|
|
162
|
+
// Get token details to get the decimals config
|
|
163
|
+
const token_details = yield this.connection.getParsedAccountInfo(token_mint, "confirmed");
|
|
164
|
+
if (!token_details || !token_details.value || !token_details.value)
|
|
165
|
+
throw new Error("Unexpected token error. Please try another token.");
|
|
166
|
+
// Get decimals from parsed data
|
|
167
|
+
const parsed_data = token_details.value.data;
|
|
168
|
+
const decimals = parsed_data.parsed.info.decimals;
|
|
169
|
+
if (!decimals)
|
|
170
|
+
throw new Error("Unexpected token error. Please try another token.");
|
|
171
|
+
// Calculate amount in lamports
|
|
172
|
+
const amount_in_lamports = amount_in_decimals * Math.pow(10, decimals);
|
|
173
|
+
const tx_sig = yield escrow_utility.withdrawSplToken(token_mint, amount_in_lamports, chain_id, request_id, signature);
|
|
174
|
+
return {
|
|
175
|
+
status: escrow_1.TransactionStatus.SUCCESS,
|
|
176
|
+
transactionHash: tx_sig,
|
|
177
|
+
receipt: null
|
|
178
|
+
};
|
|
179
|
+
});
|
|
180
|
+
/// Internal method
|
|
181
|
+
/// Deposit SPL (USDC, USDT...) tokens
|
|
182
|
+
this.deposit_spl = (token_mint_1, amount_in_decimals_1, ...args_1) => __awaiter(this, [token_mint_1, amount_in_decimals_1, ...args_1], void 0, function* (token_mint, amount_in_decimals, bonus_code = "") {
|
|
183
|
+
// Get token details to get the decimals config
|
|
184
|
+
const token_details = yield this.connection.getParsedAccountInfo(token_mint, "confirmed");
|
|
185
|
+
if (!token_details || !token_details.value || !token_details.value)
|
|
186
|
+
throw new Error("Unexpected token error. Please try another token.");
|
|
187
|
+
// Get decimals from parsed data
|
|
188
|
+
const parsed_data = token_details.value.data;
|
|
189
|
+
const decimals = parsed_data.parsed.info.decimals;
|
|
190
|
+
if (!decimals)
|
|
191
|
+
throw new Error("Unexpected token error. Please try another token.");
|
|
192
|
+
// Calculate amount in lamports
|
|
193
|
+
const amount_in_lamports = amount_in_decimals * Math.pow(10, decimals);
|
|
194
|
+
// Create utility class instance
|
|
195
|
+
const escrow_utility = yield EscrowUtility_1.default.createWithCustomProgramId(this.provider, this.program.programId, this.get_idl());
|
|
196
|
+
const response = yield escrow_utility.depositSplToken(token_mint, amount_in_lamports, bonus_code);
|
|
197
|
+
return {
|
|
198
|
+
status: escrow_1.TransactionStatus.SUCCESS,
|
|
199
|
+
transactionHash: response,
|
|
200
|
+
receipt: null,
|
|
201
|
+
error: null
|
|
202
|
+
};
|
|
203
|
+
});
|
|
204
|
+
/// Internal method
|
|
205
|
+
/// Deposit SOLANA (native) tokens
|
|
206
|
+
this.deposit_sol = (amount_in_decimals_1, ...args_1) => __awaiter(this, [amount_in_decimals_1, ...args_1], void 0, function* (amount_in_decimals, bonus_code = "") {
|
|
207
|
+
const escrow_utility = yield EscrowUtility_1.default.createWithCustomProgramId(this.provider, this.program.programId, this.get_idl());
|
|
208
|
+
const response = yield escrow_utility.depositSol(amount_in_decimals * web3_js_1.LAMPORTS_PER_SOL, bonus_code);
|
|
209
|
+
return {
|
|
210
|
+
status: escrow_1.TransactionStatus.SUCCESS,
|
|
211
|
+
transactionHash: response,
|
|
212
|
+
receipt: null,
|
|
213
|
+
error: null
|
|
214
|
+
};
|
|
215
|
+
});
|
|
216
|
+
// Use proper network name based on chain id
|
|
217
|
+
const network = chainId === "101" ? "mainnet" : "devnet";
|
|
218
|
+
// Inject address to idl file
|
|
219
|
+
const target_idl = Object.assign(Object.assign({}, idl), { address: escrowAddress });
|
|
220
|
+
// Create connection and provider using the provided wallet and signing methods
|
|
221
|
+
const connection = get_connection(network);
|
|
222
|
+
this.connection = connection;
|
|
223
|
+
// Create anchor provider instance
|
|
224
|
+
const provider = new anchor.AnchorProvider(connection, {
|
|
225
|
+
publicKey: walletPublicKey,
|
|
226
|
+
signTransaction: signTransaction,
|
|
227
|
+
signAllTransactions: signAllTransactions
|
|
228
|
+
});
|
|
229
|
+
// Create anchor Program
|
|
230
|
+
const program = new anchor.Program(target_idl, provider);
|
|
231
|
+
this.program = program;
|
|
232
|
+
this.provider = provider;
|
|
233
|
+
}
|
|
234
|
+
}
|
|
235
|
+
exports.default = SolanaEscrowInteraction;
|