passkey-kit 0.16.5 → 0.17.1
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 +86 -37
- package/SECURITY.md +1 -1
- package/dist/contract-errors.d.ts +1 -1
- package/dist/contract-errors.d.ts.map +1 -1
- package/dist/contract-errors.js +6 -2
- package/dist/contract-errors.js.map +1 -1
- package/dist/errors.d.ts +7 -0
- package/dist/errors.d.ts.map +1 -1
- package/dist/errors.js +11 -0
- package/dist/errors.js.map +1 -1
- package/dist/index.d.ts +3 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/indexer/index.d.ts +1 -1
- package/dist/indexer/index.d.ts.map +1 -1
- package/dist/indexer/index.js.map +1 -1
- package/dist/indexer/mercury.d.ts +8 -12
- package/dist/indexer/mercury.d.ts.map +1 -1
- package/dist/indexer/mercury.js +128 -37
- package/dist/indexer/mercury.js.map +1 -1
- package/dist/indexer/types.d.ts +41 -5
- package/dist/indexer/types.d.ts.map +1 -1
- package/dist/kit/birth-verification.d.ts +45 -0
- package/dist/kit/birth-verification.d.ts.map +1 -0
- package/dist/kit/birth-verification.js +127 -0
- package/dist/kit/birth-verification.js.map +1 -0
- package/dist/kit/deploy-ops.d.ts +2 -2
- package/dist/kit/deploy-ops.d.ts.map +1 -1
- package/dist/kit/deploy-ops.js +2 -2
- package/dist/kit/deploy-ops.js.map +1 -1
- package/dist/kit/wallet-ops.d.ts +14 -2
- package/dist/kit/wallet-ops.d.ts.map +1 -1
- package/dist/kit/wallet-ops.js +50 -3
- package/dist/kit/wallet-ops.js.map +1 -1
- package/dist/kit/webauthn-ops.d.ts +3 -1
- package/dist/kit/webauthn-ops.d.ts.map +1 -1
- package/dist/kit/webauthn-ops.js +8 -2
- package/dist/kit/webauthn-ops.js.map +1 -1
- package/dist/kit/webauthn-verify.d.ts +166 -0
- package/dist/kit/webauthn-verify.d.ts.map +1 -0
- package/dist/kit/webauthn-verify.js +328 -0
- package/dist/kit/webauthn-verify.js.map +1 -0
- package/dist/kit.d.ts +60 -38
- package/dist/kit.d.ts.map +1 -1
- package/dist/kit.js +335 -108
- package/dist/kit.js.map +1 -1
- package/dist/managers/credential-manager.d.ts +2 -2
- package/dist/managers/credential-manager.d.ts.map +1 -1
- package/dist/managers/credential-manager.js +3 -3
- package/dist/managers/credential-manager.js.map +1 -1
- package/dist/managers/signer-manager.d.ts +10 -4
- package/dist/managers/signer-manager.d.ts.map +1 -1
- package/dist/managers/signer-manager.js +11 -5
- package/dist/managers/signer-manager.js.map +1 -1
- package/dist/managers/submission-manager.d.ts +2 -1
- package/dist/managers/submission-manager.d.ts.map +1 -1
- package/dist/managers/submission-manager.js +2 -2
- package/dist/managers/submission-manager.js.map +1 -1
- package/dist/server.d.ts +7 -5
- package/dist/server.d.ts.map +1 -1
- package/dist/server.js +6 -5
- package/dist/server.js.map +1 -1
- package/dist/types.d.ts +8 -5
- package/dist/types.d.ts.map +1 -1
- package/dist/utils.d.ts +4 -8
- package/dist/utils.d.ts.map +1 -1
- package/dist/utils.js +4 -8
- package/dist/utils.js.map +1 -1
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +3 -3
package/README.md
CHANGED
|
@@ -70,8 +70,8 @@ import { PasskeyKit } from "passkey-kit";
|
|
|
70
70
|
const kit = new PasskeyKit({
|
|
71
71
|
rpcUrl: "https://soroban-testnet.stellar.org",
|
|
72
72
|
networkPassphrase: "Test SDF Network ; September 2015",
|
|
73
|
-
// Canonical smart-wallet WASM hash; see docs/deployments
|
|
74
|
-
walletWasmHash: "
|
|
73
|
+
// Canonical smart-wallet WASM hash; see docs/deployments-2026-09-01.md
|
|
74
|
+
walletWasmHash: "97ce047884106b1c6c3bb40b8973cc48db1c4dad95c9e20462bf2c701daa764e",
|
|
75
75
|
});
|
|
76
76
|
```
|
|
77
77
|
|
|
@@ -80,11 +80,12 @@ const kit = new PasskeyKit({
|
|
|
80
80
|
`createWallet` runs the passkey registration ceremony and builds a **signed** deploy transaction. Submission is a separate, server-side step. The kit remains disconnected until the deployment succeeds and `connectWallet` verifies it.
|
|
81
81
|
|
|
82
82
|
```ts
|
|
83
|
-
const
|
|
83
|
+
const created = await kit.createWallet(
|
|
84
84
|
"My App", // shown in the passkey prompt
|
|
85
85
|
"user@example.com", // user identifier
|
|
86
86
|
);
|
|
87
|
-
// `signedTx` is
|
|
87
|
+
// `created.signedTx` is ready to submit.
|
|
88
|
+
// `created.contractId` is the predicted wallet address (C…).
|
|
88
89
|
```
|
|
89
90
|
|
|
90
91
|
### 3. Submit through the server
|
|
@@ -103,7 +104,7 @@ const server = new PasskeyServer({
|
|
|
103
104
|
},
|
|
104
105
|
});
|
|
105
106
|
|
|
106
|
-
const result = await server.send(signedTx);
|
|
107
|
+
const result = await server.send(created.signedTx);
|
|
107
108
|
if (result.success) {
|
|
108
109
|
console.log("deployed in tx", result.hash);
|
|
109
110
|
} else {
|
|
@@ -111,13 +112,21 @@ if (result.success) {
|
|
|
111
112
|
}
|
|
112
113
|
```
|
|
113
114
|
|
|
114
|
-
### 4.
|
|
115
|
+
### 4. Confirm and connect
|
|
115
116
|
|
|
116
117
|
```ts
|
|
117
|
-
|
|
118
|
-
|
|
118
|
+
if (!result.success) throw result.error;
|
|
119
|
+
|
|
120
|
+
await kit.confirmWalletCreation(created, result.hash);
|
|
121
|
+
const { contractId } = await kit.connectWallet({
|
|
122
|
+
keyId: created.keyIdBase64,
|
|
123
|
+
});
|
|
119
124
|
```
|
|
120
125
|
|
|
126
|
+
`confirmWalletCreation` verifies the successful `CreateContractV2` transaction.
|
|
127
|
+
It then stores the immutable wallet birth record.
|
|
128
|
+
`connectWallet` also verifies the current code, signer proof, and fresh assertion.
|
|
129
|
+
|
|
121
130
|
### 5. Sign & submit a transfer
|
|
122
131
|
|
|
123
132
|
Build any Soroban transaction, sign its wallet auth entries with the connected passkey, then submit.
|
|
@@ -147,9 +156,14 @@ Browser-side facade for wallet lifecycle and signing. Holds no secrets.
|
|
|
147
156
|
| `rpcUrl` | `string` | Yes | Stellar RPC URL. |
|
|
148
157
|
| `networkPassphrase` | `string` | Yes | Network passphrase. |
|
|
149
158
|
| `walletWasmHash` | `string` (hex) | Yes | Smart-wallet WASM hash used to deploy new wallets. |
|
|
150
|
-
| `acceptedWasmHashes` | `string[]` (hex) | No |
|
|
159
|
+
| `acceptedWasmHashes` | `string[]` (hex) | No | Current wallet code hashes accepted during connection. Defaults to `[walletWasmHash]`. |
|
|
160
|
+
| `acceptedBirthWasmHashes` | `string[]` (hex) | No | Immutable creation code hashes accepted during connection. Defaults to `[walletWasmHash]`. |
|
|
161
|
+
| `horizonUrl` | `string` | No | Full-history Horizon URL for creation transactions outside RPC retention. Public and test networks use official Horizon endpoints by default. |
|
|
151
162
|
| `rpId` | `string` | No | WebAuthn Relying Party id (domain). Defaults to the current origin. |
|
|
163
|
+
| `allowedOrigins` | `readonly string[]` | No | Origins accepted for signer proofs. Defaults to the browser origin. Required with `rpId` outside a browser. |
|
|
164
|
+
| `requireUserVerification` | `boolean` | No | Require the WebAuthn User Verified flag during SDK proof checks. Defaults to `false`; User Presence remains required. |
|
|
152
165
|
| `deploySource` | `string` (`S…`) | No | Secret key for a deployer you control, which then sources and pays for its own deployments. Defaults to the canonical deterministic deployer, which is sign-only and never pays. **Overriding it changes derived wallet addresses** (see [Deterministic derivation](#deterministic-derivation)). |
|
|
166
|
+
| `restoreSource` | `string` (`S…`) | No | Funded source used only for footprint restoration. The shared deployer cannot fund restores. |
|
|
153
167
|
| `timeoutInSeconds` | `number` | No | Transaction time bound (default `30`; the relayer requires `<= 30`). |
|
|
154
168
|
| `storage` | `StorageAdapter` | No | Passkey-record persistence (see [Storage adapters](#storage-adapters)). |
|
|
155
169
|
| `WebAuthn` | `WebAuthnClient` | No | Custom `startRegistration`/`startAuthentication` (for testing). |
|
|
@@ -170,8 +184,9 @@ Browser-side facade for wallet lifecycle and signing. Holds no secrets.
|
|
|
170
184
|
| Method | Returns | Description |
|
|
171
185
|
|---|---|---|
|
|
172
186
|
| `createKey(appName, userName, options?)` | `CreatedPasskey` | Run a passkey registration ceremony **without** deploying a wallet. |
|
|
173
|
-
| `createWallet(appName, userName, options?)` | `CreateWalletResult` | Register a passkey and build a deploy carrier. The kit remains disconnected
|
|
174
|
-
| `
|
|
187
|
+
| `createWallet(appName, userName, options?)` | `CreateWalletResult` | Register a passkey and build a deploy carrier. The kit remains disconnected. |
|
|
188
|
+
| `confirmWalletCreation(created, transactionHash)` | `VerifiedWalletBirth` | Verify a successful direct deployment and store its immutable birth record. |
|
|
189
|
+
| `connectWallet(options?)` | `ConnectWalletResult` | Resolve verified storage or complete indexer candidates. Every candidate receives all ownership checks. |
|
|
175
190
|
| `disconnect()` | `void` | Clear the connected wallet/keyId. |
|
|
176
191
|
| `requireWallet()` | `PasskeyClient` | Return the connected wallet or throw `WalletNotConnectedError`. |
|
|
177
192
|
|
|
@@ -181,9 +196,8 @@ Browser-side facade for wallet lifecycle and signing. Holds no secrets.
|
|
|
181
196
|
|
|
182
197
|
| Option | Type | Description |
|
|
183
198
|
|---|---|---|
|
|
184
|
-
| `keyId` | `string \| Uint8Array` |
|
|
185
|
-
| `
|
|
186
|
-
| `verifyWasmHash` | `boolean` | Override the code-identity check against `acceptedWasmHashes`. Defaults to **on** for indexer, derivation, primary prediction, and legacy storage rows. It defaults to **off** only for an explicitly secondary stored association, where an upgraded wallet would otherwise be locked out. |
|
|
199
|
+
| `keyId` | `string \| Uint8Array` | Select a credential directly. An untrusted path still runs a constrained proof ceremony. |
|
|
200
|
+
| `getWalletCandidates` | `(keyId: string) => Promise<WalletCandidateLookup>` | Return every candidate with birth claims and a complete indexed ledger position. |
|
|
187
201
|
|
|
188
202
|
### Signing methods
|
|
189
203
|
|
|
@@ -229,11 +243,11 @@ Each method builds an `AssembledTransaction` (`WalletTx`) that wraps one contrac
|
|
|
229
243
|
|
|
230
244
|
| Method | Wrapped contract fn | Description |
|
|
231
245
|
|---|---|---|
|
|
232
|
-
| `addSecp256r1(keyId, publicKey, limits, store, expiration?)` | `
|
|
246
|
+
| `addSecp256r1(keyId, publicKey, limits, store, expiration?)` | `add_secp256r1` | Add a passkey signer with an address-bound proof. |
|
|
233
247
|
| `updateSecp256r1(keyId, limits, store, expiration?)` | `update_signer` | Update a passkey signer's limits/storage/expiration. The public key is re-read from the ledger, never caller-supplied. |
|
|
234
248
|
| `addEd25519(publicKey, limits, store, expiration?)` | `add_signer` | Add an Ed25519 signer (`publicKey` = `G…`). |
|
|
235
249
|
| `updateEd25519(publicKey, limits, store, expiration?)` | `update_signer` | Update an Ed25519 signer. |
|
|
236
|
-
| `addPolicy(policy, limits, store, expiration?)` | `add_signer` | Add a policy signer (`policy` = `C…`). Invokes the policy's `install` hook. |
|
|
250
|
+
| `addPolicy(policy, limits, store, expiration?, options?)` | `add_signer` | Add a policy signer (`policy` = `C…`). Invokes the policy's `install` hook. Throws `ValidationError` if the hook adds wallet-authorized sub-invocations to the auth entry, unless `options.allowInstallSubInvocations` is set. |
|
|
237
251
|
| `updatePolicy(policy, limits, store, expiration?)` | `update_signer` | Update a policy signer. |
|
|
238
252
|
| `remove(signerKey)` | `remove_signer` | Remove a signer. A policy entry must pass its own `policy__` check. |
|
|
239
253
|
| `upgrade(newWasmHash)` | `upgrade` | Replace the wallet's WASM (`Buffer`/`Uint8Array`, 32 bytes). |
|
|
@@ -281,7 +295,7 @@ Server-only facade (`passkey-kit/server`). Holds the relayer secret — never im
|
|
|
281
295
|
| Option | Type | Required | Description |
|
|
282
296
|
|---|---|---|---|
|
|
283
297
|
| `networkPassphrase` | `string` | Yes | Network passphrase. |
|
|
284
|
-
| `rpcUrl` | `string` | No | Stellar RPC URL.
|
|
298
|
+
| `rpcUrl` | `string` | No | Stellar RPC URL. Required for verified reverse lookup. It also enables eviction probes. |
|
|
285
299
|
| `relayer` | `RelayerClientConfig` | No | Fee-sponsored submission (below). |
|
|
286
300
|
| `mercury` | `MercuryConfig` | No | Mercury's keyless hosted passkey-indexer (below). |
|
|
287
301
|
|
|
@@ -292,12 +306,12 @@ Server-only facade (`passkey-kit/server`). Holds the relayer secret — never im
|
|
|
292
306
|
|
|
293
307
|
| Method | Returns | Description |
|
|
294
308
|
|---|---|---|
|
|
295
|
-
| `send(input, options?)` | `TransactionResult` | Submit an `AssembledTransaction \| Transaction \| string` via the relayer.
|
|
309
|
+
| `send(input, options?)` | `TransactionResult` | Submit an `AssembledTransaction \| Transaction \| string` via the relayer. Uses `{ func, auth }` for one host function without source-account auth. Uses `{ xdr }` otherwise. **Never throws.** |
|
|
296
310
|
| `getTransaction(transactionId)` | `TransactionResult` | Poll a `skipWait` submission by its relayer id. |
|
|
297
311
|
| `getSigners(contractId)` | `WalletSigner[]` | Enumerate a wallet's signers via the indexer (flags evicted temporary signers when `rpcUrl` is set). |
|
|
298
|
-
| `
|
|
312
|
+
| `getWalletCandidates(options)` | `WalletCandidateLookup` | Return every wallet candidate with its immutable birth claims. |
|
|
299
313
|
|
|
300
|
-
`options` for `send`/`getTransaction` is `{ skipWait?: boolean, fundRelayerId?: string }`.
|
|
314
|
+
`options` for `send`/`getTransaction` is `{ skipWait?: boolean, fundRelayerId?: string }`. The discovery methods delegate to [`MercuryIndexer`](#discovery-indexer).
|
|
301
315
|
|
|
302
316
|
## Submission (relayer)
|
|
303
317
|
|
|
@@ -305,8 +319,8 @@ All wallet writes are fee-sponsored by the [OpenZeppelin Relayer Channels](https
|
|
|
305
319
|
|
|
306
320
|
Two submission modes are chosen automatically:
|
|
307
321
|
|
|
308
|
-
- **`{ func, auth }`** (`submitSorobanTransaction`) — for
|
|
309
|
-
- **`{ xdr }`** (`submitTransaction`) — for
|
|
322
|
+
- **`{ func, auth }`** (`submitSorobanTransaction`) — for one host function without source-account auth. This includes shared-deployer deployments.
|
|
323
|
+
- **`{ xdr }`** (`submitTransaction`) — for a complete envelope with source-account auth or more than one operation.
|
|
310
324
|
|
|
311
325
|
### Browsers: the relayer-proxy worker
|
|
312
326
|
|
|
@@ -314,23 +328,40 @@ The relayer API key is a secret, so a browser must never hold it. The [`relayer-
|
|
|
314
328
|
|
|
315
329
|
## Discovery (indexer)
|
|
316
330
|
|
|
317
|
-
The
|
|
331
|
+
The reconnect path uses verified local storage or a complete indexer response.
|
|
332
|
+
|
|
333
|
+
The SDK does not use deterministic derivation for wallet discovery.
|
|
334
|
+
|
|
335
|
+
Each indexer candidate includes the creation transaction hash, ledger, and birth WASM hash.
|
|
336
|
+
|
|
337
|
+
The SDK verifies those claims through Stellar RPC or Horizon history.
|
|
338
|
+
|
|
339
|
+
The SDK then verifies current code, the live signer, the stored proof, and a fresh assertion.
|
|
340
|
+
|
|
341
|
+
The SDK rejects incomplete, stale, or ambiguous lookup results.
|
|
318
342
|
|
|
319
343
|
The SDK abstracts discovery behind a `SignerIndexer` interface (`getSigners` / `findWallets` / `health`), implemented by the **keyless** `MercuryIndexer` — exported from the main `passkey-kit` entry (no secret, so it runs in the browser):
|
|
320
344
|
|
|
321
345
|
| Backend | Config | Wire | Status |
|
|
322
346
|
|---|---|---|---|
|
|
323
|
-
| `MercuryIndexer` | `MercuryIndexerConfig` (`url?`, `rpc?`) | Keyless REST (`GET /api/wallet/*`, `/api/lookup/*`) |
|
|
347
|
+
| `MercuryIndexer` | `MercuryIndexerConfig` (`url?`, `rpc?`) | Keyless REST (`GET /api/wallet/*`, `/api/lookup/*`) | Signer enumeration is live on testnet and mainnet. Schema-2 wallet candidates are pending. |
|
|
324
348
|
|
|
325
349
|
> [!NOTE]
|
|
326
|
-
> Mercury's hosted passkey-indexer is public and **keyless
|
|
350
|
+
> Mercury's hosted passkey-indexer is public and **keyless** on testnet and mainnet.
|
|
351
|
+
> Its current API supports signer enumeration.
|
|
352
|
+
> As of 2026-09-01, its lookup route does not return the required schema-2 birth claims.
|
|
353
|
+
> The SDK therefore fails closed for fresh-device discovery.
|
|
354
|
+
> Verified local wallet records continue to connect.
|
|
355
|
+
> See the [schema-2 response contract](docs/indexer-signer-provenance-response.md).
|
|
327
356
|
|
|
328
357
|
```ts
|
|
329
358
|
const indexer = MercuryIndexer.forNetwork({ rpc }, networkPassphrase);
|
|
330
|
-
const
|
|
359
|
+
const lookup = await indexer!.findWallets(SignerKey.Secp256r1(keyId));
|
|
331
360
|
```
|
|
332
361
|
|
|
333
|
-
`lookupWithRetry(fn, { attempts?, delayMs?, predicate? })`
|
|
362
|
+
`lookupWithRetry(fn, { attempts?, delayMs?, predicate? })` polls array results.
|
|
363
|
+
Use it with `getSigners()` after a write.
|
|
364
|
+
Do not use it with `findWallets()`, which returns `WalletCandidateLookup`.
|
|
334
365
|
|
|
335
366
|
## Tokens (`SACClient`)
|
|
336
367
|
|
|
@@ -366,7 +397,7 @@ const kit = new PasskeyKit({ rpcUrl, networkPassphrase, walletWasmHash, storage:
|
|
|
366
397
|
|
|
367
398
|
All adapters implement `StorageAdapter` (`save` / `get` / `getByContract` / `getAll` / `delete` / `update` / `clear`) over `StoredPasskey` records.
|
|
368
399
|
|
|
369
|
-
|
|
400
|
+
Each stored row includes a verified birth WASM hash, creation transaction hash, and creation ledger.
|
|
370
401
|
|
|
371
402
|
## Errors
|
|
372
403
|
|
|
@@ -391,13 +422,17 @@ Error classes: `ConfigurationError`, `WalletNotConnectedError`, `WalletOwnership
|
|
|
391
422
|
|
|
392
423
|
### Contract error decoding
|
|
393
424
|
|
|
394
|
-
On-chain failures surface as `Error(Contract, #N)` in diagnostics.
|
|
425
|
+
On-chain failures surface as `Error(Contract, #N)` in diagnostics. The v1.1 contract uses errors **100–133**, with retired gaps.
|
|
426
|
+
|
|
427
|
+
The legacy 1–9 range still decodes as `SmartWalletLegacy`.
|
|
395
428
|
|
|
396
429
|
| Code | Name | Meaning |
|
|
397
430
|
|---|---|---|
|
|
398
431
|
| 100 | `SignerNotFound` | The requested signer does not exist. |
|
|
399
432
|
| 101 | `SignerAlreadyExists` | `add_signer` on an existing key. |
|
|
400
433
|
| 102 | `SignerExpired` | Expiration timestamp is in the past. |
|
|
434
|
+
| 103 | `LastAdminSigner` | The change would leave no durable admin signer. |
|
|
435
|
+
| 104 | `LastSigner` | The change would leave no durable signer. |
|
|
401
436
|
| 110 | `MissingContext` | No signer in the map may authorize a requested context. |
|
|
402
437
|
| 111 | `SignatureKeyValueMismatch` | A signature's variant doesn't match its stored signer. |
|
|
403
438
|
| 120 | `ClientDataJsonTooLarge` | `clientDataJSON` exceeds the 1024-byte parse buffer. |
|
|
@@ -406,6 +441,10 @@ On-chain failures surface as `Error(Contract, #N)` in diagnostics. `decodeContra
|
|
|
406
441
|
| 123 | `InvalidWebAuthnType` | `type` is not `"webauthn.get"`. |
|
|
407
442
|
| 124 | `InvalidAuthenticatorData` | `authenticatorData` shorter than 37 bytes. |
|
|
408
443
|
| 125 | `UserPresenceRequired` | Authenticator did not set the User Present (UP) flag. |
|
|
444
|
+
| 126 | `AuthenticatorDataTooLarge` | `authenticatorData` exceeds the 1024-byte limit. |
|
|
445
|
+
| 130 | `BindingProofRequired` | A Secp256r1 signer is missing its required proof. |
|
|
446
|
+
| 131 | `BindingProofUnexpected` | A proof was supplied for a non-Secp256r1 signer. |
|
|
447
|
+
| 133 | `BindingPublicKeyImmutable` | An update tried to change a bound public key. |
|
|
409
448
|
|
|
410
449
|
## Types
|
|
411
450
|
|
|
@@ -461,24 +500,29 @@ Signer and signature expiration are **UNIX timestamps in seconds** (inclusive: v
|
|
|
461
500
|
|
|
462
501
|
- **Limit value and authority.** Limit wallet balances, signer permissions, policy allowances, and relayer permissions. Monitor wallet activity. Keep independent recovery, submission, and authorized upgrade paths.
|
|
463
502
|
- **Hosted services can fail or return stale data.** Do not treat relayer or indexer responses as authoritative chain state. Confirm security-sensitive state through Stellar RPC.
|
|
503
|
+
- **Fresh-device discovery needs schema 2.** The hosted Mercury lookup does not yet return schema-2 birth claims. The SDK fails closed until deployment.
|
|
464
504
|
- **Keep at least one durable admin signer.** The contract rejects any change that would remove or demote its last durable (`Persistent`, non-expiring) admin signer (`LastAdminSigner = 103`) or leave it without any durable signer (`LastSigner = 104`), so a wallet always retains one signer that cannot evict or expire. Signers outside that guard — `Temporary` storage or with an expiration — lapse on their own: add a replacement *before* removing or demoting an existing signer.
|
|
465
505
|
- **The default deployer is a shared, public keypair — its secret is publicly derivable.** It salts deployment and signs only the CreateContractV2 authorization entry; the relayer supplies the envelope source, sequence, and fees. It never controls the wallet. Its determinism is load-bearing for discovery: overriding `deploySource` changes every derived address and breaks keyId → wallet lookup. Use a separate funded `restoreSource` for `restoreFootprint`; never fund the shared deployer. A third-party `bumpSequence` to `INT64_MAX` no longer blocks the current SDK because it never uses the shared deployer as an envelope source. Full analysis: [`docs/security-deterministic-deployer.md`](docs/security-deterministic-deployer.md).
|
|
466
|
-
- **
|
|
506
|
+
- **Current code identity is not signer provenance.** The SDK also verifies immutable birth code and address-bound proofs. See the [signer-provenance design](docs/security-signer-provenance-v2.md).
|
|
467
507
|
- **WebAuthn requires User Presence (UP), not User Verification (UV).** The contract requires the UP flag but not UV (biometric/PIN), so it stays compatible with non-UV authenticators. Enforce UV at the client/relayer layer if you need it.
|
|
468
508
|
- **Value-moving policies need a cumulative cap or a co-signer.** A `Signature::Policy` carries no secret, so a per-transfer cap alone is trivially drained by repeated capped transfers. See the [contract interface](#contract-interface) and `sample-policy`.
|
|
469
|
-
- **
|
|
509
|
+
- **Pre-1.1 wallets cannot use this release.** This alpha release has no legacy connection or migration path.
|
|
470
510
|
|
|
471
511
|
## Contract interface
|
|
472
512
|
|
|
473
|
-
The wallet is a Soroban smart contract (`soroban-sdk 27`, `wasm32v1-none`). Every user wallet is a separate instance
|
|
513
|
+
The wallet is a Soroban smart contract (`soroban-sdk 27`, `wasm32v1-none`). Every user wallet is a separate instance.
|
|
514
|
+
|
|
515
|
+
The v1.1 contract requires passkey proofs in `__constructor` and every later Secp256r1 signer write. See [the signer-provenance design](docs/security-signer-provenance-v2.md) and [deployment manifest](docs/deployments-2026-09-01.md).
|
|
474
516
|
|
|
475
|
-
**Functions:** `__constructor(signer)` · `add_signer(signer)` · `update_signer(signer)` · `remove_signer(signer_key)` · `upgrade(new_wasm_hash)` · `get_signer(signer_key)
|
|
517
|
+
**Functions:** `__constructor(signer, proof)` · `add_signer(signer)` · `add_secp256r1(signer, proof)` · `update_signer(signer)` · `remove_signer(signer_key)` · `upgrade(new_wasm_hash)` · `get_signer(signer_key)` · `get_secp256r1_binding(key_id)`.
|
|
518
|
+
|
|
519
|
+
Wallet administration functions require wallet auth through `__check_auth`.
|
|
476
520
|
|
|
477
521
|
**Signer kinds:** `Policy(Address)` · `Ed25519(BytesN<32>)` · `Secp256r1(Bytes keyId)`, each with a `SignerExpiration`, `SignerLimits`, and `SignerStorage`.
|
|
478
522
|
|
|
479
523
|
**Auth (`__check_auth`):** a flat `Signatures` map (`SignerKey → Signature`) signed over the plain signature payload. Pass 1 checks every requested context is covered by some permitted, unexpired signer; pass 2 verifies **every** entry in the map (existence, expiration, crypto/policy). Include only the signatures you need.
|
|
480
524
|
|
|
481
|
-
**Policy lifecycle:** policy signers get an `install(wallet)` hook on add (a hard call — a panic aborts the add) and a permissionless `uninstall(wallet)` self-clean entrypoint. `policy__` is publicly callable — stateful policies must authenticate the caller (`source.require_auth()`).
|
|
525
|
+
**Policy lifecycle:** policy signers get an `install(wallet)` hook on add (a hard call — a panic aborts the add) and a permissionless `uninstall(wallet)` self-clean entrypoint. `install` runs while the adding signer's authorization is live: anything the hook `require_auth`s against the wallet becomes a sub-invocation of the `add_signer` auth entry, covered by the adder's signature. The new policy's `SignerLimits` do not bound this. Only add policy contracts you trust. `addPolicy` refuses such entries by default. `policy__` is publicly callable — stateful policies must authenticate the caller (`source.require_auth()`).
|
|
482
526
|
|
|
483
527
|
**Events** (`#[contractevent]`, SEP-48 schema in the WASM): `signer_added` · `signer_updated` · `signer_removed` · `upgraded`. These replace the legacy `("sw_v1", …)` tuple events; indexers consume them directly.
|
|
484
528
|
|
|
@@ -486,7 +530,7 @@ See [`contracts/smart-wallet-interface/src/`](./contracts/smart-wallet-interface
|
|
|
486
530
|
|
|
487
531
|
### Deterministic derivation
|
|
488
532
|
|
|
489
|
-
|
|
533
|
+
Each new wallet address derives from its constructor passkey credential ID (`keyId`).
|
|
490
534
|
|
|
491
535
|
```text
|
|
492
536
|
contractId = sha256(XDR(HashIdPreimage::EnvelopeTypeContractId {
|
|
@@ -498,10 +542,11 @@ contractId = sha256(XDR(HashIdPreimage::EnvelopeTypeContractId {
|
|
|
498
542
|
}))
|
|
499
543
|
```
|
|
500
544
|
|
|
501
|
-
- The canonical deployer
|
|
545
|
+
- The canonical deployer uses `Keypair.fromRawEd25519Seed(sha256("kalepail"))`.
|
|
546
|
+
- Overriding `deploySource` changes derived addresses.
|
|
502
547
|
- The WASM hash is deliberately **not** in the preimage, so an `upgrade` never moves a wallet's address.
|
|
503
548
|
|
|
504
|
-
This tuple
|
|
549
|
+
This tuple remains stable for address compatibility. Signer proofs provide ownership evidence; address occupancy does not.
|
|
505
550
|
|
|
506
551
|
## Repository layout & development
|
|
507
552
|
|
|
@@ -530,3 +575,7 @@ pnpm verify:bindings # assert the committed bindings match the canonical WASM
|
|
|
530
575
|
|
|
531
576
|
- [Super Peach](https://github.com/kalepail/superpeach) — a real-world implementation example.
|
|
532
577
|
- [Stellar Developers Discord `#passkeys`](https://discord.gg/stellardev) — questions and showcase.
|
|
578
|
+
|
|
579
|
+
---
|
|
580
|
+
|
|
581
|
+
> **Note:** This repository is not in scope for the Stellar Development Foundation bug bounty program. Vulnerabilities found in this repo are not eligible for rewards.
|
package/SECURITY.md
CHANGED
|
@@ -12,7 +12,7 @@ Do not store or control assets you cannot afford to lose. Limit balances and per
|
|
|
12
12
|
|
|
13
13
|
Only the latest npm releases and the canonical smart-wallet WASM receive security fixes.
|
|
14
14
|
|
|
15
|
-
The current deployment manifest
|
|
15
|
+
The current [`deployment manifest`](./docs/deployments-2026-09-01.md) identifies the canonical WASM. Existing wallet instances do not upgrade automatically.
|
|
16
16
|
|
|
17
17
|
## Report a vulnerability privately
|
|
18
18
|
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
* `Errors` map; `contract-errors.test.ts` asserts this registry stays in sync
|
|
10
10
|
* with it, so a bindings regen surfaces any drift.
|
|
11
11
|
*
|
|
12
|
-
* The v1 contract deliberately renumbered its error space to 100-
|
|
12
|
+
* The v1 contract deliberately renumbered its error space to 100-139 so it is
|
|
13
13
|
* disjoint from the legacy (pre-1.0) 1-9 range: a decoded code < 100 means the
|
|
14
14
|
* client is talking to a legacy wallet. Both ranges are kept here so errors
|
|
15
15
|
* from legacy deployed wallets still decode (family `SmartWalletLegacy`).
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"contract-errors.d.ts","sourceRoot":"","sources":["../src/contract-errors.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAEH,OAAO,EACL,aAAa,EAGb,eAAe,EAChB,MAAM,aAAa,CAAC;AACrB,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,YAAY,CAAC;AAErD;;GAEG;AACH,MAAM,MAAM,mBAAmB,GAAG,aAAa,GAAG,mBAAmB,CAAC;AAEtE;;;GAGG;AACH,MAAM,WAAW,iBAAiB;IAChC,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,mBAAmB,CAAC;IAC5B,OAAO,EAAE,MAAM,CAAC;CACjB;AAWD;;GAEG;AACH,eAAO,MAAM,uBAAuB,EAAE,QAAQ,CAC5C,MAAM,CAAC,MAAM,EAAE,iBAAiB,CAAC,
|
|
1
|
+
{"version":3,"file":"contract-errors.d.ts","sourceRoot":"","sources":["../src/contract-errors.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAEH,OAAO,EACL,aAAa,EAGb,eAAe,EAChB,MAAM,aAAa,CAAC;AACrB,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,YAAY,CAAC;AAErD;;GAEG;AACH,MAAM,MAAM,mBAAmB,GAAG,aAAa,GAAG,mBAAmB,CAAC;AAEtE;;;GAGG;AACH,MAAM,WAAW,iBAAiB;IAChC,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,mBAAmB,CAAC;IAC5B,OAAO,EAAE,MAAM,CAAC;CACjB;AAWD;;GAEG;AACH,eAAO,MAAM,uBAAuB,EAAE,QAAQ,CAC5C,MAAM,CAAC,MAAM,EAAE,iBAAiB,CAAC,CAqClC,CAAC;AAkBF;;;GAGG;AACH,wBAAgB,qBAAqB,CACnC,IAAI,EAAE,MAAM,EACZ,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAChC,aAAa,GAAG,IAAI,CAMtB;AAED;;;;;;;GAOG;AACH,wBAAgB,mBAAmB,CAAC,UAAU,EAAE,OAAO,GAAG,aAAa,GAAG,IAAI,CAM7E;AAED;;GAEG;AACH,wBAAgB,iBAAiB,CAC/B,KAAK,EAAE,eAAe,EACtB,IAAI,CAAC,EAAE,MAAM,GACZ,kBAAkB,CAMpB;AAED;;;;GAIG;AACH,wBAAgB,iBAAiB,CAC/B,UAAU,EAAE,OAAO,EACnB,IAAI,CAAC,EAAE,MAAM,GACZ,kBAAkB,CAKpB;AAED;;;;GAIG;AACH,wBAAgB,iBAAiB,CAC/B,UAAU,EAAE,OAAO,EACnB,IAAI,CAAC,EAAE,MAAM,GACZ,kBAAkB,CAQpB"}
|
package/dist/contract-errors.js
CHANGED
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
* `Errors` map; `contract-errors.test.ts` asserts this registry stays in sync
|
|
10
10
|
* with it, so a bindings regen surfaces any drift.
|
|
11
11
|
*
|
|
12
|
-
* The v1 contract deliberately renumbered its error space to 100-
|
|
12
|
+
* The v1 contract deliberately renumbered its error space to 100-139 so it is
|
|
13
13
|
* disjoint from the legacy (pre-1.0) 1-9 range: a decoded code < 100 means the
|
|
14
14
|
* client is talking to a legacy wallet. Both ranges are kept here so errors
|
|
15
15
|
* from legacy deployed wallets still decode (family `SmartWalletLegacy`).
|
|
@@ -24,7 +24,7 @@ function entry(code, name, family, message) {
|
|
|
24
24
|
* Registry of every known contract error code, keyed by numeric code.
|
|
25
25
|
*/
|
|
26
26
|
export const CONTRACT_ERROR_REGISTRY = Object.freeze(Object.fromEntries([
|
|
27
|
-
// --- v1 SmartWallet (100-
|
|
27
|
+
// --- v1 SmartWallet (100-139) — source of truth in the bindings Errors map ---
|
|
28
28
|
// 100-109: signer storage / management
|
|
29
29
|
entry(100, "SignerNotFound", "SmartWallet", "The requested signer does not exist on this smart wallet."),
|
|
30
30
|
entry(101, "SignerAlreadyExists", "SmartWallet", "add_signer was called with a signer key that already exists."),
|
|
@@ -42,6 +42,10 @@ export const CONTRACT_ERROR_REGISTRY = Object.freeze(Object.fromEntries([
|
|
|
42
42
|
entry(124, "InvalidAuthenticatorData", "SmartWallet", "authenticatorData is shorter than the WebAuthn minimum of 37 bytes."),
|
|
43
43
|
entry(125, "UserPresenceRequired", "SmartWallet", "The authenticator did not set the User Present (UP) flag."),
|
|
44
44
|
entry(126, "AuthenticatorDataTooLarge", "SmartWallet", "authenticatorData exceeds the 1024-byte cap."),
|
|
45
|
+
// 130-139: Secp256r1 signer binding
|
|
46
|
+
entry(130, "BindingProofRequired", "SmartWallet", "A Secp256r1 signer requires a purpose-specific WebAuthn proof over its full signer value."),
|
|
47
|
+
entry(131, "BindingProofUnexpected", "SmartWallet", "A non-Secp256r1 signer cannot include a binding proof."),
|
|
48
|
+
entry(133, "BindingPublicKeyImmutable", "SmartWallet", "update_signer cannot replace a bound Secp256r1 public key."),
|
|
45
49
|
// --- Legacy (pre-1.0) 1-9 — kept so errors from legacy deployed wallets decode ---
|
|
46
50
|
entry(1, "NotFound", "SmartWalletLegacy", "[legacy] The specified signer was not found."),
|
|
47
51
|
entry(2, "AlreadyExists", "SmartWalletLegacy", "[legacy] The signer already exists on this wallet."),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":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,CAAC;IACxB,MAAM,IAAI,GAAG,MAAM,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC,CAAE,EAAE,EAAE,CAAC,CAAC;IAC5C,OAAO,qBAAqB,CAAC,IAAI,EAAE,EAAE,UAAU,EAAE,IAAI,EAAE,CAAC,CAAC;AAC3D,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,iBAAiB,CAC/B,KAAsB,EACtB,IAAa;IAEb,OAAO;QACL,OAAO,EAAE,KAAK;QACd,KAAK;QACL,GAAG,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;KAC1B,CAAC;AACJ,CAAC;AAED;;;;GAIG;AACH,MAAM,UAAU,iBAAiB,CAC/B,UAAmB,EACnB,IAAa;IAEb,MAAM,KAAK,GACT,mBAAmB,CAAC,UAAU,CAAC;QAC/B,IAAI,eAAe,CAAC,kBAAkB,CAAC,UAAU,CAAC,IAAI,mBAAmB,CAAC,CAAC;IAC7E,OAAO,iBAAiB,CAAC,KAAK,EAAE,IAAI,CAAC,CAAC;AACxC,CAAC;AAED;;;;GAIG;AACH,MAAM,UAAU,iBAAiB,CAC/B,UAAmB,EACnB,IAAa;IAEb,MAAM,KAAK,GACT,mBAAmB,CAAC,UAAU,CAAC;QAC/B,IAAI,eAAe,CACjB,kBAAkB,CAAC,UAAU,CAAC,IAAI,mBAAmB,EACrD,IAAI,CACL,CAAC;IACJ,OAAO,iBAAiB,CAAC,KAAK,EAAE,IAAI,CAAC,CAAC;AACxC,CAAC"}
|
package/dist/errors.d.ts
CHANGED
|
@@ -35,6 +35,7 @@ export declare enum PasskeyKitErrorCode {
|
|
|
35
35
|
WALLET_ALREADY_EXISTS = 2002,
|
|
36
36
|
WALLET_NOT_FOUND = 2003,
|
|
37
37
|
WALLET_OWNERSHIP_MISMATCH = 2004,
|
|
38
|
+
WALLET_AMBIGUOUS = 2005,
|
|
38
39
|
WEBAUTHN_REGISTRATION_FAILED = 3001,
|
|
39
40
|
WEBAUTHN_AUTHENTICATION_FAILED = 3002,
|
|
40
41
|
WEBAUTHN_NOT_SUPPORTED = 3003,
|
|
@@ -95,6 +96,12 @@ export declare class WalletNotConnectedError extends PasskeyKitError {
|
|
|
95
96
|
export declare class WalletOwnershipError extends PasskeyKitError {
|
|
96
97
|
constructor(message: string, context?: Record<string, unknown>);
|
|
97
98
|
}
|
|
99
|
+
/** Thrown when more than one verified wallet contains the connecting passkey. */
|
|
100
|
+
export declare class WalletAmbiguousError extends PasskeyKitError {
|
|
101
|
+
/** Every candidate that passed the configured wallet checks. */
|
|
102
|
+
readonly candidates: readonly string[];
|
|
103
|
+
constructor(candidates: readonly string[]);
|
|
104
|
+
}
|
|
98
105
|
/** Thrown when a WebAuthn ceremony fails. */
|
|
99
106
|
export declare class WebAuthnError extends PasskeyKitError {
|
|
100
107
|
constructor(message: string, code: PasskeyKitErrorCode.WEBAUTHN_REGISTRATION_FAILED | PasskeyKitErrorCode.WEBAUTHN_AUTHENTICATION_FAILED | PasskeyKitErrorCode.WEBAUTHN_NOT_SUPPORTED | PasskeyKitErrorCode.WEBAUTHN_CANCELLED | PasskeyKitErrorCode.PUBLIC_KEY_EXTRACTION_FAILED, cause?: Error);
|
package/dist/errors.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"errors.d.ts","sourceRoot":"","sources":["../src/errors.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAEH;;;;;;;;;;;;;;;GAeG;AACH,oBAAY,mBAAmB;IAE7B,cAAc,OAAO;IACrB,cAAc,OAAO;IAGrB,oBAAoB,OAAO;IAC3B,qBAAqB,OAAO;IAC5B,gBAAgB,OAAO;IACvB,yBAAyB,OAAO;
|
|
1
|
+
{"version":3,"file":"errors.d.ts","sourceRoot":"","sources":["../src/errors.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAEH;;;;;;;;;;;;;;;GAeG;AACH,oBAAY,mBAAm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C,gEAAgE;IAChE,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;gBAGtB,YAAY,EAAE,MAAM,EACpB,iBAAiB,EAAE,MAAM,EACzB,MAAM,EAAE,MAAM,EACd,OAAO,EAAE,MAAM,EACf,OAAO,CAAC,EAAE;QACR,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;QAClC,KAAK,CAAC,EAAE,KAAK,CAAC;KACf;CAWJ;AAED;;;;GAIG;AACH,wBAAgB,SAAS,CACvB,GAAG,EAAE,OAAO,EACZ,WAAW,GAAE,mBAAuD,GACnE,eAAe,CASjB"}
|
package/dist/errors.js
CHANGED
|
@@ -38,6 +38,7 @@ export var PasskeyKitErrorCode;
|
|
|
38
38
|
PasskeyKitErrorCode[PasskeyKitErrorCode["WALLET_ALREADY_EXISTS"] = 2002] = "WALLET_ALREADY_EXISTS";
|
|
39
39
|
PasskeyKitErrorCode[PasskeyKitErrorCode["WALLET_NOT_FOUND"] = 2003] = "WALLET_NOT_FOUND";
|
|
40
40
|
PasskeyKitErrorCode[PasskeyKitErrorCode["WALLET_OWNERSHIP_MISMATCH"] = 2004] = "WALLET_OWNERSHIP_MISMATCH";
|
|
41
|
+
PasskeyKitErrorCode[PasskeyKitErrorCode["WALLET_AMBIGUOUS"] = 2005] = "WALLET_AMBIGUOUS";
|
|
41
42
|
// WebAuthn (3xxx)
|
|
42
43
|
PasskeyKitErrorCode[PasskeyKitErrorCode["WEBAUTHN_REGISTRATION_FAILED"] = 3001] = "WEBAUTHN_REGISTRATION_FAILED";
|
|
43
44
|
PasskeyKitErrorCode[PasskeyKitErrorCode["WEBAUTHN_AUTHENTICATION_FAILED"] = 3002] = "WEBAUTHN_AUTHENTICATION_FAILED";
|
|
@@ -135,6 +136,16 @@ export class WalletOwnershipError extends PasskeyKitError {
|
|
|
135
136
|
this.name = "WalletOwnershipError";
|
|
136
137
|
}
|
|
137
138
|
}
|
|
139
|
+
/** Thrown when more than one verified wallet contains the connecting passkey. */
|
|
140
|
+
export class WalletAmbiguousError extends PasskeyKitError {
|
|
141
|
+
/** Every candidate that passed the configured wallet checks. */
|
|
142
|
+
candidates;
|
|
143
|
+
constructor(candidates) {
|
|
144
|
+
super("More than one verified wallet contains the given passkey", PasskeyKitErrorCode.WALLET_AMBIGUOUS, { context: { candidates: [...candidates] } });
|
|
145
|
+
this.name = "WalletAmbiguousError";
|
|
146
|
+
this.candidates = [...candidates];
|
|
147
|
+
}
|
|
148
|
+
}
|
|
138
149
|
/** Thrown when a WebAuthn ceremony fails. */
|
|
139
150
|
export class WebAuthnError extends PasskeyKitError {
|
|
140
151
|
constructor(message, code, cause) {
|
package/dist/errors.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"errors.js","sourceRoot":"","sources":["../src/errors.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAEH;;;;;;;;;;;;;;;GAeG;AACH,MAAM,CAAN,IAAY,
|
|
1
|
+
{"version":3,"file":"errors.js","sourceRoot":"","sources":["../src/errors.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAEH;;;;;;;;;;;;;;;GAeG;AACH,MAAM,CAAN,IAAY,mBAwDX;AAxDD,WAAY,mBAAmB;IAC7B,uBAAuB;IACvB,oFAAqB,CAAA;IACrB,oFAAqB,CAAA;IAErB,sBAAsB;IACtB,gGAA2B,CAAA;IAC3B,kGAA4B,CAAA;IAC5B,wFAAuB,CAAA;IACvB,0GAAgC,CAAA;IAChC,wFAAuB,CAAA;IAEvB,kBAAkB;IAClB,gHAAmC,CAAA;IACnC,oHAAqC,CAAA;IACrC,oGAA6B,CAAA;IAC7B,4FAAyB,CAAA;IACzB,gHAAmC,CAAA;IAEnC,iBAAiB;IACjB,oFAAqB,CAAA;IACrB,wFAAuB,CAAA;IACvB,oFAAqB,CAAA;IACrB,gHAAmC,CAAA;IACnC,sGAA8B,CAAA;IAE9B,qBAAqB;IACrB,0FAAwB,CA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;IAChD,wCAAwC;IAC/B,YAAY,CAAS;IAE9B,kEAAkE;IACzD,iBAAiB,CAAS;IAEnC,gEAAgE;IACvD,MAAM,CAAS;IAExB,YACE,YAAoB,EACpB,iBAAyB,EACzB,MAAc,EACd,OAAe,EACf,OAGC;QAED,KAAK,CAAC,OAAO,EAAE,mBAAmB,CAAC,cAAc,EAAE;YACjD,OAAO,EAAE,EAAE,YAAY,EAAE,iBAAiB,EAAE,MAAM,EAAE,GAAG,OAAO,EAAE,OAAO,EAAE;YACzE,KAAK,EAAE,OAAO,EAAE,KAAK;SACtB,CAAC,CAAC;QACH,IAAI,CAAC,IAAI,GAAG,eAAe,CAAC;QAC5B,IAAI,CAAC,YAAY,GAAG,YAAY,CAAC;QACjC,IAAI,CAAC,iBAAiB,GAAG,iBAAiB,CAAC;QAC3C,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;IACvB,CAAC;CACF;AAED;;;;GAIG;AACH,MAAM,UAAU,SAAS,CACvB,GAAY,EACZ,cAAmC,mBAAmB,CAAC,aAAa;IAEpE,IAAI,GAAG,YAAY,eAAe,EAAE,CAAC;QACnC,OAAO,GAAG,CAAC;IACb,CAAC;IAED,MAAM,OAAO,GAAG,GAAG,YAAY,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC;IACjE,MAAM,KAAK,GAAG,GAAG,YAAY,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,SAAS,CAAC;IAErD,OAAO,IAAI,eAAe,CAAC,OAAO,EAAE,WAAW,EAAE,EAAE,KAAK,EAAE,CAAC,CAAC;AAC9D,CAAC"}
|
package/dist/index.d.ts
CHANGED
|
@@ -12,9 +12,10 @@ export { SACClient, buildTokenTransferHostFunction } from "./sac.js";
|
|
|
12
12
|
export { Client as PasskeyClient } from "passkey-kit-sdk";
|
|
13
13
|
export { PasskeySigner, Ed25519Signer, PolicySigner, type Signer, type SignerContext, type PreparedSignature, type WebAuthnAuthenticator, } from "./signers.js";
|
|
14
14
|
export { SignerKey, SignerStore, type SignerKeyTag, type SignerLimits, type StoredPasskey, type StorageAdapter, type CreateWalletResult, type ConnectWalletResult, type TransactionResult, type TransactionSuccess, type TransactionFailure, type SubmissionMethod, } from "./types.js";
|
|
15
|
-
export {
|
|
15
|
+
export type { PolicySignerTxOptions } from "./kit/wallet-ops.js";
|
|
16
|
+
export { PasskeyKitError, PasskeyKitErrorCode, ConfigurationError, WalletNotConnectedError, WalletOwnershipError, WalletAmbiguousError, WebAuthnError, SigningError, SignerNotFoundError, SimulationError, SubmissionError, ValidationError, IndexerError, RelayerError, ContractError, wrapError, } from "./errors.js";
|
|
16
17
|
export { CONTRACT_ERROR_REGISTRY, contractErrorFromCode, decodeContractError, type ContractErrorFamily, type ContractErrorInfo, } from "./contract-errors.js";
|
|
17
|
-
export { MercuryIndexer, mercuryPasskeyIndexerUrl, MERCURY_PASSKEY_INDEXER_URLS, lookupWithRetry, type MercuryIndexerConfig, type SignerIndexer, type WalletSigner, type IndexerHealth, type SignerStatus, type SignerStorageClass, type FindWalletsHardeningDeps, } from "./indexer/index.js";
|
|
18
|
+
export { MercuryIndexer, mercuryPasskeyIndexerUrl, MERCURY_PASSKEY_INDEXER_URLS, lookupWithRetry, type MercuryIndexerConfig, type SignerIndexer, type WalletSigner, type WalletCandidate, type IncompleteWalletCandidate, type WalletCandidateLookup, type IndexerHealth, type SignerStatus, type SignerStorageClass, type FindWalletsHardeningDeps, } from "./indexer/index.js";
|
|
18
19
|
export { PasskeyEventEmitter, type PasskeyEvent, type PasskeyEventMap, type EventListener, } from "./events.js";
|
|
19
20
|
export { deriveContractAddress, extractPublicKeyFromAttestation, compactSignature, generateChallenge, isOnP256Curve, } from "./utils.js";
|
|
20
21
|
export { validateAddress, validateAmount, validateExpiration, validateSecp256r1PublicKey, } from "./validation.js";
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAKH,OAAO,EACL,UAAU,EACV,KAAK,gBAAgB,EACrB,KAAK,aAAa,EAClB,KAAK,cAAc,GACpB,MAAM,UAAU,CAAC;AAClB,OAAO,EAAE,SAAS,EAAE,8BAA8B,EAAE,MAAM,UAAU,CAAC;AAGrE,OAAO,EAAE,MAAM,IAAI,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAG1D,OAAO,EACL,aAAa,EACb,aAAa,EACb,YAAY,EACZ,KAAK,MAAM,EACX,KAAK,aAAa,EAClB,KAAK,iBAAiB,EACtB,KAAK,qBAAqB,GAC3B,MAAM,cAAc,CAAC;AAGtB,OAAO,EACL,SAAS,EACT,WAAW,EACX,KAAK,YAAY,EACjB,KAAK,YAAY,EACjB,KAAK,aAAa,EAClB,KAAK,cAAc,EACnB,KAAK,kBAAkB,EACvB,KAAK,mBAAmB,EACxB,KAAK,iBAAiB,EACtB,KAAK,kBAAkB,EACvB,KAAK,kBAAkB,EACvB,KAAK,gBAAgB,GACtB,MAAM,YAAY,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAKH,OAAO,EACL,UAAU,EACV,KAAK,gBAAgB,EACrB,KAAK,aAAa,EAClB,KAAK,cAAc,GACpB,MAAM,UAAU,CAAC;AAClB,OAAO,EAAE,SAAS,EAAE,8BAA8B,EAAE,MAAM,UAAU,CAAC;AAGrE,OAAO,EAAE,MAAM,IAAI,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAG1D,OAAO,EACL,aAAa,EACb,aAAa,EACb,YAAY,EACZ,KAAK,MAAM,EACX,KAAK,aAAa,EAClB,KAAK,iBAAiB,EACtB,KAAK,qBAAqB,GAC3B,MAAM,cAAc,CAAC;AAGtB,OAAO,EACL,SAAS,EACT,WAAW,EACX,KAAK,YAAY,EACjB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AAE,MAAM,cAAc,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -19,7 +19,7 @@ export { PasskeySigner, Ed25519Signer, PolicySigner, } from "./signers.js";
|
|
|
19
19
|
// Signer-key helpers, storage + result types
|
|
20
20
|
export { SignerKey, SignerStore, } from "./types.js";
|
|
21
21
|
// Typed errors
|
|
22
|
-
export { PasskeyKitError, PasskeyKitErrorCode, ConfigurationError, WalletNotConnectedError, WalletOwnershipError, WebAuthnError, SigningError, SignerNotFoundError, SimulationError, SubmissionError, ValidationError, IndexerError, RelayerError, ContractError, wrapError, } from "./errors.js";
|
|
22
|
+
export { PasskeyKitError, PasskeyKitErrorCode, ConfigurationError, WalletNotConnectedError, WalletOwnershipError, WalletAmbiguousError, WebAuthnError, SigningError, SignerNotFoundError, SimulationError, SubmissionError, ValidationError, IndexerError, RelayerError, ContractError, wrapError, } from "./errors.js";
|
|
23
23
|
// Contract-error decoding
|
|
24
24
|
export { CONTRACT_ERROR_REGISTRY, contractErrorFromCode, decodeContractError, } from "./contract-errors.js";
|
|
25
25
|
// Indexer abstraction. Mercury's hosted passkey-indexer is keyless, so the
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,8EAA8E;AAC9E,8EAA8E;AAC9E,SAAS;AACT,OAAO,EACL,UAAU,GAIX,MAAM,UAAU,CAAC;AAClB,OAAO,EAAE,SAAS,EAAE,8BAA8B,EAAE,MAAM,UAAU,CAAC;AAErE,4BAA4B;AAC5B,OAAO,EAAE,MAAM,IAAI,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAE1D,qBAAqB;AACrB,OAAO,EACL,aAAa,EACb,aAAa,EACb,YAAY,GAKb,MAAM,cAAc,CAAC;AAEtB,6CAA6C;AAC7C,OAAO,EACL,SAAS,EACT,WAAW,GAWZ,MAAM,YAAY,CAAC;
|
|
1
|
+
{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B;AACnB,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC"}
|
package/dist/indexer/index.d.ts
CHANGED
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
*
|
|
10
10
|
* @packageDocumentation
|
|
11
11
|
*/
|
|
12
|
-
export type { SignerIndexer, WalletSigner, IndexerHealth, SignerStatus, SignerStorageClass, FindWalletsHardeningDeps, } from "./types.js";
|
|
12
|
+
export type { SignerIndexer, WalletSigner, WalletCandidate, IncompleteWalletCandidate, WalletCandidateLookup, IndexerHealth, SignerStatus, SignerStorageClass, FindWalletsHardeningDeps, } from "./types.js";
|
|
13
13
|
export { MercuryIndexer, mercuryPasskeyIndexerUrl, type MercuryIndexerConfig, } from "./mercury.js";
|
|
14
14
|
export { MERCURY_PASSKEY_INDEXER_URLS } from "../constants.js";
|
|
15
15
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/indexer/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,YAAY,EACV,aAAa,EACb,YAAY,EACZ,aAAa,EACb,YAAY,EACZ,kBAAkB,EAClB,wBAAwB,GACzB,MAAM,YAAY,CAAC;AAEpB,OAAO,EACL,cAAc,EACd,wBAAwB,EACxB,KAAK,oBAAoB,GAC1B,MAAM,cAAc,CAAC;AACtB,OAAO,EAAE,4BAA4B,EAAE,MAAM,iBAAiB,CAAC;AAE/D;;;;GAIG;AACH,wBAAsB,eAAe,CAAC,CAAC,EACrC,EAAE,EAAE,MAAM,OAAO,CAAC,CAAC,EAAE,CAAC,EACtB,OAAO,CAAC,EAAE;IACR,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,SAAS,CAAC,EAAE,CAAC,MAAM,EAAE,CAAC,EAAE,KAAK,OAAO,CAAC;CACtC,GACA,OAAO,CAAC,CAAC,EAAE,CAAC,CAcd"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/indexer/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,YAAY,EACV,aAAa,EACb,YAAY,EACZ,eAAe,EACf,yBAAyB,EACzB,qBAAqB,EACrB,aAAa,EACb,YAAY,EACZ,kBAAkB,EAClB,wBAAwB,GACzB,MAAM,YAAY,CAAC;AAEpB,OAAO,EACL,cAAc,EACd,wBAAwB,EACxB,KAAK,oBAAoB,GAC1B,MAAM,cAAc,CAAC;AACtB,OAAO,EAAE,4BAA4B,EAAE,MAAM,iBAAiB,CAAC;AAE/D;;;;GAIG;AACH,wBAAsB,eAAe,CAAC,CAAC,EACrC,EAAE,EAAE,MAAM,OAAO,CAAC,CAAC,EAAE,CAAC,EACtB,OAAO,CAAC,EAAE;IACR,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,SAAS,CAAC,EAAE,CAAC,MAAM,EAAE,CAAC,EAAE,KAAK,OAAO,CAAC;CACtC,GACA,OAAO,CAAC,CAAC,EAAE,CAAC,CAcd"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/indexer/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/indexer/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAcH,OAAO,EACL,cAAc,EACd,wBAAwB,GAEzB,MAAM,cAAc,CAAC;AACtB,OAAO,EAAE,4BAA4B,EAAE,MAAM,iBAAiB,CAAC;AAE/D;;;;GAIG;AACH,MAAM,CAAC,KAAK,UAAU,eAAe,CACnC,EAAsB,EACtB,OAIC;IAED,MAAM,QAAQ,GAAG,OAAO,EAAE,QAAQ,IAAI,EAAE,CAAC;IACzC,MAAM,OAAO,GAAG,OAAO,EAAE,OAAO,IAAI,IAAI,CAAC;IACzC,MAAM,SAAS,GAAG,OAAO,EAAE,SAAS,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC;IAE9D,IAAI,IAAI,GAAQ,EAAE,CAAC;IACnB,KAAK,IAAI,OAAO,GAAG,CAAC,EAAE,OAAO,GAAG,QAAQ,EAAE,OAAO,IAAI,CAAC,EAAE,CAAC;QACvD,IAAI,GAAG,MAAM,EAAE,EAAE,CAAC;QAClB,IAAI,SAAS,CAAC,IAAI,CAAC;YAAE,OAAO,IAAI,CAAC;QACjC,IAAI,OAAO,GAAG,QAAQ,GAAG,CAAC,EAAE,CAAC;YAC3B,MAAM,IAAI,OAAO,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC,UAAU,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC,CAAC;QAC/D,CAAC;IACH,CAAC;IACD,OAAO,IAAI,CAAC;AACd,CAAC"}
|
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
*/
|
|
23
23
|
import { type Server } from "@stellar/stellar-sdk/rpc";
|
|
24
24
|
import { SignerKey } from "../types.js";
|
|
25
|
-
import type { FindWalletsHardeningDeps, IndexerHealth, SignerIndexer, WalletSigner } from "./types.js";
|
|
25
|
+
import type { FindWalletsHardeningDeps, IndexerHealth, SignerIndexer, WalletCandidateLookup, WalletSigner } from "./types.js";
|
|
26
26
|
/**
|
|
27
27
|
* Resolve the hosted passkey-indexer base URL for a network. Mercury indexes
|
|
28
28
|
* both testnet and mainnet; any other network returns `undefined` (no hosted
|
|
@@ -42,8 +42,7 @@ export interface MercuryIndexerConfig {
|
|
|
42
42
|
*/
|
|
43
43
|
rpc?: Server;
|
|
44
44
|
/**
|
|
45
|
-
*
|
|
46
|
-
* from the keyId, skipping an RPC round-trip.
|
|
45
|
+
* @deprecated Derivation no longer confirms wallet ownership. Configure `rpc`.
|
|
47
46
|
*/
|
|
48
47
|
hardening?: FindWalletsHardeningDeps;
|
|
49
48
|
/** Injectable fetch (tests / non-global runtimes). Defaults to global `fetch`. */
|
|
@@ -76,17 +75,14 @@ export declare class MercuryIndexer implements SignerIndexer {
|
|
|
76
75
|
* genuine not-found).
|
|
77
76
|
*/
|
|
78
77
|
private entryExists;
|
|
79
|
-
findWallets(key: SignerKey): Promise<
|
|
78
|
+
findWallets(key: SignerKey): Promise<WalletCandidateLookup>;
|
|
80
79
|
/**
|
|
81
|
-
*
|
|
82
|
-
*
|
|
83
|
-
*
|
|
80
|
+
* Keep a candidate only when it still holds the signer entry on-chain.
|
|
81
|
+
* Live-signer presence is not birth verification; birth fields pass through
|
|
82
|
+
* unchanged for the kit to check against the creating transaction.
|
|
84
83
|
*
|
|
85
|
-
* Fail-CLOSED: when candidates exist
|
|
86
|
-
*
|
|
87
|
-
* Secp256r1 keys) — this throws instead of returning unconfirmed rows. An
|
|
88
|
-
* unverifiable answer must never be handed to a caller that will route
|
|
89
|
-
* deposits or identity to it.
|
|
84
|
+
* Fail-CLOSED: when candidates exist without `rpc`, this throws instead of
|
|
85
|
+
* returning unconfirmed rows.
|
|
90
86
|
*/
|
|
91
87
|
private confirmCandidates;
|
|
92
88
|
health(): Promise<IndexerHealth>;
|