@dakota-xyz/ts-sdk 3.2.0 → 3.4.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.ts CHANGED
@@ -1,3 +1,5 @@
1
+ import { GovernanceSignerLike } from './governance/index.js';
2
+ export { AddSignersToGroupIntent, AssertionCredential, BinaryOrBase64, CanonicalIntent, ChallengeSource, CreateCryptoDestinationIntent, GovernanceIntent, GovernanceSigner, RemoveSignersFromGroupIntent, SubtleCryptoLike, UpdateSignerGroupGovernanceIntent, addSignersToGroupIntent, assertIdempotencyKey, assertionChallengeMatches, buildChallenge, canonicalJSON, createCryptoDestinationIntent, newIdempotencyKey, packAssertion, removeSignersFromGroupIntent, signGovernanceIntent, updateSignerGroupGovernanceIntent, webCryptoES256Signer, webauthnSigner } from './governance/index.js';
1
3
  import { KeyObject } from 'node:crypto';
2
4
 
3
5
  /**
@@ -2332,6 +2334,15 @@ type components = {
2332
2334
  * @example req_7f3a8b2c
2333
2335
  */
2334
2336
  readonly request_id?: string;
2337
+ /**
2338
+ * @description A stable snake_case error code for the signer-group governance
2339
+ * refusals, equal to `reason` for them: `endorsement_required`,
2340
+ * `insufficient_endorsements`, `stale_signer_group_version`,
2341
+ * `below_threshold` and `invalid_governing_group`. Absent for every
2342
+ * other problem.
2343
+ * @example insufficient_endorsements
2344
+ */
2345
+ readonly code?: string;
2335
2346
  /** @description Field-level validation errors (present for validation failures). */
2336
2347
  readonly errors?: readonly components["schemas"]["ValidationError"][];
2337
2348
  /**
@@ -2381,7 +2392,7 @@ type components = {
2381
2392
  * @example transaction.auto.updated
2382
2393
  * @enum {string}
2383
2394
  */
2384
- readonly EventType: "user.created" | "user.updated" | "user.deleted" | "api_key.created" | "api_key.deleted" | "customer.created" | "customer.updated" | "customer.kyb_link.created" | "customer.kyb_link.updated" | "customer.kyb_status.created" | "customer.kyb_status.updated" | "customer.kyb_application.submitted" | "customer.capability_status.updated" | "customer.rfi.requested" | "customer.rfi.responded" | "customer.application.withdrawn" | "auto_account.created" | "auto_account.updated" | "auto_account.deleted" | "transaction.auto.created" | "transaction.auto.updated" | "transaction.one_off.created" | "transaction.one_off.updated" | "recipient.created" | "recipient.updated" | "recipient.deleted" | "destination.created" | "destination.deleted" | "target.created" | "target.updated" | "target.deleted" | "exception.created" | "exception.cleared" | "wallet.created" | "wallet.updated" | "wallet.signer_group.created" | "wallet.signer_group.updated" | "wallet.policy.created" | "wallet.policy.updated" | "wallet.transaction.created" | "wallet.transaction.updated" | "wallet.deposit" | "rd_payout_destination.updated" | "deployment_payout_destination.updated" | "fee_payout_destination.updated" | "fee_payout_destination.deleted" | "scheduled_payment.failed" | "deposit.held" | "deposit.returned";
2395
+ readonly EventType: "user.created" | "user.updated" | "user.deleted" | "api_key.created" | "api_key.updated" | "api_key.deleted" | "customer.created" | "customer.updated" | "customer.kyb_link.created" | "customer.kyb_link.updated" | "customer.kyb_status.created" | "customer.kyb_status.updated" | "customer.kyb_application.submitted" | "customer.capability_status.updated" | "customer.rfi.requested" | "customer.rfi.responded" | "customer.application.withdrawn" | "auto_account.created" | "auto_account.updated" | "auto_account.deleted" | "transaction.auto.created" | "transaction.auto.updated" | "transaction.one_off.created" | "transaction.one_off.updated" | "recipient.created" | "recipient.updated" | "recipient.deleted" | "destination.created" | "destination.deleted" | "target.created" | "target.updated" | "target.deleted" | "exception.created" | "exception.cleared" | "wallet.created" | "wallet.updated" | "wallet.signer_group.created" | "wallet.signer_group.updated" | "wallet.policy.created" | "wallet.policy.updated" | "wallet.transaction.created" | "wallet.transaction.updated" | "wallet.deposit" | "rd_payout_destination.updated" | "deployment_payout_destination.updated" | "fee_payout_destination.updated" | "fee_payout_destination.deleted" | "scheduled_payment.failed" | "deposit.held" | "deposit.returned";
2385
2396
  /** @description Request metadata for the original operation that emitted the event, when available. */
2386
2397
  readonly EventRequest: {
2387
2398
  /**
@@ -2439,6 +2450,32 @@ type components = {
2439
2450
  /** @description Client ID to create the API key for */
2440
2451
  readonly client_id: components["schemas"]["KSUID"];
2441
2452
  };
2453
+ readonly CreateApiKeyRequest: {
2454
+ readonly name?: components["schemas"]["ApiKeyName"];
2455
+ readonly scope?: components["schemas"]["ApiKeyScope"];
2456
+ };
2457
+ /** @description Send `name`, `scope` or both. A new scope applies from the next request made with the key, and the key value stays the same. */
2458
+ readonly UpdateApiKeyRequest: {
2459
+ readonly name?: components["schemas"]["ApiKeyName"];
2460
+ readonly scope?: components["schemas"]["ApiKeyScope"];
2461
+ };
2462
+ /**
2463
+ * @description What the key can do. The scopes nest: `read_only` is inside `operate`, and `operate` is inside `full_access`.
2464
+ *
2465
+ * - `full_access`: everything that an admin of the client can do. A key created without a scope gets it.
2466
+ * - `operate`: moves money and runs daily operations, but cannot add recipients or destinations, delete anything, or manage users, keys, signers, policies, mandates or webhooks. Wallet transactions and scheduled payments can still pay an address that is not a saved destination. A wallet transaction needs signatures from the signers of the wallet, and the policies of the wallet apply to it. A scheduled payment goes out only when a mandate of the client covers it.
2467
+ * - `read_only`: reads only.
2468
+ *
2469
+ * A key does not take the role of the person who created it.
2470
+ * @example read_only
2471
+ * @enum {string}
2472
+ */
2473
+ readonly ApiKeyScope: "full_access" | "operate" | "read_only";
2474
+ /**
2475
+ * @description A label that says what the key is for. No two live keys of a client share a name.
2476
+ * @example prod-payouts
2477
+ */
2478
+ readonly ApiKeyName: string;
2442
2479
  readonly ApiKeyResponse: {
2443
2480
  readonly id: components["schemas"]["KSUID"];
2444
2481
  /**
@@ -2446,9 +2483,13 @@ type components = {
2446
2483
  * @example dk_live_4KLkSmzQbL6Xs8xnUjssdGHX7PfhHpAb
2447
2484
  */
2448
2485
  readonly key: string;
2486
+ readonly name: components["schemas"]["ApiKeyName"];
2487
+ readonly scope?: components["schemas"]["ApiKeyScope"];
2449
2488
  };
2450
2489
  readonly ApiKeyListItem: {
2451
2490
  readonly id: components["schemas"]["KSUID"];
2491
+ readonly name: components["schemas"]["ApiKeyName"];
2492
+ readonly scope?: components["schemas"]["ApiKeyScope"];
2452
2493
  readonly user_id: components["schemas"]["KSUID"];
2453
2494
  /**
2454
2495
  * @description Last six characters of the API key
@@ -2460,6 +2501,11 @@ type components = {
2460
2501
  * @example 1234567890
2461
2502
  */
2462
2503
  readonly created_at: number;
2504
+ /**
2505
+ * @description Timestamp of the most recent request made with the API key, accurate to one hour. Null when the key was never used.
2506
+ * @example 1234567890
2507
+ */
2508
+ readonly last_used_at: number | null;
2463
2509
  };
2464
2510
  /**
2465
2511
  * KSUID
@@ -3462,6 +3508,22 @@ type components = {
3462
3508
  /** @example 0x1234 */
3463
3509
  readonly crypto_address: string;
3464
3510
  readonly network_id?: components["schemas"]["NetworkId"];
3511
+ /**
3512
+ * @description Optional. Signatures from the governance of `signer_group_id`
3513
+ * over the canonical intent
3514
+ * `{"address":"<crypto_address>","idempotency_key":"<X-Idempotency-Key>","network_id":"<network_id>","recipient_id":"<id>","signer_group_id":"<id>","type":"create_crypto_destination"}`.
3515
+ * With them, an `operate` API key of a client under governance
3516
+ * enforcement may create the destination,
3517
+ * the group must be attached to a wallet of the recipient's
3518
+ * customer, and `network_id` is required (the signed intent
3519
+ * names it). Only on creation; ignored on update.
3520
+ */
3521
+ readonly signatures?: readonly string[];
3522
+ /**
3523
+ * @description The signer group whose governance signed `signatures`. Required with `signatures`.
3524
+ * @example 1NFHrqBHb3cTfLVkFSGmHZqdDPi
3525
+ */
3526
+ readonly signer_group_id?: string;
3465
3527
  } & {
3466
3528
  /**
3467
3529
  * @description discriminator enum property added by openapi-typescript
@@ -3627,6 +3689,11 @@ type components = {
3627
3689
  * - Can be added later via PUT /recipients/{id} to enable fiat capabilities
3628
3690
  */
3629
3691
  readonly address?: components["schemas"]["Address"];
3692
+ /**
3693
+ * @description Your own label for this recipient in your system, used to look it up with the `external_id` filter on `GET /customers/{customer_id}/recipients`. Not unique: Dakota does not reject a duplicate, and several recipients can share one value. On `PUT /recipients/{recipient_id}`, omit it to leave the current value unchanged; it cannot be cleared.
3694
+ * @example vendor-1177
3695
+ */
3696
+ readonly external_id?: string;
3630
3697
  };
3631
3698
  /**
3632
3699
  * Recipient Response
@@ -3634,6 +3701,11 @@ type components = {
3634
3701
  */
