From abf15d516488ae1ff61c788940e020d130e0f15a Mon Sep 17 00:00:00 2001 From: fksyuan Date: Tue, 23 Dec 2025 20:39:06 +0800 Subject: [PATCH] update network-core-sdk-mtls-example --- .gitignore | 25 +++++++++++++++++++++++++ README.md | 22 +++++++++++----------- 2 files changed, 36 insertions(+), 11 deletions(-) create mode 100644 .gitignore diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..7ceb59f --- /dev/null +++ b/.gitignore @@ -0,0 +1,25 @@ +# Logs +logs +*.log +npm-debug.log* +yarn-debug.log* +yarn-error.log* +pnpm-debug.log* +lerna-debug.log* + +node_modules +dist +dist-ssr +*.local + +# Editor directories and files +.vscode/* +!.vscode/extensions.json +.idea +.DS_Store +*.suo +*.ntvs* +*.njsproj +*.sln +*.sw? +.env diff --git a/README.md b/README.md index 239bae0..ee1c57f 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ ## About Primus Network-Core-SDK -When integrating data verification solutions into your **backend** server, you can utilize the [**Primus Network Core SDK**](https://docs.primuslabs.xyz/primus-network/build-with-primus/for-backend/simpleexample). For integrating Primus network capabilities with DApps for end users, please refer to the [DApp Integration](https://docs.primuslabs.xyz/primus-network/build-with-primus/for-developers/example) guide. +When integrating data verification solutions into your **backend** server, you can utilize the [**Primus Network Core SDK**](https://docs.primuslabs.xyz/primus-network/build-with-primus/for-backend/simpleexample). The Network-Core-SDK allows you to verify data through API endpoint responses. An authorized token or other credential is required to request private data if the data source server requires permissioned access. Note that in the backend integration situation, the developer usually proves their off-chain data in their built application, and the Primus extension is **not** required. Typical scenarios include proof of reserves, in which a configured web page periodically proves that the stablecoin issuer holds sufficient collateral across off-chain platforms. @@ -29,16 +29,6 @@ const mTLS = { }; ``` -## Run -```bash -node index.js -``` - -You should see logs for: -- submit task result -- attest result -- task result - ## Customize Edit these sections in `index.js`: - `address`: your wallet address @@ -49,3 +39,13 @@ Edit these sections in `index.js`: ## Notes - Keep your `.env` out of version control. - The example uses a public RPC; for reliability, use your own provider endpoint. + +## Run +```bash +node index.js +``` + +You should see logs for: +- submit task result +- attest result +- task result