@seams/wallet 0.9.4 → 0.10.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.
Files changed (51) hide show
  1. package/README.md +3 -3
  2. package/dist/.build-inputs.sha256 +1 -1
  3. package/dist/esm/core/rpcClients/relayer/walletRegistration.js +1 -1
  4. package/dist/esm/sdk/{host-h55onlkx.js → host-CCwkhJHK.js} +1 -1
  5. package/dist/esm/sdk/nearEd25519YaoMaterialActivation-DMGPKrn8.js +1 -0
  6. package/dist/esm/sdk/registration-Cx_f58rb.js +1 -0
  7. package/dist/{public/sdk/runtime-auth-Ch4qvKL2.js → esm/sdk/runtime-auth-Cjvf3UFB.js} +1 -1
  8. package/dist/esm/sdk/{runtime-device-link-DtNpEjq5.js → runtime-device-link-BCKuKNp1.js} +1 -1
  9. package/dist/esm/sdk/{runtime-ecdsa-tempo-Bntp_Zgx.js → runtime-ecdsa-tempo-Bpmv6fe0.js} +1 -1
  10. package/dist/esm/sdk/{runtime-email-otp-DEFt-Y-_.js → runtime-email-otp-Bp16EG2j.js} +1 -1
  11. package/dist/esm/sdk/{runtime-export-DE_umiS1.js → runtime-export-fONYqIZg.js} +1 -1
  12. package/dist/esm/sdk/{runtime-near-uXqcLEz8.js → runtime-near-s4rtAbA2.js} +1 -1
  13. package/dist/esm/sdk/{runtime-preferences-C49p0VLC.js → runtime-preferences-1v5EHalc.js} +1 -1
  14. package/dist/esm/sdk/{runtime-recovery-D7wklehP.js → runtime-recovery-mppuqUaS.js} +1 -1
  15. package/dist/esm/sdk/{shared-D6RYxvYR.js → shared-Big0VQEK.js} +1 -1
  16. package/dist/esm/sdk/{signNear-DR50cpes.js → signNear-D0tlQXb9.js} +1 -1
  17. package/dist/esm/sdk/wallet-iframe-host-ecdsa.js +1 -1
  18. package/dist/esm/sdk/wallet-iframe-host-full.js +1 -1
  19. package/dist/esm/sdk/wallet-iframe-host-near.js +1 -1
  20. package/dist/esm/sdk/wallet-iframe-host-runtime.js +1 -1
  21. package/dist/public/headers.manifest.json +1 -1
  22. package/dist/public/sdk/{host-h55onlkx.js → host-CCwkhJHK.js} +1 -1
  23. package/dist/public/sdk/nearEd25519YaoMaterialActivation-DMGPKrn8.js +1 -0
  24. package/dist/public/sdk/registration-Cx_f58rb.js +1 -0
  25. package/dist/{esm/sdk/runtime-auth-Ch4qvKL2.js → public/sdk/runtime-auth-Cjvf3UFB.js} +1 -1
  26. package/dist/public/sdk/{runtime-device-link-DtNpEjq5.js → runtime-device-link-BCKuKNp1.js} +1 -1
  27. package/dist/public/sdk/{runtime-ecdsa-tempo-Bntp_Zgx.js → runtime-ecdsa-tempo-Bpmv6fe0.js} +1 -1
  28. package/dist/public/sdk/{runtime-email-otp-DEFt-Y-_.js → runtime-email-otp-Bp16EG2j.js} +1 -1
  29. package/dist/public/sdk/{runtime-export-DE_umiS1.js → runtime-export-fONYqIZg.js} +1 -1
  30. package/dist/public/sdk/{runtime-near-uXqcLEz8.js → runtime-near-s4rtAbA2.js} +1 -1
  31. package/dist/public/sdk/{runtime-preferences-C49p0VLC.js → runtime-preferences-1v5EHalc.js} +1 -1
  32. package/dist/public/sdk/{runtime-recovery-D7wklehP.js → runtime-recovery-mppuqUaS.js} +1 -1
  33. package/dist/public/sdk/{shared-D6RYxvYR.js → shared-Big0VQEK.js} +1 -1
  34. package/dist/public/sdk/{signNear-DR50cpes.js → signNear-D0tlQXb9.js} +1 -1
  35. package/dist/public/sdk/wallet-iframe-host-ecdsa.js +1 -1
  36. package/dist/public/sdk/wallet-iframe-host-full.js +1 -1
  37. package/dist/public/sdk/wallet-iframe-host-near.js +1 -1
  38. package/dist/public/sdk/wallet-iframe-host-runtime.js +1 -1
  39. package/dist/public/wallet-assets.manifest.json +28 -28
  40. package/dist/public/wallet-service/index.html +4 -4
  41. package/dist/types/shared-ts/src/utils/walletManagementProtocol.d.ts +1 -1
  42. package/dist/types/wallet/src/SeamsWeb/signingSurface/BrowserSigningSurface.d.ts +2 -16
  43. package/dist/types/wallet/src/SeamsWeb/signingSurface/ports.d.ts +24 -15
  44. package/dist/types/wallet/src/core/rpcClients/relayer/walletRegistration.d.ts +44 -6
  45. package/dist/types/wallet/src/core/signingEngine/walletCustody/ceremonyDriver.d.ts +14 -0
  46. package/dist/types/wallet/src/core/signingEngine/walletCustody/registrationCeremony.d.ts +27 -5
  47. package/package.json +1 -1
  48. package/dist/esm/sdk/nearEd25519YaoMaterialActivation-CvDs4RtV.js +0 -1
  49. package/dist/esm/sdk/registration-Cfg9rWhA.js +0 -1
  50. package/dist/public/sdk/nearEd25519YaoMaterialActivation-CvDs4RtV.js +0 -1
  51. package/dist/public/sdk/registration-Cfg9rWhA.js +0 -1
