@florent-uzio/custody 2.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +15 -0
- package/README.md +280 -0
- package/dist/constants/defaults.d.ts +3 -0
- package/dist/constants/defaults.d.ts.map +1 -0
- package/dist/constants/defaults.js +3 -0
- package/dist/constants/defaults.js.map +1 -0
- package/dist/constants/index.d.ts +3 -0
- package/dist/constants/index.d.ts.map +1 -0
- package/dist/constants/index.js +3 -0
- package/dist/constants/index.js.map +1 -0
- package/dist/constants/urls.d.ts +86 -0
- package/dist/constants/urls.d.ts.map +1 -0
- package/dist/constants/urls.js +109 -0
- package/dist/constants/urls.js.map +1 -0
- package/dist/helpers/async/async.d.ts +6 -0
- package/dist/helpers/async/async.d.ts.map +1 -0
- package/dist/helpers/async/async.js +6 -0
- package/dist/helpers/async/async.js.map +1 -0
- package/dist/helpers/async/index.d.ts +2 -0
- package/dist/helpers/async/index.d.ts.map +1 -0
- package/dist/helpers/async/index.js +2 -0
- package/dist/helpers/async/index.js.map +1 -0
- package/dist/helpers/index.d.ts +4 -0
- package/dist/helpers/index.d.ts.map +1 -0
- package/dist/helpers/index.js +4 -0
- package/dist/helpers/index.js.map +1 -0
- package/dist/helpers/typeof-fns/index.d.ts +2 -0
- package/dist/helpers/typeof-fns/index.d.ts.map +1 -0
- package/dist/helpers/typeof-fns/index.js +2 -0
- package/dist/helpers/typeof-fns/index.js.map +1 -0
- package/dist/helpers/typeof-fns/typeof-fns.d.ts +18 -0
- package/dist/helpers/typeof-fns/typeof-fns.d.ts.map +1 -0
- package/dist/helpers/typeof-fns/typeof-fns.js +48 -0
- package/dist/helpers/typeof-fns/typeof-fns.js.map +1 -0
- package/dist/helpers/url/index.d.ts +2 -0
- package/dist/helpers/url/index.d.ts.map +1 -0
- package/dist/helpers/url/index.js +2 -0
- package/dist/helpers/url/index.js.map +1 -0
- package/dist/helpers/url/url.d.ts +39 -0
- package/dist/helpers/url/url.d.ts.map +1 -0
- package/dist/helpers/url/url.js +54 -0
- package/dist/helpers/url/url.js.map +1 -0
- package/dist/index.d.ts +27 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +9 -0
- package/dist/index.js.map +1 -0
- package/dist/main.d.ts +2 -0
- package/dist/main.d.ts.map +1 -0
- package/dist/main.helpers.d.ts +2 -0
- package/dist/main.helpers.d.ts.map +1 -0
- package/dist/main.helpers.js +99 -0
- package/dist/main.helpers.js.map +1 -0
- package/dist/main.js +41 -0
- package/dist/main.js.map +1 -0
- package/dist/models/custody-error.d.ts +22 -0
- package/dist/models/custody-error.d.ts.map +1 -0
- package/dist/models/custody-error.js +47 -0
- package/dist/models/custody-error.js.map +1 -0
- package/dist/models/custody-types.d.ts +14664 -0
- package/dist/models/custody-types.d.ts.map +1 -0
- package/dist/models/custody-types.js +6 -0
- package/dist/models/custody-types.js.map +1 -0
- package/dist/models/index.d.ts +4 -0
- package/dist/models/index.d.ts.map +1 -0
- package/dist/models/index.js +3 -0
- package/dist/models/index.js.map +1 -0
- package/dist/models/ledger-ids.d.ts +19 -0
- package/dist/models/ledger-ids.d.ts.map +1 -0
- package/dist/models/ledger-ids.js +2 -0
- package/dist/models/ledger-ids.js.map +1 -0
- package/dist/namespaces/accounts.d.ts +32 -0
- package/dist/namespaces/accounts.d.ts.map +1 -0
- package/dist/namespaces/accounts.js +66 -0
- package/dist/namespaces/accounts.js.map +1 -0
- package/dist/namespaces/channels.d.ts +14 -0
- package/dist/namespaces/channels.d.ts.map +1 -0
- package/dist/namespaces/channels.js +15 -0
- package/dist/namespaces/channels.js.map +1 -0
- package/dist/namespaces/domains.d.ts +7 -0
- package/dist/namespaces/domains.d.ts.map +1 -0
- package/dist/namespaces/domains.js +8 -0
- package/dist/namespaces/domains.js.map +1 -0
- package/dist/namespaces/endpoints.d.ts +7 -0
- package/dist/namespaces/endpoints.d.ts.map +1 -0
- package/dist/namespaces/endpoints.js +8 -0
- package/dist/namespaces/endpoints.js.map +1 -0
- package/dist/namespaces/events.d.ts +6 -0
- package/dist/namespaces/events.d.ts.map +1 -0
- package/dist/namespaces/events.js +7 -0
- package/dist/namespaces/events.js.map +1 -0
- package/dist/namespaces/genesis.d.ts +6 -0
- package/dist/namespaces/genesis.d.ts.map +1 -0
- package/dist/namespaces/genesis.js +7 -0
- package/dist/namespaces/genesis.js.map +1 -0
- package/dist/namespaces/index.d.ts +16 -0
- package/dist/namespaces/index.d.ts.map +1 -0
- package/dist/namespaces/index.js +16 -0
- package/dist/namespaces/index.js.map +1 -0
- package/dist/namespaces/intents.d.ts +13 -0
- package/dist/namespaces/intents.d.ts.map +1 -0
- package/dist/namespaces/intents.js +70 -0
- package/dist/namespaces/intents.js.map +1 -0
- package/dist/namespaces/ledgers.d.ts +11 -0
- package/dist/namespaces/ledgers.d.ts.map +1 -0
- package/dist/namespaces/ledgers.js +12 -0
- package/dist/namespaces/ledgers.js.map +1 -0
- package/dist/namespaces/policies.d.ts +7 -0
- package/dist/namespaces/policies.d.ts.map +1 -0
- package/dist/namespaces/policies.js +8 -0
- package/dist/namespaces/policies.js.map +1 -0
- package/dist/namespaces/requests.d.ts +8 -0
- package/dist/namespaces/requests.d.ts.map +1 -0
- package/dist/namespaces/requests.js +9 -0
- package/dist/namespaces/requests.js.map +1 -0
- package/dist/namespaces/tickers.d.ts +7 -0
- package/dist/namespaces/tickers.d.ts.map +1 -0
- package/dist/namespaces/tickers.js +8 -0
- package/dist/namespaces/tickers.js.map +1 -0
- package/dist/namespaces/transactions.d.ts +12 -0
- package/dist/namespaces/transactions.d.ts.map +1 -0
- package/dist/namespaces/transactions.js +13 -0
- package/dist/namespaces/transactions.js.map +1 -0
- package/dist/namespaces/user-invitations.d.ts +13 -0
- package/dist/namespaces/user-invitations.d.ts.map +1 -0
- package/dist/namespaces/user-invitations.js +14 -0
- package/dist/namespaces/user-invitations.js.map +1 -0
- package/dist/namespaces/users.d.ts +9 -0
- package/dist/namespaces/users.d.ts.map +1 -0
- package/dist/namespaces/users.js +10 -0
- package/dist/namespaces/users.js.map +1 -0
- package/dist/namespaces/vaults.d.ts +9 -0
- package/dist/namespaces/vaults.d.ts.map +1 -0
- package/dist/namespaces/vaults.js +12 -0
- package/dist/namespaces/vaults.js.map +1 -0
- package/dist/ripple-custody.d.ts +95 -0
- package/dist/ripple-custody.d.ts.map +1 -0
- package/dist/ripple-custody.js +138 -0
- package/dist/ripple-custody.js.map +1 -0
- package/dist/ripple-custody.types.d.ts +29 -0
- package/dist/ripple-custody.types.d.ts.map +1 -0
- package/dist/ripple-custody.types.js +2 -0
- package/dist/ripple-custody.types.js.map +1 -0
- package/dist/services/accounts/accounts.types.d.ts +48 -0
- package/dist/services/accounts/accounts.types.d.ts.map +1 -0
- package/dist/services/accounts/accounts.types.js +2 -0
- package/dist/services/accounts/accounts.types.js.map +1 -0
- package/dist/services/accounts/index.d.ts +2 -0
- package/dist/services/accounts/index.d.ts.map +1 -0
- package/dist/services/accounts/index.js +2 -0
- package/dist/services/accounts/index.js.map +1 -0
- package/dist/services/apis/api.service.d.ts +64 -0
- package/dist/services/apis/api.service.d.ts.map +1 -0
- package/dist/services/apis/api.service.js +235 -0
- package/dist/services/apis/api.service.js.map +1 -0
- package/dist/services/apis/api.service.types.d.ts +16 -0
- package/dist/services/apis/api.service.types.d.ts.map +1 -0
- package/dist/services/apis/api.service.types.js +3 -0
- package/dist/services/apis/api.service.types.js.map +1 -0
- package/dist/services/apis/index.d.ts +3 -0
- package/dist/services/apis/index.d.ts.map +1 -0
- package/dist/services/apis/index.js +3 -0
- package/dist/services/apis/index.js.map +1 -0
- package/dist/services/auth/auth.service.d.ts +56 -0
- package/dist/services/auth/auth.service.d.ts.map +1 -0
- package/dist/services/auth/auth.service.js +120 -0
- package/dist/services/auth/auth.service.js.map +1 -0
- package/dist/services/auth/auth.service.types.d.ts +9 -0
- package/dist/services/auth/auth.service.types.d.ts.map +1 -0
- package/dist/services/auth/auth.service.types.js +2 -0
- package/dist/services/auth/auth.service.types.js.map +1 -0
- package/dist/services/auth/index.d.ts +3 -0
- package/dist/services/auth/index.d.ts.map +1 -0
- package/dist/services/auth/index.js +3 -0
- package/dist/services/auth/index.js.map +1 -0
- package/dist/services/channels/channels.types.d.ts +37 -0
- package/dist/services/channels/channels.types.d.ts.map +1 -0
- package/dist/services/channels/channels.types.js +2 -0
- package/dist/services/channels/channels.types.js.map +1 -0
- package/dist/services/channels/index.d.ts +3 -0
- package/dist/services/channels/index.d.ts.map +1 -0
- package/dist/services/channels/index.js +3 -0
- package/dist/services/channels/index.js.map +1 -0
- package/dist/services/channels/parse-event-payload.d.ts +12 -0
- package/dist/services/channels/parse-event-payload.d.ts.map +1 -0
- package/dist/services/channels/parse-event-payload.js +37 -0
- package/dist/services/channels/parse-event-payload.js.map +1 -0
- package/dist/services/domain-resolver/domain-resolver.types.d.ts +18 -0
- package/dist/services/domain-resolver/domain-resolver.types.d.ts.map +1 -0
- package/dist/services/domain-resolver/domain-resolver.types.js +2 -0
- package/dist/services/domain-resolver/domain-resolver.types.js.map +1 -0
- package/dist/services/domain-resolver/index.d.ts +2 -0
- package/dist/services/domain-resolver/index.d.ts.map +1 -0
- package/dist/services/domain-resolver/index.js +2 -0
- package/dist/services/domain-resolver/index.js.map +1 -0
- package/dist/services/domains/domain.types.d.ts +6 -0
- package/dist/services/domains/domain.types.d.ts.map +1 -0
- package/dist/services/domains/domain.types.js +2 -0
- package/dist/services/domains/domain.types.js.map +1 -0
- package/dist/services/domains/index.d.ts +2 -0
- package/dist/services/domains/index.d.ts.map +1 -0
- package/dist/services/domains/index.js +2 -0
- package/dist/services/domains/index.js.map +1 -0
- package/dist/services/endpoints/endpoints.types.d.ts +7 -0
- package/dist/services/endpoints/endpoints.types.d.ts.map +1 -0
- package/dist/services/endpoints/endpoints.types.js +2 -0
- package/dist/services/endpoints/endpoints.types.js.map +1 -0
- package/dist/services/endpoints/index.d.ts +2 -0
- package/dist/services/endpoints/index.d.ts.map +1 -0
- package/dist/services/endpoints/index.js +2 -0
- package/dist/services/endpoints/index.js.map +1 -0
- package/dist/services/events/events.types.d.ts +8 -0
- package/dist/services/events/events.types.d.ts.map +1 -0
- package/dist/services/events/events.types.js +2 -0
- package/dist/services/events/events.types.js.map +1 -0
- package/dist/services/events/index.d.ts +2 -0
- package/dist/services/events/index.d.ts.map +1 -0
- package/dist/services/events/index.js +2 -0
- package/dist/services/events/index.js.map +1 -0
- package/dist/services/genesis/genesis.types.d.ts +7 -0
- package/dist/services/genesis/genesis.types.d.ts.map +1 -0
- package/dist/services/genesis/genesis.types.js +2 -0
- package/dist/services/genesis/genesis.types.js.map +1 -0
- package/dist/services/genesis/index.d.ts +2 -0
- package/dist/services/genesis/index.d.ts.map +1 -0
- package/dist/services/genesis/index.js +2 -0
- package/dist/services/genesis/index.js.map +1 -0
- package/dist/services/index.d.ts +19 -0
- package/dist/services/index.d.ts.map +1 -0
- package/dist/services/index.js +19 -0
- package/dist/services/index.js.map +1 -0
- package/dist/services/intents/index.d.ts +2 -0
- package/dist/services/intents/index.d.ts.map +1 -0
- package/dist/services/intents/index.js +2 -0
- package/dist/services/intents/index.js.map +1 -0
- package/dist/services/intents/intents.types.d.ts +66 -0
- package/dist/services/intents/intents.types.d.ts.map +1 -0
- package/dist/services/intents/intents.types.js +5 -0
- package/dist/services/intents/intents.types.js.map +1 -0
- package/dist/services/keypairs/ed25519.service.d.ts +25 -0
- package/dist/services/keypairs/ed25519.service.d.ts.map +1 -0
- package/dist/services/keypairs/ed25519.service.js +84 -0
- package/dist/services/keypairs/ed25519.service.js.map +1 -0
- package/dist/services/keypairs/index.d.ts +3 -0
- package/dist/services/keypairs/index.d.ts.map +1 -0
- package/dist/services/keypairs/index.js +3 -0
- package/dist/services/keypairs/index.js.map +1 -0
- package/dist/services/keypairs/keypair.service.d.ts +27 -0
- package/dist/services/keypairs/keypair.service.d.ts.map +1 -0
- package/dist/services/keypairs/keypair.service.js +69 -0
- package/dist/services/keypairs/keypair.service.js.map +1 -0
- package/dist/services/keypairs/keypairs.types.d.ts +10 -0
- package/dist/services/keypairs/keypairs.types.d.ts.map +1 -0
- package/dist/services/keypairs/keypairs.types.js +2 -0
- package/dist/services/keypairs/keypairs.types.js.map +1 -0
- package/dist/services/keypairs/secp256k1.service.d.ts +24 -0
- package/dist/services/keypairs/secp256k1.service.d.ts.map +1 -0
- package/dist/services/keypairs/secp256k1.service.js +101 -0
- package/dist/services/keypairs/secp256k1.service.js.map +1 -0
- package/dist/services/keypairs/secp256r1.service.d.ts +24 -0
- package/dist/services/keypairs/secp256r1.service.d.ts.map +1 -0
- package/dist/services/keypairs/secp256r1.service.js +101 -0
- package/dist/services/keypairs/secp256r1.service.js.map +1 -0
- package/dist/services/ledgers/index.d.ts +2 -0
- package/dist/services/ledgers/index.d.ts.map +1 -0
- package/dist/services/ledgers/index.js +2 -0
- package/dist/services/ledgers/index.js.map +1 -0
- package/dist/services/ledgers/ledgers.types.d.ts +13 -0
- package/dist/services/ledgers/ledgers.types.d.ts.map +1 -0
- package/dist/services/ledgers/ledgers.types.js +2 -0
- package/dist/services/ledgers/ledgers.types.js.map +1 -0
- package/dist/services/policies/index.d.ts +2 -0
- package/dist/services/policies/index.d.ts.map +1 -0
- package/dist/services/policies/index.js +2 -0
- package/dist/services/policies/index.js.map +1 -0
- package/dist/services/policies/policies.types.d.ts +13 -0
- package/dist/services/policies/policies.types.d.ts.map +1 -0
- package/dist/services/policies/policies.types.js +2 -0
- package/dist/services/policies/policies.types.js.map +1 -0
- package/dist/services/requests/index.d.ts +2 -0
- package/dist/services/requests/index.d.ts.map +1 -0
- package/dist/services/requests/index.js +2 -0
- package/dist/services/requests/index.js.map +1 -0
- package/dist/services/requests/requests.types.d.ts +8 -0
- package/dist/services/requests/requests.types.d.ts.map +1 -0
- package/dist/services/requests/requests.types.js +2 -0
- package/dist/services/requests/requests.types.js.map +1 -0
- package/dist/services/tickers/index.d.ts +2 -0
- package/dist/services/tickers/index.d.ts.map +1 -0
- package/dist/services/tickers/index.js +2 -0
- package/dist/services/tickers/index.js.map +1 -0
- package/dist/services/tickers/tickers.types.d.ts +6 -0
- package/dist/services/tickers/tickers.types.d.ts.map +1 -0
- package/dist/services/tickers/tickers.types.js +2 -0
- package/dist/services/tickers/tickers.types.js.map +1 -0
- package/dist/services/transactions/index.d.ts +2 -0
- package/dist/services/transactions/index.d.ts.map +1 -0
- package/dist/services/transactions/index.js +2 -0
- package/dist/services/transactions/index.js.map +1 -0
- package/dist/services/transactions/transactions.types.d.ts +21 -0
- package/dist/services/transactions/transactions.types.d.ts.map +1 -0
- package/dist/services/transactions/transactions.types.js +2 -0
- package/dist/services/transactions/transactions.types.js.map +1 -0
- package/dist/services/user-invitations/index.d.ts +2 -0
- package/dist/services/user-invitations/index.d.ts.map +1 -0
- package/dist/services/user-invitations/index.js +2 -0
- package/dist/services/user-invitations/index.js.map +1 -0
- package/dist/services/user-invitations/user-invitations.types.d.ts +15 -0
- package/dist/services/user-invitations/user-invitations.types.d.ts.map +1 -0
- package/dist/services/user-invitations/user-invitations.types.js +2 -0
- package/dist/services/user-invitations/user-invitations.types.js.map +1 -0
- package/dist/services/users/index.d.ts +2 -0
- package/dist/services/users/index.d.ts.map +1 -0
- package/dist/services/users/index.js +2 -0
- package/dist/services/users/index.js.map +1 -0
- package/dist/services/users/users.types.d.ts +10 -0
- package/dist/services/users/users.types.d.ts.map +1 -0
- package/dist/services/users/users.types.js +2 -0
- package/dist/services/users/users.types.js.map +1 -0
- package/dist/services/vaults/index.d.ts +2 -0
- package/dist/services/vaults/index.d.ts.map +1 -0
- package/dist/services/vaults/index.js +2 -0
- package/dist/services/vaults/index.js.map +1 -0
- package/dist/services/vaults/vaults.types.d.ts +14 -0
- package/dist/services/vaults/vaults.types.d.ts.map +1 -0
- package/dist/services/vaults/vaults.types.js +2 -0
- package/dist/services/vaults/vaults.types.js.map +1 -0
- package/dist/services/xrpl/index.d.ts +5 -0
- package/dist/services/xrpl/index.d.ts.map +1 -0
- package/dist/services/xrpl/index.js +8 -0
- package/dist/services/xrpl/index.js.map +1 -0
- package/dist/services/xrpl/xrpl.adapters.d.ts +13 -0
- package/dist/services/xrpl/xrpl.adapters.d.ts.map +1 -0
- package/dist/services/xrpl/xrpl.adapters.js +288 -0
- package/dist/services/xrpl/xrpl.adapters.js.map +1 -0
- package/dist/services/xrpl/xrpl.http-adapters.d.ts +14 -0
- package/dist/services/xrpl/xrpl.http-adapters.d.ts.map +1 -0
- package/dist/services/xrpl/xrpl.http-adapters.js +83 -0
- package/dist/services/xrpl/xrpl.http-adapters.js.map +1 -0
- package/dist/services/xrpl/xrpl.ports.d.ts +36 -0
- package/dist/services/xrpl/xrpl.ports.d.ts.map +1 -0
- package/dist/services/xrpl/xrpl.ports.js +2 -0
- package/dist/services/xrpl/xrpl.ports.js.map +1 -0
- package/dist/services/xrpl/xrpl.service.d.ts +124 -0
- package/dist/services/xrpl/xrpl.service.d.ts.map +1 -0
- package/dist/services/xrpl/xrpl.service.js +370 -0
- package/dist/services/xrpl/xrpl.service.js.map +1 -0
- package/dist/services/xrpl/xrpl.types.d.ts +131 -0
- package/dist/services/xrpl/xrpl.types.d.ts.map +1 -0
- package/dist/services/xrpl/xrpl.types.js +30 -0
- package/dist/services/xrpl/xrpl.types.js.map +1 -0
- package/dist/transport/index.d.ts +4 -0
- package/dist/transport/index.d.ts.map +1 -0
- package/dist/transport/index.js +3 -0
- package/dist/transport/index.js.map +1 -0
- package/dist/transport/split-params.d.ts +14 -0
- package/dist/transport/split-params.d.ts.map +1 -0
- package/dist/transport/split-params.js +28 -0
- package/dist/transport/split-params.js.map +1 -0
- package/dist/transport/transport.types.d.ts +11 -0
- package/dist/transport/transport.types.d.ts.map +1 -0
- package/dist/transport/transport.types.js +2 -0
- package/dist/transport/transport.types.js.map +1 -0
- package/dist/transport/typed-transport.d.ts +38 -0
- package/dist/transport/typed-transport.d.ts.map +1 -0
- package/dist/transport/typed-transport.js +78 -0
- package/dist/transport/typed-transport.js.map +1 -0
- package/dist/type-utils/index.d.ts +4 -0
- package/dist/type-utils/index.d.ts.map +1 -0
- package/dist/type-utils/index.js +4 -0
- package/dist/type-utils/index.js.map +1 -0
- package/dist/type-utils/optional-except-for.d.ts +2 -0
- package/dist/type-utils/optional-except-for.d.ts.map +1 -0
- package/dist/type-utils/optional-except-for.js +2 -0
- package/dist/type-utils/optional-except-for.js.map +1 -0
- package/dist/type-utils/prettify.d.ts +4 -0
- package/dist/type-utils/prettify.d.ts.map +1 -0
- package/dist/type-utils/prettify.js +2 -0
- package/dist/type-utils/prettify.js.map +1 -0
- package/dist/type-utils/required-except-for.d.ts +2 -0
- package/dist/type-utils/required-except-for.d.ts.map +1 -0
- package/dist/type-utils/required-except-for.js +2 -0
- package/dist/type-utils/required-except-for.js.map +1 -0
- package/package.json +72 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2025 Florent Uzio
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
|
6
|
+
|
|
7
|
+
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
|
8
|
+
|
|
9
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
10
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
11
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
12
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
13
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
14
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
15
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,280 @@
|
|
|
1
|
+
# Custody.js
|
|
2
|
+
|
|
3
|
+
A comprehensive JavaScript/Typescript SDK for interacting with the Ripple Custody API. This SDK provides a clean, type-safe interface for managing domains, intents, accounts, transactions, and cryptographic operations.
|
|
4
|
+
|
|
5
|
+
> **Do not use this SDK in production.** This is personal code that may contain bugs and is not regularly maintained. Fork it and update it as you wish.
|
|
6
|
+
|
|
7
|
+
## Features
|
|
8
|
+
|
|
9
|
+
- **Cryptographic Support**: Ed25519, secp256k1, secp256r1 keypair generation and signing
|
|
10
|
+
- **Domain Management**: List and retrieve domain information
|
|
11
|
+
- **Endpoint Management**: List and retrieve endpoints within a domain
|
|
12
|
+
- **Intent Operations**: Propose, approve, reject, and manage intents with built-in polling
|
|
13
|
+
- **Account Management**: Manage accounts, addresses, and balances
|
|
14
|
+
- **Transaction Operations**: Handle transaction orders, transfers, and dry runs
|
|
15
|
+
- **User & Invitation Management**: Manage users, roles, and invitations
|
|
16
|
+
- **Vault Operations**: Export and import prepared operations
|
|
17
|
+
- **Type Safety**: Full TypeScript support with types derived from the OpenAPI specification
|
|
18
|
+
- **Ledger ID Autocomplete**: `LedgerId`, `XrplLedgerId`, and `NonXrplLedgerId` exports give IDE autocomplete for the supported ledgers (e.g. `"ethereum"`, `"xrpl"`, `"solana"`, …) while still accepting any string — so newly added ledgers never break the SDK
|
|
19
|
+
- **XRPL Intent Proposal**: Single `proposeIntent()` method for all XRPL transaction types (Payment, TrustSet, DepositPreauth, Clawback, OfferCreate, AccountSet, TicketCreate, Batch, MPToken operations) using a type-safe discriminated union
|
|
20
|
+
- **Raw Signing**: Sign arbitrary XRPL transactions and Batch inner transactions via Custody
|
|
21
|
+
|
|
22
|
+
## Architecture
|
|
23
|
+
|
|
24
|
+
The SDK is built around a few key layers:
|
|
25
|
+
|
|
26
|
+
- **`TypedTransport`** — wraps the HTTP client with automatic URL template interpolation and path/query parameter splitting.
|
|
27
|
+
- **Namespace factories** (`createDomains`, `createAccounts`, etc.) — return plain objects that map method names to typed transport calls. Each factory is a thin, stateless function.
|
|
28
|
+
- **`RippleCustody`** — the public client class that assembles all namespaces in its constructor. Consumers interact exclusively through `client.domains.list()`, `client.accounts.get()`, etc.
|
|
29
|
+
- **`XrplService`** — builds XRPL transaction intents via a single `proposeIntent()` entry point, handles domain/account resolution through injected I/O ports (`XrplPorts`), and supports raw signing with manifest polling.
|
|
30
|
+
|
|
31
|
+
## Installation
|
|
32
|
+
|
|
33
|
+
### From npm
|
|
34
|
+
|
|
35
|
+
```bash
|
|
36
|
+
npm install @florent-uzio/custody
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
### From GitHub
|
|
40
|
+
|
|
41
|
+
Alternatively, install directly from the GitHub repository:
|
|
42
|
+
|
|
43
|
+
```bash
|
|
44
|
+
npm install github:florent-uzio/custody.js
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
## Quick Start
|
|
48
|
+
|
|
49
|
+
### 1. Generate Keypairs
|
|
50
|
+
|
|
51
|
+
First, you'll need to generate cryptographic keypairs for authentication and signing:
|
|
52
|
+
|
|
53
|
+
```typescript
|
|
54
|
+
import { KeypairService } from "@florent-uzio/custody"
|
|
55
|
+
|
|
56
|
+
// Generate Ed25519 keypair
|
|
57
|
+
const ed25519Service = new KeypairService("ed25519")
|
|
58
|
+
const ed25519Keypair = ed25519Service.generate()
|
|
59
|
+
|
|
60
|
+
console.log("Ed25519 Private Key:", ed25519Keypair.privateKey)
|
|
61
|
+
console.log("Ed25519 Public Key:", ed25519Keypair.publicKey)
|
|
62
|
+
|
|
63
|
+
// Generate secp256k1 keypair
|
|
64
|
+
const secp256k1Service = new KeypairService("secp256k1")
|
|
65
|
+
const secp256k1Keypair = secp256k1Service.generate()
|
|
66
|
+
|
|
67
|
+
// Generate secp256r1 keypair
|
|
68
|
+
const secp256r1Service = new KeypairService("secp256r1")
|
|
69
|
+
const secp256r1Keypair = secp256r1Service.generate()
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
Use those keypairs in Ripple Custody when setting up your API user.
|
|
73
|
+
Use a `.env` file to store your public and private key.
|
|
74
|
+
|
|
75
|
+
**Note**: The SDK supports Ed25519, secp256k1, and secp256r1 algorithms.
|
|
76
|
+
|
|
77
|
+
### 2. Initialize the RippleCustody Client
|
|
78
|
+
|
|
79
|
+
```typescript
|
|
80
|
+
import { RippleCustody } from "@florent-uzio/custody"
|
|
81
|
+
|
|
82
|
+
const custody = new RippleCustody({
|
|
83
|
+
apiUrl: "https://api.ripple.com",
|
|
84
|
+
authUrl: "https://auth.api.ripple.com/token",
|
|
85
|
+
privateKey: ed25519Keypair.privateKey, // Your private key in PEM format
|
|
86
|
+
publicKey: ed25519Keypair.publicKey, // Your public key in base64 format
|
|
87
|
+
})
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
### 3. Use the SDK
|
|
91
|
+
|
|
92
|
+
The SDK provides a namespaced API for easy discovery and usage:
|
|
93
|
+
|
|
94
|
+
```typescript
|
|
95
|
+
// Domain Operations
|
|
96
|
+
const domains = await custody.domains.list()
|
|
97
|
+
const domain = await custody.domains.get({ domainId: "your-domain-id" })
|
|
98
|
+
|
|
99
|
+
// Endpoint Operations
|
|
100
|
+
const endpoints = await custody.endpoints.list(
|
|
101
|
+
{ domainId: "domain-id" },
|
|
102
|
+
{ limit: 10, sortBy: "alias" },
|
|
103
|
+
)
|
|
104
|
+
const endpoint = await custody.endpoints.get({
|
|
105
|
+
domainId: "domain-id",
|
|
106
|
+
endpointId: "endpoint-id",
|
|
107
|
+
})
|
|
108
|
+
|
|
109
|
+
// Intent Operations
|
|
110
|
+
const intent = await custody.intents.propose({
|
|
111
|
+
request: {
|
|
112
|
+
author: { id: "user-id", domainId: "domain-id" },
|
|
113
|
+
type: "Propose",
|
|
114
|
+
// ... other intent parameters
|
|
115
|
+
},
|
|
116
|
+
// signature is optional — the SDK auto-signs if not provided
|
|
117
|
+
})
|
|
118
|
+
|
|
119
|
+
await custody.intents.approve({
|
|
120
|
+
request: {
|
|
121
|
+
author: { id: "user-id", domainId: "domain-id" },
|
|
122
|
+
type: "Approve",
|
|
123
|
+
// ... approval parameters
|
|
124
|
+
},
|
|
125
|
+
})
|
|
126
|
+
|
|
127
|
+
// Poll an intent until it reaches a terminal status
|
|
128
|
+
const result = await custody.intents.getAndWait(
|
|
129
|
+
{ domainId: "domain-id", intentId: "intent-id" },
|
|
130
|
+
{
|
|
131
|
+
maxRetries: 20,
|
|
132
|
+
intervalMs: 3000,
|
|
133
|
+
onStatusCheck: (status, attempt) => console.log(`Attempt ${attempt}: ${status}`),
|
|
134
|
+
},
|
|
135
|
+
)
|
|
136
|
+
|
|
137
|
+
if (result.isSuccess) {
|
|
138
|
+
console.log("Intent executed successfully!")
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
// Account Operations
|
|
142
|
+
const accounts = await custody.accounts.list({ domainId: "domain-id" }, { limit: 10 })
|
|
143
|
+
const account = await custody.accounts.get({ domainId: "domain-id", accountId: "account-id" })
|
|
144
|
+
const balances = await custody.accounts.getAccountBalances({
|
|
145
|
+
domainId: "domain-id",
|
|
146
|
+
accountId: "account-id",
|
|
147
|
+
})
|
|
148
|
+
const newAddress = await custody.accounts.generateNewExternalAddress({
|
|
149
|
+
domainId: "domain-id",
|
|
150
|
+
accountId: "account-id",
|
|
151
|
+
ledgerId: "ledger-id",
|
|
152
|
+
})
|
|
153
|
+
|
|
154
|
+
// Find an account by its blockchain address (searches across all domains).
|
|
155
|
+
// Returns the full address reference, or undefined if not found.
|
|
156
|
+
// Use the options bag to disambiguate when the same address exists on
|
|
157
|
+
// multiple ledgers or in multiple domains.
|
|
158
|
+
const ref = await custody.accounts.findByAddress("rAddress...")
|
|
159
|
+
const refOnLedger = await custody.accounts.findByAddress("rAddress...", {
|
|
160
|
+
ledgerId: "xrpl",
|
|
161
|
+
})
|
|
162
|
+
const refInDomain = await custody.accounts.findByAddress("rAddress...", {
|
|
163
|
+
domainId: "domain-id",
|
|
164
|
+
})
|
|
165
|
+
// `findByAddressOrThrow` throws a `CustodyError` instead of returning undefined.
|
|
166
|
+
const account = await custody.accounts.findByAddressOrThrow("rAddress...", {
|
|
167
|
+
ledgerId: "xrpl",
|
|
168
|
+
})
|
|
169
|
+
|
|
170
|
+
// Transaction Operations
|
|
171
|
+
const orders = await custody.transactions.orders({ domainId: "domain-id" }, { limit: 10 })
|
|
172
|
+
const transfers = await custody.transactions.transfers({ domainId: "domain-id" })
|
|
173
|
+
const dryRun = await custody.transactions.dryRun(
|
|
174
|
+
{ domainId: "domain-id" },
|
|
175
|
+
{
|
|
176
|
+
/* params */
|
|
177
|
+
},
|
|
178
|
+
)
|
|
179
|
+
|
|
180
|
+
// User Operations
|
|
181
|
+
const me = await custody.users.me()
|
|
182
|
+
const users = await custody.users.list({ domainId: "domain-id" })
|
|
183
|
+
|
|
184
|
+
// Ledger Operations
|
|
185
|
+
const ledgers = await custody.ledgers.list()
|
|
186
|
+
const fees = await custody.ledgers.fees({ ledgerId: "ledger-id" })
|
|
187
|
+
|
|
188
|
+
// Vault Operations
|
|
189
|
+
const vaults = await custody.vaults.list()
|
|
190
|
+
const exported = await custody.vaults.exportPreparedOperations({ vaultId: "vault-id" })
|
|
191
|
+
|
|
192
|
+
// Request State
|
|
193
|
+
const states = await custody.requests.userStates()
|
|
194
|
+
```
|
|
195
|
+
|
|
196
|
+
## XRPL Service
|
|
197
|
+
|
|
198
|
+
The XRPL service provides a simplified, high-level API for creating XRPL transaction intents. Instead of manually building complex intent payloads, use `proposeIntent()` with a discriminated union — it handles user validation, domain resolution, and account lookup automatically.
|
|
199
|
+
|
|
200
|
+
### Usage
|
|
201
|
+
|
|
202
|
+
```typescript
|
|
203
|
+
// Propose any XRPL transaction — the `type` field selects the operation.
|
|
204
|
+
// TypeScript autocomplete shows available types and their fields.
|
|
205
|
+
await custody.xrpl.proposeIntent({
|
|
206
|
+
Account: "rSenderAddress...",
|
|
207
|
+
operation: {
|
|
208
|
+
type: "Payment",
|
|
209
|
+
destination: { address: "rDestAddress...", type: "Address" },
|
|
210
|
+
amount: "1000000",
|
|
211
|
+
},
|
|
212
|
+
})
|
|
213
|
+
|
|
214
|
+
// TrustSet
|
|
215
|
+
await custody.xrpl.proposeIntent({
|
|
216
|
+
Account: "rSenderAddress...",
|
|
217
|
+
operation: {
|
|
218
|
+
type: "TrustSet",
|
|
219
|
+
limitAmount: {
|
|
220
|
+
currency: { code: "USD", type: "Currency", issuer: "rIssuer..." },
|
|
221
|
+
value: "10000",
|
|
222
|
+
},
|
|
223
|
+
flags: [],
|
|
224
|
+
},
|
|
225
|
+
})
|
|
226
|
+
|
|
227
|
+
// Raw sign and wait for signature
|
|
228
|
+
const { signature, signingPubKey } = await custody.xrpl.rawSignAndWait(autofilledTx)
|
|
229
|
+
```
|
|
230
|
+
|
|
231
|
+
### Examples
|
|
232
|
+
|
|
233
|
+
See the [`examples/xrpl/`](./examples/xrpl/) directory for working code:
|
|
234
|
+
|
|
235
|
+
- [XRP Payment](./examples/xrpl/payment-xrp/)
|
|
236
|
+
- [MPToken Payment](./examples/xrpl/payment-mpt/)
|
|
237
|
+
- [TrustSet](./examples/xrpl/trustset/)
|
|
238
|
+
- [MPToken Issuance Create](./examples/xrpl/mpt/create/)
|
|
239
|
+
- [MPToken Authorize](./examples/xrpl/mpt/authorize/)
|
|
240
|
+
|
|
241
|
+
### Options
|
|
242
|
+
|
|
243
|
+
`proposeIntent()` and the raw-sign methods accept an optional second parameter with these options:
|
|
244
|
+
|
|
245
|
+
| Option | Type | Default | Description |
|
|
246
|
+
| ------------------------- | ----------------------------- | ------- | ---------------------------------------------------------------------------------------------------- |
|
|
247
|
+
| `domainId` | `string` | - | Domain ID (required if user has multiple domains) |
|
|
248
|
+
| `ledgerId` | `XrplLedgerId` | - | XRPL ledger to use (`"xrpl"` or `"xrpl-testnet-august-2024"`) — required when the address spans both |
|
|
249
|
+
| `feePriority` | `"Low" \| "Medium" \| "High"` | `"Low"` | Transaction fee priority |
|
|
250
|
+
| `expiryDays` | `number` | `1` | Days until the intent expires |
|
|
251
|
+
| `requestCustomProperties` | `Record<string, string>` | `{}` | Custom metadata on the request |
|
|
252
|
+
| `payloadCustomProperties` | `Record<string, string>` | `{}` | Custom metadata on the payload |
|
|
253
|
+
| `requestId` | `string` | auto | Override the auto-generated request ID |
|
|
254
|
+
| `payloadId` | `string` | auto | Override the auto-generated payload ID |
|
|
255
|
+
|
|
256
|
+
## Error Handling
|
|
257
|
+
|
|
258
|
+
The SDK throws `CustodyError` instances for all API errors:
|
|
259
|
+
|
|
260
|
+
```typescript
|
|
261
|
+
import { CustodyError } from "@florent-uzio/custody"
|
|
262
|
+
|
|
263
|
+
try {
|
|
264
|
+
const domains = await custody.domains.list()
|
|
265
|
+
} catch (error) {
|
|
266
|
+
if (error instanceof CustodyError) {
|
|
267
|
+
console.log(error.message) // Main error reason
|
|
268
|
+
console.log(error.statusCode) // HTTP status code (e.g., 400, 404)
|
|
269
|
+
console.log(error.errorMessage) // Optional additional details from API
|
|
270
|
+
console.log(error.cause) // Original error for debugging
|
|
271
|
+
console.log(error.toJSON()) // Structured object for logging/serialization
|
|
272
|
+
}
|
|
273
|
+
}
|
|
274
|
+
```
|
|
275
|
+
|
|
276
|
+
`console.log(error)` outputs a clean, readable format. Access `error.cause` for full debugging details.
|
|
277
|
+
|
|
278
|
+
## License
|
|
279
|
+
|
|
280
|
+
MIT License - see [LICENSE](./LICENSE) file for details.
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"defaults.d.ts","sourceRoot":"","sources":["../../src/constants/defaults.ts"],"names":[],"mappings":"AAAA,2DAA2D;AAC3D,eAAO,MAAM,kBAAkB,QAAS,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"defaults.js","sourceRoot":"","sources":["../../src/constants/defaults.ts"],"names":[],"mappings":"AAAA,2DAA2D;AAC3D,MAAM,CAAC,MAAM,kBAAkB,GAAG,MAAM,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/constants/index.ts"],"names":[],"mappings":"AAAA,cAAc,eAAe,CAAA;AAC7B,cAAc,WAAW,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/constants/index.ts"],"names":[],"mappings":"AAAA,cAAc,eAAe,CAAA;AAC7B,cAAc,WAAW,CAAA"}
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
import type { paths } from "../models/custody-types.js";
|
|
2
|
+
export type PathKeys = keyof paths;
|
|
3
|
+
export declare const URLs: {
|
|
4
|
+
readonly domains: "/v1/domains";
|
|
5
|
+
readonly domain: "/v1/domains/{domainId}";
|
|
6
|
+
readonly users: "/v1/domains/{domainId}/users";
|
|
7
|
+
readonly userRoles: "/v1/domains/{domainId}/users/roles";
|
|
8
|
+
readonly user: "/v1/domains/{domainId}/users/{userId}";
|
|
9
|
+
readonly me: "/v1/me";
|
|
10
|
+
readonly meRequests: "/v1/me/requests";
|
|
11
|
+
readonly intents: "/v1/intents";
|
|
12
|
+
readonly intentsApprove: "/v1/intents/approve";
|
|
13
|
+
readonly intentsReject: "/v1/intents/reject";
|
|
14
|
+
readonly intentsDryRun: "/v1/intents/dry-run";
|
|
15
|
+
readonly domainIntents: "/v1/domains/{domainId}/intents";
|
|
16
|
+
readonly getIntent: "/v1/domains/{domainId}/intents/{intentId}";
|
|
17
|
+
readonly intentRemainingUsers: "/v1/domains/{domainId}/intents/{intentId}/remaining-users";
|
|
18
|
+
readonly vaults: "/v1/vaults";
|
|
19
|
+
readonly vault: "/v1/vaults/{vaultId}";
|
|
20
|
+
readonly vaultOperationsPrepared: "/v1/vaults/{vaultId}/operations/prepared";
|
|
21
|
+
readonly vaultOperationsSigned: "/v1/vaults/operations/signed";
|
|
22
|
+
readonly policies: "/v1/domains/{domainId}/policies";
|
|
23
|
+
readonly policy: "/v1/domains/{domainId}/policies/{policyId}";
|
|
24
|
+
readonly accounts: "/v1/domains/{domainId}/accounts";
|
|
25
|
+
readonly account: "/v1/domains/{domainId}/accounts/{accountId}";
|
|
26
|
+
readonly accountAddresses: "/v1/domains/{domainId}/accounts/{accountId}/addresses";
|
|
27
|
+
readonly accountAddressesByLedger: "/v1/domains/{domainId}/accounts/{accountId}/addresses/{ledgerId}";
|
|
28
|
+
readonly accountAddressesLatest: "/v1/domains/{domainId}/accounts/{accountId}/addresses/latest";
|
|
29
|
+
readonly accountAddress: "/v1/domains/{domainId}/accounts/{accountId}/addresses/{accountAddressId}";
|
|
30
|
+
readonly accountConfirmedBalance: "/v1/domains/{domainId}/accounts/{accountId}/confirmed-balance/{tickerId}";
|
|
31
|
+
readonly accountBalances: "/v1/domains/{domainId}/accounts/{accountId}/balances";
|
|
32
|
+
readonly accountBalancesRefresh: "/v1/domains/{domainId}/accounts/{accountId}/balances/refresh";
|
|
33
|
+
readonly accountManifests: "/v1/domains/{domainId}/accounts/{accountId}/manifests";
|
|
34
|
+
readonly accountManifest: "/v1/domains/{domainId}/accounts/{accountId}/manifests/{manifestId}";
|
|
35
|
+
readonly accountComplianceConfiguration: "/v1/domains/{domainId}/accounts/{accountId}/compliance-configuration";
|
|
36
|
+
readonly complianceConfigurations: "/v1/domains/{domainId}/compliance-configurations";
|
|
37
|
+
readonly addresses: "/v1/addresses";
|
|
38
|
+
readonly endpoints: "/v1/domains/{domainId}/endpoints";
|
|
39
|
+
readonly endpoint: "/v1/domains/{domainId}/endpoints/{endpointId}";
|
|
40
|
+
readonly transactionOrders: "/v1/domains/{domainId}/transactions/orders";
|
|
41
|
+
readonly transactionOrder: "/v1/domains/{domainId}/transactions/orders/{transactionOrderId}";
|
|
42
|
+
readonly transactionTransfers: "/v1/domains/{domainId}/transactions/transfers";
|
|
43
|
+
readonly transactionTransfer: "/v1/domains/{domainId}/transactions/transfers/{transferId}";
|
|
44
|
+
readonly transactions: "/v1/domains/{domainId}/transactions";
|
|
45
|
+
readonly transaction: "/v1/domains/{domainId}/transactions/{transactionId}";
|
|
46
|
+
readonly transactionsDryRun: "/v1/domains/{domainId}/transactions/dry-run";
|
|
47
|
+
readonly tickers: "/v1/tickers";
|
|
48
|
+
readonly ticker: "/v1/tickers/{tickerId}";
|
|
49
|
+
readonly ledgers: "/v1/ledgers";
|
|
50
|
+
readonly ledger: "/v1/ledgers/{ledgerId}";
|
|
51
|
+
readonly ledgerFees: "/v1/ledgers/{ledgerId}/fees";
|
|
52
|
+
readonly ledgerEthereumCall: "/v1/ledgers/{ledgerId}/ethereum/call";
|
|
53
|
+
readonly trustedLedgers: "/v1/trusted-ledgers";
|
|
54
|
+
readonly trustedLedger: "/v1/trusted-ledgers/{ledgerId}";
|
|
55
|
+
readonly requests: "/v1/domains/{domainId}/requests";
|
|
56
|
+
readonly request: "/v1/domains/{domainId}/requests/{requestId}";
|
|
57
|
+
readonly trustedPublicKeysCollection: "/v1/trusted-public-keys/trusted-collection";
|
|
58
|
+
readonly trustedPublicKeysApi: "/v1/trusted-public-keys/api";
|
|
59
|
+
readonly trustedPublicKeysMessages: "/v1/trusted-public-keys/messages";
|
|
60
|
+
readonly events: "/v1/domains/{domainId}/events";
|
|
61
|
+
readonly properties: "/v1/properties";
|
|
62
|
+
readonly userInvitations: "/v1/domains/{domainId}/users/invitations";
|
|
63
|
+
readonly userInvitation: "/v1/domains/{domainId}/users/invitations/{id}";
|
|
64
|
+
readonly userInvitationCancel: "/v1/domains/{domainId}/users/invitations/{id}/cancel";
|
|
65
|
+
readonly userInvitationRenew: "/v1/domains/{domainId}/users/invitations/{id}/renew";
|
|
66
|
+
readonly userInvitationComplete: "/v1/domains/{domainId}/users/invitations/{id}/complete";
|
|
67
|
+
readonly publicUserInvitation: "/v1/users/invitations/{idOrCode}";
|
|
68
|
+
readonly virtualLedgers: "/v1/domains/{domainId}/virtual-ledgers";
|
|
69
|
+
readonly virtualLedger: "/v1/domains/{domainId}/virtual-ledgers/{virtualLedgerId}";
|
|
70
|
+
readonly virtualLedgerBalances: "/v1/domains/{domainId}/virtual-ledgers/{virtualLedgerId}/balances";
|
|
71
|
+
readonly virtualLedgerAccounts: "/v1/domains/{domainId}/virtual-ledgers/{virtualLedgerId}/accounts";
|
|
72
|
+
readonly virtualLedgerAccount: "/v1/domains/{domainId}/virtual-ledgers/{virtualLedgerId}/accounts/{accountId}";
|
|
73
|
+
readonly virtualLedgerAccountBalances: "/v1/domains/{domainId}/virtual-ledgers/{virtualLedgerId}/accounts/{accountId}/balances";
|
|
74
|
+
readonly virtualLedgerAccountDepositIdentificationSources: "/v1/domains/{domainId}/virtual-ledgers/{virtualLedgerId}/accounts/{accountId}/deposit-identification-sources";
|
|
75
|
+
readonly virtualLedgerAccountAddresses: "/v1/domains/{domainId}/virtual-ledgers/{virtualLedgerId}/accounts/{accountId}/addresses";
|
|
76
|
+
readonly virtualLedgerOperations: "/v1/domains/{domainId}/virtual-ledgers/{virtualLedgerId}/operations";
|
|
77
|
+
readonly virtualLedgerTransfers: "/v1/domains/{domainId}/virtual-ledgers/{virtualLedgerId}/transfers";
|
|
78
|
+
readonly channels: "/v1/domains/{domainId}/channels";
|
|
79
|
+
readonly channel: "/v1/domains/{domainId}/channels/{channelId}";
|
|
80
|
+
readonly channelTest: "/v1/domains/{domainId}/channels/{channelId}/test";
|
|
81
|
+
readonly channelEvents: "/v1/domains/{domainId}/channels/{channelId}/events";
|
|
82
|
+
readonly channelEvent: "/v1/domains/{domainId}/channels/{channelId}/events/{eventId}";
|
|
83
|
+
readonly channelsEvents: "/v1/domains/{domainId}/channels/events";
|
|
84
|
+
readonly genesis: "/v1/genesis";
|
|
85
|
+
};
|
|
86
|
+
//# sourceMappingURL=urls.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"urls.d.ts","sourceRoot":"","sources":["../../src/constants/urls.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,4BAA4B,CAAA;AAGvD,MAAM,MAAM,QAAQ,GAAG,MAAM,KAAK,CAAA;AAOlC,eAAO,MAAM,IAAI;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA6HN,CAAA"}
|
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
// Helper function to ensure URLs are valid paths
|
|
2
|
+
function createURLs(urls) {
|
|
3
|
+
return urls;
|
|
4
|
+
}
|
|
5
|
+
export const URLs = createURLs({
|
|
6
|
+
// Domains
|
|
7
|
+
domains: "/v1/domains",
|
|
8
|
+
domain: "/v1/domains/{domainId}",
|
|
9
|
+
// Users
|
|
10
|
+
users: "/v1/domains/{domainId}/users",
|
|
11
|
+
userRoles: "/v1/domains/{domainId}/users/roles",
|
|
12
|
+
user: "/v1/domains/{domainId}/users/{userId}",
|
|
13
|
+
me: "/v1/me",
|
|
14
|
+
meRequests: "/v1/me/requests",
|
|
15
|
+
// Intents
|
|
16
|
+
intents: "/v1/intents",
|
|
17
|
+
intentsApprove: "/v1/intents/approve",
|
|
18
|
+
intentsReject: "/v1/intents/reject",
|
|
19
|
+
intentsDryRun: "/v1/intents/dry-run",
|
|
20
|
+
domainIntents: "/v1/domains/{domainId}/intents",
|
|
21
|
+
getIntent: "/v1/domains/{domainId}/intents/{intentId}",
|
|
22
|
+
intentRemainingUsers: "/v1/domains/{domainId}/intents/{intentId}/remaining-users",
|
|
23
|
+
// Vaults
|
|
24
|
+
vaults: "/v1/vaults",
|
|
25
|
+
vault: "/v1/vaults/{vaultId}",
|
|
26
|
+
vaultOperationsPrepared: "/v1/vaults/{vaultId}/operations/prepared",
|
|
27
|
+
vaultOperationsSigned: "/v1/vaults/operations/signed",
|
|
28
|
+
// Policies
|
|
29
|
+
policies: "/v1/domains/{domainId}/policies",
|
|
30
|
+
policy: "/v1/domains/{domainId}/policies/{policyId}",
|
|
31
|
+
// Accounts
|
|
32
|
+
accounts: "/v1/domains/{domainId}/accounts",
|
|
33
|
+
account: "/v1/domains/{domainId}/accounts/{accountId}",
|
|
34
|
+
accountAddresses: "/v1/domains/{domainId}/accounts/{accountId}/addresses",
|
|
35
|
+
accountAddressesByLedger: "/v1/domains/{domainId}/accounts/{accountId}/addresses/{ledgerId}",
|
|
36
|
+
accountAddressesLatest: "/v1/domains/{domainId}/accounts/{accountId}/addresses/latest",
|
|
37
|
+
accountAddress: "/v1/domains/{domainId}/accounts/{accountId}/addresses/{accountAddressId}",
|
|
38
|
+
accountConfirmedBalance: "/v1/domains/{domainId}/accounts/{accountId}/confirmed-balance/{tickerId}",
|
|
39
|
+
accountBalances: "/v1/domains/{domainId}/accounts/{accountId}/balances",
|
|
40
|
+
accountBalancesRefresh: "/v1/domains/{domainId}/accounts/{accountId}/balances/refresh",
|
|
41
|
+
accountManifests: "/v1/domains/{domainId}/accounts/{accountId}/manifests",
|
|
42
|
+
accountManifest: "/v1/domains/{domainId}/accounts/{accountId}/manifests/{manifestId}",
|
|
43
|
+
accountComplianceConfiguration: "/v1/domains/{domainId}/accounts/{accountId}/compliance-configuration",
|
|
44
|
+
complianceConfigurations: "/v1/domains/{domainId}/compliance-configurations",
|
|
45
|
+
// Addresses
|
|
46
|
+
addresses: "/v1/addresses",
|
|
47
|
+
// Endpoints
|
|
48
|
+
endpoints: "/v1/domains/{domainId}/endpoints",
|
|
49
|
+
endpoint: "/v1/domains/{domainId}/endpoints/{endpointId}",
|
|
50
|
+
// Transactions
|
|
51
|
+
transactionOrders: "/v1/domains/{domainId}/transactions/orders",
|
|
52
|
+
transactionOrder: "/v1/domains/{domainId}/transactions/orders/{transactionOrderId}",
|
|
53
|
+
transactionTransfers: "/v1/domains/{domainId}/transactions/transfers",
|
|
54
|
+
transactionTransfer: "/v1/domains/{domainId}/transactions/transfers/{transferId}",
|
|
55
|
+
transactions: "/v1/domains/{domainId}/transactions",
|
|
56
|
+
transaction: "/v1/domains/{domainId}/transactions/{transactionId}",
|
|
57
|
+
transactionsDryRun: "/v1/domains/{domainId}/transactions/dry-run",
|
|
58
|
+
// Tickers
|
|
59
|
+
tickers: "/v1/tickers",
|
|
60
|
+
ticker: "/v1/tickers/{tickerId}",
|
|
61
|
+
// Ledgers
|
|
62
|
+
ledgers: "/v1/ledgers",
|
|
63
|
+
ledger: "/v1/ledgers/{ledgerId}",
|
|
64
|
+
ledgerFees: "/v1/ledgers/{ledgerId}/fees",
|
|
65
|
+
ledgerEthereumCall: "/v1/ledgers/{ledgerId}/ethereum/call",
|
|
66
|
+
trustedLedgers: "/v1/trusted-ledgers",
|
|
67
|
+
trustedLedger: "/v1/trusted-ledgers/{ledgerId}",
|
|
68
|
+
// Requests
|
|
69
|
+
requests: "/v1/domains/{domainId}/requests",
|
|
70
|
+
request: "/v1/domains/{domainId}/requests/{requestId}",
|
|
71
|
+
// Trusted Public Keys
|
|
72
|
+
trustedPublicKeysCollection: "/v1/trusted-public-keys/trusted-collection",
|
|
73
|
+
trustedPublicKeysApi: "/v1/trusted-public-keys/api",
|
|
74
|
+
trustedPublicKeysMessages: "/v1/trusted-public-keys/messages",
|
|
75
|
+
// Events
|
|
76
|
+
events: "/v1/domains/{domainId}/events",
|
|
77
|
+
// Properties
|
|
78
|
+
properties: "/v1/properties",
|
|
79
|
+
// User Invitations
|
|
80
|
+
userInvitations: "/v1/domains/{domainId}/users/invitations",
|
|
81
|
+
userInvitation: "/v1/domains/{domainId}/users/invitations/{id}",
|
|
82
|
+
userInvitationCancel: "/v1/domains/{domainId}/users/invitations/{id}/cancel",
|
|
83
|
+
userInvitationRenew: "/v1/domains/{domainId}/users/invitations/{id}/renew",
|
|
84
|
+
userInvitationComplete: "/v1/domains/{domainId}/users/invitations/{id}/complete",
|
|
85
|
+
publicUserInvitation: "/v1/users/invitations/{idOrCode}",
|
|
86
|
+
// Virtual Ledgers
|
|
87
|
+
virtualLedgers: "/v1/domains/{domainId}/virtual-ledgers",
|
|
88
|
+
virtualLedger: "/v1/domains/{domainId}/virtual-ledgers/{virtualLedgerId}",
|
|
89
|
+
virtualLedgerBalances: "/v1/domains/{domainId}/virtual-ledgers/{virtualLedgerId}/balances",
|
|
90
|
+
virtualLedgerAccounts: "/v1/domains/{domainId}/virtual-ledgers/{virtualLedgerId}/accounts",
|
|
91
|
+
virtualLedgerAccount: "/v1/domains/{domainId}/virtual-ledgers/{virtualLedgerId}/accounts/{accountId}",
|
|
92
|
+
virtualLedgerAccountBalances: "/v1/domains/{domainId}/virtual-ledgers/{virtualLedgerId}/accounts/{accountId}/balances",
|
|
93
|
+
virtualLedgerAccountDepositIdentificationSources: "/v1/domains/{domainId}/virtual-ledgers/{virtualLedgerId}/accounts/{accountId}/deposit-identification-sources",
|
|
94
|
+
virtualLedgerAccountAddresses: "/v1/domains/{domainId}/virtual-ledgers/{virtualLedgerId}/accounts/{accountId}/addresses",
|
|
95
|
+
virtualLedgerOperations: "/v1/domains/{domainId}/virtual-ledgers/{virtualLedgerId}/operations",
|
|
96
|
+
virtualLedgerTransfers: "/v1/domains/{domainId}/virtual-ledgers/{virtualLedgerId}/transfers",
|
|
97
|
+
// Channels
|
|
98
|
+
channels: "/v1/domains/{domainId}/channels",
|
|
99
|
+
channel: "/v1/domains/{domainId}/channels/{channelId}",
|
|
100
|
+
channelTest: "/v1/domains/{domainId}/channels/{channelId}/test",
|
|
101
|
+
channelEvents: "/v1/domains/{domainId}/channels/{channelId}/events",
|
|
102
|
+
channelEvent: "/v1/domains/{domainId}/channels/{channelId}/events/{eventId}",
|
|
103
|
+
channelsEvents: "/v1/domains/{domainId}/channels/events",
|
|
104
|
+
// Genesis
|
|
105
|
+
genesis: "/v1/genesis",
|
|
106
|
+
});
|
|
107
|
+
// Type for the URLs object that ensures all values are valid paths
|
|
108
|
+
// export type URLs = typeof URLs
|
|
109
|
+
//# sourceMappingURL=urls.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"urls.js","sourceRoot":"","sources":["../../src/constants/urls.ts"],"names":[],"mappings":"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"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"async.d.ts","sourceRoot":"","sources":["../../../src/helpers/async/async.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,eAAO,MAAM,KAAK,GAAI,IAAI,MAAM,KAAG,OAAO,CAAC,IAAI,CACI,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"async.js","sourceRoot":"","sources":["../../../src/helpers/async/async.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,MAAM,CAAC,MAAM,KAAK,GAAG,CAAC,EAAU,EAAiB,EAAE,CACjD,IAAI,OAAO,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC,UAAU,CAAC,OAAO,EAAE,EAAE,CAAC,CAAC,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/helpers/async/index.ts"],"names":[],"mappings":"AAAA,cAAc,YAAY,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/helpers/async/index.ts"],"names":[],"mappings":"AAAA,cAAc,YAAY,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/helpers/index.ts"],"names":[],"mappings":"AAAA,cAAc,kBAAkB,CAAA;AAChC,cAAc,uBAAuB,CAAA;AACrC,cAAc,gBAAgB,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/helpers/index.ts"],"names":[],"mappings":"AAAA,cAAc,kBAAkB,CAAA;AAChC,cAAc,uBAAuB,CAAA;AACrC,cAAc,gBAAgB,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/helpers/typeof-fns/index.ts"],"names":[],"mappings":"AAAA,cAAc,iBAAiB,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/helpers/typeof-fns/index.ts"],"names":[],"mappings":"AAAA,cAAc,iBAAiB,CAAA"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/** Determines if a value is a function type. */
|
|
2
|
+
export declare const isFunction: (thing: unknown) => thing is (...args: unknown[]) => unknown;
|
|
3
|
+
/** Determines if a value is a numeric type (int or float). */
|
|
4
|
+
export declare const isNumber: (thing: unknown) => thing is number;
|
|
5
|
+
/** Determins if a value is string type. */
|
|
6
|
+
export declare const isString: (thing: unknown) => thing is string;
|
|
7
|
+
/** Determines if a value is the special type `undefined`. */
|
|
8
|
+
export declare const isUndefined: (thing: unknown) => thing is undefined;
|
|
9
|
+
/** Determines if a value is an object (excluding arrays and functions). */
|
|
10
|
+
export declare const isObject: <T = Record<string, any>>(thing: unknown) => thing is T;
|
|
11
|
+
/** Determines if a value is boolean type. */
|
|
12
|
+
export declare const isBoolean: (thing: unknown) => thing is boolean;
|
|
13
|
+
export declare const isDate: (thing: unknown) => thing is Date;
|
|
14
|
+
/** Determines if a value is a UUID. */
|
|
15
|
+
export declare const isUUID: (str: string) => boolean;
|
|
16
|
+
/** Determines if a value is a stringified object. */
|
|
17
|
+
export declare const isStringifiedObject: (str: unknown) => boolean;
|
|
18
|
+
//# sourceMappingURL=typeof-fns.d.ts.map
|