@1claw/sdk 0.48.2 → 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 +12 -2
- package/dist/generated/api-types.d.ts +218 -13
- package/dist/generated/api-types.d.ts.map +1 -1
- package/dist/resources/auth.d.ts +2 -2
- package/dist/resources/auth.d.ts.map +1 -1
- package/dist/resources/auth.js +6 -3
- package/dist/resources/auth.js.map +1 -1
- package/dist/resources/passkeys.d.ts +2 -2
- package/dist/resources/passkeys.d.ts.map +1 -1
- package/dist/resources/passkeys.js +7 -4
- package/dist/resources/passkeys.js.map +1 -1
- package/dist/types.d.ts +39 -1
- package/dist/types.d.ts.map +1 -1
- package/package.json +1 -1
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: "
|
|
829
|
-
approval: {
|
|
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
|
-
/**
|
|
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
|
-
/**
|
|
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
|
-
/**
|
|
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: {
|
|
@@ -10451,20 +10496,46 @@ export interface components {
|
|
|
10451
10496
|
abis?: components["schemas"]["ContractAbiResponse"][];
|
|
10452
10497
|
};
|
|
10453
10498
|
/**
|
|
10454
|
-
* @description Signing-time
|
|
10499
|
+
* @description Signing-time conditions on access policies (all tiers).
|
|
10455
10500
|
* Ignored on secret reads. Evaluated when a TransactionContext is present.
|
|
10501
|
+
* Fields are combined according to `match_mode` (default AND).
|
|
10456
10502
|
*/
|
|
10457
10503
|
TxConditions: {
|
|
10504
|
+
/**
|
|
10505
|
+
* @description How individual condition fields are combined.
|
|
10506
|
+
* "all" (default): every present field must match (AND).
|
|
10507
|
+
* "any": at least one present field must match (OR).
|
|
10508
|
+
* @default all
|
|
10509
|
+
* @enum {string}
|
|
10510
|
+
*/
|
|
10511
|
+
match_mode: "all" | "any";
|
|
10458
10512
|
function_name_in?: string[];
|
|
10459
10513
|
function_selector_in?: string[];
|
|
10460
10514
|
erc20_amount_above?: string;
|
|
10461
|
-
/** @description Native value threshold in
|
|
10515
|
+
/** @description Native value threshold in wei (arbitrary-precision string) */
|
|
10462
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[];
|
|
10463
10527
|
to_address_in?: string[];
|
|
10464
10528
|
chain_in?: string[];
|
|
10465
10529
|
intent_type_in?: string[];
|
|
10466
10530
|
decode_failed?: boolean;
|
|
10467
10531
|
program_id_in?: string[];
|
|
10532
|
+
/**
|
|
10533
|
+
* @description When true, conditions are also evaluated against inner calls
|
|
10534
|
+
* extracted from wrapper transactions (multicall, Safe execTransaction,
|
|
10535
|
+
* ERC-4337 handleOps). A match on any inner call counts as an overall match.
|
|
10536
|
+
* @default false
|
|
10537
|
+
*/
|
|
10538
|
+
deep_inspect: boolean;
|
|
10468
10539
|
} & {
|
|
10469
10540
|
[key: string]: unknown;
|
|
10470
10541
|
};
|
|
@@ -10478,12 +10549,66 @@ export interface components {
|
|
|
10478
10549
|
expiry_secs: number;
|
|
10479
10550
|
/** @default false */
|
|
10480
10551
|
self_approval_allowed: boolean;
|
|
10552
|
+
/**
|
|
10553
|
+
* @description When ALL conditions in ANY entry match, consensus is bypassed.
|
|
10554
|
+
* Useful for exempting known-safe recipients or low-value transfers.
|
|
10555
|
+
*/
|
|
10556
|
+
skip_when?: components["schemas"]["FlatConditionSet"][];
|
|
10557
|
+
/**
|
|
10558
|
+
* @description Consensus is ONLY required when at least one entry matches.
|
|
10559
|
+
* If set and none match, consensus is skipped entirely.
|
|
10560
|
+
*/
|
|
10561
|
+
require_when?: components["schemas"]["FlatConditionSet"][];
|
|
10562
|
+
/**
|
|
10563
|
+
* @description When true, also evaluate conditions against inner calls extracted
|
|
10564
|
+
* from wrapper transactions (multicall, Safe execTransaction,
|
|
10565
|
+
* ERC-4337 handleOps).
|
|
10566
|
+
* @default false
|
|
10567
|
+
*/
|
|
10568
|
+
deep_inspect: boolean;
|
|
10569
|
+
};
|
|
10570
|
+
/**
|
|
10571
|
+
* @description Flat condition set used by consensus composability. Each present field
|
|
10572
|
+
* is AND-combined within the set. At least one field must be specified
|
|
10573
|
+
* (unless `always` is true).
|
|
10574
|
+
*/
|
|
10575
|
+
FlatConditionSet: {
|
|
10576
|
+
/** @description Native value threshold in gwei (numeric string) */
|
|
10577
|
+
value_above?: string;
|
|
10578
|
+
chain_in?: string[];
|
|
10579
|
+
to_address_in?: string[];
|
|
10580
|
+
function_selector_in?: string[];
|
|
10581
|
+
/** @description ERC-20 raw token amount threshold (numeric string) */
|
|
10582
|
+
erc20_amount_above?: string;
|
|
10583
|
+
intent_type_in?: string[];
|
|
10584
|
+
/** @description When true, this entry always matches regardless of other fields */
|
|
10585
|
+
always?: boolean;
|
|
10586
|
+
};
|
|
10587
|
+
/**
|
|
10588
|
+
* @description Time window condition for policy evaluation. Used inside the policy
|
|
10589
|
+
* `conditions` JSON to restrict when the policy is active.
|
|
10590
|
+
*/
|
|
10591
|
+
TimeWindow: {
|
|
10592
|
+
start_hour?: number;
|
|
10593
|
+
end_hour?: number;
|
|
10594
|
+
/** @description Days when policy is active (0=Sunday, 6=Saturday) */
|
|
10595
|
+
days_of_week?: number[];
|
|
10596
|
+
/** @description IANA timezone identifier (e.g. "America/New_York"). Defaults to UTC. */
|
|
10597
|
+
timezone?: string;
|
|
10598
|
+
/** @description Cron expression (6-field with seconds) for fine-grained scheduling. */
|
|
10599
|
+
cron_expr?: string;
|
|
10481
10600
|
};
|
|
10482
10601
|
ConsensusCondition: {
|
|
10483
10602
|
/** @enum {string} */
|
|
10484
10603
|
type: "value_above";
|
|
10485
|
-
/**
|
|
10486
|
-
|
|
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;
|
|
10487
10612
|
} | {
|
|
10488
10613
|
/** @enum {string} */
|
|
10489
10614
|
type: "chain_in";
|
|
@@ -10507,6 +10632,14 @@ export interface components {
|
|
|
10507
10632
|
} | {
|
|
10508
10633
|
/** @enum {string} */
|
|
10509
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[];
|
|
10510
10643
|
};
|
|
10511
10644
|
ApprovalRequirement: {
|
|
10512
10645
|
min_approvals: number;
|
|
@@ -10514,6 +10647,8 @@ export interface components {
|
|
|
10514
10647
|
per_role_minimums?: {
|
|
10515
10648
|
[key: string]: number;
|
|
10516
10649
|
};
|
|
10650
|
+
/** @description At least one approval must use one of these credential types */
|
|
10651
|
+
require_credential_types?: ("password" | "passkey" | "totp" | "biometric" | "api_key")[];
|
|
10517
10652
|
};
|
|
10518
10653
|
SubmitPendingApprovalRequest: {
|
|
10519
10654
|
/** Format: uuid */
|
|
@@ -10536,6 +10671,11 @@ export interface components {
|
|
|
10536
10671
|
decision: "approve" | "reject";
|
|
10537
10672
|
payload_hash: string;
|
|
10538
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";
|
|
10539
10679
|
};
|
|
10540
10680
|
PendingApprovalResponse: {
|
|
10541
10681
|
/** Format: uuid */
|
|
@@ -11248,7 +11388,10 @@ export interface operations {
|
|
|
11248
11388
|
passkeyRegisterComplete: {
|
|
11249
11389
|
parameters: {
|
|
11250
11390
|
query?: never;
|
|
11251
|
-
header?:
|
|
11391
|
+
header?: {
|
|
11392
|
+
/** @description Re-auth token (`rat_`) or account password */
|
|
11393
|
+
"X-Auth-Confirm"?: string;
|
|
11394
|
+
};
|
|
11252
11395
|
path?: never;
|
|
11253
11396
|
cookie?: never;
|
|
11254
11397
|
};
|
|
@@ -11377,7 +11520,10 @@ export interface operations {
|
|
|
11377
11520
|
deletePasskey: {
|
|
11378
11521
|
parameters: {
|
|
11379
11522
|
query?: never;
|
|
11380
|
-
header
|
|
11523
|
+
header: {
|
|
11524
|
+
/** @description Re-auth token (`rat_`) or account password */
|
|
11525
|
+
"X-Auth-Confirm": string;
|
|
11526
|
+
};
|
|
11381
11527
|
path: {
|
|
11382
11528
|
passkey_id: string;
|
|
11383
11529
|
};
|
|
@@ -11392,6 +11538,7 @@ export interface operations {
|
|
|
11392
11538
|
};
|
|
11393
11539
|
content?: never;
|
|
11394
11540
|
};
|
|
11541
|
+
403: components["responses"]["Forbidden"];
|
|
11395
11542
|
};
|
|
11396
11543
|
};
|
|
11397
11544
|
requestApproval: {
|
|
@@ -11453,7 +11600,10 @@ export interface operations {
|
|
|
11453
11600
|
deleteMe: {
|
|
11454
11601
|
parameters: {
|
|
11455
11602
|
query?: never;
|
|
11456
|
-
header
|
|
11603
|
+
header: {
|
|
11604
|
+
/** @description Re-auth token (`rat_`, purpose `account.delete`) or password */
|
|
11605
|
+
"X-Auth-Confirm": string;
|
|
11606
|
+
};
|
|
11457
11607
|
path?: never;
|
|
11458
11608
|
cookie?: never;
|
|
11459
11609
|
};
|
|
@@ -11501,6 +11651,56 @@ export interface operations {
|
|
|
11501
11651
|
400: components["responses"]["BadRequest"];
|
|
11502
11652
|
};
|
|
11503
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
|
+
};
|
|
11504
11704
|
mfaStatus: {
|
|
11505
11705
|
parameters: {
|
|
11506
11706
|
query?: never;
|
|
@@ -11594,7 +11794,10 @@ export interface operations {
|
|
|
11594
11794
|
mfaDisable: {
|
|
11595
11795
|
parameters: {
|
|
11596
11796
|
query?: never;
|
|
11597
|
-
header?:
|
|
11797
|
+
header?: {
|
|
11798
|
+
/** @description Passkey or TOTP re-auth token (`rat_`) */
|
|
11799
|
+
"X-Auth-Confirm"?: string;
|
|
11800
|
+
};
|
|
11598
11801
|
path?: never;
|
|
11599
11802
|
cookie?: never;
|
|
11600
11803
|
};
|
|
@@ -11796,7 +11999,9 @@ export interface operations {
|
|
|
11796
11999
|
exportUserData: {
|
|
11797
12000
|
parameters: {
|
|
11798
12001
|
query?: never;
|
|
11799
|
-
header
|
|
12002
|
+
header: {
|
|
12003
|
+
"X-Auth-Confirm": string;
|
|
12004
|
+
};
|
|
11800
12005
|
path?: never;
|
|
11801
12006
|
cookie?: never;
|
|
11802
12007
|
};
|