@seams/voiceid 0.27.0 → 0.28.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.
- package/README.md +18 -2
- package/dist/esm/descriptor.js +5 -2
- package/dist/public/sdk/voiceid/CITRINET_LICENSE.txt +395 -0
- package/dist/public/sdk/voiceid/NOTICE.txt +19 -2
- package/dist/public/sdk/voiceid/addVoiceId-Dbd-PwWG.js +1 -0
- package/dist/public/sdk/voiceid/approval-C4KlEQYu.js +1 -0
- package/dist/public/sdk/voiceid/citrinet-int8.onnx +0 -0
- package/dist/public/sdk/voiceid/{deviceBridge-L6ZKqifG.js → deviceBridge-DQLPNdC8.js} +1 -1
- package/dist/public/sdk/voiceid/enrollment-DPOYb36Z.js +1 -0
- package/dist/public/sdk/voiceid/host.js +2 -2
- package/dist/public/sdk/voiceid/prompt-vztg41jG.js +614 -0
- package/dist/public/sdk/voiceid/unlock-Da49yYxd.js +1 -0
- package/dist/types/activation/addVoiceId.d.ts +2 -1
- package/dist/types/activation/manageEnrollment.d.ts +2 -1
- package/dist/types/browser/enrollment.d.ts +3 -2
- package/dist/types/browser/model.d.ts +1 -1
- package/dist/types/browser/phrase.d.ts +5 -2
- package/dist/types/browser/phraseTokens.d.ts +2 -0
- package/dist/types/browser/phraseVocabulary.d.ts +3 -3
- package/dist/types/browser/progress.d.ts +2 -1
- package/dist/types/capture/approval.d.ts +4 -2
- package/dist/types/capture/bridge.d.ts +2 -1
- package/dist/types/capture/deviceBridge.d.ts +7 -4
- package/dist/types/descriptor.d.ts +5 -2
- package/dist/types/host.d.ts +3 -2
- package/dist/types/index.d.ts +1 -1
- package/dist/types/session/activation.d.ts +2 -2
- package/dist/types/session/unlock.d.ts +2 -1
- package/dist/types/session/unlockFromDevice.d.ts +2 -2
- package/package.json +2 -2
- package/src/README.md +26 -16
- package/dist/public/sdk/voiceid/addVoiceId-DOpYRrar.js +0 -1
- package/dist/public/sdk/voiceid/approval-DNlI4I0d.js +0 -1
- package/dist/public/sdk/voiceid/enrollment-Cs7Tzcho.js +0 -1
- package/dist/public/sdk/voiceid/prompt-g_wE9gYv.js +0 -614
- package/dist/public/sdk/voiceid/unlock-B9WYZcqy.js +0 -1
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import"./prompt-g_wE9gYv.js";import{a as e,n as t}from"./deviceBridge-L6ZKqifG.js";import{f as n,o as r,s as i}from"./enrollment-Cs7Tzcho.js";import{IndexedDBManager as a,fetchWithWalletHomeDiscovery as o,readAuthMethodEnabled as s}from"../voiceid-host.js";async function c(e){let{authMethod:t,challenge:n}=e;if(n.walletId!==t.walletId||n.walletAuthMethodId!==t.walletAuthMethodId||n.walletAuthorityId!==t.walletAuthorityId||n.deviceKeyId!==t.deviceKeyId)throw Error(`VoiceID challenge does not match the selected device method.`);let r=await e.capture({challenge:n,signal:e.signal,onCapture:e.onCapture,phrase:e.phrase});try{if(e.signal.aborted)throw Error(`VoiceID unlock was cancelled.`);let n=await e.http.verify({assertion:r.assertion,signal:e.signal});if(e.signal.aborted)throw Error(`VoiceID unlock was cancelled.`);if(n.walletSession.walletId!==t.walletId||n.walletSession.authMethodId!==t.walletAuthMethodId||n.walletSession.authorityId!==t.walletAuthorityId||n.custodyEnvelope.factor.deviceKeyId!==t.deviceKeyId)throw Error(`VoiceID server verified a different device method.`);return await e.install(n,r.factorSecret32)}finally{r.factorSecret32.fill(0)}}async function l(t,c,l){if(!await s(t.walletId,t.walletAuthMethodId))throw Error(`VoiceID is turned off in this browser. Enable it in Authentication methods.`);let u=await t.prepareSession(c),f=await a.getWalletAuthMethodV2(t.walletAuthMethodId);if(!f||f.kind!==`voiceid`||f.status!==`active`||f.walletId!==t.walletId||f.walletAuthMethodId!==t.walletAuthMethodId)throw Error(`Activate VoiceID on this device before unlocking this wallet.`);let p=new e(t.relayerUrl,location.origin,o);if(!await r(await i(t.walletId,t.walletAuthMethodId)))throw Error(`Unlock with a passkey, then open Manage voice to import or record your enrollment.`);await n(l,c),c.throwIfAborted(),t.assertActive();let m=await p.challenge({walletId:t.walletId,walletAuthMethodId:t.walletAuthMethodId,signal:AbortSignal.any([c,AbortSignal.timeout(15e3)])});t.assertActive();let h={authMethod:f,challenge:m,http:p,install:u};return c.throwIfAborted(),{kind:`recording`,expiresAtMs:m.expiresAtMs,action:d.bind(null,h)}}function u(e,t,n,r){return e({walletSession:n.walletSession,operationCredential:n.operationCredential,custodyEnvelope:n.custodyEnvelope,factorSecret32:r,signal:t,near:n.near})}async function d(e,n,r,i){return await c({authMethod:e.authMethod,challenge:e.challenge,http:e.http,capture:t,install:u.bind(null,e.install,n),signal:n,onCapture:r,phrase:i})}export{l as prepareUnlockSurface};
|