Skip to content

Commit 3e830be

Browse files
committed
fix: dev sandbox build
1 parent a7e90e8 commit 3e830be

3 files changed

Lines changed: 21 additions & 3 deletions

File tree

infrastructure/dev-sandbox/src/routes/+page.svelte

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
<script lang="ts">
2-
import { provision, syncPublicKeyToEvault, signPayload } from "wallet-sdk";
2+
import {
3+
provision,
4+
syncPublicKeyToEvaultWithOptions,
5+
signPayload,
6+
} from "wallet-sdk";
37
import { env } from "$env/dynamic/public";
48
import { PersistingWebCryptoAdapter } from "$lib/PersistingWebCryptoAdapter";
59
import {
@@ -204,11 +208,12 @@
204208
addLog("info", "Syncing public key…");
205209
try {
206210
const token = await ensurePlatformToken(identity);
207-
await syncPublicKeyToEvault({
211+
await syncPublicKeyToEvaultWithOptions({
208212
evaultUrl: identity.uri,
209213
eName: identity.w3id,
210214
cryptoAdapter: adapter,
211215
keyId: identity.keyId,
216+
context: "onboarding",
212217
token,
213218
});
214219
addLog("success", "Public key synced");
@@ -296,6 +301,7 @@
296301
const signature = await signPayload({
297302
cryptoAdapter: adapter,
298303
keyId: selectedIdentity.keyId,
304+
context: "onboarding",
299305
payload: sessionId,
300306
});
301307
const body = {
@@ -339,6 +345,7 @@
339345
const signature = await signPayload({
340346
cryptoAdapter: adapter,
341347
keyId: selectedIdentity.keyId,
348+
context: "onboarding",
342349
payload: sessionId,
343350
});
344351
const body = {
@@ -404,6 +411,7 @@
404411
const sig = await signPayload({
405412
cryptoAdapter: adapter,
406413
keyId: selectedIdentity.keyId,
414+
context: "onboarding",
407415
payload: signPayloadInput,
408416
});
409417
signResult = sig;

infrastructure/eid-wallet/src/routes/(auth)/verify/+page.svelte

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -272,11 +272,15 @@ onMount(async () => {
272272
};
273273
} else {
274274
// Normal flow for approved status via wallet-sdk
275+
const verificationId = $verificaitonId;
276+
if (!verificationId) {
277+
throw new Error("Verification ID required");
278+
}
275279
const result = await provision(globalState.walletSdkAdapter, {
276280
registryUrl: PUBLIC_REGISTRY_URL,
277281
provisionerUrl: PUBLIC_PROVISIONER_URL,
278282
namespace: uuidv4(),
279-
verificationId: $verificaitonId,
283+
verificationId,
280284
keyId: "default",
281285
context: "onboarding",
282286
isPreVerification: false,

packages/wallet-sdk/src/index.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,9 @@ export { authenticate } from "./auth.js";
55
export type { AuthenticateOptions, AuthenticateResult } from "./auth.js";
66
export { syncPublicKeyToEvault } from "./sync-public-key.js";
77
export type { SyncPublicKeyOptions } from "./sync-public-key.js";
8+
export { signPayload } from "./sync-and-sign.js";
9+
export type { SignPayloadOptions } from "./sync-and-sign.js";
10+
export {
11+
syncPublicKeyToEvault as syncPublicKeyToEvaultWithOptions,
12+
} from "./sync-and-sign.js";
13+
export type { SyncPublicKeyToEvaultOptions } from "./sync-and-sign.js";

0 commit comments

Comments
 (0)