@dakota-xyz/ts-sdk 1.3.1 → 1.6.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/dist/index.d.mts +219 -41
- package/dist/index.d.ts +219 -41
- package/dist/index.js +142 -42
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +142 -42
- package/dist/index.mjs.map +1 -1
- package/dist/webhook/index.d.mts +8 -2
- package/dist/webhook/index.d.ts +8 -2
- package/dist/webhook/index.js +1 -1
- package/dist/webhook/index.js.map +1 -1
- package/dist/webhook/index.mjs +1 -1
- package/dist/webhook/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -906,8 +906,13 @@ type components = {
|
|
|
906
906
|
* @example external_customer_123
|
|
907
907
|
*/
|
|
908
908
|
readonly external_id?: string;
|
|
909
|
-
/** @description ID of an existing
|
|
909
|
+
/** @description ID of an existing sub-client to associate this new customer with. The referenced customer must belong to the same client and must itself be a sub-client. Cannot be combined with is_sub_client. */
|
|
910
910
|
readonly sub_client_id?: components["schemas"]["KSUID"];
|
|
911
|
+
/**
|
|
912
|
+
* @description When true, create this customer as a sub-client. A customer can only be designated a sub-client at creation time; a regular customer cannot be promoted to a sub-client afterwards. Cannot be combined with sub_client_id.
|
|
913
|
+
* @default false
|
|
914
|
+
*/
|
|
915
|
+
readonly is_sub_client: boolean;
|
|
911
916
|
};
|
|
912
917
|
/** @description Response returned when a customer creation process is successfully initiated. */
|
|
913
918
|
readonly CustomerCreateResponse: {
|
|
@@ -1026,7 +1031,7 @@ type components = {
|
|
|
1026
1031
|
*/
|
|
1027
1032
|
readonly sub_client_name?: string;
|
|
1028
1033
|
/**
|
|
1029
|
-
* @description Whether this customer is
|
|
1034
|
+
* @description Whether this customer is a sub-client. This is set when the customer is created and cannot be changed afterwards.
|
|
1030
1035
|
* @default false
|
|
1031
1036
|
*/
|
|
1032
1037
|
readonly is_sub_client: boolean;
|
|
@@ -1773,7 +1778,7 @@ type components = {
|
|
|
1773
1778
|
readonly PaginatedCustomerTransactionResponse: components["schemas"]["PaginatedListResponse"] & {
|
|
1774
1779
|
readonly data?: readonly components["schemas"]["Transaction"][];
|
|
1775
1780
|
};
|
|
1776
|
-
readonly PaginatedTransactionResourceResponse: components["schemas"]["PaginatedOneOffTransactionResponse"] | components["schemas"]["PaginatedCustomerTransactionResponse"];
|
|
1781
|
+
readonly PaginatedTransactionResourceResponse: components["schemas"]["PaginatedOneOffTransactionResponse"] | components["schemas"]["PaginatedCustomerTransactionResponse"] | components["schemas"]["PaginatedWalletTransactionResponse"];
|
|
1777
1782
|
/** @description An amount of money with its asset. */
|
|
1778
1783
|
readonly TransactionAmount: {
|
|
1779
1784
|
/**
|
|
@@ -2331,6 +2336,9 @@ type components = {
|
|
|
2331
2336
|
readonly PaginatedOneOffTransactionResponse: components["schemas"]["PaginatedListResponse"] & {
|
|
2332
2337
|
readonly data?: readonly components["schemas"]["OneOffTransaction"][];
|
|
2333
2338
|
};
|
|
2339
|
+
readonly PaginatedWalletTransactionResponse: components["schemas"]["PaginatedListResponse"] & {
|
|
2340
|
+
readonly data?: readonly components["schemas"]["WalletTransaction"][];
|
|
2341
|
+
};
|
|
2334
2342
|
/** @description Non-custodial wallet managed by Dakota Platform with a single address usable across networks within the same family. */
|
|
2335
2343
|
readonly Wallet: {
|
|
2336
2344
|
readonly id: components["schemas"]["KSUID"];
|
|
@@ -2374,7 +2382,7 @@ type components = {
|
|
|
2374
2382
|
/** @description List of asset balances */
|
|
2375
2383
|
readonly balances: readonly components["schemas"]["AssetBalance"][];
|
|
2376
2384
|
/**
|
|
2377
|
-
* @description Total USD value of all balances
|
|
2385
|
+
* @description Total USD value of all balances, as a decimal string with 2 decimal places (cents). Rounded DOWN (truncated toward zero), never rounded up, so the value never exceeds the holder's spendable balance.
|
|
2378
2386
|
* @example 1234.56
|
|
2379
2387
|
*/
|
|
2380
2388
|
readonly total_amount_usd: string;
|
|
@@ -2383,7 +2391,7 @@ type components = {
|
|
|
2383
2391
|
readonly AssetBalance: {
|
|
2384
2392
|
readonly asset: components["schemas"]["AssetDeployment"];
|
|
2385
2393
|
/**
|
|
2386
|
-
* @description USD value of this asset balance
|
|
2394
|
+
* @description USD value of this asset balance, as a decimal string with 2 decimal places (cents). Rounded DOWN (truncated toward zero), never rounded up, so the value never exceeds the holder's spendable balance.
|
|
2387
2395
|
* @example 123.45
|
|
2388
2396
|
*/
|
|
2389
2397
|
readonly amount_usd: string;
|
|
@@ -2415,6 +2423,18 @@ type components = {
|
|
|
2415
2423
|
readonly amount?: string;
|
|
2416
2424
|
readonly asset?: components["schemas"]["Asset"];
|
|
2417
2425
|
readonly status: components["schemas"]["TransactionStatus"];
|
|
2426
|
+
/**
|
|
2427
|
+
* Format: int64
|
|
2428
|
+
* @description Unix time the transaction was created.
|
|
2429
|
+
* @example 1781181600
|
|
2430
|
+
*/
|
|
2431
|
+
readonly created_at?: number;
|
|
2432
|
+
/**
|
|
2433
|
+
* Format: int64
|
|
2434
|
+
* @description Unix time the transaction was confirmed on chain; absent until confirmed.
|
|
2435
|
+
* @example 1781181660
|
|
2436
|
+
*/
|
|
2437
|
+
readonly confirmed_at?: number;
|
|
2418
2438
|
};
|
|
2419
2439
|
/**
|
|
2420
2440
|
* @description Type of transaction
|
|
@@ -4568,8 +4588,19 @@ type Address = components['schemas']['Address'];
|
|
|
4568
4588
|
type PersonName = components['schemas']['PersonName'];
|
|
4569
4589
|
/** Customer record */
|
|
4570
4590
|
type Customer = components['schemas']['Customer'];
|
|
4571
|
-
/**
|
|
4572
|
-
|
|
4591
|
+
/**
|
|
4592
|
+
* Customer creation request.
|
|
4593
|
+
*
|
|
4594
|
+
* NOTE: openapi-typescript generates `is_sub_client` as required because the
|
|
4595
|
+
* OpenAPI spec declares a `default: false`. The spec's `required:` list is
|
|
4596
|
+
* only `['name', 'customer_type']`, so this alias re-exports with
|
|
4597
|
+
* `is_sub_client` optional to match the server's runtime behaviour. Pass
|
|
4598
|
+
* `is_sub_client: true` to designate a sub-client at creation; cannot be
|
|
4599
|
+
* combined with `sub_client_id`. See ENG-2454.
|
|
4600
|
+
*/
|
|
4601
|
+
type CustomerCreateRequest = Omit<components['schemas']['CustomerCreateRequest'], 'is_sub_client'> & {
|
|
4602
|
+
is_sub_client?: boolean;
|
|
4603
|
+
};
|
|
4573
4604
|
/** Customer creation response */
|
|
4574
4605
|
type CustomerCreateResponse = components['schemas']['CustomerCreateResponse'];
|
|
4575
4606
|
/** KYB status */
|
|
@@ -4604,10 +4635,17 @@ type Recipient = components['schemas']['RecipientResponse'];
|
|
|
4604
4635
|
type RecipientRequest = components['schemas']['RecipientRequest'];
|
|
4605
4636
|
/** Recipient update request */
|
|
4606
4637
|
type RecipientUpdateRequest = components['schemas']['RecipientRequest'];
|
|
4607
|
-
/** Destination response union */
|
|
4638
|
+
/** Destination response union (used by `destinations.list`) */
|
|
4608
4639
|
type Destination = components['schemas']['DestinationResponseUnion'];
|
|
4609
4640
|
/** Destination request union */
|
|
4610
4641
|
type DestinationRequest = components['schemas']['DestinationRequestUnion'];
|
|
4642
|
+
/**
|
|
4643
|
+
* Response for `destinations.create` — the platform returns just `{ id }`
|
|
4644
|
+
* (per `IDResponse`), NOT the full `DestinationResponseUnion`. Call
|
|
4645
|
+
* `destinations.list(recipientId)` afterwards to read the full shape if
|
|
4646
|
+
* you need it.
|
|
4647
|
+
*/
|
|
4648
|
+
type DestinationCreateResponse = components['schemas']['IDResponse'];
|
|
4611
4649
|
/** Fiat US destination request */
|
|
4612
4650
|
type FiatUSDestinationRequest = components['schemas']['FiatUSDestinationRequest'];
|
|
4613
4651
|
/** Crypto destination request */
|
|
@@ -4650,8 +4688,32 @@ type WalletCreateRequest = components['schemas']['WalletCreateRequest'];
|
|
|
4650
4688
|
type WalletBalance = components['schemas']['AssetBalance'];
|
|
4651
4689
|
/** Wallet balances */
|
|
4652
4690
|
type WalletBalances = components['schemas']['WalletBalances'];
|
|
4653
|
-
/**
|
|
4654
|
-
|
|
4691
|
+
/**
|
|
4692
|
+
* Wallet transaction request body.
|
|
4693
|
+
*
|
|
4694
|
+
* `POST /wallets/{id}/transactions` expects an endorsed envelope —
|
|
4695
|
+
* `{ signatures: string[], intent: SendTransactionIntent }` — NOT a bare
|
|
4696
|
+
* intent. Build the `SendTransactionIntent`, canonicalize per RFC 8785,
|
|
4697
|
+
* sign with the wallet's signer-group ECDSA P-256 key, then post the
|
|
4698
|
+
* `{ signatures, intent }` envelope.
|
|
4699
|
+
*
|
|
4700
|
+
* @see https://docs.dakota.xyz/documentation/signing-guide
|
|
4701
|
+
*/
|
|
4702
|
+
type WalletTransactionRequest = components['schemas']['EndorsedRequest'];
|
|
4703
|
+
/**
|
|
4704
|
+
* The bare intent that goes inside `WalletTransactionRequest.intent`.
|
|
4705
|
+
* Exposed for callers building + signing the intent locally before
|
|
4706
|
+
* wrapping it in the endorsed envelope.
|
|
4707
|
+
*/
|
|
4708
|
+
type SendTransactionIntent = components['schemas']['SendTransactionIntent'];
|
|
4709
|
+
/**
|
|
4710
|
+
* Endorsed request envelope: `{ signatures: string[], intent: <one of the
|
|
4711
|
+
* endorsed intent types> }`. Required by every mutating policy / signer-group
|
|
4712
|
+
* / wallet-transaction endpoint. Build the canonical intent, sign it with
|
|
4713
|
+
* each required signer's private key, and pass the resulting envelope as
|
|
4714
|
+
* the `endorsement` option on the relevant resource method.
|
|
4715
|
+
*/
|
|
4716
|
+
type EndorsedRequest = components['schemas']['EndorsedRequest'];
|
|
4655
4717
|
/** Wallet transaction response */
|
|
4656
4718
|
type WalletTransaction = components['schemas']['WalletTransaction'];
|
|
4657
4719
|
/** Slim reference to a policy attached to a wallet (id + name) */
|
|
@@ -5131,6 +5193,17 @@ interface RequestOptions {
|
|
|
5131
5193
|
* - Not reused across different business intents
|
|
5132
5194
|
*/
|
|
5133
5195
|
idempotencyKey?: string;
|
|
5196
|
+
/**
|
|
5197
|
+
* Endorsed-request envelope (`{ signatures, intent }`) for mutating
|
|
5198
|
+
* policy, signer-group, and wallet-transaction endpoints. Required by the
|
|
5199
|
+
* server on all endorsed routes — passing this is the only way the
|
|
5200
|
+
* signature ever reaches the wire. On methods that already accept a
|
|
5201
|
+
* typed `data` argument (e.g. `policies.addRule`, `policies.updateRule`),
|
|
5202
|
+
* `endorsement` takes precedence over `data` when both are provided so
|
|
5203
|
+
* you can swap a bare data shape for an endorsed envelope at the call
|
|
5204
|
+
* site without breaking the typed signature.
|
|
5205
|
+
*/
|
|
5206
|
+
endorsement?: EndorsedRequest;
|
|
5134
5207
|
}
|
|
5135
5208
|
/** Pagination metadata */
|
|
5136
5209
|
type Meta = components['schemas']['Meta'];
|
|
@@ -5159,6 +5232,19 @@ interface TransactionListParams extends ListParams {
|
|
|
5159
5232
|
source_network_id?: string;
|
|
5160
5233
|
source_asset?: string;
|
|
5161
5234
|
destination_asset?: string;
|
|
5235
|
+
/**
|
|
5236
|
+
* Filter wallet transactions by wallet ID.
|
|
5237
|
+
* Only valid with `transaction_type: 'wallet'`.
|
|
5238
|
+
*/
|
|
5239
|
+
wallet_id?: string;
|
|
5240
|
+
/**
|
|
5241
|
+
* Filter wallet transactions by direction relative to the wallet:
|
|
5242
|
+
* - `'out'` — transactions sent FROM the wallet
|
|
5243
|
+
* - `'in'` — transactions recorded with the wallet as the recipient
|
|
5244
|
+
*
|
|
5245
|
+
* Only valid with `transaction_type: 'wallet'`.
|
|
5246
|
+
*/
|
|
5247
|
+
direction?: 'in' | 'out';
|
|
5162
5248
|
}
|
|
5163
5249
|
/** Event list parameters */
|
|
5164
5250
|
interface EventListParams extends ListParams {
|
|
@@ -5197,6 +5283,15 @@ declare class CustomersResource extends BaseResource {
|
|
|
5197
5283
|
* { idempotencyKey: 'create-acme-corp-001' }
|
|
5198
5284
|
* );
|
|
5199
5285
|
* console.log(customer.applicationUrl); // KYB onboarding URL
|
|
5286
|
+
*
|
|
5287
|
+
* // Designate as a sub-client at creation (ENG-2454).
|
|
5288
|
+
* // `is_sub_client` can only be set here — a regular customer cannot
|
|
5289
|
+
* // be promoted afterwards. Cannot be combined with `sub_client_id`.
|
|
5290
|
+
* const subClient = await client.customers.create({
|
|
5291
|
+
* name: 'Partner Corp',
|
|
5292
|
+
* customer_type: 'business',
|
|
5293
|
+
* is_sub_client: true,
|
|
5294
|
+
* });
|
|
5200
5295
|
* ```
|
|
5201
5296
|
*/
|
|
5202
5297
|
create(data: CustomerCreateRequest, options?: RequestOptions): Promise<CustomerCreateResponse>;
|
|
@@ -5391,33 +5486,42 @@ declare class DestinationsResource extends BaseResource {
|
|
|
5391
5486
|
/**
|
|
5392
5487
|
* Create a new destination for a recipient.
|
|
5393
5488
|
*
|
|
5394
|
-
* Destinations can be bank accounts (fiat_us) or crypto
|
|
5489
|
+
* Destinations can be bank accounts (fiat_us / fiat_iban) or crypto
|
|
5490
|
+
* wallets (crypto).
|
|
5491
|
+
*
|
|
5492
|
+
* The platform returns just `{ id }` here (per `IDResponse`), not the
|
|
5493
|
+
* full destination object. Call `destinations.list(recipientId)` if
|
|
5494
|
+
* you need the rest of the fields.
|
|
5395
5495
|
*
|
|
5396
5496
|
* @param recipientId - Recipient ID
|
|
5397
5497
|
* @param data - Destination creation data
|
|
5398
|
-
* @returns
|
|
5498
|
+
* @returns `{ id }` of the newly-created destination
|
|
5399
5499
|
*
|
|
5400
5500
|
* @example
|
|
5401
5501
|
* ```typescript
|
|
5402
|
-
* //
|
|
5403
|
-
* const bankDest = await client.destinations.create(recipientId, {
|
|
5404
|
-
* destination_type: 'fiat_us',
|
|
5405
|
-
* bank_name: 'Chase Bank',
|
|
5406
|
-
* account_holder_name: 'Acme Corp',
|
|
5407
|
-
* account_number: '123456789',
|
|
5408
|
-
* routing_number: '021000021',
|
|
5409
|
-
* account_type: 'checking',
|
|
5410
|
-
* });
|
|
5411
|
-
*
|
|
5412
|
-
* // Create a crypto destination (for on-ramp)
|
|
5502
|
+
* // Crypto destination (for on-ramp)
|
|
5413
5503
|
* const cryptoDest = await client.destinations.create(recipientId, {
|
|
5414
5504
|
* destination_type: 'crypto',
|
|
5505
|
+
* name: 'Treasury USDC',
|
|
5415
5506
|
* crypto_address: '0x742d35Cc6634C0532925a3b844Bc9e7595f...',
|
|
5416
5507
|
* network_id: 'ethereum-mainnet',
|
|
5417
5508
|
* });
|
|
5509
|
+
* // → cryptoDest.id
|
|
5510
|
+
*
|
|
5511
|
+
* // Fiat US destination (for off-ramp)
|
|
5512
|
+
* const bankDest = await client.destinations.create(recipientId, {
|
|
5513
|
+
* destination_type: 'fiat_us',
|
|
5514
|
+
* name: 'Acme Chase Checking',
|
|
5515
|
+
* bank_name: 'JPMorgan Chase',
|
|
5516
|
+
* account_holder_name: 'Acme Corp',
|
|
5517
|
+
* account_number: '000123456789',
|
|
5518
|
+
* aba_routing_number: '021000021',
|
|
5519
|
+
* account_type: 'checking',
|
|
5520
|
+
* });
|
|
5521
|
+
* // → bankDest.id
|
|
5418
5522
|
* ```
|
|
5419
5523
|
*/
|
|
5420
|
-
create(recipientId: string, data: DestinationRequest, options?: RequestOptions): Promise<
|
|
5524
|
+
create(recipientId: string, data: DestinationRequest, options?: RequestOptions): Promise<DestinationCreateResponse>;
|
|
5421
5525
|
/**
|
|
5422
5526
|
* List destinations for a recipient.
|
|
5423
5527
|
*
|
|
@@ -5622,6 +5726,13 @@ declare class TransactionsResource extends BaseResource {
|
|
|
5622
5726
|
* customer_id: customerId,
|
|
5623
5727
|
* status: 'completed',
|
|
5624
5728
|
* });
|
|
5729
|
+
*
|
|
5730
|
+
* // Wallet-scoped filters (require transaction_type: 'wallet')
|
|
5731
|
+
* const sent = client.transactions.list({
|
|
5732
|
+
* transaction_type: 'wallet',
|
|
5733
|
+
* wallet_id: walletId,
|
|
5734
|
+
* direction: 'out',
|
|
5735
|
+
* });
|
|
5625
5736
|
* ```
|
|
5626
5737
|
*/
|
|
5627
5738
|
list(params?: TransactionListParams): PaginatedIterator<OneOffTransaction>;
|
|
@@ -5735,34 +5846,71 @@ declare class WalletsResource extends BaseResource {
|
|
|
5735
5846
|
/**
|
|
5736
5847
|
* Get wallet balances.
|
|
5737
5848
|
*
|
|
5849
|
+
* Returns the platform's full `WalletBalances` response: the wallet id,
|
|
5850
|
+
* its on-chain address, every per-asset balance, and a pre-computed
|
|
5851
|
+
* `total_amount_usd` across all assets. The previous return shape
|
|
5852
|
+
* (`WalletBalance[]`) silently dropped `address` and `total_amount_usd`,
|
|
5853
|
+
* forcing callers to do a second `wallets.get()` and sum the balances
|
|
5854
|
+
* by hand. This is a small breaking change with a one-line migration
|
|
5855
|
+
* (`balances` → `balances.balances`); the prior shape had been broken
|
|
5856
|
+
* since 1.3.x anyway.
|
|
5857
|
+
*
|
|
5738
5858
|
* @param walletId - Wallet ID
|
|
5739
|
-
* @returns
|
|
5859
|
+
* @returns `{ wallet_id, address, balances, total_amount_usd }`
|
|
5740
5860
|
*
|
|
5741
5861
|
* @example
|
|
5742
5862
|
* ```typescript
|
|
5743
|
-
* const balances =
|
|
5744
|
-
*
|
|
5745
|
-
*
|
|
5863
|
+
* const { address, total_amount_usd, balances } =
|
|
5864
|
+
* await client.wallets.getBalances(walletId);
|
|
5865
|
+
* console.log(`${address} → $${total_amount_usd}`);
|
|
5866
|
+
* for (const b of balances) {
|
|
5867
|
+
* console.log(b.asset.id, b.amount_usd);
|
|
5746
5868
|
* }
|
|
5747
5869
|
* ```
|
|
5748
5870
|
*/
|
|
5749
|
-
getBalances(walletId: string): Promise<
|
|
5871
|
+
getBalances(walletId: string): Promise<WalletBalances>;
|
|
5750
5872
|
/**
|
|
5751
|
-
*
|
|
5873
|
+
* Send a transaction from a wallet.
|
|
5874
|
+
*
|
|
5875
|
+
* The platform expects an **endorsed request** envelope —
|
|
5876
|
+
* `{ signatures, intent }` — at this endpoint. Build the
|
|
5877
|
+
* `SendTransactionIntent`, canonicalize it per RFC 8785 (JCS), sign
|
|
5878
|
+
* with the wallet's signer-group ECDSA P-256 key, base64-encode the
|
|
5879
|
+
* DER signature, then post the envelope.
|
|
5752
5880
|
*
|
|
5753
5881
|
* @param walletId - Wallet ID
|
|
5754
|
-
* @param data -
|
|
5882
|
+
* @param data - Endorsed wallet transaction request: `{ signatures, intent }`
|
|
5755
5883
|
* @returns Created transaction
|
|
5756
5884
|
*
|
|
5757
5885
|
* @example
|
|
5758
5886
|
* ```typescript
|
|
5887
|
+
* import canonicalize from 'canonicalize';
|
|
5888
|
+
* import { createSign, createPrivateKey, randomUUID } from 'node:crypto';
|
|
5889
|
+
*
|
|
5890
|
+
* const intent = {
|
|
5891
|
+
* wallet_id: walletId,
|
|
5892
|
+
* caip2: 'eip155:1', // 11155111 for sepolia
|
|
5893
|
+
* operation: {
|
|
5894
|
+
* kind: 'transfer',
|
|
5895
|
+
* from: wallet.address,
|
|
5896
|
+
* to: '0x...',
|
|
5897
|
+
* amount: '100.00',
|
|
5898
|
+
* asset_id: 'USDC',
|
|
5899
|
+
* },
|
|
5900
|
+
* idempotency_key: randomUUID(),
|
|
5901
|
+
* };
|
|
5902
|
+
* const canonical = canonicalize(intent)!;
|
|
5903
|
+
* const sig = createSign('SHA256').update(canonical).sign({
|
|
5904
|
+
* key: createPrivateKey({ key: privateKeyDer, format: 'der', type: 'pkcs8' }),
|
|
5905
|
+
* dsaEncoding: 'der',
|
|
5906
|
+
* });
|
|
5759
5907
|
* const tx = await client.wallets.createTransaction(walletId, {
|
|
5760
|
-
*
|
|
5761
|
-
*
|
|
5762
|
-
* asset: 'USDC',
|
|
5763
|
-
* network_id: 'ethereum-mainnet',
|
|
5908
|
+
* signatures: [sig.toString('base64')],
|
|
5909
|
+
* intent,
|
|
5764
5910
|
* });
|
|
5765
5911
|
* ```
|
|
5912
|
+
*
|
|
5913
|
+
* @see https://docs.dakota.xyz/documentation/signing-guide
|
|
5766
5914
|
*/
|
|
5767
5915
|
createTransaction(walletId: string, data: WalletTransactionRequest, options?: RequestOptions): Promise<WalletTransaction>;
|
|
5768
5916
|
}
|
|
@@ -6023,9 +6171,14 @@ declare class PoliciesResource extends BaseResource {
|
|
|
6023
6171
|
/**
|
|
6024
6172
|
* Delete a policy.
|
|
6025
6173
|
*
|
|
6174
|
+
* Endorsed endpoint — `options.endorsement` must contain a signed
|
|
6175
|
+
* `DeletePolicyIntent`. The server rejects requests without a valid
|
|
6176
|
+
* endorsement body.
|
|
6177
|
+
*
|
|
6026
6178
|
* @param policyId - Policy ID
|
|
6179
|
+
* @param options - Request options (must include `endorsement`)
|
|
6027
6180
|
*/
|
|
6028
|
-
delete(policyId: string): Promise<void>;
|
|
6181
|
+
delete(policyId: string, options?: RequestOptions): Promise<void>;
|
|
6029
6182
|
/**
|
|
6030
6183
|
* Add a rule to a policy.
|
|
6031
6184
|
*
|
|
@@ -6046,10 +6199,15 @@ declare class PoliciesResource extends BaseResource {
|
|
|
6046
6199
|
/**
|
|
6047
6200
|
* Delete a policy rule.
|
|
6048
6201
|
*
|
|
6202
|
+
* Endorsed endpoint — `options.endorsement` must contain a signed
|
|
6203
|
+
* `RemovePolicyRuleIntent`. The server rejects requests without a valid
|
|
6204
|
+
* endorsement body.
|
|
6205
|
+
*
|
|
6049
6206
|
* @param policyId - Policy ID
|
|
6050
6207
|
* @param ruleId - Rule ID
|
|
6208
|
+
* @param options - Request options (must include `endorsement`)
|
|
6051
6209
|
*/
|
|
6052
|
-
deleteRule(policyId: string, ruleId: string): Promise<void>;
|
|
6210
|
+
deleteRule(policyId: string, ruleId: string, options?: RequestOptions): Promise<void>;
|
|
6053
6211
|
/**
|
|
6054
6212
|
* Get wallets attached to a policy.
|
|
6055
6213
|
*
|
|
@@ -6062,17 +6220,27 @@ declare class PoliciesResource extends BaseResource {
|
|
|
6062
6220
|
/**
|
|
6063
6221
|
* Attach a policy to a wallet.
|
|
6064
6222
|
*
|
|
6223
|
+
* Endorsed endpoint — `options.endorsement` must contain a signed
|
|
6224
|
+
* `AttachPolicyToWalletIntent`. The server rejects requests without a
|
|
6225
|
+
* valid endorsement body.
|
|
6226
|
+
*
|
|
6065
6227
|
* @param policyId - Policy ID
|
|
6066
6228
|
* @param walletId - Wallet ID
|
|
6229
|
+
* @param options - Request options (must include `endorsement`)
|
|
6067
6230
|
*/
|
|
6068
6231
|
attachToWallet(policyId: string, walletId: string, options?: RequestOptions): Promise<void>;
|
|
6069
6232
|
/**
|
|
6070
6233
|
* Detach a policy from a wallet.
|
|
6071
6234
|
*
|
|
6235
|
+
* Endorsed endpoint — `options.endorsement` must contain a signed
|
|
6236
|
+
* `DetachPolicyFromWalletIntent`. The server rejects requests without a
|
|
6237
|
+
* valid endorsement body.
|
|
6238
|
+
*
|
|
6072
6239
|
* @param policyId - Policy ID
|
|
6073
6240
|
* @param walletId - Wallet ID
|
|
6241
|
+
* @param options - Request options (must include `endorsement`)
|
|
6074
6242
|
*/
|
|
6075
|
-
detachFromWallet(policyId: string, walletId: string): Promise<void>;
|
|
6243
|
+
detachFromWallet(policyId: string, walletId: string, options?: RequestOptions): Promise<void>;
|
|
6076
6244
|
}
|
|
6077
6245
|
|
|
6078
6246
|
/**
|
|
@@ -6131,17 +6299,27 @@ declare class SignerGroupsResource extends BaseResource {
|
|
|
6131
6299
|
/**
|
|
6132
6300
|
* Attach a signer group to a wallet.
|
|
6133
6301
|
*
|
|
6302
|
+
* Endorsed endpoint — `options.endorsement` must contain a signed
|
|
6303
|
+
* `AttachGroupToWalletIntent`. The server rejects requests without a
|
|
6304
|
+
* valid endorsement body.
|
|
6305
|
+
*
|
|
6134
6306
|
* @param walletId - Wallet ID
|
|
6135
6307
|
* @param signerGroupId - Signer group ID
|
|
6308
|
+
* @param options - Request options (must include `endorsement`)
|
|
6136
6309
|
*/
|
|
6137
6310
|
attachToWallet(walletId: string, signerGroupId: string, options?: RequestOptions): Promise<void>;
|
|
6138
6311
|
/**
|
|
6139
6312
|
* Detach a signer group from a wallet.
|
|
6140
6313
|
*
|
|
6314
|
+
* Endorsed endpoint — `options.endorsement` must contain a signed
|
|
6315
|
+
* `DetachGroupFromWalletIntent`. The server rejects requests without a
|
|
6316
|
+
* valid endorsement body.
|
|
6317
|
+
*
|
|
6141
6318
|
* @param walletId - Wallet ID
|
|
6142
6319
|
* @param signerGroupId - Signer group ID
|
|
6320
|
+
* @param options - Request options (must include `endorsement`)
|
|
6143
6321
|
*/
|
|
6144
|
-
detachFromWallet(walletId: string, signerGroupId: string): Promise<void>;
|
|
6322
|
+
detachFromWallet(walletId: string, signerGroupId: string, options?: RequestOptions): Promise<void>;
|
|
6145
6323
|
/**
|
|
6146
6324
|
* List signer groups attached to a wallet.
|
|
6147
6325
|
*
|
|
@@ -6374,7 +6552,7 @@ declare class InfoResource extends BaseResource {
|
|
|
6374
6552
|
* }
|
|
6375
6553
|
* ```
|
|
6376
6554
|
*/
|
|
6377
|
-
getNetworks(): Promise<
|
|
6555
|
+
getNetworks(): Promise<string[]>;
|
|
6378
6556
|
}
|
|
6379
6557
|
|
|
6380
6558
|
/**
|
|
@@ -6829,4 +7007,4 @@ declare class ConfigurationError extends Error {
|
|
|
6829
7007
|
constructor(message: string);
|
|
6830
7008
|
}
|
|
6831
7009
|
|
|
6832
|
-
export { APIError, type Account, type AccountCreateRequest, type AccountListParams, type AccountUpdateRequest, AccountsResource, type Address, type AdvanceSimulationRequest, type AdvanceSimulationResult, type ApiKey, type ApiKeyCreateRequest, type ApiKeyResponse, ApiKeysResource, type Application, type ApplicationDocumentType, type ApplicationDocumentUploadRequest, type ApplicationDocumentUploadUrlRequest, type ApplicationListItem, type ApplicationStatus, type ApplicationSubmissionRequest, ApplicationsResource, type AssociatedIndividual, type AssociatedIndividualRequest, type AttachedPolicy, type AttachedWallet, type AttestationSubmitRequest, type AttestationType, AuthMode, type AutoTransaction, AutoTransactionsResource, type AverageMonthlyRevenue, type BulkImportSumsubTokensRequest, type BulkImportSumsubTokensResponse, type BulkImportSumsubTokensResult, type BusinessApplicationCreateRequest, type BusinessDetailsResponse, type BusinessPurposeOfAccount, type BusinessSourceOfFunds, type ClientPricingConfig, ConfigurationError, type Country, type CreateApiKeyForClientRequest, type CryptoDestination, type CryptoDestinationRequest, type CursorExtractor, type Customer, type CustomerCreateRequest, type CustomerCreateResponse, type CustomerListParams, CustomersResource, DEFAULT_RETRY_POLICY, DakotaClient, type DakotaClientConfig, type Destination, type DestinationRequest, DestinationsResource, type DocumentUploadResponse, type DocumentUploadUrlResponse, type EDDRequest, type EDDWithApplicationID, type EmploymentStatus, Environment, type Event, type EventListParams, type EventType, EventsResource, type ExpectedMonthlyDeposit, type Family, type FiatUSDestination, type FiatUSDestinationRequest, type IndividualDetailsResponse, type IndividualDocumentType, type IndividualDocumentUploadRequest, type IndividualDocumentUploadUrlRequest, type IndividualRequest, type IndividualRole, type IndividualTitle, InfoResource, type KSUID, type KybStatus, type LegalStructure, type ListParams, type Logger, type Meta, type Network, type NetworkId, type OfframpAccount, type OfframpAccountCreateRequest, type OneOffTransaction, type OneOffTransactionRequest, type OnrampAccount, type OnrampAccountCreateRequest, type PageFetcher, PaginatedIterator, type PaginatedResponse, type PaginationMeta, type PaginationParams, type PaymentCapability, type PersonName, PoliciesResource, type Policy, type PolicyCreateRequest, type PolicyRule, type PolicyRuleCreateRequest, type Recipient, type RecipientRequest, type RecipientUpdateRequest, RecipientsResource, type RequestOptions, type ResolvedConfig, type RetryPolicy, SandboxResource, type SandboxScenario, type SelfServeCreditTier, type SelfServeCreditTiersResponse, type SelfServeCreditsBalanceResponse, type SelfServeCreditsLedgerEntry, type SelfServeCreditsLedgerEntryType, type SelfServeCreditsLedgerParams, type SelfServeCreditsLedgerResponse, type SelfServeCreditsPricingResponse, type SelfServeCreditsPurchaseRequest, type SelfServeCreditsPurchaseResponse, SelfServeResource, type Signer, type SignerCreateRequest, type SignerGroup, type SignerGroupCreateRequest, SignerGroupsResource, SignersResource, type SimulateInboundRequest, type SimulateInboundType, type SimulateOnboardingRequest, type SimulateOnboardingResponse, type SimulateOnboardingType, type SimulationCallbackRecord, type SimulationInspection, type SimulationResponse, type SubClientSummary, type SwapAccount, type SwapAccountCreateRequest, type TransactionListParams, type TransactionStatus, TransactionsResource, TransportError, type UpdateCustomerSubClientRequest, type UploadedDocumentMetadata, type User, type UserCreateRequest, type UserUpdateRequest, UsersResource, type Wallet, type WalletBalance, type WalletBalances, type WalletCreateRequest, type WalletTransaction, type WalletTransactionRequest, WalletsResource, type WebhookEvent, type WebhookHistoryList, type WebhookHistoryListParams, type WebhookHistoryResponse, type WebhookReplayResponse, type WebhookTarget, type WebhookTargetCreateRequest, type WebhookTargetUpdateRequest, WebhooksResource, consoleLogger, getEnvironmentURL, noopLogger, paginate };
|
|
7010
|
+
export { APIError, type Account, type AccountCreateRequest, type AccountListParams, type AccountUpdateRequest, AccountsResource, type Address, type AdvanceSimulationRequest, type AdvanceSimulationResult, type ApiKey, type ApiKeyCreateRequest, type ApiKeyResponse, ApiKeysResource, type Application, type ApplicationDocumentType, type ApplicationDocumentUploadRequest, type ApplicationDocumentUploadUrlRequest, type ApplicationListItem, type ApplicationStatus, type ApplicationSubmissionRequest, ApplicationsResource, type AssociatedIndividual, type AssociatedIndividualRequest, type AttachedPolicy, type AttachedWallet, type AttestationSubmitRequest, type AttestationType, AuthMode, type AutoTransaction, AutoTransactionsResource, type AverageMonthlyRevenue, type BulkImportSumsubTokensRequest, type BulkImportSumsubTokensResponse, type BulkImportSumsubTokensResult, type BusinessApplicationCreateRequest, type BusinessDetailsResponse, type BusinessPurposeOfAccount, type BusinessSourceOfFunds, type ClientPricingConfig, ConfigurationError, type Country, type CreateApiKeyForClientRequest, type CryptoDestination, type CryptoDestinationRequest, type CursorExtractor, type Customer, type CustomerCreateRequest, type CustomerCreateResponse, type CustomerListParams, CustomersResource, DEFAULT_RETRY_POLICY, DakotaClient, type DakotaClientConfig, type Destination, type DestinationCreateResponse, type DestinationRequest, DestinationsResource, type DocumentUploadResponse, type DocumentUploadUrlResponse, type EDDRequest, type EDDWithApplicationID, type EmploymentStatus, type EndorsedRequest, Environment, type Event, type EventListParams, type EventType, EventsResource, type ExpectedMonthlyDeposit, type Family, type FiatUSDestination, type FiatUSDestinationRequest, type IndividualDetailsResponse, type IndividualDocumentType, type IndividualDocumentUploadRequest, type IndividualDocumentUploadUrlRequest, type IndividualRequest, type IndividualRole, type IndividualTitle, InfoResource, type KSUID, type KybStatus, type LegalStructure, type ListParams, type Logger, type Meta, type Network, type NetworkId, type OfframpAccount, type OfframpAccountCreateRequest, type OneOffTransaction, type OneOffTransactionRequest, type OnrampAccount, type OnrampAccountCreateRequest, type PageFetcher, PaginatedIterator, type PaginatedResponse, type PaginationMeta, type PaginationParams, type PaymentCapability, type PersonName, PoliciesResource, type Policy, type PolicyCreateRequest, type PolicyRule, type PolicyRuleCreateRequest, type Recipient, type RecipientRequest, type RecipientUpdateRequest, RecipientsResource, type RequestOptions, type ResolvedConfig, type RetryPolicy, SandboxResource, type SandboxScenario, type SelfServeCreditTier, type SelfServeCreditTiersResponse, type SelfServeCreditsBalanceResponse, type SelfServeCreditsLedgerEntry, type SelfServeCreditsLedgerEntryType, type SelfServeCreditsLedgerParams, type SelfServeCreditsLedgerResponse, type SelfServeCreditsPricingResponse, type SelfServeCreditsPurchaseRequest, type SelfServeCreditsPurchaseResponse, SelfServeResource, type SendTransactionIntent, type Signer, type SignerCreateRequest, type SignerGroup, type SignerGroupCreateRequest, SignerGroupsResource, SignersResource, type SimulateInboundRequest, type SimulateInboundType, type SimulateOnboardingRequest, type SimulateOnboardingResponse, type SimulateOnboardingType, type SimulationCallbackRecord, type SimulationInspection, type SimulationResponse, type SubClientSummary, type SwapAccount, type SwapAccountCreateRequest, type TransactionListParams, type TransactionStatus, TransactionsResource, TransportError, type UpdateCustomerSubClientRequest, type UploadedDocumentMetadata, type User, type UserCreateRequest, type UserUpdateRequest, UsersResource, type Wallet, type WalletBalance, type WalletBalances, type WalletCreateRequest, type WalletTransaction, type WalletTransactionRequest, WalletsResource, type WebhookEvent, type WebhookHistoryList, type WebhookHistoryListParams, type WebhookHistoryResponse, type WebhookReplayResponse, type WebhookTarget, type WebhookTargetCreateRequest, type WebhookTargetUpdateRequest, WebhooksResource, consoleLogger, getEnvironmentURL, noopLogger, paginate };
|