@oxy.so/core 4.5.0-oxy-one.0 → 4.5.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 +1 -1
- package/dist/cjs/HttpService.js +63 -19
- package/dist/cjs/api/accounts.js +10 -3
- package/dist/cjs/api/agency.js +3 -1
- package/dist/cjs/api/apps.js +15 -4
- package/dist/cjs/api/assets.js +49 -12
- package/dist/cjs/api/auth.js +37 -11
- package/dist/cjs/api/billing.js +24 -7
- package/dist/cjs/api/civic.js +14 -4
- package/dist/cjs/api/follows.js +9 -2
- package/dist/cjs/api/identity.js +31 -9
- package/dist/cjs/api/nodes.js +3 -1
- package/dist/cjs/api/privacy.js +8 -2
- package/dist/cjs/api/session.js +15 -4
- package/dist/cjs/api/store.js +15 -5
- package/dist/cjs/api/topics.js +10 -3
- package/dist/cjs/api/users.js +16 -4
- package/dist/cjs/boot/sessionColdBoot.js +40 -13
- package/dist/cjs/constants/version.js +6 -6
- package/dist/cjs/crypto/identityMarker.js +3 -1
- package/dist/cjs/crypto/identityProof.js +6 -1
- package/dist/cjs/crypto/keyManager.js +87 -32
- package/dist/cjs/crypto/recoveryPhrase.js +2 -2
- package/dist/cjs/crypto/signatureService.js +3 -4
- package/dist/cjs/i18n/index.js +16 -3
- package/dist/cjs/i18n/locales/ar-SA.js +366 -366
- package/dist/cjs/i18n/locales/ca-ES.js +366 -366
- package/dist/cjs/i18n/locales/de-DE.js +366 -366
- package/dist/cjs/i18n/locales/en-US.js +1994 -1994
- package/dist/cjs/i18n/locales/es-ES.js +1994 -1994
- package/dist/cjs/i18n/locales/fr-FR.js +366 -366
- package/dist/cjs/i18n/locales/it-IT.js +366 -366
- package/dist/cjs/i18n/locales/ja-JP.js +366 -366
- package/dist/cjs/i18n/locales/ko-KR.js +366 -366
- package/dist/cjs/i18n/locales/pt-PT.js +366 -366
- package/dist/cjs/i18n/locales/zh-CN.js +366 -366
- package/dist/cjs/inference/OxyInferenceClient.js +12 -18
- package/dist/cjs/models/interfaces.js +11 -11
- package/dist/cjs/server/OxyServer.js +86 -28
- package/dist/cjs/server/agentAccount.js +6 -2
- package/dist/cjs/server/aliaMachineCredential.js +39 -14
- package/dist/cjs/server/auth.js +5 -4
- package/dist/cjs/server/capabilityTicket.js +5 -5
- package/dist/cjs/server/index.js +2 -1
- package/dist/cjs/server/liveCapabilityTicket.js +4 -1
- package/dist/cjs/server/middleware.js +61 -42
- package/dist/cjs/server/namespaces.js +28 -7
- package/dist/cjs/server/requesterAssertion.js +36 -30
- package/dist/cjs/server/serviceTokenLifetime.js +7 -4
- package/dist/cjs/server/traffic.js +53 -14
- package/dist/cjs/server/trafficNodeHttp.js +33 -8
- package/dist/cjs/server/workloadIdentity.client.js +4 -0
- package/dist/cjs/server/workloadIdentity.js +28 -1
- package/dist/cjs/session/SessionClient.js +54 -17
- package/dist/cjs/session/accountDelegationAccess.js +4 -6
- package/dist/cjs/session/accountDialogController.js +1 -1
- package/dist/cjs/session/authStateStore.js +18 -9
- package/dist/cjs/session/identityPin.js +6 -2
- package/dist/cjs/session/refresh.js +81 -23
- package/dist/cjs/session/sharedDeviceCredential.js +28 -15
- package/dist/cjs/shared/utils/errorUtils.js +1 -1
- package/dist/cjs/shared/utils/networkUtils.js +1 -1
- package/dist/cjs/shared/utils/themeUtils.js +1 -1
- package/dist/cjs/utils/accountCacheSweep.js +3 -1
- package/dist/cjs/utils/accountUtils.js +1 -3
- package/dist/cjs/utils/asyncUtils.js +1 -1
- package/dist/cjs/utils/authHelpers.js +2 -1
- package/dist/cjs/utils/avatarUtils.js +4 -2
- package/dist/cjs/utils/cache.js +1 -1
- package/dist/cjs/utils/cacheKey.js +3 -1
- package/dist/cjs/utils/deviceManager.js +4 -4
- package/dist/cjs/utils/errorUtils.js +6 -4
- package/dist/cjs/utils/languageUtils.js +404 -57
- package/dist/cjs/utils/profileLinks.js +1 -3
- package/dist/cjs/utils/requestUtils.js +7 -1
- package/dist/cjs/utils/userIdentity.js +1 -1
- package/dist/cjs/utils/validationUtils.js +5 -6
- package/dist/esm/HttpService.js +64 -20
- package/dist/esm/api/accounts.js +11 -4
- package/dist/esm/api/agency.js +3 -1
- package/dist/esm/api/apps.js +15 -4
- package/dist/esm/api/assets.js +49 -12
- package/dist/esm/api/auth.js +37 -11
- package/dist/esm/api/billing.js +25 -8
- package/dist/esm/api/civic.js +14 -4
- package/dist/esm/api/follows.js +9 -2
- package/dist/esm/api/identity.js +31 -9
- package/dist/esm/api/nodes.js +3 -1
- package/dist/esm/api/privacy.js +8 -2
- package/dist/esm/api/session.js +15 -4
- package/dist/esm/api/store.js +15 -5
- package/dist/esm/api/topics.js +10 -3
- package/dist/esm/api/users.js +16 -4
- package/dist/esm/boot/sessionColdBoot.js +41 -14
- package/dist/esm/constants/version.js +6 -6
- package/dist/esm/crypto/identityMarker.js +3 -1
- package/dist/esm/crypto/identityProof.js +6 -1
- package/dist/esm/crypto/internal.js +1 -1
- package/dist/esm/crypto/keyManager.js +87 -32
- package/dist/esm/crypto/recoveryPhrase.js +2 -2
- package/dist/esm/crypto/signatureService.js +3 -4
- package/dist/esm/i18n/index.js +16 -3
- package/dist/esm/i18n/locales/ar-SA.js +366 -366
- package/dist/esm/i18n/locales/ca-ES.js +366 -366
- package/dist/esm/i18n/locales/de-DE.js +366 -366
- package/dist/esm/i18n/locales/en-US.js +1994 -1994
- package/dist/esm/i18n/locales/es-ES.js +1994 -1994
- package/dist/esm/i18n/locales/fr-FR.js +366 -366
- package/dist/esm/i18n/locales/it-IT.js +366 -366
- package/dist/esm/i18n/locales/ja-JP.js +366 -366
- package/dist/esm/i18n/locales/ko-KR.js +366 -366
- package/dist/esm/i18n/locales/pt-PT.js +366 -366
- package/dist/esm/i18n/locales/zh-CN.js +366 -366
- package/dist/esm/index.js +1 -1
- package/dist/esm/inference/OxyInferenceClient.js +13 -19
- package/dist/esm/models/interfaces.js +11 -11
- package/dist/esm/server/OxyServer.js +87 -29
- package/dist/esm/server/agentAccount.js +6 -2
- package/dist/esm/server/aliaMachineCredential.js +39 -14
- package/dist/esm/server/auth.js +6 -5
- package/dist/esm/server/capabilityTicket.js +6 -6
- package/dist/esm/server/index.js +5 -5
- package/dist/esm/server/liveCapabilityTicket.js +6 -3
- package/dist/esm/server/middleware.js +62 -43
- package/dist/esm/server/namespaces.js +31 -10
- package/dist/esm/server/requesterAssertion.js +36 -30
- package/dist/esm/server/serviceTokenLifetime.js +7 -4
- package/dist/esm/server/traffic.js +55 -16
- package/dist/esm/server/trafficNodeHttp.js +34 -9
- package/dist/esm/server/userInvalidation.js +1 -1
- package/dist/esm/server/workloadIdentity.client.js +3 -0
- package/dist/esm/server/workloadIdentity.js +27 -1
- package/dist/esm/session/SessionClient.js +54 -17
- package/dist/esm/session/accountDelegationAccess.js +5 -7
- package/dist/esm/session/accountDialogController.js +1 -1
- package/dist/esm/session/authStateStore.js +18 -9
- package/dist/esm/session/identityPin.js +6 -2
- package/dist/esm/session/refresh.js +82 -24
- package/dist/esm/session/sharedDeviceCredential.js +28 -15
- package/dist/esm/shared/utils/errorUtils.js +1 -1
- package/dist/esm/shared/utils/networkUtils.js +1 -1
- package/dist/esm/shared/utils/themeUtils.js +1 -1
- package/dist/esm/utils/accountCacheSweep.js +3 -1
- package/dist/esm/utils/accountUtils.js +1 -3
- package/dist/esm/utils/asyncUtils.js +1 -1
- package/dist/esm/utils/authHelpers.js +2 -1
- package/dist/esm/utils/avatarUtils.js +4 -2
- package/dist/esm/utils/cache.js +1 -1
- package/dist/esm/utils/cacheKey.js +3 -1
- package/dist/esm/utils/deviceManager.js +4 -4
- package/dist/esm/utils/errorUtils.js +6 -4
- package/dist/esm/utils/languageUtils.js +404 -57
- package/dist/esm/utils/profileLinks.js +1 -3
- package/dist/esm/utils/requestUtils.js +7 -1
- package/dist/esm/utils/userIdentity.js +1 -1
- package/dist/esm/utils/validationUtils.js +5 -6
- package/dist/types/HttpService.d.ts +1 -1
- package/dist/types/api/accounts.d.ts +1 -1
- package/dist/types/api/apps.d.ts +4 -4
- package/dist/types/api/assets.d.ts +2 -0
- package/dist/types/api/auth.d.ts +8 -3
- package/dist/types/crypto/internal.d.ts +1 -1
- package/dist/types/index.d.ts +4 -4
- package/dist/types/server/index.d.ts +6 -6
- package/dist/types/server/requesterAssertion.d.ts +2 -2
- package/dist/types/server/workloadIdentity.client.d.ts +5 -1
- package/dist/types/server/workloadIdentity.d.ts +26 -0
- package/dist/types/session/accountDelegationAccess.d.ts +1 -1
- package/dist/types/session/index.d.ts +1 -1
- package/dist/types/utils/userIdentity.d.ts +1 -1
- package/dist/types/utils/validationUtils.d.ts +4 -5
- package/package.json +2 -3
- package/src/HttpService.ts +183 -53
- package/src/OxyServices.errors.ts +7 -3
- package/src/OxyServices.ts +6 -2
- package/src/api/accounts.ts +76 -26
- package/src/api/agency.ts +24 -9
- package/src/api/appData.ts +12 -2
- package/src/api/apps.ts +81 -31
- package/src/api/assets.ts +122 -40
- package/src/api/auth.ts +154 -79
- package/src/api/billing.ts +112 -65
- package/src/api/civic.ts +61 -19
- package/src/api/contacts.ts +4 -1
- package/src/api/devices.ts +54 -21
- package/src/api/follows.ts +88 -31
- package/src/api/identity.ts +101 -33
- package/src/api/linkedAccounts.ts +26 -8
- package/src/api/nodes.ts +18 -6
- package/src/api/notifications.ts +26 -6
- package/src/api/privacy.ts +42 -8
- package/src/api/reputation.ts +18 -7
- package/src/api/session.ts +23 -5
- package/src/api/store.ts +81 -31
- package/src/api/topics.ts +18 -6
- package/src/api/users.ts +98 -35
- package/src/boot/sessionColdBoot.ts +60 -19
- package/src/civic/payloads.ts +1 -4
- package/src/client/context.ts +6 -1
- package/src/constants/version.ts +7 -6
- package/src/crypto/aead.ts +1 -5
- package/src/crypto/ecdh.ts +1 -4
- package/src/crypto/identityDerivations.ts +5 -1
- package/src/crypto/identityMarker.ts +3 -1
- package/src/crypto/identityProof.ts +6 -1
- package/src/crypto/index.ts +11 -11
- package/src/crypto/internal.ts +6 -1
- package/src/crypto/keyManager.ts +348 -98
- package/src/crypto/recoveryPhrase.ts +14 -9
- package/src/crypto/registrationPow.ts +1 -1
- package/src/crypto/signatureService.ts +14 -6
- package/src/i18n/accountCategoryLabels.ts +1 -4
- package/src/i18n/accountRoleLabels.ts +1 -4
- package/src/i18n/index.ts +25 -7
- package/src/i18n/locales/ar-SA.ts +375 -366
- package/src/i18n/locales/ca-ES.ts +382 -366
- package/src/i18n/locales/de-DE.ts +387 -366
- package/src/i18n/locales/en-US.ts +2034 -1994
- package/src/i18n/locales/es-ES.ts +2043 -1994
- package/src/i18n/locales/fr-FR.ts +387 -366
- package/src/i18n/locales/it-IT.ts +380 -366
- package/src/i18n/locales/ja-JP.ts +380 -366
- package/src/i18n/locales/ko-KR.ts +377 -366
- package/src/i18n/locales/pt-PT.ts +383 -366
- package/src/i18n/locales/zh-CN.ts +373 -366
- package/src/i18n/trustTierLabels.ts +1 -4
- package/src/index.ts +371 -349
- package/src/inference/OxyInferenceClient.ts +784 -780
- package/src/models/interfaces.ts +30 -27
- package/src/server/OxyServer.ts +227 -68
- package/src/server/agentAccount.ts +8 -2
- package/src/server/aliaMachineCredential.ts +57 -16
- package/src/server/auth.ts +9 -5
- package/src/server/capabilityTicket.ts +30 -21
- package/src/server/index.ts +29 -6
- package/src/server/liveCapabilityTicket.ts +31 -9
- package/src/server/middleware.ts +212 -121
- package/src/server/namespaces.ts +247 -94
- package/src/server/rateLimit.ts +2 -4
- package/src/server/requesterAssertion.ts +93 -54
- package/src/server/serviceTokenLifetime.ts +9 -4
- package/src/server/traffic.ts +117 -23
- package/src/server/trafficNodeHttp.ts +61 -14
- package/src/server/userInvalidation.ts +1 -4
- package/src/server/workloadIdentity.client.ts +12 -1
- package/src/server/workloadIdentity.ts +52 -5
- package/src/session/SessionClient.ts +170 -49
- package/src/session/accountDelegationAccess.ts +24 -31
- package/src/session/accountDialogController.ts +59 -14
- package/src/session/accountSwitchTargets.ts +10 -15
- package/src/session/authStateStore.ts +121 -81
- package/src/session/deviceDirectory.ts +1 -3
- package/src/session/identityPin.ts +10 -11
- package/src/session/identitySession.ts +3 -1
- package/src/session/index.ts +87 -82
- package/src/session/refresh.ts +138 -44
- package/src/session/sessionClientHost.ts +1 -3
- package/src/session/sharedDeviceCredential.ts +35 -14
- package/src/session/socketLoader.ts +9 -2
- package/src/shared/utils/errorUtils.ts +5 -2
- package/src/shared/utils/networkUtils.ts +5 -8
- package/src/shared/utils/themeUtils.ts +2 -6
- package/src/types/buffer.d.ts +66 -21
- package/src/types/expo-secure-store.d.ts +5 -1
- package/src/utils/accountCacheSweep.ts +4 -5
- package/src/utils/accountUtils.ts +107 -108
- package/src/utils/apiUtils.ts +3 -3
- package/src/utils/asyncUtils.ts +2 -2
- package/src/utils/authHelpers.ts +10 -5
- package/src/utils/avatarUtils.ts +11 -6
- package/src/utils/cache.ts +9 -10
- package/src/utils/cacheKey.ts +5 -1
- package/src/utils/coldBoot.ts +1 -3
- package/src/utils/commonsDelivery.ts +1 -4
- package/src/utils/deviceManager.ts +15 -14
- package/src/utils/errorUtils.ts +68 -86
- package/src/utils/languageUtils.ts +407 -58
- package/src/utils/oauthPkce.ts +1 -4
- package/src/utils/platform.ts +0 -1
- package/src/utils/profileLinks.ts +2 -5
- package/src/utils/requestUtils.ts +18 -14
- package/src/utils/sessionUtils.ts +34 -33
- package/src/utils/userHandle.ts +3 -1
- package/src/utils/userIdentity.ts +1 -1
- package/src/utils/validationUtils.ts +11 -9
package/dist/esm/api/civic.js
CHANGED
|
@@ -91,7 +91,9 @@ export class CivicApi {
|
|
|
91
91
|
...(input.geohash !== undefined ? { geohash: input.geohash } : {}),
|
|
92
92
|
...(input.biometricOk !== undefined ? { biometricOk: input.biometricOk } : {}),
|
|
93
93
|
}, { collection: ATTEST_COLLECTION, rkey: input.nonce });
|
|
94
|
-
return this.ctx.request('POST', '/civic/attestations', envelope, {
|
|
94
|
+
return this.ctx.request('POST', '/civic/attestations', envelope, {
|
|
95
|
+
cache: false,
|
|
96
|
+
});
|
|
95
97
|
}
|
|
96
98
|
/**
|
|
97
99
|
* Vouch that another user is a real person as the VOUCHER (B): sign a
|
|
@@ -187,7 +189,9 @@ export class CivicCredentialsApi {
|
|
|
187
189
|
* base type; an `expiresAt` ISO string becomes epoch ms. NATIVE-ONLY.
|
|
188
190
|
*/
|
|
189
191
|
async issue(input) {
|
|
190
|
-
const types = input.types.includes(CREDENTIAL_BASE_TYPE)
|
|
192
|
+
const types = input.types.includes(CREDENTIAL_BASE_TYPE)
|
|
193
|
+
? input.types
|
|
194
|
+
: [CREDENTIAL_BASE_TYPE, ...input.types];
|
|
191
195
|
let expiresAtMs;
|
|
192
196
|
if (input.expiresAt !== undefined) {
|
|
193
197
|
const parsed = Date.parse(input.expiresAt);
|
|
@@ -205,7 +209,10 @@ export class CivicCredentialsApi {
|
|
|
205
209
|
// A fresh crypto-random rkey: every credential is its own chain entry.
|
|
206
210
|
const { SignatureService } = await import('../crypto/internal.js');
|
|
207
211
|
const rkey = await SignatureService.generateChallenge();
|
|
208
|
-
const envelope = await signOwnChainRecord(this.ctx, 'credential', record, {
|
|
212
|
+
const envelope = await signOwnChainRecord(this.ctx, 'credential', record, {
|
|
213
|
+
collection: CREDENTIAL_COLLECTION,
|
|
214
|
+
rkey,
|
|
215
|
+
});
|
|
209
216
|
const result = await this.ctx.request('POST', '/civic/credentials', envelope, { cache: false });
|
|
210
217
|
this.sweep();
|
|
211
218
|
return result;
|
|
@@ -223,7 +230,10 @@ export class CivicCredentialsApi {
|
|
|
223
230
|
}
|
|
224
231
|
const base = `/civic/credentials/${encodeURIComponent(holder)}`;
|
|
225
232
|
const url = opts.status ? `${base}?status=${encodeURIComponent(opts.status)}` : base;
|
|
226
|
-
return this.ctx.request('GET', url, undefined, {
|
|
233
|
+
return this.ctx.request('GET', url, undefined, {
|
|
234
|
+
cache: true,
|
|
235
|
+
cacheTTL: SHORT_TTL,
|
|
236
|
+
});
|
|
227
237
|
}
|
|
228
238
|
/**
|
|
229
239
|
* Verify a credential by its signed-record id: the server re-checks the
|
package/dist/esm/api/follows.js
CHANGED
|
@@ -41,7 +41,10 @@ export class FollowsApi {
|
|
|
41
41
|
}
|
|
42
42
|
/** Whether the signed-in user follows `userId`. Cached 1 minute, busted by every write. */
|
|
43
43
|
async status(userId) {
|
|
44
|
-
return this.ctx.request('GET', `/users/${userId}/follow-status`, undefined, {
|
|
44
|
+
return this.ctx.request('GET', `/users/${userId}/follow-status`, undefined, {
|
|
45
|
+
cache: true,
|
|
46
|
+
cacheTTL: STATUS_TTL,
|
|
47
|
+
});
|
|
45
48
|
}
|
|
46
49
|
/**
|
|
47
50
|
* Follow status for MANY users, one round-trip per chunk of 200 — for list
|
|
@@ -208,7 +211,11 @@ export class FollowsApi {
|
|
|
208
211
|
// ── Internals ────────────────────────────────────────────────────────────
|
|
209
212
|
async userPage(path, params) {
|
|
210
213
|
const response = await this.ctx.request('GET', path, buildQueryParams(params ?? {}), { cache: true, cacheTTL: GRAPH_TTL });
|
|
211
|
-
return {
|
|
214
|
+
return {
|
|
215
|
+
data: response.data || [],
|
|
216
|
+
total: response.pagination.total,
|
|
217
|
+
hasMore: response.pagination.hasMore,
|
|
218
|
+
};
|
|
212
219
|
}
|
|
213
220
|
/**
|
|
214
221
|
* Every cached read a follow write makes stale, in ONE pass over the cache.
|
package/dist/esm/api/identity.js
CHANGED
|
@@ -93,14 +93,19 @@ export class IdentityApi {
|
|
|
93
93
|
* verification-method fragment.
|
|
94
94
|
*/
|
|
95
95
|
async authMethods() {
|
|
96
|
-
return this.ctx.request('GET', '/auth/methods', undefined, {
|
|
96
|
+
return this.ctx.request('GET', '/auth/methods', undefined, {
|
|
97
|
+
cache: true,
|
|
98
|
+
cacheTTL: SHORT_TTL,
|
|
99
|
+
});
|
|
97
100
|
}
|
|
98
101
|
/**
|
|
99
102
|
* How the signed-in account is kept (ADR 0029 D3): whether Commons' root is
|
|
100
103
|
* linked (self-custody), or the email of an account without a key.
|
|
101
104
|
*/
|
|
102
105
|
async rootStatus() {
|
|
103
|
-
return this.ctx.request('GET', '/identity/root-status', undefined, {
|
|
106
|
+
return this.ctx.request('GET', '/identity/root-status', undefined, {
|
|
107
|
+
cache: false,
|
|
108
|
+
});
|
|
104
109
|
}
|
|
105
110
|
/**
|
|
106
111
|
* Rotate the account's identity key: derive a brand-new keypair, prove
|
|
@@ -275,7 +280,9 @@ export class IdentityApi {
|
|
|
275
280
|
*/
|
|
276
281
|
async rotationAlreadyApplied(userId, newPublicKey) {
|
|
277
282
|
return this.ctx
|
|
278
|
-
.request('GET', `/u/${encodeURIComponent(userId)}/did.json`, undefined, {
|
|
283
|
+
.request('GET', `/u/${encodeURIComponent(userId)}/did.json`, undefined, {
|
|
284
|
+
cache: false,
|
|
285
|
+
})
|
|
279
286
|
.then((doc) => doc.verificationMethod.some((vm) => 'publicKeyHex' in vm &&
|
|
280
287
|
typeof vm.publicKeyHex === 'string' &&
|
|
281
288
|
vm.publicKeyHex.toLowerCase() === newPublicKey.toLowerCase()))
|
|
@@ -304,7 +311,9 @@ export class IdentityLinksApi {
|
|
|
304
311
|
* The "Link Commons" panel shows its `qrPayload`; Commons scans it and signs with `sign`.
|
|
305
312
|
*/
|
|
306
313
|
async create() {
|
|
307
|
-
const res = await this.ctx.request('POST', '/identity/link', undefined, {
|
|
314
|
+
const res = await this.ctx.request('POST', '/identity/link', undefined, {
|
|
315
|
+
cache: false,
|
|
316
|
+
});
|
|
308
317
|
const parsed = safeParseContract(identityLinkCreateResponseSchema, res);
|
|
309
318
|
if (!parsed)
|
|
310
319
|
throw new Error('identity/link returned an unexpected response shape');
|
|
@@ -328,7 +337,10 @@ export class IdentityLinksApi {
|
|
|
328
337
|
*/
|
|
329
338
|
async sign(linkId, challenge) {
|
|
330
339
|
const { KeyManager, signIdentityProof, deriveIdentityLinkCode } = await import('../crypto/internal.js');
|
|
331
|
-
const [privateKey, publicKey] = await Promise.all([
|
|
340
|
+
const [privateKey, publicKey] = await Promise.all([
|
|
341
|
+
KeyManager.getPrivateKey(),
|
|
342
|
+
KeyManager.getPublicKey(),
|
|
343
|
+
]);
|
|
332
344
|
if (!privateKey || !publicKey) {
|
|
333
345
|
throw new Error('No identity on this device to link');
|
|
334
346
|
}
|
|
@@ -346,7 +358,11 @@ export class IdentityLinksApi {
|
|
|
346
358
|
expiresAt: state.expiresAt,
|
|
347
359
|
});
|
|
348
360
|
await this.ctx.request('POST', `/identity/link/${encodeURIComponent(linkId)}/proof`, { publicKey: root, proof }, { cache: false, skipAuth: true });
|
|
349
|
-
return {
|
|
361
|
+
return {
|
|
362
|
+
publicKey: root,
|
|
363
|
+
code: deriveIdentityLinkCode(linkId, root),
|
|
364
|
+
username: state.username,
|
|
365
|
+
};
|
|
350
366
|
}
|
|
351
367
|
/**
|
|
352
368
|
* Complete a link with a code just sent to the account's email
|
|
@@ -486,18 +502,24 @@ export class IdentityBackupApi {
|
|
|
486
502
|
createdAt,
|
|
487
503
|
lookupId,
|
|
488
504
|
};
|
|
489
|
-
return this.ctx.request('POST', '/identity/backup', body, {
|
|
505
|
+
return this.ctx.request('POST', '/identity/backup', body, {
|
|
506
|
+
cache: false,
|
|
507
|
+
});
|
|
490
508
|
}
|
|
491
509
|
/**
|
|
492
510
|
* Whether the signed-in user has a stored backup, plus its non-sensitive hint
|
|
493
511
|
* and timestamp. Returns no ciphertext and no locator.
|
|
494
512
|
*/
|
|
495
513
|
async status() {
|
|
496
|
-
return this.ctx.request('GET', '/identity/backup/status', undefined, {
|
|
514
|
+
return this.ctx.request('GET', '/identity/backup/status', undefined, {
|
|
515
|
+
cache: false,
|
|
516
|
+
});
|
|
497
517
|
}
|
|
498
518
|
/** Delete the signed-in user's stored backup. Idempotent. */
|
|
499
519
|
async delete() {
|
|
500
|
-
return this.ctx.request('DELETE', '/identity/backup', undefined, {
|
|
520
|
+
return this.ctx.request('DELETE', '/identity/backup', undefined, {
|
|
521
|
+
cache: false,
|
|
522
|
+
});
|
|
501
523
|
}
|
|
502
524
|
/**
|
|
503
525
|
* Restore an identity from its encrypted backup using ONLY the recovery
|
package/dist/esm/api/nodes.js
CHANGED
|
@@ -45,7 +45,9 @@ export class NodesApi {
|
|
|
45
45
|
}
|
|
46
46
|
/** Revoke the signed-in user's node registration. */
|
|
47
47
|
async removeMine() {
|
|
48
|
-
const res = await this.ctx.request('DELETE', '/nodes/me', undefined, {
|
|
48
|
+
const res = await this.ctx.request('DELETE', '/nodes/me', undefined, {
|
|
49
|
+
cache: false,
|
|
50
|
+
});
|
|
49
51
|
this.sweep();
|
|
50
52
|
return { revoked: res.success === true };
|
|
51
53
|
}
|
package/dist/esm/api/privacy.js
CHANGED
|
@@ -27,7 +27,10 @@ export class PrivacyApi {
|
|
|
27
27
|
// ── Blocked ──────────────────────────────────────────────────────────────
|
|
28
28
|
/** The signed-in user's blocked users. */
|
|
29
29
|
async blocked() {
|
|
30
|
-
return this.ctx.request('GET', '/privacy/blocked', undefined, {
|
|
30
|
+
return this.ctx.request('GET', '/privacy/blocked', undefined, {
|
|
31
|
+
cache: true,
|
|
32
|
+
cacheTTL: LIST_TTL,
|
|
33
|
+
});
|
|
31
34
|
}
|
|
32
35
|
/** Block a user. */
|
|
33
36
|
async block(userId) {
|
|
@@ -57,7 +60,10 @@ export class PrivacyApi {
|
|
|
57
60
|
// ── Restricted ───────────────────────────────────────────────────────────
|
|
58
61
|
/** The signed-in user's restricted users. */
|
|
59
62
|
async restricted() {
|
|
60
|
-
return this.ctx.request('GET', '/privacy/restricted', undefined, {
|
|
63
|
+
return this.ctx.request('GET', '/privacy/restricted', undefined, {
|
|
64
|
+
cache: true,
|
|
65
|
+
cacheTTL: LIST_TTL,
|
|
66
|
+
});
|
|
61
67
|
}
|
|
62
68
|
/** Restrict a user: limit their interactions without blocking them. */
|
|
63
69
|
async restrict(userId) {
|
package/dist/esm/api/session.js
CHANGED
|
@@ -104,7 +104,11 @@ export class SessionApi {
|
|
|
104
104
|
return null;
|
|
105
105
|
try {
|
|
106
106
|
const proof = await provider();
|
|
107
|
-
if (proof &&
|
|
107
|
+
if (proof &&
|
|
108
|
+
typeof proof.deviceId === 'string' &&
|
|
109
|
+
proof.deviceId &&
|
|
110
|
+
typeof proof.deviceSecret === 'string' &&
|
|
111
|
+
proof.deviceSecret) {
|
|
108
112
|
return { deviceId: proof.deviceId, deviceSecret: proof.deviceSecret };
|
|
109
113
|
}
|
|
110
114
|
return null;
|
|
@@ -119,7 +123,10 @@ export class SessionApi {
|
|
|
119
123
|
if (!this.isAuthenticated)
|
|
120
124
|
return false;
|
|
121
125
|
try {
|
|
122
|
-
const res = await this.ctx.request('GET', '/auth/validate', undefined, {
|
|
126
|
+
const res = await this.ctx.request('GET', '/auth/validate', undefined, {
|
|
127
|
+
cache: false,
|
|
128
|
+
retry: false,
|
|
129
|
+
});
|
|
123
130
|
return res.valid === true;
|
|
124
131
|
}
|
|
125
132
|
catch {
|
|
@@ -145,11 +152,15 @@ export class SessionApi {
|
|
|
145
152
|
}
|
|
146
153
|
/** The sessions that belong with `sessionId` (same account set). */
|
|
147
154
|
async list(sessionId) {
|
|
148
|
-
return this.ctx.request('GET', `/session/sessions/${sessionId}`, undefined, {
|
|
155
|
+
return this.ctx.request('GET', `/session/sessions/${sessionId}`, undefined, {
|
|
156
|
+
cache: false,
|
|
157
|
+
});
|
|
149
158
|
}
|
|
150
159
|
/** Sign out `sessionId`, or — with `targetSessionId` — one of the sessions beside it. */
|
|
151
160
|
async logout(sessionId, targetSessionId) {
|
|
152
|
-
const url = targetSessionId
|
|
161
|
+
const url = targetSessionId
|
|
162
|
+
? `/session/logout/${sessionId}/${targetSessionId}`
|
|
163
|
+
: `/session/logout/${sessionId}`;
|
|
153
164
|
await this.ctx.request('POST', url, undefined, { cache: false });
|
|
154
165
|
}
|
|
155
166
|
/** Sign out every session beside `sessionId`, and it. */
|
package/dist/esm/api/store.js
CHANGED
|
@@ -50,7 +50,9 @@ export class StoreReviewsApi {
|
|
|
50
50
|
* hidden when its author edits it.
|
|
51
51
|
*/
|
|
52
52
|
async write(slug, input) {
|
|
53
|
-
const res = await this.ctx.request('PUT', reviewPath(slug), input, {
|
|
53
|
+
const res = await this.ctx.request('PUT', reviewPath(slug), input, {
|
|
54
|
+
cache: false,
|
|
55
|
+
});
|
|
54
56
|
return res.data;
|
|
55
57
|
}
|
|
56
58
|
/** Withdraw the caller's own review. A real delete — the words were theirs. */
|
|
@@ -65,7 +67,9 @@ export class ListingScreenshotsApi {
|
|
|
65
67
|
}
|
|
66
68
|
/** Every picture on the listing, in the author's order. */
|
|
67
69
|
async list(applicationId) {
|
|
68
|
-
return this.ctx.request('GET', screenshotsPath(applicationId), undefined, {
|
|
70
|
+
return this.ctx.request('GET', screenshotsPath(applicationId), undefined, {
|
|
71
|
+
cache: false,
|
|
72
|
+
});
|
|
69
73
|
}
|
|
70
74
|
/**
|
|
71
75
|
* Attach an already-uploaded image, appended to the end.
|
|
@@ -75,7 +79,9 @@ export class ListingScreenshotsApi {
|
|
|
75
79
|
* one the caller is entitled to.
|
|
76
80
|
*/
|
|
77
81
|
async add(applicationId, input) {
|
|
78
|
-
return this.ctx.request('POST', screenshotsPath(applicationId), input, {
|
|
82
|
+
return this.ctx.request('POST', screenshotsPath(applicationId), input, {
|
|
83
|
+
cache: false,
|
|
84
|
+
});
|
|
79
85
|
}
|
|
80
86
|
/** Edit a picture's caption or the frame it was taken in. Order is `reorder`. */
|
|
81
87
|
async update(applicationId, screenshotId, input) {
|
|
@@ -108,7 +114,9 @@ export class StoreListingApi {
|
|
|
108
114
|
}
|
|
109
115
|
/** The application's store page in whatever state, or `null` if it has none. */
|
|
110
116
|
async get(applicationId) {
|
|
111
|
-
return this.ctx.request('GET', listingPath(applicationId), undefined, {
|
|
117
|
+
return this.ctx.request('GET', listingPath(applicationId), undefined, {
|
|
118
|
+
cache: false,
|
|
119
|
+
});
|
|
112
120
|
}
|
|
113
121
|
/**
|
|
114
122
|
* Create the page or replace its content. Never its status.
|
|
@@ -117,7 +125,9 @@ export class StoreListingApi {
|
|
|
117
125
|
* it live, and fixing a rejected one does not re-submit it.
|
|
118
126
|
*/
|
|
119
127
|
async write(applicationId, input) {
|
|
120
|
-
return this.ctx.request('PUT', listingPath(applicationId), input, {
|
|
128
|
+
return this.ctx.request('PUT', listingPath(applicationId), input, {
|
|
129
|
+
cache: false,
|
|
130
|
+
});
|
|
121
131
|
}
|
|
122
132
|
/** Hand the page to the store for review. From a draft, or a rejected page once fixed. */
|
|
123
133
|
async submit(applicationId) {
|
package/dist/esm/api/topics.js
CHANGED
|
@@ -34,12 +34,17 @@ export class TopicsApi {
|
|
|
34
34
|
const params = { q: query };
|
|
35
35
|
if (limit)
|
|
36
36
|
params.limit = limit;
|
|
37
|
-
const res = await this.ctx.request('GET', '/topics/search', params, {
|
|
37
|
+
const res = await this.ctx.request('GET', '/topics/search', params, {
|
|
38
|
+
cache: false,
|
|
39
|
+
});
|
|
38
40
|
return res.topics ?? [];
|
|
39
41
|
}
|
|
40
42
|
/** One topic by slug. */
|
|
41
43
|
async get(slug) {
|
|
42
|
-
return this.ctx.request('GET', `/topics/${slug}`, undefined, {
|
|
44
|
+
return this.ctx.request('GET', `/topics/${slug}`, undefined, {
|
|
45
|
+
cache: true,
|
|
46
|
+
cacheTTL: LONG,
|
|
47
|
+
});
|
|
43
48
|
}
|
|
44
49
|
/** The top-level categories, optionally translated. */
|
|
45
50
|
async categories(locale) {
|
|
@@ -55,7 +60,9 @@ export class TopicsApi {
|
|
|
55
60
|
}
|
|
56
61
|
/** Update a topic's description and translations. Staff or service only. */
|
|
57
62
|
async update(slug, data) {
|
|
58
|
-
const topic = await this.ctx.request('PATCH', `/topics/${slug}`, data, {
|
|
63
|
+
const topic = await this.ctx.request('PATCH', `/topics/${slug}`, data, {
|
|
64
|
+
cache: false,
|
|
65
|
+
});
|
|
59
66
|
this.ctx.oxy.cache.delete(`GET:/topics/${slug}`);
|
|
60
67
|
return topic;
|
|
61
68
|
}
|
package/dist/esm/api/users.js
CHANGED
|
@@ -74,7 +74,10 @@ export class UsersApi {
|
|
|
74
74
|
}
|
|
75
75
|
/** The signed-in user. Cached 1 minute. */
|
|
76
76
|
async me(options) {
|
|
77
|
-
const user = await this.ctx.request('GET', '/users/me', undefined, {
|
|
77
|
+
const user = await this.ctx.request('GET', '/users/me', undefined, {
|
|
78
|
+
cache: options?.cache ?? true,
|
|
79
|
+
cacheTTL: ME_TTL,
|
|
80
|
+
});
|
|
78
81
|
return normalizeUserIdentity(user);
|
|
79
82
|
}
|
|
80
83
|
/** A profile by username. Cached 5 minutes; `{ cache: false }` as in `get`. */
|
|
@@ -147,7 +150,9 @@ export class UsersApi {
|
|
|
147
150
|
// A 404 (absent) and an upstream failure both return null; the log keeps
|
|
148
151
|
// them distinguishable without turning expected misses into noise.
|
|
149
152
|
const status = extractErrorStatus(error);
|
|
150
|
-
logger.debug(status === 404
|
|
153
|
+
logger.debug(status === 404
|
|
154
|
+
? 'users.resolveHandle: handle not found'
|
|
155
|
+
: 'users.resolveHandle: discovery failed', {
|
|
151
156
|
method: 'users.resolveHandle',
|
|
152
157
|
handle,
|
|
153
158
|
status,
|
|
@@ -167,7 +172,9 @@ export class UsersApi {
|
|
|
167
172
|
}
|
|
168
173
|
/** Profiles similar to `userId`, by co-follower overlap. Cached 5 minutes. */
|
|
169
174
|
async similar(userId, limitOrPagination) {
|
|
170
|
-
const pagination = typeof limitOrPagination === 'number'
|
|
175
|
+
const pagination = typeof limitOrPagination === 'number'
|
|
176
|
+
? { limit: limitOrPagination }
|
|
177
|
+
: (limitOrPagination ?? {});
|
|
171
178
|
const users = await this.ctx.request('GET', `/profiles/${userId}/similar`, buildQueryParams(pagination), {
|
|
172
179
|
cache: true,
|
|
173
180
|
cacheTTL: PROFILE_TTL,
|
|
@@ -267,6 +274,11 @@ export class UsersApi {
|
|
|
267
274
|
}
|
|
268
275
|
const timestamp = Date.now();
|
|
269
276
|
const signature = await SignatureService.sign(`delete:${publicKey}:${timestamp}`);
|
|
270
|
-
return this.ctx.request('DELETE', '/users/me', {
|
|
277
|
+
return this.ctx.request('DELETE', '/users/me', {
|
|
278
|
+
signature,
|
|
279
|
+
timestamp,
|
|
280
|
+
confirmText,
|
|
281
|
+
...(proof.totpCode ? { totpCode: proof.totpCode } : {}),
|
|
282
|
+
}, { cache: false });
|
|
271
283
|
}
|
|
272
284
|
}
|
|
@@ -44,7 +44,7 @@ import { runColdBoot } from '../utils/coldBoot.js';
|
|
|
44
44
|
import { isNative as detectNative } from '../utils/platform.js';
|
|
45
45
|
import { logger } from '../logger/index.js';
|
|
46
46
|
import { computeIdentityTag } from '../utils/cacheKey.js';
|
|
47
|
-
import { TOKEN_REFRESH_LEAD_MS, refreshDeviceSecretArm, refreshSharedDeviceArm } from '../session/refresh.js';
|
|
47
|
+
import { TOKEN_REFRESH_LEAD_MS, refreshDeviceSecretArm, refreshSharedDeviceArm, } from '../session/refresh.js';
|
|
48
48
|
import { establishIdentitySession, resolveIdentityPin, } from '../session/identitySession.js';
|
|
49
49
|
/**
|
|
50
50
|
* Run the device-first cold boot. Resolves to the `runColdBoot` outcome and, as
|
|
@@ -56,7 +56,7 @@ export async function runSessionColdBoot(opts) {
|
|
|
56
56
|
const isNative = opts.platform?.isNative ?? detectNative();
|
|
57
57
|
// Non-null ONLY in identity mode; every `!== null` test below therefore reads
|
|
58
58
|
// as "is this boot identity-bound?" while also narrowing the binding.
|
|
59
|
-
const identityBinding = opts.sessionMode === 'identity' ? opts.identity ?? null : null;
|
|
59
|
+
const identityBinding = opts.sessionMode === 'identity' ? (opts.identity ?? null) : null;
|
|
60
60
|
if (opts.sessionMode === 'identity' && identityBinding === null) {
|
|
61
61
|
logger.error('runSessionColdBoot: sessionMode "identity" requires an `identity` binding — refusing to run any lane (an identity-bound client must never adopt the device active account)', undefined, { component: 'sessionColdBoot', method: 'runSessionColdBoot' });
|
|
62
62
|
await opts.onSignedOut?.('error');
|
|
@@ -102,10 +102,15 @@ export async function runSessionColdBoot(opts) {
|
|
|
102
102
|
steps.push({
|
|
103
103
|
id: 'warm-token-plant',
|
|
104
104
|
run: async () => {
|
|
105
|
-
if (identityBinding === null &&
|
|
105
|
+
if (identityBinding === null &&
|
|
106
|
+
isNative &&
|
|
107
|
+
(await store.isAutomaticIdentitySignInSuppressed?.()))
|
|
106
108
|
return { kind: 'skip' };
|
|
107
109
|
const persisted = await store.load();
|
|
108
|
-
if (!persisted?.accessToken ||
|
|
110
|
+
if (!persisted?.accessToken ||
|
|
111
|
+
!persisted.sessionId ||
|
|
112
|
+
!persisted.userId ||
|
|
113
|
+
!persisted.expiresAt) {
|
|
109
114
|
return { kind: 'skip' };
|
|
110
115
|
}
|
|
111
116
|
// Guard a malformed `expiresAt` (Date.parse -> NaN): treat as not-valid and
|
|
@@ -176,7 +181,9 @@ export async function runSessionColdBoot(opts) {
|
|
|
176
181
|
},
|
|
177
182
|
};
|
|
178
183
|
case 'invalid-secret': {
|
|
179
|
-
if (identityBinding === null &&
|
|
184
|
+
if (identityBinding === null &&
|
|
185
|
+
store.setAutomaticIdentitySignInSuppressed &&
|
|
186
|
+
(await store.isAutomaticIdentitySignInSuppressed?.())) {
|
|
180
187
|
rejectedLocalHolder = true;
|
|
181
188
|
signedOutReason = 'no_session';
|
|
182
189
|
return { kind: 'skip' };
|
|
@@ -211,7 +218,10 @@ export async function runSessionColdBoot(opts) {
|
|
|
211
218
|
return { kind: 'skip' };
|
|
212
219
|
case 'transient':
|
|
213
220
|
// Network / 5xx: keep the secret; a later attempt can succeed.
|
|
214
|
-
logger.debug('device-secret mint failed (transient) — keeping secret', {
|
|
221
|
+
logger.debug('device-secret mint failed (transient) — keeping secret', {
|
|
222
|
+
component: 'sessionColdBoot',
|
|
223
|
+
method: 'device-secret-mint',
|
|
224
|
+
});
|
|
215
225
|
return { kind: 'skip' };
|
|
216
226
|
case 'session-ended':
|
|
217
227
|
// The prior holder/epoch was superseded. This boot must not turn a
|
|
@@ -284,11 +294,22 @@ export async function runSessionColdBoot(opts) {
|
|
|
284
294
|
// like every other network step.
|
|
285
295
|
enabled: () => isNative && !isOffline() && !accountRecoverySuperseded,
|
|
286
296
|
run: async () => {
|
|
287
|
-
const result = await refreshSharedDeviceArm({
|
|
297
|
+
const result = await refreshSharedDeviceArm({
|
|
298
|
+
oxy,
|
|
299
|
+
store,
|
|
300
|
+
shared: sharedSlot,
|
|
301
|
+
rejectedLocalHolder,
|
|
302
|
+
});
|
|
288
303
|
if (result.status === 'ok') {
|
|
289
|
-
return {
|
|
290
|
-
|
|
291
|
-
|
|
304
|
+
return {
|
|
305
|
+
kind: 'session',
|
|
306
|
+
session: {
|
|
307
|
+
sessionId: result.sessionId,
|
|
308
|
+
userId: result.userId,
|
|
309
|
+
accessToken: result.token,
|
|
310
|
+
state: result.state,
|
|
311
|
+
},
|
|
312
|
+
};
|
|
292
313
|
}
|
|
293
314
|
if (result.status === 'no-session')
|
|
294
315
|
signedOutReason = 'no_session';
|
|
@@ -319,11 +340,16 @@ export async function runSessionColdBoot(opts) {
|
|
|
319
340
|
id: 'commons-proof-signin',
|
|
320
341
|
enabled: () => isNative && !isOffline(),
|
|
321
342
|
run: async () => {
|
|
322
|
-
if (accountRecoverySuperseded || await store.isAutomaticIdentitySignInSuppressed?.())
|
|
343
|
+
if (accountRecoverySuperseded || (await store.isAutomaticIdentitySignInSuppressed?.()))
|
|
323
344
|
return { kind: 'skip' };
|
|
324
345
|
const epoch = oxy.http.getSessionEpoch();
|
|
325
|
-
const session = await oxy.auth.signInWithCommonsIdentity({
|
|
326
|
-
|
|
346
|
+
const session = await oxy.auth.signInWithCommonsIdentity({
|
|
347
|
+
plantTokens: false,
|
|
348
|
+
requestOptions: { retry: false },
|
|
349
|
+
});
|
|
350
|
+
if (!session?.accessToken ||
|
|
351
|
+
oxy.http.getSessionEpoch() !== epoch ||
|
|
352
|
+
(await store.isAutomaticIdentitySignInSuppressed?.())) {
|
|
327
353
|
return { kind: 'skip' };
|
|
328
354
|
}
|
|
329
355
|
// `verifyChallenge` issues a deviceSecret; persist it so the next
|
|
@@ -339,7 +365,8 @@ export async function runSessionColdBoot(opts) {
|
|
|
339
365
|
expiresAt: session.expiresAt,
|
|
340
366
|
});
|
|
341
367
|
}
|
|
342
|
-
if (oxy.http.getSessionEpoch() !== epoch ||
|
|
368
|
+
if (oxy.http.getSessionEpoch() !== epoch ||
|
|
369
|
+
(await store.isAutomaticIdentitySignInSuppressed?.()))
|
|
343
370
|
return { kind: 'skip' };
|
|
344
371
|
oxy.session.setAccessToken(session.accessToken);
|
|
345
372
|
return {
|
|
@@ -3,11 +3,11 @@
|
|
|
3
3
|
* This file is auto-generated to avoid runtime dependency on package.json
|
|
4
4
|
*/
|
|
5
5
|
export const packageInfo = {
|
|
6
|
-
name:
|
|
7
|
-
version:
|
|
8
|
-
description:
|
|
9
|
-
main:
|
|
10
|
-
module:
|
|
11
|
-
types:
|
|
6
|
+
name: '@oxy.so/services',
|
|
7
|
+
version: '5.2.1',
|
|
8
|
+
description: 'Reusable OxyHQ module to handle authentication, user management, reputation system (Oxy Trust) and more 🚀',
|
|
9
|
+
main: 'lib/commonjs/node/index.js',
|
|
10
|
+
module: 'lib/module/node/index.js',
|
|
11
|
+
types: 'lib/typescript/node/index.d.ts',
|
|
12
12
|
};
|
|
13
13
|
export const { name, version, description } = packageInfo;
|
|
@@ -208,7 +208,9 @@ export async function updateIdentityMarker(partial) {
|
|
|
208
208
|
}
|
|
209
209
|
return false;
|
|
210
210
|
}
|
|
211
|
-
const nextOnboarding = partial.onboardingComplete !== undefined
|
|
211
|
+
const nextOnboarding = partial.onboardingComplete !== undefined
|
|
212
|
+
? partial.onboardingComplete
|
|
213
|
+
: existing.onboardingComplete;
|
|
212
214
|
const next = {
|
|
213
215
|
v: 1,
|
|
214
216
|
publicKey: partial.publicKey ?? existing.publicKey,
|
|
@@ -20,5 +20,10 @@ export async function signIdentityProof(identity, claims) {
|
|
|
20
20
|
throw new Error('identity proof: the claims name a different root');
|
|
21
21
|
}
|
|
22
22
|
const signature = await signMessage(buildIdentityProofMessage(claims), identity.privateKey);
|
|
23
|
-
return {
|
|
23
|
+
return {
|
|
24
|
+
v: IDENTITY_PROOF_VERSION,
|
|
25
|
+
challenge: claims.challenge,
|
|
26
|
+
expiresAt: claims.expiresAt,
|
|
27
|
+
signature,
|
|
28
|
+
};
|
|
24
29
|
}
|
|
@@ -16,4 +16,4 @@ export { encryptAead, decryptAead, AEAD_KEY_LENGTH, AEAD_NONCE_LENGTH } from './
|
|
|
16
16
|
export { digestIdentityPayload, signIdentityProof } from './identityProof.js';
|
|
17
17
|
export { deriveIdentityLinkCode } from './identityLink.js';
|
|
18
18
|
export { solveRegistrationPow } from './registrationPow.js';
|
|
19
|
-
export { canonicalize, loadCommonsIdentityBridge, signMessage, verifySignature } from '@oxy.so/protocol';
|
|
19
|
+
export { canonicalize, loadCommonsIdentityBridge, signMessage, verifySignature, } from '@oxy.so/protocol';
|