passkey-kit 0.10.24 → 0.11.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/.cursorrules ADDED
@@ -0,0 +1,170 @@
1
+ # Passkey Kit – Cursor Workspace Rules (v2025-06-12)
2
+
3
+ These rules provide canonical guidance to AI assistants and contributors interacting with this repository. They supersede any previous `.cursorrules` file.
4
+ Their intent is to stay *future-proof*: they encode principles that should hold even as tooling evolves. When in doubt, prefer the spirit of the rule over its letter.
5
+
6
+ ---
7
+
8
+ ## 1 Repository Topology (overview)
9
+
10
+ • `src/` – Core **passkey-kit** TypeScript library (published to npm).
11
+ • `packages/passkey-kit-sdk/` – Stand-alone TS SDK used by the main package.
12
+ • `packages/sac-sdk/` – SAC (smart-account contract) SDK.
13
+ • `contracts/` – Soroban smart contracts written in Rust.
14
+ • `zephyr/` – Deterministic Zephyr program exposing HTTP endpoints.
15
+ • `demo/` – Svelte demo showcasing end-to-end usage.
16
+
17
+ This repo is a **pnpm workspace**; always use `pnpm` (≥ 8) for Node tasks.
18
+
19
+ ---
20
+
21
+ ## 2 Language & Toolchain Baselines
22
+
23
+ | Domain | Minimum Supported | Notes |
24
+ |--------|-------------------|-------|
25
+ | Node.js | 20 LTS | ESM by default, top-level `await` allowed |
26
+ | TypeScript | 5.4 | `strict`, `moduleResolution: node16` |
27
+ | Rust (contracts) | 1.79 | Follow the current stable Soroban toolchain |
28
+ | Soroban SDK | 22.x | Keep minor versions in lock-step across contracts |
29
+ | Bun (tests) | 1.x | Used for ultrafast unit tests (`bun test`) |
30
+ | pnpm | 8.x | Managed via **Corepack**; lockfile v5 enforced |
31
+
32
+ Upgrade the baselines on every **major** release of the kit.
33
+
34
+ ---
35
+
36
+ ## 3 General Coding Principles
37
+
38
+ 1. **Functional & immutable** – avoid shared mutable state; favour pure functions.
39
+ 2. **Fail loudly, fail early** – surface rich, actionable error messages.
40
+ 3. **Minimal dependencies** – prefer platform APIs or internal utils; justify every new dep.
41
+ 4. **Typed first** – all public surfaces must be *fully* typed; export `.d.ts` files.
42
+ 5. **Async-first** – use `async/await`; never chain raw `Promise` callbacks.
43
+ 6. **Workspace integrity** – after changes run `pnpm run build` at the repo root to guarantee type-safety across packages.
44
+
45
+ ---
46
+
47
+ ## 4 JavaScript / TypeScript Specifics
48
+
49
+ • Import Stellar via `@stellar/stellar-sdk/minimal` unless full bundle is strictly required.
50
+ • Base-64 URL encode/decode with `base64url`; avoid `Buffer.from(x, 'base64')`.
51
+ • Prefer **named exports**; avoid `export default` in new code.
52
+ • File extensions: `.ts` / `.tsx` (React) / `.svelte` (demo) only.
53
+ • Module import grouping: external → workspace → relative → style imports; blank line between groups.
54
+ • Leverage modern ECMAScript (`??`, `?.`, `Array#at`, `Intl`) – but avoid stage-3 proposals unless polyfilled.
55
+ • Publish ESM-first: every package must declare `"type": "module"` and expose an `exports` map with `import`, `require` (fallback), and `types` conditions.
56
+ • Mark packages `"sideEffects": false` when safe to enable aggressive tree-shaking.
57
+ • Ship first-party `.d.ts` bundles (either via `tsc --emitDeclarationOnly` or `api-extractor`). Do **not** rely on DefinitelyTyped for kit packages.
58
+ • Top-level entrypoints should be 100 % statically analyzable – avoid dynamic `require()` or `eval()`.
59
+
60
+ ---
61
+
62
+ ## 5 Rust / Soroban Contract Rules
63
+
64
+ 1. Contracts live in `contracts/*/src`.
65
+ 2. `#![no_std]` mandatory; rely on `soroban-sdk` helpers instead of `std`.
66
+ 3. Expose a top-level `Contract` struct marked with `#[contract]`.
67
+ 4. Model errors with `#[contracterror]`; surface via `panic_with_error!`.
68
+ 5. Tests belong under `contracts/*/src/tests` using `soroban_sdk::testutils`.
69
+ 6. New contracts must be registered in `contracts/Cargo.toml` workspace members.
70
+
71
+ ---
72
+
73
+ ## 6 Zephyr Program Rules
74
+
75
+ • Zephyr code resides in `zephyr/src` and **must remain deterministic** – avoid non-deterministic data sources (e.g. system time, randomness) unless explicitly mocked.
76
+ • Each externally exposed endpoint must be documented *above* its `#[no_mangle]` function.
77
+
78
+ ---
79
+
80
+ ## 7 Svelte / Demo Rules
81
+
82
+ • Demo code lives in `demo/src`.
83
+ • Follow existing component conventions: PascalCase filenames, `<script lang="ts">`, `<style scoped>`.
84
+ • Prefer lightweight stores over global state; mock network calls when possible.
85
+
86
+ ---
87
+
88
+ ## 8 Testing & CI
89
+
90
+ 1. Run `bun test` to execute JavaScript unit tests (`bun_tests/`).
91
+ 2. Rust contract tests live alongside contracts.
92
+ 3. All new public functions (TS) or contract interfaces (Rust) require unit tests.
93
+ 4. Use **Conventional Commits** in PR titles to automate semantic-release notes.
94
+ 5. CI (GitHub Actions) must run: `pnpm lint`, `pnpm run build`, `bun test`, and contract tests.
95
+
96
+ ---
97
+
98
+ ## 9 Versioning & Release
99
+
100
+ • Independent package versions, shared workspace lockfile.
101
+ • Semantic Versioning: breaking changes → major bump.
102
+ • Root `prepublishOnly` script builds **all** packages; never publish from a dirty tree.
103
+ • Tags follow `pkg-name@x.y.z` format.
104
+ • Adopt **Changesets** for automated changelog generation and version bumping across the workspace; release pipeline should consume the generated changelog artefacts.
105
+
106
+ ---
107
+
108
+ ## 10 Style, Linting & Formatting
109
+
110
+ • Indent: 2 spaces, trailing commas, single quotes.
111
+ • Code formatted with **Prettier** (`pnpm format`).
112
+ • Lint with **ESLint** + `@typescript-eslint`. Lint errors are CI blockers.
113
+ • Prefer `const`; use `let` only when reassignment is needed.
114
+
115
+ ---
116
+
117
+ ## 11 AI Usage Etiquette
118
+
119
+ • These rules are the *source of truth* for AI coding assistants.
120
+ • Assistants must **never** write secrets, API keys, or personal data into the codebase.
121
+ • When creating code, ensure it can run *immediately* and is fully typed.
122
+ • Before adding dependencies, verify they fit the "minimal deps" philosophy and update `package.json` accordingly.
123
+
124
+ ---
125
+
126
+ ## 12 Context Shortcuts
127
+
128
+ Use these aliases when referencing files in chat:
129
+
130
+ ```text
131
+ @kit.ts → src/kit.ts
132
+ @smart-wallet → contracts/smart-wallet/src/lib.rs
133
+ @passkey-sdk → packages/passkey-kit-sdk/src
134
+ ```
135
+
136
+ ---
137
+
138
+ ## 13 Performance & Build Optimisation
139
+
140
+ 1. Prefer **incremental builds** (e.g. `pnpm --filter`, `--recursive --workspace-concurrency`) to accelerate CI and local development.
141
+ 2. Enable intelligent cache layers (GitHub Actions cache / bun test cache) to avoid redundant compilation of unchanged packages.
142
+ 3. Leverage Bun's ultra-fast test runner; keep test suites granular to maximise parallelism.
143
+ 4. When introducing heavy tasks (e.g. Soroban WASM compilation), gate them behind conditional steps so that they execute only when relevant code changes.
144
+ 5. Monitor build & test times; aim for sub-5-minute end-to-end CI under normal load.
145
+
146
+ ---
147
+
148
+ ## 14 npm Package Publishing Principles
149
+
150
+ • Source of truth is **ESM**; if CJS support is required, publish it under `./cjs` and reference with the `require` condition – no transpiled dual-bundles in `dist/`.
151
+ • Generate a **size-snapshot** report (e.g. with `size-limit`) and block PRs that increase size over budget.
152
+ • `package.json` must include: `license`, `funding`, `homepage`, `repository`, `bugs`, and a short but descriptive `description`.
153
+ • Use the `files` whitelist (or `.npmignore`) to keep the published tarball lean (< 30 KiB ideally).
154
+ • Release via GitHub Actions with `npm publish --provenance` to attach Sigstore metadata; use **two-factor auth** on the npm org.
155
+ • After publish, run `npm view @scope/pkg dist.unpackedSize` in CI and fail if unexpectedly large.
156
+
157
+ ---
158
+
159
+ ## 15 Security & Supply Chain
160
+
161
+ 1. Enforce automated dependency scanning (GitHub Dependabot + `pnpm audit --recursive`).
162
+ 2. Run **OpenSSF Scorecard** weekly; block merges if score < 7.
163
+ 3. Sign commits & tags (Conventional Commits + `git config commit.gpgsign`); CI verifies signatures.
164
+ 4. Harden CI with minimal permissions (`GITHUB_TOKEN` → read-only except on `release/*` jobs).
165
+ 5. Adopt `.npmrc` with `ignore-scripts=true` for CI and `prefer-offline=true` for faster deterministic installs.
166
+ 6. All public APIs must have runtime assertions (zod or custom) to prevent type coercion exploits.
167
+
168
+ ---
169
+
170
+ End of rules.
package/README.md CHANGED
@@ -3,7 +3,7 @@
3
3
  > [!WARNING]
