@pagopa/io-react-native-wallet 0.3.1 → 0.4.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/README.md +57 -24
- package/lib/commonjs/index.js +39 -0
- package/lib/commonjs/index.js.map +1 -1
- package/lib/commonjs/rp/__test__/index.test.js +8 -1
- package/lib/commonjs/rp/__test__/index.test.js.map +1 -1
- package/lib/commonjs/rp/index.js +4 -13
- package/lib/commonjs/rp/index.js.map +1 -1
- package/lib/commonjs/rp/types.js +12 -32
- package/lib/commonjs/rp/types.js.map +1 -1
- package/lib/commonjs/trust/chain.js +94 -0
- package/lib/commonjs/trust/chain.js.map +1 -0
- package/lib/commonjs/trust/index.js +44 -0
- package/lib/commonjs/trust/index.js.map +1 -0
- package/lib/commonjs/trust/types.js +68 -0
- package/lib/commonjs/trust/types.js.map +1 -0
- package/lib/commonjs/wallet-instance-attestation/issuing.js +4 -4
- package/lib/commonjs/wallet-instance-attestation/issuing.js.map +1 -1
- package/lib/commonjs/wallet-instance-attestation/types.js +6 -9
- package/lib/commonjs/wallet-instance-attestation/types.js.map +1 -1
- package/lib/module/index.js +4 -1
- package/lib/module/index.js.map +1 -1
- package/lib/module/rp/__test__/index.test.js +8 -1
- package/lib/module/rp/__test__/index.test.js.map +1 -1
- package/lib/module/rp/index.js +4 -13
- package/lib/module/rp/index.js.map +1 -1
- package/lib/module/rp/types.js +12 -32
- package/lib/module/rp/types.js.map +1 -1
- package/lib/module/trust/chain.js +86 -0
- package/lib/module/trust/chain.js.map +1 -0
- package/lib/module/trust/index.js +34 -0
- package/lib/module/trust/index.js.map +1 -0
- package/lib/module/trust/types.js +56 -0
- package/lib/module/trust/types.js.map +1 -0
- package/lib/module/wallet-instance-attestation/issuing.js +4 -4
- package/lib/module/wallet-instance-attestation/issuing.js.map +1 -1
- package/lib/module/wallet-instance-attestation/types.js +6 -9
- package/lib/module/wallet-instance-attestation/types.js.map +1 -1
- package/lib/typescript/index.d.ts +4 -1
- package/lib/typescript/index.d.ts.map +1 -1
- package/lib/typescript/rp/index.d.ts.map +1 -1
- package/lib/typescript/rp/types.d.ts +463 -180
- package/lib/typescript/rp/types.d.ts.map +1 -1
- package/lib/typescript/trust/chain.d.ts +17 -0
- package/lib/typescript/trust/chain.d.ts.map +1 -0
- package/lib/typescript/trust/index.d.ts +16 -0
- package/lib/typescript/trust/index.d.ts.map +1 -0
- package/lib/typescript/trust/types.d.ts +1225 -0
- package/lib/typescript/trust/types.d.ts.map +1 -0
- package/lib/typescript/wallet-instance-attestation/types.d.ts +30 -50
- package/lib/typescript/wallet-instance-attestation/types.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/index.ts +13 -0
- package/src/rp/__test__/index.test.ts +8 -1
- package/src/rp/index.ts +4 -19
- package/src/rp/types.ts +19 -34
- package/src/trust/chain.ts +109 -0
- package/src/trust/index.ts +43 -0
- package/src/trust/types.ts +64 -0
- package/src/wallet-instance-attestation/issuing.ts +4 -4
- package/src/wallet-instance-attestation/types.ts +6 -9
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/rp/types.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,CAAC,MAAM,KAAK,CAAC;
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/rp/types.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,CAAC,MAAM,KAAK,CAAC;AAGzB,MAAM,MAAM,aAAa,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,aAAa,CAAC,CAAC;AAC1D,eAAO,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAqBxB,CAAC;AAEH;;GAEG;AACH,MAAM,MAAM,qBAAqB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,qBAAqB,CAAC,CAAC;AAC1E,eAA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AC;AAEH;;GAEG;AACH,MAAM,MAAM,YAAY,GAAG;IACO,MAAM;IACzB,MAAM,EAAE;CACtB,CAAC"}
|
@@ -0,0 +1,17 @@
|
|
1
|
+
import { TrustAnchorEntityConfiguration } from "./types";
|
2
|
+
import type { JWTDecodeResult } from "@pagopa/io-react-native-jwt/lib/typescript/types";
|
3
|
+
type ParsedToken = {
|
4
|
+
header: JWTDecodeResult["protectedHeader"];
|
5
|
+
payload: JWTDecodeResult["payload"];
|
6
|
+
};
|
7
|
+
/**
|
8
|
+
* Validates a provided trust chain against a known trust
|
9
|
+
*
|
10
|
+
* @param trustAnchorEntity
|
11
|
+
* @param chain
|
12
|
+
* @returns The list of parsed token representing the chain
|
13
|
+
* @throws {IoWalletError} If the chain is not valid
|
14
|
+
*/
|
15
|
+
export declare function verifyTrustChain(trustAnchorEntity: TrustAnchorEntityConfiguration, chain: string[]): Promise<ParsedToken[]>;
|
16
|
+
export {};
|
17
|
+
//# sourceMappingURL=chain.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"chain.d.ts","sourceRoot":"","sources":["../../../src/trust/chain.ts"],"names":[],"mappings":"AAIA,OAAO,EAGL,8BAA8B,EAC/B,MAAM,SAAS,CAAC;AAIjB,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,kDAAkD,CAAC;AAExF,KAAK,WAAW,GAAG;IACjB,MAAM,EAAE,eAAe,CAAC,iBAAiB,CAAC,CAAC;IAC3C,OAAO,EAAE,eAAe,CAAC,SAAS,CAAC,CAAC;CACrC,CAAC;AAiCF;;;;;;;GAOG;AACH,wBAAsB,gBAAgB,CACpC,iBAAiB,EAAE,8BAA8B,EACjD,KAAK,EAAE,MAAM,EAAE,GACd,OAAO,CAAC,WAAW,EAAE,CAAC,CA+CxB"}
|
@@ -0,0 +1,16 @@
|
|
1
|
+
import { EntityConfiguration } from "./types";
|
2
|
+
import { verifyTrustChain } from "./chain";
|
3
|
+
export { verifyTrustChain };
|
4
|
+
/**
|
5
|
+
* Fetch and parse teh entity configuration document for a given federation entity
|
6
|
+
*
|
7
|
+
* @param entityBaseUrl The base url of the entity.
|
8
|
+
* @param options.appFetch An optional instance of the http client to be used.
|
9
|
+
* @returns The parsed entity configuration object
|
10
|
+
* @throws {IoWalletError} If the http request fails
|
11
|
+
* @throws Parse error if the document is not in the expected shape.
|
12
|
+
*/
|
13
|
+
export declare function getEntityConfiguration(entityBaseUrl: string, { appFetch, }?: {
|
14
|
+
appFetch?: GlobalFetch["fetch"];
|
15
|
+
}): Promise<EntityConfiguration>;
|
16
|
+
//# sourceMappingURL=index.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/trust/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,mBAAmB,EAAE,MAAM,SAAS,CAAC;AAE9C,OAAO,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAC;AAE3C,OAAO,EAAE,gBAAgB,EAAE,CAAC;AAE5B;;;;;;;;GAQG;AACH,wBAAsB,sBAAsB,CAC1C,aAAa,EAAE,MAAM,EACrB,EACE,QAAgB,GACjB,GAAE;IACD,QAAQ,CAAC,EAAE,WAAW,CAAC,OAAO,CAAC,CAAC;CAC5B,GACL,OAAO,CAAC,mBAAmB,CAAC,CAmB9B"}
|