@zkproofport-app/sdk 0.2.0 → 0.2.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 +13 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -159,6 +159,19 @@ interface WalletSigner {
|
|
|
159
159
|
|
|
160
160
|
Any ethers v5/v6 `Signer` is compatible.
|
|
161
161
|
|
|
162
|
+
#### About challenge-signature
|
|
163
|
+
|
|
164
|
+
The challenge-signature mechanism was developed **for relay nonce replay prevention**. Each challenge is one-time use and consumed immediately. The signer's recovered address is recorded as `clientId` in relay server logs, which helps the relay operator track requests.
|
|
165
|
+
|
|
166
|
+
For server-side or headless environments, using an ephemeral random wallet is fine. A persistent wallet (fixed private key) is **not recommended** as it adds unnecessary key management overhead with no functional benefit.
|
|
167
|
+
|
|
168
|
+
```typescript
|
|
169
|
+
import { Wallet } from 'ethers';
|
|
170
|
+
|
|
171
|
+
// Server-side: ephemeral wallet per request
|
|
172
|
+
sdk.setSigner(Wallet.createRandom());
|
|
173
|
+
```
|
|
174
|
+
|
|
162
175
|
### Step 3: Create Request (via Relay)
|
|
163
176
|
|
|
164
177
|
`createRelayRequest` authenticates with the relay (challenge-signature), creates a tracked proof request, and returns a deep link.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zkproofport-app/sdk",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.1",
|
|
4
4
|
"description": "ZKProofport SDK for requesting zero-knowledge proofs from the ZKProofport mobile app and verifying them on-chain",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"module": "dist/index.esm.js",
|