@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
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { Core_DryRunTransactionParameters, Core_TransactionDetails, Core_TransactionDryRun, Core_TransactionsCollection, Core_TransferDetails, Core_TransfersCollection, Core_TrustedTransactionOrderDetails, Core_TrustedTransactionOrdersCollection, DryRunTransactionPathParams, GetTransactionDetailsPathParams, GetTransactionOrderDetailsPathParams, GetTransactionOrdersPathParams, GetTransactionOrdersQueryParams, GetTransactionsPathParams, GetTransactionsQueryParams, GetTransferDetailsPathParams, TransferTransactionOrderPathParams, TransferTransactionOrderQueryParams } from "../services/transactions/transactions.types.js";
|
|
2
|
+
import type { TypedTransport } from "../transport/index.js";
|
|
3
|
+
export declare function createTransactions(t: TypedTransport): {
|
|
4
|
+
readonly orders: (params: GetTransactionOrdersPathParams, query?: GetTransactionOrdersQueryParams) => Promise<Core_TrustedTransactionOrdersCollection>;
|
|
5
|
+
readonly order: (params: GetTransactionOrderDetailsPathParams) => Promise<Core_TrustedTransactionOrderDetails>;
|
|
6
|
+
readonly transfers: (params: TransferTransactionOrderPathParams, query?: TransferTransactionOrderQueryParams) => Promise<Core_TransfersCollection>;
|
|
7
|
+
readonly transfer: (params: GetTransferDetailsPathParams) => Promise<Core_TransferDetails>;
|
|
8
|
+
readonly transactions: (params: GetTransactionsPathParams, query?: GetTransactionsQueryParams) => Promise<Core_TransactionsCollection>;
|
|
9
|
+
readonly transaction: (params: GetTransactionDetailsPathParams) => Promise<Core_TransactionDetails>;
|
|
10
|
+
readonly dryRun: (params: DryRunTransactionPathParams, body: Core_DryRunTransactionParameters) => Promise<Core_TransactionDryRun>;
|
|
11
|
+
};
|
|
12
|
+
//# sourceMappingURL=transactions.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"transactions.d.ts","sourceRoot":"","sources":["../../src/namespaces/transactions.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EACV,gCAAgC,EAChC,uBAAuB,EACvB,sBAAsB,EACtB,2BAA2B,EAC3B,oBAAoB,EACpB,wBAAwB,EACxB,mCAAmC,EACnC,uCAAuC,EACvC,2BAA2B,EAC3B,+BAA+B,EAC/B,oCAAoC,EACpC,8BAA8B,EAC9B,+BAA+B,EAC/B,yBAAyB,EACzB,0BAA0B,EAC1B,4BAA4B,EAC5B,kCAAkC,EAClC,mCAAmC,EACpC,MAAM,gDAAgD,CAAA;AACvD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAA;AAE3D,wBAAgB,kBAAkB,CAAC,CAAC,EAAE,cAAc;8BAGtC,8BAA8B,UAC9B,+BAA+B,KACtC,OAAO,CAAC,uCAAuC,CAAC;6BAIzC,oCAAoC,KAC3C,OAAO,CAAC,mCAAmC,CAAC;iCAGrC,kCAAkC,UAClC,mCAAmC,KAC1C,OAAO,CAAC,wBAAwB,CAAC;gCAEjB,4BAA4B,KAAG,OAAO,CAAC,oBAAoB,CAAC;oCAIrE,yBAAyB,UACzB,0BAA0B,KACjC,OAAO,CAAC,2BAA2B,CAAC;mCAEjB,+BAA+B,KAAG,OAAO,CAAC,uBAAuB,CAAC;8BAI9E,2BAA2B,QAC7B,gCAAgC,KACrC,OAAO,CAAC,sBAAsB,CAAC;EAErC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { URLs } from "../constants/urls.js";
|
|
2
|
+
export function createTransactions(t) {
|
|
3
|
+
return {
|
|
4
|
+
orders: (params, query) => t.get(URLs.transactionOrders, params, query),
|
|
5
|
+
order: (params) => t.get(URLs.transactionOrder, params),
|
|
6
|
+
transfers: (params, query) => t.get(URLs.transactionTransfers, params, query),
|
|
7
|
+
transfer: (params) => t.get(URLs.transactionTransfer, params),
|
|
8
|
+
transactions: (params, query) => t.get(URLs.transactions, params, query),
|
|
9
|
+
transaction: (params) => t.get(URLs.transaction, params),
|
|
10
|
+
dryRun: (params, body) => t.post(URLs.transactionsDryRun, body, params),
|
|
11
|
+
};
|
|
12
|
+
}
|
|
13
|
+
//# sourceMappingURL=transactions.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"transactions.js","sourceRoot":"","sources":["../../src/namespaces/transactions.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,sBAAsB,CAAA;AAuB3C,MAAM,UAAU,kBAAkB,CAAC,CAAiB;IAClD,OAAO;QACL,MAAM,EAAE,CACN,MAAsC,EACtC,KAAuC,EACW,EAAE,CACpD,CAAC,CAAC,GAAG,CAAC,IAAI,CAAC,iBAAiB,EAAE,MAAM,EAAE,KAAK,CAAC;QAE9C,KAAK,EAAE,CACL,MAA4C,EACE,EAAE,CAAC,CAAC,CAAC,GAAG,CAAC,IAAI,CAAC,gBAAgB,EAAE,MAAM,CAAC;QAEvF,SAAS,EAAE,CACT,MAA0C,EAC1C,KAA2C,EACR,EAAE,CAAC,CAAC,CAAC,GAAG,CAAC,IAAI,CAAC,oBAAoB,EAAE,MAAM,EAAE,KAAK,CAAC;QAEvF,QAAQ,EAAE,CAAC,MAAoC,EAAiC,EAAE,CAChF,CAAC,CAAC,GAAG,CAAC,IAAI,CAAC,mBAAmB,EAAE,MAAM,CAAC;QAEzC,YAAY,EAAE,CACZ,MAAiC,EACjC,KAAkC,EACI,EAAE,CAAC,CAAC,CAAC,GAAG,CAAC,IAAI,CAAC,YAAY,EAAE,MAAM,EAAE,KAAK,CAAC;QAElF,WAAW,EAAE,CAAC,MAAuC,EAAoC,EAAE,CACzF,CAAC,CAAC,GAAG,CAAC,IAAI,CAAC,WAAW,EAAE,MAAM,CAAC;QAEjC,MAAM,EAAE,CACN,MAAmC,EACnC,IAAsC,EACL,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,kBAAkB,EAAE,IAAI,EAAE,MAAM,CAAC;KAC3E,CAAA;AACZ,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { CancelUserInvitationPathParams, CompleteUserInvitationPathParams, CoreExtensions_InvitationAnswerIn, CoreExtensions_InvitationIn, CoreExtensions_InvitationOut, CoreExtensions_PublicInvitationOut, CreateUserInvitationPathParams, FillUserInvitationPathParams, GetPublicUserInvitationPathParams, GetUserInvitationPathParams, GetUserInvitationsPathParams, GetUserInvitationsQueryParams, RenewUserInvitationPathParams } from "../services/user-invitations/user-invitations.types.js";
|
|
2
|
+
import type { TypedTransport } from "../transport/index.js";
|
|
3
|
+
export declare function createUserInvitations(t: TypedTransport): {
|
|
4
|
+
readonly list: (pathParams: GetUserInvitationsPathParams, query?: GetUserInvitationsQueryParams) => Promise<CoreExtensions_InvitationOut>;
|
|
5
|
+
readonly get: (params: GetUserInvitationPathParams) => Promise<CoreExtensions_InvitationOut>;
|
|
6
|
+
readonly create: (pathParams: CreateUserInvitationPathParams, body: CoreExtensions_InvitationIn) => Promise<CoreExtensions_InvitationOut>;
|
|
7
|
+
readonly fill: (pathParams: FillUserInvitationPathParams, body: CoreExtensions_InvitationAnswerIn) => Promise<void>;
|
|
8
|
+
readonly cancel: (pathParams: CancelUserInvitationPathParams) => Promise<CoreExtensions_InvitationOut>;
|
|
9
|
+
readonly renew: (pathParams: RenewUserInvitationPathParams) => Promise<CoreExtensions_InvitationOut>;
|
|
10
|
+
readonly complete: (pathParams: CompleteUserInvitationPathParams) => Promise<CoreExtensions_InvitationOut>;
|
|
11
|
+
readonly getPublic: (pathParams: GetPublicUserInvitationPathParams) => Promise<CoreExtensions_PublicInvitationOut>;
|
|
12
|
+
};
|
|
13
|
+
//# sourceMappingURL=user-invitations.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"user-invitations.d.ts","sourceRoot":"","sources":["../../src/namespaces/user-invitations.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EACV,8BAA8B,EAC9B,gCAAgC,EAChC,iCAAiC,EACjC,2BAA2B,EAC3B,4BAA4B,EAC5B,kCAAkC,EAClC,8BAA8B,EAC9B,4BAA4B,EAC5B,iCAAiC,EACjC,2BAA2B,EAC3B,4BAA4B,EAC5B,6BAA6B,EAC7B,6BAA6B,EAC9B,MAAM,wDAAwD,CAAA;AAC/D,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAA;AAE3D,wBAAgB,qBAAqB,CAAC,CAAC,EAAE,cAAc;gCAGrC,4BAA4B,UAChC,6BAA6B,KACpC,OAAO,CAAC,4BAA4B,CAAC;2BAE1B,2BAA2B,KAAG,OAAO,CAAC,4BAA4B,CAAC;kCAInE,8BAA8B,QACpC,2BAA2B,KAChC,OAAO,CAAC,4BAA4B,CAAC;gCAG1B,4BAA4B,QAClC,iCAAiC,KACtC,OAAO,CAAC,IAAI,CAAC;kCAEK,8BAA8B,KAAG,OAAO,CAAC,4BAA4B,CAAC;iCAGvE,6BAA6B,KAAG,OAAO,CAAC,4BAA4B,CAAC;oCAI3E,gCAAgC,KAC3C,OAAO,CAAC,4BAA4B,CAAC;qCAI1B,iCAAiC,KAC5C,OAAO,CAAC,kCAAkC,CAAC;EAEjD"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { URLs } from "../constants/urls.js";
|
|
2
|
+
export function createUserInvitations(t) {
|
|
3
|
+
return {
|
|
4
|
+
list: (pathParams, query) => t.get(URLs.userInvitations, pathParams, query),
|
|
5
|
+
get: (params) => t.get(URLs.userInvitation, params),
|
|
6
|
+
create: (pathParams, body) => t.post(URLs.userInvitations, body, pathParams),
|
|
7
|
+
fill: (pathParams, body) => t.post(URLs.publicUserInvitation, body, pathParams),
|
|
8
|
+
cancel: (pathParams) => t.post(URLs.userInvitationCancel, undefined, pathParams),
|
|
9
|
+
renew: (pathParams) => t.post(URLs.userInvitationRenew, undefined, pathParams),
|
|
10
|
+
complete: (pathParams) => t.post(URLs.userInvitationComplete, undefined, pathParams),
|
|
11
|
+
getPublic: (pathParams) => t.get(URLs.publicUserInvitation, pathParams),
|
|
12
|
+
};
|
|
13
|
+
}
|
|
14
|
+
//# sourceMappingURL=user-invitations.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"user-invitations.js","sourceRoot":"","sources":["../../src/namespaces/user-invitations.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,sBAAsB,CAAA;AAkB3C,MAAM,UAAU,qBAAqB,CAAC,CAAiB;IACrD,OAAO;QACL,IAAI,EAAE,CACJ,UAAwC,EACxC,KAAqC,EACE,EAAE,CAAC,CAAC,CAAC,GAAG,CAAC,IAAI,CAAC,eAAe,EAAE,UAAU,EAAE,KAAK,CAAC;QAE1F,GAAG,EAAE,CAAC,MAAmC,EAAyC,EAAE,CAClF,CAAC,CAAC,GAAG,CAAC,IAAI,CAAC,cAAc,EAAE,MAAM,CAAC;QAEpC,MAAM,EAAE,CACN,UAA0C,EAC1C,IAAiC,EACM,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,eAAe,EAAE,IAAI,EAAE,UAAU,CAAC;QAE1F,IAAI,EAAE,CACJ,UAAwC,EACxC,IAAuC,EACxB,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,oBAAoB,EAAE,IAAI,EAAE,UAAU,CAAC;QAEvE,MAAM,EAAE,CAAC,UAA0C,EAAyC,EAAE,CAC5F,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,oBAAoB,EAAE,SAAS,EAAE,UAAU,CAAC;QAE1D,KAAK,EAAE,CAAC,UAAyC,EAAyC,EAAE,CAC1F,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,mBAAmB,EAAE,SAAS,EAAE,UAAU,CAAC;QAEzD,QAAQ,EAAE,CACR,UAA4C,EACL,EAAE,CACzC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,sBAAsB,EAAE,SAAS,EAAE,UAAU,CAAC;QAE5D,SAAS,EAAE,CACT,UAA6C,EACA,EAAE,CAAC,CAAC,CAAC,GAAG,CAAC,IAAI,CAAC,oBAAoB,EAAE,UAAU,CAAC;KACtF,CAAA;AACZ,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { Core_ApiRoles, Core_MeReference, Core_TrustedUser, Core_TrustedUsersCollection, GetKnownUserRolesPathParams, GetUserPathParams, GetUsersPathParams, GetUsersQueryParams } from "../services/users/users.types.js";
|
|
2
|
+
import type { TypedTransport } from "../transport/index.js";
|
|
3
|
+
export declare function createUsers(t: TypedTransport): {
|
|
4
|
+
readonly list: (params: GetUsersPathParams, query?: GetUsersQueryParams) => Promise<Core_TrustedUsersCollection>;
|
|
5
|
+
readonly knownRoles: (params: GetKnownUserRolesPathParams) => Promise<Core_ApiRoles>;
|
|
6
|
+
readonly get: (params: GetUserPathParams) => Promise<Core_TrustedUser>;
|
|
7
|
+
readonly me: () => Promise<Core_MeReference>;
|
|
8
|
+
};
|
|
9
|
+
//# sourceMappingURL=users.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"users.d.ts","sourceRoot":"","sources":["../../src/namespaces/users.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EACV,aAAa,EACb,gBAAgB,EAChB,gBAAgB,EAChB,2BAA2B,EAC3B,2BAA2B,EAC3B,iBAAiB,EACjB,kBAAkB,EAClB,mBAAmB,EACpB,MAAM,kCAAkC,CAAA;AACzC,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAA;AAE3D,wBAAgB,WAAW,CAAC,CAAC,EAAE,cAAc;4BAG/B,kBAAkB,UAClB,mBAAmB,KAC1B,OAAO,CAAC,2BAA2B,CAAC;kCAElB,2BAA2B,KAAG,OAAO,CAAC,aAAa,CAAC;2BAG3D,iBAAiB,KAAG,OAAO,CAAC,gBAAgB,CAAC;uBAEnD,OAAO,CAAC,gBAAgB,CAAC;EAEpC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { URLs } from "../constants/urls.js";
|
|
2
|
+
export function createUsers(t) {
|
|
3
|
+
return {
|
|
4
|
+
list: (params, query) => t.get(URLs.users, params, query),
|
|
5
|
+
knownRoles: (params) => t.get(URLs.userRoles, params),
|
|
6
|
+
get: (params) => t.get(URLs.user, params),
|
|
7
|
+
me: () => t.get(URLs.me),
|
|
8
|
+
};
|
|
9
|
+
}
|
|
10
|
+
//# sourceMappingURL=users.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"users.js","sourceRoot":"","sources":["../../src/namespaces/users.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,sBAAsB,CAAA;AAa3C,MAAM,UAAU,WAAW,CAAC,CAAiB;IAC3C,OAAO;QACL,IAAI,EAAE,CACJ,MAA0B,EAC1B,KAA2B,EACW,EAAE,CAAC,CAAC,CAAC,GAAG,CAAC,IAAI,CAAC,KAAK,EAAE,MAAM,EAAE,KAAK,CAAC;QAE3E,UAAU,EAAE,CAAC,MAAmC,EAA0B,EAAE,CAC1E,CAAC,CAAC,GAAG,CAAC,IAAI,CAAC,SAAS,EAAE,MAAM,CAAC;QAE/B,GAAG,EAAE,CAAC,MAAyB,EAA6B,EAAE,CAAC,CAAC,CAAC,GAAG,CAAC,IAAI,CAAC,IAAI,EAAE,MAAM,CAAC;QAEvF,EAAE,EAAE,GAA8B,EAAE,CAAC,CAAC,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE,CAAC;KAC3C,CAAA;AACZ,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { Core_ApiVault, Core_ExportPreparedOperationsResponse, Core_VaultsCollection, ExportPreparedOperationsPathParams, GetVaultPathParams, GetVaultsQueryParams, ImportPreparedOperationsRequestBody } from "../services/vaults/vaults.types.js";
|
|
2
|
+
import type { TypedTransport } from "../transport/index.js";
|
|
3
|
+
export declare function createVaults(t: TypedTransport): {
|
|
4
|
+
readonly list: (queryParams?: GetVaultsQueryParams) => Promise<Core_VaultsCollection>;
|
|
5
|
+
readonly get: (params: GetVaultPathParams) => Promise<Core_ApiVault>;
|
|
6
|
+
readonly exportPreparedOperations: (params: ExportPreparedOperationsPathParams) => Promise<Core_ExportPreparedOperationsResponse>;
|
|
7
|
+
readonly importPreparedOperations: (body: ImportPreparedOperationsRequestBody) => Promise<void>;
|
|
8
|
+
};
|
|
9
|
+
//# sourceMappingURL=vaults.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"vaults.d.ts","sourceRoot":"","sources":["../../src/namespaces/vaults.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EACV,aAAa,EACb,qCAAqC,EACrC,qBAAqB,EACrB,kCAAkC,EAClC,kBAAkB,EAClB,oBAAoB,EACpB,mCAAmC,EACpC,MAAM,oCAAoC,CAAA;AAC3C,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAA;AAE3D,wBAAgB,YAAY,CAAC,CAAC,EAAE,cAAc;kCAErB,oBAAoB,KAAG,OAAO,CAAC,qBAAqB,CAAC;2BAG5D,kBAAkB,KAAG,OAAO,CAAC,aAAa,CAAC;gDAG/C,kCAAkC,KACzC,OAAO,CAAC,qCAAqC,CAAC;8CAGhB,mCAAmC,KAAG,OAAO,CAAC,IAAI,CAAC;EAKvF"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { URLs } from "../constants/urls.js";
|
|
2
|
+
export function createVaults(t) {
|
|
3
|
+
return {
|
|
4
|
+
list: (queryParams) => t.get(URLs.vaults, undefined, queryParams ?? {}),
|
|
5
|
+
get: (params) => t.get(URLs.vault, params),
|
|
6
|
+
exportPreparedOperations: (params) => t.get(URLs.vaultOperationsPrepared, params),
|
|
7
|
+
importPreparedOperations: (body) => t.post(URLs.vaultOperationsSigned, body.files, undefined, {
|
|
8
|
+
headers: { "Content-Type": "multipart/form-data" },
|
|
9
|
+
}),
|
|
10
|
+
};
|
|
11
|
+
}
|
|
12
|
+
//# sourceMappingURL=vaults.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"vaults.js","sourceRoot":"","sources":["../../src/namespaces/vaults.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,sBAAsB,CAAA;AAY3C,MAAM,UAAU,YAAY,CAAC,CAAiB;IAC5C,OAAO;QACL,IAAI,EAAE,CAAC,WAAkC,EAAkC,EAAE,CAC3E,CAAC,CAAC,GAAG,CAAC,IAAI,CAAC,MAAM,EAAE,SAAS,EAAE,WAAW,IAAI,EAAE,CAAC;QAElD,GAAG,EAAE,CAAC,MAA0B,EAA0B,EAAE,CAAC,CAAC,CAAC,GAAG,CAAC,IAAI,CAAC,KAAK,EAAE,MAAM,CAAC;QAEtF,wBAAwB,EAAE,CACxB,MAA0C,EACM,EAAE,CAClD,CAAC,CAAC,GAAG,CAAC,IAAI,CAAC,uBAAuB,EAAE,MAAM,CAAC;QAE7C,wBAAwB,EAAE,CAAC,IAAyC,EAAiB,EAAE,CACrF,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,qBAAqB,EAAE,IAAI,CAAC,KAAK,EAAE,SAAS,EAAE;YACxD,OAAO,EAAE,EAAE,cAAc,EAAE,qBAAqB,EAAE;SACnD,CAAC;KACI,CAAA;AACZ,CAAC"}
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
import type { SubmittableTransaction } from "xrpl";
|
|
2
|
+
import { createAccounts, createChannels, createDomains, createEndpoints, createEvents, createGenesis, createIntents, createLedgers, createPolicies, createRequests, createTickers, createTransactions, createUserInvitations, createUsers, createVaults } from "./namespaces/index.js";
|
|
3
|
+
import type { RippleCustodyClientOptions } from "./ripple-custody.types.js";
|
|
4
|
+
import type { Core_IntentResponse } from "./services/intents/intents.types.js";
|
|
5
|
+
import { type Core_XrplOperation, type RawSignAndWaitOptions, type RawSignAndWaitResult, type XrplIntentOptions } from "./services/xrpl/index.js";
|
|
6
|
+
export declare class RippleCustody {
|
|
7
|
+
private readonly apiService;
|
|
8
|
+
private readonly authService;
|
|
9
|
+
private readonly transport;
|
|
10
|
+
private _xrplService?;
|
|
11
|
+
private get xrplService();
|
|
12
|
+
readonly channels: ReturnType<typeof createChannels>;
|
|
13
|
+
readonly domains: ReturnType<typeof createDomains>;
|
|
14
|
+
readonly endpoints: ReturnType<typeof createEndpoints>;
|
|
15
|
+
readonly events: ReturnType<typeof createEvents>;
|
|
16
|
+
readonly genesis: ReturnType<typeof createGenesis>;
|
|
17
|
+
readonly intents: ReturnType<typeof createIntents>;
|
|
18
|
+
readonly transactions: ReturnType<typeof createTransactions>;
|
|
19
|
+
readonly accounts: ReturnType<typeof createAccounts>;
|
|
20
|
+
readonly users: ReturnType<typeof createUsers>;
|
|
21
|
+
readonly userInvitations: ReturnType<typeof createUserInvitations>;
|
|
22
|
+
readonly tickers: ReturnType<typeof createTickers>;
|
|
23
|
+
readonly ledgers: ReturnType<typeof createLedgers>;
|
|
24
|
+
readonly policies: ReturnType<typeof createPolicies>;
|
|
25
|
+
readonly vaults: ReturnType<typeof createVaults>;
|
|
26
|
+
readonly requests: ReturnType<typeof createRequests>;
|
|
27
|
+
constructor(options: RippleCustodyClientOptions);
|
|
28
|
+
readonly auth: {
|
|
29
|
+
/**
|
|
30
|
+
* @returns The current JWT token.
|
|
31
|
+
*/
|
|
32
|
+
getCurrentToken: () => string | null;
|
|
33
|
+
/**
|
|
34
|
+
* @returns The current JWT token expiration, if available.
|
|
35
|
+
*/
|
|
36
|
+
getTokenExpiration: () => number | null;
|
|
37
|
+
};
|
|
38
|
+
readonly xrpl: {
|
|
39
|
+
/**
|
|
40
|
+
* Propose any XRPL transaction as a custody intent.
|
|
41
|
+
*
|
|
42
|
+
* The `operation` uses a discriminated union on `type` — callers specify
|
|
43
|
+
* which transaction type to propose (e.g. `{ type: "Payment", ... }`).
|
|
44
|
+
* TypeScript autocomplete shows all available operation types and their fields.
|
|
45
|
+
*
|
|
46
|
+
* @param params - The Account address and XRPL operation
|
|
47
|
+
* @param options - Optional configuration for the intent
|
|
48
|
+
* @returns The proposed intent response
|
|
49
|
+
*/
|
|
50
|
+
proposeIntent: (params: {
|
|
51
|
+
Account: string;
|
|
52
|
+
operation: Core_XrplOperation;
|
|
53
|
+
}, options?: XrplIntentOptions) => Promise<Core_IntentResponse>;
|
|
54
|
+
/**
|
|
55
|
+
* Create an XRPL raw sign.
|
|
56
|
+
* @param xrplTransaction - The XRPL transaction details
|
|
57
|
+
* @param options - Optional configuration for the raw sign intent
|
|
58
|
+
* @returns The proposed intent response
|
|
59
|
+
*/
|
|
60
|
+
rawSign: (xrplTransaction: SubmittableTransaction, options?: XrplIntentOptions) => Promise<Core_IntentResponse>;
|
|
61
|
+
/**
|
|
62
|
+
* Raw-signs an XRPL transaction and waits for the manifest signature.
|
|
63
|
+
* If SigningPubKey is not set on the transaction, it will be fetched automatically.
|
|
64
|
+
* @param xrplTransaction - The XRPL transaction details
|
|
65
|
+
* @param options - Optional configuration for the raw sign intent and polling
|
|
66
|
+
* @returns The signature and signing public key in uppercase hex
|
|
67
|
+
*/
|
|
68
|
+
rawSignAndWait: (xrplTransaction: SubmittableTransaction, options?: RawSignAndWaitOptions) => Promise<RawSignAndWaitResult>;
|
|
69
|
+
/**
|
|
70
|
+
* Proposes a raw sign intent for a Batch transaction envelope for a single inner account.
|
|
71
|
+
* @param batch - The autofilled Batch transaction
|
|
72
|
+
* @param signerAddress - The XRPL address of the inner account to sign for
|
|
73
|
+
* @param options - Optional configuration for the raw sign intent
|
|
74
|
+
* @returns The proposed intent response
|
|
75
|
+
*/
|
|
76
|
+
/**
|
|
77
|
+
* Signs a Batch transaction envelope for a single inner account and waits
|
|
78
|
+
* for the manifest signature. Call once per inner account.
|
|
79
|
+
* @param batch - The autofilled Batch transaction
|
|
80
|
+
* @param signerAddress - The XRPL address of the inner account to sign for
|
|
81
|
+
* @param options - Optional configuration for the raw sign intent and polling
|
|
82
|
+
* @returns The signature and signing public key in uppercase hex
|
|
83
|
+
*/
|
|
84
|
+
/**
|
|
85
|
+
* Get the compressed secp256k1 public key for an XRPL account.
|
|
86
|
+
* @param params - The domain ID and account ID
|
|
87
|
+
* @returns The compressed public key in uppercase hex format
|
|
88
|
+
*/
|
|
89
|
+
getPublicKey: (params: {
|
|
90
|
+
domainId: string;
|
|
91
|
+
accountId: string;
|
|
92
|
+
}) => Promise<string>;
|
|
93
|
+
};
|
|
94
|
+
}
|
|
95
|
+
//# sourceMappingURL=ripple-custody.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ripple-custody.d.ts","sourceRoot":"","sources":["../src/ripple-custody.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,MAAM,CAAA;AAClD,OAAO,EACL,cAAc,EACd,cAAc,EACd,aAAa,EACb,eAAe,EACf,YAAY,EACZ,aAAa,EACb,aAAa,EACb,aAAa,EACb,cAAc,EACd,cAAc,EACd,aAAa,EACb,kBAAkB,EAClB,qBAAqB,EACrB,WAAW,EACX,YAAY,EACb,MAAM,uBAAuB,CAAA;AAC9B,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,2BAA2B,CAAA;AAG3E,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,qCAAqC,CAAA;AAC9E,OAAO,EAGL,KAAK,kBAAkB,EACvB,KAAK,qBAAqB,EAC1B,KAAK,oBAAoB,EACzB,KAAK,i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,IAAI;QAClB;;WAEG;;QAGH;;WAEG;;MAEJ;IAGD,SAAgB,IAAI;QAClB;;;;;;;;;;WAUG;gCAEO;YAAE,OAAO,EAAE,MAAM,CAAC;YAAC,SAAS,EAAE,kBAAkB,CAAA;SAAE,YAChD,iBAAiB,KAC1B,OAAO,CAAC,mBAAmB,CAAC;QAE/B;;;;;WAKG;mCAEgB,sBAAsB,YAC7B,iBAAiB,KAC1B,OAAO,CAAC,mBAAmB,CAAC;QAE/B;;;;;;WAMG;0CAEgB,sBAAsB,YAC7B,qBAAqB,KAC9B,OAAO,CAAC,oBAAoB,CAAC;QAEhC;;;;;;WAMG;QAQH;;;;;;;WAOG;QAQH;;;;WAIG;+BAC0B;YAAE,QAAQ,EAAE,MAAM,CAAC;YAAC,SAAS,EAAE,MAAM,CAAA;SAAE,KAAG,OAAO,CAAC,MAAM,CAAC;MAEvF;CACF"}
|
|
@@ -0,0 +1,138 @@
|
|
|
1
|
+
import { createAccounts, createChannels, createDomains, createEndpoints, createEvents, createGenesis, createIntents, createLedgers, createPolicies, createRequests, createTickers, createTransactions, createUserInvitations, createUsers, createVaults, } from "./namespaces/index.js";
|
|
2
|
+
import { ApiService } from "./services/apis/index.js";
|
|
3
|
+
import { AuthService } from "./services/auth/index.js";
|
|
4
|
+
import { createHttpPorts, XrplService, } from "./services/xrpl/index.js";
|
|
5
|
+
import { TypedTransport } from "./transport/index.js";
|
|
6
|
+
export class RippleCustody {
|
|
7
|
+
// Core services (eager initialization - required for all operations)
|
|
8
|
+
apiService;
|
|
9
|
+
authService;
|
|
10
|
+
transport;
|
|
11
|
+
// Lazy-initialized service instances
|
|
12
|
+
_xrplService;
|
|
13
|
+
get xrplService() {
|
|
14
|
+
return (this._xrplService ??= new XrplService(createHttpPorts(this.transport)));
|
|
15
|
+
}
|
|
16
|
+
// Namespace objects built from factory functions
|
|
17
|
+
channels;
|
|
18
|
+
domains;
|
|
19
|
+
endpoints;
|
|
20
|
+
events;
|
|
21
|
+
genesis;
|
|
22
|
+
intents;
|
|
23
|
+
transactions;
|
|
24
|
+
accounts;
|
|
25
|
+
users;
|
|
26
|
+
userInvitations;
|
|
27
|
+
tickers;
|
|
28
|
+
ledgers;
|
|
29
|
+
policies;
|
|
30
|
+
vaults;
|
|
31
|
+
requests;
|
|
32
|
+
constructor(options) {
|
|
33
|
+
const { authUrl, apiUrl, privateKey, publicKey, timeout } = options;
|
|
34
|
+
// Only initialize core services eagerly
|
|
35
|
+
this.authService = new AuthService({ authUrl, timeout });
|
|
36
|
+
this.apiService = new ApiService({
|
|
37
|
+
apiUrl,
|
|
38
|
+
authFormData: {
|
|
39
|
+
publicKey,
|
|
40
|
+
},
|
|
41
|
+
authService: this.authService,
|
|
42
|
+
privateKey,
|
|
43
|
+
timeout,
|
|
44
|
+
});
|
|
45
|
+
this.transport = new TypedTransport(this.apiService);
|
|
46
|
+
// Initialize namespaces from factories
|
|
47
|
+
this.channels = createChannels(this.transport);
|
|
48
|
+
this.domains = createDomains(this.transport);
|
|
49
|
+
this.endpoints = createEndpoints(this.transport);
|
|
50
|
+
this.events = createEvents(this.transport);
|
|
51
|
+
this.genesis = createGenesis(this.transport);
|
|
52
|
+
this.intents = createIntents(this.transport);
|
|
53
|
+
this.transactions = createTransactions(this.transport);
|
|
54
|
+
this.accounts = createAccounts(this.transport);
|
|
55
|
+
this.users = createUsers(this.transport);
|
|
56
|
+
this.userInvitations = createUserInvitations(this.transport);
|
|
57
|
+
this.tickers = createTickers(this.transport);
|
|
58
|
+
this.ledgers = createLedgers(this.transport);
|
|
59
|
+
this.policies = createPolicies(this.transport);
|
|
60
|
+
this.vaults = createVaults(this.transport);
|
|
61
|
+
this.requests = createRequests(this.transport);
|
|
62
|
+
}
|
|
63
|
+
// Auth namespace
|
|
64
|
+
auth = {
|
|
65
|
+
/**
|
|
66
|
+
* @returns The current JWT token.
|
|
67
|
+
*/
|
|
68
|
+
getCurrentToken: () => this.authService.getCurrentToken(),
|
|
69
|
+
/**
|
|
70
|
+
* @returns The current JWT token expiration, if available.
|
|
71
|
+
*/
|
|
72
|
+
getTokenExpiration: () => this.authService.getTokenExpiration(),
|
|
73
|
+
};
|
|
74
|
+
// Xrpl namespace
|
|
75
|
+
xrpl = {
|
|
76
|
+
/**
|
|
77
|
+
* Propose any XRPL transaction as a custody intent.
|
|
78
|
+
*
|
|
79
|
+
* The `operation` uses a discriminated union on `type` — callers specify
|
|
80
|
+
* which transaction type to propose (e.g. `{ type: "Payment", ... }`).
|
|
81
|
+
* TypeScript autocomplete shows all available operation types and their fields.
|
|
82
|
+
*
|
|
83
|
+
* @param params - The Account address and XRPL operation
|
|
84
|
+
* @param options - Optional configuration for the intent
|
|
85
|
+
* @returns The proposed intent response
|
|
86
|
+
*/
|
|
87
|
+
proposeIntent: async (params, options) => this.xrplService.proposeIntent(params, options),
|
|
88
|
+
/**
|
|
89
|
+
* Create an XRPL raw sign.
|
|
90
|
+
* @param xrplTransaction - The XRPL transaction details
|
|
91
|
+
* @param options - Optional configuration for the raw sign intent
|
|
92
|
+
* @returns The proposed intent response
|
|
93
|
+
*/
|
|
94
|
+
rawSign: async (xrplTransaction, options) => this.xrplService.rawSign(xrplTransaction, options),
|
|
95
|
+
/**
|
|
96
|
+
* Raw-signs an XRPL transaction and waits for the manifest signature.
|
|
97
|
+
* If SigningPubKey is not set on the transaction, it will be fetched automatically.
|
|
98
|
+
* @param xrplTransaction - The XRPL transaction details
|
|
99
|
+
* @param options - Optional configuration for the raw sign intent and polling
|
|
100
|
+
* @returns The signature and signing public key in uppercase hex
|
|
101
|
+
*/
|
|
102
|
+
rawSignAndWait: async (xrplTransaction, options) => this.xrplService.rawSignAndWait(xrplTransaction, options),
|
|
103
|
+
/**
|
|
104
|
+
* Proposes a raw sign intent for a Batch transaction envelope for a single inner account.
|
|
105
|
+
* @param batch - The autofilled Batch transaction
|
|
106
|
+
* @param signerAddress - The XRPL address of the inner account to sign for
|
|
107
|
+
* @param options - Optional configuration for the raw sign intent
|
|
108
|
+
* @returns The proposed intent response
|
|
109
|
+
*/
|
|
110
|
+
// rawSignInnerBatch: async (
|
|
111
|
+
// batch: Batch,
|
|
112
|
+
// signerAddress: string,
|
|
113
|
+
// options?: RawSignInnerBatchOptions,
|
|
114
|
+
// ): Promise<Core_IntentResponse> =>
|
|
115
|
+
// this.xrplService.rawSignInnerBatch(batch, signerAddress, options),
|
|
116
|
+
/**
|
|
117
|
+
* Signs a Batch transaction envelope for a single inner account and waits
|
|
118
|
+
* for the manifest signature. Call once per inner account.
|
|
119
|
+
* @param batch - The autofilled Batch transaction
|
|
120
|
+
* @param signerAddress - The XRPL address of the inner account to sign for
|
|
121
|
+
* @param options - Optional configuration for the raw sign intent and polling
|
|
122
|
+
* @returns The signature and signing public key in uppercase hex
|
|
123
|
+
*/
|
|
124
|
+
// rawSignInnerBatchAndWait: async (
|
|
125
|
+
// batch: Batch,
|
|
126
|
+
// signerAddress: string,
|
|
127
|
+
// options?: RawSignInnerBatchOptions,
|
|
128
|
+
// ): Promise<RawSignInnerBatchAndWaitResult> =>
|
|
129
|
+
// this.xrplService.rawSignInnerBatchAndWait(batch, signerAddress, options),
|
|
130
|
+
/**
|
|
131
|
+
* Get the compressed secp256k1 public key for an XRPL account.
|
|
132
|
+
* @param params - The domain ID and account ID
|
|
133
|
+
* @returns The compressed public key in uppercase hex format
|
|
134
|
+
*/
|
|
135
|
+
getPublicKey: async (params) => this.xrplService.getPublicKey(params),
|
|
136
|
+
};
|
|
137
|
+
}
|
|
138
|
+
//# sourceMappingURL=ripple-custody.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ripple-custody.js","sourceRoot":"","sources":["../src/ripple-custody.ts"],"names":[],"mappings":"AACA,OAAO,EACL,cAAc,EACd,cAAc,EACd,aAAa,EACb,eAAe,EACf,YAAY,EACZ,aAAa,EACb,aAAa,EACb,aAAa,EACb,cAAc,EACd,cAAc,EACd,aAAa,EACb,kBAAkB,EAClB,qBAAqB,EACrB,WAAW,EACX,YAAY,G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B;;WAEG;QACH,eAAe,EAAE,GAAG,EAAE,CAAC,IAAI,CAAC,WAAW,CAAC,eAAe,EAAE;QAEzD;;WAEG;QACH,kBAAkB,EAAE,GAAG,EAAE,CAAC,IAAI,CAAC,WAAW,CAAC,kBAAkB,EAAE;KAChE,CAAA;IAED,iBAAiB;IACD,IAAI,GAAG;QACrB;;;;;;;;;;WAUG;QACH,aAAa,EAAE,KAAK,EAClB,MAA0D,EAC1D,OAA2B,EACG,EAAE,CAAC,IAAI,CAAC,WAAW,CAAC,aAAa,CAAC,MAAM,EAAE,OAAO,CAAC;QAElF;;;;;WAKG;QACH,OAAO,EAAE,KAAK,EACZ,eAAuC,EACvC,OAA2B,EACG,EAAE,CAAC,IAAI,CAAC,WAAW,CAAC,OAAO,CAAC,eAAe,EAAE,OAAO,CAAC;QAErF;;;;;;WAMG;QACH,cAAc,EAAE,KAAK,EACnB,eAAuC,EACvC,OAA+B,EACA,EAAE,CAAC,IAAI,CAAC,WAAW,CAAC,cAAc,CAAC,eAAe,EAAE,OAAO,CAAC;QAE7F;;;;;;WAMG;QACH,6BAA6B;QAC7B,kBAAkB;QAClB,2BAA2B;QAC3B,wCAAwC;QACxC,qCAAqC;QACrC,uEAAuE;QAEvE;;;;;;;WAOG;QACH,oCAAoC;QACpC,kBAAkB;QAClB,2BAA2B;QAC3B,wCAAwC;QACxC,gDAAgD;QAChD,8EAA8E;QAE9E;;;;WAIG;QACH,YAAY,EAAE,KAAK,EAAE,MAA+C,EAAmB,EAAE,CACvF,IAAI,CAAC,WAAW,CAAC,YAAY,CAAC,MAAM,CAAC;KACxC,CAAA;CACF"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
export type RippleCustodyClientOptions = {
|
|
2
|
+
/**
|
|
3
|
+
* API URL for the API endpoints
|
|
4
|
+
*
|
|
5
|
+
* Example: "https://api.metaco.8rey62.m3t4c0.services"
|
|
6
|
+
*/
|
|
7
|
+
apiUrl: string;
|
|
8
|
+
/**
|
|
9
|
+
* Authentication URL for the API endpoints
|
|
10
|
+
*
|
|
11
|
+
* Example: "https://auth.metaco.8rey62.m3t4c0.services"
|
|
12
|
+
*/
|
|
13
|
+
authUrl: string;
|
|
14
|
+
/**
|
|
15
|
+
* Private key for signing requests
|
|
16
|
+
*/
|
|
17
|
+
privateKey: string;
|
|
18
|
+
/**
|
|
19
|
+
* Public key for authentication
|
|
20
|
+
*/
|
|
21
|
+
publicKey: string;
|
|
22
|
+
/**
|
|
23
|
+
* Request timeout in milliseconds.
|
|
24
|
+
*
|
|
25
|
+
* @default 30000 (30 seconds)
|
|
26
|
+
*/
|
|
27
|
+
timeout?: number;
|
|
28
|
+
};
|
|
29
|
+
//# sourceMappingURL=ripple-custody.types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ripple-custody.types.d.ts","sourceRoot":"","sources":["../src/ripple-custody.types.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,0BAA0B,GAAG;IACvC;;;;OAIG;IACH,MAAM,EAAE,MAAM,CAAA;IACd;;;;OAIG;IACH,OAAO,EAAE,MAAM,CAAA;IACf;;OAEG;IACH,UAAU,EAAE,MAAM,CAAA;IAClB;;OAEG;IACH,SAAS,EAAE,MAAM,CAAA;IACjB;;;;OAIG;IACH,OAAO,CAAC,EAAE,MAAM,CAAA;CACjB,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ripple-custody.types.js","sourceRoot":"","sources":["../src/ripple-custody.types.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import type { components, operations } from "../../models/custody-types.js";
|
|
2
|
+
import type { LedgerId } from "../../models/ledger-ids.js";
|
|
3
|
+
export type GetAccountsPathParams = operations["getAccounts"]["parameters"]["path"];
|
|
4
|
+
export type GetAccountsQueryParams = operations["getAccounts"]["parameters"]["query"];
|
|
5
|
+
export type GetAllDomainsAddressesQueryParams = operations["getAllDomainsAddresses"]["parameters"]["query"];
|
|
6
|
+
export type GetAccountPathParams = operations["getAccount"]["parameters"]["path"];
|
|
7
|
+
export type GetAccountQueryParams = operations["getAccount"]["parameters"]["query"];
|
|
8
|
+
export type GetAddressesPathParams = operations["getAddresses"]["parameters"]["path"];
|
|
9
|
+
export type GetAddressesQueryParams = operations["getAddresses"]["parameters"]["query"];
|
|
10
|
+
export type GenerateNewAccountExternalAddressDeprecatedPathParams = operations["generateNewExternalAddressDeprecated"]["parameters"]["path"];
|
|
11
|
+
export type GenerateNewAccountExternalAddressDeprecatedQueryParams = operations["generateNewExternalAddressDeprecated"]["parameters"]["query"];
|
|
12
|
+
export type GenerateNewExternalAddressPathParams = operations["generateNewExternalAddress"]["parameters"]["path"];
|
|
13
|
+
export type GetAccountAddressPathParams = operations["getAccountAddress"]["parameters"]["path"];
|
|
14
|
+
export type GetAccountBalancesPathParams = operations["getAccountBalances"]["parameters"]["path"];
|
|
15
|
+
export type GetAccountBalancesQueryParams = operations["getAccountBalances"]["parameters"]["query"];
|
|
16
|
+
export type ForceUpdateAccountBalancesPathParams = operations["forceUpdateAccountBalances"]["parameters"]["path"];
|
|
17
|
+
export type ForceUpdateAccountBalancesQueryParams = operations["forceUpdateAccountBalances"]["parameters"]["query"];
|
|
18
|
+
export type GetManifestsPathParams = operations["getManifests"]["parameters"]["path"];
|
|
19
|
+
export type GetManifestsQueryParams = operations["getManifests"]["parameters"]["query"];
|
|
20
|
+
export type GetManifestPathParams = operations["getManifest"]["parameters"]["path"];
|
|
21
|
+
export type ListComplianceConfigurationsPathParams = operations["listComplianceConfigurations"]["parameters"]["path"];
|
|
22
|
+
export type ListComplianceConfigurationsQueryParams = operations["listComplianceConfigurations"]["parameters"]["query"];
|
|
23
|
+
export type GetComplianceConfigurationPathParams = operations["getComplianceConfiguration"]["parameters"]["path"];
|
|
24
|
+
export type UpsertComplianceConfigurationPathParams = operations["upsertComplianceConfiguration"]["parameters"]["path"];
|
|
25
|
+
export type UpsertComplianceConfigurationBody = operations["upsertComplianceConfiguration"]["requestBody"]["content"]["application/json"];
|
|
26
|
+
export type Core_AccountsCollection = operations["getAccounts"]["responses"]["200"]["content"]["application/json"];
|
|
27
|
+
export type Core_AddressReferenceCollection = operations["getAllDomainsAddresses"]["responses"]["200"]["content"]["application/json"];
|
|
28
|
+
export type Core_AccountAddressReference = components["schemas"]["Core_AccountAddressReference"];
|
|
29
|
+
export type Core_ApiAccount = operations["getAccount"]["responses"]["200"]["content"]["application/json"];
|
|
30
|
+
export type Core_AddressesCollection = operations["getAddresses"]["responses"]["200"]["content"]["application/json"];
|
|
31
|
+
export type Core_AccountAddress = operations["getAccountAddress"]["responses"]["200"]["content"]["application/json"];
|
|
32
|
+
export type Core_BalancesCollection = operations["getAccountBalances"]["responses"]["200"]["content"]["application/json"];
|
|
33
|
+
export type Core_ManifestsCollection = operations["getManifests"]["responses"]["200"]["content"]["application/json"];
|
|
34
|
+
export type Core_ApiManifest = operations["getManifest"]["responses"]["200"]["content"]["application/json"];
|
|
35
|
+
export type Core_ComplianceConfigurationsCollection = operations["listComplianceConfigurations"]["responses"]["200"]["content"]["application/json"];
|
|
36
|
+
export type Core_ComplianceConfiguration = operations["getComplianceConfiguration"]["responses"]["200"]["content"]["application/json"];
|
|
37
|
+
/**
|
|
38
|
+
* Optional filters for {@link findByAddress} / {@link findByAddressOrThrow}.
|
|
39
|
+
* Both filters are applied client-side; the `/v1/addresses` endpoint only
|
|
40
|
+
* accepts `address` as a query parameter.
|
|
41
|
+
*/
|
|
42
|
+
export type FindByAddressOptions = {
|
|
43
|
+
/** Disambiguates when the same address exists on multiple ledgers. */
|
|
44
|
+
ledgerId?: LedgerId;
|
|
45
|
+
/** Disambiguates when the same address belongs to multiple domains. */
|
|
46
|
+
domainId?: string;
|
|
47
|
+
};
|
|
48
|
+
//# sourceMappingURL=accounts.types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"accounts.types.d.ts","sourceRoot":"","sources":["../../../src/services/accounts/accounts.types.ts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MAAM,MAAM,uCAAuC,GACjD,UAAU,CAAC,8BAA8B,CAAC,CAAC,WAAW,CAAC,CAAC,KAAK,CAAC,CAAC,SAAS,CAAC,CAAC,kBAAkB,CAAC,CAAA;AAE/F,MAAM,MAAM,4BAA4B,GACtC,UAAU,CAAC,4BAA4B,CAAC,CAAC,WAAW,CAAC,CAAC,KAAK,CAAC,CAAC,SAAS,CAAC,CAAC,kBAAkB,CAAC,CAAA;AAE7F;;;;GAIG;AACH,MAAM,MAAM,oBAAoB,GAAG;IACjC,sEAAsE;IACtE,QAAQ,CAAC,EAAE,QAAQ,CAAA;IACnB,uEAAuE;IACvE,QAAQ,CAAC,EAAE,MAAM,CAAA;CAClB,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"accounts.types.js","sourceRoot":"","sources":["../../../src/services/accounts/accounts.types.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/services/accounts/index.ts"],"names":[],"mappings":"AAAA,cAAc,qBAAqB,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/services/accounts/index.ts"],"names":[],"mappings":"AAAA,cAAc,qBAAqB,CAAA"}
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import { type AxiosRequestConfig } from "axios";
|
|
2
|
+
import { type ApiServiceOptions } from "./api.service.types.js";
|
|
3
|
+
/**
|
|
4
|
+
* ApiService handles authenticated API requests and token management
|
|
5
|
+
*/
|
|
6
|
+
export declare class ApiService {
|
|
7
|
+
private readonly apiClient;
|
|
8
|
+
private readonly authFormData;
|
|
9
|
+
private readonly authService;
|
|
10
|
+
private readonly apiUrl;
|
|
11
|
+
private challenge;
|
|
12
|
+
private readonly keypairService;
|
|
13
|
+
private readonly privateKey;
|
|
14
|
+
constructor(options: ApiServiceOptions);
|
|
15
|
+
/**
|
|
16
|
+
* Retrieves a valid JWT token, refreshing if needed.
|
|
17
|
+
* @param privateKey - The private key for signing the challenge.
|
|
18
|
+
* @param forceRefresh - Whether to force a token refresh.
|
|
19
|
+
* @returns {Promise<string>} The valid JWT token.
|
|
20
|
+
*/
|
|
21
|
+
private getValidToken;
|
|
22
|
+
/**
|
|
23
|
+
* Makes a GET request to the API.
|
|
24
|
+
* @param url - The endpoint URL.
|
|
25
|
+
* @returns {Promise<T>} The response data.
|
|
26
|
+
* @throws {CustodyError} If the request fails with a typed error response.
|
|
27
|
+
*/
|
|
28
|
+
get<T>(url: string, params?: AxiosRequestConfig["params"]): Promise<T>;
|
|
29
|
+
/**
|
|
30
|
+
* Makes a POST request to the API.
|
|
31
|
+
* @param url - The endpoint URL.
|
|
32
|
+
* @param body - The request payload.
|
|
33
|
+
* @param config - Axios config; set `sign: false` to skip canonicalization/signing.
|
|
34
|
+
* @returns {Promise<T>} The response data.
|
|
35
|
+
* @throws {CustodyError} If the request fails with a typed error response.
|
|
36
|
+
*/
|
|
37
|
+
post<T>(url: string, body: any, config?: AxiosRequestConfig & {
|
|
38
|
+
sign?: boolean;
|
|
39
|
+
}): Promise<T>;
|
|
40
|
+
/**
|
|
41
|
+
* Makes a PUT request to the API.
|
|
42
|
+
* @param url - The endpoint URL.
|
|
43
|
+
* @param body - The request payload (sent as-is; no canonicalization or signing).
|
|
44
|
+
* @returns {Promise<T>} The response data.
|
|
45
|
+
* @throws {CustodyError} If the request fails with a typed error response.
|
|
46
|
+
*/
|
|
47
|
+
put<T>(url: string, body: any, config?: AxiosRequestConfig): Promise<T>;
|
|
48
|
+
/**
|
|
49
|
+
* Makes a PATCH request to the API.
|
|
50
|
+
* @param url - The endpoint URL.
|
|
51
|
+
* @param body - The request payload (sent as-is; no canonicalization or signing).
|
|
52
|
+
* @returns {Promise<T>} The response data.
|
|
53
|
+
* @throws {CustodyError} If the request fails with a typed error response.
|
|
54
|
+
*/
|
|
55
|
+
patch<T>(url: string, body: any, config?: AxiosRequestConfig): Promise<T>;
|
|
56
|
+
/**
|
|
57
|
+
* Makes a DELETE request to the API.
|
|
58
|
+
* @param url - The endpoint URL.
|
|
59
|
+
* @returns {Promise<T>} The response data.
|
|
60
|
+
* @throws {CustodyError} If the request fails with a typed error response.
|
|
61
|
+
*/
|
|
62
|
+
delete<T>(url: string, config?: AxiosRequestConfig): Promise<T>;
|
|
63
|
+
}
|
|
64
|
+
//# sourceMappingURL=api.service.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"api.service.d.ts","sourceRoot":"","sources":["../../../src/services/apis/api.service.ts"],"names":[],"mappings":"AAAA,OAAc,EAAsB,KAAK,kBAAkB,EAAE,MAAM,OAAO,CAAA;AAS1E,OAAO,EAAE,KAAK,iBAAiB,EAA4B,MAAM,wBAAwB,CAAA;AAEzF;;GAEG;AACH,qBAAa,UAAU;IACrB,OAAO,CAAC,QAAQ,CAAC,SAAS,CAAe;IACzC,OAAO,CAAC,QAAQ,CAAC,YAAY,CAAqB;IAClD,OAAO,CAAC,QAAQ,CAAC,WAAW,CAAa;IACzC,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAQ;IAC/B,OAAO,CAAC,SAAS,CAAQ;IACzB,OAAO,CAAC,QAAQ,CAAC,cAAc,CAAgB;IAC/C,OAAO,CAAC,QAAQ,CAAC,UAAU,CAAQ;gBAEvB,OAAO,EAAE,iBAAiB;IAsEtC;;;;;OAKG;YACW,aAAa;IAe3B;;;;;OAKG;IACU,GAAG,CAAC,CAAC,EAAE,GAAG,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,kBAAkB,CAAC,QAAQ,CAAC,GAAG,OAAO,CAAC,CAAC,CAAC;IA4BnF;;;;;;;OAOG;IACU,IAAI,CAAC,CAAC,EACjB,GAAG,EAAE,MAAM,EACX,IAAI,EAAE,GAAG,EACT,MAAM,CAAC,EAAE,kBAAkB,GAAG;QAAE,IAAI,CAAC,EAAE,OAAO,CAAA;KAAE,GAC/C,OA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