4
4
  > Code in this repo is demo material only. It has not been audited. Do not use to hold, protect, or secure anything.
5
5
 
6
- Passkey kit is a basic TypeScript SDK for creating and managing Stellar smart wallets. It's intended to be used in tandem with [Launchtube](https://github.com/kalepail/launchtube) for submitting passkey signed transactions onchain however this is not a requirement. This is both a client and a server side library. `PasskeyKit` on the client and `PasskeyServer` on the server.
6
+ Passkey kit is a basic TypeScript SDK for creating and managing Stellar smart wallets. It's intended to be used in tandem with [Launchtube](https://github.com/stellar/launchtube) for submitting passkey signed transactions onchain however this is not a requirement. This is both a client and a server side library. `PasskeyKit` on the client and `PasskeyServer` on the server.
7
7
 
8
8
  Demo site: [passkey-kit-demo.pages.dev](https://passkey-kit-demo.pages.dev/)
9
9
 
package/cheatsheet.txt CHANGED
@@ -5,8 +5,8 @@ npm publish --workspaces
5
5
  pnpm publish --no-git-checks
6
6
 
7
7
  # Stellar commands
8
- stellar contract bindings rust --wasm target/wasm32-unknown-unknown/release/smart_wallet.wasm
9
- stellar contract deploy --wasm target/wasm32-unknown-unknown/release/sample_policy.wasm --network testnet --source default
8
+ stellar contract bindings rust --wasm target/wasm32v1-none/release/smart_wallet.wasm
9
+ stellar contract deploy --wasm target/wasm32v1-none/release/sample_policy.wasm --network testnet --source default
10
10
 
11
11
  # Mercury commands
12
12
  # https://test.mercurydata.app/
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "passkey-kit",
3
- "version": "0.10.24",
3
+ "version": "0.11.1",
4
4
  "description": "A helper library for creating and using smart wallet accounts on the Stellar blockchain.",
5
5
  "author": "Tyler van der Hoeven",
6
6
  "license": "MIT",
@@ -8,17 +8,16 @@
8
8
  "main": "src/index.ts",
9
9
  "types": "types/index.d.ts",
10
10
  "dependencies": {
11
- "@simplewebauthn/browser": "^13.1.0",
12
- "@stellar/stellar-sdk": "^13.3.0",
11
+ "@simplewebauthn/browser": "^13.1.2",
12
+ "@stellar/stellar-sdk": "^14.1.1",
13
13
  "base64url": "^3.0.1",
14
14
  "buffer": "^6.0.3",
15
- "passkey-kit-sdk": "0.6.8",
16
- "sac-sdk": "0.3.8"
15
+ "sac-sdk": "0.4.1",
16
+ "passkey-kit-sdk": "0.7.1"
17
17
  },
18
18
  "devDependencies": {
19
- "@simplewebauthn/types": "^12.0.0",
20
- "@types/node": "^22.15.3",
21
- "typescript": "^5.8.3"
19
+ "@types/node": "^24.3.0",
20
+ "typescript": "^5.9.2"
22
21
  },
23
22
  "workspaces": [
24
23
  "packages/*"
@@ -6,9 +6,9 @@ This library was automatically generated by Soroban CLI using a command similar
6
6
 
7
7
  ```bash
8
8
  soroban contract bindings ts \
9
- --rpc-url https://soroban-testnet.stellar.org \
10
- --network-passphrase "Test SDF Network ; September 2015" \
11
- --contract-id CDSGG7BSWYWQMTY5KTZVDTC34ZESMZ75ZGSTTVHS4NIKCF4PM3GDJ4G3 \
9
+ --rpc-url INSERT_RPC_URL_HERE \
10
+ --network-passphrase "INSERT_NETWORK_PASSPHRASE_HERE" \
11
+ --contract-id INSERT_CONTRACT_ID_HERE \
12
12
  --output-dir ./path/to/passkey-kit-sdk
13
13
  ```
14
14
 
@@ -30,7 +30,7 @@ However, we've actually encountered [frustration](https://github.com/stellar/sor
30
30
 
31
31
  ```json
32
32
  "scripts": {
33
- "postinstall": "soroban contract bindings ts --rpc-url https://soroban-testnet.stellar.org --network-passphrase \"Test SDF Network ; September 2015\" --id CDSGG7BSWYWQMTY5KTZVDTC34ZESMZ75ZGSTTVHS4NIKCF4PM3GDJ4G3 --name passkey-kit-sdk"
33
+ "postinstall": "soroban contract bindings ts --rpc-url INSERT_RPC_URL_HERE --network-passphrase \"INSERT_NETWORK_PASSPHRASE_HERE\" --id INSERT_CONTRACT_ID_HERE --name passkey-kit-sdk"
34
34
  }
35
35
  ```
36
36
 
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "0.6.8",
2
+ "version": "0.7.1",
3
3
  "name": "passkey-kit-sdk",
4
4
  "type": "module",
5
5
  "main": "src/index.ts",
@@ -9,10 +9,10 @@
9
9
  "build": "tsc"
10
10
  },
11
11
  "dependencies": {
12
- "@stellar/stellar-sdk": "^13.3.0",
12
+ "@stellar/stellar-sdk": "^14.1.1",
13
13
  "buffer": "^6.0.3"
14
14
  },
15
15
  "devDependencies": {
16
- "typescript": "^5.8.3"
16
+ "typescript": "^5.9.2"
17
17
  }
18
18
  }
