@otim/utils 0.0.4 → 0.0.6
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/dist/api/index.d.mts +1858 -7
- package/dist/api/index.d.mts.map +1 -0
- package/dist/api/index.d.ts +1857 -6
- package/dist/api/index.d.ts.map +1 -1
- package/dist/api/index.js +1514 -1994
- package/dist/api/index.js.map +1 -7
- package/dist/api/index.mjs +1394 -1962
- package/dist/api/index.mjs.map +1 -7
- package/dist/api-urls-B-GTEiT3.d.mts +49 -0
- package/dist/api-urls-B-GTEiT3.d.mts.map +1 -0
- package/dist/api-urls-Cd20DG4i.js +171 -0
- package/dist/api-urls-Cd20DG4i.js.map +1 -0
- package/dist/api-urls-DJcIKBCy.mjs +135 -0
- package/dist/api-urls-DJcIKBCy.mjs.map +1 -0
- package/dist/api-urls-SKeIQMoZ.d.ts +49 -0
- package/dist/api-urls-SKeIQMoZ.d.ts.map +1 -0
- package/dist/chains/index.d.mts +13568 -16
- package/dist/chains/index.d.mts.map +1 -0
- package/dist/chains/index.d.ts +13567 -15
- package/dist/chains/index.d.ts.map +1 -1
- package/dist/chains/index.js +3615 -424
- package/dist/chains/index.js.map +1 -7
- package/dist/chains/index.mjs +3561 -440
- package/dist/chains/index.mjs.map +1 -7
- package/dist/chunk-kSYXY2_d.js +34 -0
- package/dist/client-factory-7xUSPC9I.mjs +42 -0
- package/dist/client-factory-7xUSPC9I.mjs.map +1 -0
- package/dist/client-factory-C3A4RPdj.d.ts +22 -0
- package/dist/client-factory-C3A4RPdj.d.ts.map +1 -0
- package/dist/client-factory-CTI_Nt35.js +49 -0
- package/dist/client-factory-CTI_Nt35.js.map +1 -0
- package/dist/client-factory-DOL0ZTWy.d.mts +22 -0
- package/dist/client-factory-DOL0ZTWy.d.mts.map +1 -0
- package/dist/constants.d.mts +14 -24
- package/dist/constants.d.mts.map +1 -0
- package/dist/constants.d.ts +13 -23
- package/dist/constants.d.ts.map +1 -1
- package/dist/constants.js +31 -46
- package/dist/constants.js.map +1 -7
- package/dist/constants.mjs +22 -26
- package/dist/constants.mjs.map +1 -7
- package/dist/date-CFzrYcjE.js +536 -0
- package/dist/date-CFzrYcjE.js.map +1 -0
- package/dist/date-gBac-Om9.mjs +313 -0
- package/dist/date-gBac-Om9.mjs.map +1 -0
- package/dist/defineProperty-DbMdhrDE.js +49 -0
- package/dist/defineProperty-DzhmunJg.mjs +43 -0
- package/dist/formatters/index.d.mts +1 -2
- package/dist/formatters/index.d.ts +1 -2
- package/dist/formatters/index.js +0 -19
- package/dist/formatters/index.mjs +1 -1
- package/dist/helpers/index.d.mts +562 -19
- package/dist/helpers/index.d.mts.map +1 -0
- package/dist/helpers/index.d.ts +561 -18
- package/dist/helpers/index.d.ts.map +1 -1
- package/dist/helpers/index.js +106 -1344
- package/dist/helpers/index.mjs +3 -1315
- package/dist/helpers-BNiSxjGq.mjs +895 -0
- package/dist/helpers-BNiSxjGq.mjs.map +1 -0
- package/dist/helpers-DoC7Xl12.js +1291 -0
- package/dist/helpers-DoC7Xl12.js.map +1 -0
- package/dist/index-Bv0kUz4w.d.ts +540 -0
- package/dist/index-Bv0kUz4w.d.ts.map +1 -0
- package/dist/index-DartTKk2.d.mts +540 -0
- package/dist/index-DartTKk2.d.mts.map +1 -0
- package/dist/index.d.mts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +0 -2
- package/dist/index.mjs +1 -1
- package/dist/instructions/index.d.mts +687 -6
- package/dist/instructions/index.d.mts.map +1 -0
- package/dist/instructions/index.d.ts +686 -5
- package/dist/instructions/index.d.ts.map +1 -1
- package/dist/instructions/index.js +1912 -1091
- package/dist/instructions/index.js.map +1 -7
- package/dist/instructions/index.mjs +1887 -1058
- package/dist/instructions/index.mjs.map +1 -7
- package/dist/payments/index.d.mts +322 -16
- package/dist/payments/index.d.mts.map +1 -0
- package/dist/payments/index.d.ts +321 -15
- package/dist/payments/index.d.ts.map +1 -1
- package/dist/payments/index.js +616 -1258
- package/dist/payments/index.js.map +1 -7
- package/dist/payments/index.mjs +594 -1236
- package/dist/payments/index.mjs.map +1 -7
- package/dist/schemas/index.d.mts +2 -10
- package/dist/schemas/index.d.ts +2 -10
- package/dist/schemas/index.js +350 -393
- package/dist/schemas/index.js.map +1 -7
- package/dist/schemas/index.mjs +283 -371
- package/dist/schemas/index.mjs.map +1 -7
- package/dist/server/index.d.mts +354 -3
- package/dist/server/index.d.mts.map +1 -0
- package/dist/server/index.d.ts +353 -2
- package/dist/server/index.d.ts.map +1 -1
- package/dist/server/index.js +248 -435
- package/dist/server/index.js.map +1 -7
- package/dist/server/index.mjs +199 -404
- package/dist/server/index.mjs.map +1 -7
- package/dist/server/react.d.mts +16 -0
- package/dist/server/react.d.mts.map +1 -0
- package/dist/server/react.d.ts +16 -0
- package/dist/server/react.d.ts.map +1 -0
- package/dist/server/react.js +30 -0
- package/dist/server/react.js.map +1 -0
- package/dist/server/react.mjs +28 -0
- package/dist/server/react.mjs.map +1 -0
- package/dist/wallet/wagmi/index.d.mts +23 -2
- package/dist/wallet/wagmi/index.d.mts.map +1 -0
- package/dist/wallet/wagmi/index.d.ts +22 -1
- package/dist/wallet/wagmi/index.d.ts.map +1 -1
- package/dist/wallet/wagmi/index.js +86 -417
- package/dist/wallet/wagmi/index.js.map +1 -7
- package/dist/wallet/wagmi/index.mjs +82 -418
- package/dist/wallet/wagmi/index.mjs.map +1 -7
- package/package.json +39 -28
- package/dist/api/api.d.mts +0 -18
- package/dist/api/api.d.ts +0 -18
- package/dist/api/api.d.ts.map +0 -1
- package/dist/api/core/error.d.mts +0 -74
- package/dist/api/core/error.d.ts +0 -74
- package/dist/api/core/error.d.ts.map +0 -1
- package/dist/api/core/index.d.mts +0 -4
- package/dist/api/core/index.d.ts +0 -4
- package/dist/api/core/index.d.ts.map +0 -1
- package/dist/api/core/instance.d.mts +0 -13
- package/dist/api/core/instance.d.ts +0 -13
- package/dist/api/core/instance.d.ts.map +0 -1
- package/dist/api/core/service.d.mts +0 -51
- package/dist/api/core/service.d.ts +0 -51
- package/dist/api/core/service.d.ts.map +0 -1
- package/dist/api/schemas/account.d.mts +0 -44
- package/dist/api/schemas/account.d.ts +0 -44
- package/dist/api/schemas/account.d.ts.map +0 -1
- package/dist/api/schemas/activity.d.mts +0 -277
- package/dist/api/schemas/activity.d.ts +0 -277
- package/dist/api/schemas/activity.d.ts.map +0 -1
- package/dist/api/schemas/auth.d.mts +0 -127
- package/dist/api/schemas/auth.d.ts +0 -127
- package/dist/api/schemas/auth.d.ts.map +0 -1
- package/dist/api/schemas/chain.d.mts +0 -15
- package/dist/api/schemas/chain.d.ts +0 -15
- package/dist/api/schemas/chain.d.ts.map +0 -1
- package/dist/api/schemas/config.d.mts +0 -33
- package/dist/api/schemas/config.d.ts +0 -33
- package/dist/api/schemas/config.d.ts.map +0 -1
- package/dist/api/schemas/contacts.d.mts +0 -27
- package/dist/api/schemas/contacts.d.ts +0 -27
- package/dist/api/schemas/contacts.d.ts.map +0 -1
- package/dist/api/schemas/index.d.mts +0 -12
- package/dist/api/schemas/index.d.ts +0 -12
- package/dist/api/schemas/index.d.ts.map +0 -1
- package/dist/api/schemas/instruction.d.mts +0 -446
- package/dist/api/schemas/instruction.d.ts +0 -446
- package/dist/api/schemas/instruction.d.ts.map +0 -1
- package/dist/api/schemas/integration.d.mts +0 -166
- package/dist/api/schemas/integration.d.ts +0 -166
- package/dist/api/schemas/integration.d.ts.map +0 -1
- package/dist/api/schemas/operating-account.d.mts +0 -11
- package/dist/api/schemas/operating-account.d.ts +0 -11
- package/dist/api/schemas/operating-account.d.ts.map +0 -1
- package/dist/api/schemas/payments.d.mts +0 -234
- package/dist/api/schemas/payments.d.ts +0 -234
- package/dist/api/schemas/payments.d.ts.map +0 -1
- package/dist/api/schemas/transaction.d.mts +0 -37
- package/dist/api/schemas/transaction.d.ts +0 -37
- package/dist/api/schemas/transaction.d.ts.map +0 -1
- package/dist/api/services/account.d.mts +0 -8
- package/dist/api/services/account.d.ts +0 -8
- package/dist/api/services/account.d.ts.map +0 -1
- package/dist/api/services/activity.d.mts +0 -7
- package/dist/api/services/activity.d.ts +0 -7
- package/dist/api/services/activity.d.ts.map +0 -1
- package/dist/api/services/auth.d.mts +0 -12
- package/dist/api/services/auth.d.ts +0 -12
- package/dist/api/services/auth.d.ts.map +0 -1
- package/dist/api/services/base.d.mts +0 -10
- package/dist/api/services/base.d.ts +0 -10
- package/dist/api/services/base.d.ts.map +0 -1
- package/dist/api/services/config.d.mts +0 -10
- package/dist/api/services/config.d.ts +0 -10
- package/dist/api/services/config.d.ts.map +0 -1
- package/dist/api/services/contacts.d.mts +0 -8
- package/dist/api/services/contacts.d.ts +0 -8
- package/dist/api/services/contacts.d.ts.map +0 -1
- package/dist/api/services/developer.d.mts +0 -6
- package/dist/api/services/developer.d.ts +0 -6
- package/dist/api/services/developer.d.ts.map +0 -1
- package/dist/api/services/index.d.mts +0 -13
- package/dist/api/services/index.d.ts +0 -13
- package/dist/api/services/index.d.ts.map +0 -1
- package/dist/api/services/instruction.d.mts +0 -12
- package/dist/api/services/instruction.d.ts +0 -12
- package/dist/api/services/instruction.d.ts.map +0 -1
- package/dist/api/services/integration.d.mts +0 -8
- package/dist/api/services/integration.d.ts +0 -8
- package/dist/api/services/integration.d.ts.map +0 -1
- package/dist/api/services/operating-account.d.mts +0 -8
- package/dist/api/services/operating-account.d.ts +0 -8
- package/dist/api/services/operating-account.d.ts.map +0 -1
- package/dist/api/services/payments.d.mts +0 -14
- package/dist/api/services/payments.d.ts +0 -14
- package/dist/api/services/payments.d.ts.map +0 -1
- package/dist/api/services/transaction.d.mts +0 -8
- package/dist/api/services/transaction.d.ts +0 -8
- package/dist/api/services/transaction.d.ts.map +0 -1
- package/dist/api/services/uniswap-token-list-service.d.mts +0 -66
- package/dist/api/services/uniswap-token-list-service.d.ts +0 -66
- package/dist/api/services/uniswap-token-list-service.d.ts.map +0 -1
- package/dist/api/utils/index.d.mts +0 -2
- package/dist/api/utils/index.d.ts +0 -2
- package/dist/api/utils/index.d.ts.map +0 -1
- package/dist/api/utils/pagination.d.mts +0 -32
- package/dist/api/utils/pagination.d.ts +0 -32
- package/dist/api/utils/pagination.d.ts.map +0 -1
- package/dist/chains/config/all-chains.d.mts +0 -4243
- package/dist/chains/config/all-chains.d.ts +0 -4243
- package/dist/chains/config/all-chains.d.ts.map +0 -1
- package/dist/chains/config/custom-chains.d.mts +0 -49
- package/dist/chains/config/custom-chains.d.ts +0 -49
- package/dist/chains/config/custom-chains.d.ts.map +0 -1
- package/dist/chains/config/mainnet-chains.d.mts +0 -1063
- package/dist/chains/config/mainnet-chains.d.ts +0 -1063
- package/dist/chains/config/mainnet-chains.d.ts.map +0 -1
- package/dist/chains/config/supported-chains.d.mts +0 -2172
- package/dist/chains/config/supported-chains.d.ts +0 -2172
- package/dist/chains/config/supported-chains.d.ts.map +0 -1
- package/dist/chains/config/testnet-chains.d.mts +0 -1110
- package/dist/chains/config/testnet-chains.d.ts +0 -1110
- package/dist/chains/config/testnet-chains.d.ts.map +0 -1
- package/dist/chains/lambda/chain-mapping.d.mts +0 -55
- package/dist/chains/lambda/chain-mapping.d.ts +0 -55
- package/dist/chains/lambda/chain-mapping.d.ts.map +0 -1
- package/dist/chains/lambda/index.d.mts +0 -2
- package/dist/chains/lambda/index.d.ts +0 -2
- package/dist/chains/lambda/index.d.ts.map +0 -1
- package/dist/chains/tokens/chain-tokens.d.mts +0 -6
- package/dist/chains/tokens/chain-tokens.d.ts +0 -6
- package/dist/chains/tokens/chain-tokens.d.ts.map +0 -1
- package/dist/chains/tokens/token-addresses.d.mts +0 -8
- package/dist/chains/tokens/token-addresses.d.ts +0 -8
- package/dist/chains/tokens/token-addresses.d.ts.map +0 -1
- package/dist/chains/tokens/token-metadata.d.mts +0 -5
- package/dist/chains/tokens/token-metadata.d.ts +0 -5
- package/dist/chains/tokens/token-metadata.d.ts.map +0 -1
- package/dist/chains/types.d.mts +0 -23
- package/dist/chains/types.d.ts +0 -23
- package/dist/chains/types.d.ts.map +0 -1
- package/dist/chains/utils/filter-tokens.d.mts +0 -3
- package/dist/chains/utils/filter-tokens.d.ts +0 -3
- package/dist/chains/utils/filter-tokens.d.ts.map +0 -1
- package/dist/chains/utils/stablecoin.d.mts +0 -7
- package/dist/chains/utils/stablecoin.d.ts +0 -7
- package/dist/chains/utils/stablecoin.d.ts.map +0 -1
- package/dist/chains/utils/token-maps.d.mts +0 -10
- package/dist/chains/utils/token-maps.d.ts +0 -10
- package/dist/chains/utils/token-maps.d.ts.map +0 -1
- package/dist/env.d.mts +0 -17
- package/dist/env.d.ts +0 -17
- package/dist/env.d.ts.map +0 -1
- package/dist/formatters/index.d.ts.map +0 -1
- package/dist/formatters/index.js.map +0 -7
- package/dist/formatters/index.mjs.map +0 -7
- package/dist/helpers/address.d.mts +0 -7
- package/dist/helpers/address.d.ts +0 -7
- package/dist/helpers/address.d.ts.map +0 -1
- package/dist/helpers/blockchain.d.mts +0 -41
- package/dist/helpers/blockchain.d.ts +0 -41
- package/dist/helpers/blockchain.d.ts.map +0 -1
- package/dist/helpers/date.d.mts +0 -70
- package/dist/helpers/date.d.ts +0 -70
- package/dist/helpers/date.d.ts.map +0 -1
- package/dist/helpers/datetime.d.mts +0 -57
- package/dist/helpers/datetime.d.ts +0 -57
- package/dist/helpers/datetime.d.ts.map +0 -1
- package/dist/helpers/domain.d.mts +0 -2
- package/dist/helpers/domain.d.ts +0 -2
- package/dist/helpers/domain.d.ts.map +0 -1
- package/dist/helpers/index.js.map +0 -7
- package/dist/helpers/index.mjs.map +0 -7
- package/dist/helpers/intl.d.mts +0 -20
- package/dist/helpers/intl.d.ts +0 -20
- package/dist/helpers/intl.d.ts.map +0 -1
- package/dist/helpers/logger.d.mts +0 -26
- package/dist/helpers/logger.d.ts +0 -26
- package/dist/helpers/logger.d.ts.map +0 -1
- package/dist/helpers/mask-options.d.mts +0 -10
- package/dist/helpers/mask-options.d.ts +0 -10
- package/dist/helpers/mask-options.d.ts.map +0 -1
- package/dist/helpers/num-formatter.d.mts +0 -3
- package/dist/helpers/num-formatter.d.ts +0 -3
- package/dist/helpers/num-formatter.d.ts.map +0 -1
- package/dist/helpers/polling.d.mts +0 -39
- package/dist/helpers/polling.d.ts +0 -39
- package/dist/helpers/polling.d.ts.map +0 -1
- package/dist/helpers/random.d.mts +0 -10
- package/dist/helpers/random.d.ts +0 -10
- package/dist/helpers/random.d.ts.map +0 -1
- package/dist/helpers/sdk-loader.d.mts +0 -25
- package/dist/helpers/sdk-loader.d.ts +0 -25
- package/dist/helpers/sdk-loader.d.ts.map +0 -1
- package/dist/helpers/signatures.d.mts +0 -17
- package/dist/helpers/signatures.d.ts +0 -17
- package/dist/helpers/signatures.d.ts.map +0 -1
- package/dist/helpers/string.d.mts +0 -17
- package/dist/helpers/string.d.ts +0 -17
- package/dist/helpers/string.d.ts.map +0 -1
- package/dist/helpers/types.d.mts +0 -39
- package/dist/helpers/types.d.ts +0 -39
- package/dist/helpers/types.d.ts.map +0 -1
- package/dist/helpers/url.d.mts +0 -11
- package/dist/helpers/url.d.ts +0 -11
- package/dist/helpers/url.d.ts.map +0 -1
- package/dist/helpers/window.d.mts +0 -37
- package/dist/helpers/window.d.ts +0 -37
- package/dist/helpers/window.d.ts.map +0 -1
- package/dist/helpers/zod.d.mts +0 -51
- package/dist/helpers/zod.d.ts +0 -51
- package/dist/helpers/zod.d.ts.map +0 -1
- package/dist/index.d.ts.map +0 -1
- package/dist/index.js.map +0 -7
- package/dist/index.mjs.map +0 -7
- package/dist/instructions/actions/index.d.mts +0 -5
- package/dist/instructions/actions/index.d.ts +0 -5
- package/dist/instructions/actions/index.d.ts.map +0 -1
- package/dist/instructions/actions/refuel/index.d.mts +0 -15
- package/dist/instructions/actions/refuel/index.d.ts +0 -15
- package/dist/instructions/actions/refuel/index.d.ts.map +0 -1
- package/dist/instructions/actions/swap/index.d.mts +0 -19
- package/dist/instructions/actions/swap/index.d.ts +0 -19
- package/dist/instructions/actions/swap/index.d.ts.map +0 -1
- package/dist/instructions/actions/sweep/index.d.mts +0 -16
- package/dist/instructions/actions/sweep/index.d.ts +0 -16
- package/dist/instructions/actions/sweep/index.d.ts.map +0 -1
- package/dist/instructions/actions/transfer/index.d.mts +0 -13
- package/dist/instructions/actions/transfer/index.d.ts +0 -13
- package/dist/instructions/actions/transfer/index.d.ts.map +0 -1
- package/dist/instructions/activate.d.mts +0 -84
- package/dist/instructions/activate.d.ts +0 -84
- package/dist/instructions/activate.d.ts.map +0 -1
- package/dist/instructions/build.d.mts +0 -146
- package/dist/instructions/build.d.ts +0 -146
- package/dist/instructions/build.d.ts.map +0 -1
- package/dist/instructions/constants.d.mts +0 -9
- package/dist/instructions/constants.d.ts +0 -9
- package/dist/instructions/constants.d.ts.map +0 -1
- package/dist/instructions/contracts/artifacts/abi/build-instruction-action-arguments-abi.d.mts +0 -609
- package/dist/instructions/contracts/artifacts/abi/build-instruction-action-arguments-abi.d.ts +0 -609
- package/dist/instructions/contracts/artifacts/abi/build-instruction-action-arguments-abi.d.ts.map +0 -1
- package/dist/instructions/types.d.mts +0 -289
- package/dist/instructions/types.d.ts +0 -289
- package/dist/instructions/types.d.ts.map +0 -1
- package/dist/payments/action-names.d.mts +0 -16
- package/dist/payments/action-names.d.ts +0 -16
- package/dist/payments/action-names.d.ts.map +0 -1
- package/dist/payments/actions/index.d.mts +0 -5
- package/dist/payments/actions/index.d.ts +0 -5
- package/dist/payments/actions/index.d.ts.map +0 -1
- package/dist/payments/actions/sweep-cctp.d.mts +0 -15
- package/dist/payments/actions/sweep-cctp.d.ts +0 -15
- package/dist/payments/actions/sweep-cctp.d.ts.map +0 -1
- package/dist/payments/actions/sweep-erc20.d.mts +0 -12
- package/dist/payments/actions/sweep-erc20.d.ts +0 -12
- package/dist/payments/actions/sweep-erc20.d.ts.map +0 -1
- package/dist/payments/actions/sweep-uniswap-v3.d.mts +0 -17
- package/dist/payments/actions/sweep-uniswap-v3.d.ts +0 -17
- package/dist/payments/actions/sweep-uniswap-v3.d.ts.map +0 -1
- package/dist/payments/actions/sweep.d.mts +0 -12
- package/dist/payments/actions/sweep.d.ts +0 -12
- package/dist/payments/actions/sweep.d.ts.map +0 -1
- package/dist/payments/build.d.mts +0 -28
- package/dist/payments/build.d.ts +0 -28
- package/dist/payments/build.d.ts.map +0 -1
- package/dist/payments/chain-token-config-builder.d.mts +0 -10
- package/dist/payments/chain-token-config-builder.d.ts +0 -10
- package/dist/payments/chain-token-config-builder.d.ts.map +0 -1
- package/dist/payments/comprehensive-payment-request.d.mts +0 -26
- package/dist/payments/comprehensive-payment-request.d.ts +0 -26
- package/dist/payments/comprehensive-payment-request.d.ts.map +0 -1
- package/dist/payments/config/cctp.d.mts +0 -14
- package/dist/payments/config/cctp.d.ts +0 -14
- package/dist/payments/config/cctp.d.ts.map +0 -1
- package/dist/payments/config/index.d.mts +0 -3
- package/dist/payments/config/index.d.ts +0 -3
- package/dist/payments/config/index.d.ts.map +0 -1
- package/dist/payments/config/tokens.d.mts +0 -14
- package/dist/payments/config/tokens.d.ts +0 -14
- package/dist/payments/config/tokens.d.ts.map +0 -1
- package/dist/payments/instruction-registry.d.mts +0 -19
- package/dist/payments/instruction-registry.d.ts +0 -19
- package/dist/payments/instruction-registry.d.ts.map +0 -1
- package/dist/payments/payment-metadata-builder.d.mts +0 -56
- package/dist/payments/payment-metadata-builder.d.ts +0 -56
- package/dist/payments/payment-metadata-builder.d.ts.map +0 -1
- package/dist/payments/payment-metadata.d.mts +0 -15
- package/dist/payments/payment-metadata.d.ts +0 -15
- package/dist/payments/payment-metadata.d.ts.map +0 -1
- package/dist/payments/payment-request-token-resolver.d.mts +0 -25
- package/dist/payments/payment-request-token-resolver.d.ts +0 -25
- package/dist/payments/payment-request-token-resolver.d.ts.map +0 -1
- package/dist/payments/types.d.mts +0 -40
- package/dist/payments/types.d.ts +0 -40
- package/dist/payments/types.d.ts.map +0 -1
- package/dist/payments/validation.d.mts +0 -19
- package/dist/payments/validation.d.ts +0 -19
- package/dist/payments/validation.d.ts.map +0 -1
- package/dist/schemas/account.d.mts +0 -9
- package/dist/schemas/account.d.ts +0 -9
- package/dist/schemas/account.d.ts.map +0 -1
- package/dist/schemas/brand.d.mts +0 -7
- package/dist/schemas/brand.d.ts +0 -7
- package/dist/schemas/brand.d.ts.map +0 -1
- package/dist/schemas/contact.d.mts +0 -18
- package/dist/schemas/contact.d.ts +0 -18
- package/dist/schemas/contact.d.ts.map +0 -1
- package/dist/schemas/index.d.ts.map +0 -1
- package/dist/schemas/instruction.d.mts +0 -248
- package/dist/schemas/instruction.d.ts +0 -248
- package/dist/schemas/instruction.d.ts.map +0 -1
- package/dist/schemas/misc.d.mts +0 -36
- package/dist/schemas/misc.d.ts +0 -36
- package/dist/schemas/misc.d.ts.map +0 -1
- package/dist/schemas/payment.d.mts +0 -64
- package/dist/schemas/payment.d.ts +0 -64
- package/dist/schemas/payment.d.ts.map +0 -1
- package/dist/schemas/token.d.mts +0 -17
- package/dist/schemas/token.d.ts +0 -17
- package/dist/schemas/token.d.ts.map +0 -1
- package/dist/schemas/transaction.d.mts +0 -65
- package/dist/schemas/transaction.d.ts +0 -65
- package/dist/schemas/transaction.d.ts.map +0 -1
- package/dist/schemas/user.d.mts +0 -24
- package/dist/schemas/user.d.ts +0 -24
- package/dist/schemas/user.d.ts.map +0 -1
- package/dist/server/client.d.mts +0 -3
- package/dist/server/client.d.ts +0 -3
- package/dist/server/client.d.ts.map +0 -1
- package/dist/server/routes/account.d.mts +0 -4
- package/dist/server/routes/account.d.ts +0 -4
- package/dist/server/routes/account.d.ts.map +0 -1
- package/dist/server/routes/auth.d.mts +0 -28
- package/dist/server/routes/auth.d.ts +0 -28
- package/dist/server/routes/auth.d.ts.map +0 -1
- package/dist/server/routes/bridge.d.mts +0 -254
- package/dist/server/routes/bridge.d.ts +0 -254
- package/dist/server/routes/bridge.d.ts.map +0 -1
- package/dist/server/routes/config.d.mts +0 -3
- package/dist/server/routes/config.d.ts +0 -3
- package/dist/server/routes/config.d.ts.map +0 -1
- package/dist/server/routes/index.d.mts +0 -8
- package/dist/server/routes/index.d.ts +0 -8
- package/dist/server/routes/index.d.ts.map +0 -1
- package/dist/server/routes/instruction.d.mts +0 -4
- package/dist/server/routes/instruction.d.ts +0 -4
- package/dist/server/routes/instruction.d.ts.map +0 -1
- package/dist/server/routes/integration.d.mts +0 -4
- package/dist/server/routes/integration.d.ts +0 -4
- package/dist/server/routes/integration.d.ts.map +0 -1
- package/dist/server/routes/payments.d.mts +0 -5
- package/dist/server/routes/payments.d.ts +0 -5
- package/dist/server/routes/payments.d.ts.map +0 -1
- package/dist/server/routes/verify.d.mts +0 -3
- package/dist/server/routes/verify.d.ts +0 -3
- package/dist/server/routes/verify.d.ts.map +0 -1
- package/dist/wallet/wagmi/config.d.mts +0 -18
- package/dist/wallet/wagmi/config.d.ts +0 -18
- package/dist/wallet/wagmi/config.d.ts.map +0 -1
package/dist/schemas/index.js
CHANGED
|
@@ -1,433 +1,390 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
-
var __export = (target, all) => {
|
|
7
|
-
for (var name in all)
|
|
8
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
-
};
|
|
10
|
-
var __copyProps = (to, from, except, desc) => {
|
|
11
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
-
for (let key of __getOwnPropNames(from))
|
|
13
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
-
}
|
|
16
|
-
return to;
|
|
17
|
-
};
|
|
18
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
-
|
|
20
|
-
// src/schemas/index.ts
|
|
21
|
-
var schemas_exports = {};
|
|
22
|
-
__export(schemas_exports, {
|
|
23
|
-
AccountType: () => AccountType,
|
|
24
|
-
ContactSchema: () => ContactSchema,
|
|
25
|
-
ContactsSchema: () => ContactsSchema,
|
|
26
|
-
DATE_ISO_8601_REGEX: () => DATE_ISO_8601_REGEX,
|
|
27
|
-
DATE_REGEX: () => DATE_REGEX,
|
|
28
|
-
DATE_STANDARD_REGEX: () => DATE_STANDARD_REGEX,
|
|
29
|
-
InstructionAction: () => InstructionAction,
|
|
30
|
-
InstructionScheduleRepeatType: () => InstructionScheduleRepeatType,
|
|
31
|
-
InstructionScheduleRetryType: () => InstructionScheduleRetryType,
|
|
32
|
-
InstructionScheduleStartType: () => InstructionScheduleStartType,
|
|
33
|
-
InstructionState: () => InstructionState,
|
|
34
|
-
InstructionViewTimescale: () => InstructionViewTimescale,
|
|
35
|
-
PaymentSource: () => PaymentSource,
|
|
36
|
-
PaymentStatus: () => PaymentStatus,
|
|
37
|
-
PaymentsSchema: () => PaymentsSchema,
|
|
38
|
-
Sort: () => Sort,
|
|
39
|
-
TIME_REGEX: () => TIME_REGEX,
|
|
40
|
-
TimeUnit: () => TimeUnit,
|
|
41
|
-
Token: () => Token,
|
|
42
|
-
TokenValues: () => TokenValues,
|
|
43
|
-
addressSchema: () => addressSchema,
|
|
44
|
-
assertInstructionAction: () => assertInstructionAction,
|
|
45
|
-
assertToken: () => assertToken,
|
|
46
|
-
assertsOptionalToken: () => assertsOptionalToken,
|
|
47
|
-
bigintSchema: () => bigintSchema,
|
|
48
|
-
dateISO8601Schema: () => dateISO8601Schema,
|
|
49
|
-
dateSchema: () => dateSchema,
|
|
50
|
-
dateStandardSchema: () => dateStandardSchema,
|
|
51
|
-
decimalStringSchema: () => decimalStringSchema,
|
|
52
|
-
eip2098SignatureSchema: () => eip2098SignatureSchema,
|
|
53
|
-
entityIdSchema: () => entityIdSchema,
|
|
54
|
-
hexStringSchema: () => hexStringSchema,
|
|
55
|
-
instructionActionSchema: () => instructionActionSchema,
|
|
56
|
-
instructionActionValues: () => instructionActionValues,
|
|
57
|
-
instructionExecutionStateSchema: () => instructionExecutionStateSchema,
|
|
58
|
-
instructionIdSchema: () => instructionIdSchema,
|
|
59
|
-
instructionScheduleRepeatSchema: () => instructionScheduleRepeatSchema,
|
|
60
|
-
instructionScheduleRepeatValues: () => instructionScheduleRepeatValues,
|
|
61
|
-
instructionScheduleRetrySchema: () => instructionScheduleRetrySchema,
|
|
62
|
-
instructionScheduleRetryValues: () => instructionScheduleRetryValues,
|
|
63
|
-
instructionScheduleStartSchema: () => instructionScheduleStartSchema,
|
|
64
|
-
instructionScheduleStartValues: () => instructionScheduleStartValues,
|
|
65
|
-
instructionSchema: () => instructionSchema,
|
|
66
|
-
instructionStateSchema: () => instructionStateSchema,
|
|
67
|
-
instructionStateValues: () => instructionStateValues,
|
|
68
|
-
instructionSummariesByDateSchema: () => instructionSummariesByDateSchema,
|
|
69
|
-
instructionSummariesSchema: () => instructionSummariesSchema,
|
|
70
|
-
instructionSummarySchema: () => instructionSummarySchema,
|
|
71
|
-
instructionViewTimescaleValues: () => instructionViewTimescaleValues,
|
|
72
|
-
instructionsSchema: () => instructionsSchema,
|
|
73
|
-
nonEmptyStringSchema: () => nonEmptyStringSchema,
|
|
74
|
-
numberSchema: () => numberSchema,
|
|
75
|
-
paymentRequestSourceValues: () => paymentRequestSourceValues,
|
|
76
|
-
paymentSchema: () => paymentSchema,
|
|
77
|
-
regexSchema: () => regexSchema,
|
|
78
|
-
sortValues: () => sortValues,
|
|
79
|
-
timeSchema: () => timeSchema,
|
|
80
|
-
timeUnitSchema: () => timeUnitSchema,
|
|
81
|
-
timeUnitValues: () => timeUnitValues,
|
|
82
|
-
tokenSchema: () => tokenSchema,
|
|
83
|
-
transactionSchema: () => transactionSchema,
|
|
84
|
-
transactionWithValidAmountSchema: () => transactionWithValidAmountSchema,
|
|
85
|
-
transactionsSchema: () => transactionsSchema,
|
|
86
|
-
userPreferencesSchema: () => userPreferencesSchema,
|
|
87
|
-
userSchema: () => userSchema,
|
|
88
|
-
vrsSchema: () => vrsSchema
|
|
89
|
-
});
|
|
90
|
-
module.exports = __toCommonJS(schemas_exports);
|
|
1
|
+
const require_chunk = require('../chunk-kSYXY2_d.js');
|
|
2
|
+
let zod = require("zod");
|
|
91
3
|
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
4
|
+
//#region src/schemas/account.ts
|
|
5
|
+
const AccountType = {
|
|
6
|
+
Otim: "otim",
|
|
7
|
+
Bank: "bank",
|
|
8
|
+
Ephemeral: "ephemeral",
|
|
9
|
+
Custodian: "custodian",
|
|
10
|
+
Wallet: "wallet"
|
|
11
|
+
};
|
|
12
|
+
const AccountConnectionStatus = {
|
|
13
|
+
Connected: "connected",
|
|
14
|
+
Disconnected: "disconnected",
|
|
15
|
+
Connecting: "connecting",
|
|
16
|
+
Reconnecting: "reconnecting"
|
|
99
17
|
};
|
|
100
18
|
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
19
|
+
//#endregion
|
|
20
|
+
//#region src/schemas/contact.ts
|
|
21
|
+
const ContactSchema = zod.z.object({
|
|
22
|
+
userId: zod.z.string(),
|
|
23
|
+
name: zod.z.string(),
|
|
24
|
+
address: zod.z.string(),
|
|
25
|
+
createdAt: zod.z.string(),
|
|
26
|
+
updatedAt: zod.z.string()
|
|
109
27
|
});
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
// src/schemas/instruction.ts
|
|
113
|
-
var import_zod3 = require("zod");
|
|
28
|
+
const ContactsSchema = zod.z.array(ContactSchema);
|
|
114
29
|
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
var dateSchema = regexSchema(DATE_REGEX);
|
|
136
|
-
var dateISO8601Schema = regexSchema(DATE_ISO_8601_REGEX);
|
|
137
|
-
var dateStandardSchema = regexSchema(DATE_STANDARD_REGEX);
|
|
138
|
-
var timeSchema = regexSchema(TIME_REGEX);
|
|
139
|
-
var Sort = {
|
|
140
|
-
Asc: "asc",
|
|
141
|
-
Desc: "desc"
|
|
30
|
+
//#endregion
|
|
31
|
+
//#region src/schemas/misc.ts
|
|
32
|
+
const DATE_REGEX = /^(19|20)\d{2}-(0[1-9]|1[0-2])-(0[1-9]|[12]\d|3[01])$/;
|
|
33
|
+
const DATE_ISO_8601_REGEX = /^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(?:\.\d+)?(?:Z|[+-]\d{2}:\d{2})?$/;
|
|
34
|
+
const DATE_STANDARD_REGEX = /^(0[1-9]|1[0-2])\/(0[1-9]|[12][0-9]|3[01])\/(19|20)\d{2}$/;
|
|
35
|
+
const TIME_REGEX = /^(0[1-9]|1[0-2]):[0-5][0-9]:[0-5][0-9] (AM|PM)$/;
|
|
36
|
+
const regexSchema = (regex, message) => zod.z.string().regex(regex, message);
|
|
37
|
+
const nonEmptyStringSchema = zod.z.string().min(1);
|
|
38
|
+
const numberSchema = zod.z.union([zod.z.number().finite(), zod.z.string().regex(/^-?\d*\.?\d+(?:[eE][-+]?\d+)?$/).transform(Number)]);
|
|
39
|
+
const decimalStringSchema = zod.z.string().regex(/^-?\d*\.?\d+$/).refine((val) => !isNaN(parseFloat(val)), { message: "Must be a valid decimal number" });
|
|
40
|
+
const bigintSchema = zod.z.union([zod.z.bigint(), zod.z.string().regex(/^-?\d+$/).transform(BigInt)]);
|
|
41
|
+
const hexStringSchema = zod.z.string().startsWith("0x").transform((val) => val);
|
|
42
|
+
const chainIdSchema = zod.z.number().positive();
|
|
43
|
+
const dateSchema = regexSchema(DATE_REGEX);
|
|
44
|
+
const dateISO8601Schema = regexSchema(DATE_ISO_8601_REGEX);
|
|
45
|
+
const dateStandardSchema = regexSchema(DATE_STANDARD_REGEX);
|
|
46
|
+
const timeSchema = regexSchema(TIME_REGEX);
|
|
47
|
+
const Sort = {
|
|
48
|
+
Asc: "asc",
|
|
49
|
+
Desc: "desc"
|
|
142
50
|
};
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
51
|
+
const sortValues = Object.values(Sort);
|
|
52
|
+
const vrsSchema = zod.z.object({
|
|
53
|
+
v: zod.z.number(),
|
|
54
|
+
r: zod.z.string(),
|
|
55
|
+
s: zod.z.string()
|
|
148
56
|
});
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
57
|
+
const eip2098SignatureSchema = zod.z.object({
|
|
58
|
+
yParity: zod.z.number(),
|
|
59
|
+
r: zod.z.string(),
|
|
60
|
+
s: zod.z.string()
|
|
153
61
|
});
|
|
154
62
|
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
63
|
+
//#endregion
|
|
64
|
+
//#region src/schemas/instruction.ts
|
|
65
|
+
const instructionIdSchema = hexStringSchema;
|
|
66
|
+
const InstructionState = {
|
|
67
|
+
PendingActivation: "PendingActivation",
|
|
68
|
+
Active: "Active",
|
|
69
|
+
PendingDeactivation: "PendingDeactivation",
|
|
70
|
+
Deactivated: "Deactivated",
|
|
71
|
+
Errored: "Errored",
|
|
72
|
+
Completed: "Completed",
|
|
73
|
+
UserNotDelegated: "UserNotDelegated",
|
|
74
|
+
InFlight: "InFlight",
|
|
75
|
+
NotifyUser: "NotifyUser"
|
|
167
76
|
};
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
77
|
+
const instructionStateValues = Object.values(InstructionState);
|
|
78
|
+
const instructionStateSchema = zod.z.enum(instructionStateValues);
|
|
79
|
+
const InstructionAction = {
|
|
80
|
+
Refuel: "Refuel",
|
|
81
|
+
RefuelERC20: "RefuelERC20",
|
|
82
|
+
Transfer: "Transfer",
|
|
83
|
+
TransferERC20: "TransferERC20",
|
|
84
|
+
TransferCCTP: "TransferCCTP",
|
|
85
|
+
UniswapV3ExactInput: "UniswapV3ExactInput",
|
|
86
|
+
Sweep: "Sweep",
|
|
87
|
+
SweepERC20: "SweepERC20",
|
|
88
|
+
SweepCCTP: "SweepCCTP",
|
|
89
|
+
SweepUniswapV3: "SweepUniswapV3",
|
|
90
|
+
DeactivateInstruction: "DeactivateInstruction",
|
|
91
|
+
SweepSkipCCTPDepositAccount: "SweepSkipCCTPDepositAccount",
|
|
92
|
+
DepositERC4626: "DepositERC4626",
|
|
93
|
+
SweepDepositERC4626: "SweepDepositERC4626",
|
|
94
|
+
WithdrawERC4626: "WithdrawERC4626",
|
|
95
|
+
SweepWithdrawERC4626: "SweepWithdrawERC4626",
|
|
96
|
+
SweepDepositAccount: "SweepDepositAccount",
|
|
97
|
+
SweepDepositAccountERC20: "SweepDepositAccountERC20",
|
|
98
|
+
CallOnce: "CallOnce"
|
|
184
99
|
};
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
100
|
+
const instructionActionValues = Object.values(InstructionAction);
|
|
101
|
+
const instructionActionSchema = zod.z.enum(instructionActionValues);
|
|
102
|
+
const InstructionScheduleStartType = {
|
|
103
|
+
Now: "now",
|
|
104
|
+
DateTime: "datetime"
|
|
190
105
|
};
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
);
|
|
194
|
-
|
|
195
|
-
|
|
106
|
+
const instructionScheduleStartValues = Object.values(InstructionScheduleStartType);
|
|
107
|
+
const baseStartSchema = zod.z.object({ type: zod.z.enum(instructionScheduleStartValues) });
|
|
108
|
+
const nowStartSchema = baseStartSchema.extend({ type: zod.z.literal(InstructionScheduleStartType.Now) });
|
|
109
|
+
const dateTimeStartSchema = baseStartSchema.extend({
|
|
110
|
+
type: zod.z.literal(InstructionScheduleStartType.DateTime),
|
|
111
|
+
startDate: dateStandardSchema,
|
|
112
|
+
startTime: zod.z.string()
|
|
196
113
|
});
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
type: import_zod3.z.literal(InstructionScheduleStartType.DateTime),
|
|
202
|
-
startDate: dateStandardSchema,
|
|
203
|
-
startTime: import_zod3.z.string()
|
|
204
|
-
});
|
|
205
|
-
var instructionScheduleStartSchema = import_zod3.z.discriminatedUnion("type", [
|
|
206
|
-
nowStartSchema,
|
|
207
|
-
dateTimeStartSchema
|
|
208
|
-
]);
|
|
209
|
-
var InstructionScheduleRepeatType = {
|
|
210
|
-
UntilDeactivated: "until-deactivated",
|
|
211
|
-
MaxExecutions: "max-executions"
|
|
114
|
+
const instructionScheduleStartSchema = zod.z.discriminatedUnion("type", [nowStartSchema, dateTimeStartSchema]);
|
|
115
|
+
const InstructionScheduleRepeatType = {
|
|
116
|
+
UntilDeactivated: "until-deactivated",
|
|
117
|
+
MaxExecutions: "max-executions"
|
|
212
118
|
};
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
);
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
});
|
|
220
|
-
var maxExecutionsRepeatSchema = baseRepeatSchema.extend({
|
|
221
|
-
type: import_zod3.z.literal(InstructionScheduleRepeatType.MaxExecutions),
|
|
222
|
-
maxExecutions: numberSchema
|
|
119
|
+
const instructionScheduleRepeatValues = Object.values(InstructionScheduleRepeatType);
|
|
120
|
+
const baseRepeatSchema = zod.z.object({});
|
|
121
|
+
const untilDeactivatedRepeatSchema = baseRepeatSchema.extend({ type: zod.z.literal(InstructionScheduleRepeatType.UntilDeactivated) });
|
|
122
|
+
const maxExecutionsRepeatSchema = baseRepeatSchema.extend({
|
|
123
|
+
type: zod.z.literal(InstructionScheduleRepeatType.MaxExecutions),
|
|
124
|
+
maxExecutions: numberSchema
|
|
223
125
|
});
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
var InstructionScheduleRetryType = {
|
|
229
|
-
UntilDeactivated: "until-deactivated",
|
|
230
|
-
TimeLimited: "time-limited"
|
|
126
|
+
const instructionScheduleRepeatSchema = zod.z.discriminatedUnion("type", [untilDeactivatedRepeatSchema, maxExecutionsRepeatSchema]);
|
|
127
|
+
const InstructionScheduleRetryType = {
|
|
128
|
+
UntilDeactivated: "until-deactivated",
|
|
129
|
+
TimeLimited: "time-limited"
|
|
231
130
|
};
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
);
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
131
|
+
const instructionScheduleRetryValues = Object.values(InstructionScheduleRetryType);
|
|
132
|
+
const baseRetrySchema = zod.z.object({});
|
|
133
|
+
const untilDeactivatedRetrySchema = baseRetrySchema.extend({ type: zod.z.literal(InstructionScheduleRetryType.UntilDeactivated) });
|
|
134
|
+
const timeLimitedRetrySchema = baseRetrySchema.extend({
|
|
135
|
+
type: zod.z.literal(InstructionScheduleRetryType.TimeLimited),
|
|
136
|
+
retryCount: numberSchema
|
|
238
137
|
});
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
None: "none",
|
|
249
|
-
Second: "second",
|
|
250
|
-
Minute: "minute",
|
|
251
|
-
Hour: "hour",
|
|
252
|
-
Day: "day",
|
|
253
|
-
Week: "week",
|
|
254
|
-
Month: "month"
|
|
138
|
+
const instructionScheduleRetrySchema = zod.z.discriminatedUnion("type", [untilDeactivatedRetrySchema, timeLimitedRetrySchema]);
|
|
139
|
+
const TimeUnit = {
|
|
140
|
+
None: "none",
|
|
141
|
+
Second: "second",
|
|
142
|
+
Minute: "minute",
|
|
143
|
+
Hour: "hour",
|
|
144
|
+
Day: "day",
|
|
145
|
+
Week: "week",
|
|
146
|
+
Month: "month"
|
|
255
147
|
};
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
148
|
+
const timeUnitValues = Object.values(TimeUnit);
|
|
149
|
+
const timeUnitSchema = zod.z.enum(timeUnitValues);
|
|
150
|
+
const instructionExecutionStateRawSchema = zod.z.object({
|
|
151
|
+
execution_status: instructionStateSchema.optional(),
|
|
152
|
+
execution_counter: zod.z.number().int().optional(),
|
|
153
|
+
last_executed: zod.z.number().int().optional()
|
|
262
154
|
});
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
155
|
+
const instructionExecutionStateSchema = instructionExecutionStateRawSchema.transform((data) => ({
|
|
156
|
+
executionStatus: data.execution_status,
|
|
157
|
+
executionCounter: data.execution_counter,
|
|
158
|
+
lastExecuted: data.last_executed
|
|
159
|
+
}));
|
|
160
|
+
const instructionSchema = zod.z.object({
|
|
161
|
+
instructionId: hexStringSchema,
|
|
162
|
+
createdAt: zod.z.number().optional(),
|
|
163
|
+
startAt: zod.z.string().nullish(),
|
|
164
|
+
interval: zod.z.number().nullish(),
|
|
165
|
+
timeout: zod.z.number().nullish(),
|
|
166
|
+
maxExecutions: zod.z.number().nullish(),
|
|
167
|
+
executionState: instructionExecutionStateSchema,
|
|
168
|
+
actionName: zod.z.string().optional(),
|
|
169
|
+
arguments: zod.z.any(),
|
|
170
|
+
nickname: zod.z.string().nullish(),
|
|
171
|
+
lastInstructedValue: zod.z.string().optional(),
|
|
172
|
+
lastErrorCode: zod.z.number().nullish(),
|
|
173
|
+
lastErrorMessage: zod.z.string().nullish(),
|
|
174
|
+
totalInstructedValue: zod.z.string().optional(),
|
|
175
|
+
instructedTokenAddress: hexStringSchema.nullish(),
|
|
176
|
+
chainId: zod.z.number().nullish(),
|
|
177
|
+
chain: zod.z.string().optional()
|
|
281
178
|
});
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
179
|
+
const instructionsSchema = zod.z.array(instructionSchema);
|
|
180
|
+
const instructionSummarySchema = zod.z.object({
|
|
181
|
+
instructionId: hexStringSchema,
|
|
182
|
+
chainId: zod.z.number().int(),
|
|
183
|
+
executionCount: zod.z.number().int(),
|
|
184
|
+
onTimeCount: zod.z.number().int(),
|
|
185
|
+
lateCount: zod.z.number().int(),
|
|
186
|
+
wasActivatedDuring: zod.z.boolean(),
|
|
187
|
+
amount: zod.z.number().default(0),
|
|
188
|
+
instructedValue: zod.z.string().nullish().default("0"),
|
|
189
|
+
instructedTokenAddress: zod.z.string().nullish().default(null)
|
|
293
190
|
});
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
Hours: "hours",
|
|
302
|
-
Minutes: "minutes",
|
|
303
|
-
Seconds: "seconds"
|
|
191
|
+
const instructionSummariesSchema = zod.z.array(instructionSummarySchema);
|
|
192
|
+
const instructionSummariesByDateSchema = zod.z.record(zod.z.string(), instructionSummariesSchema);
|
|
193
|
+
const InstructionViewTimescale = {
|
|
194
|
+
Days: "days",
|
|
195
|
+
Hours: "hours",
|
|
196
|
+
Minutes: "minutes",
|
|
197
|
+
Seconds: "seconds"
|
|
304
198
|
};
|
|
305
|
-
|
|
306
|
-
InstructionViewTimescale
|
|
307
|
-
);
|
|
199
|
+
const instructionViewTimescaleValues = Object.values(InstructionViewTimescale);
|
|
308
200
|
function assertInstructionAction(action) {
|
|
309
|
-
|
|
310
|
-
throw new Error(`Invalid instruction action: ${action}`);
|
|
311
|
-
}
|
|
201
|
+
if (!instructionActionValues.includes(action)) throw new Error(`Invalid instruction action: ${action}`);
|
|
312
202
|
}
|
|
313
203
|
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
204
|
+
//#endregion
|
|
205
|
+
//#region src/schemas/payment.ts
|
|
206
|
+
const PaymentStatus = {
|
|
207
|
+
Due: "due",
|
|
208
|
+
NotDue: "not-due",
|
|
209
|
+
Paid: "paid"
|
|
320
210
|
};
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
211
|
+
const PaymentSource = {
|
|
212
|
+
Bill: "Bill",
|
|
213
|
+
Stripe: "Stripe",
|
|
214
|
+
Clio: "Clio",
|
|
215
|
+
QuickBooks: "QuickBooks"
|
|
326
216
|
};
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
217
|
+
const paymentRequestSourceValues = [
|
|
218
|
+
PaymentSource.Bill,
|
|
219
|
+
PaymentSource.Stripe,
|
|
220
|
+
PaymentSource.Clio,
|
|
221
|
+
PaymentSource.QuickBooks
|
|
332
222
|
];
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
fromAccountAddress: import_zod4.z.string().nullable().optional()
|
|
223
|
+
const paymentSchema = zod.z.object({
|
|
224
|
+
id: zod.z.string(),
|
|
225
|
+
fromUserId: zod.z.string().nullable().optional(),
|
|
226
|
+
toUserId: zod.z.string().nullable().optional(),
|
|
227
|
+
payerAddress: zod.z.string().nullable().optional(),
|
|
228
|
+
ephemeralWalletAddress: zod.z.string(),
|
|
229
|
+
ephemeralWalletId: zod.z.string().optional(),
|
|
230
|
+
instructions: zod.z.object({
|
|
231
|
+
ids: zod.z.array(zod.z.string()),
|
|
232
|
+
completionIds: zod.z.array(zod.z.string())
|
|
233
|
+
}).optional(),
|
|
234
|
+
metadata: zod.z.record(zod.z.string(), zod.z.unknown()).optional(),
|
|
235
|
+
status: zod.z.union([
|
|
236
|
+
zod.z.literal(PaymentStatus.Due),
|
|
237
|
+
zod.z.literal(PaymentStatus.NotDue),
|
|
238
|
+
zod.z.literal(PaymentStatus.Paid)
|
|
239
|
+
]),
|
|
240
|
+
dueDate: zod.z.string(),
|
|
241
|
+
amountDue: zod.z.number(),
|
|
242
|
+
note: zod.z.string().nullable().optional(),
|
|
243
|
+
address: zod.z.string().nullable().optional(),
|
|
244
|
+
addedOn: zod.z.string(),
|
|
245
|
+
source: zod.z.union([
|
|
246
|
+
zod.z.literal(PaymentSource.Bill),
|
|
247
|
+
zod.z.literal(PaymentSource.Stripe),
|
|
248
|
+
zod.z.literal(PaymentSource.Clio),
|
|
249
|
+
zod.z.literal(PaymentSource.QuickBooks)
|
|
250
|
+
]).nullish(),
|
|
251
|
+
attachmentUrl: zod.z.string().url().nullable().optional(),
|
|
252
|
+
attachmentName: zod.z.string().nullable().optional(),
|
|
253
|
+
fromAccountAddress: zod.z.string().nullable().optional()
|
|
365
254
|
});
|
|
366
|
-
|
|
255
|
+
const PaymentsSchema = zod.z.array(paymentSchema);
|
|
367
256
|
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
257
|
+
//#endregion
|
|
258
|
+
//#region src/schemas/token.ts
|
|
259
|
+
const Token = {
|
|
260
|
+
ETH: "ETH",
|
|
261
|
+
USDC: "USDC",
|
|
262
|
+
USDT: "USDT"
|
|
374
263
|
};
|
|
375
|
-
|
|
376
|
-
|
|
264
|
+
const TokenValues = Object.values(Token);
|
|
265
|
+
const tokenSchema = zod.z.enum(TokenValues);
|
|
377
266
|
function assertToken(token) {
|
|
378
|
-
|
|
379
|
-
throw new Error(`Invalid token: ${token}`);
|
|
380
|
-
}
|
|
267
|
+
if (!TokenValues.includes(token)) throw new Error(`Invalid token: ${token}`);
|
|
381
268
|
}
|
|
382
269
|
function assertsOptionalToken(token) {
|
|
383
|
-
|
|
384
|
-
assertToken(token);
|
|
385
|
-
}
|
|
270
|
+
if (token !== void 0) assertToken(token);
|
|
386
271
|
}
|
|
387
272
|
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
value: import_zod6.z.number(),
|
|
410
|
-
token: import_zod6.z.string()
|
|
411
|
-
})
|
|
273
|
+
//#endregion
|
|
274
|
+
//#region src/schemas/transaction.ts
|
|
275
|
+
const transactionSchema = zod.z.object({
|
|
276
|
+
instructionId: instructionIdSchema,
|
|
277
|
+
transactionHash: hexStringSchema.optional(),
|
|
278
|
+
blockHash: zod.z.string().nullable(),
|
|
279
|
+
transactionStatus: zod.z.string(),
|
|
280
|
+
error: zod.z.string().nullish(),
|
|
281
|
+
startedAt: zod.z.string(),
|
|
282
|
+
startedAtBlock: zod.z.number(),
|
|
283
|
+
finishedAt: zod.z.string().nullable(),
|
|
284
|
+
finishedAtBlock: zod.z.number().nullable(),
|
|
285
|
+
amount: zod.z.object({
|
|
286
|
+
value: zod.z.number(),
|
|
287
|
+
token: zod.z.string()
|
|
288
|
+
}).nullish(),
|
|
289
|
+
instructedValue: zod.z.string(),
|
|
290
|
+
instructedTokenAddress: zod.z.string().nullable(),
|
|
291
|
+
executionNum: zod.z.number(),
|
|
292
|
+
chainId: zod.z.number().nullish(),
|
|
293
|
+
chain: zod.z.string().optional()
|
|
412
294
|
});
|
|
413
|
-
|
|
295
|
+
const transactionWithValidAmountSchema = transactionSchema.extend({ amount: zod.z.object({
|
|
296
|
+
value: zod.z.number(),
|
|
297
|
+
token: zod.z.string()
|
|
298
|
+
}) });
|
|
299
|
+
const transactionsSchema = zod.z.array(transactionSchema);
|
|
414
300
|
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
301
|
+
//#endregion
|
|
302
|
+
//#region src/schemas/user.ts
|
|
303
|
+
const entityIdSchema = zod.z.string().uuid();
|
|
304
|
+
const addressSchema = zod.z.string().regex(/^0x[a-fA-F0-9]{40}$/).transform((v) => v.toLowerCase());
|
|
305
|
+
const userPreferencesSchema = zod.z.object({
|
|
306
|
+
chainId: zod.z.number().optional(),
|
|
307
|
+
tokenSymbol: zod.z.string().optional(),
|
|
308
|
+
localCurrency: zod.z.string().optional()
|
|
423
309
|
});
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
310
|
+
const userSchema = zod.z.object({
|
|
311
|
+
id: entityIdSchema,
|
|
312
|
+
address: addressSchema,
|
|
313
|
+
email: zod.z.string().email().nullable().optional(),
|
|
314
|
+
createdAt: zod.z.string(),
|
|
315
|
+
updatedAt: zod.z.string(),
|
|
316
|
+
preferences: userPreferencesSchema.optional(),
|
|
317
|
+
isDeveloper: zod.z.boolean(),
|
|
318
|
+
developerPublicKey: zod.z.string().nullable().optional()
|
|
432
319
|
});
|
|
433
|
-
|
|
320
|
+
|
|
321
|
+
//#endregion
|
|
322
|
+
exports.AccountConnectionStatus = AccountConnectionStatus;
|
|
323
|
+
exports.AccountType = AccountType;
|
|
324
|
+
exports.ContactSchema = ContactSchema;
|
|
325
|
+
exports.ContactsSchema = ContactsSchema;
|
|
326
|
+
exports.DATE_ISO_8601_REGEX = DATE_ISO_8601_REGEX;
|
|
327
|
+
exports.DATE_REGEX = DATE_REGEX;
|
|
328
|
+
exports.DATE_STANDARD_REGEX = DATE_STANDARD_REGEX;
|
|
329
|
+
exports.InstructionAction = InstructionAction;
|
|
330
|
+
exports.InstructionScheduleRepeatType = InstructionScheduleRepeatType;
|
|
331
|
+
exports.InstructionScheduleRetryType = InstructionScheduleRetryType;
|
|
332
|
+
exports.InstructionScheduleStartType = InstructionScheduleStartType;
|
|
333
|
+
exports.InstructionState = InstructionState;
|
|
334
|
+
exports.InstructionViewTimescale = InstructionViewTimescale;
|
|
335
|
+
exports.PaymentSource = PaymentSource;
|
|
336
|
+
exports.PaymentStatus = PaymentStatus;
|
|
337
|
+
exports.PaymentsSchema = PaymentsSchema;
|
|
338
|
+
exports.Sort = Sort;
|
|
339
|
+
exports.TIME_REGEX = TIME_REGEX;
|
|
340
|
+
exports.TimeUnit = TimeUnit;
|
|
341
|
+
exports.Token = Token;
|
|
342
|
+
exports.TokenValues = TokenValues;
|
|
343
|
+
exports.addressSchema = addressSchema;
|
|
344
|
+
exports.assertInstructionAction = assertInstructionAction;
|
|
345
|
+
exports.assertToken = assertToken;
|
|
346
|
+
exports.assertsOptionalToken = assertsOptionalToken;
|
|
347
|
+
exports.bigintSchema = bigintSchema;
|
|
348
|
+
exports.chainIdSchema = chainIdSchema;
|
|
349
|
+
exports.dateISO8601Schema = dateISO8601Schema;
|
|
350
|
+
exports.dateSchema = dateSchema;
|
|
351
|
+
exports.dateStandardSchema = dateStandardSchema;
|
|
352
|
+
exports.decimalStringSchema = decimalStringSchema;
|
|
353
|
+
exports.eip2098SignatureSchema = eip2098SignatureSchema;
|
|
354
|
+
exports.entityIdSchema = entityIdSchema;
|
|
355
|
+
exports.hexStringSchema = hexStringSchema;
|
|
356
|
+
exports.instructionActionSchema = instructionActionSchema;
|
|
357
|
+
exports.instructionActionValues = instructionActionValues;
|
|
358
|
+
exports.instructionExecutionStateSchema = instructionExecutionStateSchema;
|
|
359
|
+
exports.instructionIdSchema = instructionIdSchema;
|
|
360
|
+
exports.instructionScheduleRepeatSchema = instructionScheduleRepeatSchema;
|
|
361
|
+
exports.instructionScheduleRepeatValues = instructionScheduleRepeatValues;
|
|
362
|
+
exports.instructionScheduleRetrySchema = instructionScheduleRetrySchema;
|
|
363
|
+
exports.instructionScheduleRetryValues = instructionScheduleRetryValues;
|
|
364
|
+
exports.instructionScheduleStartSchema = instructionScheduleStartSchema;
|
|
365
|
+
exports.instructionScheduleStartValues = instructionScheduleStartValues;
|
|
366
|
+
exports.instructionSchema = instructionSchema;
|
|
367
|
+
exports.instructionStateSchema = instructionStateSchema;
|
|
368
|
+
exports.instructionStateValues = instructionStateValues;
|
|
369
|
+
exports.instructionSummariesByDateSchema = instructionSummariesByDateSchema;
|
|
370
|
+
exports.instructionSummariesSchema = instructionSummariesSchema;
|
|
371
|
+
exports.instructionSummarySchema = instructionSummarySchema;
|
|
372
|
+
exports.instructionViewTimescaleValues = instructionViewTimescaleValues;
|
|
373
|
+
exports.instructionsSchema = instructionsSchema;
|
|
374
|
+
exports.nonEmptyStringSchema = nonEmptyStringSchema;
|
|
375
|
+
exports.numberSchema = numberSchema;
|
|
376
|
+
exports.paymentRequestSourceValues = paymentRequestSourceValues;
|
|
377
|
+
exports.paymentSchema = paymentSchema;
|
|
378
|
+
exports.regexSchema = regexSchema;
|
|
379
|
+
exports.sortValues = sortValues;
|
|
380
|
+
exports.timeSchema = timeSchema;
|
|
381
|
+
exports.timeUnitSchema = timeUnitSchema;
|
|
382
|
+
exports.timeUnitValues = timeUnitValues;
|
|
383
|
+
exports.tokenSchema = tokenSchema;
|
|
384
|
+
exports.transactionSchema = transactionSchema;
|
|
385
|
+
exports.transactionWithValidAmountSchema = transactionWithValidAmountSchema;
|
|
386
|
+
exports.transactionsSchema = transactionsSchema;
|
|
387
|
+
exports.userPreferencesSchema = userPreferencesSchema;
|
|
388
|
+
exports.userSchema = userSchema;
|
|
389
|
+
exports.vrsSchema = vrsSchema;
|
|
390
|
+
//# sourceMappingURL=index.js.map
|