@1claw/sdk 0.49.0 → 0.50.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/README.md CHANGED
@@ -825,8 +825,18 @@ await client.access.createPolicy(vaultId, {
825
825
  principal_id: agentId,
826
826
  permissions: ["read"],
827
827
  consensus_trigger: {
828
- conditions: [{ type: "always" }],
829
- approval: { min_approvals: 2 },
828
+ conditions: [{ type: "value_above", threshold_wei: "1000000000000000000" }],
829
+ approval: {
830
+ min_approvals: 2,
831
+ required_roles: ["owner", "admin"],
832
+ per_role_minimums: { owner: 1 },
833
+ require_credential_types: ["passkey"],
834
+ },
835
+ },
836
+ tx_conditions: {
837
+ eip712_primary_type_in: ["Permit", "Permit2"],
838
+ eip712_verifying_contract_in: ["0x000000000022D473030F116dDEE9F6B43aC78BA3"],
839
+ eip7702_authorized_addresses_in: ["0xKnownSafeDelegate"],
830
840
  },
831
841
  });
832
842
  ```
@@ -390,7 +390,11 @@ export interface paths {
390
390
  };
391
391
  get?: never;
392
392
  put?: never;
393
- /** Complete passkey registration */
393
+ /**
394
+ * Complete passkey registration
395
+ * @description When the account already has a password, passkey, or TOTP,
396
+ * `X-Auth-Confirm` is required (purpose `security.passkey.register`).
397
+ */
394
398
  post: operations["passkeyRegisterComplete"];
395
399
  delete?: never;
396
400
  options?: never;
@@ -459,7 +463,14 @@ export interface paths {
459
463
  get?: never;
460
464
  put?: never;
461
465
  post?: never;
462
- /** Delete a passkey */
466
+ /**
467
+ * Delete a passkey
468
+ * @description Removes a registered passkey. Requires recent re-authentication
469
+ * (`X-Auth-Confirm` with a `rat_` token from `POST /v1/auth/reauth`
470
+ * using purpose `security.passkey.delete`). Passkey or TOTP is
471
+ * required when either is enrolled. Deleting the last passkey is
472
+ * refused while vault passkey unlock is enabled.
473
+ */
463
474
  delete: operations["deletePasskey"];
464
475
  options?: never;
465
476
  head?: never;
@@ -505,6 +516,29 @@ export interface paths {
505
516
  patch: operations["updateMe"];
506
517
  trace?: never;
507
518
  };
519
+ "/v1/auth/settings": {
520
+ parameters: {
521
+ query?: never;
522
+ header?: never;
523
+ path?: never;
524
+ cookie?: never;
525
+ };
526
+ /** Get user security settings */
527
+ get: operations["getSecuritySettings"];
528
+ put?: never;
529
+ post?: never;
530
+ delete?: never;
531
+ options?: never;
532
+ head?: never;
533
+ /**
534
+ * Update user security settings
535
+ * @description Disabling `require_passkey_for_vaults` requires `X-Auth-Confirm`
536
+ * (purpose `security.vault_passkey.disable`) with a passkey or TOTP
537
+ * when either is enrolled.
538
+ */
539
+ patch: operations["updateSecuritySettings"];
540
+ trace?: never;
541
+ };
508
542
  "/v1/auth/mfa/status": {
509
543
  parameters: {
510
544
  query?: never;
@@ -583,7 +617,12 @@ export interface paths {
583
617
  get?: never;
584
618
  put?: never;
585
619
  post?: never;
586
- /** Disable MFA */
620
+ /**
621
+ * Disable MFA
622
+ * @description Requires a valid TOTP or recovery code in the body, or a passkey
623
+ * re-auth token in `X-Auth-Confirm` (purpose `security.mfa.disable`).
624
+ * Account password alone is not accepted while TOTP is enabled.
625
+ */
587
626
  delete: operations["mfaDisable"];
588
627
  options?: never;
589
628
  head?: never;
@@ -724,7 +763,8 @@ export interface paths {
724
763
  * @description Returns a full export of the authenticated user's data including
725
764
  * profile, vaults, agents, secrets metadata, and policies. Intended
726
765
  * for GDPR data-portability requests. Only available to human users
727
- * (not agents).
766
+ * (not agents). Requires `X-Auth-Confirm` (purpose `account.export`);
767
+ * passkey or TOTP when either is enrolled.
728
768
  */
729
769
  post: operations["exportUserData"];
730
770
  delete?: never;
@@ -6630,7 +6670,12 @@ export interface components {
6630
6670
  mfa_token: string;
6631
6671
  };
6632
6672
  MfaDisableRequest: {
6673
+ /** @description TOTP or recovery code */
6633
6674
  code?: string;
6675
+ /**
6676
+ * @deprecated
6677
+ * @description Deprecated. Password is no longer sufficient to disable MFA.
6678
+ */
6634
6679
  password?: string;
6635
6680
  };
6636
6681
  DeviceCodeRequest: {
@@ -10467,8 +10512,18 @@ export interface components {
10467
10512
  function_name_in?: string[];
10468
10513
  function_selector_in?: string[];
10469
10514
  erc20_amount_above?: string;
10470
- /** @description Native value threshold in gwei */
10515
+ /** @description Native value threshold in wei (arbitrary-precision string) */
10471
10516
  value_above?: string;
10517
+ /** @description Match EIP-712 typed_data primaryType (case-sensitive) */
10518
+ eip712_primary_type_in?: string[];
10519
+ /** @description Match EIP-712 domain.verifyingContract (case-insensitive) */
10520
+ eip712_verifying_contract_in?: string[];
10521
+ /** @description Match EIP-712 domain.name */
10522
+ eip712_domain_name_in?: string[];
10523
+ /** @description Match EIP-712 domain.chainId */
10524
+ eip712_domain_chain_id_in?: number[];
10525
+ /** @description Match EIP-7702 authorization_list delegate addresses (case-insensitive) */
10526
+ eip7702_authorized_addresses_in?: string[];
10472
10527
  to_address_in?: string[];
10473
10528
  chain_in?: string[];
10474
10529
  intent_type_in?: string[];
@@ -10546,8 +10601,14 @@ export interface components {
10546
10601
  ConsensusCondition: {
10547
10602
  /** @enum {string} */
10548
10603
  type: "value_above";
10549
- /** Format: int64 */
10550
- threshold_gwei: number;
10604
+ /** @description Value threshold in wei (arbitrary-precision string). Preferred over threshold_gwei. */
10605
+ threshold_wei?: string;
10606
+ /**
10607
+ * Format: int64
10608
+ * @deprecated
10609
+ * @description Deprecated — use threshold_wei for arbitrary precision
10610
+ */
10611
+ threshold_gwei?: number;
10551
10612
  } | {
10552
10613
  /** @enum {string} */
10553
10614
  type: "chain_in";
@@ -10571,6 +10632,14 @@ export interface components {
10571
10632
  } | {
10572
10633
  /** @enum {string} */
10573
10634
  type: "always";
10635
+ } | {
10636
+ /** @enum {string} */
10637
+ type: "action_in";
10638
+ /**
10639
+ * @description Control-plane actions to match, e.g. policy.create, policy.update,
10640
+ * policy.delete, signing_key.export, member.role_change, member.remove
10641
+ */
10642
+ actions: string[];
10574
10643
  };
10575
10644
  ApprovalRequirement: {
10576
10645
  min_approvals: number;
@@ -10578,6 +10647,8 @@ export interface components {
10578
10647
  per_role_minimums?: {
10579
10648
  [key: string]: number;
10580
10649
  };
10650
+ /** @description At least one approval must use one of these credential types */
10651
+ require_credential_types?: ("password" | "passkey" | "totp" | "biometric" | "api_key")[];
10581
10652
  };
10582
10653
  SubmitPendingApprovalRequest: {
10583
10654
  /** Format: uuid */
@@ -10600,6 +10671,11 @@ export interface components {
10600
10671
  decision: "approve" | "reject";
10601
10672
  payload_hash: string;
10602
10673
  reason?: string;
10674
+ /**
10675
+ * @description Authentication method used for this approval vote
10676
+ * @enum {string}
10677
+ */
10678
+ credential_type?: "password" | "passkey" | "totp" | "biometric" | "api_key";
10603
10679
  };
10604
10680
  PendingApprovalResponse: {
10605
10681
  /** Format: uuid */
@@ -11312,7 +11388,10 @@ export interface operations {
11312
11388
  passkeyRegisterComplete: {
11313
11389
  parameters: {
11314
11390
  query?: never;
11315
- header?: never;
11391
+ header?: {
11392
+ /** @description Re-auth token (`rat_`) or account password */
11393
+ "X-Auth-Confirm"?: string;
11394
+ };
11316
11395
  path?: never;
11317
11396
  cookie?: never;
11318
11397
  };
@@ -11441,7 +11520,10 @@ export interface operations {
11441
11520
  deletePasskey: {
11442
11521
  parameters: {
11443
11522
  query?: never;
11444
- header?: never;
11523
+ header: {
11524
+ /** @description Re-auth token (`rat_`) or account password */
11525
+ "X-Auth-Confirm": string;
11526
+ };
11445
11527
  path: {
11446
11528
  passkey_id: string;
11447
11529
  };
@@ -11456,6 +11538,7 @@ export interface operations {
11456
11538
  };
11457
11539
  content?: never;
11458
11540
  };
11541
+ 403: components["responses"]["Forbidden"];
11459
11542
  };
11460
11543
  };
11461
11544
  requestApproval: {
@@ -11517,7 +11600,10 @@ export interface operations {
11517
11600
  deleteMe: {
11518
11601
  parameters: {
11519
11602
  query?: never;
11520
- header?: never;
11603
+ header: {
11604
+ /** @description Re-auth token (`rat_`, purpose `account.delete`) or password */
11605
+ "X-Auth-Confirm": string;
11606
+ };
11521
11607
  path?: never;
11522
11608
  cookie?: never;
11523
11609
  };
@@ -11565,6 +11651,56 @@ export interface operations {
11565
11651
  400: components["responses"]["BadRequest"];
11566
11652
  };
11567
11653
  };
11654
+ getSecuritySettings: {
11655
+ parameters: {
11656
+ query?: never;
11657
+ header?: never;
11658
+ path?: never;
11659
+ cookie?: never;
11660
+ };
11661
+ requestBody?: never;
11662
+ responses: {
11663
+ /** @description Security settings */
11664
+ 200: {
11665
+ headers: {
11666
+ [name: string]: unknown;
11667
+ };
11668
+ content: {
11669
+ "application/json": {
11670
+ require_passkey_for_vaults?: boolean;
11671
+ passkey_count?: number;
11672
+ };
11673
+ };
11674
+ };
11675
+ };
11676
+ };
11677
+ updateSecuritySettings: {
11678
+ parameters: {
11679
+ query?: never;
11680
+ header?: {
11681
+ "X-Auth-Confirm"?: string;
11682
+ };
11683
+ path?: never;
11684
+ cookie?: never;
11685
+ };
11686
+ requestBody: {
11687
+ content: {
11688
+ "application/json": {
11689
+ require_passkey_for_vaults?: boolean;
11690
+ };
11691
+ };
11692
+ };
11693
+ responses: {
11694
+ /** @description Updated settings */
11695
+ 200: {
11696
+ headers: {
11697
+ [name: string]: unknown;
11698
+ };
11699
+ content?: never;
11700
+ };
11701
+ 403: components["responses"]["Forbidden"];
11702
+ };
11703
+ };
11568
11704
  mfaStatus: {
11569
11705
  parameters: {
11570
11706
  query?: never;
@@ -11658,7 +11794,10 @@ export interface operations {
11658
11794
  mfaDisable: {
11659
11795
  parameters: {
11660
11796
  query?: never;
11661
- header?: never;
11797
+ header?: {
11798
+ /** @description Passkey or TOTP re-auth token (`rat_`) */
11799
+ "X-Auth-Confirm"?: string;
11800
+ };
11662
11801
  path?: never;
11663
11802
  cookie?: never;
11664
11803
  };
@@ -11860,7 +11999,9 @@ export interface operations {
11860
11999
  exportUserData: {
11861
12000
  parameters: {
11862
12001
  query?: never;
11863
- header?: never;
12002
+ header: {
12003
+ "X-Auth-Confirm": string;
12004
+ };
11864
12005
  path?: never;
11865
12006
  cookie?: never;
11866
12007
  };