UNPKG

@bsv/wallet-toolbox-client

Version:
36 lines 1.27 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.PersonaIDInteractor = void 0; const AuthMethodInteractor_1 = require("./AuthMethodInteractor"); class PersonaIDInteractor extends AuthMethodInteractor_1.AuthMethodInteractor { constructor() { super(...arguments); this.methodType = 'PersonaID'; } async startAuth(serverUrl, presentationKey, payload) { const res = await fetch(`${serverUrl}/auth/start`, { method: 'POST', headers: { 'Content-Type': 'application/json' }, body: JSON.stringify({ methodType: this.methodType, presentationKey, payload }) }); return res.json(); } async completeAuth(serverUrl, presentationKey, payload) { const res = await fetch(`${serverUrl}/auth/complete`, { method: 'POST', headers: { 'Content-Type': 'application/json' }, body: JSON.stringify({ methodType: this.methodType, presentationKey, payload }) }); return res.json(); } } exports.PersonaIDInteractor = PersonaIDInteractor; //# sourceMappingURL=PersonaIDInteractor.js.map