@@ -1 +1 @@
1
- import"./primitives-CqrjmIAH.js";import"./sessionPolicy-CBTZQe1n.js";import"./signingSessionSeal-DX41aXUL.js";import{t as e}from"./host-h55onlkx.js";import"./activeWalletSession-WdZkhtBB.js";import"./capabilityKinds-N8xo_IEh.js";import"./errors-DIWY1KR9.js";e({supportedRuntimeRouteKinds:new Set([`auth`,`ecdsa`,`email_otp`,`export`,`recovery`,`preferences`])});
1
+ import"./primitives-CqrjmIAH.js";import"./sessionPolicy-CBTZQe1n.js";import"./signingSessionSeal-DX41aXUL.js";import{t as e}from"./host-CCwkhJHK.js";import"./activeWalletSession-WdZkhtBB.js";import"./capabilityKinds-N8xo_IEh.js";import"./errors-DIWY1KR9.js";e({supportedRuntimeRouteKinds:new Set([`auth`,`ecdsa`,`email_otp`,`export`,`recovery`,`preferences`])});
@@ -1 +1 @@
1
- import"./primitives-CqrjmIAH.js";import"./sessionPolicy-CBTZQe1n.js";import"./signingSessionSeal-DX41aXUL.js";import{t as e}from"./host-h55onlkx.js";import"./activeWalletSession-WdZkhtBB.js";import"./capabilityKinds-N8xo_IEh.js";import"./errors-DIWY1KR9.js";e();
1
+ import"./primitives-CqrjmIAH.js";import"./sessionPolicy-CBTZQe1n.js";import"./signingSessionSeal-DX41aXUL.js";import{t as e}from"./host-CCwkhJHK.js";import"./activeWalletSession-WdZkhtBB.js";import"./capabilityKinds-N8xo_IEh.js";import"./errors-DIWY1KR9.js";e();
@@ -1 +1 @@
1
- import"./primitives-CqrjmIAH.js";import"./sessionPolicy-CBTZQe1n.js";import"./signingSessionSeal-DX41aXUL.js";import{t as e}from"./host-h55onlkx.js";import"./activeWalletSession-WdZkhtBB.js";import"./capabilityKinds-N8xo_IEh.js";import"./errors-DIWY1KR9.js";e({supportedRuntimeRouteKinds:new Set([`auth`,`near`,`export`,`device_link`,`recovery`,`preferences`])});
1
+ import"./primitives-CqrjmIAH.js";import"./sessionPolicy-CBTZQe1n.js";import"./signingSessionSeal-DX41aXUL.js";import{t as e}from"./host-CCwkhJHK.js";import"./activeWalletSession-WdZkhtBB.js";import"./capabilityKinds-N8xo_IEh.js";import"./errors-DIWY1KR9.js";e({supportedRuntimeRouteKinds:new Set([`auth`,`near`,`export`,`device_link`,`recovery`,`preferences`])});
@@ -1 +1 @@
1
- import"./primitives-CqrjmIAH.js";import"./sessionPolicy-CBTZQe1n.js";import"./signingSessionSeal-DX41aXUL.js";import{t as e}from"./host-h55onlkx.js";import"./activeWalletSession-WdZkhtBB.js";import"./capabilityKinds-N8xo_IEh.js";import"./errors-DIWY1KR9.js";export{e as initWalletIFrame};
1
+ import"./primitives-CqrjmIAH.js";import"./sessionPolicy-CBTZQe1n.js";import"./signingSessionSeal-DX41aXUL.js";import{t as e}from"./host-CCwkhJHK.js";import"./activeWalletSession-WdZkhtBB.js";import"./capabilityKinds-N8xo_IEh.js";import"./errors-DIWY1KR9.js";export{e as initWalletIFrame};
@@ -1,14 +1,14 @@
1
1
  {
2
2
  "schemaVersion": 1,
3
3
  "packageName": "@seams/wallet",
4
- "packageVersion": "0.9.4",
4
+ "packageVersion": "0.10.1",
5
5
  "assetRoot": "dist/public",
6
6
  "sdkBasePath": "/sdk",
7
7
  "walletServicePath": "/wallet-service",
8
8
  "headersManifest": "headers.manifest.json",
9
9
  "versionSkewContract": {
10
10
  "kind": "wallet_iframe_protocol_handshake",
11
- "packageVersion": "0.9.4",
11
+ "packageVersion": "0.10.1",
12
12
  "protocolVersion": "15.0.0",
13
13
  "readyPayloadField": "protocolVersion",
14
14
  "failureMode": "typed_error",
@@ -970,8 +970,8 @@
970
970
  ]
971
971
  },
