passkey-kit 0.16.2 → 0.16.3
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 +10 -4
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +4 -4
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
|
|
74
|
-
walletWasmHash: "
|
|
73
|
+
// Canonical smart-wallet WASM hash; see docs/deployments-*.md
|
|
74
|
+
walletWasmHash: "502ea4e7bdb3ea99880941f1d35ceb67fb598692c0bb40f842ef9c9f17d58b58",
|
|
75
75
|
});
|
|
76
76
|
```
|
|
77
77
|
|
|
@@ -235,7 +235,7 @@ Each method builds an `AssembledTransaction` (`WalletTx`) that wraps one contrac
|
|
|
235
235
|
| `updateEd25519(publicKey, limits, store, expiration?)` | `update_signer` | Update an Ed25519 signer. |
|
|
236
236
|
| `addPolicy(policy, limits, store, expiration?)` | `add_signer` | Add a policy signer (`policy` = `C…`). Invokes the policy's `install` hook. |
|
|
237
237
|
| `updatePolicy(policy, limits, store, expiration?)` | `update_signer` | Update a policy signer. |
|
|
238
|
-
| `remove(signerKey)` | `remove_signer` | Remove a signer.
|
|
238
|
+
| `remove(signerKey)` | `remove_signer` | Remove a signer. A policy entry must pass its own `policy__` check. |
|
|
239
239
|
| `upgrade(newWasmHash)` | `upgrade` | Replace the wallet's WASM (`Buffer`/`Uint8Array`, 32 bytes). |
|
|
240
240
|
| `getSigner(signerKey)` | `get_signer` | Read a signer entry from the ledger (temporary before persistent). Returns `SignerVal \| null`. |
|
|
241
241
|
|
|
@@ -427,6 +427,11 @@ type SignerLimits = Map<string, SignerKey[] | undefined> | undefined;
|
|
|
427
427
|
- `Map` present but a contract → `undefined` — may authorize any call to that contract, no co-signers.
|
|
428
428
|
- `Map` present, contract → `[keys]` — may authorize calls to that contract **only if every listed key also approves** (required co-signers).
|
|
429
429
|
|
|
430
|
+
A required policy key must remain installed as a signer and unexpired. Removing
|
|
431
|
+
that policy immediately revokes every signer whose limits require it. A
|
|
432
|
+
`Signature::Policy` always invokes `policy__`, including for the policy's own
|
|
433
|
+
`remove_signer` context.
|
|
434
|
+
|
|
430
435
|
```ts
|
|
431
436
|
// This signer may only call C…token, and only alongside a passkey co-signer.
|
|
432
437
|
const limits = new Map([["C…token", [SignerKey.Secp256r1(keyId)]]]);
|
|
@@ -457,6 +462,7 @@ Signer and signature expiration are **UNIX timestamps in seconds** (inclusive: v
|
|
|
457
462
|
- **Deploy front-running remains an accepted residual.** Anyone who learns a `keyId` before deployment could place arbitrary code at the derived address. A signer getter check alone is not proof of ownership, because arbitrary code can answer it however the client expects. Since `0.16.0` `connectWallet` binds accepted code identity (`acceptedWasmHashes`) before reading any signer state, for any address that did not come from trusted local storage. A derivation-resolved address is still not authenticated by that check alone — see the [security analysis](docs/security-deterministic-deployer.md#accepted-residual-address-squatting).
|
|
458
463
|
- **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.
|
|
459
464
|
- **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`.
|
|
465
|
+
- **Existing `binver = 1.0.0` wallets require an authorized upgrade.** Installing the fixed WASM does not change deployed wallet instances. Upgrade each wallet to the canonical `binver = 1.0.1` hash in the current deployment manifest.
|
|
460
466
|
|
|
461
467
|
## Contract interface
|
|
462
468
|
|
|
@@ -491,7 +497,7 @@ contractId = sha256(XDR(HashIdPreimage::EnvelopeTypeContractId {
|
|
|
491
497
|
- The canonical deployer keypair is `Keypair.fromRawEd25519Seed(sha256("kalepail"))`. It salts the deploy and signs the deploy authorization — it never pays fees and never controls the wallet — but its determinism is **load-bearing**: overriding `deploySource` changes every derived address and breaks keyId → wallet discovery.
|
|
492
498
|
- The WASM hash is deliberately **not** in the preimage, so an `upgrade` never moves a wallet's address.
|
|
493
499
|
|
|
494
|
-
This tuple is normative and must never change. See [`docs/deployments-
|
|
500
|
+
This tuple is normative and must never change. See [`docs/deployments-2026-08-19.md`](./docs/deployments-2026-08-19.md) for the canonical WASM hash, upload transactions, and upgrade guidance.
|
|
495
501
|
|
|
496
502
|
## Repository layout & development
|
|
497
503
|
|
package/dist/version.d.ts
CHANGED
package/dist/version.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "passkey-kit",
|
|
3
|
-
"version": "0.16.
|
|
3
|
+
"version": "0.16.3",
|
|
4
4
|
"description": "A helper library for creating and using smart wallet accounts on the Stellar blockchain.",
|
|
5
5
|
"author": "Tyler van der Hoeven <tyler@stellar.org>",
|
|
6
6
|
"license": "MIT",
|
|
@@ -34,8 +34,8 @@
|
|
|
34
34
|
"@stellar/stellar-sdk": ">=16.0.0",
|
|
35
35
|
"base64url": "^3.0.1",
|
|
36
36
|
"buffer": "^6.0.3",
|
|
37
|
-
"
|
|
38
|
-
"
|
|
37
|
+
"passkey-kit-sdk": "0.8.1",
|
|
38
|
+
"sac-sdk": "0.4.4"
|
|
39
39
|
},
|
|
40
40
|
"devDependencies": {
|
|
41
41
|
"@types/node": "^24.6.0",
|
|
@@ -82,6 +82,6 @@
|
|
|
82
82
|
"clean": "rm -rf dist packages/passkey-kit-sdk/dist packages/sac-sdk/dist",
|
|
83
83
|
"build:demo": "cd demo && pnpm --ignore-workspace install && pnpm run build",
|
|
84
84
|
"deploy:demo": "npx wrangler pages deploy",
|
|
85
|
-
"deploy:demo:prod": "npx wrangler pages deploy --branch
|
|
85
|
+
"deploy:demo:prod": "npx wrangler pages deploy --branch main"
|
|
86
86
|
}
|
|
87
87
|
}
|