update network-core-sdk-mtls-example
This commit is contained in:
parent
9f2ea84960
commit
abf15d5164
25
.gitignore
vendored
Normal file
25
.gitignore
vendored
Normal file
@ -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
|
||||
22
README.md
22
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
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user