From 5b0893af1f9412f11a400dab0d5fe4f7b0211fc9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lloren=C3=A7?= Date: Tue, 3 Sep 2024 15:30:18 +0200 Subject: [PATCH] Update readme --- js-library/README.md | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/js-library/README.md b/js-library/README.md index 5b0a68c..b224949 100644 --- a/js-library/README.md +++ b/js-library/README.md @@ -18,13 +18,18 @@ The bundle needs peer dependencies, be sure that following resources are availab npm install @dfinity/principal ``` -Import per modules: +Import per modules to have small app size: ```javascript -// import * from '@dfinity/verifiable-credentials'; // Error: use sub-imports, to ensure small app size import { requestVerifiablePresentation } from "@dfinity/verifiable-credentials/request-verifiable-presentation"; ``` +Or import default: + +```javascript +import { requestVerifiablePresentation } from "@dfinity/verifiable-credentials"; +``` + ## Relying Party: Request Credentials Use the function `requestVerifiablePresentation` to request credentials from an issuer.