@@ -127,7 +127,7 @@ export class Client extends ContractClient {
127
127
  static async deploy<T = Client>(
128
128
  /** Constructor/Initialization Args for the contract's `__constructor` method */
129
129
  { signer }: { signer: Signer },
130
- /** Options for initalizing a Client as well as for calling a method, with extras specific to deploying. */
130
+ /** Options for initializing a Client as well as for calling a method, with extras specific to deploying. */
131
131
  options: MethodOptions &
132
132
  Omit<ContractClientOptions, "contractId"> & {
133
133
  /** The hash of the Wasm blob, which must already be installed on-chain. */
@@ -170,7 +170,7 @@ export declare class Client extends ContractClient {
170
170
  { signer }: {
171
171
  signer: Signer;
172
172
  },
173
- /** Options for initalizing a Client as well as for calling a method, with extras specific to deploying. */
173
+ /** Options for initializing a Client as well as for calling a method, with extras specific to deploying. */
174
174
  options: MethodOptions & Omit<ContractClientOptions, "contractId"> & {
175
175
  /** The hash of the Wasm blob, which must already be installed on-chain. */
176
176
  wasmHash: Buffer | string;
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "0.3.8",
2
+ "version": "0.4.1",
3
3
  "name": "sac-sdk",
4
4
  "type": "module",
5
5
  "main": "src/index.ts",
@@ -9,10 +9,10 @@
9
9
  "build": "tsc"
10
10
  },
11
11
  "dependencies": {
12
- "@stellar/stellar-sdk": "^13.3.0",
12
+ "@stellar/stellar-sdk": "^14.1.1",
13
13
  "buffer": "^6.0.3"
14
14
  },
15
15
  "devDependencies": {
16
- "typescript": "^5.8.3"
16
+ "typescript": "^5.9.2"
17
17
  }
18
18
  }
@@ -522,7 +522,7 @@ export interface Client {
522
522
  }
523
523
  export class Client extends ContractClient {
524
524
  static async deploy<T = Client>(
525
- /** Options for initalizing a Client as well as for calling a method, with extras specific to deploying. */
525
+ /** Options for initializing a Client as well as for calling a method, with extras specific to deploying. */
526
526
  options: MethodOptions &
527
527
  Omit<ContractClientOptions, "contractId"> & {
528
528
  /** The hash of the Wasm blob, which must already be installed on-chain. */
@@ -553,7 +553,15 @@ export class Client extends ContractClient {
553
553
  "AAAAAAAAAVBTZXRzIHdoZXRoZXIgdGhlIGFjY291bnQgaXMgYXV0aG9yaXplZCB0byB1c2UgaXRzIGJhbGFuY2UuIElmCmBhdXRob3JpemVkYCBpcyB0cnVlLCBgaWRgIHNob3VsZCBiZSBhYmxlIHRvIHVzZSBpdHMgYmFsYW5jZS4KCiMgQXJndW1lbnRzCgoqIGBpZGAgLSBUaGUgYWRkcmVzcyBiZWluZyAoZGUtKWF1dGhvcml6ZWQuCiogYGF1dGhvcml6ZWAgLSBXaGV0aGVyIG9yIG5vdCBgaWRgIGNhbiB1c2UgaXRzIGJhbGFuY2UuCgojIEV2ZW50cwoKRW1pdHMgYW4gZXZlbnQgd2l0aCB0b3BpY3MgYFsic2V0X2F1dGhvcml6ZWQiLCBpZDogQWRkcmVzc10sIGRhdGEgPQpbYXV0aG9yaXplOiBib29sXWAAAAAOc2V0X2F1dGhvcml6ZWQAAAAAAAIAAAAAAAAAAmlkAAAAAAATAAAAAAAAAAlhdXRob3JpemUAAAAAAAABAAAAAA==",
554
554
  "AAAAAAAAAFtSZXR1cm5zIHRoZSBzeW1ib2wgZm9yIHRoaXMgdG9rZW4uCgojIFBhbmljcwoKSWYgdGhlIGNvbnRyYWN0IGhhcyBub3QgeWV0IGJlZW4gaW5pdGlhbGl6ZWQuAAAAAAZzeW1ib2wAAAAAAAAAAAABAAAAEA==",
555
555
  "AAAAAAAAAWJUcmFuc2ZlciBgYW1vdW50YCBmcm9tIGBmcm9tYCB0byBgdG9gLgoKIyBBcmd1bWVudHMKCiogYGZyb21gIC0gVGhlIGFkZHJlc3MgaG9sZGluZyB0aGUgY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558
+ "AAAABQAAAAAAAAAAAAAACFRyYW5zZmVyAAAAAQAAAAh0cmFuc2ZlcgAAAAMAAAAAAAAABGZyb20AAAATAAAAAQAAAAAAAAACdG8AAAAAABMAAAABAAAAAAAAAAZhbW91bnQAAAAAAAsAAAAAAAAAAA==",
559
+ "AAAABQAAAAAAAAAAAAAADVRyYW5zZmVyTXV4ZWQAAAAAAAABAAAACHRyYW5zZmVyAAAABAAAAAAAAAAEZnJvbQAAABMAAAABAAAAAAAAAAJ0bwAAAAAAEwAAAAEAAAAAAAAAC3RvX211eGVkX2lkAAAAAAQAAAAAAAAAAAAAAAZhbW91bnQAAAAAAAsAAAAAAAAAAg==",
560
+ "AAAABQAAAAAAAAAAAAAABEJ1cm4AAAABAAAABGJ1cm4AAAACAAAAAAAAAARmcm9tAAAAEwAAAAEAAAAAAAAABmFtb3VudAAAAAAACwAAAAAAAAAA",
561
+ "AAAABQAAAAAAAAAAAAAABE1pbnQAAAABAAAABG1pbnQAAAACAAAAAAAAAAJ0bwAAAAAAEwAAAAEAAAAAAAAABmFtb3VudAAAAAAACwAAAAAAAAAA",
562
+ "AAAABQAAAAAAAAAAAAAACENsYXdiYWNrAAAAAQAAAAhjbGF3YmFjawAAAAIAAAAAAAAABGZyb20AAAATAAAAAQAAAAAAAAAGYW1vdW50AAAAAAALAAAAAAAAAAA=",
563
+ "AAAABQAAAAAAAAAAAAAACFNldEFkbWluAAAAAQAAAAlzZXRfYWRtaW4AAAAAAAABAAAAAAAAAAluZXdfYWRtaW4AAAAAAAATAAAAAAAAAAA=",
564
+ "AAAABQAAAAAAAAAAAAAADVNldEF1dGhvcml6ZWQAAAAAAAABAAAADnNldF9hdXRob3JpemVkAAAAAAACAAAAAAAAAAJpZAAAAAAAEwAAAAEAAAAAAAAACWF1dGhvcml6ZQAAAAAAAAEAAAAAAAAAAA=="]),
557
565
  options
558
566
  )
559
567
  }
@@ -500,7 +500,7 @@ export interface Client {
500
500
  export declare class Client extends ContractClient {
501
501
  readonly options: ContractClientOptions;
502
502
  static deploy<T = Client>(
503
- /** Options for initalizing a Client as well as for calling a method, with extras specific to deploying. */
503
+ /** Options for initializing a Client as well as for calling a method, with extras specific to deploying. */
504
504
  options: MethodOptions & Omit<ContractClientOptions, "contractId"> & {
505
505
  /** The hash of the Wasm blob, which must already be installed on-chain. */
506
506
  wasmHash: Buffer | string;
package/src/kit.ts CHANGED
@@ -1,7 +1,6 @@
1
1
  import { Client as PasskeyClient, type Signature, type SignerKey as SDKSignerKey, type SignerLimits as SDKSignerLimits } from 'passkey-kit-sdk'
2
2
  import { StrKey, hash, xdr, Keypair, Address, TransactionBuilder, Operation } from '@stellar/stellar-sdk/minimal'
3
- import type { AuthenticationResponseJSON, AuthenticatorAttestationResponseJSON, AuthenticatorSelectionCriteria } from "@simplewebauthn/types"
4
- import { startRegistration, startAuthentication } from "@simplewebauthn/browser"
3
+ import { startRegistration, startAuthentication, type AuthenticationResponseJSON, type AuthenticatorAttestationResponseJSON, type AuthenticatorSelectionCriteria } from "@simplewebauthn/browser"
5
4
  import { Buffer } from 'buffer'
6
5
  import base64url from 'base64url'
7
6
  import type { SignerKey, SignerLimits, SignerStore } from './types'
@@ -425,7 +424,7 @@ export class PasskeyKit extends PasskeyBase {
425
424
  ) {
426
425
  if (!(txn instanceof AssembledTransaction)) {
427
426
  try {
428
- txn = AssembledTransaction.fromXDR(this.wallet!.options, typeof txn === 'string' ? txn : txn.toXDR(), this.wallet!.spec)
427
+ txn = AssembledTransaction.fromXDR(this.wallet!.options, typeof txn === 'string' ? txn : txn.toXDR(), this.wallet!.spec);
429
428
  } catch {
430
429
  if (!(txn instanceof AssembledTransaction)) {
431
430
  const built = TransactionBuilder.fromXDR(typeof txn === 'string' ? txn : txn.toXDR(), this.networkPassphrase);
package/types/kit.d.ts CHANGED
@@ -1,7 +1,6 @@
1
1
  import { Client as PasskeyClient } from 'passkey-kit-sdk';
2
2
  import { xdr, Keypair } from '@stellar/stellar-sdk/minimal';
3
- import type { AuthenticationResponseJSON, AuthenticatorSelectionCriteria } from "@simplewebauthn/types";
4
- import { startRegistration, startAuthentication } from "@simplewebauthn/browser";
3
+ import { startRegistration, startAuthentication, type AuthenticationResponseJSON, type AuthenticatorSelectionCriteria } from "@simplewebauthn/browser";
5
4
  import { Buffer } from 'buffer';
6
5
  import type { SignerKey, SignerLimits, SignerStore } from './types';
7
6
  import { PasskeyBase } from './base';