3635
3702
  readonly RecipientResponse: {
3636
3703
  readonly id: components["schemas"]["KSUID"];
3704
+ /**
3705
+ * @description Your own label for this recipient in your system, used to look it up with the `external_id` filter on `GET /customers/{customer_id}/recipients`. Not unique: Dakota does not reject a duplicate, and several recipients can share one value. Omitted when none was set.
3706
+ * @example vendor-1177
3707
+ */
3708
+ readonly external_id?: string;
3637
3709
  /**
3638
3710
  * @description Name of the recipient entity.
3639
3711
  * @example Acme Corporation
@@ -4709,6 +4781,38 @@ type components = {
4709
4781
  * entry carries its `removed_at` timestamp. Omitted otherwise.
4710
4782
  */
4711
4783
  readonly removed_members?: readonly components["schemas"]["Signer"][];
4784
+ /**
4785
+ * Format: int64
4786
+ * @description The group's version. It increases by 1 with every membership or
4787
+ * governance change. Endorsements of a membership or governance
4788
+ * change sign over it as `signer_group_version`, so a signature made
4789
+ * before a change cannot be replayed after it.
4790
+ * @example 3
4791
+ */
4792
+ readonly version?: number;
4793
+ /**
4794
+ * Format: int32
4795
+ * @description The explicit number of distinct endorsers a governance change of the group needs, or null for the default.
4796
+ * @example 2
4797
+ */
4798
+ readonly governance_threshold?: number | null;
4799
+ /**
4800
+ * Format: int32
4801
+ * @description The number of distinct endorsers a governance change of the group
4802
+ * needs now: `governance_threshold` when set, else the default (1,
4803
+ * or 2 for a group of 3 or more members when the client has
4804
+ * governance enforcement on), capped at the members that can
4805
+ * endorse and never below 1. Keys of payment agents and card
4806
+ * settlement signers are members for spending only: they never
4807
+ * endorse governance changes.
4808
+ * @example 2
4809
+ */
4810
+ readonly effective_governance_threshold?: number;
4811
+ /**
4812
+ * @description The signer group whose members endorse governance changes of this group instead of its own members, or null when the group governs itself.
4813
+ * @example 1NFHrqBHb3cTfLVkFSGmHZqdDPi
4814
+ */
4815
+ readonly governance_signer_group_id?: string | null;
4712
4816
  };
4713
4817
  /** @description A signer is a public key that can sign intents and it is part of a signer group */