972
972
  {
973
- "route": "/sdk/host-h55onlkx.js",
974
- "sourceFile": "sdk/host-h55onlkx.js",
973
+ "route": "/sdk/host-CCwkhJHK.js",
974
+ "sourceFile": "sdk/host-CCwkhJHK.js",
975
975
  "owner": "wallet_sdk_asset",
976
976
  "routeClass": "javascript",
977
977
  "contentType": "text/javascript; charset=utf-8",
@@ -1210,8 +1210,8 @@
1210
1210
  ]
1211
1211
  },
1212
1212
  {
1213
- "route": "/sdk/nearEd25519YaoMaterialActivation-CvDs4RtV.js",
1214
- "sourceFile": "sdk/nearEd25519YaoMaterialActivation-CvDs4RtV.js",
1213
+ "route": "/sdk/nearEd25519YaoMaterialActivation-DMGPKrn8.js",
1214
+ "sourceFile": "sdk/nearEd25519YaoMaterialActivation-DMGPKrn8.js",
1215
1215
  "owner": "wallet_sdk_asset",
1216
1216
  "routeClass": "javascript",
1217
1217
  "contentType": "text/javascript; charset=utf-8",
@@ -1618,8 +1618,8 @@
1618
1618
  ]
1619
1619
  },
1620
1620
  {
1621
- "route": "/sdk/registration-Cfg9rWhA.js",
1622
- "sourceFile": "sdk/registration-Cfg9rWhA.js",
1621
+ "route": "/sdk/registration-Cx_f58rb.js",
1622
+ "sourceFile": "sdk/registration-Cx_f58rb.js",
1623
1623
  "owner": "wallet_sdk_asset",
1624
1624
  "routeClass": "javascript",
1625
1625
  "contentType": "text/javascript; charset=utf-8",
@@ -1834,8 +1834,8 @@
1834
1834
  ]
1835
1835
  },
1836
1836
  {
1837
- "route": "/sdk/runtime-auth-Ch4qvKL2.js",
1838
- "sourceFile": "sdk/runtime-auth-Ch4qvKL2.js",
1837
+ "route": "/sdk/runtime-auth-Cjvf3UFB.js",
1838
+ "sourceFile": "sdk/runtime-auth-Cjvf3UFB.js",
1839
1839
  "owner": "wallet_sdk_asset",
1840
1840
  "routeClass": "javascript",
1841
1841
  "contentType": "text/javascript; charset=utf-8",
@@ -1858,8 +1858,8 @@
1858
1858
  ]
1859
1859
  },
1860
1860
  {
1861
- "route": "/sdk/runtime-device-link-DtNpEjq5.js",
1862
- "sourceFile": "sdk/runtime-device-link-DtNpEjq5.js",
1861
+ "route": "/sdk/runtime-device-link-BCKuKNp1.js",
1862
+ "sourceFile": "sdk/runtime-device-link-BCKuKNp1.js",
1863
1863
  "owner": "wallet_sdk_asset",
1864
1864
  "routeClass": "javascript",
1865
1865
  "contentType": "text/javascript; charset=utf-8",
@@ -1882,8 +1882,8 @@
1882
1882
  ]
1883
1883
  },
1884
1884
  {
1885
- "route": "/sdk/runtime-ecdsa-tempo-Bntp_Zgx.js",
1886
- "sourceFile": "sdk/runtime-ecdsa-tempo-Bntp_Zgx.js",
1885
+ "route": "/sdk/runtime-ecdsa-tempo-Bpmv6fe0.js",
1886
+ "sourceFile": "sdk/runtime-ecdsa-tempo-Bpmv6fe0.js",
1887
1887
  "owner": "wallet_sdk_asset",
1888
1888
  "routeClass": "javascript",
1889
1889
  "contentType": "text/javascript; charset=utf-8",
@@ -1906,8 +1906,8 @@
1906
1906
  ]
1907
1907
  },
1908
1908
  {
1909
- "route": "/sdk/runtime-email-otp-DEFt-Y-_.js",
1910
- "sourceFile": "sdk/runtime-email-otp-DEFt-Y-_.js",
1909
+ "route": "/sdk/runtime-email-otp-Bp16EG2j.js",
1910
+ "sourceFile": "sdk/runtime-email-otp-Bp16EG2j.js",
1911
1911
  "owner": "wallet_sdk_asset",
1912
1912
  "routeClass": "javascript",
1913
1913
  "contentType": "text/javascript; charset=utf-8",
@@ -1930,8 +1930,8 @@
1930
1930
  ]
1931
1931
  },
