@ocap/mpc-hsm 1.33.6 → 1.33.8
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/esm/bip39-english-wordlist.d.mts +11 -0
- package/esm/bip39-english-wordlist.mjs +31 -0
- package/esm/constants.d.mts +66 -2
- package/esm/constants.mjs +65 -1
- package/esm/dkg.mjs +2 -2
- package/esm/index.d.mts +11 -3
- package/esm/index.mjs +11 -3
- package/esm/ocap-clear-signing.d.mts +125 -0
- package/esm/ocap-clear-signing.mjs +1170 -0
- package/esm/offline-ceremony.d.mts +127 -0
- package/esm/offline-ceremony.mjs +481 -0
- package/esm/ot.d.mts +7 -1
- package/esm/ot.mjs +149 -16
- package/esm/personal-vault.d.mts +1292 -0
- package/esm/personal-vault.mjs +3615 -0
- package/esm/personal.d.mts +10 -0
- package/esm/personal.mjs +11 -0
- package/esm/presign.mjs +1 -1
- package/esm/rlp-eip1559.d.mts +75 -0
- package/esm/rlp-eip1559.mjs +293 -0
- package/esm/secp256k1-scalar.d.mts +1 -1
- package/esm/secp256k1-scalar.mjs +14 -5
- package/esm/steel-mnemonic.d.mts +55 -0
- package/esm/steel-mnemonic.mjs +247 -0
- package/esm/ves-backup.d.mts +296 -0
- package/esm/ves-backup.mjs +1025 -0
- package/esm/x402-agent-guard.d.mts +111 -0
- package/esm/x402-agent-guard.mjs +780 -0
- package/lib/bip39-english-wordlist.cjs +33 -0
- package/lib/bip39-english-wordlist.d.cts +11 -0
- package/lib/constants.cjs +128 -0
- package/lib/constants.d.cts +66 -2
- package/lib/dkg.cjs +2 -2
- package/lib/index.cjs +249 -0
- package/lib/index.d.cts +11 -3
- package/lib/ocap-clear-signing.cjs +1176 -0
- package/lib/ocap-clear-signing.d.cts +125 -0
- package/lib/offline-ceremony.cjs +487 -0
- package/lib/offline-ceremony.d.cts +127 -0
- package/lib/ot.cjs +150 -15
- package/lib/ot.d.cts +7 -1
- package/lib/personal-vault.cjs +3725 -0
- package/lib/personal-vault.d.cts +1292 -0
- package/lib/personal.cjs +338 -0
- package/lib/personal.d.cts +10 -0
- package/lib/presign.cjs +1 -1
- package/lib/rlp-eip1559.cjs +303 -0
- package/lib/rlp-eip1559.d.cts +75 -0
- package/lib/secp256k1-scalar.cjs +14 -5
- package/lib/steel-mnemonic.cjs +253 -0
- package/lib/steel-mnemonic.d.cts +55 -0
- package/lib/ves-backup.cjs +1053 -0
- package/lib/ves-backup.d.cts +296 -0
- package/lib/x402-agent-guard.cjs +788 -0
- package/lib/x402-agent-guard.d.cts +111 -0
- package/package.json +6 -1
|
@@ -0,0 +1,1292 @@
|
|
|
1
|
+
import { MAX_PERSONAL_CALL_DEPTH, MpcErrorCode } from "./constants.cjs";
|
|
2
|
+
import { RandomBytesFn, SchnorrPokProof, bytesToHex, hexToBytes, zeroizeBytes } from "./secp256k1-scalar.cjs";
|
|
3
|
+
import { DerivedChildKey, MpcChildDerivationSpec } from "./tweak.cjs";
|
|
4
|
+
import { BaseOtStep1Message, BaseOtStep2Message } from "./ot.cjs";
|
|
5
|
+
import { MpcPublicClusterInfo, PresignMtaOtStep1Bundle, PresignMtaOtStep2Bundle, PresignMtaOtStep3Bundle, PresignMtaStep4PayloadBundle, PresignRound1CommitmentMsg, PresignRound1RevealMsg, PresignRound3BroadcastMsg, PresignRound4BroadcastMsg, PresignatureShareRecord, VolatilePresignaturePool } from "./presign.cjs";
|
|
6
|
+
import { MpcAggregatedSignature, MpcOnlineSignShare } from "./sign.cjs";
|
|
7
|
+
import { Eip1559AccessListItem, Eip1559UnsignedTxFields } from "./rlp-eip1559.cjs";
|
|
8
|
+
|
|
9
|
+
//#region src/personal-vault.d.ts
|
|
10
|
+
declare function base64UrlEncodeBytes(bytes: Uint8Array): string;
|
|
11
|
+
declare function base64UrlDecodeBytes(encoded: string, errorCode?: MpcErrorCode): Uint8Array;
|
|
12
|
+
declare function aes256GcmEncryptDetached(params: {
|
|
13
|
+
readonly key32: Uint8Array;
|
|
14
|
+
readonly iv12: Uint8Array;
|
|
15
|
+
readonly plaintext: Uint8Array;
|
|
16
|
+
readonly aad: Uint8Array;
|
|
17
|
+
}): Promise<{
|
|
18
|
+
readonly ciphertext: Uint8Array;
|
|
19
|
+
readonly tag16: Uint8Array;
|
|
20
|
+
}>;
|
|
21
|
+
declare function aes256GcmDecryptDetached(params: {
|
|
22
|
+
readonly key32: Uint8Array;
|
|
23
|
+
readonly iv12: Uint8Array;
|
|
24
|
+
readonly ciphertext: Uint8Array;
|
|
25
|
+
readonly tag16: Uint8Array;
|
|
26
|
+
readonly aad: Uint8Array;
|
|
27
|
+
readonly authFailureCode?: MpcErrorCode;
|
|
28
|
+
}): Promise<Uint8Array>;
|
|
29
|
+
declare const PERSONAL_MAX_VELOCITY_UINT128: bigint;
|
|
30
|
+
declare const UNLIMITED_APPROVE_THRESHOLD: bigint;
|
|
31
|
+
type ActorKindAndAlg = 'human-p256' | 'agent-ed25519' | 'agent-p256';
|
|
32
|
+
declare const ACTOR_KIND_AND_ALG_BYTE: Readonly<Record<ActorKindAndAlg, number>>;
|
|
33
|
+
declare const HSM_SEALED_BLOB_VERSION: 1;
|
|
34
|
+
declare const HSM_SEALED_BLOB_HEADER_BYTES: 319;
|
|
35
|
+
declare const HSM_SEALED_BLOB_HEADER_MAC_OFFSET: 319;
|
|
36
|
+
declare const HSM_SEALED_BLOB_HEADER_WITH_MAC_BYTES: 351;
|
|
37
|
+
declare const HSM_SEALED_BLOB_IV_OFFSET: 351;
|
|
38
|
+
declare const HSM_SEALED_BLOB_TAG_OFFSET: 363;
|
|
39
|
+
declare const HSM_SEALED_BLOB_CIPHERTEXT_OFFSET: 379;
|
|
40
|
+
declare const HSM_SEALED_BLOB_CIPHERTEXT_BYTES: 3717;
|
|
41
|
+
declare const HSM_SEALED_BLOB_MAX_POLICY_UTF8_BYTES: 3642;
|
|
42
|
+
declare function actorKindAndAlgToByte(kind: ActorKindAndAlg): number;
|
|
43
|
+
declare function byteToActorKindAndAlg(byte: number): ActorKindAndAlg;
|
|
44
|
+
declare function isAgentActorKind(kind: ActorKindAndAlg): boolean;
|
|
45
|
+
/**
|
|
46
|
+
* Normalizes an actor public key (`33B` compressed or `65B` uncompressed P-256 for `0x01`/`0x03`,
|
|
47
|
+
* or `32B` Ed25519 / `65B` zero-padded Ed25519 for `0x02`) into canonical `65`-byte padded format.
|
|
48
|
+
*/
|
|
49
|
+
declare function normalizeActorPublicKeyToPadded65(actorKindAndAlg: ActorKindAndAlg, pubKeyInput: Uint8Array | string, errorCode?: MpcErrorCode): Uint8Array;
|
|
50
|
+
declare function validateActorPublicKeyPadded65(actorKindAndAlg: ActorKindAndAlg, actorPubKeyPadded65: Uint8Array, errorCode?: MpcErrorCode): void;
|
|
51
|
+
type PersonalBlobAadInput = Uint8Array | string | Readonly<Record<string, string>> | undefined;
|
|
52
|
+
declare function canonicalizePersonalBlobAadBytes(aad?: PersonalBlobAadInput): Uint8Array;
|
|
53
|
+
interface HsmSealedBlobHeaderFields {
|
|
54
|
+
readonly version: 1;
|
|
55
|
+
readonly kid: string;
|
|
56
|
+
readonly vaultId: string;
|
|
57
|
+
readonly slotId: string;
|
|
58
|
+
readonly rootPublicKeyComp33: Uint8Array;
|
|
59
|
+
readonly policyEpoch: bigint;
|
|
60
|
+
readonly actorKindAndAlg: ActorKindAndAlg;
|
|
61
|
+
readonly actorPubKeyPadded65: Uint8Array;
|
|
62
|
+
readonly slotExpiresAtSec: bigint;
|
|
63
|
+
readonly policyHash32: Uint8Array;
|
|
64
|
+
}
|
|
65
|
+
interface ParsedHsmSealedBlob {
|
|
66
|
+
readonly header: HsmSealedBlobHeaderFields;
|
|
67
|
+
readonly header319: Uint8Array;
|
|
68
|
+
readonly headerMac32: Uint8Array;
|
|
69
|
+
readonly authenticatedPrefix351: Uint8Array;
|
|
70
|
+
readonly aesGcmIv12: Uint8Array;
|
|
71
|
+
readonly aesGcmTag16: Uint8Array;
|
|
72
|
+
readonly ciphertext3717: Uint8Array;
|
|
73
|
+
}
|
|
74
|
+
/**
|
|
75
|
+
* Encodes the canonical `319`-byte `HsmSealedBlob` header (`[0..318]`, `design.md` §4.1).
|
|
76
|
+
*/
|
|
77
|
+
declare function encodeHsmSealedBlobHeader319(params: {
|
|
78
|
+
readonly kid: string;
|
|
79
|
+
readonly vaultId: string;
|
|
80
|
+
readonly slotId: string;
|
|
81
|
+
readonly rootPublicKeyComp33: Uint8Array | string;
|
|
82
|
+
readonly policyEpoch: bigint;
|
|
83
|
+
readonly actorKindAndAlg: ActorKindAndAlg;
|
|
84
|
+
readonly actorPublicKey: Uint8Array | string;
|
|
85
|
+
readonly slotExpiresAtSec: bigint;
|
|
86
|
+
readonly policyHash32: Uint8Array | string;
|
|
87
|
+
}): Uint8Array;
|
|
88
|
+
declare function decodeHsmSealedBlobHeader319(headerBytes: Uint8Array): HsmSealedBlobHeaderFields;
|
|
89
|
+
/**
|
|
90
|
+
* Parses and validates a fixed `4,096`-byte `HsmSealedBlob` (`design.md` §4.1).
|
|
91
|
+
*/
|
|
92
|
+
declare function parseHsmSealedBlobHeader(blobBytes: Uint8Array): ParsedHsmSealedBlob;
|
|
93
|
+
declare function assertPersonalSlotNotExpired(header: Pick<HsmSealedBlobHeaderFields, 'actorKindAndAlg' | 'slotExpiresAtSec'>, nowSec: bigint): void;
|
|
94
|
+
declare function computeHsmSealedBlobHeaderMac32(params: {
|
|
95
|
+
readonly headerMacKey32: Uint8Array;
|
|
96
|
+
readonly header319: Uint8Array;
|
|
97
|
+
readonly aad?: PersonalBlobAadInput;
|
|
98
|
+
}): Uint8Array;
|
|
99
|
+
declare function deriveHsmPersonalSealKey32(params: {
|
|
100
|
+
readonly hsmWrappingKey32: Uint8Array;
|
|
101
|
+
readonly kUnsealSecret32: Uint8Array;
|
|
102
|
+
readonly vaultId: string;
|
|
103
|
+
readonly slotId: string;
|
|
104
|
+
}): Uint8Array;
|
|
105
|
+
declare function encodeHsmSealedBlobInnerPlaintext3717(params: {
|
|
106
|
+
readonly sHsmBytes32: Uint8Array;
|
|
107
|
+
readonly xActorComp33: Uint8Array;
|
|
108
|
+
readonly rootPublicKeyComp33: Uint8Array;
|
|
109
|
+
readonly sealedAtSec: bigint;
|
|
110
|
+
readonly canonicalPolicyUtf8: Uint8Array;
|
|
111
|
+
readonly expectedPolicyHash32: Uint8Array;
|
|
112
|
+
}): Uint8Array;
|
|
113
|
+
declare function decodeHsmSealedBlobInnerPlaintext3717(params: {
|
|
114
|
+
readonly plaintext3717: Uint8Array;
|
|
115
|
+
readonly rootPublicKeyComp33: Uint8Array;
|
|
116
|
+
readonly expectedPolicyHash32: Uint8Array;
|
|
117
|
+
}): {
|
|
118
|
+
readonly sHsmBytes32: Uint8Array;
|
|
119
|
+
readonly xActorComp33: Uint8Array;
|
|
120
|
+
readonly sealedAtSec: bigint;
|
|
121
|
+
readonly canonicalPolicyUtf8: Uint8Array;
|
|
122
|
+
readonly canonicalPolicyJson: string;
|
|
123
|
+
};
|
|
124
|
+
declare function deriveBlindVaultTag32(blindTagKey32: Uint8Array, vaultId: string, rootPublicKeyComp33: Uint8Array): Uint8Array;
|
|
125
|
+
declare function deriveBlindSlotTag32(blindTagKey32: Uint8Array, vaultId: string, slotId: string, rootPublicKeyComp33: Uint8Array): Uint8Array;
|
|
126
|
+
declare function deriveBlindVelocityTag32(blindTagKey32: Uint8Array, vaultId: string, rootPublicKeyComp33: Uint8Array, chainId: bigint, assetKeyLower: string): Uint8Array;
|
|
127
|
+
declare function deriveBlindOcapVelocityTag32(blindTagKey32: Uint8Array, vaultId: string, rootPublicKeyComp33: Uint8Array, ocapChainId: string, assetIdentifier: string): Uint8Array;
|
|
128
|
+
declare function additiveToShamirSlot1Share(sActor32: Uint8Array): Uint8Array;
|
|
129
|
+
declare function additiveToShamirSlot2Share(sHsm32: Uint8Array): Uint8Array;
|
|
130
|
+
declare function verifyPersonalAdditiveSplitMatchesRoot(params: {
|
|
131
|
+
readonly sActor32: Uint8Array;
|
|
132
|
+
readonly sHsm32: Uint8Array;
|
|
133
|
+
readonly rootPublicKeyComp33: Uint8Array | string;
|
|
134
|
+
readonly xActorComp33?: Uint8Array | string;
|
|
135
|
+
}): {
|
|
136
|
+
readonly xActorComp33: Uint8Array;
|
|
137
|
+
readonly xHsmComp33: Uint8Array;
|
|
138
|
+
};
|
|
139
|
+
declare function buildPersonalVaultClusterInfo(params: {
|
|
140
|
+
readonly vaultId: string;
|
|
141
|
+
readonly slotId: string;
|
|
142
|
+
readonly policyEpoch: bigint;
|
|
143
|
+
readonly rootPublicKeyComp33: Uint8Array | string;
|
|
144
|
+
readonly xActorComp33: Uint8Array | string;
|
|
145
|
+
}): MpcPublicClusterInfo;
|
|
146
|
+
interface PersonalWakePasswordKdfOptions {
|
|
147
|
+
readonly kdf?: 'pbkdf2-sha256' | 'scrypt';
|
|
148
|
+
readonly pbkdf2Iterations?: number;
|
|
149
|
+
readonly scryptOpts?: {
|
|
150
|
+
readonly N: number;
|
|
151
|
+
readonly r: number;
|
|
152
|
+
readonly p: number;
|
|
153
|
+
};
|
|
154
|
+
}
|
|
155
|
+
declare function derivePersonalWakePasswordKeys(params: {
|
|
156
|
+
readonly password: string;
|
|
157
|
+
readonly vaultSalt32: Uint8Array | string;
|
|
158
|
+
} & PersonalWakePasswordKdfOptions): {
|
|
159
|
+
readonly kPwdClient32: Uint8Array;
|
|
160
|
+
readonly kPwdHsm32: Uint8Array;
|
|
161
|
+
};
|
|
162
|
+
interface DeviceShareEnvelope {
|
|
163
|
+
readonly version: 1;
|
|
164
|
+
readonly vaultId: string;
|
|
165
|
+
readonly slotId: string;
|
|
166
|
+
readonly rootPublicKeyHex: string;
|
|
167
|
+
readonly xActorPublicKeyHex: string;
|
|
168
|
+
readonly deviceSaltHex: string;
|
|
169
|
+
readonly ivHex: string;
|
|
170
|
+
readonly tagHex: string;
|
|
171
|
+
readonly ciphertextHex: string;
|
|
172
|
+
}
|
|
173
|
+
declare function sealDeviceShareEnvelope(params: {
|
|
174
|
+
readonly vaultId: string;
|
|
175
|
+
readonly slotId: string;
|
|
176
|
+
readonly rootPublicKeyComp33: Uint8Array | string;
|
|
177
|
+
readonly sActorBytes32: Uint8Array;
|
|
178
|
+
readonly kHw32: Uint8Array;
|
|
179
|
+
readonly kPwdClient32: Uint8Array;
|
|
180
|
+
readonly deviceSalt32?: Uint8Array;
|
|
181
|
+
readonly rng?: RandomBytesFn;
|
|
182
|
+
}): Promise<DeviceShareEnvelope>;
|
|
183
|
+
declare function unsealDeviceShareEnvelope(params: {
|
|
184
|
+
readonly envelope: DeviceShareEnvelope;
|
|
185
|
+
readonly kHw32: Uint8Array;
|
|
186
|
+
readonly kPwdClient32: Uint8Array;
|
|
187
|
+
}): Promise<{
|
|
188
|
+
readonly sActorBytes32: Uint8Array;
|
|
189
|
+
readonly xActorComp33: Uint8Array;
|
|
190
|
+
readonly rootPublicKeyComp33: Uint8Array;
|
|
191
|
+
}>;
|
|
192
|
+
/**
|
|
193
|
+
* Double-wraps a `4,096B` `HsmSealedBlob` into a `4,140B` `CloudSyncBlob` (`design.md` §4.4):
|
|
194
|
+
* `syncSalt16 [0..15] || iv12 [16..27] || tag16 [28..43] || ciphertext [44..4139]`.
|
|
195
|
+
*/
|
|
196
|
+
declare function wrapSealedBlobForCloudSync(params: {
|
|
197
|
+
readonly sealedBlob4096: Uint8Array;
|
|
198
|
+
readonly syncSecret32: Uint8Array;
|
|
199
|
+
readonly recordId: string;
|
|
200
|
+
readonly rng?: RandomBytesFn;
|
|
201
|
+
}): Promise<Uint8Array>;
|
|
202
|
+
declare function unwrapSealedBlobFromCloudSync(params: {
|
|
203
|
+
readonly cloudBlob4140: Uint8Array;
|
|
204
|
+
readonly syncSecret32: Uint8Array;
|
|
205
|
+
readonly recordId: string;
|
|
206
|
+
}): Promise<Uint8Array>;
|
|
207
|
+
/**
|
|
208
|
+
* Seals inbound sensitive material (`kUnsealSecret32`, `sHsm1`, or resplit `delta`) to the HSM's
|
|
209
|
+
* X25519 transport public key (`epkX25519_32 || iv12 || tag16 || ciphertext`, `design.md` §4.4).
|
|
210
|
+
*/
|
|
211
|
+
declare function sealHsmInboundTransportBox(params: {
|
|
212
|
+
readonly hsmTransportPub32: Uint8Array | string;
|
|
213
|
+
readonly vaultId: string;
|
|
214
|
+
readonly slotId: string;
|
|
215
|
+
readonly challengeNonce32: Uint8Array | string;
|
|
216
|
+
readonly headerMac32: Uint8Array | string;
|
|
217
|
+
readonly plaintext: Uint8Array;
|
|
218
|
+
readonly rng?: RandomBytesFn;
|
|
219
|
+
}): Promise<Uint8Array>;
|
|
220
|
+
declare function openHsmInboundTransportBox(params: {
|
|
221
|
+
readonly hsmTransportSecretKey32: Uint8Array;
|
|
222
|
+
readonly boxBytes: Uint8Array | string;
|
|
223
|
+
readonly vaultId: string;
|
|
224
|
+
readonly slotId: string;
|
|
225
|
+
readonly challengeNonce32: Uint8Array | string;
|
|
226
|
+
readonly headerMac32: Uint8Array | string;
|
|
227
|
+
}): Promise<Uint8Array>;
|
|
228
|
+
type PersonalActorSignature = {
|
|
229
|
+
readonly mode: 'raw-p256';
|
|
230
|
+
readonly signatureBytes: Uint8Array | string;
|
|
231
|
+
} | {
|
|
232
|
+
readonly mode: 'webauthn-p256';
|
|
233
|
+
readonly authenticatorData: Uint8Array | string;
|
|
234
|
+
readonly clientDataJSON: string | Uint8Array;
|
|
235
|
+
readonly signatureBytes: Uint8Array | string;
|
|
236
|
+
} | {
|
|
237
|
+
readonly mode: 'ed25519';
|
|
238
|
+
readonly signatureBytes: Uint8Array | string;
|
|
239
|
+
};
|
|
240
|
+
declare function signPersonalActorChallenge(params: {
|
|
241
|
+
readonly mode: 'raw-p256' | 'ed25519';
|
|
242
|
+
readonly actorSecretKey32: Uint8Array;
|
|
243
|
+
readonly challengeDigest32: Uint8Array | string;
|
|
244
|
+
readonly p256Format?: 'compact' | 'der';
|
|
245
|
+
}): PersonalActorSignature;
|
|
246
|
+
interface WebAuthnVerifyExpectedPolicy {
|
|
247
|
+
readonly expectedRpId: string;
|
|
248
|
+
readonly expectedOrigin: string | ReadonlyArray<string>;
|
|
249
|
+
}
|
|
250
|
+
declare function verifyPersonalActorSignature(params: {
|
|
251
|
+
readonly actorKindAndAlg: ActorKindAndAlg;
|
|
252
|
+
readonly actorPublicKey: Uint8Array | string;
|
|
253
|
+
readonly challengeDigest32: Uint8Array | string;
|
|
254
|
+
readonly signature: PersonalActorSignature;
|
|
255
|
+
readonly webauthnPolicy?: WebAuthnVerifyExpectedPolicy;
|
|
256
|
+
}): void;
|
|
257
|
+
type PersonalActorChallengeAction = {
|
|
258
|
+
readonly action: 'seal-enroll';
|
|
259
|
+
readonly vaultId: string;
|
|
260
|
+
readonly slotId: string;
|
|
261
|
+
readonly challengeNonce32: Uint8Array | string;
|
|
262
|
+
readonly header319: Uint8Array;
|
|
263
|
+
} | {
|
|
264
|
+
readonly action: 'presign-init';
|
|
265
|
+
readonly vaultId: string;
|
|
266
|
+
readonly slotId: string;
|
|
267
|
+
readonly challengeNonce32: Uint8Array | string;
|
|
268
|
+
readonly headerMac32: Uint8Array | string;
|
|
269
|
+
readonly sessionNonce32: Uint8Array | string;
|
|
270
|
+
} | {
|
|
271
|
+
readonly action: 'sign';
|
|
272
|
+
readonly vaultId: string;
|
|
273
|
+
readonly slotId: string;
|
|
274
|
+
readonly challengeNonce32: Uint8Array | string;
|
|
275
|
+
readonly headerMac32: Uint8Array | string;
|
|
276
|
+
readonly presigId32: Uint8Array | string;
|
|
277
|
+
readonly clearSigningPreviewHash32: Uint8Array | string;
|
|
278
|
+
readonly signingDigest32: Uint8Array | string;
|
|
279
|
+
} | {
|
|
280
|
+
readonly action: 'pair-resplit';
|
|
281
|
+
readonly vaultId: string;
|
|
282
|
+
readonly sourceSlotId: string;
|
|
283
|
+
readonly challengeNonce32: Uint8Array | string;
|
|
284
|
+
readonly sourceHeaderMac32: Uint8Array | string;
|
|
285
|
+
readonly targetSlotId: string;
|
|
286
|
+
readonly targetActorKindAndAlg: ActorKindAndAlg;
|
|
287
|
+
readonly targetActorPubKeyPadded65: Uint8Array;
|
|
288
|
+
readonly xActor2Comp33: Uint8Array | string;
|
|
289
|
+
readonly targetSlotExpiresAtSec: bigint;
|
|
290
|
+
readonly targetPairNonce32: Uint8Array | string;
|
|
291
|
+
} | {
|
|
292
|
+
readonly action: 'announce';
|
|
293
|
+
readonly vaultId: string;
|
|
294
|
+
readonly slotId: string;
|
|
295
|
+
readonly challengeNonce32: Uint8Array | string;
|
|
296
|
+
readonly headerMac32: Uint8Array | string;
|
|
297
|
+
readonly clearSigningPreviewHash32: Uint8Array | string;
|
|
298
|
+
readonly signingDigest32: Uint8Array | string;
|
|
299
|
+
} | {
|
|
300
|
+
readonly action: 'veto';
|
|
301
|
+
readonly vaultId: string;
|
|
302
|
+
readonly slotId: string;
|
|
303
|
+
readonly challengeNonce32: Uint8Array | string;
|
|
304
|
+
readonly headerMac32: Uint8Array | string;
|
|
305
|
+
readonly reason: string;
|
|
306
|
+
} | {
|
|
307
|
+
readonly action: 'revoke-slot';
|
|
308
|
+
readonly vaultId: string;
|
|
309
|
+
readonly slotId: string;
|
|
310
|
+
readonly challengeNonce32: Uint8Array | string;
|
|
311
|
+
readonly headerMac32: Uint8Array | string;
|
|
312
|
+
readonly targetSlotId: string;
|
|
313
|
+
} | {
|
|
314
|
+
readonly action: 'session-open';
|
|
315
|
+
readonly vaultId: string;
|
|
316
|
+
readonly slotId: string;
|
|
317
|
+
readonly challengeNonce32: Uint8Array | string;
|
|
318
|
+
readonly headerMac32: Uint8Array | string;
|
|
319
|
+
readonly ttlSeconds: number;
|
|
320
|
+
} | {
|
|
321
|
+
readonly action: 'session-lock';
|
|
322
|
+
readonly vaultId: string;
|
|
323
|
+
readonly slotId: string;
|
|
324
|
+
readonly challengeNonce32: Uint8Array | string;
|
|
325
|
+
readonly headerMac32: Uint8Array | string;
|
|
326
|
+
readonly sessionLeaseId: string;
|
|
327
|
+
} | {
|
|
328
|
+
readonly action: 'reseal-kid';
|
|
329
|
+
readonly vaultId: string;
|
|
330
|
+
readonly slotId: string;
|
|
331
|
+
readonly challengeNonce32: Uint8Array | string;
|
|
332
|
+
readonly oldHeaderMac32: Uint8Array | string;
|
|
333
|
+
readonly targetKid: string;
|
|
334
|
+
} | {
|
|
335
|
+
readonly action: 'entitlement-apply';
|
|
336
|
+
readonly vaultId: string;
|
|
337
|
+
readonly slotId: string;
|
|
338
|
+
readonly challengeNonce32: Uint8Array | string;
|
|
339
|
+
readonly headerMac32: Uint8Array | string;
|
|
340
|
+
readonly entitlementTicketHash32: Uint8Array | string;
|
|
341
|
+
};
|
|
342
|
+
interface PersonalSealEnrollActorPok {
|
|
343
|
+
readonly noncePointComp33: Uint8Array | string;
|
|
344
|
+
readonly responseBytes32: Uint8Array | string;
|
|
345
|
+
}
|
|
346
|
+
/**
|
|
347
|
+
* Generates a Schnorr Proof of Knowledge of `s_actor` for `X_actor = s_actor * G` bound to
|
|
348
|
+
* `(vaultId, slotId, challengeNonce32)` (`LOW-2` rogue-key defense on `seal-enroll`).
|
|
349
|
+
*/
|
|
350
|
+
declare function createPersonalSealEnrollActorPok(params: {
|
|
351
|
+
readonly vaultId: string;
|
|
352
|
+
readonly slotId: string;
|
|
353
|
+
readonly challengeNonce32: Uint8Array | string;
|
|
354
|
+
readonly sActorBytes32: Uint8Array;
|
|
355
|
+
readonly xActorComp33?: Uint8Array | string;
|
|
356
|
+
readonly rng?: RandomBytesFn;
|
|
357
|
+
}): SchnorrPokProof;
|
|
358
|
+
declare function verifyPersonalSealEnrollActorPok(params: {
|
|
359
|
+
readonly vaultId: string;
|
|
360
|
+
readonly slotId: string;
|
|
361
|
+
readonly challengeNonce32: Uint8Array | string;
|
|
362
|
+
readonly xActorComp33: Uint8Array | string;
|
|
363
|
+
readonly actorSharePok: PersonalSealEnrollActorPok;
|
|
364
|
+
}): void;
|
|
365
|
+
declare function buildPersonalSealEnrollChallengeDigest32(params: Omit<Extract<PersonalActorChallengeAction, {
|
|
366
|
+
action: 'seal-enroll';
|
|
367
|
+
}>, 'action'>): Uint8Array;
|
|
368
|
+
declare function buildPersonalPresignInitChallengeDigest32(params: Omit<Extract<PersonalActorChallengeAction, {
|
|
369
|
+
action: 'presign-init';
|
|
370
|
+
}>, 'action'>): Uint8Array;
|
|
371
|
+
declare function buildPersonalSignChallengeDigest32(params: Omit<Extract<PersonalActorChallengeAction, {
|
|
372
|
+
action: 'sign';
|
|
373
|
+
}>, 'action'>): Uint8Array;
|
|
374
|
+
declare function buildPersonalPairResplitChallengeDigest32(params: Omit<Extract<PersonalActorChallengeAction, {
|
|
375
|
+
action: 'pair-resplit';
|
|
376
|
+
}>, 'action'>): Uint8Array;
|
|
377
|
+
declare function buildPersonalAnnounceChallengeDigest32(params: Omit<Extract<PersonalActorChallengeAction, {
|
|
378
|
+
action: 'announce';
|
|
379
|
+
}>, 'action'>): Uint8Array;
|
|
380
|
+
declare function buildPersonalVetoChallengeDigest32(params: Omit<Extract<PersonalActorChallengeAction, {
|
|
381
|
+
action: 'veto';
|
|
382
|
+
}>, 'action'>): Uint8Array;
|
|
383
|
+
declare function buildPersonalRevokeSlotChallengeDigest32(params: Omit<Extract<PersonalActorChallengeAction, {
|
|
384
|
+
action: 'revoke-slot';
|
|
385
|
+
}>, 'action'>): Uint8Array;
|
|
386
|
+
declare function buildPersonalSessionOpenChallengeDigest32(params: Omit<Extract<PersonalActorChallengeAction, {
|
|
387
|
+
action: 'session-open';
|
|
388
|
+
}>, 'action'>): Uint8Array;
|
|
389
|
+
declare function buildPersonalSessionLockChallengeDigest32(params: Omit<Extract<PersonalActorChallengeAction, {
|
|
390
|
+
action: 'session-lock';
|
|
391
|
+
}>, 'action'>): Uint8Array;
|
|
392
|
+
declare function buildPersonalResealKidChallengeDigest32(params: Omit<Extract<PersonalActorChallengeAction, {
|
|
393
|
+
action: 'reseal-kid';
|
|
394
|
+
}>, 'action'>): Uint8Array;
|
|
395
|
+
declare function buildPersonalEntitlementApplyChallengeDigest32(params: Omit<Extract<PersonalActorChallengeAction, {
|
|
396
|
+
action: 'entitlement-apply';
|
|
397
|
+
}>, 'action'>): Uint8Array;
|
|
398
|
+
declare function computePersonalActorChallengeDigest32(payload: PersonalActorChallengeAction): Uint8Array;
|
|
399
|
+
declare const ERC20_APPROVE_SELECTOR_HEX: "095ea7b3";
|
|
400
|
+
declare const HARD_BANNED_PERSONAL_EVM_SELECTORS: ReadonlySet<string>;
|
|
401
|
+
declare function encodeErc20ApproveCalldata(spenderAddress: string, allowanceAmount: bigint): Uint8Array;
|
|
402
|
+
declare function decodeErc20ApproveCalldata(calldata: Uint8Array | string): {
|
|
403
|
+
readonly spenderChecksumAddress: string;
|
|
404
|
+
readonly allowanceAmount: bigint;
|
|
405
|
+
readonly isUnlimitedApprove: boolean;
|
|
406
|
+
};
|
|
407
|
+
/**
|
|
408
|
+
* Hard-bans `0x04` EIP-7702 `SetCode` transactions, `0x05` EIP-7702 authorization magic payloads,
|
|
409
|
+
* and raw `32`-byte blind message digests (`design.md` §2 Lens 4).
|
|
410
|
+
*/
|
|
411
|
+
declare function assertNoEip7702Bytes(rawPayload: Uint8Array | string): Uint8Array;
|
|
412
|
+
type PersonalPolicyTier = 'L0' | 'L1' | 'L2' | 'L3';
|
|
413
|
+
type QuorumApproverAlg = 'p256' | 'ed25519' | 'secp256k1';
|
|
414
|
+
interface QuorumApproverMember {
|
|
415
|
+
readonly memberId: string;
|
|
416
|
+
readonly alg: QuorumApproverAlg;
|
|
417
|
+
readonly publicKeyHex: string;
|
|
418
|
+
}
|
|
419
|
+
interface PersonalRoleRoster {
|
|
420
|
+
readonly role: string;
|
|
421
|
+
readonly threshold: number;
|
|
422
|
+
readonly members: ReadonlyArray<QuorumApproverMember>;
|
|
423
|
+
}
|
|
424
|
+
interface PersonalAssetTierLimits {
|
|
425
|
+
readonly chainId: bigint | string | number;
|
|
426
|
+
/** `'native'` or `0x...` ERC-20 token contract address */
|
|
427
|
+
readonly asset: string;
|
|
428
|
+
readonly l0MaxPerTxAmount: bigint | string;
|
|
429
|
+
readonly l0MaxRolling24hAmount: bigint | string;
|
|
430
|
+
readonly l1MaxPerTxAmount?: bigint | string;
|
|
431
|
+
readonly l2MaxPerTxAmount?: bigint | string;
|
|
432
|
+
}
|
|
433
|
+
interface PersonalAllowedContractRule {
|
|
434
|
+
readonly chainId: bigint | string | number;
|
|
435
|
+
readonly address: string;
|
|
436
|
+
readonly selectors: ReadonlyArray<string>;
|
|
437
|
+
readonly maxValueWei?: bigint | string;
|
|
438
|
+
}
|
|
439
|
+
interface PersonalOcapAssetTierLimits {
|
|
440
|
+
readonly chainId: string;
|
|
441
|
+
/** `'native'` or canonical OCAP token DID/address (`z...` or `0x...`) */
|
|
442
|
+
readonly asset: string;
|
|
443
|
+
readonly l0MaxPerTxAmount: bigint | string;
|
|
444
|
+
readonly l0MaxRolling24hAmount: bigint | string;
|
|
445
|
+
readonly l1MaxPerTxAmount?: bigint | string;
|
|
446
|
+
readonly l2MaxPerTxAmount?: bigint | string;
|
|
447
|
+
}
|
|
448
|
+
interface PersonalOcapChainGasConfig {
|
|
449
|
+
/** Base gas price in native/primary token base units (`config.transaction.txGas.price`). Set `0` for gas-free chains. */
|
|
450
|
+
readonly price: bigint | string | number;
|
|
451
|
+
/** Per-byte storage gas multiplier (`config.transaction.txGas.dataStorage`, required >= 1 when `price > 0`). */
|
|
452
|
+
readonly dataStorage?: bigint | string | number;
|
|
453
|
+
/** Per-state-creation gas multiplier (`config.transaction.txGas.createState`, required >= 1 when `price > 0`). */
|
|
454
|
+
readonly createState?: bigint | string | number;
|
|
455
|
+
/** Per-state-update gas multiplier (`config.transaction.txGas.updateState`, required >= 1 when `price > 0`). */
|
|
456
|
+
readonly updateState?: bigint | string | number;
|
|
457
|
+
/** Optional protocol fixed `txFee` in base units keyed by `itxTypeUrl` (`fg:t:transfer_v2`), short `txType`, or `'default'`. */
|
|
458
|
+
readonly txFeeBaseUnitsByType?: Readonly<Record<string, bigint | string>>;
|
|
459
|
+
/** Optional maximum signed CBOR wrapper byte overhead added after signing (default `96` single-sig / `256` multisig). */
|
|
460
|
+
readonly signedEnvelopeOverheadBytes?: number;
|
|
461
|
+
}
|
|
462
|
+
interface CanonicalPersonalOcapChainGasConfig {
|
|
463
|
+
readonly price: string;
|
|
464
|
+
readonly dataStorage: string;
|
|
465
|
+
readonly createState: string;
|
|
466
|
+
readonly updateState: string;
|
|
467
|
+
readonly txFeeBaseUnitsByType?: Readonly<Record<string, string>>;
|
|
468
|
+
readonly signedEnvelopeOverheadBytes?: number;
|
|
469
|
+
}
|
|
470
|
+
interface PersonalVaultPolicy {
|
|
471
|
+
readonly version: 1;
|
|
472
|
+
readonly vaultId: string;
|
|
473
|
+
readonly allowedChainIds: ReadonlyArray<bigint | string | number>;
|
|
474
|
+
readonly allowedOcapChainIds?: ReadonlyArray<string>;
|
|
475
|
+
readonly allowedOcapTxTypes?: ReadonlyArray<string>;
|
|
476
|
+
readonly allowedPayees?: ReadonlyArray<string>;
|
|
477
|
+
readonly allowedOcapPayees?: ReadonlyArray<string>;
|
|
478
|
+
readonly enforcePayeeAllowlistInL0?: boolean;
|
|
479
|
+
readonly allowedContracts?: ReadonlyArray<PersonalAllowedContractRule>;
|
|
480
|
+
readonly assetLimits: ReadonlyArray<PersonalAssetTierLimits>;
|
|
481
|
+
readonly ocapAssetLimits?: ReadonlyArray<PersonalOcapAssetTierLimits>;
|
|
482
|
+
/** Optional map `ocapChainId -> primaryTokenAddress` so primary-token `tokens[]` outflows fold into `'native'`. */
|
|
483
|
+
readonly ocapPrimaryTokenByChainId?: Readonly<Record<string, string>>;
|
|
484
|
+
/** Mandatory per-chain trusted execution-gas & protocol-fee upper-bound parameters for every `allowedOcapChainIds` entry. */
|
|
485
|
+
readonly ocapGasConfigByChainId?: Readonly<Record<string, PersonalOcapChainGasConfig>>;
|
|
486
|
+
readonly timelockDelaySec: number;
|
|
487
|
+
readonly allowUnlimitedApproveByQuorum?: boolean;
|
|
488
|
+
readonly allowArcblockJwt?: boolean;
|
|
489
|
+
readonly allowDelegationTokenByQuorum?: boolean;
|
|
490
|
+
readonly defaultRoleForL2?: string;
|
|
491
|
+
readonly defaultRoleForL3?: string;
|
|
492
|
+
readonly roleRosters?: Readonly<Record<string, PersonalRoleRoster>>;
|
|
493
|
+
readonly guardianRoster?: {
|
|
494
|
+
readonly threshold: number;
|
|
495
|
+
readonly members: ReadonlyArray<QuorumApproverMember>;
|
|
496
|
+
};
|
|
497
|
+
readonly emergencyExitAddress?: string;
|
|
498
|
+
readonly emergencyExitOcapAddress?: string;
|
|
499
|
+
readonly requireEntitlement?: boolean;
|
|
500
|
+
readonly entitlementIssuerPublicKeysHex?: ReadonlyArray<string>;
|
|
501
|
+
readonly requireFirewallAttestation?: boolean;
|
|
502
|
+
readonly firewallVerifierPublicKeysHex?: ReadonlyArray<string>;
|
|
503
|
+
}
|
|
504
|
+
interface CanonicalPersonalVaultPolicy {
|
|
505
|
+
readonly version: 1;
|
|
506
|
+
readonly vaultId: string;
|
|
507
|
+
readonly allowedChainIds: ReadonlyArray<string>;
|
|
508
|
+
readonly allowedOcapChainIds?: ReadonlyArray<string>;
|
|
509
|
+
readonly allowedOcapTxTypes?: ReadonlyArray<string>;
|
|
510
|
+
readonly allowedPayees: ReadonlyArray<string>;
|
|
511
|
+
readonly allowedOcapPayees?: ReadonlyArray<string>;
|
|
512
|
+
readonly enforcePayeeAllowlistInL0: boolean;
|
|
513
|
+
readonly allowedContracts: ReadonlyArray<{
|
|
514
|
+
readonly chainId: string;
|
|
515
|
+
readonly address: string;
|
|
516
|
+
readonly selectors: ReadonlyArray<string>;
|
|
517
|
+
readonly maxValueWei: string;
|
|
518
|
+
}>;
|
|
519
|
+
readonly assetLimits: ReadonlyArray<{
|
|
520
|
+
readonly chainId: string;
|
|
521
|
+
readonly asset: string;
|
|
522
|
+
readonly l0MaxPerTxAmount: string;
|
|
523
|
+
readonly l0MaxRolling24hAmount: string;
|
|
524
|
+
readonly l1MaxPerTxAmount?: string;
|
|
525
|
+
readonly l2MaxPerTxAmount?: string;
|
|
526
|
+
}>;
|
|
527
|
+
readonly ocapAssetLimits?: ReadonlyArray<{
|
|
528
|
+
readonly chainId: string;
|
|
529
|
+
readonly asset: string;
|
|
530
|
+
readonly l0MaxPerTxAmount: string;
|
|
531
|
+
readonly l0MaxRolling24hAmount: string;
|
|
532
|
+
readonly l1MaxPerTxAmount?: string;
|
|
533
|
+
readonly l2MaxPerTxAmount?: string;
|
|
534
|
+
}>;
|
|
535
|
+
readonly ocapPrimaryTokenByChainId?: Readonly<Record<string, string>>;
|
|
536
|
+
readonly ocapGasConfigByChainId?: Readonly<Record<string, CanonicalPersonalOcapChainGasConfig>>;
|
|
537
|
+
readonly timelockDelaySec: number;
|
|
538
|
+
readonly allowUnlimitedApproveByQuorum: boolean;
|
|
539
|
+
readonly allowArcblockJwt?: boolean;
|
|
540
|
+
readonly allowDelegationTokenByQuorum?: boolean;
|
|
541
|
+
readonly defaultRoleForL2?: string;
|
|
542
|
+
readonly defaultRoleForL3?: string;
|
|
543
|
+
readonly roleRosters: Readonly<Record<string, {
|
|
544
|
+
readonly role: string;
|
|
545
|
+
readonly threshold: number;
|
|
546
|
+
readonly members: ReadonlyArray<QuorumApproverMember>;
|
|
547
|
+
}>>;
|
|
548
|
+
readonly guardianRoster?: {
|
|
549
|
+
readonly threshold: number;
|
|
550
|
+
readonly members: ReadonlyArray<QuorumApproverMember>;
|
|
551
|
+
};
|
|
552
|
+
readonly emergencyExitAddress?: string;
|
|
553
|
+
readonly emergencyExitOcapAddress?: string;
|
|
554
|
+
readonly requireEntitlement: boolean;
|
|
555
|
+
readonly entitlementIssuerPublicKeysHex: ReadonlyArray<string>;
|
|
556
|
+
readonly requireFirewallAttestation?: boolean;
|
|
557
|
+
readonly firewallVerifierPublicKeysHex?: ReadonlyArray<string>;
|
|
558
|
+
}
|
|
559
|
+
declare function normalizeOcapAddressOrEth(raw: string, label: string, errorCode?: MpcErrorCode): string;
|
|
560
|
+
declare function normalizeCanonicalOcapTokenKey(raw: string, label: string, errorCode?: MpcErrorCode): string;
|
|
561
|
+
declare function canonicalizePersonalVaultPolicy(policy: PersonalVaultPolicy): {
|
|
562
|
+
readonly canonicalPolicy: CanonicalPersonalVaultPolicy;
|
|
563
|
+
readonly canonicalPolicyJson: string;
|
|
564
|
+
readonly canonicalPolicyUtf8: Uint8Array;
|
|
565
|
+
readonly policyHash32: Uint8Array;
|
|
566
|
+
};
|
|
567
|
+
declare function computePersonalPolicyHash32(policy: PersonalVaultPolicy | string): Uint8Array;
|
|
568
|
+
type PersonalEvmCallKind = 'native-transfer' | 'erc20-transfer' | 'erc20-approve' | 'allowlisted-contract-call';
|
|
569
|
+
interface VerifiedPersonalEip1559Tx {
|
|
570
|
+
readonly txFields: Eip1559UnsignedTxFields;
|
|
571
|
+
readonly unsignedPayloadBytes: Uint8Array;
|
|
572
|
+
readonly signingDigest32: Uint8Array;
|
|
573
|
+
readonly signingDigestHex: string;
|
|
574
|
+
readonly toChecksumAddress: string;
|
|
575
|
+
readonly callKind: PersonalEvmCallKind;
|
|
576
|
+
readonly selector4Lower: string;
|
|
577
|
+
/** `'native'` or lowercase `0x...` token address */
|
|
578
|
+
readonly velocityAssetKey: string;
|
|
579
|
+
readonly velocityAmount: bigint;
|
|
580
|
+
/** Worst-case EIP-1559 gas commitment (`gasLimit * maxFeePerGasWei`) in native wei */
|
|
581
|
+
readonly maxGasFeeWei: bigint;
|
|
582
|
+
readonly payeeOrSpenderChecksumAddress: string;
|
|
583
|
+
readonly isUnlimitedApprove: boolean;
|
|
584
|
+
readonly callDepth: typeof MAX_PERSONAL_CALL_DEPTH;
|
|
585
|
+
}
|
|
586
|
+
declare function decodeAndVerifyPersonalEip1559Tx(params: {
|
|
587
|
+
readonly txOrRawBytes: Eip1559UnsignedTxFields | Uint8Array | string;
|
|
588
|
+
readonly policy?: PersonalVaultPolicy | CanonicalPersonalVaultPolicy;
|
|
589
|
+
readonly hasL2OrL3QuorumProof?: boolean;
|
|
590
|
+
/** Policy-blind Follower Stage 1 simulation mode (never enabled inside HSM `signOnline`). */
|
|
591
|
+
readonly allowPolicyBlindCustomCalldata?: boolean;
|
|
592
|
+
}): VerifiedPersonalEip1559Tx;
|
|
593
|
+
type PersonalPreviewCallKind = PersonalEvmCallKind | 'ocap-tx' | 'arcblock-jwt';
|
|
594
|
+
interface PersonalClearSigningPreview {
|
|
595
|
+
readonly version: 1;
|
|
596
|
+
readonly chainId: string;
|
|
597
|
+
readonly fromAddress: string;
|
|
598
|
+
readonly toAddress: string;
|
|
599
|
+
readonly callKind: PersonalPreviewCallKind;
|
|
600
|
+
readonly selector: string;
|
|
601
|
+
readonly payeeOrSpenderAddress: string;
|
|
602
|
+
readonly assetIdentifier: string;
|
|
603
|
+
readonly outflowAmount: string;
|
|
604
|
+
readonly maxGasFeeWei: string;
|
|
605
|
+
readonly nonce: string;
|
|
606
|
+
readonly signingDigestHex: string;
|
|
607
|
+
readonly summaryText: string;
|
|
608
|
+
readonly itxTypeUrl?: string;
|
|
609
|
+
readonly tokenOutflows?: ReadonlyArray<{
|
|
610
|
+
readonly tokenAddress: string;
|
|
611
|
+
readonly amount: string;
|
|
612
|
+
}>;
|
|
613
|
+
}
|
|
614
|
+
declare function buildPersonalClearSigningPreview(params: {
|
|
615
|
+
readonly fromAddress: string;
|
|
616
|
+
readonly verifiedTx: VerifiedPersonalEip1559Tx;
|
|
617
|
+
}): PersonalClearSigningPreview;
|
|
618
|
+
declare function computePersonalClearSigningPreviewHash32(preview: PersonalClearSigningPreview): Uint8Array;
|
|
619
|
+
interface PersonalPostConditions {
|
|
620
|
+
readonly maxNativeOutflowWei: bigint;
|
|
621
|
+
readonly maxTokenOutflows?: Readonly<Record<string, bigint>>;
|
|
622
|
+
readonly minNativeInflowWei?: bigint;
|
|
623
|
+
readonly minTokenInflows?: Readonly<Record<string, bigint>>;
|
|
624
|
+
readonly allowedOutgoingAssets?: ReadonlyArray<string>;
|
|
625
|
+
readonly mustOwnAssetsAfter?: ReadonlyArray<string>;
|
|
626
|
+
readonly strictZeroUnlistedOutflow: boolean;
|
|
627
|
+
}
|
|
628
|
+
interface SimulatedBalanceDelta {
|
|
629
|
+
readonly simulationReverted?: boolean;
|
|
630
|
+
/** Signed delta on EOA native balance (`< 0n` means net outflow, `> 0n` means net inflow) */
|
|
631
|
+
readonly nativeDeltaWei: bigint;
|
|
632
|
+
/** Map from token address to signed balance delta (`< 0n` outflow, `> 0n` inflow) */
|
|
633
|
+
readonly tokenDeltas?: Readonly<Record<string, bigint>>;
|
|
634
|
+
readonly outgoingAssetIds?: ReadonlyArray<string>;
|
|
635
|
+
readonly ownedAssetIdsAfter?: ReadonlyArray<string>;
|
|
636
|
+
}
|
|
637
|
+
declare function normalizeMaxTokenOutflowsCaps(maxTokenOutflows?: Readonly<Record<string, bigint>>): ReadonlyMap<string, bigint>;
|
|
638
|
+
declare function verifyPersonalSimulationBalanceDelta(params: {
|
|
639
|
+
readonly postConditions: PersonalPostConditions;
|
|
640
|
+
readonly simulatedDelta: SimulatedBalanceDelta;
|
|
641
|
+
}): void;
|
|
642
|
+
declare function resolveRequiredPolicyTier(params: {
|
|
643
|
+
readonly policy: PersonalVaultPolicy | CanonicalPersonalVaultPolicy;
|
|
644
|
+
readonly verifiedTx: VerifiedPersonalEip1559Tx;
|
|
645
|
+
readonly currentRolling24hSpendAmount?: bigint;
|
|
646
|
+
/** Current rolling 24h spend for `'native'` gas when `verifiedTx.velocityAssetKey !== 'native'`. */
|
|
647
|
+
readonly currentNativeRolling24hSpendAmount?: bigint;
|
|
648
|
+
readonly hasL2OrL3QuorumForOverflow?: boolean;
|
|
649
|
+
}): {
|
|
650
|
+
readonly requiredTier: PersonalPolicyTier;
|
|
651
|
+
readonly projectedRolling24hSpendAmount: bigint | null;
|
|
652
|
+
readonly projectedNativeRolling24hSpendAmount: bigint | null;
|
|
653
|
+
};
|
|
654
|
+
interface QuorumMemberSignatureEntry {
|
|
655
|
+
readonly memberId: string;
|
|
656
|
+
readonly alg: QuorumApproverAlg;
|
|
657
|
+
readonly publicKeyHex: string;
|
|
658
|
+
readonly signatureHex: string;
|
|
659
|
+
}
|
|
660
|
+
interface RoleQuorumProof {
|
|
661
|
+
readonly kind: 'role-quorum';
|
|
662
|
+
readonly vaultId: string;
|
|
663
|
+
readonly policyEpoch: string;
|
|
664
|
+
readonly policyHashHex: string;
|
|
665
|
+
readonly role: string;
|
|
666
|
+
readonly clearSigningPreviewHashHex: string;
|
|
667
|
+
readonly signingDigestHex: string;
|
|
668
|
+
readonly expiresAtSec: string;
|
|
669
|
+
readonly approvals: ReadonlyArray<QuorumMemberSignatureEntry>;
|
|
670
|
+
}
|
|
671
|
+
interface GuardianQuorumProof {
|
|
672
|
+
readonly kind: 'guardian-quorum';
|
|
673
|
+
readonly vaultId: string;
|
|
674
|
+
readonly policyEpoch: string;
|
|
675
|
+
readonly policyHashHex: string;
|
|
676
|
+
readonly clearSigningPreviewHashHex: string;
|
|
677
|
+
readonly signingDigestHex: string;
|
|
678
|
+
readonly expiresAtSec: string;
|
|
679
|
+
readonly approvals: ReadonlyArray<QuorumMemberSignatureEntry>;
|
|
680
|
+
}
|
|
681
|
+
interface SignedAnnounceTicket {
|
|
682
|
+
readonly kind: 'announce-ticket';
|
|
683
|
+
readonly vaultId: string;
|
|
684
|
+
readonly policyEpoch: string;
|
|
685
|
+
readonly vetoEpoch: string;
|
|
686
|
+
readonly clearSigningPreviewHashHex: string;
|
|
687
|
+
readonly signingDigestHex: string;
|
|
688
|
+
readonly announcedAtSec: string;
|
|
689
|
+
readonly executableAfterSec: string;
|
|
690
|
+
readonly expiresAtSec: string;
|
|
691
|
+
readonly ticketKid: string;
|
|
692
|
+
readonly macHex: string;
|
|
693
|
+
}
|
|
694
|
+
type PersonalPolicyProofBundle = {
|
|
695
|
+
readonly tier: 'L0';
|
|
696
|
+
} | {
|
|
697
|
+
readonly tier: 'L1';
|
|
698
|
+
readonly announceTicket: SignedAnnounceTicket;
|
|
699
|
+
} | {
|
|
700
|
+
readonly tier: 'L2';
|
|
701
|
+
readonly quorumProof: RoleQuorumProof;
|
|
702
|
+
} | {
|
|
703
|
+
readonly tier: 'L3';
|
|
704
|
+
readonly quorumProof: GuardianQuorumProof | RoleQuorumProof;
|
|
705
|
+
readonly announceTicket: SignedAnnounceTicket;
|
|
706
|
+
};
|
|
707
|
+
declare function signRoleQuorumApproval(params: {
|
|
708
|
+
readonly vaultId: string;
|
|
709
|
+
readonly policyEpoch: bigint;
|
|
710
|
+
readonly policyHash32: Uint8Array | string;
|
|
711
|
+
readonly role: string;
|
|
712
|
+
readonly clearSigningPreviewHash32: Uint8Array | string;
|
|
713
|
+
readonly signingDigest32: Uint8Array | string;
|
|
714
|
+
readonly expiresAtSec: bigint;
|
|
715
|
+
readonly memberId: string;
|
|
716
|
+
readonly alg: QuorumApproverAlg;
|
|
717
|
+
readonly secretKey32: Uint8Array;
|
|
718
|
+
}): QuorumMemberSignatureEntry;
|
|
719
|
+
declare function verifyRoleQuorumProof(params: {
|
|
720
|
+
readonly proof: RoleQuorumProof;
|
|
721
|
+
readonly policy: PersonalVaultPolicy | CanonicalPersonalVaultPolicy;
|
|
722
|
+
readonly vaultId: string;
|
|
723
|
+
readonly policyEpoch: bigint;
|
|
724
|
+
readonly policyHash32: Uint8Array | string;
|
|
725
|
+
readonly clearSigningPreviewHash32: Uint8Array | string;
|
|
726
|
+
readonly signingDigest32: Uint8Array | string;
|
|
727
|
+
readonly nowSec: bigint;
|
|
728
|
+
}): void;
|
|
729
|
+
declare function signGuardianQuorumApproval(params: {
|
|
730
|
+
readonly vaultId: string;
|
|
731
|
+
readonly policyEpoch: bigint;
|
|
732
|
+
readonly policyHash32: Uint8Array | string;
|
|
733
|
+
readonly clearSigningPreviewHash32: Uint8Array | string;
|
|
734
|
+
readonly signingDigest32: Uint8Array | string;
|
|
735
|
+
readonly expiresAtSec: bigint;
|
|
736
|
+
readonly memberId: string;
|
|
737
|
+
readonly alg: QuorumApproverAlg;
|
|
738
|
+
readonly secretKey32: Uint8Array;
|
|
739
|
+
}): QuorumMemberSignatureEntry;
|
|
740
|
+
declare function verifyGuardianQuorumProof(params: {
|
|
741
|
+
readonly proof: GuardianQuorumProof;
|
|
742
|
+
readonly policy: PersonalVaultPolicy | CanonicalPersonalVaultPolicy;
|
|
743
|
+
readonly vaultId: string;
|
|
744
|
+
readonly policyEpoch: bigint;
|
|
745
|
+
readonly policyHash32: Uint8Array | string;
|
|
746
|
+
readonly clearSigningPreviewHash32: Uint8Array | string;
|
|
747
|
+
readonly signingDigest32: Uint8Array | string;
|
|
748
|
+
readonly nowSec: bigint;
|
|
749
|
+
}): void;
|
|
750
|
+
declare const MIN_ANNOUNCE_VALIDITY_WINDOW_SEC: 60;
|
|
751
|
+
declare const MAX_ANNOUNCE_VALIDITY_WINDOW_SEC: 604800;
|
|
752
|
+
declare function signAnnounceTicket(params: {
|
|
753
|
+
readonly ticketMacKey32: Uint8Array;
|
|
754
|
+
readonly ticketKid: string;
|
|
755
|
+
readonly vaultId: string;
|
|
756
|
+
readonly policyEpoch: bigint;
|
|
757
|
+
readonly vetoEpoch: bigint;
|
|
758
|
+
readonly clearSigningPreviewHash32: Uint8Array | string;
|
|
759
|
+
readonly signingDigest32: Uint8Array | string;
|
|
760
|
+
readonly announcedAtSec: bigint;
|
|
761
|
+
readonly timelockDelaySec: number;
|
|
762
|
+
readonly validityWindowSec?: number;
|
|
763
|
+
}): SignedAnnounceTicket;
|
|
764
|
+
declare function verifySignedAnnounceTicket(params: {
|
|
765
|
+
readonly ticket: SignedAnnounceTicket;
|
|
766
|
+
readonly ticketMacKey32: Uint8Array;
|
|
767
|
+
readonly vaultId: string;
|
|
768
|
+
readonly policyEpoch: bigint;
|
|
769
|
+
readonly currentVetoEpoch: bigint;
|
|
770
|
+
readonly minTimelockDelaySec: number;
|
|
771
|
+
readonly clearSigningPreviewHash32: Uint8Array | string;
|
|
772
|
+
readonly signingDigest32: Uint8Array | string;
|
|
773
|
+
readonly nowSec: bigint;
|
|
774
|
+
}): void;
|
|
775
|
+
declare function verifyPersonalPolicyProofBundle(params: {
|
|
776
|
+
readonly requiredTier: PersonalPolicyTier;
|
|
777
|
+
readonly proofBundle: PersonalPolicyProofBundle;
|
|
778
|
+
readonly policy: PersonalVaultPolicy | CanonicalPersonalVaultPolicy;
|
|
779
|
+
readonly vaultId: string;
|
|
780
|
+
readonly policyEpoch: bigint;
|
|
781
|
+
readonly policyHash32: Uint8Array | string;
|
|
782
|
+
readonly currentVetoEpoch: bigint;
|
|
783
|
+
readonly ticketMacKey32?: Uint8Array;
|
|
784
|
+
readonly clearSigningPreviewHash32: Uint8Array | string;
|
|
785
|
+
readonly signingDigest32: Uint8Array | string;
|
|
786
|
+
readonly nowSec: bigint;
|
|
787
|
+
readonly allowedL2Roles?: ReadonlyArray<string>;
|
|
788
|
+
}): void;
|
|
789
|
+
type VaultEntitlementTier = 'free-trial' | 'staked-quota' | 'metered-credits' | 'enterprise-sponsored';
|
|
790
|
+
declare const ENTITLEMENT_TIER_CODE: Readonly<Record<VaultEntitlementTier, number>>;
|
|
791
|
+
interface VaultEntitlementTicket {
|
|
792
|
+
readonly version: 1;
|
|
793
|
+
readonly blindVaultTagHex: string;
|
|
794
|
+
readonly entitlementTier: VaultEntitlementTier;
|
|
795
|
+
readonly entitlementEpoch: string;
|
|
796
|
+
readonly validUntilSec: string;
|
|
797
|
+
readonly grantedCredits: number;
|
|
798
|
+
readonly maxActorSlots: number;
|
|
799
|
+
readonly stakeRefHashHex?: string;
|
|
800
|
+
readonly issuerPublicKeyHex: string;
|
|
801
|
+
readonly signatureHex: string;
|
|
802
|
+
}
|
|
803
|
+
declare function computeVaultEntitlementTicketDigest32(ticket: Omit<VaultEntitlementTicket, 'signatureHex'>): Uint8Array;
|
|
804
|
+
declare function signVaultEntitlementTicket(params: {
|
|
805
|
+
readonly blindVaultTag32: Uint8Array | string;
|
|
806
|
+
readonly entitlementTier: VaultEntitlementTier;
|
|
807
|
+
readonly entitlementEpoch: bigint;
|
|
808
|
+
readonly validUntilSec: bigint;
|
|
809
|
+
readonly grantedCredits: number;
|
|
810
|
+
readonly maxActorSlots: number;
|
|
811
|
+
readonly stakeRefHash32?: Uint8Array | string;
|
|
812
|
+
readonly issuerEd25519SecretKey32: Uint8Array;
|
|
813
|
+
}): VaultEntitlementTicket;
|
|
814
|
+
declare function verifyVaultEntitlementTicket(params: {
|
|
815
|
+
readonly ticket: VaultEntitlementTicket;
|
|
816
|
+
readonly expectedBlindVaultTag32: Uint8Array | string;
|
|
817
|
+
readonly trustedIssuerPublicKeys: ReadonlyArray<Uint8Array | string>;
|
|
818
|
+
readonly nowSec: bigint;
|
|
819
|
+
readonly minEntitlementEpochExclusive?: bigint;
|
|
820
|
+
}): {
|
|
821
|
+
readonly entitlementTier: VaultEntitlementTier;
|
|
822
|
+
readonly entitlementEpoch: bigint;
|
|
823
|
+
readonly validUntilSec: bigint;
|
|
824
|
+
readonly grantedCredits: number;
|
|
825
|
+
readonly maxActorSlots: number;
|
|
826
|
+
readonly ticketHash32: Uint8Array;
|
|
827
|
+
};
|
|
828
|
+
interface ActorSlotPairingBootstrapPackage {
|
|
829
|
+
readonly version: 1;
|
|
830
|
+
readonly vaultId: string;
|
|
831
|
+
readonly targetSlotId: string;
|
|
832
|
+
readonly actorKindAndAlg: ActorKindAndAlg;
|
|
833
|
+
readonly actorPubKeyPadded65Hex: string;
|
|
834
|
+
readonly slotExpiresAtSec: string;
|
|
835
|
+
readonly ephemeralX25519PublicKeyHex: string;
|
|
836
|
+
readonly pairNonceHex: string;
|
|
837
|
+
readonly popSignature: PersonalActorSignature;
|
|
838
|
+
}
|
|
839
|
+
declare function createActorSlotPairingBootstrap(params: {
|
|
840
|
+
readonly vaultId: string;
|
|
841
|
+
readonly targetSlotId: string;
|
|
842
|
+
readonly actorKindAndAlg: ActorKindAndAlg;
|
|
843
|
+
readonly actorPublicKey: Uint8Array | string;
|
|
844
|
+
readonly slotExpiresAtSec?: bigint;
|
|
845
|
+
readonly actorSecretKey32?: Uint8Array;
|
|
846
|
+
readonly signPopDigest?: (popDigest32: Uint8Array) => Promise<PersonalActorSignature> | PersonalActorSignature;
|
|
847
|
+
readonly rng?: RandomBytesFn;
|
|
848
|
+
}): Promise<{
|
|
849
|
+
readonly bootstrapPackage: ActorSlotPairingBootstrapPackage;
|
|
850
|
+
readonly ephemeralX25519SecretKey32: Uint8Array;
|
|
851
|
+
}>;
|
|
852
|
+
declare function verifyActorSlotPairingBootstrap(bootstrap: ActorSlotPairingBootstrapPackage, webauthnPolicy?: WebAuthnVerifyExpectedPolicy): {
|
|
853
|
+
readonly actorPubKeyPadded65: Uint8Array;
|
|
854
|
+
readonly ephemeralX25519PublicKey32: Uint8Array;
|
|
855
|
+
readonly pairNonce32: Uint8Array;
|
|
856
|
+
readonly slotExpiresAtSec: bigint;
|
|
857
|
+
};
|
|
858
|
+
/**
|
|
859
|
+
* Validates and computes `s_actor_2 = (s_actor_1 - delta) mod n`, rejecting ALL degenerate cases:
|
|
860
|
+
* `delta == 0`, `delta >= n`, `s_actor_2 == 0`, `X_actor_2 == O`, `X_actor_2 == P_root` (`s_hsm_2 == 0`),
|
|
861
|
+
* and `X_actor_2 == X_actor_1`.
|
|
862
|
+
*/
|
|
863
|
+
declare function computeNonDegenerateActorResplitShare(params: {
|
|
864
|
+
readonly sActor1Bytes32: Uint8Array;
|
|
865
|
+
readonly deltaBytes32: Uint8Array;
|
|
866
|
+
readonly rootPublicKeyComp33: Uint8Array | string;
|
|
867
|
+
}): {
|
|
868
|
+
readonly sActor2Bytes32: Uint8Array;
|
|
869
|
+
readonly xActor1Comp33: Uint8Array;
|
|
870
|
+
readonly xActor2Comp33: Uint8Array;
|
|
871
|
+
};
|
|
872
|
+
/**
|
|
873
|
+
* HSM-side zero-reconstruction re-split helper (`s_hsm_2 = (s_hsm_1 + delta) mod n`, `design.md` §4.2(2)).
|
|
874
|
+
* Shared with Phase 2's `StatelessSealedHsmService.pairActorSlot`.
|
|
875
|
+
*/
|
|
876
|
+
declare function applyHsmSlotResplitDelta(params: {
|
|
877
|
+
readonly sHsm1Bytes32: Uint8Array;
|
|
878
|
+
readonly deltaBytes32: Uint8Array;
|
|
879
|
+
readonly xActor1Comp33: Uint8Array | string;
|
|
880
|
+
readonly xActor2Comp33: Uint8Array | string;
|
|
881
|
+
readonly rootPublicKeyComp33: Uint8Array | string;
|
|
882
|
+
}): Uint8Array;
|
|
883
|
+
interface EncryptedTargetActorShareBox {
|
|
884
|
+
readonly epkX25519Hex: string;
|
|
885
|
+
readonly ivHex: string;
|
|
886
|
+
readonly tagHex: string;
|
|
887
|
+
readonly ciphertextHex: string;
|
|
888
|
+
readonly xActor2PublicKeyHex: string;
|
|
889
|
+
}
|
|
890
|
+
declare function initiateActorSlotResplit(params: {
|
|
891
|
+
readonly vaultId: string;
|
|
892
|
+
readonly sourceSlotId: string;
|
|
893
|
+
readonly sourceHeaderMac32: Uint8Array | string;
|
|
894
|
+
readonly rootPublicKeyComp33: Uint8Array | string;
|
|
895
|
+
readonly sActor1Bytes32: Uint8Array;
|
|
896
|
+
readonly policyEpoch: bigint;
|
|
897
|
+
readonly policy: PersonalVaultPolicy;
|
|
898
|
+
readonly targetBootstrap: ActorSlotPairingBootstrapPackage;
|
|
899
|
+
readonly kUnsealSecret1_32: Uint8Array;
|
|
900
|
+
readonly kUnsealSecret2_32: Uint8Array;
|
|
901
|
+
readonly hsmTransportPub32: Uint8Array | string;
|
|
902
|
+
readonly challengeNonce32: Uint8Array | string;
|
|
903
|
+
readonly webauthnPolicy?: WebAuthnVerifyExpectedPolicy;
|
|
904
|
+
readonly rng?: RandomBytesFn;
|
|
905
|
+
}): Promise<{
|
|
906
|
+
readonly xActor2Comp33: Uint8Array;
|
|
907
|
+
readonly encryptedTargetShareBox: EncryptedTargetActorShareBox;
|
|
908
|
+
readonly hsmInboundTransportBox: Uint8Array;
|
|
909
|
+
readonly pairResplitChallengeDigest32: Uint8Array;
|
|
910
|
+
}>;
|
|
911
|
+
declare function completeActorSlotPairingOnTarget(params: {
|
|
912
|
+
readonly vaultId: string;
|
|
913
|
+
readonly sourceSlotId: string;
|
|
914
|
+
readonly targetBootstrap: ActorSlotPairingBootstrapPackage;
|
|
915
|
+
readonly ephemeralX25519SecretKey32: Uint8Array;
|
|
916
|
+
readonly encryptedTargetShareBox: EncryptedTargetActorShareBox;
|
|
917
|
+
readonly hsmSealedBlob2: Uint8Array;
|
|
918
|
+
readonly kHw32: Uint8Array;
|
|
919
|
+
readonly kPwdClient32: Uint8Array;
|
|
920
|
+
readonly rng?: RandomBytesFn;
|
|
921
|
+
}): Promise<{
|
|
922
|
+
readonly deviceEnvelope: DeviceShareEnvelope;
|
|
923
|
+
readonly rootPublicKeyComp33: Uint8Array;
|
|
924
|
+
readonly xActor2Comp33: Uint8Array;
|
|
925
|
+
readonly policyEpoch: bigint;
|
|
926
|
+
readonly policy: CanonicalPersonalVaultPolicy;
|
|
927
|
+
}>;
|
|
928
|
+
interface PersonalColdRecoveryPlatePublicInfo {
|
|
929
|
+
readonly guardianIndex: number;
|
|
930
|
+
readonly plateLabel: string;
|
|
931
|
+
readonly coldPublicShareHex: string;
|
|
932
|
+
readonly decoyEthAddress: string;
|
|
933
|
+
}
|
|
934
|
+
interface PersonalColdRecoveryKitManifest {
|
|
935
|
+
readonly version: 1;
|
|
936
|
+
readonly vaultId: string;
|
|
937
|
+
readonly rootPublicKeyHex: string;
|
|
938
|
+
readonly rootEthAddress: string;
|
|
939
|
+
readonly tCold: 2;
|
|
940
|
+
readonly nCold: 2 | 3;
|
|
941
|
+
readonly coldFeldmanCommitmentsHex: ReadonlyArray<string>;
|
|
942
|
+
readonly plates: ReadonlyArray<PersonalColdRecoveryPlatePublicInfo>;
|
|
943
|
+
readonly manifestHashHex: string;
|
|
944
|
+
}
|
|
945
|
+
declare function verifyPersonalColdRecoveryKitManifest(manifest: PersonalColdRecoveryKitManifest): {
|
|
946
|
+
readonly rootPublicKeyComp33: Uint8Array;
|
|
947
|
+
readonly rootEthAddress: string;
|
|
948
|
+
};
|
|
949
|
+
declare function bootstrapPersonalVaultClient(params: {
|
|
950
|
+
readonly vaultId: string;
|
|
951
|
+
readonly initialSlotId: string;
|
|
952
|
+
readonly kid: string;
|
|
953
|
+
readonly actorKindAndAlg: ActorKindAndAlg;
|
|
954
|
+
readonly actorPublicKey: Uint8Array | string;
|
|
955
|
+
readonly slotExpiresAtSec?: bigint;
|
|
956
|
+
readonly policy: PersonalVaultPolicy;
|
|
957
|
+
readonly policyEpoch?: bigint;
|
|
958
|
+
readonly wakePassword: string;
|
|
959
|
+
readonly kHw32: Uint8Array;
|
|
960
|
+
readonly tCold?: 2;
|
|
961
|
+
readonly nCold?: 2 | 3;
|
|
962
|
+
readonly rng?: RandomBytesFn;
|
|
963
|
+
} & PersonalWakePasswordKdfOptions): Promise<{
|
|
964
|
+
readonly vaultId: string;
|
|
965
|
+
readonly initialSlotId: string;
|
|
966
|
+
readonly rootPublicKeyComp33: Uint8Array;
|
|
967
|
+
readonly rootEthAddress: string;
|
|
968
|
+
readonly xActor1Comp33: Uint8Array;
|
|
969
|
+
readonly header319: Uint8Array;
|
|
970
|
+
/** Caller seals `(sHsm1Bytes32, kPwdHsm32)` into `HsmInboundTransportBox` for `/seal-enroll` and wipes both! */
|
|
971
|
+
readonly sHsm1Bytes32: Uint8Array;
|
|
972
|
+
readonly kPwdHsm32: Uint8Array;
|
|
973
|
+
readonly vaultSalt32: Uint8Array;
|
|
974
|
+
readonly deviceEnvelope: DeviceShareEnvelope;
|
|
975
|
+
readonly policyEpoch: bigint;
|
|
976
|
+
readonly canonicalPolicyJson: string;
|
|
977
|
+
readonly policyHash32: Uint8Array;
|
|
978
|
+
readonly coldRecoveryKit: {
|
|
979
|
+
readonly manifest: PersonalColdRecoveryKitManifest;
|
|
980
|
+
readonly platesWords24: ReadonlyArray<{
|
|
981
|
+
readonly guardianIndex: number;
|
|
982
|
+
readonly plateLabel: string;
|
|
983
|
+
readonly words24: ReadonlyArray<string>;
|
|
984
|
+
}>;
|
|
985
|
+
};
|
|
986
|
+
}>;
|
|
987
|
+
declare function recoverPersonalVaultRootOffline(params: {
|
|
988
|
+
readonly manifest: PersonalColdRecoveryKitManifest;
|
|
989
|
+
readonly platesWords24: ReadonlyArray<ReadonlyArray<string> | string>;
|
|
990
|
+
}): {
|
|
991
|
+
readonly rootScalarBytes32: Uint8Array;
|
|
992
|
+
readonly rootPublicKeyComp33: Uint8Array;
|
|
993
|
+
readonly rootEthAddress: string;
|
|
994
|
+
readonly usedGuardianIndices: ReadonlyArray<number>;
|
|
995
|
+
};
|
|
996
|
+
type PersonalChildDerivationInput = {
|
|
997
|
+
readonly tweakMode: 'untweaked';
|
|
998
|
+
} | {
|
|
999
|
+
readonly tweakMode: 'role-bound';
|
|
1000
|
+
readonly role: string;
|
|
1001
|
+
readonly ethChainId: bigint;
|
|
1002
|
+
readonly tweakLabel: string;
|
|
1003
|
+
} | {
|
|
1004
|
+
readonly tweakMode: 'rule-bound';
|
|
1005
|
+
readonly controllerDid: string;
|
|
1006
|
+
readonly ethChainId: bigint;
|
|
1007
|
+
readonly ruleHash: Uint8Array | string;
|
|
1008
|
+
};
|
|
1009
|
+
declare function derivePersonalVaultChildKey(params: {
|
|
1010
|
+
readonly vaultId: string;
|
|
1011
|
+
readonly rootPublicKeyComp33: Uint8Array | string;
|
|
1012
|
+
readonly derivation?: PersonalChildDerivationInput;
|
|
1013
|
+
}): DerivedChildKey;
|
|
1014
|
+
interface OfflineSweepItemSpec {
|
|
1015
|
+
readonly derivation?: PersonalChildDerivationInput;
|
|
1016
|
+
readonly chainId: bigint;
|
|
1017
|
+
readonly nonce: bigint;
|
|
1018
|
+
readonly maxPriorityFeePerGasWei: bigint;
|
|
1019
|
+
readonly maxFeePerGasWei: bigint;
|
|
1020
|
+
readonly gasLimit?: bigint;
|
|
1021
|
+
readonly asset: {
|
|
1022
|
+
readonly kind: 'native-eth';
|
|
1023
|
+
readonly valueWei: bigint;
|
|
1024
|
+
} | {
|
|
1025
|
+
readonly kind: 'erc20';
|
|
1026
|
+
readonly tokenContract: string;
|
|
1027
|
+
readonly tokenAmount: bigint;
|
|
1028
|
+
};
|
|
1029
|
+
readonly accessList?: ReadonlyArray<Eip1559AccessListItem>;
|
|
1030
|
+
}
|
|
1031
|
+
interface SignedOfflineSweepTx {
|
|
1032
|
+
readonly senderAddress: string;
|
|
1033
|
+
readonly destinationAddress: string;
|
|
1034
|
+
readonly rawSignedTxBytes: Uint8Array;
|
|
1035
|
+
readonly rawSignedTxHex: string;
|
|
1036
|
+
readonly txHashHex: string;
|
|
1037
|
+
}
|
|
1038
|
+
declare function signPersonalVaultRecoverySweepOffline(params: {
|
|
1039
|
+
readonly manifest: PersonalColdRecoveryKitManifest;
|
|
1040
|
+
readonly platesWords24: ReadonlyArray<ReadonlyArray<string> | string>;
|
|
1041
|
+
readonly destinationAddress: string;
|
|
1042
|
+
readonly sweeps: ReadonlyArray<OfflineSweepItemSpec>;
|
|
1043
|
+
}): ReadonlyArray<SignedOfflineSweepTx>;
|
|
1044
|
+
interface PersonalPresignInitRequest {
|
|
1045
|
+
readonly sessionNonce32: Uint8Array;
|
|
1046
|
+
readonly baseOtB1A2Step1: BaseOtStep1Message;
|
|
1047
|
+
}
|
|
1048
|
+
interface PersonalPresignInitResponse {
|
|
1049
|
+
readonly presignSessionId: string;
|
|
1050
|
+
readonly baseOtB1A2Step2: BaseOtStep2Message;
|
|
1051
|
+
readonly baseOtB2A1Step1: BaseOtStep1Message;
|
|
1052
|
+
}
|
|
1053
|
+
type PersonalPresignStepRequest = {
|
|
1054
|
+
readonly presignSessionId: string;
|
|
1055
|
+
readonly step: 'r1-commit';
|
|
1056
|
+
readonly baseOtB2A1Step2: BaseOtStep2Message;
|
|
1057
|
+
readonly clientR1Commitment: PresignRound1CommitmentMsg;
|
|
1058
|
+
} | {
|
|
1059
|
+
readonly presignSessionId: string;
|
|
1060
|
+
readonly step: 'r1-reveal-and-ot1';
|
|
1061
|
+
readonly clientR1Reveal: PresignRound1RevealMsg;
|
|
1062
|
+
readonly clientOt1: ReadonlyArray<PresignMtaOtStep1Bundle>;
|
|
1063
|
+
} | {
|
|
1064
|
+
readonly presignSessionId: string;
|
|
1065
|
+
readonly step: 'ot2-and-ot3';
|
|
1066
|
+
readonly clientOt2: ReadonlyArray<PresignMtaOtStep2Bundle>;
|
|
1067
|
+
readonly clientOt3: ReadonlyArray<PresignMtaOtStep3Bundle>;
|
|
1068
|
+
} | {
|
|
1069
|
+
readonly presignSessionId: string;
|
|
1070
|
+
readonly step: 'mta-and-r3';
|
|
1071
|
+
readonly clientMta: ReadonlyArray<PresignMtaStep4PayloadBundle>;
|
|
1072
|
+
readonly clientR3: PresignRound3BroadcastMsg;
|
|
1073
|
+
} | {
|
|
1074
|
+
readonly presignSessionId: string;
|
|
1075
|
+
readonly step: 'r4-finalize';
|
|
1076
|
+
readonly clientR4: PresignRound4BroadcastMsg;
|
|
1077
|
+
};
|
|
1078
|
+
type PersonalPresignStepResponse = {
|
|
1079
|
+
readonly step: 'r1-commit-ack';
|
|
1080
|
+
readonly presigId32: Uint8Array;
|
|
1081
|
+
readonly hsmR1Commitment: PresignRound1CommitmentMsg;
|
|
1082
|
+
readonly hsmR1Reveal: PresignRound1RevealMsg;
|
|
1083
|
+
} | {
|
|
1084
|
+
readonly step: 'ot1-and-ot2';
|
|
1085
|
+
readonly hsmOt1: ReadonlyArray<PresignMtaOtStep1Bundle>;
|
|
1086
|
+
readonly hsmOt2: ReadonlyArray<PresignMtaOtStep2Bundle>;
|
|
1087
|
+
} | {
|
|
1088
|
+
readonly step: 'ot3-and-mta';
|
|
1089
|
+
readonly hsmOt3: ReadonlyArray<PresignMtaOtStep3Bundle>;
|
|
1090
|
+
readonly hsmMta: ReadonlyArray<PresignMtaStep4PayloadBundle>;
|
|
1091
|
+
} | {
|
|
1092
|
+
readonly step: 'r3-and-r4';
|
|
1093
|
+
readonly hsmR3: PresignRound3BroadcastMsg;
|
|
1094
|
+
readonly hsmR4: PresignRound4BroadcastMsg;
|
|
1095
|
+
} | {
|
|
1096
|
+
readonly step: 'finalized';
|
|
1097
|
+
readonly presigIdHex: string;
|
|
1098
|
+
};
|
|
1099
|
+
/**
|
|
1100
|
+
* Stateful `Slot 2` (HSM Cosigner) 2-party presignature responder session.
|
|
1101
|
+
* Consumes `sHsmBytes32` once at construction (wiping it immediately after converting to Shamir Slot 2)
|
|
1102
|
+
* and stores the completed `PresignatureShareRecord` into the HSM's `VolatilePresignaturePool`.
|
|
1103
|
+
*/
|
|
1104
|
+
declare class PersonalCosignerResponderSession {
|
|
1105
|
+
readonly presignSessionId: string;
|
|
1106
|
+
readonly cluster: MpcPublicClusterInfo;
|
|
1107
|
+
readonly sessionNonce32: Uint8Array;
|
|
1108
|
+
private readonly rng;
|
|
1109
|
+
private shamirSlot2Share32;
|
|
1110
|
+
private baseOtReceiverA2;
|
|
1111
|
+
private baseOtPendingB2;
|
|
1112
|
+
private baseOtSenderB2;
|
|
1113
|
+
private partySession;
|
|
1114
|
+
private hsmR1Commitment;
|
|
1115
|
+
private hsmR1Reveal;
|
|
1116
|
+
private clientR3;
|
|
1117
|
+
private hsmR3;
|
|
1118
|
+
private hsmR4;
|
|
1119
|
+
private closed;
|
|
1120
|
+
constructor(params: {
|
|
1121
|
+
readonly presignSessionId: string;
|
|
1122
|
+
readonly vaultId: string;
|
|
1123
|
+
readonly slotId: string;
|
|
1124
|
+
readonly policyEpoch: bigint;
|
|
1125
|
+
readonly rootPublicKeyComp33: Uint8Array;
|
|
1126
|
+
readonly xActorComp33: Uint8Array;
|
|
1127
|
+
readonly sHsmBytes32: Uint8Array;
|
|
1128
|
+
readonly sessionNonce32: Uint8Array;
|
|
1129
|
+
readonly rng?: RandomBytesFn;
|
|
1130
|
+
});
|
|
1131
|
+
get isClosed(): boolean;
|
|
1132
|
+
abort(): void;
|
|
1133
|
+
handleInit(req: PersonalPresignInitRequest): PersonalPresignInitResponse;
|
|
1134
|
+
handleStep(req: PersonalPresignStepRequest, targetPool: VolatilePresignaturePool): PersonalPresignStepResponse;
|
|
1135
|
+
}
|
|
1136
|
+
type PersonalSignPayloadKind = 'eip1559' | 'ocap-tx' | 'arcblock-jwt';
|
|
1137
|
+
type FirewallCommercialTier = 'free-local' | 'pro-shield' | 'vault-enforced';
|
|
1138
|
+
type FirewallRiskVerdict = 'allow' | 'warn' | 'block';
|
|
1139
|
+
interface SignedFirewallAttestation {
|
|
1140
|
+
readonly version: 1;
|
|
1141
|
+
readonly attestationId: string;
|
|
1142
|
+
readonly vaultId: string;
|
|
1143
|
+
readonly policyEpoch: string;
|
|
1144
|
+
readonly chainNamespace: 'evm' | 'ocap';
|
|
1145
|
+
readonly chainId: string;
|
|
1146
|
+
readonly fromAddress: string;
|
|
1147
|
+
readonly toAddress: string;
|
|
1148
|
+
readonly signingDigestHex: string;
|
|
1149
|
+
readonly clearSigningPreviewHashHex: string;
|
|
1150
|
+
readonly simulatedBlockNumber: string;
|
|
1151
|
+
readonly simulatedDeltaHashHex: string;
|
|
1152
|
+
readonly tier: FirewallCommercialTier;
|
|
1153
|
+
readonly verdict: FirewallRiskVerdict;
|
|
1154
|
+
readonly riskCodes: ReadonlyArray<string>;
|
|
1155
|
+
readonly issuedAtSec: string;
|
|
1156
|
+
readonly expiresAtSec: string;
|
|
1157
|
+
readonly verifierPublicKeyHex: string;
|
|
1158
|
+
readonly signatureHex: string;
|
|
1159
|
+
}
|
|
1160
|
+
declare function computeSimulatedDeltaCommitment32(delta: SimulatedBalanceDelta, extra?: {
|
|
1161
|
+
readonly proxyImplementationAddress?: string;
|
|
1162
|
+
}): Uint8Array;
|
|
1163
|
+
declare function signPersonalFirewallAttestation(params: {
|
|
1164
|
+
readonly verifierSecretKey32: Uint8Array | string;
|
|
1165
|
+
readonly attestationId: string;
|
|
1166
|
+
readonly vaultId: string;
|
|
1167
|
+
readonly policyEpoch: bigint;
|
|
1168
|
+
readonly chainNamespace: 'evm' | 'ocap';
|
|
1169
|
+
readonly chainId: string;
|
|
1170
|
+
readonly fromAddress: string;
|
|
1171
|
+
readonly toAddress: string;
|
|
1172
|
+
readonly signingDigest32: Uint8Array | string;
|
|
1173
|
+
readonly clearSigningPreviewHash32: Uint8Array | string;
|
|
1174
|
+
readonly simulatedBlockNumber: bigint;
|
|
1175
|
+
readonly simulatedDeltaHash32: Uint8Array | string;
|
|
1176
|
+
readonly tier: FirewallCommercialTier;
|
|
1177
|
+
readonly verdict: FirewallRiskVerdict;
|
|
1178
|
+
readonly riskCodes?: ReadonlyArray<string>;
|
|
1179
|
+
readonly issuedAtSec: bigint;
|
|
1180
|
+
readonly ttlSeconds?: number;
|
|
1181
|
+
}): SignedFirewallAttestation;
|
|
1182
|
+
declare function verifyPersonalFirewallAttestation(params: {
|
|
1183
|
+
readonly attestation: SignedFirewallAttestation;
|
|
1184
|
+
readonly trustedVerifierPublicKeys: ReadonlyArray<Uint8Array | string>;
|
|
1185
|
+
readonly nowSec: bigint;
|
|
1186
|
+
readonly expectedVaultId?: string;
|
|
1187
|
+
readonly expectedPolicyEpoch?: bigint;
|
|
1188
|
+
readonly expectedChainNamespace?: 'evm' | 'ocap';
|
|
1189
|
+
readonly expectedChainId?: string;
|
|
1190
|
+
readonly expectedFromAddress?: string;
|
|
1191
|
+
readonly expectedToAddress?: string;
|
|
1192
|
+
readonly expectedSigningDigest32?: Uint8Array | string;
|
|
1193
|
+
readonly expectedClearSigningPreviewHash32?: Uint8Array | string;
|
|
1194
|
+
readonly requirePaidTier?: boolean;
|
|
1195
|
+
}): {
|
|
1196
|
+
readonly simulatedBlockNumber: bigint;
|
|
1197
|
+
readonly simulatedDeltaHash32: Uint8Array;
|
|
1198
|
+
readonly issuedAtSec: bigint;
|
|
1199
|
+
readonly expiresAtSec: bigint;
|
|
1200
|
+
readonly tier: FirewallCommercialTier;
|
|
1201
|
+
};
|
|
1202
|
+
interface PersonalOnlineSignCosignerRequest {
|
|
1203
|
+
readonly vaultId: string;
|
|
1204
|
+
readonly slotId: string;
|
|
1205
|
+
readonly presigIdHex: string;
|
|
1206
|
+
readonly payloadKind?: PersonalSignPayloadKind;
|
|
1207
|
+
readonly unsignedTx?: Eip1559UnsignedTxFields;
|
|
1208
|
+
readonly unsignedPayloadBytes: Uint8Array;
|
|
1209
|
+
readonly signingDigest32: Uint8Array;
|
|
1210
|
+
readonly clearSigningPreview: PersonalClearSigningPreview;
|
|
1211
|
+
readonly clearSigningPreviewHash32: Uint8Array;
|
|
1212
|
+
readonly childDerivation: MpcChildDerivationSpec;
|
|
1213
|
+
readonly policyProof?: PersonalPolicyProofBundle;
|
|
1214
|
+
readonly entitlementTicket?: VaultEntitlementTicket;
|
|
1215
|
+
readonly firewallAttestation?: SignedFirewallAttestation;
|
|
1216
|
+
readonly attestedProxyImplementationAddress?: string;
|
|
1217
|
+
readonly simulatedDelta?: SimulatedBalanceDelta;
|
|
1218
|
+
readonly postConditions?: PersonalPostConditions;
|
|
1219
|
+
}
|
|
1220
|
+
interface PersonalCosignerTransport {
|
|
1221
|
+
initPresign(req: PersonalPresignInitRequest): Promise<PersonalPresignInitResponse>;
|
|
1222
|
+
stepPresign(req: PersonalPresignStepRequest): Promise<PersonalPresignStepResponse>;
|
|
1223
|
+
signOnline(req: PersonalOnlineSignCosignerRequest): Promise<{
|
|
1224
|
+
readonly share: MpcOnlineSignShare;
|
|
1225
|
+
}>;
|
|
1226
|
+
broadcastRawTransaction?(rawSignedTxHex: string): Promise<string>;
|
|
1227
|
+
}
|
|
1228
|
+
declare function runPersonalClientPresignWithTransport(params: {
|
|
1229
|
+
readonly cluster: MpcPublicClusterInfo;
|
|
1230
|
+
readonly sActorBytes32: Uint8Array;
|
|
1231
|
+
readonly transport: PersonalCosignerTransport;
|
|
1232
|
+
readonly rng?: RandomBytesFn;
|
|
1233
|
+
}): Promise<PresignatureShareRecord>;
|
|
1234
|
+
interface PersonalSignTxOptions {
|
|
1235
|
+
readonly policyProof?: PersonalPolicyProofBundle;
|
|
1236
|
+
readonly entitlementTicket?: VaultEntitlementTicket;
|
|
1237
|
+
readonly postConditions?: PersonalPostConditions;
|
|
1238
|
+
readonly simulatedDelta?: SimulatedBalanceDelta;
|
|
1239
|
+
readonly firewallAttestation?: SignedFirewallAttestation;
|
|
1240
|
+
readonly attestedProxyImplementationAddress?: string;
|
|
1241
|
+
}
|
|
1242
|
+
interface PersonalSignedEip1559Result {
|
|
1243
|
+
readonly rawSignedTxBytes: Uint8Array;
|
|
1244
|
+
readonly rawSignedTxHex: string;
|
|
1245
|
+
readonly txHashHex: string;
|
|
1246
|
+
readonly signingDigest32: Uint8Array;
|
|
1247
|
+
readonly signerAddress: string;
|
|
1248
|
+
readonly signature: MpcAggregatedSignature;
|
|
1249
|
+
readonly clearSigningPreview: PersonalClearSigningPreview;
|
|
1250
|
+
readonly clearSigningPreviewHash32: Uint8Array;
|
|
1251
|
+
}
|
|
1252
|
+
interface PersonalMpcEoaSigner {
|
|
1253
|
+
readonly address: string;
|
|
1254
|
+
readonly publicKeyComp33: Uint8Array;
|
|
1255
|
+
readonly publicKeyHex: string;
|
|
1256
|
+
readonly childDerivation: MpcChildDerivationSpec;
|
|
1257
|
+
readonly cluster: MpcPublicClusterInfo;
|
|
1258
|
+
signTransaction(tx: Eip1559UnsignedTxFields, options?: PersonalSignTxOptions): Promise<PersonalSignedEip1559Result>;
|
|
1259
|
+
request(args: {
|
|
1260
|
+
readonly method: string;
|
|
1261
|
+
readonly params?: ReadonlyArray<unknown>;
|
|
1262
|
+
}): Promise<unknown>;
|
|
1263
|
+
toViemLocalAccount(): {
|
|
1264
|
+
readonly address: `0x${string}`;
|
|
1265
|
+
readonly publicKey: `0x${string}`;
|
|
1266
|
+
readonly source: 'mpc-personal-vault';
|
|
1267
|
+
readonly type: 'local';
|
|
1268
|
+
signTransaction(tx: Eip1559UnsignedTxFields, options?: PersonalSignTxOptions): Promise<`0x${string}`>;
|
|
1269
|
+
signMessage(): Promise<never>;
|
|
1270
|
+
signTypedData(): Promise<never>;
|
|
1271
|
+
};
|
|
1272
|
+
}
|
|
1273
|
+
/**
|
|
1274
|
+
* Creates an ergonomic `EIP-1193` & `viem`-compatible MPC EOA signer (`Slot 1` Client).
|
|
1275
|
+
* - Runs clear-signing & optional simulation post-condition verification locally BEFORE presign/sign.
|
|
1276
|
+
* - Executes 2-party `KOS15` + `GadgetMtA` presignature + Groth-Shoup online signing against `transport`.
|
|
1277
|
+
* - `s_1` (`MpcOnlineSignShare` for Slot 1) and `s_actor` NEVER leave the client!
|
|
1278
|
+
*/
|
|
1279
|
+
declare function createPersonalMpcEoaSigner(params: {
|
|
1280
|
+
readonly vaultId: string;
|
|
1281
|
+
readonly slotId: string;
|
|
1282
|
+
readonly policyEpoch: bigint;
|
|
1283
|
+
readonly rootPublicKeyComp33: Uint8Array | string;
|
|
1284
|
+
readonly xActorComp33?: Uint8Array | string;
|
|
1285
|
+
readonly getActorShareBytes32: () => Promise<Uint8Array> | Uint8Array;
|
|
1286
|
+
readonly policy?: PersonalVaultPolicy;
|
|
1287
|
+
readonly childDerivation?: PersonalChildDerivationInput;
|
|
1288
|
+
readonly transport: PersonalCosignerTransport;
|
|
1289
|
+
readonly rng?: RandomBytesFn;
|
|
1290
|
+
}): PersonalMpcEoaSigner;
|
|
1291
|
+
//#endregion
|
|
1292
|
+
export { ACTOR_KIND_AND_ALG_BYTE, ActorKindAndAlg, ActorSlotPairingBootstrapPackage, CanonicalPersonalOcapChainGasConfig, CanonicalPersonalVaultPolicy, DeviceShareEnvelope, ENTITLEMENT_TIER_CODE, ERC20_APPROVE_SELECTOR_HEX, EncryptedTargetActorShareBox, FirewallCommercialTier, FirewallRiskVerdict, GuardianQuorumProof, HARD_BANNED_PERSONAL_EVM_SELECTORS, HSM_SEALED_BLOB_CIPHERTEXT_BYTES, HSM_SEALED_BLOB_CIPHERTEXT_OFFSET, HSM_SEALED_BLOB_HEADER_BYTES, HSM_SEALED_BLOB_HEADER_MAC_OFFSET, HSM_SEALED_BLOB_HEADER_WITH_MAC_BYTES, HSM_SEALED_BLOB_IV_OFFSET, HSM_SEALED_BLOB_MAX_POLICY_UTF8_BYTES, HSM_SEALED_BLOB_TAG_OFFSET, HSM_SEALED_BLOB_VERSION, HsmSealedBlobHeaderFields, MAX_ANNOUNCE_VALIDITY_WINDOW_SEC, MIN_ANNOUNCE_VALIDITY_WINDOW_SEC, OfflineSweepItemSpec, PERSONAL_MAX_VELOCITY_UINT128, ParsedHsmSealedBlob, PersonalActorChallengeAction, PersonalActorSignature, PersonalAllowedContractRule, PersonalAssetTierLimits, PersonalBlobAadInput, PersonalChildDerivationInput, PersonalClearSigningPreview, PersonalColdRecoveryKitManifest, PersonalColdRecoveryPlatePublicInfo, PersonalCosignerResponderSession, PersonalCosignerTransport, PersonalEvmCallKind, PersonalMpcEoaSigner, PersonalOcapAssetTierLimits, PersonalOcapChainGasConfig, PersonalOnlineSignCosignerRequest, PersonalPolicyProofBundle, PersonalPolicyTier, PersonalPostConditions, PersonalPresignInitRequest, PersonalPresignInitResponse, PersonalPresignStepRequest, PersonalPresignStepResponse, PersonalPreviewCallKind, PersonalRoleRoster, PersonalSealEnrollActorPok, PersonalSignPayloadKind, PersonalSignTxOptions, PersonalSignedEip1559Result, PersonalVaultPolicy, PersonalWakePasswordKdfOptions, QuorumApproverAlg, QuorumApproverMember, QuorumMemberSignatureEntry, RoleQuorumProof, SignedAnnounceTicket, SignedFirewallAttestation, SignedOfflineSweepTx, SimulatedBalanceDelta, UNLIMITED_APPROVE_THRESHOLD, VaultEntitlementTicket, VaultEntitlementTier, VerifiedPersonalEip1559Tx, WebAuthnVerifyExpectedPolicy, actorKindAndAlgToByte, additiveToShamirSlot1Share, additiveToShamirSlot2Share, aes256GcmDecryptDetached, aes256GcmEncryptDetached, applyHsmSlotResplitDelta, assertNoEip7702Bytes, assertPersonalSlotNotExpired, base64UrlDecodeBytes, base64UrlEncodeBytes, bootstrapPersonalVaultClient, buildPersonalAnnounceChallengeDigest32, buildPersonalClearSigningPreview, buildPersonalEntitlementApplyChallengeDigest32, buildPersonalPairResplitChallengeDigest32, buildPersonalPresignInitChallengeDigest32, buildPersonalResealKidChallengeDigest32, buildPersonalRevokeSlotChallengeDigest32, buildPersonalSealEnrollChallengeDigest32, buildPersonalSessionLockChallengeDigest32, buildPersonalSessionOpenChallengeDigest32, buildPersonalSignChallengeDigest32, buildPersonalVaultClusterInfo, buildPersonalVetoChallengeDigest32, byteToActorKindAndAlg, bytesToHex, canonicalizePersonalBlobAadBytes, canonicalizePersonalVaultPolicy, completeActorSlotPairingOnTarget, computeHsmSealedBlobHeaderMac32, computeNonDegenerateActorResplitShare, computePersonalActorChallengeDigest32, computePersonalClearSigningPreviewHash32, computePersonalPolicyHash32, computeSimulatedDeltaCommitment32, computeVaultEntitlementTicketDigest32, createActorSlotPairingBootstrap, createPersonalMpcEoaSigner, createPersonalSealEnrollActorPok, decodeAndVerifyPersonalEip1559Tx, decodeErc20ApproveCalldata, decodeHsmSealedBlobHeader319, decodeHsmSealedBlobInnerPlaintext3717, deriveBlindOcapVelocityTag32, deriveBlindSlotTag32, deriveBlindVaultTag32, deriveBlindVelocityTag32, deriveHsmPersonalSealKey32, derivePersonalVaultChildKey, derivePersonalWakePasswordKeys, encodeErc20ApproveCalldata, encodeHsmSealedBlobHeader319, encodeHsmSealedBlobInnerPlaintext3717, hexToBytes, initiateActorSlotResplit, isAgentActorKind, normalizeActorPublicKeyToPadded65, normalizeCanonicalOcapTokenKey, normalizeMaxTokenOutflowsCaps, normalizeOcapAddressOrEth, openHsmInboundTransportBox, parseHsmSealedBlobHeader, recoverPersonalVaultRootOffline, resolveRequiredPolicyTier, runPersonalClientPresignWithTransport, sealDeviceShareEnvelope, sealHsmInboundTransportBox, signAnnounceTicket, signGuardianQuorumApproval, signPersonalActorChallenge, signPersonalFirewallAttestation, signPersonalVaultRecoverySweepOffline, signRoleQuorumApproval, signVaultEntitlementTicket, unsealDeviceShareEnvelope, unwrapSealedBlobFromCloudSync, validateActorPublicKeyPadded65, verifyActorSlotPairingBootstrap, verifyGuardianQuorumProof, verifyPersonalActorSignature, verifyPersonalAdditiveSplitMatchesRoot, verifyPersonalColdRecoveryKitManifest, verifyPersonalFirewallAttestation, verifyPersonalPolicyProofBundle, verifyPersonalSealEnrollActorPok, verifyPersonalSimulationBalanceDelta, verifyRoleQuorumProof, verifySignedAnnounceTicket, verifyVaultEntitlementTicket, wrapSealedBlobForCloudSync, zeroizeBytes };
|