@seams/wallet-server 0.13.1 → 0.15.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (55) hide show
  1. package/artifact-manifest.json +21 -21
  2. package/cloudflare-router-ab/build/deriver-a/build-stamp.json +1 -1
  3. package/cloudflare-router-ab/build/deriver-a/index_bg.wasm +0 -0
  4. package/cloudflare-router-ab/build/deriver-b/build-stamp.json +1 -1
  5. package/cloudflare-router-ab/build/deriver-b/index_bg.wasm +0 -0
  6. package/cloudflare-router-ab/build/router/build-stamp.json +1 -1
  7. package/cloudflare-router-ab/build/router/index.js +1 -1
  8. package/cloudflare-router-ab/build/router/index_bg.wasm +0 -0
  9. package/cloudflare-router-ab/build/signing-worker/build-stamp.json +1 -1
  10. package/cloudflare-router-ab/build/signing-worker/index_bg.wasm +0 -0
  11. package/cloudflare-router-ab/build/tenant-root-control-plane/build-stamp.json +1 -1
  12. package/dist/esm/cloud-host.js +2 -2
  13. package/dist/esm/hosted-wallet-gateway.js +1 -1
  14. package/dist/esm/router/cloudflare/d1/auth/d1RouterApiAuthService.js +2 -2
  15. package/dist/esm/router/cloudflare/d1/deviceLinking/d1LinkedDeviceOwnerAuthorizationProvider.js +1 -1
  16. package/dist/esm/router/cloudflare/d1/emailOtp/d1EmailOtpRecords.js +1 -1
  17. package/dist/esm/router/cloudflare/d1/emailOtp/d1EmailOtpRecoveryService.js +1 -1
  18. package/dist/esm/router/cloudflare/d1/emailOtp/d1GoogleEmailOtpSessionResolver.js +1 -1
  19. package/dist/esm/router/cloudflare/d1/passkeyCustody/d1WalletCustodyCommitStore.js +17 -45
  20. package/dist/esm/router/cloudflare/d1/registration/d1RegistrationCeremonyRecords.js +5 -5
  21. package/dist/esm/router/cloudflare/d1/registration/d1RegistrationCeremonyStore.js +1 -1
  22. package/dist/esm/router/cloudflare/d1/registration/d1RegistrationSetupSupport.js +1 -17
  23. package/dist/esm/router/cloudflare/d1/registration/d1WalletRegistrationService.js +31 -34
  24. package/dist/esm/router/cloudflare/d1/registration/d1WalletRegistrationSetupExecution.js +3 -2
  25. package/dist/esm/router/cloudflare/d1/registration/registrationCompletionWrite.js +20 -0
  26. package/dist/esm/router/cloudflare/d1/wallet/d1WalletAddSignerFinalizeRecord.js +1 -1
  27. package/dist/esm/router/cloudflare/d1/wallet/d1WalletAddSignerService.js +2 -2
  28. package/dist/esm/router/cloudflare/d1/wallet/d1WalletAuthMethodService.js +3 -3
  29. package/dist/esm/router/cloudflare/d1/webauthn/d1WebAuthnAuthService.js +1 -1
  30. package/dist/esm/router/cloudflare/d1/webauthn/d1WebAuthnRecords.js +1 -1
  31. package/dist/esm/router/cloudflare.js +2562 -2505
  32. package/dist/esm/router/domains/ed25519Yao/capabilityLifecycle/routerAbEd25519YaoProductRegistration.js +3 -2
  33. package/dist/esm/router/domains/ed25519Yao/capabilityLifecycle/routerAbEd25519YaoProductRegistrationRequestScopedRuntime.js +44 -8
  34. package/dist/esm/router/domains/ed25519Yao/registration/routerAbEd25519YaoRegistrationRequestScopedCloudflare.js +15 -1
  35. package/dist/esm/router/domains/passkeyCustody/registrationCustodyOutcome.js +8 -8
  36. package/dist/esm/router/domains/passkeyCustody/walletCustodyRegistrationCommit.js +1 -19
  37. package/dist/esm/router/domains/walletRegistration/walletRegistrationRoutes.js +7 -7
  38. package/dist/esm/router/framework/registrationSetupDispatch.js +1 -1
  39. package/dist/esm/router/framework/registrationTiming.js +21 -0
  40. package/dist/esm/router/transport/fetch/routes/deviceLinkingOwnerAuthorization.js +1 -1
  41. package/dist/esm/router/transport/fetch/routes/passkeyCustody.js +2 -2
  42. package/dist/types/shared-ts/src/device-linking/contracts.d.ts +0 -9
  43. package/dist/types/shared-ts/src/utils/routerAbEcdsaDerivation.d.ts +0 -1
  44. package/dist/types/wallet-server/src/router/cloudflare/d1/passkeyCustody/d1WalletCustodyCommitStore.d.ts +5 -42
  45. package/dist/types/wallet-server/src/router/cloudflare/d1/registration/d1RegistrationSetupSupport.d.ts +0 -9
  46. package/dist/types/wallet-server/src/router/cloudflare/d1/registration/d1WalletRegistrationService.d.ts +1 -2
  47. package/dist/types/wallet-server/src/router/cloudflare/d1/registration/registrationCompletionWrite.d.ts +5 -0
  48. package/dist/types/wallet-server/src/router/cloudflare/d1/registration/walletRegistrationSessionCommitReceipt.d.ts +5 -0
  49. package/dist/types/wallet-server/src/router/domains/ed25519Yao/capabilityLifecycle/routerAbEd25519YaoProductRegistration.d.ts +6 -4
  50. package/dist/types/wallet-server/src/router/domains/ed25519Yao/registration/routerAbEd25519YaoRegistrationRequestScopedCloudflare.d.ts +2 -0
  51. package/dist/types/wallet-server/src/router/domains/passkeyCustody/registrationCustodyOutcome.d.ts +16 -24
  52. package/dist/types/wallet-server/src/router/domains/passkeyCustody/walletCustodyRegistrationAdmission.d.ts +1 -3
  53. package/dist/types/wallet-server/src/router/domains/passkeyCustody/walletCustodyRegistrationCommit.d.ts +7 -17
  54. package/dist/types/wallet-server/src/router/framework/registrationTiming.d.ts +10 -0
  55. package/package.json +1 -1
