@0xpolygonid/js-sdk 1.9.3 → 1.10.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 +10 -3
- package/dist/browser/esm/index.js +25 -17
- package/dist/browser/esm/index.js.map +1 -1
- package/dist/browser/umd/index.js +198 -188
- package/dist/browser/umd/index.js.map +1 -1
- package/dist/node/cjs/circuits/atomic-query-sig-v2-on-chain.js +4 -4
- package/dist/node/cjs/circuits/state-transition.js +2 -2
- package/dist/node/cjs/identity/identity-wallet.js +1 -1
- package/dist/node/cjs/proof/verifiers/pub-signals-verifier.js +4 -1
- package/dist/node/cjs/proof/verifiers/query.js +16 -9
- package/dist/node/esm/circuits/atomic-query-sig-v2-on-chain.js +4 -4
- package/dist/node/esm/circuits/state-transition.js +3 -3
- package/dist/node/esm/identity/identity-wallet.js +1 -1
- package/dist/node/esm/proof/verifiers/pub-signals-verifier.js +5 -2
- package/dist/node/esm/proof/verifiers/query.js +14 -9
- package/dist/types/circuits/atomic-query-sig-v2-on-chain.d.ts +1 -2
- package/dist/types/proof/verifiers/query.d.ts +2 -0
- package/package.json +13 -10
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.AtomicQuerySigV2OnChainPubSignals = exports.AtomicQuerySigV2OnChainCircuitInputs = exports.AtomicQuerySigV2OnChainInputs = void 0;
|
|
4
|
-
const js_merkletree_1 = require("@iden3/js-merkletree");
|
|
5
4
|
const js_iden3_core_1 = require("@iden3/js-iden3-core");
|
|
6
5
|
const models_1 = require("./models");
|
|
6
|
+
const js_merkletree_1 = require("@iden3/js-merkletree");
|
|
7
7
|
const common_1 = require("./common");
|
|
8
8
|
const utils_1 = require("../utils");
|
|
9
9
|
/**
|
|
@@ -206,7 +206,7 @@ class AtomicQuerySigV2OnChainPubSignals extends common_1.BaseConfig {
|
|
|
206
206
|
this.circuitQueryHash = BigInt(sVals[fieldIdx]);
|
|
207
207
|
fieldIdx++;
|
|
208
208
|
// - issuerAuthState
|
|
209
|
-
this.issuerAuthState =
|
|
209
|
+
this.issuerAuthState = js_merkletree_1.Hash.fromString(sVals[fieldIdx]);
|
|
210
210
|
fieldIdx++;
|
|
211
211
|
// - requestID
|
|
212
212
|
this.requestID = BigInt(sVals[fieldIdx]);
|
|
@@ -215,7 +215,7 @@ class AtomicQuerySigV2OnChainPubSignals extends common_1.BaseConfig {
|
|
|
215
215
|
this.challenge = BigInt(sVals[fieldIdx]);
|
|
216
216
|
fieldIdx++;
|
|
217
217
|
// - gistRoot
|
|
218
|
-
this.gistRoot =
|
|
218
|
+
this.gistRoot = js_merkletree_1.Hash.fromString(sVals[fieldIdx]);
|
|
219
219
|
fieldIdx++;
|
|
220
220
|
// - issuerID
|
|
221
221
|
this.issuerID = js_iden3_core_1.Id.fromBigInt(BigInt(sVals[fieldIdx]));
|
|
@@ -224,7 +224,7 @@ class AtomicQuerySigV2OnChainPubSignals extends common_1.BaseConfig {
|
|
|
224
224
|
this.isRevocationChecked = parseInt(sVals[fieldIdx]);
|
|
225
225
|
fieldIdx++;
|
|
226
226
|
// - issuerClaimNonRevState
|
|
227
|
-
this.issuerClaimNonRevState =
|
|
227
|
+
this.issuerClaimNonRevState = js_merkletree_1.Hash.fromString(sVals[fieldIdx]);
|
|
228
228
|
fieldIdx++;
|
|
229
229
|
// - timestamp
|
|
230
230
|
this.timestamp = parseInt(sVals[fieldIdx]);
|
|
@@ -83,8 +83,8 @@ class StateTransitionPubSignals {
|
|
|
83
83
|
throw new Error(`invalid number of Output values expected ${fieldLength} got ${sVals.length}`);
|
|
84
84
|
}
|
|
85
85
|
this.userId = js_iden3_core_1.Id.fromBigInt(BigInt(sVals[0]));
|
|
86
|
-
this.oldUserState =
|
|
87
|
-
this.newUserState =
|
|
86
|
+
this.oldUserState = js_merkletree_1.Hash.fromString(sVals[1]);
|
|
87
|
+
this.newUserState = js_merkletree_1.Hash.fromString(sVals[2]);
|
|
88
88
|
this.isOldStateGenesis = BigInt(sVals[3]) === BigInt(1);
|
|
89
89
|
return this;
|
|
90
90
|
}
|
|
@@ -83,7 +83,7 @@ class IdentityWallet {
|
|
|
83
83
|
const tmpIdentifier = opts.seed ? uuid.v5(js_crypto_1.Hex.encode((0, js_crypto_1.sha256)(opts.seed)), uuid.NIL) : uuid.v4();
|
|
84
84
|
opts.method = opts.method ?? js_iden3_core_1.DidMethod.Iden3;
|
|
85
85
|
opts.blockchain = opts.blockchain ?? js_iden3_core_1.Blockchain.Polygon;
|
|
86
|
-
opts.networkId = opts.networkId ?? js_iden3_core_1.NetworkId.
|
|
86
|
+
opts.networkId = opts.networkId ?? js_iden3_core_1.NetworkId.Amoy;
|
|
87
87
|
await this._storage.mt.createIdentityMerkleTrees(tmpIdentifier);
|
|
88
88
|
opts.seed = opts.seed ?? (0, js_crypto_1.getRandomBytes)(32);
|
|
89
89
|
const keyId = await this._kms.createKeyFromSeed(kms_1.KmsKeyType.BabyJubJub, opts.seed);
|
|
@@ -132,8 +132,10 @@ class PubSignalsVerifier {
|
|
|
132
132
|
const queriesMetadata = await (0, common_2.parseQueriesMetadata)(query.type, JSON.stringify(context), query.credentialSubject, {
|
|
133
133
|
documentLoader: loader
|
|
134
134
|
});
|
|
135
|
-
|
|
135
|
+
const circuitId = models_1.CircuitId.AtomicQueryV3;
|
|
136
|
+
await (0, query_1.checkQueryRequest)(query, queriesMetadata, context, outs, circuitId, this._documentLoader, opts);
|
|
136
137
|
const queryMetadata = queriesMetadata[0]; // only one query is supported
|
|
138
|
+
(0, query_1.checkCircuitOperator)(circuitId, outs.operator);
|
|
137
139
|
// validate selective disclosure
|
|
138
140
|
if (queryMetadata.operator === circuits_1.Operators.SD) {
|
|
139
141
|
try {
|
|
@@ -353,6 +355,7 @@ class PubSignalsVerifier {
|
|
|
353
355
|
});
|
|
354
356
|
await (0, query_1.checkQueryRequest)(query, queriesMetadata, context, outs, circuitId, this._documentLoader, opts);
|
|
355
357
|
const queryMetadata = queriesMetadata[0]; // only one query is supported
|
|
358
|
+
(0, query_1.checkCircuitOperator)(circuitId, outs.operator);
|
|
356
359
|
// validate selective disclosure
|
|
357
360
|
if (queryMetadata.operator === circuits_1.Operators.SD) {
|
|
358
361
|
try {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.fieldValueFromVerifiablePresentation = exports.validateEmptyCredentialSubjectNoopNativeSupport = exports.validateDisclosureNativeSDSupport = exports.validateDisclosureV2Circuit = exports.validateOperators = exports.validateEmptyCredentialSubjectV2Circuit = exports.verifyFieldValueInclusionNativeExistsSupport = exports.verifyFieldValueInclusionV2 = exports.checkQueryRequest = void 0;
|
|
3
|
+
exports.fieldValueFromVerifiablePresentation = exports.validateEmptyCredentialSubjectNoopNativeSupport = exports.validateDisclosureNativeSDSupport = exports.validateDisclosureV2Circuit = exports.validateOperators = exports.validateEmptyCredentialSubjectV2Circuit = exports.verifyFieldValueInclusionNativeExistsSupport = exports.verifyFieldValueInclusionV2 = exports.checkCircuitOperator = exports.checkCircuitQueriesLength = exports.checkQueryRequest = void 0;
|
|
4
4
|
const js_iden3_core_1 = require("@iden3/js-iden3-core");
|
|
5
5
|
const js_jsonld_merklization_1 = require("@iden3/js-jsonld-merklization");
|
|
6
6
|
const utils_1 = require("../../utils");
|
|
@@ -29,14 +29,7 @@ async function checkQueryRequest(query, queriesMetadata, ldContext, outputs, cir
|
|
|
29
29
|
if (!query.skipClaimRevocationCheck && outputs.isRevocationChecked === 0) {
|
|
30
30
|
throw new Error(`check revocation is required`);
|
|
31
31
|
}
|
|
32
|
-
|
|
33
|
-
if (queriesMetadata.length > circuitValidationData.maxQueriesCount) {
|
|
34
|
-
throw new Error(`circuit ${circuitId} supports only ${provers_1.circuitValidator[circuitId].maxQueriesCount} queries`);
|
|
35
|
-
}
|
|
36
|
-
const notSupportedOpIndx = queriesMetadata.findIndex((i) => !circuitValidationData.supportedOperations.includes(i.operator));
|
|
37
|
-
if (notSupportedOpIndx > -1) {
|
|
38
|
-
throw new Error(`circuit ${circuitId} not support ${queriesMetadata[notSupportedOpIndx].operator} operator`);
|
|
39
|
-
}
|
|
32
|
+
checkCircuitQueriesLength(circuitId, queriesMetadata);
|
|
40
33
|
// verify timestamp
|
|
41
34
|
let acceptedProofGenerationDelay = defaultProofGenerationDelayOpts;
|
|
42
35
|
if (opts?.acceptedProofGenerationDelay) {
|
|
@@ -49,6 +42,20 @@ async function checkQueryRequest(query, queriesMetadata, ldContext, outputs, cir
|
|
|
49
42
|
return;
|
|
50
43
|
}
|
|
51
44
|
exports.checkQueryRequest = checkQueryRequest;
|
|
45
|
+
function checkCircuitQueriesLength(circuitId, queriesMetadata) {
|
|
46
|
+
const circuitValidationData = provers_1.circuitValidator[circuitId];
|
|
47
|
+
if (queriesMetadata.length > circuitValidationData.maxQueriesCount) {
|
|
48
|
+
throw new Error(`circuit ${circuitId} supports only ${provers_1.circuitValidator[circuitId].maxQueriesCount} queries`);
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
exports.checkCircuitQueriesLength = checkCircuitQueriesLength;
|
|
52
|
+
function checkCircuitOperator(circuitId, operator) {
|
|
53
|
+
const circuitValidationData = provers_1.circuitValidator[circuitId];
|
|
54
|
+
if (!circuitValidationData.supportedOperations.includes(operator)) {
|
|
55
|
+
throw new Error(`circuit ${circuitId} not support ${(0, comparer_1.getOperatorNameByValue)(operator)} operator`);
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
exports.checkCircuitOperator = checkCircuitOperator;
|
|
52
59
|
function verifyFieldValueInclusionV2(outputs, metadata) {
|
|
53
60
|
if (outputs.operator == comparer_1.QueryOperators.$noop) {
|
|
54
61
|
return;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { newHashFromString } from '@iden3/js-merkletree';
|
|
2
1
|
import { Id } from '@iden3/js-iden3-core';
|
|
3
2
|
import { ValueProof, CircuitError } from './models';
|
|
3
|
+
import { Hash } from '@iden3/js-merkletree';
|
|
4
4
|
import { BaseConfig, bigIntArrayToStringArray, existenceToInt, getNodeAuxValue, prepareCircuitArrayValues, prepareSiblingsStr } from './common';
|
|
5
5
|
import { byteDecoder, byteEncoder } from '../utils';
|
|
6
6
|
/**
|
|
@@ -201,7 +201,7 @@ export class AtomicQuerySigV2OnChainPubSignals extends BaseConfig {
|
|
|
201
201
|
this.circuitQueryHash = BigInt(sVals[fieldIdx]);
|
|
202
202
|
fieldIdx++;
|
|
203
203
|
// - issuerAuthState
|
|
204
|
-
this.issuerAuthState =
|
|
204
|
+
this.issuerAuthState = Hash.fromString(sVals[fieldIdx]);
|
|
205
205
|
fieldIdx++;
|
|
206
206
|
// - requestID
|
|
207
207
|
this.requestID = BigInt(sVals[fieldIdx]);
|
|
@@ -210,7 +210,7 @@ export class AtomicQuerySigV2OnChainPubSignals extends BaseConfig {
|
|
|
210
210
|
this.challenge = BigInt(sVals[fieldIdx]);
|
|
211
211
|
fieldIdx++;
|
|
212
212
|
// - gistRoot
|
|
213
|
-
this.gistRoot =
|
|
213
|
+
this.gistRoot = Hash.fromString(sVals[fieldIdx]);
|
|
214
214
|
fieldIdx++;
|
|
215
215
|
// - issuerID
|
|
216
216
|
this.issuerID = Id.fromBigInt(BigInt(sVals[fieldIdx]));
|
|
@@ -219,7 +219,7 @@ export class AtomicQuerySigV2OnChainPubSignals extends BaseConfig {
|
|
|
219
219
|
this.isRevocationChecked = parseInt(sVals[fieldIdx]);
|
|
220
220
|
fieldIdx++;
|
|
221
221
|
// - issuerClaimNonRevState
|
|
222
|
-
this.issuerClaimNonRevState =
|
|
222
|
+
this.issuerClaimNonRevState = Hash.fromString(sVals[fieldIdx]);
|
|
223
223
|
fieldIdx++;
|
|
224
224
|
// - timestamp
|
|
225
225
|
this.timestamp = parseInt(sVals[fieldIdx]);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Id } from '@iden3/js-iden3-core';
|
|
2
|
-
import {
|
|
2
|
+
import { Hash } from '@iden3/js-merkletree';
|
|
3
3
|
import { BaseConfig, getNodeAuxValue, prepareSiblingsStr } from './common';
|
|
4
4
|
import { CircuitError } from './models';
|
|
5
5
|
import { byteDecoder, byteEncoder } from '../utils';
|
|
@@ -79,8 +79,8 @@ export class StateTransitionPubSignals {
|
|
|
79
79
|
throw new Error(`invalid number of Output values expected ${fieldLength} got ${sVals.length}`);
|
|
80
80
|
}
|
|
81
81
|
this.userId = Id.fromBigInt(BigInt(sVals[0]));
|
|
82
|
-
this.oldUserState =
|
|
83
|
-
this.newUserState =
|
|
82
|
+
this.oldUserState = Hash.fromString(sVals[1]);
|
|
83
|
+
this.newUserState = Hash.fromString(sVals[2]);
|
|
84
84
|
this.isOldStateGenesis = BigInt(sVals[3]) === BigInt(1);
|
|
85
85
|
return this;
|
|
86
86
|
}
|
|
@@ -57,7 +57,7 @@ export class IdentityWallet {
|
|
|
57
57
|
const tmpIdentifier = opts.seed ? uuid.v5(Hex.encode(sha256(opts.seed)), uuid.NIL) : uuid.v4();
|
|
58
58
|
opts.method = opts.method ?? DidMethod.Iden3;
|
|
59
59
|
opts.blockchain = opts.blockchain ?? Blockchain.Polygon;
|
|
60
|
-
opts.networkId = opts.networkId ?? NetworkId.
|
|
60
|
+
opts.networkId = opts.networkId ?? NetworkId.Amoy;
|
|
61
61
|
await this._storage.mt.createIdentityMerkleTrees(tmpIdentifier);
|
|
62
62
|
opts.seed = opts.seed ?? getRandomBytes(32);
|
|
63
63
|
const keyId = await this._kms.createKeyFromSeed(KmsKeyType.BabyJubJub, opts.seed);
|
|
@@ -9,7 +9,7 @@ import { AuthV2PubSignals } from '../../circuits/auth-v2';
|
|
|
9
9
|
import { BaseConfig } from '../../circuits/common';
|
|
10
10
|
import { LinkedMultiQueryPubSignals, LinkedMultiQueryInputs } from '../../circuits/linked-multi-query';
|
|
11
11
|
import { CircuitId } from '../../circuits/models';
|
|
12
|
-
import { checkQueryRequest, fieldValueFromVerifiablePresentation, validateDisclosureV2Circuit, validateEmptyCredentialSubjectV2Circuit, validateOperators, verifyFieldValueInclusionV2, validateDisclosureNativeSDSupport, validateEmptyCredentialSubjectNoopNativeSupport, verifyFieldValueInclusionNativeExistsSupport } from './query';
|
|
12
|
+
import { checkQueryRequest, fieldValueFromVerifiablePresentation, validateDisclosureV2Circuit, validateEmptyCredentialSubjectV2Circuit, validateOperators, verifyFieldValueInclusionV2, validateDisclosureNativeSDSupport, validateEmptyCredentialSubjectNoopNativeSupport, verifyFieldValueInclusionNativeExistsSupport, checkCircuitOperator } from './query';
|
|
13
13
|
import { parseQueriesMetadata } from '../common';
|
|
14
14
|
import { Operators } from '../../circuits';
|
|
15
15
|
import { calculateQueryHashV3 } from './query-hash';
|
|
@@ -129,8 +129,10 @@ export class PubSignalsVerifier {
|
|
|
129
129
|
const queriesMetadata = await parseQueriesMetadata(query.type, JSON.stringify(context), query.credentialSubject, {
|
|
130
130
|
documentLoader: loader
|
|
131
131
|
});
|
|
132
|
-
|
|
132
|
+
const circuitId = CircuitId.AtomicQueryV3;
|
|
133
|
+
await checkQueryRequest(query, queriesMetadata, context, outs, circuitId, this._documentLoader, opts);
|
|
133
134
|
const queryMetadata = queriesMetadata[0]; // only one query is supported
|
|
135
|
+
checkCircuitOperator(circuitId, outs.operator);
|
|
134
136
|
// validate selective disclosure
|
|
135
137
|
if (queryMetadata.operator === Operators.SD) {
|
|
136
138
|
try {
|
|
@@ -350,6 +352,7 @@ export class PubSignalsVerifier {
|
|
|
350
352
|
});
|
|
351
353
|
await checkQueryRequest(query, queriesMetadata, context, outs, circuitId, this._documentLoader, opts);
|
|
352
354
|
const queryMetadata = queriesMetadata[0]; // only one query is supported
|
|
355
|
+
checkCircuitOperator(circuitId, outs.operator);
|
|
353
356
|
// validate selective disclosure
|
|
354
357
|
if (queryMetadata.operator === Operators.SD) {
|
|
355
358
|
try {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { DID, getDateFromUnixTimestamp } from '@iden3/js-iden3-core';
|
|
2
2
|
import { Merklizer, Path } from '@iden3/js-jsonld-merklization';
|
|
3
3
|
import { byteEncoder } from '../../utils';
|
|
4
|
-
import { Operators, QueryOperators } from '../../circuits/comparer';
|
|
4
|
+
import { getOperatorNameByValue, Operators, QueryOperators } from '../../circuits/comparer';
|
|
5
5
|
import { calculateCoreSchemaHash, VerifiableConstants } from '../../verifiable';
|
|
6
6
|
import { circuitValidator } from '../provers';
|
|
7
7
|
const defaultProofGenerationDelayOpts = 24 * 60 * 60 * 1000; // 24 hours
|
|
@@ -26,14 +26,7 @@ export async function checkQueryRequest(query, queriesMetadata, ldContext, outpu
|
|
|
26
26
|
if (!query.skipClaimRevocationCheck && outputs.isRevocationChecked === 0) {
|
|
27
27
|
throw new Error(`check revocation is required`);
|
|
28
28
|
}
|
|
29
|
-
|
|
30
|
-
if (queriesMetadata.length > circuitValidationData.maxQueriesCount) {
|
|
31
|
-
throw new Error(`circuit ${circuitId} supports only ${circuitValidator[circuitId].maxQueriesCount} queries`);
|
|
32
|
-
}
|
|
33
|
-
const notSupportedOpIndx = queriesMetadata.findIndex((i) => !circuitValidationData.supportedOperations.includes(i.operator));
|
|
34
|
-
if (notSupportedOpIndx > -1) {
|
|
35
|
-
throw new Error(`circuit ${circuitId} not support ${queriesMetadata[notSupportedOpIndx].operator} operator`);
|
|
36
|
-
}
|
|
29
|
+
checkCircuitQueriesLength(circuitId, queriesMetadata);
|
|
37
30
|
// verify timestamp
|
|
38
31
|
let acceptedProofGenerationDelay = defaultProofGenerationDelayOpts;
|
|
39
32
|
if (opts?.acceptedProofGenerationDelay) {
|
|
@@ -45,6 +38,18 @@ export async function checkQueryRequest(query, queriesMetadata, ldContext, outpu
|
|
|
45
38
|
}
|
|
46
39
|
return;
|
|
47
40
|
}
|
|
41
|
+
export function checkCircuitQueriesLength(circuitId, queriesMetadata) {
|
|
42
|
+
const circuitValidationData = circuitValidator[circuitId];
|
|
43
|
+
if (queriesMetadata.length > circuitValidationData.maxQueriesCount) {
|
|
44
|
+
throw new Error(`circuit ${circuitId} supports only ${circuitValidator[circuitId].maxQueriesCount} queries`);
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
export function checkCircuitOperator(circuitId, operator) {
|
|
48
|
+
const circuitValidationData = circuitValidator[circuitId];
|
|
49
|
+
if (!circuitValidationData.supportedOperations.includes(operator)) {
|
|
50
|
+
throw new Error(`circuit ${circuitId} not support ${getOperatorNameByValue(operator)} operator`);
|
|
51
|
+
}
|
|
52
|
+
}
|
|
48
53
|
export function verifyFieldValueInclusionV2(outputs, metadata) {
|
|
49
54
|
if (outputs.operator == QueryOperators.$noop) {
|
|
50
55
|
return;
|
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
import { Proof } from '@iden3/js-merkletree';
|
|
2
1
|
import { Id, Claim } from '@iden3/js-iden3-core';
|
|
3
2
|
import { Signature } from '@iden3/js-crypto';
|
|
4
3
|
import { Query, ClaimWithSigProof, TreeState, GISTProof } from './models';
|
|
5
|
-
import { Hash } from '@iden3/js-merkletree';
|
|
4
|
+
import { Hash, Proof } from '@iden3/js-merkletree';
|
|
6
5
|
import { BaseConfig } from './common';
|
|
7
6
|
/**
|
|
8
7
|
* AtomicQuerySigV2OnChainInputs ZK private inputs for credentialAtomicQuerySig.circom
|
|
@@ -26,6 +26,8 @@ export interface ClaimOutputs {
|
|
|
26
26
|
isRevocationChecked: number;
|
|
27
27
|
}
|
|
28
28
|
export declare function checkQueryRequest(query: ProofQuery, queriesMetadata: QueryMetadata[], ldContext: JsonLd, outputs: ClaimOutputs, circuitId: CircuitId, schemaLoader?: DocumentLoader, opts?: VerifyOpts): Promise<void>;
|
|
29
|
+
export declare function checkCircuitQueriesLength(circuitId: CircuitId, queriesMetadata: QueryMetadata[]): void;
|
|
30
|
+
export declare function checkCircuitOperator(circuitId: CircuitId, operator: number): void;
|
|
29
31
|
export declare function verifyFieldValueInclusionV2(outputs: ClaimOutputs, metadata: QueryMetadata): void;
|
|
30
32
|
export declare function verifyFieldValueInclusionNativeExistsSupport(outputs: ClaimOutputs, metadata: QueryMetadata): void;
|
|
31
33
|
export declare function validateEmptyCredentialSubjectV2Circuit(cq: QueryMetadata, outputs: ClaimOutputs): Promise<void>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@0xpolygonid/js-sdk",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.10.0",
|
|
4
4
|
"description": "SDK to work with Polygon ID",
|
|
5
5
|
"main": "dist/node/cjs/index.js",
|
|
6
6
|
"module": "dist/node/esm/index.js",
|
|
@@ -11,10 +11,11 @@
|
|
|
11
11
|
"require": "./dist/node/cjs/index.js"
|
|
12
12
|
},
|
|
13
13
|
"browser": "./dist/browser/esm/index.js",
|
|
14
|
-
"umd": "./dist/browser/umd/index.js"
|
|
14
|
+
"umd": "./dist/browser/umd/index.js",
|
|
15
|
+
"types": "./dist/types/index.d.ts"
|
|
15
16
|
}
|
|
16
17
|
},
|
|
17
|
-
"
|
|
18
|
+
"types": "dist/types/index.d.ts",
|
|
18
19
|
"source": "./src/index.ts",
|
|
19
20
|
"files": [
|
|
20
21
|
"dist"
|
|
@@ -33,7 +34,9 @@
|
|
|
33
34
|
"tsc:declaration:watch": "tsc --watch --module commonjs --emitDeclarationOnly",
|
|
34
35
|
"test": "env TS_NODE_COMPILER_OPTIONS='{\"strict\": false, \"module\": \"CommonJS\"}' mocha",
|
|
35
36
|
"lint": "eslint --fix --ext .ts src/** tests/**",
|
|
36
|
-
"
|
|
37
|
+
"lint:check": "eslint --ext .ts src/** tests/**",
|
|
38
|
+
"format": "prettier --write \"src/**/*.ts\" \"tests/**/*.ts\"",
|
|
39
|
+
"format:check": "prettier \"src/**/*.ts\" \"tests/**/*.ts\" --check"
|
|
37
40
|
},
|
|
38
41
|
"repository": {
|
|
39
42
|
"type": "git",
|
|
@@ -84,11 +87,11 @@
|
|
|
84
87
|
"typescript": "^4.8.4"
|
|
85
88
|
},
|
|
86
89
|
"peerDependencies": {
|
|
87
|
-
"@iden3/js-crypto": "1.0
|
|
88
|
-
"@iden3/js-iden3-core": "1.
|
|
89
|
-
"@iden3/js-jsonld-merklization": "1.
|
|
90
|
-
"@iden3/js-jwz": "1.
|
|
91
|
-
"@iden3/js-merkletree": "1.
|
|
90
|
+
"@iden3/js-crypto": "1.1.0",
|
|
91
|
+
"@iden3/js-iden3-core": "1.3.1",
|
|
92
|
+
"@iden3/js-jsonld-merklization": "1.2.0",
|
|
93
|
+
"@iden3/js-jwz": "1.4.0",
|
|
94
|
+
"@iden3/js-merkletree": "1.2.0",
|
|
92
95
|
"ffjavascript": "0.2.63",
|
|
93
96
|
"rfc4648": "1.5.3",
|
|
94
97
|
"snarkjs": "0.7.3"
|
|
@@ -120,6 +123,6 @@
|
|
|
120
123
|
]
|
|
121
124
|
},
|
|
122
125
|
"engines": {
|
|
123
|
-
"node": ">=
|
|
126
|
+
"node": ">=20.11.0"
|
|
124
127
|
}
|
|
125
128
|
}
|