@pagopa/io-react-native-wallet 0.27.1 → 0.28.1
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/lib/commonjs/client/generated/wallet-provider.js +27 -19
- package/lib/commonjs/client/generated/wallet-provider.js.map +1 -1
- package/lib/commonjs/credential/issuance/03-start-user-authorization.js +3 -0
- package/lib/commonjs/credential/issuance/03-start-user-authorization.js.map +1 -1
- package/lib/commonjs/credential/presentation/01-start-flow.js +14 -24
- package/lib/commonjs/credential/presentation/01-start-flow.js.map +1 -1
- package/lib/commonjs/credential/presentation/03-get-request-object.js +30 -42
- package/lib/commonjs/credential/presentation/03-get-request-object.js.map +1 -1
- package/lib/commonjs/credential/presentation/04-retrieve-rp-jwks.js +32 -0
- package/lib/commonjs/credential/presentation/04-retrieve-rp-jwks.js.map +1 -0
- package/lib/commonjs/credential/presentation/05-verify-request-object.js +53 -0
- package/lib/commonjs/credential/presentation/05-verify-request-object.js.map +1 -0
- package/lib/commonjs/credential/presentation/06-fetch-presentation-definition.js +39 -0
- package/lib/commonjs/credential/presentation/06-fetch-presentation-definition.js.map +1 -0
- package/lib/commonjs/credential/presentation/07-evaluate-dcql-query.js +125 -0
- package/lib/commonjs/credential/presentation/07-evaluate-dcql-query.js.map +1 -0
- package/lib/commonjs/credential/presentation/07-evaluate-input-descriptor.js +289 -0
- package/lib/commonjs/credential/presentation/07-evaluate-input-descriptor.js.map +1 -0
- package/lib/commonjs/credential/presentation/08-send-authorization-response.js +170 -0
- package/lib/commonjs/credential/presentation/08-send-authorization-response.js.map +1 -0
- package/lib/commonjs/credential/presentation/errors.js +69 -1
- package/lib/commonjs/credential/presentation/errors.js.map +1 -1
- package/lib/commonjs/credential/presentation/index.js +29 -1
- package/lib/commonjs/credential/presentation/index.js.map +1 -1
- package/lib/commonjs/credential/presentation/types.js +124 -3
- package/lib/commonjs/credential/presentation/types.js.map +1 -1
- package/lib/commonjs/sd-jwt/index.js +41 -1
- package/lib/commonjs/sd-jwt/index.js.map +1 -1
- package/lib/commonjs/trust/chain.js +35 -50
- package/lib/commonjs/trust/chain.js.map +1 -1
- package/lib/commonjs/trust/index.js +139 -16
- package/lib/commonjs/trust/index.js.map +1 -1
- package/lib/commonjs/trust/types.js +36 -12
- package/lib/commonjs/trust/types.js.map +1 -1
- package/lib/commonjs/trust/utils.js +41 -0
- package/lib/commonjs/trust/utils.js.map +1 -0
- package/lib/commonjs/utils/jwk.js +5 -1
- package/lib/commonjs/utils/jwk.js.map +1 -1
- package/lib/commonjs/wallet-instance/index.js +10 -0
- package/lib/commonjs/wallet-instance/index.js.map +1 -1
- package/lib/module/client/generated/wallet-provider.js +22 -15
- package/lib/module/client/generated/wallet-provider.js.map +1 -1
- package/lib/module/credential/issuance/03-start-user-authorization.js +3 -0
- package/lib/module/credential/issuance/03-start-user-authorization.js.map +1 -1
- package/lib/module/credential/presentation/01-start-flow.js +14 -24
- package/lib/module/credential/presentation/01-start-flow.js.map +1 -1
- package/lib/module/credential/presentation/03-get-request-object.js +31 -43
- package/lib/module/credential/presentation/03-get-request-object.js.map +1 -1
- package/lib/module/credential/presentation/04-retrieve-rp-jwks.js +25 -0
- package/lib/module/credential/presentation/04-retrieve-rp-jwks.js.map +1 -0
- package/lib/module/credential/presentation/05-verify-request-object.js +46 -0
- package/lib/module/credential/presentation/05-verify-request-object.js.map +1 -0
- package/lib/module/credential/presentation/06-fetch-presentation-definition.js +32 -0
- package/lib/module/credential/presentation/06-fetch-presentation-definition.js.map +1 -0
- package/lib/module/credential/presentation/07-evaluate-dcql-query.js +117 -0
- package/lib/module/credential/presentation/07-evaluate-dcql-query.js.map +1 -0
- package/lib/module/credential/presentation/07-evaluate-input-descriptor.js +278 -0
- package/lib/module/credential/presentation/07-evaluate-input-descriptor.js.map +1 -0
- package/lib/module/credential/presentation/08-send-authorization-response.js +158 -0
- package/lib/module/credential/presentation/08-send-authorization-response.js.map +1 -0
- package/lib/module/credential/presentation/errors.js +64 -0
- package/lib/module/credential/presentation/errors.js.map +1 -1
- package/lib/module/credential/presentation/index.js +6 -2
- package/lib/module/credential/presentation/index.js.map +1 -1
- package/lib/module/credential/presentation/types.js +121 -2
- package/lib/module/credential/presentation/types.js.map +1 -1
- package/lib/module/sd-jwt/index.js +40 -1
- package/lib/module/sd-jwt/index.js.map +1 -1
- package/lib/module/trust/chain.js +32 -46
- package/lib/module/trust/chain.js.map +1 -1
- package/lib/module/trust/index.js +139 -18
- package/lib/module/trust/index.js.map +1 -1
- package/lib/module/trust/types.js +34 -11
- package/lib/module/trust/types.js.map +1 -1
- package/lib/module/trust/utils.js +33 -0
- package/lib/module/trust/utils.js.map +1 -0
- package/lib/module/utils/jwk.js +3 -0
- package/lib/module/utils/jwk.js.map +1 -1
- package/lib/module/wallet-instance/index.js +9 -0
- package/lib/module/wallet-instance/index.js.map +1 -1
- package/lib/typescript/client/generated/wallet-provider.d.ts +91 -54
- package/lib/typescript/client/generated/wallet-provider.d.ts.map +1 -1
- package/lib/typescript/credential/issuance/03-start-user-authorization.d.ts.map +1 -1
- package/lib/typescript/credential/presentation/01-start-flow.d.ts +26 -5
- package/lib/typescript/credential/presentation/01-start-flow.d.ts.map +1 -1
- package/lib/typescript/credential/presentation/03-get-request-object.d.ts +7 -10
- package/lib/typescript/credential/presentation/03-get-request-object.d.ts.map +1 -1
- package/lib/typescript/credential/presentation/04-retrieve-rp-jwks.d.ts +23 -0
- package/lib/typescript/credential/presentation/04-retrieve-rp-jwks.d.ts.map +1 -0
- package/lib/typescript/credential/presentation/05-verify-request-object.d.ts +18 -0
- package/lib/typescript/credential/presentation/05-verify-request-object.d.ts.map +1 -0
- package/lib/typescript/credential/presentation/06-fetch-presentation-definition.d.ts +21 -0
- package/lib/typescript/credential/presentation/06-fetch-presentation-definition.d.ts.map +1 -0
- package/lib/typescript/credential/presentation/07-evaluate-dcql-query.d.ts +20 -0
- package/lib/typescript/credential/presentation/07-evaluate-dcql-query.d.ts.map +1 -0
- package/lib/typescript/credential/presentation/07-evaluate-input-descriptor.d.ts +88 -0
- package/lib/typescript/credential/presentation/07-evaluate-input-descriptor.d.ts.map +1 -0
- package/lib/typescript/credential/presentation/08-send-authorization-response.d.ts +70 -0
- package/lib/typescript/credential/presentation/08-send-authorization-response.d.ts.map +1 -0
- package/lib/typescript/credential/presentation/errors.d.ts +44 -0
- package/lib/typescript/credential/presentation/errors.d.ts.map +1 -1
- package/lib/typescript/credential/presentation/index.d.ts +7 -3
- package/lib/typescript/credential/presentation/index.d.ts.map +1 -1
- package/lib/typescript/credential/presentation/types.d.ts +747 -10
- package/lib/typescript/credential/presentation/types.d.ts.map +1 -1
- package/lib/typescript/credential/status/types.d.ts +6 -6
- package/lib/typescript/sd-jwt/index.d.ts +31 -12
- package/lib/typescript/sd-jwt/index.d.ts.map +1 -1
- package/lib/typescript/sd-jwt/types.d.ts +6 -6
- package/lib/typescript/trust/chain.d.ts +4 -9
- package/lib/typescript/trust/chain.d.ts.map +1 -1
- package/lib/typescript/trust/index.d.ts +337 -61
- package/lib/typescript/trust/index.d.ts.map +1 -1
- package/lib/typescript/trust/types.d.ts +4074 -407
- package/lib/typescript/trust/types.d.ts.map +1 -1
- package/lib/typescript/trust/utils.d.ts +12 -0
- package/lib/typescript/trust/utils.d.ts.map +1 -0
- package/lib/typescript/utils/decoder.d.ts +1 -1
- package/lib/typescript/utils/decoder.d.ts.map +1 -1
- package/lib/typescript/utils/jwk.d.ts +137 -0
- package/lib/typescript/utils/jwk.d.ts.map +1 -1
- package/lib/typescript/wallet-instance/index.d.ts +8 -0
- package/lib/typescript/wallet-instance/index.d.ts.map +1 -1
- package/lib/typescript/wallet-instance-attestation/types.d.ts +36 -36
- package/package.json +5 -2
- package/src/client/generated/wallet-provider.ts +28 -19
- package/src/credential/issuance/03-start-user-authorization.ts +3 -0
- package/src/credential/presentation/01-start-flow.ts +19 -26
- package/src/credential/presentation/03-get-request-object.ts +35 -58
- package/src/credential/presentation/04-retrieve-rp-jwks.ts +34 -0
- package/src/credential/presentation/05-verify-request-object.ts +52 -0
- package/src/credential/presentation/06-fetch-presentation-definition.ts +48 -0
- package/src/credential/presentation/07-evaluate-dcql-query.ts +166 -0
- package/src/credential/presentation/07-evaluate-input-descriptor.ts +391 -0
- package/src/credential/presentation/08-send-authorization-response.ts +220 -0
- package/src/credential/presentation/errors.ts +64 -0
- package/src/credential/presentation/index.ts +22 -1
- package/src/credential/presentation/types.ts +133 -2
- package/src/sd-jwt/index.ts +49 -1
- package/src/trust/chain.ts +46 -66
- package/src/trust/index.ts +185 -20
- package/src/trust/types.ts +34 -10
- package/src/trust/utils.ts +35 -0
- package/src/utils/decoder.ts +1 -1
- package/src/utils/jwk.ts +8 -1
- package/src/wallet-instance/index.ts +13 -0
- package/lib/commonjs/credential/presentation/04-send-authorization-response.js +0 -138
- package/lib/commonjs/credential/presentation/04-send-authorization-response.js.map +0 -1
- package/lib/module/credential/presentation/04-send-authorization-response.js +0 -128
- package/lib/module/credential/presentation/04-send-authorization-response.js.map +0 -1
- package/lib/typescript/credential/presentation/04-send-authorization-response.d.ts +0 -34
- package/lib/typescript/credential/presentation/04-send-authorization-response.d.ts.map +0 -1
- package/src/credential/presentation/04-send-authorization-response.ts +0 -168
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/credential/presentation/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,6BAA6B,CAAC;AAEjE,OAAO,KAAK,CAAC,MAAM,KAAK,CAAC;AAEzB;;GAEG;AACH,MAAM,MAAM,YAAY,GAAG;IACO,MAAM;IACzB,MAAM,EAAE;IACsC,aAAa;CACzE,CAAC;AAEF,MAAM,MAAM,aAAa,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,aAAa,CAAC,CAAC;AAC1D,eAAO,MAAM,aAAa
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/credential/presentation/types.ts"],"names":[],"mappings":"A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
230
|
-
alg: string;
|
231
|
-
typ: "status-attestation+jwt";
|
232
|
-
kid?: string | undefined;
|
233
|
-
};
|
234
229
|
payload: {
|
235
230
|
iat: number;
|
236
231
|
exp: number;
|
@@ -263,12 +258,12 @@ export declare const ParsedStatusAttestation: z.ZodObject<{
|
|
263
258
|
};
|
264
259
|
credential_hash: string;
|
265
260
|
};
|
266
|
-
}, {
|
267
261
|
header: {
|
268
262
|
alg: string;
|
269
263
|
typ: "status-attestation+jwt";
|
270
264
|
kid?: string | undefined;
|
271
265
|
};
|
266
|
+
}, {
|
272
267
|
payload: {
|
273
268
|
iat: number;
|
274
269
|
exp: number;
|
@@ -301,5 +296,10 @@ export declare const ParsedStatusAttestation: z.ZodObject<{
|
|
301
296
|
};
|
302
297
|
credential_hash: string;
|
303
298
|
};
|
299
|
+
header: {
|
300
|
+
alg: string;
|
301
|
+
typ: "status-attestation+jwt";
|
302
|
+
kid?: string | undefined;
|
303
|
+
};
|
304
304
|
}>;
|
305
305
|
//# sourceMappingURL=types.d.ts.map
|
@@ -2,6 +2,7 @@ import { z } from "zod";
|
|
2
2
|
import { Disclosure, SdJwt4VC, type DisclosureWithEncoded } from "./types";
|
3
3
|
import type { JWK } from "../utils/jwk";
|
4
4
|
import * as Errors from "./errors";
|
5
|
+
import { type Presentation } from "../credential/presentation/types";
|
5
6
|
/**
|
6
7
|
* Decode a given SD-JWT with Disclosures to get the parsed SD-JWT object they define.
|
7
8
|
* It ensures provided data is in a valid shape.
|
@@ -17,11 +18,6 @@ import * as Errors from "./errors";
|
|
17
18
|
*
|
18
19
|
*/
|
19
20
|
export declare const decode: <S extends z.ZodType<{
|
20
|
-
header: {
|
21
|
-
alg: string;
|
22
|
-
typ: "vc+sd-jwt";
|
23
|
-
kid?: string | undefined;
|
24
|
-
};
|
25
21
|
payload: {
|
26
22
|
iss: string;
|
27
23
|
status: {
|
@@ -63,12 +59,12 @@ export declare const decode: <S extends z.ZodType<{
|
|
63
59
|
} & {
|
64
60
|
_sd: string[];
|
65
61
|
};
|
66
|
-
}, z.ZodTypeDef, {
|
67
62
|
header: {
|
68
63
|
alg: string;
|
69
64
|
typ: "vc+sd-jwt";
|
70
65
|
kid?: string | undefined;
|
71
66
|
};
|
67
|
+
}, z.ZodTypeDef, {
|
72
68
|
payload: {
|
73
69
|
iss: string;
|
74
70
|
status: {
|
@@ -110,6 +106,11 @@ export declare const decode: <S extends z.ZodType<{
|
|
110
106
|
} & {
|
111
107
|
_sd: string[];
|
112
108
|
};
|
109
|
+
header: {
|
110
|
+
alg: string;
|
111
|
+
typ: "vc+sd-jwt";
|
112
|
+
kid?: string | undefined;
|
113
|
+
};
|
113
114
|
}>>(token: string, customSchema?: S | undefined) => {
|
114
115
|
sdJwt: z.TypeOf<S>;
|
115
116
|
disclosures: DisclosureWithEncoded[];
|
@@ -151,11 +152,6 @@ export declare const disclose: (token: string, claims: string[]) => Promise<{
|
|
151
152
|
*
|
152
153
|
*/
|
153
154
|
export declare const verify: <S extends z.ZodType<{
|
154
|
-
header: {
|
155
|
-
alg: string;
|
156
|
-
typ: "vc+sd-jwt";
|
157
|
-
kid?: string | undefined;
|
158
|
-
};
|
159
155
|
payload: {
|
160
156
|
iss: string;
|
161
157
|
status: {
|
@@ -197,12 +193,12 @@ export declare const verify: <S extends z.ZodType<{
|
|
197
193
|
} & {
|
198
194
|
_sd: string[];
|
199
195
|
};
|
200
|
-
}, z.ZodTypeDef, {
|
201
196
|
header: {
|
202
197
|
alg: string;
|
203
198
|
typ: "vc+sd-jwt";
|
204
199
|
kid?: string | undefined;
|
205
200
|
};
|
201
|
+
}, z.ZodTypeDef, {
|
206
202
|
payload: {
|
207
203
|
iss: string;
|
208
204
|
status: {
|
@@ -244,9 +240,32 @@ export declare const verify: <S extends z.ZodType<{
|
|
244
240
|
} & {
|
245
241
|
_sd: string[];
|
246
242
|
};
|
243
|
+
header: {
|
244
|
+
alg: string;
|
245
|
+
typ: "vc+sd-jwt";
|
246
|
+
kid?: string | undefined;
|
247
|
+
};
|
247
248
|
}>>(token: string, publicKey: JWK | JWK[], customSchema?: S | undefined) => Promise<{
|
248
249
|
sdJwt: z.TypeOf<S>;
|
249
250
|
disclosures: Disclosure[];
|
250
251
|
}>;
|
252
|
+
/**
|
253
|
+
* Prepares a Verified Presentation (VP) token to be sent as part of an
|
254
|
+
* authorization response in an OpenID 4 Verifiable Presentations flow.
|
255
|
+
*
|
256
|
+
* @param nonce - The nonce provided by the relying party.
|
257
|
+
* @param client_id - The client identifier of the relying party.
|
258
|
+
* @param presentation - An object containing the verifiable credential, the claims to disclose,
|
259
|
+
* and the cryptographic context for signing.
|
260
|
+
* @returns An object containing the signed VP token (`vp_token`).
|
261
|
+
*
|
262
|
+
* @remarks
|
263
|
+
* 1. The `disclose()` function is used to produce a token with only the requested claims.
|
264
|
+
* 2. A KB-JWT is then signed, including sd_hash and `nonce`.
|
265
|
+
* 3. The `vp_token` is composed of the disclosed VP and the KB-JWT.
|
266
|
+
*/
|
267
|
+
export declare const prepareVpToken: (nonce: string, client_id: string, [verifiableCredential, requestedClaims, cryptoContext]: Presentation) => Promise<{
|
268
|
+
vp_token: string;
|
269
|
+
}>;
|
251
270
|
export { SdJwt4VC, Errors };
|
252
271
|
//# sourceMappingURL=index.d.ts.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/sd-jwt/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAKxB,OAAO,EAAE,UAAU,EAAE,QAAQ,EAAE,KAAK,qBAAqB,EAAE,MAAM,SAAS,CAAC;AAE3E,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,cAAc,CAAC;AACxC,OAAO,KAAK,MAAM,MAAM,UAAU,CAAC;
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/sd-jwt/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAKxB,OAAO,EAAE,UAAU,EAAE,QAAQ,EAAE,KAAK,qBAAqB,EAAE,MAAM,SAAS,CAAC;AAE3E,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,cAAc,CAAC;AACxC,OAAO,KAAK,MAAM,MAAM,UAAU,CAAC;AAEnC,OAAO,EAAE,KAAK,YAAY,EAAE,MAAM,kCAAkC,CAAC;AAQrE;;;;;;;;;;;;;GAaG;AACH,eAAO,MAAM,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;WACV,MAAM;;iBAIA,qBAAqB,EAAE;CA0BrC,CAAC;AAEF;;;;;;;;;;;;GAYG;AACH,eAAO,MAAM,QAAQ,UACZ,MAAM,UACL,MAAM,EAAE;WACE,MAAM;WAAS;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAA;KAAE,EAAE;EAwCnE,CAAC;AAEF;;;;;;;;;;;;;;;GAeG;AACH,eAAO,MAAM,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;WACV,MAAM,aACF,GAAG,GAAG,GAAG,EAAE;;iBAEqB,UAAU,EAAE;EAqBxD,CAAC;AAEF;;;;;;;;;;;;;;GAcG;AACH,eAAO,MAAM,cAAc,UAClB,MAAM,aACF,MAAM;cAGP,MAAM;EAyBjB,CAAC;AAEF,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAE,CAAC"}
|
@@ -274,11 +274,6 @@ export declare const SdJwt4VC: z.ZodObject<{
|
|
274
274
|
_sd: string[];
|
275
275
|
}>>;
|
276
276
|
}, "strip", z.ZodTypeAny, {
|
277
|
-
header: {
|
278
|
-
alg: string;
|
279
|
-
typ: "vc+sd-jwt";
|
280
|
-
kid?: string | undefined;
|
281
|
-
};
|
282
277
|
payload: {
|
283
278
|
iss: string;
|
284
279
|
status: {
|
@@ -320,12 +315,12 @@ export declare const SdJwt4VC: z.ZodObject<{
|
|
320
315
|
} & {
|
321
316
|
_sd: string[];
|
322
317
|
};
|
323
|
-
}, {
|
324
318
|
header: {
|
325
319
|
alg: string;
|
326
320
|
typ: "vc+sd-jwt";
|
327
321
|
kid?: string | undefined;
|
328
322
|
};
|
323
|
+
}, {
|
329
324
|
payload: {
|
330
325
|
iss: string;
|
331
326
|
status: {
|
@@ -367,5 +362,10 @@ export declare const SdJwt4VC: z.ZodObject<{
|
|
367
362
|
} & {
|
368
363
|
_sd: string[];
|
369
364
|
};
|
365
|
+
header: {
|
366
|
+
alg: string;
|
367
|
+
typ: "vc+sd-jwt";
|
368
|
+
kid?: string | undefined;
|
369
|
+
};
|
370
370
|
}>;
|
371
371
|
//# sourceMappingURL=types.d.ts.map
|
@@ -1,14 +1,10 @@
|
|
1
1
|
import { TrustAnchorEntityConfiguration } from "./types";
|
2
|
-
import type
|
3
|
-
type ParsedToken = {
|
4
|
-
header: JWTDecodeResult["protectedHeader"];
|
5
|
-
payload: JWTDecodeResult["payload"];
|
6
|
-
};
|
2
|
+
import { type ParsedToken } from "./utils";
|
7
3
|
/**
|
8
4
|
* Validates a provided trust chain against a known trust
|
9
5
|
*
|
10
6
|
* @param trustAnchorEntity The entity configuration of the known trust anchor
|
11
|
-
* @param chain The chain of statements to be
|
7
|
+
* @param chain The chain of statements to be validated
|
12
8
|
* @returns The list of parsed token representing the chain
|
13
9
|
* @throws {IoWalletError} If the chain is not valid
|
14
10
|
*/
|
@@ -18,9 +14,8 @@ export declare function validateTrustChain(trustAnchorEntity: TrustAnchorEntityC
|
|
18
14
|
*
|
19
15
|
* @param chain The original chain
|
20
16
|
* @param appFetch (optional) fetch api implementation
|
21
|
-
* @returns A list of signed token that
|
22
|
-
* @throws When an element of the chain fails to parse
|
17
|
+
* @returns A list of signed token that represent the trust chain, in the same order of the provided chain
|
18
|
+
* @throws IoWalletError When an element of the chain fails to parse
|
23
19
|
*/
|
24
20
|
export declare function renewTrustChain(chain: string[], appFetch?: GlobalFetch["fetch"]): Promise<string[]>;
|
25
|
-
export {};
|
26
21
|
//# sourceMappingURL=chain.d.ts.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"chain.d.ts","sourceRoot":"","sources":["../../../src/trust/chain.ts"],"names":[],"mappings":"
|
1
|
+
{"version":3,"file":"chain.d.ts","sourceRoot":"","sources":["../../../src/trust/chain.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,8BAA8B,EAC/B,MAAM,SAAS,CAAC;AAKjB,OAAO,EAAU,KAAK,WAAW,EAAU,MAAM,SAAS,CAAC;AAa3D;;;;;;;GAOG;AACH,wBAAsB,kBAAkB,CACtC,iBAAiB,EAAE,8BAA8B,EACjD,KAAK,EAAE,MAAM,EAAE,GACd,OAAO,CAAC,WAAW,EAAE,CAAC,CA+CxB;AAED;;;;;;;GAOG;AACH,wBAAsB,eAAe,CACnC,KAAK,EAAE,MAAM,EAAE,EACf,QAAQ,GAAE,WAAW,CAAC,OAAO,CAAS,GACrC,OAAO,CAAC,MAAM,EAAE,CAAC,CAyCnB"}
|