1932
1932
  {
1933
- "route": "/sdk/runtime-export-DE_umiS1.js",
1934
- "sourceFile": "sdk/runtime-export-DE_umiS1.js",
1933
+ "route": "/sdk/runtime-export-fONYqIZg.js",
1934
+ "sourceFile": "sdk/runtime-export-fONYqIZg.js",
1935
1935
  "owner": "wallet_sdk_asset",
1936
1936
  "routeClass": "javascript",
1937
1937
  "contentType": "text/javascript; charset=utf-8",
@@ -1954,8 +1954,8 @@
1954
1954
  ]
1955
1955
  },
1956
1956
  {
1957
- "route": "/sdk/runtime-near-uXqcLEz8.js",
1958
- "sourceFile": "sdk/runtime-near-uXqcLEz8.js",
1957
+ "route": "/sdk/runtime-near-s4rtAbA2.js",
1958
+ "sourceFile": "sdk/runtime-near-s4rtAbA2.js",
1959
1959
  "owner": "wallet_sdk_asset",
1960
1960
  "routeClass": "javascript",
1961
1961
  "contentType": "text/javascript; charset=utf-8",
@@ -1978,8 +1978,8 @@
1978
1978
  ]
1979
1979
  },
1980
1980
  {
1981
- "route": "/sdk/runtime-preferences-C49p0VLC.js",
1982
- "sourceFile": "sdk/runtime-preferences-C49p0VLC.js",
1981
+ "route": "/sdk/runtime-preferences-1v5EHalc.js",
1982
+ "sourceFile": "sdk/runtime-preferences-1v5EHalc.js",
1983
1983
  "owner": "wallet_sdk_asset",
1984
1984
  "routeClass": "javascript",
1985
1985
  "contentType": "text/javascript; charset=utf-8",
@@ -2026,8 +2026,8 @@
2026
2026
  ]
2027
2027
  },
2028
2028
  {
2029
- "route": "/sdk/runtime-recovery-D7wklehP.js",
2030
- "sourceFile": "sdk/runtime-recovery-D7wklehP.js",
2029
+ "route": "/sdk/runtime-recovery-mppuqUaS.js",
2030
+ "sourceFile": "sdk/runtime-recovery-mppuqUaS.js",
2031
2031
  "owner": "wallet_sdk_asset",
2032
2032
  "routeClass": "javascript",
2033
2033
  "contentType": "text/javascript; charset=utf-8",
@@ -2146,8 +2146,8 @@
2146
2146
  ]
2147
2147
  },
2148
2148
  {
2149
- "route": "/sdk/shared-D6RYxvYR.js",
2150
- "sourceFile": "sdk/shared-D6RYxvYR.js",
2149
+ "route": "/sdk/shared-Big0VQEK.js",
2150
+ "sourceFile": "sdk/shared-Big0VQEK.js",
2151
2151
  "owner": "wallet_sdk_asset",
2152
2152
  "routeClass": "javascript",
2153
2153
  "contentType": "text/javascript; charset=utf-8",
@@ -2386,8 +2386,8 @@
2386
2386
  ]
2387
2387
  },