4714
4818
  readonly Signer: {
@@ -4782,6 +4886,26 @@ type components = {
4782
4886
  * unbounded list would let one request drive unbounded work.
4783
4887
  */
4784
4888
  readonly member_keys: readonly string[];
4889
+ /**
4890
+ * Format: int32
4891
+ * @description Optional. The number of distinct endorsers a governance change of
4892
+ * the group needs (membership, governance settings, and the rules of
4893
+ * the policies it governs). At most the member count of the group
4894
+ * whose members endorse: the governing group when
4895
+ * `governance_signer_group_id` is set, else this group. Keys of
4896
+ * payment agents and card settlement signers never endorse
4897
+ * governance changes and are not counted.
4898
+ * @example 2
4899
+ */
4900
+ readonly governance_threshold?: number;
4901
+ /**
4902
+ * @description Optional. Another signer group of the same client whose members
4903
+ * endorse governance changes of this group instead of its own
4904
+ * members. It must not be spend-scoped, deleted, or governed by
4905
+ * another group itself.
4906
+ * @example 1NFHrqBHb3cTfLVkFSGmHZqdDPi
4907
+ */
4908
+ readonly governance_signer_group_id?: string;
4785
4909
  };
4786
4910
  readonly Policy: {
4787
4911
  /**
@@ -4998,6 +5122,94 @@ type components = {
4998
5122
  readonly CreateSignerGroupSignerRequest: {
4999
5123
  /** @description Public key of the member to add to the signer group. */
5000
5124
  readonly member_key: string;
5125
+ /**
5126
+ * @description Signatures over the canonical intent, each base64-encoded, in the
5127
+ * format the endorsed policy routes use (ES256 ASN.1 DER, or a
5128
+ * WebAuthn assertion whose challenge is the canonical intent).
5129
+ * Policy-engine verifies them against the signer group's governance:
5130
+ * the members of its governing group (`governance_signer_group_id`,
5131
+ * else the group itself), at least `effective_governance_threshold`
5132
+ * distinct members. Payment-agent and card-settlement keys never
5133
+ * count: a signature by one of them is refused.
5134
+ * The canonical intent is
5135
+ * `{"idempotency_key":"<X-Idempotency-Key>","new_member_keys":["<member_key>"],"signer_group_id":"<id>","signer_group_version":<version>,"type":"add_signers_to_group"}`.
5136
+ * Without signatures the member is added unendorsed, which a client
5137
+ * with governance enforcement on is refused (400
5138
+ * `endorsement_required`).
5139
+ */
5140
+ readonly signatures?: readonly string[];
5141
+ /**
5142
+ * Format: int64
5143
+ * @description The group's `version` the signatures were made over. Required with `signatures`.
5144
+ * @example 3
5145
+ */
5146
+ readonly signer_group_version?: number;
5147
+ };
5148
+ /**
5149
+ * @description A signed removal of members from a signer group. Policy-engine verifies
5150
+ * the signatures against the group's governance (the members of its
5151
+ * governing group, `governance_signer_group_id`, else the group itself;
5152
+ * at least `effective_governance_threshold` distinct members, never
5153
+ * counting payment-agent or card-settlement keys) and refuses a removal
5154
+ * that would leave the group below a threshold it must keep.
5155
+ */
5156
+ readonly RemoveSignerGroupSignersRequest: {
5157
+ /** @description Public keys of the members to remove, as the group lists them. */
5158
+ readonly members_to_remove: readonly string[];
5159
+ /**
5160
+ * Format: int64
5161
+ * @description The group's `version` the signatures were made over.
5162
+ * @example 3
5163
+ */
5164
+ readonly signer_group_version: number;
5165
+ /**
5166
+ * @description Signatures over the canonical intent, each base64-encoded, in the
5167
+ * format the endorsed policy routes use (ES256 ASN.1 DER, or a
5168
+ * WebAuthn assertion whose challenge is the canonical intent).
5169
+ * The canonical intent is
5170
+ * `{"group_id":"<id>","idempotency_key":"<X-Idempotency-Key>","members_to_remove":["<public_key>"],"signer_group_version":<version>,"type":"remove_signers_from_group"}`,
5171
+ * with `members_to_remove` in the order sent.
5172
+ */
5173
+ readonly signatures: readonly string[];
5174
+ };
5175
+ /**
5176
+ * @description The group's complete governance settings, endorsed by its current
5177
+ * governance. A field left out clears that setting: no
5178
+ * `governance_threshold` means the default quorum, and no
5179
+ * `governance_signer_group_id` means the group governs itself.
5180
+ */
5181
+ readonly UpdateSignerGroupGovernanceRequest: {
5182
+ /**
5183
+ * Format: int32
5184
+ * @description The number of distinct endorsers a governance change of the group needs.
5185
+ * @example 2
5186
+ */
5187
+ readonly governance_threshold?: number;
5188
+ /**
5189
+ * @description Another signer group of the same client whose members endorse governance changes of this group.
5190
+ * @example 1NFHrqBHb3cTfLVkFSGmHZqdDPi
5191
+ */
5192
+ readonly governance_signer_group_id?: string;
5193
+ /**
5194
+ * Format: int64
5195
+ * @description The group's `version` the signatures were made over.
5196
+ * @example 3
5197
+ */
5198
+ readonly signer_group_version: number;
5199
+ /**
5200
+ * @description Signatures over the canonical intent, each base64-encoded, in the
5201
+ * format the endorsed policy routes use (ES256 ASN.1 DER, or a
5202
+ * WebAuthn assertion whose challenge is the canonical intent).
5203
+ * Policy-engine verifies them against the signer group's governance:
5204
+ * the members of its governing group (`governance_signer_group_id`,
5205
+ * else the group itself), at least `effective_governance_threshold`
5206
+ * distinct members. Payment-agent and card-settlement keys never
5207
+ * count: a signature by one of them is refused.
5208
+ * The canonical intent is
5209
+ * `{"governance_signer_group_id":"<id>","governance_threshold":<n>,"idempotency_key":"<X-Idempotency-Key>","signer_group_id":"<id>","signer_group_version":<version>,"type":"update_signer_group_governance"}`,
5210
+ * with each optional field absent when it is not sent.
5211
+ */
5212
+ readonly signatures: readonly string[];
5001
5213
  };
5002
5214
  readonly AttachGroupToWalletIntent: {
5003
5215
  /**
@@ -10400,6 +10612,13 @@ interface operations {
10400
10612
  readonly starting_after?: components["parameters"]["StartingAfterParam"];
10401
10613
  /** @description A cursor for use in pagination. `ending_before` is a KSUID for the object you are listing that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with ID `2B5J8KZ9N7M1K3P6Q8R4T7V9`, your subsequent call can include `ending_before=2B5J8KZ9N7M1K3P6Q8R4T7V9` in order to fetch the previous page of the list. */
10402
10614
  readonly ending_before?: components["parameters"]["EndingBeforeParam"];
10615
+ /**
10616
+ * @description Filter by the client-supplied `external_id`, exact match, case
10617
+ * sensitive. The key is a label the client chooses and is not
10618
+ * unique, so the result is a (possibly empty) collection rather
10619
+ * than a single resource. An empty value is treated as absent.
10620
+ */
10621
+ readonly external_id?: string;
10403
10622
  };
10404
10623
  readonly header?: never;
10405
10624
  readonly path: {
@@ -19861,7 +20080,7 @@ interface operations {
19861
20080
  readonly "application/json": components["schemas"]["SignerGroup"];
19862
20081
  };
19863
20082
  };
19864
- /** @description Bad request - invalid input data */
20083
+ /** @description Bad request - invalid input data, or `endorsement_required` - this removal needs signatures (a client under governance enforcement, or a group with governance settings); use `POST /signer-groups/{signer_group_id}/signer-removals` */
19865
20084
  readonly 400: {
19866
20085
  headers: {
19867
20086
  readonly [name: string]: unknown;
@@ -20161,7 +20380,7 @@ interface operations {
20161
20380
  readonly "application/json": components["schemas"]["SignerGroup"];
20162
20381
  };
20163
20382
  };
20164
- /** @description Bad request - invalid input data */
20383
+ /** @description Bad request - invalid input data, or `endorsement_required` (unsigned for a client with governance enforcement on, or for a group with governance settings) */
20165
20384
  readonly 400: {
20166
20385
  headers: {
20167
20386
  readonly [name: string]: unknown;
@@ -20199,7 +20418,7 @@ interface operations {
20199
20418
  readonly "application/problem+json": components["schemas"]["ProblemDetails"];
20200
20419
  };
20201
20420
  };
20202
- /** @description Forbidden */
20421
+ /** @description Forbidden, or `insufficient_endorsements` - the signatures do not meet the group's governance quorum */
20203
20422
  readonly 403: {
20204
20423
  headers: {
20205
20424
  readonly [name: string]: unknown;
@@ -20237,7 +20456,7 @@ interface operations {
20237
20456
  readonly "application/problem+json": components["schemas"]["ProblemDetails"];
20238
20457
  };
20239
20458
  };
20240
- /** @description Conflict - duplicate request detected */
20459
+ /** @description Conflict - duplicate request detected, or `stale_signer_group_version` - the group changed since the signatures were made */
20241
20460
  readonly 409: {
20242
20461
  headers: {
20243
20462
  readonly [name: string]: unknown;
@@ -20277,6 +20496,268 @@ interface operations {
20277
20496
  };
20278
20497
  };
20279
20498
  };
20499
+ readonly removeSignerGroupSigners: {
20500
+ readonly parameters: {
20501
+ readonly query?: never;
20502
+ readonly header: {
20503
+ /** @description Unique key to ensure request idempotency. If the same key is used within a certain time window, the original response will be returned instead of executing the request again. */
20504
+ readonly "x-idempotency-key": components["parameters"]["IdempotencyKeyHeader"];
20505
+ };
20506
+ readonly path: {
20507
+ /** @description Signer Group ID */
20508
+ readonly signer_group_id: components["schemas"]["KSUID"];
20509
+ };
20510
+ readonly cookie?: never;
20511
+ };
20512
+ readonly requestBody: {
20513
+ readonly content: {
20514
+ /**
20515
+ * @example {
20516
+ * "members_to_remove": [
20517
+ * "MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAE..."
20518
+ * ],
20519
+ * "signer_group_version": 3,
20520
+ * "signatures": [
20521
+ * "MEUCIQDx...base64"
20522
+ * ]
20523
+ * }
20524
+ */
20525
+ readonly "application/json": components["schemas"]["RemoveSignerGroupSignersRequest"];
20526
+ };
20527
+ };
20528
+ readonly responses: {
20529
+ /** @description Signers removed */
20530
+ readonly 200: {
20531
+ headers: {
20532
+ readonly [name: string]: unknown;
20533
+ };
20534
+ content: {
20535
+ /**
20536
+ * @example {
20537
+ * "id": "1NFHrqBHb3cTfLVkFSGmHZqdDPi",
20538
+ * "client_id": "1NFHrqBHb3cTfLVkFSGmHZqdDPi",
20539
+ * "name": "My Wallet",
20540
+ * "members": [
20541
+ * {
20542
+ * "id": "1NFHrqBHb3cTfLVkFSGmHZqdDPi",
20543
+ * "client_id": "1NFHrqBHb3cTfLVkFSGmHZqdDPi",
20544
+ * "name": "Marc",
20545
+ * "public_key": "string",
20546
+ * "key_type": "ES256"
20547
+ * }
20548
+ * ],
20549
+ * "version": 4,
20550
+ * "effective_governance_threshold": 1
20551
+ * }
20552
+ */
20553
+ readonly "application/json": components["schemas"]["SignerGroup"];
20554
+ };
20555
+ };
20556
+ /** @description Bad request - invalid input data */
20557
+ readonly 400: {
20558
+ headers: {
20559
+ readonly [name: string]: unknown;
20560
+ };
20561
+ content: {
20562
+ readonly "application/problem+json": components["schemas"]["ProblemDetails"];
20563
+ };
20564
+ };
20565
+ /** @description Unauthorized */
20566
+ readonly 401: {
20567
+ headers: {
20568
+ readonly [name: string]: unknown;
20569
+ };
20570
+ content: {
20571
+ readonly "application/problem+json": components["schemas"]["ProblemDetails"];
20572
+ };
20573
+ };
20574
+ /** @description Forbidden, or `insufficient_endorsements` - the signatures do not meet the group's governance quorum */
20575
+ readonly 403: {
20576
+ headers: {
20577
+ readonly [name: string]: unknown;
20578
+ };
20579
+ content: {
20580
+ readonly "application/problem+json": components["schemas"]["ProblemDetails"];
20581
+ };
20582
+ };
20583
+ /** @description Signer Group not found */
20584
+ readonly 404: {
20585
+ headers: {
20586
+ readonly [name: string]: unknown;
20587
+ };
20588
+ content: {
20589
+ readonly "application/problem+json": components["schemas"]["ProblemDetails"];
20590
+ };
20591
+ };
20592
+ /** @description `stale_signer_group_version` - the group changed since the signatures were made */
20593
+ readonly 409: {
20594
+ headers: {
20595
+ readonly [name: string]: unknown;
20596
+ };
20597
+ content: {
20598
+ readonly "application/problem+json": components["schemas"]["ProblemDetails"];
20599
+ };
20600
+ };
20601
+ /** @description `below_threshold` - the removal would leave the group below a threshold it must keep (at least one member, its governance quorum, or a governed group's threshold). A policy's approval threshold does not block a removal; a policy left unmeetable denies sends until a member is added. */
20602
+ readonly 422: {
20603
+ headers: {
20604
+ readonly [name: string]: unknown;
20605
+ };
20606
+ content: {
20607
+ readonly "application/problem+json": components["schemas"]["ProblemDetails"];
20608
+ };
20609
+ };
20610
+ /** @description Internal server error */
20611
+ readonly 500: {
20612
+ headers: {
20613
+ readonly [name: string]: unknown;
20614
+ };
20615
+ content: {
20616
+ readonly "application/problem+json": components["schemas"]["ProblemDetails"];
20617
+ };
20618
+ };
20619
+ /** @description Service unavailable */
20620
+ readonly 503: {
20621
+ headers: {
20622
+ readonly [name: string]: unknown;
20623
+ };
20624
+ content: {
20625
+ readonly "application/problem+json": components["schemas"]["ProblemDetails"];
20626
+ };
20627
+ };
20628
+ };
20629
+ };
20630
+ readonly updateSignerGroupGovernance: {
20631
+ readonly parameters: {
20632
+ readonly query?: never;
20633
+ readonly header: {
20634
+ /** @description Unique key to ensure request idempotency. If the same key is used within a certain time window, the original response will be returned instead of executing the request again. */
20635
+ readonly "x-idempotency-key": components["parameters"]["IdempotencyKeyHeader"];
20636
+ };
20637
+ readonly path: {
20638
+ /** @description Signer Group ID */
20639
+ readonly signer_group_id: components["schemas"]["KSUID"];
20640
+ };
20641
+ readonly cookie?: never;
20642
+ };
20643
+ readonly requestBody: {
20644
+ readonly content: {
20645
+ /**
20646
+ * @example {
20647
+ * "governance_threshold": 2,
20648
+ * "signer_group_version": 3,
20649
+ * "signatures": [
20650
+ * "MEUCIQDx...base64",
20651
+ * "MEQCIF1y...base64"
20652
+ * ]
20653
+ * }
20654
+ */
20655
+ readonly "application/json": components["schemas"]["UpdateSignerGroupGovernanceRequest"];
20656
+ };
20657
+ };
20658
+ readonly responses: {
20659
+ /** @description Governance updated */
20660
+ readonly 200: {
20661
+ headers: {
20662
+ readonly [name: string]: unknown;
20663
+ };
20664
+ content: {
20665
+ /**
20666
+ * @example {
20667
+ * "id": "1NFHrqBHb3cTfLVkFSGmHZqdDPi",
20668
+ * "client_id": "1NFHrqBHb3cTfLVkFSGmHZqdDPi",
20669
+ * "name": "My Wallet",
20670
+ * "members": [
20671
+ * {
20672
+ * "id": "1NFHrqBHb3cTfLVkFSGmHZqdDPi",
20673
+ * "client_id": "1NFHrqBHb3cTfLVkFSGmHZqdDPi",
20674
+ * "name": "Marc",
20675
+ * "public_key": "string",
20676
+ * "key_type": "ES256"
20677
+ * }
20678
+ * ],
20679
+ * "version": 4,
20680
+ * "governance_threshold": 2,
20681
+ * "effective_governance_threshold": 2
20682
+ * }
20683
+ */
20684
+ readonly "application/json": components["schemas"]["SignerGroup"];
20685
+ };
20686
+ };
20687
+ /** @description Bad request - invalid input data, or invalid governance settings */
20688
+ readonly 400: {
20689
+ headers: {
20690
+ readonly [name: string]: unknown;
20691
+ };
20692
+ content: {
20693
+ readonly "application/problem+json": components["schemas"]["ProblemDetails"];
20694
+ };
20695
+ };
20696
+ /** @description Unauthorized */
20697
+ readonly 401: {
20698
+ headers: {
20699
+ readonly [name: string]: unknown;
20700
+ };
20701
+ content: {
20702
+ readonly "application/problem+json": components["schemas"]["ProblemDetails"];
20703
+ };
20704
+ };
20705
+ /** @description Forbidden, or `insufficient_endorsements` - the signatures do not meet the group's governance quorum */
20706
+ readonly 403: {
20707
+ headers: {
20708
+ readonly [name: string]: unknown;
20709
+ };
20710
+ content: {
20711
+ readonly "application/problem+json": components["schemas"]["ProblemDetails"];
20712
+ };
20713
+ };
20714
+ /** @description Signer Group not found */
20715
+ readonly 404: {
20716
+ headers: {
20717
+ readonly [name: string]: unknown;
20718
+ };
20719
+ content: {
20720
+ readonly "application/problem+json": components["schemas"]["ProblemDetails"];
20721
+ };
20722
+ };
20723
+ /** @description `stale_signer_group_version` - the group changed since the signatures were made */
20724
+ readonly 409: {
20725
+ headers: {
20726
+ readonly [name: string]: unknown;
20727
+ };
20728
+ content: {
20729
+ readonly "application/problem+json": components["schemas"]["ProblemDetails"];
20730
+ };
20731
+ };
20732
+ /** @description Unprocessable */
20733
+ readonly 422: {
20734
+ headers: {
20735
+ readonly [name: string]: unknown;
20736
+ };
20737
+ content: {
20738
+ readonly "application/problem+json": components["schemas"]["ProblemDetails"];
20739
+ };
20740
+ };
20741
+ /** @description Internal server error */
20742
+ readonly 500: {
20743
+ headers: {
20744
+ readonly [name: string]: unknown;
20745
+ };
20746
+ content: {
20747
+ readonly "application/problem+json": components["schemas"]["ProblemDetails"];
20748
+ };
20749
+ };
20750
+ /** @description Service unavailable */
20751
+ readonly 503: {
20752
+ headers: {
20753
+ readonly [name: string]: unknown;
20754
+ };
20755
+ content: {
20756
+ readonly "application/problem+json": components["schemas"]["ProblemDetails"];
20757
+ };
20758
+ };
20759
+ };
20760
+ };
20280
20761
  readonly listApiKeys: {
20281
20762
  readonly parameters: {
20282
20763
  readonly query?: {
@@ -20314,7 +20795,10 @@ interface operations {
20314
20795
  * "id": "1NFHrqBHb3cTfLVkFSGmHZqdDPi",
20315
20796
  * "user_id": "1NFHrqBHb3cTfLVkFSGmHZqdDPi",
20316
20797
  * "key_suffix": "HpAb4a",
20317
- * "created_at": 1234567890
20798
+ * "name": "prod-payouts",
20799
+ * "scope": "operate",
20800
+ * "created_at": 1234567890,
20801
+ * "last_used_at": 1234571490
20318
20802
  * }
20319
20803
  * ],
20320
20804
  * "meta": {
@@ -20398,7 +20882,17 @@ interface operations {
20398
20882
  readonly path?: never;
20399
20883
  readonly cookie?: never;
20400
20884
  };
20401
- readonly requestBody?: never;
20885
+ readonly requestBody?: {
20886
+ readonly content: {
20887
+ /**
20888
+ * @example {
20889
+ * "name": "prod-payouts",
20890
+ * "scope": "operate"
20891
+ * }
20892
+ */
20893
+ readonly "application/json": components["schemas"]["CreateApiKeyRequest"];
20894
+ };
20895
+ };
20402
20896
  readonly responses: {
20403
20897
  /** @description API key created successfully */
20404
20898
  readonly 201: {
@@ -20409,7 +20903,9 @@ interface operations {
20409
20903
  /**
20410
20904
  * @example {
20411
20905
  * "id": "1NFHrqBHb3cTfLVkFSGmHZqdDPi",
20412
- * "key": "dk_live_4KLkSmzQbL6Xs8xnUjssdGHX7PfhHpAb"
20906
+ * "key": "dk_live_4KLkSmzQbL6Xs8xnUjssdGHX7PfhHpAb",
20907
+ * "name": "prod-payouts",
20908
+ * "scope": "operate"
20413
20909
  * }
20414
20910
  */
20415
20911
  readonly "application/json": components["schemas"]["ApiKeyResponse"];
@@ -20472,6 +20968,28 @@ interface operations {
20472
20968
  readonly "application/problem+json": components["schemas"]["ProblemDetails"];
20473
20969
  };
20474
20970
  };
20971
+ /** @description Conflict — another live API key of this client already has this name. */
20972
+ readonly 409: {
20973
+ headers: {
20974
+ readonly [name: string]: unknown;
20975
+ };
20976
+ content: {
20977
+ readonly "application/problem+json": components["schemas"]["ProblemDetails"];
20978
+ };
20979
+ };
20980
+ /**
20981
+ * @description Unprocessable — the `X-Idempotency-Key` was already used on this endpoint with a different request body
20982
+ * (problem type `idempotency-key-reused`). The request was not executed and the original response was not replayed.
20983
+ * Resend the original body to receive the original response, or use a new key to make a new request.
20984
+ */
20985
+ readonly 422: {
20986
+ headers: {
20987
+ readonly [name: string]: unknown;
20988
+ };
20989
+ content: {
20990
+ readonly "application/problem+json": components["schemas"]["ProblemDetails"];
20991
+ };
20992
+ };
20475
20993
  };
20476
20994
  };
20477
20995
  readonly deleteAllApiKeys: {
@@ -20560,7 +21078,9 @@ interface operations {
20560
21078
  /**
20561
21079
  * @example {
20562
21080
  * "id": "2iNhTbFZGo1bqoTTVOQKVgAfGHH",
20563
- * "key": "dk_live_4KLkSmzQbL6Xs8xnUjssdGHX7PfhHpAb"
21081
+ * "key": "dk_live_4KLkSmzQbL6Xs8xnUjssdGHX7PfhHpAb",
21082
+ * "name": "prod-payouts",
21083
+ * "scope": "full_access"
20564
21084
  * }
20565
21085
  */
20566
21086
  readonly "application/json": components["schemas"]["ApiKeyResponse"];
@@ -20623,6 +21143,19 @@ interface operations {
20623
21143
  readonly "application/problem+json": components["schemas"]["ProblemDetails"];
20624
21144
  };
20625
21145
  };
21146
+ /**
21147
+ * @description Unprocessable — the `X-Idempotency-Key` was already used on this endpoint with a different request body
21148
+ * (problem type `idempotency-key-reused`). The request was not executed and the original response was not replayed.
21149
+ * Resend the original body to receive the original response, or use a new key to make a new request.
21150
+ */
21151
+ readonly 422: {
21152
+ headers: {
21153
+ readonly [name: string]: unknown;
21154
+ };
21155
+ content: {
21156
+ readonly "application/problem+json": components["schemas"]["ProblemDetails"];
21157
+ };
21158
+ };
20626
21159
  /** @description Service unavailable - endpoint only available in sandbox environment */
20627
21160
  readonly 503: {
20628
21161
  headers: {
@@ -20741,6 +21274,110 @@ interface operations {
20741
21274
  };
20742
21275
  };
20743
21276
  };
21277
+ readonly updateApiKey: {
21278
+ readonly parameters: {
21279
+ readonly query?: never;
21280
+ readonly header: {
21281
+ /** @description Unique key to ensure request idempotency. If the same key is used within a certain time window, the original response will be returned instead of executing the request again. */
21282
+ readonly "x-idempotency-key": components["parameters"]["IdempotencyKeyHeader"];
21283
+ };
21284
+ readonly path: {
21285
+ /** @description Unique identifier of the API key to update */
21286
+ readonly api_key_id: components["schemas"]["KSUID"];
21287
+ };
21288
+ readonly cookie?: never;
21289
+ };
21290
+ readonly requestBody: {
21291
+ readonly content: {
21292
+ /**
21293
+ * @example {
21294
+ * "name": "prod-payouts-v2"
21295
+ * }
21296
+ */
21297
+ readonly "application/json": components["schemas"]["UpdateApiKeyRequest"];
21298
+ };
21299
+ };
21300
+ readonly responses: {
21301
+ /** @description API key updated */
21302
+ readonly 200: {
21303
+ headers: {
21304
+ readonly [name: string]: unknown;
21305
+ };
21306
+ content: {
21307
+ /**
21308
+ * @example {
21309
+ * "id": "1NFHrqBHb3cTfLVkFSGmHZqdDPi",
21310
+ * "user_id": "1NFHrqBHb3cTfLVkFSGmHZqdDPi",
21311
+ * "key_suffix": "HpAb4a",
21312
+ * "name": "prod-payouts-v2",
21313
+ * "scope": "operate",
21314
+ * "created_at": 1234567890,
21315
+ * "last_used_at": 1234571490
21316
+ * }
21317
+ */
21318
+ readonly "application/json": components["schemas"]["ApiKeyListItem"];
21319
+ };
21320
+ };
21321
+ /** @description Invalid request */
21322
+ readonly 400: {
21323
+ headers: {
21324
+ readonly [name: string]: unknown;
21325
+ };
21326
+ content: {
21327
+ readonly "application/problem+json": components["schemas"]["ProblemDetails"];
21328
+ };
21329
+ };
21330
+ /** @description Unauthorized */
21331
+ readonly 401: {
21332
+ headers: {
21333
+ readonly [name: string]: unknown;
21334
+ };
21335
+ content: {
21336
+ readonly "application/problem+json": components["schemas"]["ProblemDetails"];
21337
+ };
21338
+ };
21339
+ /** @description Forbidden */
21340
+ readonly 403: {
21341
+ headers: {
21342
+ readonly [name: string]: unknown;
21343
+ };
21344
+ content: {
21345
+ readonly "application/problem+json": components["schemas"]["ProblemDetails"];
21346
+ };
21347
+ };
21348
+ /** @description Not found — no live API key of this client has this id. */
21349
+ readonly 404: {
21350
+ headers: {
21351
+ readonly [name: string]: unknown;
21352
+ };
21353
+ content: {
21354
+ readonly "application/problem+json": components["schemas"]["ProblemDetails"];
21355
+ };
21356
+ };
21357
+ /** @description Conflict — another live API key of this client already has this name. */
21358
+ readonly 409: {
21359
+ headers: {
21360
+ readonly [name: string]: unknown;
21361
+ };
21362
+ content: {
21363
+ readonly "application/problem+json": components["schemas"]["ProblemDetails"];
21364
+ };
21365
+ };
21366
+ /**
21367
+ * @description Unprocessable — the `X-Idempotency-Key` was already used on this endpoint with a different request body
21368
+ * (problem type `idempotency-key-reused`). The request was not executed and the original response was not replayed.
21369
+ * Resend the original body to receive the original response, or use a new key to make a new request.
21370
+ */
21371
+ readonly 422: {
21372
+ headers: {
21373
+ readonly [name: string]: unknown;
21374
+ };
21375
+ content: {
21376
+ readonly "application/problem+json": components["schemas"]["ProblemDetails"];
21377
+ };
21378
+ };
21379
+ };
21380
+ };
20744
21381
  readonly listClientUsers: {
20745
21382
  readonly parameters: {
20746
21383
  readonly query?: {
@@ -28321,6 +28958,88 @@ type SignerCreateRequest = components['schemas']['SignerCreateRequest'];
28321
28958
  * adds an EXISTING signer's public key to a group).
28322
28959
  */
28323
28960
  type SignerGroupSignerAddRequest = components['schemas']['CreateSignerGroupSignerRequest'];
28961
+ /**
28962
+ * Signed removal of members (POST /signer-groups/{id}/signer-removals).
28963
+ * Build and sign it with `signerGroups.removeSignersSigned` or
28964
+ * `prepareRemoveSigners` + `submitSignedChange`.
28965
+ */
28966
+ type SignerGroupSignerRemovalRequest = components['schemas']['RemoveSignerGroupSignersRequest'];
28967
+ /**
28968
+ * Signed replacement of a group's governance settings
28969
+ * (PATCH /signer-groups/{id}/governance). A setting left out is cleared.
28970
+ */
28971
+ type SignerGroupGovernanceUpdateRequest = components['schemas']['UpdateSignerGroupGovernanceRequest'];
28972
+ /**
28973
+ * The governance settings of a signer group, as passed to the signed
28974
+ * governance helpers. The change replaces the whole state: leave a setting
28975
+ * out (or null) to clear it.
28976
+ */
28977
+ interface SignerGroupGovernanceSettings {
28978
+ /** Distinct endorsers a governance change needs; absent/null = default quorum. */
28979
+ governance_threshold?: number | null;
28980
+ /** Group whose members endorse instead of this group's; absent/null = self-governed. */
28981
+ governance_signer_group_id?: string | null;
28982
+ }
28983
+ /**
28984
+ * A signer-group change that is built and ready to sign, from
28985
+ * `signerGroups.prepareAddSigner` / `prepareRemoveSigners` /
28986
+ * `prepareGovernanceUpdate`.
28987
+ *
28988
+ * It is plain JSON, so a server can store it while the signatures are
28989
+ * collected, then pass it to `submitSignedChange`. The signers sign the UTF-8
28990
+ * bytes of `canonical`; for a passkey, send only `canonical` to the browser
28991
+ * and pass it to `buildChallenge` there.
28992
+ *
28993
+ * Keep the change itself on the server. `submitSignedChange` refuses a change
28994
+ * whose fields no longer match its `canonical`, but a change rebuilt as a
28995
+ * whole (new group id and matching `canonical`) is a different, valid change,
28996
+ * and it is sent with this client's API key. Never submit one that came back
28997
+ * from a browser.
28998
+ */
28999
+ interface PreparedSignerGroupChange {
29000
+ readonly kind: 'add_signers_to_group' | 'remove_signers_from_group' | 'update_signer_group_governance';
29001
+ readonly signerGroupId: string;
29002
+ /** The group's `version` the change is signed over. */
29003
+ readonly signerGroupVersion: number;
29004
+ /** Lowercase UUID; sent as `X-Idempotency-Key` and signed inside the intent. */
29005
+ readonly idempotencyKey: string;
29006
+ /** Member public keys to add (one) or remove (in order). Absent for governance. */
29007
+ readonly memberKeys?: readonly string[];
29008
+ /** The new governance settings. Present for governance only. */
29009
+ readonly governance?: {
29010
+ readonly governance_threshold?: number;
29011
+ readonly governance_signer_group_id?: string;
29012
+ };
29013
+ /** The canonical intent JSON: the exact bytes every signature covers. */
29014
+ readonly canonical: string;
29015
+ }
29016
+ /** Options for preparing a signed signer-group change. */
29017
+ interface PrepareSignerGroupChangeOptions {
29018
+ /**
29019
+ * Sign over this version instead of reading the group's current one.
29020
+ * Useful when you just fetched the group; a wrong value gets a
29021
+ * `StaleSignerGroupVersionError`.
29022
+ */
29023
+ signerGroupVersion?: number;
29024
+ /** Lowercase UUID to use; one is generated when omitted. */
29025
+ idempotencyKey?: string;
29026
+ }
29027
+ /** Options for the one-call signed signer-group helpers. */
29028
+ interface SignedSignerGroupChangeOptions extends PrepareSignerGroupChangeOptions {
29029
+ /**
29030
+ * How many times to re-read the version, re-sign under a new idempotency
29031
+ * key, and resend after a `StaleSignerGroupVersionError`. Default 0. Each
29032
+ * retry calls every signer again (a passkey prompts again).
29033
+ *
29034
+ * @throws TypeError when it is above 5, when it is combined with a fixed
29035
+ * `signerGroupVersion` or `idempotencyKey` (a retry needs a fresh read and
29036
+ * a fresh key), and on `updateGovernanceSigned`, which never re-signs
29037
+ * (a re-sign could undo a concurrent governance change).
29038
+ */
29039
+ staleRetries?: number;
29040
+ /** Per-request deadline in milliseconds, as in {@link RequestOptions}. */
29041
+ timeout?: number;
29042
+ }
28324
29043
  /** Parameters for getting a single signer group. */
28325
29044
  interface SignerGroupGetParams {
28326
29045
  /**
@@ -28334,8 +29053,15 @@ interface SignerGroupGetParams {
28334
29053
  type ApiKey = components['schemas']['ApiKeyListItem'];
28335
29054
  /** API key response */
28336
29055
  type ApiKeyResponse = components['schemas']['ApiKeyResponse'];
28337
- /** API key creation request */
28338
- type ApiKeyCreateRequest = Record<string, unknown>;
29056
+ /**
29057
+ * What an API key can do: `full_access`, `operate` or `read_only`. A key does
29058
+ * not take the role of the person who created it.
29059
+ */
29060
+ type ApiKeyScope = components['schemas']['ApiKeyScope'];
29061
+ /** API key creation request. A key created without a scope has full access. */
29062
+ type ApiKeyCreateRequest = components['schemas']['CreateApiKeyRequest'];
29063
+ /** API key update request: a new name, a new scope, or both. */
29064
+ type ApiKeyUpdateRequest = components['schemas']['UpdateApiKeyRequest'];
28339
29065
  /** User */
28340
29066
  type User = components['schemas']['ClientUser'];
28341
29067
  /** User creation request */
@@ -28611,7 +29337,7 @@ interface SimulateOnboardingResponse {
28611
29337
  * - `kyc_approve` - Approve an individual applicant's KYC application status only (no endorsement/recipient)
28612
29338
  * - `kyc_reject` - Reject a KYC check
28613
29339
  * - `kyc_info_request` - Request additional information for KYC
28614
- * - `applicant_activate` - Activate an applicant (triggers provisioning)
29340
+ * - `applicant_activate` - Same code path as `kyb_approve` (approves and triggers provisioning)
28615
29341
  * - `applicant_suspend` - Suspend an applicant
28616
29342
  */
28617
29343
  type SimulateOnboardingType = 'kyb_approve' | 'kyb_reject' | 'kyb_info_request' | 'kyc_approve' | 'kyc_reject' | 'kyc_info_request' | 'applicant_activate' | 'applicant_suspend';
@@ -28620,23 +29346,16 @@ type SimulateOnboardingType = 'kyb_approve' | 'kyb_reject' | 'kyb_info_request'
28620
29346
  *
28621
29347
  * Drives KYB, KYC, or applicant account status through a sandbox transition.
28622
29348
  *
28623
- * **Important:** For full activation, you typically need to call:
28624
- * 1. `kyb_approve` - Approves the KYB application
28625
- * 2. `applicant_activate` - Activates the applicant (triggers provisioning)
29349
+ * **Important:** One `kyb_approve` call fully approves an application and
29350
+ * triggers provisioning. `applicant_activate` runs the same code path, so do
29351
+ * not send it after `kyb_approve`.
28626
29352
  *
28627
29353
  * @example
28628
- * // Approve KYB and activate applicant
28629
29354
  * await client.sandbox.simulateOnboarding({
28630
29355
  * type: 'kyb_approve',
28631
29356
  * applicant_id: 'app_123',
28632
29357
  * simulation_id: 'sim_kyb_001',
28633
29358
  * });
28634
- *
28635
- * await client.sandbox.simulateOnboarding({
28636
- * type: 'applicant_activate',
28637
- * applicant_id: 'app_123',
28638
- * simulation_id: 'sim_activate_001',
28639
- * });
28640
29359
  */
28641
29360
  interface SimulateOnboardingRequest {
28642
29361
  /** The onboarding transition to simulate. Required. */
@@ -28853,6 +29572,13 @@ interface ListParams {
28853
29572
  limit?: number;
28854
29573
  [key: string]: unknown;
28855
29574
  }
29575
+ /**
29576
+ * Recipient list parameters.
29577
+ */
29578
+ interface RecipientListParams extends ListParams {
29579
+ /** Exact-match, case-sensitive filter on the client-supplied `external_id`. Not unique, so it can match several recipients. */
29580
+ external_id?: string;
29581
+ }
28856
29582
  /**
28857
29583
  * Customer list parameters.
28858
29584
  *
@@ -29655,6 +30381,7 @@ declare class RecipientsResource extends BaseResource {
29655
30381
  * ```typescript
29656
30382
  * const recipient = await client.recipients.create(customerId, {
29657
30383
  * name: 'Treasury Account',
30384
+ * external_id: 'vendor-1177', // optional: your own label, not unique
29658
30385
  * });
29659
30386
  * ```
29660
30387
  */
@@ -29663,7 +30390,7 @@ declare class RecipientsResource extends BaseResource {
29663
30390
  * List recipients for a customer.
29664
30391
  *
29665
30392
  * @param customerId - Customer ID
29666
- * @param params - Pagination parameters
30393
+ * @param params - Pagination parameters and an optional `external_id` filter
29667
30394
  * @returns Async iterator of recipients
29668
30395
  *
29669
30396
  * @example
@@ -29671,9 +30398,14 @@ declare class RecipientsResource extends BaseResource {
29671
30398
  * for await (const recipient of client.recipients.list(customerId)) {
29672
30399
  * console.log(recipient.name);
29673
30400
  * }
30401
+ *
30402
+ * // Look up recipients by your own label
30403
+ * const matches = await client.recipients
30404
+ * .list(customerId, { external_id: 'vendor-1177' })
30405
+ * .toArray();
29674
30406
  * ```
29675
30407
  */
29676
- list(customerId: string, params?: ListParams): PaginatedIterator<Recipient>;
30408
+ list(customerId: string, params?: RecipientListParams): PaginatedIterator<Recipient>;
29677
30409
  /**
29678
30410
  * Get a recipient by ID.
29679
30411
  *
@@ -30189,13 +30921,19 @@ declare class WalletsResource extends BaseResource {
30189
30921
  * with the wallet's signer-group ECDSA P-256 key, base64-encode the
30190
30922
  * DER signature, then post the envelope.
30191
30923
  *
30924
+ * Use the SDK's `canonicalJSON`: it matches the platform's canonical form
30925
+ * byte for byte. Write `amount` in its shortest decimal form (`'100'`, not
30926
+ * `'100.00'`; `'0.5'`, not `'0.50'`). The platform parses the amount as a
30927
+ * decimal and re-serializes it before it checks the signature, so trailing
30928
+ * zeros change the signed bytes and the signature fails.
30929
+ *
30192
30930
  * @param walletId - Wallet ID
30193
30931
  * @param data - Endorsed wallet transaction request: `{ signatures, intent }`
30194
30932
  * @returns Created transaction
30195
30933
  *
30196
30934
  * @example
30197
30935
  * ```typescript
30198
- * import canonicalize from 'canonicalize';
30936
+ * import { canonicalJSON } from '@dakota-xyz/ts-sdk';
30199
30937
  * import { createSign, createPrivateKey, randomUUID } from 'node:crypto';
30200
30938
  *
30201
30939
  * const intent = {
@@ -30205,12 +30943,12 @@ declare class WalletsResource extends BaseResource {
30205
30943
  * kind: 'transfer',
30206
30944
  * from: wallet.address,
30207
30945
  * to: '0x...',
30208
- * amount: '100.00',
30946
+ * amount: '100', // shortest decimal form, see below
30209
30947
  * asset_id: 'USDC',
30210
30948
  * },
30211
30949
  * idempotency_key: randomUUID(),
30212
30950
  * };
30213
- * const canonical = canonicalize(intent)!;
30951
+ * const canonical = canonicalJSON(intent);
30214
30952
  * const sig = createSign('SHA256').update(canonical).sign({
30215
30953
  * key: createPrivateKey({ key: privateKeyDer, format: 'der', type: 'pkcs8' }),
30216
30954
  * dsaEncoding: 'der',
@@ -30668,13 +31406,24 @@ declare class SignerGroupsResource extends BaseResource {
30668
31406
  * key of an existing signer resource — not a fresh signer definition.
30669
31407
  * Returns the updated group (with the new member included).
30670
31408
  *
31409
+ * A governed group (governance settings, or a client with governance
31410
+ * enforcement on) refuses an unsigned add with
31411
+ * `EndorsementRequiredError`; use {@link addSignerSigned} instead, or pass
31412
+ * `signatures` + `signer_group_version` yourself with the SAME idempotency
31413
+ * key that is inside the signed intent.
31414
+ *
30671
31415
  * @param signerGroupId - Signer group ID
30672
31416
  * @param data - `{ member_key }` (the signer's base64 PKIX public key)
30673
31417
  * @returns The updated signer group
30674
31418
  */
30675
31419
  addSigner(signerGroupId: string, data: SignerGroupSignerAddRequest, options?: RequestOptions): Promise<SignerGroup>;
30676
31420
  /**
30677
- * Remove a signer from a group.
31421
+ * Remove ONE signer from a group, unsigned, by its KSUID `signer_id`
31422
+ * (`DELETE /signer-groups/{id}/signers/{signer_id}`).
31423
+ *
31424
+ * A governed group refuses this with `EndorsementRequiredError`; use
31425
+ * {@link removeSignersSigned} instead. Not to be confused with
31426
+ * {@link removeSigners} (plural), the signed removal by PUBLIC KEY.
30678
31427
  *
30679
31428
  * @param signerGroupId - Signer group ID
30680
31429
  * @param signerId - The signer's KSUID `signer_id` — NOT its public key.
@@ -30683,6 +31432,90 @@ declare class SignerGroupsResource extends BaseResource {
30683
31432
  * key — the platform requires one on this DELETE)
30684
31433
  */
30685
31434
  removeSigner(signerGroupId: string, signerId: string, options?: RequestOptions): Promise<void>;
31435
+ /**
31436
+ * Remove members by PUBLIC KEY, with signatures from the group's governance
31437
+ * (`POST /signer-groups/{id}/signer-removals`). Low level: you supply the
31438
+ * signed body, and `options.idempotencyKey` is required and MUST be the key
31439
+ * inside the signed intent. Prefer {@link removeSignersSigned}. (The
31440
+ * singular {@link removeSigner} is the unsigned removal by `signer_id`.)
31441
+ */
31442
+ removeSigners(signerGroupId: string, data: SignerGroupSignerRemovalRequest, options?: RequestOptions): Promise<SignerGroup>;
31443
+ /**
31444
+ * Replace a group's governance settings with signatures from its current
31445
+ * governance (`PATCH /signer-groups/{id}/governance`). The body is the
31446
+ * WHOLE state: a setting left out is cleared. Low level: you supply the
31447
+ * signed body, and `options.idempotencyKey` is required and MUST be the key
31448
+ * inside the signed intent. Prefer {@link updateGovernanceSigned}.
31449
+ */
31450
+ updateGovernance(signerGroupId: string, data: SignerGroupGovernanceUpdateRequest, options?: RequestOptions): Promise<SignerGroup>;
31451
+ /**
31452
+ * Build (but do not sign or send) the change that adds `memberKey` to the
31453
+ * group. Reads the group's current `version` unless
31454
+ * `options.signerGroupVersion` is given, and generates a lowercase UUID
31455
+ * idempotency key unless one is given.
31456
+ *
31457
+ * Use it when the signatures are collected elsewhere — for example a
31458
+ * passkey in the user's browser: send `change.canonical` there, pass it to
31459
+ * `buildChallenge`, then give the packed assertions to
31460
+ * {@link submitSignedChange}.
31461
+ */
31462
+ prepareAddSigner(signerGroupId: string, memberKey: string, options?: PrepareSignerGroupChangeOptions): Promise<PreparedSignerGroupChange>;
31463
+ /**
31464
+ * Build (but do not sign or send) the change that removes `memberKeys`
31465
+ * (public keys, as the group lists them; signed in this order).
31466
+ */
31467
+ prepareRemoveSigners(signerGroupId: string, memberKeys: readonly string[], options?: PrepareSignerGroupChangeOptions): Promise<PreparedSignerGroupChange>;
31468
+ /**
31469
+ * Build (but do not sign or send) the change that sets the group's
31470
+ * governance to `settings`. It replaces the whole state: a setting left
31471
+ * out or null is cleared.
31472
+ */
31473
+ prepareGovernanceUpdate(signerGroupId: string, settings: SignerGroupGovernanceSettings, options?: PrepareSignerGroupChangeOptions): Promise<PreparedSignerGroupChange>;
31474
+ /**
31475
+ * Send a prepared change with its signatures (ES256 DER base64, or packed
31476
+ * passkey assertions), using the change's idempotency key as
31477
+ * `X-Idempotency-Key`. Re-checks that the change still matches the intent
31478
+ * that was signed and refuses it otherwise, without sending anything.
31479
+ *
31480
+ * @throws EndorsementRequiredError, InsufficientEndorsementsError,
31481
+ * StaleSignerGroupVersionError, BelowThresholdError (all APIError)
31482
+ */
31483
+ submitSignedChange(change: PreparedSignerGroupChange, signatures: readonly string[], options?: Pick<RequestOptions, 'timeout'>): Promise<SignerGroup>;
31484
+ /**
31485
+ * Add `memberKey` to a governed group in one call: read the version, build
31486
+ * the `add_signers_to_group` intent, sign it with each signer (in order),
31487
+ * and send it with the same idempotency key in the intent and the header.
31488
+ *
31489
+ * @param signers - ES256 signers (`ES256Signer`, your KMS) or plain
31490
+ * `(bytes) => signature` functions; together they must meet the group's
31491
+ * `effective_governance_threshold`. For a passkey in the user's browser
31492
+ * or app, use {@link prepareAddSigner} + {@link submitSignedChange}
31493
+ * instead, so the API key stays on your server; `webauthnSigner` fits
31494
+ * here only when the passkey prompt runs in the same process as this
31495
+ * client. Each stale retry calls every signer again.
31496
+ * @example
31497
+ * ```typescript
31498
+ * const group = await client.signerGroups.addSignerSigned(groupId, newKey, [
31499
+ * ES256Signer.fromPrivateKey(adminKeyPem),
31500
+ * ]);
31501
+ * ```
31502
+ */
31503
+ addSignerSigned(signerGroupId: string, memberKey: string, signers: readonly GovernanceSignerLike[], options?: SignedSignerGroupChangeOptions): Promise<SignerGroup>;
31504
+ /** Remove `memberKeys` from a governed group in one call; see {@link addSignerSigned}. */
31505
+ removeSignersSigned(signerGroupId: string, memberKeys: readonly string[], signers: readonly GovernanceSignerLike[], options?: SignedSignerGroupChangeOptions): Promise<SignerGroup>;
31506
+ /**
31507
+ * Replace a group's governance settings in one call; see
31508
+ * {@link addSignerSigned}. Signed by the group's CURRENT governance.
31509
+ *
31510
+ * `staleRetries` is refused here: the change replaces the WHOLE governance
31511
+ * state, so re-signing it after someone else changed the group would
31512
+ * silently undo their change. On `StaleSignerGroupVersionError`, re-read
31513
+ * the group, decide, and call again.
31514
+ */
31515
+ updateGovernanceSigned(signerGroupId: string, settings: SignerGroupGovernanceSettings, signers: readonly GovernanceSignerLike[], options?: SignedSignerGroupChangeOptions): Promise<SignerGroup>;
31516
+ private prepareChange;
31517
+ private currentVersion;
31518
+ private signAndSubmit;
30686
31519
  /**
30687
31520
  * Get wallets attached to a signer group.
30688
31521
  *
@@ -30769,6 +31602,15 @@ declare class ApiKeysResource extends BaseResource {
30769
31602
  * @returns Async iterator of API keys
30770
31603
  */
30771
31604
  list(params?: ListParams): PaginatedIterator<ApiKey>;
31605
+ /**
31606
+ * Change the name, the scope, or both, of an API key. A new scope applies
31607
+ * from the next request made with the key. The key value does not change.
31608
+ *
31609
+ * @param apiKeyId - API key ID
31610
+ * @param data - The new name, the new scope, or both
31611
+ * @returns The updated API key
31612
+ */
31613
+ update(apiKeyId: string, data: ApiKeyUpdateRequest, options?: RequestOptions): Promise<ApiKey>;
30772
31614
  /**
30773
31615
  * Delete an API key.
30774
31616
  *
@@ -31132,8 +31974,9 @@ declare class RDMarketingFeeResource extends BaseResource {
31132
31974
  *
31133
31975
  * @remarks
31134
31976
  * These endpoints are only available in the Sandbox environment.
31135
- * In sandbox, Dakota does NOT monitor testnet blockchains - you must
31136
- * use these simulation endpoints to trigger payment events.
31977
+ * Sandbox custody is real on testnets: Dakota sees real testnet crypto
31978
+ * sent to a sandbox address. The banking layer is mocked, so use these
31979
+ * simulation endpoints to trigger fiat payment events.
31137
31980
  */
31138
31981
 
31139
31982
  /**
@@ -31142,8 +31985,9 @@ declare class RDMarketingFeeResource extends BaseResource {
31142
31985
  * These endpoints are only available in the Sandbox environment.
31143
31986
  *
31144
31987
  * @remarks
31145
- * **Important:** In sandbox, Dakota does NOT monitor testnet blockchains.
31146
- * You must use these simulation endpoints to trigger payment events.
31988
+ * **Important:** Sandbox custody is real on testnets, so Dakota sees real
31989
+ * testnet crypto sent to a sandbox address. The banking layer is mocked:
31990
+ * use these simulation endpoints to trigger fiat payment events.
31147
31991
  *
31148
31992
  * @example
31149
31993
  * ```typescript
@@ -31249,21 +32093,16 @@ declare class SandboxResource extends BaseResource {
31249
32093
  * @param data - Simulation request data
31250
32094
  * @returns Simulation response with previous and new state
31251
32095
  *
31252
- * @example Approve KYB and activate applicant
32096
+ * `applicant_activate` runs the same code path as `kyb_approve`. One call
32097
+ * is enough: do not send `applicant_activate` after `kyb_approve`.
32098
+ *
32099
+ * @example Approve an application
31253
32100
  * ```typescript
31254
- * // Step 1: Approve the KYB application
31255
32101
  * await client.sandbox.simulateOnboarding({
31256
32102
  * type: 'kyb_approve',
31257
32103
  * applicant_id: customer.application_id,
31258
32104
  * simulation_id: `sim_kyb_${Date.now()}`,
31259
32105
  * });
31260
- *
31261
- * // Step 2: Activate the applicant (triggers provisioning)
31262
- * await client.sandbox.simulateOnboarding({
31263
- * type: 'applicant_activate',
31264
- * applicant_id: customer.application_id,
31265
- * simulation_id: `sim_activate_${Date.now()}`,
31266
- * });
31267
32106
  * ```
31268
32107
  *
31269
32108
  * @example Reject a KYB application
@@ -32423,6 +33262,56 @@ declare class APIError extends Error {
32423
33262
  static fromResponse(response: Response): Promise<APIError>;
32424
33263
  toString(): string;
32425
33264
  }
33265
+ type APIErrorOptions = ConstructorParameters<typeof APIError>[3];
33266
+ /**
33267
+ * `endorsement_required` (400): the signer-group change needs signatures from
33268
+ * the group's governing members — the client has governance enforcement on,
33269
+ * or the group has governance settings. Send it signed: use
33270
+ * `signerGroups.addSignerSigned` / `removeSignersSigned` /
33271
+ * `updateGovernanceSigned`, or the `prepare*` + `submitSignedChange` pair.
33272
+ */
33273
+ declare class EndorsementRequiredError extends APIError {
33274
+ constructor(statusCode: number, code: string, message: string, options?: APIErrorOptions);
33275
+ }
33276
+ /**
33277
+ * `insufficient_endorsements` (403): the signatures do not meet the group's
33278
+ * governance quorum (`effective_governance_threshold` distinct governing
33279
+ * members). The refusal is final for that idempotency key: the platform
33280
+ * replays it, and a resend under the same key with more signatures is
33281
+ * refused as a different request. Prepare again (a new key and intent) and
33282
+ * collect every signature again.
33283
+ */
33284
+ declare class InsufficientEndorsementsError extends APIError {
33285
+ /** Signatures the platform counted, when it said so. */
33286
+ readonly have: number | null;
33287
+ /** Signatures the quorum needs, when it said so. */
33288
+ readonly need: number | null;
33289
+ constructor(statusCode: number, code: string, message: string, options?: APIErrorOptions);
33290
+ }
33291
+ /**
33292
+ * `stale_signer_group_version` (409): the group changed after the signatures
33293
+ * were made, so they can never verify. Read the group's `version`, build a
33294
+ * new intent under a new idempotency key, and sign again (or pass
33295
+ * `staleRetries` to the one-call helpers to do that automatically).
33296
+ */
33297
+ declare class StaleSignerGroupVersionError extends APIError {
33298
+ constructor(statusCode: number, code: string, message: string, options?: APIErrorOptions);
33299
+ }
33300
+ /**
33301
+ * `below_threshold` (422): the removal would leave the group below a
33302
+ * threshold it must keep (at least one member, its governance quorum, or a
33303
+ * governed group's threshold). Add members first or remove fewer.
33304
+ */
33305
+ declare class BelowThresholdError extends APIError {
33306
+ constructor(statusCode: number, code: string, message: string, options?: APIErrorOptions);
33307
+ }
33308
+ /**
33309
+ * `invalid_governing_group` (409): the group's governing signer group is
33310
+ * missing or no longer valid, so no signature can satisfy its governance.
33311
+ */
33312
+ declare class InvalidGoverningGroupError extends APIError {
33313
+ constructor(statusCode: number, code: string, message: string, options?: APIErrorOptions);
33314
+ }
32426
33315
  /**
32427
33316
  * Represents a transport-level error (network, timeout, etc.).
32428
33317
  */
@@ -32538,6 +33427,58 @@ declare function detachUserFromWallet(client: DakotaClient, walletId: string, si
32538
33427
  wasMember: boolean;
32539
33428
  }>;
32540
33429
 
33430
+ /**
33431
+ * ES256 (ECDSA P-256 over SHA-256) key handling for the platform's signed
33432
+ * requests: signer-group governance intents and agentic mandates verify
33433
+ * exactly this form.
33434
+ */
33435
+
33436
+ /**
33437
+ * An ES256 signer holding a P-256 private key in memory: base64 ASN.1 DER
33438
+ * ECDSA over SHA-256 of the payload, with the public key as base64 PKIX
33439
+ * (SPKI). It satisfies both `GovernanceSigner` (signer-group governance) and
33440
+ * `MandateSigner` (agentic mandates, where it is also exported as
33441
+ * `P256MandateSigner`).
33442
+ *
33443
+ * Convenient for servers, sandbox and tests. For production keys, implement
33444
+ * the signer interface over your own key custody (HSM/KMS) so the private key
33445
+ * never lives in the process. Node only (uses `node:crypto`); in a browser use
33446
+ * `webCryptoES256Signer`.
33447
+ */
33448
+ declare class ES256Signer {
33449
+ private readonly privateKey;
33450
+ private readonly publicKey;
33451
+ private constructor();
33452
+ /**
33453
+ * Generate a fresh P-256 keypair.
33454
+ */
33455
+ static generate(): ES256Signer;
33456
+ /**
33457
+ * Adopt an existing P-256 private key. Accepts a PKCS#8 PEM string, a
33458
+ * DER-encoded PKCS#8 buffer, or a Node {@link KeyObject}.
33459
+ */
33460
+ static fromPrivateKey(key: KeyObject | string | Uint8Array): ES256Signer;
33461
+ /**
33462
+ * base64 PKIX (SPKI) public key — pass this as the signer's registered
33463
+ * public key at agent creation / mandate approval.
33464
+ */
33465
+ publicKeyBase64(): string;
33466
+ /**
33467
+ * Returns base64( ASN.1 ECDSA signature over SHA-256(payload) ).
33468
+ */
33469
+ sign(payload: Uint8Array): string;
33470
+ }
33471
+ /**
33472
+ * Check a base64 ASN.1 signature over SHA-256 of the canonical payload
33473
+ * against a base64 PKIX P-256 public key — the platform's exact
33474
+ * verification. Exposed so callers (and tests) can self-check a signature
33475
+ * before submitting it.
33476
+ *
33477
+ * @throws if the public key or signature can't be parsed, or the signature
33478
+ * does not verify against the payload.
33479
+ */
33480
+ declare function verifyES256Signature(publicKeyBase64: string, payload: Uint8Array, signatureBase64: string): void;
33481
+
32541
33482
  /**
32542
33483
  * §8 mandate signing. Approving (or cancelling) a mandate is not a bare API
32543
33484
  * call: it requires a cryptographic signature over the mandate's canonical
@@ -32668,68 +33609,5 @@ declare function updatePolicyRulePayload(policyId: string, ruleId: string, updat
32668
33609
  * endorsement won't verify against it.
32669
33610
  */
32670
33611
  declare function addPolicyRulePayload(policyId: string, action: string, ruleType: string, definition: Record<string, unknown>, idempotencyKey: string): Uint8Array;
32671
- /**
32672
- * A {@link MandateSigner} holding a P-256 (ES256) private key in memory.
32673
- *
32674
- * Convenient for sandbox and tests; for production, implement
32675
- * {@link MandateSigner} over your own key custody so the private key never
32676
- * lives in the process.
32677
- */
32678
- declare class P256MandateSigner implements MandateSigner {
32679
- private readonly privateKey;
32680
- private readonly publicKey;
32681
- private constructor();
32682
- /**
32683
- * Generate a fresh P-256 keypair.
32684
- */
32685
- static generate(): P256MandateSigner;
32686
- /**
32687
- * Adopt an existing P-256 private key. Accepts a PKCS#8 PEM string, a
32688
- * DER-encoded PKCS#8 buffer, or a Node {@link KeyObject}.
32689
- */
32690
- static fromPrivateKey(key: KeyObject | string | Uint8Array): P256MandateSigner;
32691
- /**
32692
- * base64 PKIX (SPKI) public key — pass this as the signer's registered
32693
- * public key at agent creation / mandate approval.
32694
- */
32695
- publicKeyBase64(): string;
32696
- /**
32697
- * Returns base64( ASN.1 ECDSA signature over SHA-256(payload) ).
32698
- */
32699
- sign(payload: Uint8Array): string;
32700
- }
32701
- /**
32702
- * Check a base64 ASN.1 signature over SHA-256 of the canonical payload
32703
- * against a base64 PKIX P-256 public key — the platform's exact
32704
- * verification. Exposed so callers (and tests) can self-check a signature
32705
- * before submitting it.
32706
- *
32707
- * @throws if the public key or signature can't be parsed, or the signature
32708
- * does not verify against the payload.
32709
- */
32710
- declare function verifyMandateSignature(publicKeyBase64: string, payload: Uint8Array, signatureBase64: string): void;
32711
-
32712
- /**
32713
- * RFC 8785 (JCS) canonical JSON — the exact bytes the platform signs.
32714
- *
32715
- * A payload canonicalized here matches the platform's `enc.C14nJSON`
32716
- * (json.Marshal + jsoncanonicalizer.Transform) byte-for-byte, so a
32717
- * signature produced from the result verifies server-side.
32718
- *
32719
- * This implementation covers the value shapes the SDK ever puts into a
32720
- * signed payload: nulls, booleans, finite integers/floats, strings,
32721
- * arrays, and plain object maps. It intentionally does NOT handle
32722
- * non-integer numbers with fractional parts differently from
32723
- * JSON.stringify, because every mandate/endorsement payload the SDK
32724
- * produces uses only integers, strings, arrays, and object maps — decimal
32725
- * amounts are always sent as strings.
32726
- */
32727
- /**
32728
- * RFC 8785 (JCS) canonicalize `value` and return its bytes as a UTF-8 string.
32729
- *
32730
- * @throws if `value` contains a non-finite number, a Symbol, a bigint, or a
32731
- * circular reference — any of which cannot be encoded to canonical JSON.
32732
- */
32733
- declare function canonicalJSON(value: unknown): string;
32734
33612
 
32735
- export { APIError, type AcceptedAgreement, type Account, type AccountCreateRequest, type AccountListParams, type AccountUpdateRequest, AccountsResource, type Address, type AdvanceSimulationRequest, type AdvanceSimulationResult, AgentConversation, type AgentConversationOptions, type AgenticAction, type AgenticActionDownstream, type AgenticBlocker, type AgenticBlockerCode, type AgenticClientPolicy, type AgenticInstruction, type AgenticInstructionsResult, AgenticPolicyResource, type AgenticProposal, type AgenticProposalsProgress, type AgenticProposalsResult, type AmendMandateRequest, type ApiKey, type ApiKeyCreateRequest, type ApiKeyResponse, ApiKeysResource, type Application, type ApplicationDocumentType, type ApplicationDocumentUploadRequest, type ApplicationDocumentUploadUrlRequest, type ApplicationGetParams, type ApplicationListItem, type ApplicationStatus, type ApplicationSubmissionRequest, ApplicationsResource, type ApproveMandateRequest, type AssociatedIndividual, type AssociatedIndividualRequest, type AttachedPolicy, type AttachedWallet, type Attachment, type AttachmentMediaType, type AttestationSubmitRequest, type AttestationType, AuthMode, type AutoAccountTransactionListParams, type AutoTransaction, type AutoTransactionListParams, AutoTransactionsResource, type AverageMonthlyRevenue, type BulkImportSumsubTokensRequest, type BulkImportSumsubTokensResponse, type BulkImportSumsubTokensResult, type BusinessApplicationCreateRequest, type BusinessDetailsResponse, type BusinessPurposeOfAccount, type BusinessSourceOfFunds, type CancelMandateRequest, type Capability, type CapabilityRequirement, type ChatMessage, type ClientInsightCustomer, type ClientInsightCustomersSummary, type ClientInsightFacets, type ClientInsightItemCounts, type ClientInsightMetric, type ClientInsightReport, type ClientInsightSeries, type ClientInsightSeriesPoint, type ClientInsightSnapshot, type ClientInsightsParams, type ClientPricingConfig, ConfigurationError, type ConversationTurn, type Country, type CreateApiKeyForClientRequest, type CreateInstructionsRequest, type CreateMandateRequest, type CreateProposalsRequest, type CreateScheduledPaymentRequest, type CryptoDestination, type CryptoDestinationRequest, type CursorExtractor, type Customer, type CustomerCapabilities, type CustomerCreateRequest, type CustomerCreateResponse, type CustomerListParams, type CustomerPage, type CustomerReEngagementResponse, type CustomerStatus, type CustomerStatusCounts, CustomersResource, DEFAULT_RETRY_POLICY, DakotaClient, type DakotaClientConfig, type Destination, type DestinationCreateResponse, type DestinationListParams, type DestinationRequest, DestinationsResource, type DeveloperFee, type DeveloperFeeDefaults, type DeveloperFeeRate, 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 FeePayoutDestination, FeePayoutDestinationResource, type FiatUSDestination, type FiatUSDestinationRequest, type ImportPersonaTokensRequest, type ImportPersonaTokensResponse, type IndividualDetailsResponse, type IndividualDocumentType, type IndividualDocumentUploadRequest, type IndividualDocumentUploadUrlRequest, type IndividualRequest, type IndividualRole, type IndividualTitle, InfoResource, type InsightEvidence, type InsightItem, type InsightReport, type InsightSnapshot, InsightsResource, InstructionsResource, type KSUID, type KybStatus, type LegalAcceptanceAttestor, type LegalAcceptanceContext, type LegalDocument, type LegalStructure, type ListParams, type Logger, type Mandate, type MandateAction, type MandateBudget, type MandateBudgetLine, type MandateListParams, type MandateResponse, type MandateRule, type MandateSigner, type MandateVersion, MandatesResource, type Meta, type Network, type NetworkId, type OfframpAccount, type OfframpAccountCreateRequest, type OneOffTransaction, type OneOffTransactionListParams, type OneOffTransactionRequest, type OnrampAccount, type OnrampAccountCreateRequest, type OutstandingLegalDocument, P256MandateSigner, type PageFetcher, PaginatedIterator, type PaginatedResponse, type PaginationMeta, type PaginationParams, type PaymentAgent, type PaymentAgentCreateRequest, type PaymentAgentSignerGroupRef, PaymentAgentsResource, type PaymentCapability, type PersonName, type PersonaImportJob, type PersonaImportJobListParams, type PersonaImportJobParams, type PersonaImportJobSummary, type PersonaImportJobsPage, type PersonaImportRowResult, PoliciesResource, type Policy, type PolicyCreateRequest, type PolicyRule, type PolicyRuleCreateRequest, type PutFeePayoutDestinationRequest, type RDMarketingFeeDailyRow, type RDMarketingFeeStatement, type RDPayoutDestination, type RDPayoutDestinationRequest, type RFIRequestedItems, type Recipient, type RecipientRequest, type RecipientUpdateRequest, RecipientsResource, type RegisteredAgenticClientPolicy, type RequestOptions, type ResolvedConfig, type RetryPolicy, SandboxResource, type SandboxScenario, type ScheduledPayment, type ScheduledPaymentListParams, ScheduledPaymentsResource, 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, type SignerGroupGetParams, type SignerGroupSignerAddRequest, 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 TransactionListMeta, type TransactionListParams, type TransactionListParamsBase, type TransactionResourceType, type TransactionStatus, TransactionsResource, TransportError, type UpdateCustomerSubClientRequest, type UploadedDocumentMetadata, type UsdcWalletPayoutDestination, type User, type UserCreateRequest, type UserListParams, type UserUpdateRequest, UsersResource, type Wallet, type WalletBalance, type WalletBalances, type WalletCreateRequest, type WalletTransaction, type WalletTransactionListParams, type WalletTransactionRequest, WalletsResource, type WebhookEvent, type WebhookHistoryList, type WebhookHistoryListParams, type WebhookHistoryResponse, type WebhookReplayResponse, type WebhookTarget, type WebhookTargetCreateRequest, type WebhookTargetUpdateRequest, WebhooksResource, type WithdrawApplicationRequest, addPolicyRulePayload, attachGroupPayload, attachPolicyPayload, attachUserToWallet, canonicalJSON, consoleLogger, deletePolicyPayload, detachGroupPayload, detachPolicyPayload, detachUserFromWallet, getEnvironmentURL, mandateAmendSignPayload, mandateSignPayload, noopLogger, paginate, removePolicyRulePayload, updatePolicyRulePayload, verifyMandateSignature };
33613
+ export { APIError, type AcceptedAgreement, type Account, type AccountCreateRequest, type AccountListParams, type AccountUpdateRequest, AccountsResource, type Address, type AdvanceSimulationRequest, type AdvanceSimulationResult, AgentConversation, type AgentConversationOptions, type AgenticAction, type AgenticActionDownstream, type AgenticBlocker, type AgenticBlockerCode, type AgenticClientPolicy, type AgenticInstruction, type AgenticInstructionsResult, AgenticPolicyResource, type AgenticProposal, type AgenticProposalsProgress, type AgenticProposalsResult, type AmendMandateRequest, type ApiKey, type ApiKeyCreateRequest, type ApiKeyResponse, type ApiKeyScope, type ApiKeyUpdateRequest, ApiKeysResource, type Application, type ApplicationDocumentType, type ApplicationDocumentUploadRequest, type ApplicationDocumentUploadUrlRequest, type ApplicationGetParams, type ApplicationListItem, type ApplicationStatus, type ApplicationSubmissionRequest, ApplicationsResource, type ApproveMandateRequest, type AssociatedIndividual, type AssociatedIndividualRequest, type AttachedPolicy, type AttachedWallet, type Attachment, type AttachmentMediaType, type AttestationSubmitRequest, type AttestationType, AuthMode, type AutoAccountTransactionListParams, type AutoTransaction, type AutoTransactionListParams, AutoTransactionsResource, type AverageMonthlyRevenue, BelowThresholdError, type BulkImportSumsubTokensRequest, type BulkImportSumsubTokensResponse, type BulkImportSumsubTokensResult, type BusinessApplicationCreateRequest, type BusinessDetailsResponse, type BusinessPurposeOfAccount, type BusinessSourceOfFunds, type CancelMandateRequest, type Capability, type CapabilityRequirement, type ChatMessage, type ClientInsightCustomer, type ClientInsightCustomersSummary, type ClientInsightFacets, type ClientInsightItemCounts, type ClientInsightMetric, type ClientInsightReport, type ClientInsightSeries, type ClientInsightSeriesPoint, type ClientInsightSnapshot, type ClientInsightsParams, type ClientPricingConfig, ConfigurationError, type ConversationTurn, type Country, type CreateApiKeyForClientRequest, type CreateInstructionsRequest, type CreateMandateRequest, type CreateProposalsRequest, type CreateScheduledPaymentRequest, type CryptoDestination, type CryptoDestinationRequest, type CursorExtractor, type Customer, type CustomerCapabilities, type CustomerCreateRequest, type CustomerCreateResponse, type CustomerListParams, type CustomerPage, type CustomerReEngagementResponse, type CustomerStatus, type CustomerStatusCounts, CustomersResource, DEFAULT_RETRY_POLICY, DakotaClient, type DakotaClientConfig, type Destination, type DestinationCreateResponse, type DestinationListParams, type DestinationRequest, DestinationsResource, type DeveloperFee, type DeveloperFeeDefaults, type DeveloperFeeRate, type DocumentUploadResponse, type DocumentUploadUrlResponse, type EDDRequest, type EDDWithApplicationID, ES256Signer, type EmploymentStatus, type EndorsedRequest, EndorsementRequiredError, Environment, type Event, type EventListParams, type EventType, EventsResource, type ExpectedMonthlyDeposit, type Family, type FeePayoutDestination, FeePayoutDestinationResource, type FiatUSDestination, type FiatUSDestinationRequest, GovernanceSignerLike, type ImportPersonaTokensRequest, type ImportPersonaTokensResponse, type IndividualDetailsResponse, type IndividualDocumentType, type IndividualDocumentUploadRequest, type IndividualDocumentUploadUrlRequest, type IndividualRequest, type IndividualRole, type IndividualTitle, InfoResource, type InsightEvidence, type InsightItem, type InsightReport, type InsightSnapshot, InsightsResource, InstructionsResource, InsufficientEndorsementsError, InvalidGoverningGroupError, type KSUID, type KybStatus, type LegalAcceptanceAttestor, type LegalAcceptanceContext, type LegalDocument, type LegalStructure, type ListParams, type Logger, type Mandate, type MandateAction, type MandateBudget, type MandateBudgetLine, type MandateListParams, type MandateResponse, type MandateRule, type MandateSigner, type MandateVersion, MandatesResource, type Meta, type Network, type NetworkId, type OfframpAccount, type OfframpAccountCreateRequest, type OneOffTransaction, type OneOffTransactionListParams, type OneOffTransactionRequest, type OnrampAccount, type OnrampAccountCreateRequest, type OutstandingLegalDocument, ES256Signer as P256MandateSigner, type PageFetcher, PaginatedIterator, type PaginatedResponse, type PaginationMeta, type PaginationParams, type PaymentAgent, type PaymentAgentCreateRequest, type PaymentAgentSignerGroupRef, PaymentAgentsResource, type PaymentCapability, type PersonName, type PersonaImportJob, type PersonaImportJobListParams, type PersonaImportJobParams, type PersonaImportJobSummary, type PersonaImportJobsPage, type PersonaImportRowResult, PoliciesResource, type Policy, type PolicyCreateRequest, type PolicyRule, type PolicyRuleCreateRequest, type PrepareSignerGroupChangeOptions, type PreparedSignerGroupChange, type PutFeePayoutDestinationRequest, type RDMarketingFeeDailyRow, type RDMarketingFeeStatement, type RDPayoutDestination, type RDPayoutDestinationRequest, type RFIRequestedItems, type Recipient, type RecipientListParams, type RecipientRequest, type RecipientUpdateRequest, RecipientsResource, type RegisteredAgenticClientPolicy, type RequestOptions, type ResolvedConfig, type RetryPolicy, SandboxResource, type SandboxScenario, type ScheduledPayment, type ScheduledPaymentListParams, ScheduledPaymentsResource, type SelfServeCreditTier, type SelfServeCreditTiersResponse, type SelfServeCreditsBalanceResponse, type SelfServeCreditsLedgerEntry, type SelfServeCreditsLedgerEntryType, type SelfServeCreditsLedgerParams, type SelfServeCreditsLedgerResponse, type SelfServeCreditsPricingResponse, type SelfServeCreditsPurchaseRequest, type SelfServeCreditsPurchaseResponse, SelfServeResource, type SendTransactionIntent, type SignedSignerGroupChangeOptions, type Signer, type SignerCreateRequest, type SignerGroup, type SignerGroupCreateRequest, type SignerGroupGetParams, type SignerGroupGovernanceSettings, type SignerGroupGovernanceUpdateRequest, type SignerGroupSignerAddRequest, type SignerGroupSignerRemovalRequest, SignerGroupsResource, SignersResource, type SimulateInboundRequest, type SimulateInboundType, type SimulateOnboardingRequest, type SimulateOnboardingResponse, type SimulateOnboardingType, type SimulationCallbackRecord, type SimulationInspection, type SimulationResponse, StaleSignerGroupVersionError, type SubClientSummary, type SwapAccount, type SwapAccountCreateRequest, type TransactionListMeta, type TransactionListParams, type TransactionListParamsBase, type TransactionResourceType, type TransactionStatus, TransactionsResource, TransportError, type UpdateCustomerSubClientRequest, type UploadedDocumentMetadata, type UsdcWalletPayoutDestination, type User, type UserCreateRequest, type UserListParams, type UserUpdateRequest, UsersResource, type Wallet, type WalletBalance, type WalletBalances, type WalletCreateRequest, type WalletTransaction, type WalletTransactionListParams, type WalletTransactionRequest, WalletsResource, type WebhookEvent, type WebhookHistoryList, type WebhookHistoryListParams, type WebhookHistoryResponse, type WebhookReplayResponse, type WebhookTarget, type WebhookTargetCreateRequest, type WebhookTargetUpdateRequest, WebhooksResource, type WithdrawApplicationRequest, addPolicyRulePayload, attachGroupPayload, attachPolicyPayload, attachUserToWallet, consoleLogger, deletePolicyPayload, detachGroupPayload, detachPolicyPayload, detachUserFromWallet, getEnvironmentURL, mandateAmendSignPayload, mandateSignPayload, noopLogger, paginate, removePolicyRulePayload, updatePolicyRulePayload, verifyES256Signature, verifyES256Signature as verifyMandateSignature };