@@ -1,19 +1,9 @@
1
1
  import { type WalletCustodyCeremonyCommitPayload } from '../../../../../shared-ts/src/passkey-custody';
2
2
  export type { WalletCustodyCeremonyCommitPayload };
3
- import type { CloudflareD1WalletCustodyCommitStore, WalletCustodyRegistrationCommitResult } from '../../cloudflare/d1/passkeyCustody/d1WalletCustodyCommitStore';
4
- export type WalletCustodyRegistrationCommitOutcome = ({
5
- readonly kind: 'committed';
6
- } & Omit<Extract<WalletCustodyRegistrationCommitResult, {
7
- kind: 'committed';
8
- }>, 'kind'>) | {
3
+ import type { CloudflareD1WalletCustodyCommitStore, WalletCustodyRegistrationReservation } from '../../cloudflare/d1/passkeyCustody/d1WalletCustodyCommitStore';
4
+ export type WalletCustodyRegistrationCommitOutcome = {
9
5
  readonly kind: 'already_exists';
10
- }
11
- /**
12
- * Another ceremony established this wallet's custody first. The route should
13
- * tell the client to discard its run's seed and re-enter as a join of the
14
- * existing envelope — the key set it was provisioning is still unrecorded.
15
- */
16
- | {
6
+ } | {
17
7
  readonly kind: 'custody_already_established';
18
8
  } | {
19
9
  readonly kind: 'rejected';
@@ -22,7 +12,9 @@ export type WalletCustodyRegistrationCommitOutcome = ({
22
12
  /** The write that a reservation left for after the registration's wallet commit. */
23
13
  export type WalletCustodyRegistrationReserved = {
24
14
  readonly kind: 'reserved';
25
- readonly commit: () => Promise<WalletCustodyRegistrationCommitOutcome>;
15
+ readonly statements: Extract<WalletCustodyRegistrationReservation, {
16
+ kind: 'reserved';
17
+ }>['statements'];
26
18
  };
27
19
  /**
28
20
  * Builds the records and claims their recovery-code routes.
@@ -37,7 +29,5 @@ export declare function reserveWalletCustodyRegistration(input: {
37
29
  readonly factor: unknown;
38
30
  readonly nowMs: number;
39
31
  readonly store: CloudflareD1WalletCustodyCommitStore;
40
- }): Promise<WalletCustodyRegistrationReserved | Extract<WalletCustodyRegistrationCommitOutcome, {
41
- kind: 'rejected';
42
- }>>;
32
+ }): Promise<WalletCustodyRegistrationReserved | WalletCustodyRegistrationCommitOutcome>;
43
33
  //# sourceMappingURL=walletCustodyRegistrationCommit.d.ts.map
@@ -0,0 +1,10 @@
1
+ export declare function recordRegistrationServerTiming(sink: Array<readonly [string, number]>, name: string, startedAtMs: number): void;
2
+ /** The `Server-Timing` header of a registration route's recorded waits. */
3
+ export declare function registrationServerTimingHeaders(serverTiming: readonly (readonly [string, number])[]): Record<string, string> | undefined;
4
+ export declare function recordRegistrationPromiseTiming<T>(args: {
5
+ readonly sink: Array<readonly [string, number]>;
6
+ readonly name: string;
7
+ readonly startedAtMs: number;
8
+ readonly promise: T | Promise<T>;
9
+ }): Promise<T>;
10
+ //# sourceMappingURL=registrationTiming.d.ts.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@seams/wallet-server",
3
- "version": "0.13.1",
3
+ "version": "0.15.0",
4
4
  "type": "module",
5
5
  "description": "Seams server TypeScript SDK for NEAR and EVM-family wallets",
6
6
  "main": "./dist/esm/index.js",