2388
2388
  {
2389
- "route": "/sdk/signNear-DR50cpes.js",
2390
- "sourceFile": "sdk/signNear-DR50cpes.js",
2389
+ "route": "/sdk/signNear-D0tlQXb9.js",
2390
+ "sourceFile": "sdk/signNear-D0tlQXb9.js",
2391
2391
  "owner": "wallet_sdk_asset",
2392
2392
  "routeClass": "javascript",
2393
2393
  "contentType": "text/javascript; charset=utf-8",
@@ -5,14 +5,14 @@
5
5
  <meta name="viewport" content="width=device-width, initial-scale=1" />
6
6
  <title>Web3Authn Wallet Service</title>
7
7
  <!-- Surface styles are external so strict CSP can keep style-src 'self' -->
8
- <link rel="stylesheet" href="/sdk/wallet-ui.css?v=0.9.4" />
8
+ <link rel="stylesheet" href="/sdk/wallet-ui.css?v=0.10.1" />
9
9
  <!-- Minimal shims some ESM bundles expect (externalized to enable strict CSP) -->
10
- <script src="/sdk/wallet-shims.js?v=0.9.4"></script>
10
+ <script src="/sdk/wallet-shims.js?v=0.10.1"></script>
11
11
  <!-- Hint the browser to fetch the host script earlier -->
12
- <link rel="modulepreload" href="/sdk/wallet-iframe-host-runtime.js?v=0.9.4" crossorigin>
12
+ <link rel="modulepreload" href="/sdk/wallet-iframe-host-runtime.js?v=0.10.1" crossorigin>
13
13
  </head>
14
14
  <body>
15
15
  <!-- sdkBasePath points to the SDK root (e.g. '/sdk'). Load the host directly. -->
16
- <script type="module" src="/sdk/wallet-iframe-host-runtime.js?v=0.9.4"></script>
16
+ <script type="module" src="/sdk/wallet-iframe-host-runtime.js?v=0.10.1"></script>
17
17
  </body>
18
18
  </html>
@@ -1,3 +1,3 @@
1
1
  export declare const WALLET_MANAGEMENT_PROTOCOL_HEADER = "X-Seams-Wallet-Protocol";
2
- export declare const WALLET_MANAGEMENT_PROTOCOL_VERSION = "3";
2
+ export declare const WALLET_MANAGEMENT_PROTOCOL_VERSION = "4";
3
3
  //# sourceMappingURL=walletManagementProtocol.d.ts.map
@@ -14,7 +14,7 @@ import { establishEvmFamilyCustodyV1, joinEvmFamilyCustodyV1 } from '../../core/
14
14
  import { type WalletSessionEd25519RecoveryBasisV1 } from '../../core/signingEngine/walletCustody/walletRecoveryEd25519';
15
15
  import { recoverWalletCustodyManifestV1 } from '../../core/signingEngine/walletCustody/walletRecoveryManifest';
16
16
  import { type LoadedWalletCustodyEd25519MaterialV1, type WalletCustodyEd25519MaterialBindingV1, type WalletCustodySealedEd25519MaterialV1 } from '../../core/signingEngine/walletCustody/ed25519SeedMaterial';
17
- import type { EstablishedWalletCustodyEvmFamilyKeySetV1, EstablishedWalletCustodyNearEd25519KeySetV1, JoinedWalletCustodyNearEd25519KeySetV1, JoinedWalletCustodyEvmFamilyKeySetV1, RejoinedWalletCustodyEvmFamilyKeySetV1 } from './ports';
17
+ import type { EstablishWalletCustodyNearEd25519KeySetArgs, EstablishedWalletCustodyEvmFamilyKeySetV1, EstablishedWalletCustodyNearEd25519KeySetV1, JoinedWalletCustodyNearEd25519KeySetV1, JoinedWalletCustodyEvmFamilyKeySetV1, RejoinedWalletCustodyEvmFamilyKeySetV1 } from './ports';
18
18
  import { type RouterAbEd25519YaoRegistrationAdmissionRequestV1 } from '../../../../shared-ts/src/utils/routerAbEd25519Yao';
19
19
  import type { RouterAbTraceContextV1 } from '../../../../shared-ts/src/utils/routerAbTraceContext';
20
20
  import type { SignerWorkerKind, SignerWorkerOperationRequest, SignerWorkerOperationResult, SignerWorkerOperationType, EmailOtpYaoPrewarmRequest, EmailOtpYaoPrewarmOutcome } from '../../core/signingEngine/workerManager/workerTypes';
@@ -133,21 +133,7 @@ export declare class BrowserSigningSurface {
133
133
  * PRF-derived path used, so the execute request goes to the same endpoint
134
134
  * with the same trace context — only the root behind it changed.
135
135
  */
136
- establishWalletCustodyNearEd25519KeySet(args: {
137
- readonly home: WalletSessionHome;
138
- walletId: string;
139
- factorJson: string;
140
- factorSecret: ArrayBuffer;
141
- nearEd25519SigningKeyId: string;
142
- registrationCeremonyId: string;
143
- admissionRequest: RouterAbEd25519YaoRegistrationAdmissionRequestV1;
144
- admissionReceipt: unknown;
145
- participantIds: readonly [number, number];
146
- routerOrigin: string;
147
- /** The signed setup: the Router authorizes the execute round against it. */
148
- authorization: string;
149
- traceContext?: RouterAbTraceContextV1;
150
- }): Promise<EstablishedWalletCustodyNearEd25519KeySetV1>;
136
+ establishWalletCustodyNearEd25519KeySet(args: EstablishWalletCustodyNearEd25519KeySetArgs): Promise<EstablishedWalletCustodyNearEd25519KeySetV1>;
151
137
  recoverWalletCustodyManifest(args: Omit<Parameters<typeof recoverWalletCustodyManifestV1>[0], 'runStep' | 'workerCtx'>): Promise<Awaited<ReturnType<typeof recoverWalletCustodyManifestV1>>>;
152
138
  createWalletRecoveryReplacementCredential(args: {
153
139
  readonly walletId: WalletId;
@@ -44,6 +44,7 @@ import type { EcdsaBootstrapRequest } from '../../core/signingEngine/session/pas
44
44
  import type { ConnectEd25519SessionArgs } from '../../core/signingEngine/session/passkey/public';
45
45
  import type { HydrateWarmSigningSessionInput } from '../../core/signingEngine/session/passkey/warmSessionHydration';
46
46
  import type { LoginWithEmailOtpWalletCustodyEd25519Args } from '../../core/signingEngine/walletCustody/ed25519Login';
47
+ import type { EstablishNearEd25519CustodyFactor } from '../../core/signingEngine/walletCustody/registrationCeremony';
47
48
  import type { EmailOtpEd25519YaoRecoveryBootstrapV1 } from '../../core/signingEngine/workerManager/workerTypes';
48
49
  import type { RouterAbEd25519YaoActiveClientMetadataV1 } from '../../core/signingEngine/threshold/ed25519/yaoClient';
49
50
  import type { RouterAbEd25519YaoRegistrationAdmissionRequestV1 } from '../../../../shared-ts/src/utils/routerAbEd25519Yao';
@@ -226,21 +227,7 @@ export interface WalletCustodyCeremonySurface {
226
227
  recoveryChallengeId: string;
227
228
  relayUrl: string;
228
229
  }): Promise<RecoveredWalletCustodyManifestV1>;
229
- establishWalletCustodyNearEd25519KeySet(args: {
230
- readonly home: WalletSessionHome;
231
- walletId: string;
232
- factorJson: string;
233
- factorSecret: ArrayBuffer;
234
- nearEd25519SigningKeyId: string;
235
- registrationCeremonyId: string;
236
- admissionRequest: RouterAbEd25519YaoRegistrationAdmissionRequestV1;
237
- admissionReceipt: unknown;
238
- participantIds: readonly [number, number];
239
- routerOrigin: string;
240
- /** The signed setup: the Router authorizes the execute round against it. */
241
- authorization: string;
242
- traceContext?: RouterAbTraceContextV1;
243
- }): Promise<EstablishedWalletCustodyNearEd25519KeySetV1>;
230
+ establishWalletCustodyNearEd25519KeySet(args: EstablishWalletCustodyNearEd25519KeySetArgs): Promise<EstablishedWalletCustodyNearEd25519KeySetV1>;
244
231
  joinWalletCustodyNearEd25519KeySet(args: {
245
232
  readonly routing: WalletSessionHome | {
246
233
  readonly kind: 'discovery';
@@ -609,4 +596,26 @@ export type WalletRecoverySigningSurface = AccountSyncSigningSurface & Ed25519Ya
609
596
  export type WalletRecoveryWebContext = SeamsWebBaseContext<WalletRecoverySigningSurface>;
610
597
  export type DeviceLinkingSigningSurface = LocalLoginStateSurface & LoginUnlockSigningSurface & NearSigningSurface & EmailOtpRegistrationEnrollmentSurface & Pick<SigningSessionSurface, 'hydrateSigningSession'> & RpIdSurface & WebAuthnRegistrationConfirmationSurface & Pick<UserProfileStoreSurface & RegistrationAccountSurface, 'storeUserData' | 'storeAuthenticator'> & Pick<EcdsaRegistrationSurface, 'storeWalletEcdsaSignerRecords'>;
611
598
  export type DeviceLinkingWebContext = SeamsWebBaseContext<DeviceLinkingSigningSurface>;
599
+ export type EstablishWalletCustodyNearEd25519KeySetArgs = {
600
+ readonly home: WalletSessionHome;
601
+ walletId: string;
602
+ /** The factor that seals the custody: at hand, or asked for after the Router round. */
603
+ factor: EstablishNearEd25519CustodyFactor;
604
+ /**
605
+ * Sends the execute request together with the registration proof. It
606
+ * returns the activation result, or `null` when the Gateway admitted the
607
+ * registration and did not complete the execution: the run then sends the
608
+ * same request to the execute route.
609
+ */
610
+ executeWithProof?: (yaoExecuteRequestJson: string) => Promise<string | null>;
611
+ nearEd25519SigningKeyId: string;
612
+ registrationCeremonyId: string;
613
+ admissionRequest: RouterAbEd25519YaoRegistrationAdmissionRequestV1;
614
+ admissionReceipt: unknown;
615
+ participantIds: readonly [number, number];
616
+ routerOrigin: string;
617
+ /** The signed setup: the Router authorizes the execute round against it. */
618
+ authorization: string;
619
+ traceContext?: RouterAbTraceContextV1;
620
+ };
612
621
  //# sourceMappingURL=ports.d.ts.map
@@ -11,7 +11,7 @@ import type { RegistrationEstablishedSessionResultV2 } from '../../../../../shar
11
11
  import { type RootShareEpoch, type ThresholdEd25519SessionId, type WalletAuthMethodId } from '../../../../../shared-ts/src/utils/domainIds';
12
12
  import { type WebAuthnAuthenticatorDeviceInfo } from '../../../../../shared-ts/src/utils/webauthnDeviceInfo';
13
13
  import type { EcdsaKeyFactsInventoryWalletSessionCredential } from '../../types/sdkSentEvents';
14
- import { type RouterAbEd25519YaoActivationAdmissionReceiptV1, type RouterAbEd25519YaoRegistrationAdmissionRequestV1 } from '../../../../../shared-ts/src/utils/routerAbEd25519Yao';
14
+ import { type RouterAbEd25519YaoActivationAdmissionReceiptV1, type RouterAbEd25519YaoActivationExecuteRequestV1, type RouterAbEd25519YaoActivationResultV1, type RouterAbEd25519YaoRegistrationAdmissionRequestV1 } from '../../../../../shared-ts/src/utils/routerAbEd25519Yao';
15
15
  import type { CreateRegistrationIntentRequest, WalletEd25519YaoSignerPublicResult, WalletRegistrationEd25519YaoActivationReference, WalletRegistrationEd25519YaoStart, WalletRegistrationFinalizeAuthMethod } from '../../../../../shared-ts/src/utils/registrationContracts';
16
16
  import { type WalletAuthAuthority } from '../../../../../shared-ts/src/utils/walletAuthAuthority';
17
17
  import { type RouterAbEd25519NormalSigningState } from '../../../../../shared-ts/src/utils/signingSessionSeal';
@@ -132,12 +132,31 @@ type WalletRegistrationSetupSuccessBase = {
132
132
  intent: RegistrationIntentV1;
133
133
  signedSetup: string;
134
134
  };
135
+ /**
136
+ * What setup says about the Yao admission of an Ed25519-only plan.
137
+ *
138
+ * `described` holds the admission that respond will issue. Nothing is
139
+ * admitted yet: the client only prepares its protocol inputs from it while
140
+ * the user answers the passkey prompt, and sends them with the proof.
141
+ * `after_proof` means that respond is the first to state the admission.
142
+ */
143
+ export type WalletRegistrationSetupEd25519Admission = {
144
+ readonly status: 'described';
145
+ readonly admissionRequest: WalletRegistrationEd25519YaoStart['admissionRequest'];
146
+ readonly admissionReceipt: RouterAbEd25519YaoActivationAdmissionReceiptV1<'registration'>;
147
+ } | {
148
+ readonly status: 'after_proof';
149
+ readonly admissionRequest?: never;
150
+ readonly admissionReceipt?: never;
151
+ };
135
152
  export type WalletRegistrationSetupSuccessV2 = (WalletRegistrationSetupSuccessBase & {
136
153
  kind: 'evm_family_ecdsa' | 'near_ed25519_and_evm_family_ecdsa';
137
154
  ecdsa: WalletRegistrationSetupEcdsaPreparePayload;
155
+ ed25519?: never;
138
156
  }) | (WalletRegistrationSetupSuccessBase & {
139
157
  kind: 'near_ed25519';
140
158
  ecdsa?: never;
159
+ ed25519: WalletRegistrationSetupEd25519Admission;
141
160
  });
142
161
  export type WalletRegistrationSetupResponseV2 = WalletRegistrationSetupSuccessV2 | {
143
162
  ok: false;
@@ -578,11 +597,24 @@ export type WalletRegistrationRespondResponseV2 = {
578
597
  registrationCeremonyId: string;
579
598
  kind: 'near_ed25519';
580
599
  ecdsa?: never;
581
- ed25519: {
582
- readonly status: 'admitted';
583
- readonly admissionRequest: WalletRegistrationEd25519YaoStart['admissionRequest'];
584
- readonly admissionReceipt: RouterAbEd25519YaoActivationAdmissionReceiptV1<'registration'>;
585
- };
600
+ ed25519: WalletRegistrationRespondEd25519Admission;
601
+ };
602
+ /**
603
+ * `executed` answers a respond that carried the execute request: the Gateway
604
+ * admitted, ran the execution and returns what the execute route returns.
605
+ * `admitted` answers every other respond and one whose execution did not
606
+ * complete: the client then runs the execution through the execute route.
607
+ */
608
+ export type WalletRegistrationRespondEd25519Admission = {
609
+ readonly status: 'admitted';
610
+ readonly admissionRequest: WalletRegistrationEd25519YaoStart['admissionRequest'];
611
+ readonly admissionReceipt: RouterAbEd25519YaoActivationAdmissionReceiptV1<'registration'>;
612
+ readonly activationResult?: never;
613
+ } | {
614
+ readonly status: 'executed';
615
+ readonly admissionRequest: WalletRegistrationEd25519YaoStart['admissionRequest'];
616
+ readonly admissionReceipt: RouterAbEd25519YaoActivationAdmissionReceiptV1<'registration'>;
617
+ readonly activationResult: RouterAbEd25519YaoActivationResultV1<'registration'>;
586
618
  };
587
619
  export type WalletRegistrationNearAdmissionResponseV2 = {
588
620
  ok: true;
@@ -606,9 +638,15 @@ type WalletRegistrationRespondEcdsaRequest = {
606
638
  type RespondWalletRegistrationArgs = (RespondWalletRegistrationArgsBase & {
607
639
  signerPlanKind: 'near_ed25519';
608
640
  ecdsa?: never;
641
+ /**
642
+ * The execute request that the client prepared from the admission that
643
+ * setup described. The Gateway admits, then runs it in this request.
644
+ */
645
+ ed25519Execution?: RouterAbEd25519YaoActivationExecuteRequestV1<'registration'>;
609
646
  }) | (RespondWalletRegistrationArgsBase & {
610
647
  signerPlanKind: Exclude<WalletRegistrationSignerPlanKind, 'near_ed25519'>;
611
648
  ecdsa: WalletRegistrationRespondEcdsaRequest;
649
+ ed25519Execution?: never;
612
650
  });
613
651
  export declare function respondWalletRegistration(args: RespondWalletRegistrationArgs): Promise<WalletRegistrationRespondResponseV2>;
614
652
  export declare function authorizeWalletRegistrationNearAdmission(args: RespondWalletRegistrationArgsBase): Promise<WalletRegistrationNearAdmissionResponseV2>;
@@ -44,6 +44,20 @@ type WalletCustodyCeremonyCustodyInput = {
44
44
  readonly factorJson: string;
45
45
  readonly factorSecret: ArrayBuffer;
46
46
  readonly recoveryCodesJson: string;
47
+ } | {
48
+ /**
49
+ * Establishes custody for a NEAR key set whose factor exists only after
50
+ * the protocol round: a passkey that the user creates while this run
51
+ * prepares its inputs. The seed is sealed at the end of the run, so the
52
+ * run begins without the factor and asks for it once, after the round.
53
+ */
54
+ readonly origin: 'establish_factor_after_round';
55
+ readonly walletId: string;
56
+ readonly recoveryCodesJson: string;
57
+ readonly factor: () => Promise<{
58
+ readonly factorJson: string;
59
+ readonly factorSecret: ArrayBuffer;
60
+ }>;
47
61
  } | {
48
62
  readonly origin: 'join';
49
63
  /** `JoinCustodyWireV1`: the envelope binding and its sealed seed. */
@@ -11,13 +11,31 @@ import { type WalletCustodyCeremonyStepRunner } from './ceremonyDriver';
11
11
  * that are not shown are codes nobody can ever produce, and a payload committed
12
12
  * without its codes leaves a wallet whose owner holds nothing.
13
13
  */
14
- type EstablishNearEd25519CustodyInput = {
15
- readonly runStep: WalletCustodyCeremonyStepRunner;
16
- readonly walletId: string;
14
+ /**
15
+ * The factor that seals the new custody. A passkey that the user creates
16
+ * while the run prepares its inputs exists only after the Router round, so
17
+ * the run can take it then instead of at its start.
18
+ */
19
+ export type EstablishNearEd25519CustodyFactor = {
17
20
  /** The passkey or Email OTP factor, as the envelope will name it. */
18
21
  readonly factorJson: string;
19
22
  /** `PRF.first` or the Email OTP factor key. Owned by the caller. */
20
23
  readonly factorSecret: ArrayBuffer;
24
+ readonly factorAfterRouterRound?: never;
25
+ } | {
26
+ readonly factorJson?: never;
27
+ readonly factorSecret?: never;
28
+ /** Asked once, after the Router round returned. The caller owns the secret. */
29
+ readonly factorAfterRouterRound: () => Promise<{
30
+ readonly factorJson: string;
31
+ readonly factorSecret: ArrayBuffer;
32
+ }>;
33
+ };
34
+ type EstablishNearEd25519CustodyInput = EstablishNearEd25519CustodyFactor & NearEd25519CustodyRunInput;
35
+ /** What every NEAR custody run takes, whichever factor reaches its seed. */
36
+ type NearEd25519CustodyRunInput = {
37
+ readonly runStep: WalletCustodyCeremonyStepRunner;
38
+ readonly walletId: string;
21
39
  readonly nearEd25519SigningKeyId: string;
22
40
  /** The Yao lifecycle this run registers under, and route 4's own scope. */
23
41
  readonly registrationCeremonyId: string;
@@ -171,7 +189,9 @@ export declare function walletCustodyCommitPayloadForWire(payload: WalletCustody
171
189
  * *establish* a key set — registering a second, different key for a wallet
172
190
  * that already has one, which no later check would undo.
173
191
  */
174
- type RejoinNearEd25519CustodyInput = Omit<EstablishNearEd25519CustodyInput, 'factorJson' | 'registrationCeremonyId'> & {
192
+ type RejoinNearEd25519CustodyInput = Omit<NearEd25519CustodyRunInput, 'registrationCeremonyId'> & {
193
+ /** Opens the stored envelope. Owned by the caller. */
194
+ readonly factorSecret: ArrayBuffer;
175
195
  /** `JoinCustodyWireV1`: the stored envelope binding and its sealed seed. */
176
196
  readonly custodyJson: string;
177
197
  readonly recoveryLifecycleId: string;
@@ -189,7 +209,9 @@ type RejoinedNearEd25519Custody = JoinedNearEd25519CustodyBase & {
189
209
  readonly activationResultJson: string;
190
210
  readonly activationReceipt: RouterAbEd25519YaoRecoveryActivationReceiptV1;
191
211
  };
192
- type JoinNearEd25519CustodyInput = Omit<EstablishNearEd25519CustodyInput, 'walletId' | 'factorJson' | 'continuityRegisteredPublicKeyB64u'> & {
212
+ type JoinNearEd25519CustodyInput = Omit<NearEd25519CustodyRunInput, 'walletId' | 'continuityRegisteredPublicKeyB64u'> & {
213
+ /** Opens the envelope that another key set established. Owned by the caller. */
214
+ readonly factorSecret: ArrayBuffer;
193
215
  readonly preparation: {
194
216
  readonly kind: 'fresh';
195
217
  } | {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@seams/wallet",
3
- "version": "0.9.4",
3
+ "version": "0.10.1",
4
4
  "type": "module",
5
5
  "description": "Seams web and runtime TypeScript SDK for NEAR and EVM-family wallets",
6
6
  "main": "./dist/esm/index.js",