nirium-avalanche 0.4.0 → 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 +3 -4
- package/package.json +1 -1
- package/verify-evm-pq.mjs +3 -1
package/README.md
CHANGED
|
@@ -50,11 +50,11 @@ npx -p nirium-avalanche nirium-verify-evm receipt.json
|
|
|
50
50
|
|
|
51
51
|
Exit code 0 means valid, 1 means a check failed, 2 means bad input.
|
|
52
52
|
|
|
53
|
-
## Post-quantum signature
|
|
53
|
+
## Post-quantum signature
|
|
54
54
|
|
|
55
55
|
A receipt can also carry an ML-DSA-65 (NIST FIPS 204) signature over the same statement the payer
|
|
56
56
|
signs with EIP-191. The payer registers sha-256 of that key once, from its own address, in
|
|
57
|
-
`NiriumPqKeyRegistry` (Fuji `0x3aE0F4004bb67B8f754DE1fa8EA666A1B301D5b3`); the verifier accepts the
|
|
57
|
+
`NiriumPqKeyRegistry` (C-Chain `0xE7791Fa06FE503AacE8fa4f6FC2DFdc3922ba0a0`, Fuji `0x3aE0F4004bb67B8f754DE1fa8EA666A1B301D5b3`); the verifier accepts the
|
|
58
58
|
key only if it was registered in a block before the payment.
|
|
59
59
|
|
|
60
60
|
```js
|
|
@@ -68,8 +68,7 @@ const { ok } = await verifyReceipt(receipt, { requirePq: true });
|
|
|
68
68
|
|
|
69
69
|
`npx -p nirium-avalanche nirium-verify-evm receipt.json --require-pq` does the same from the command
|
|
70
70
|
line. It protects the receipt, not the payment (the payment stays signed with secp256k1). The
|
|
71
|
-
ML-DSA check runs in the verifier, not in a contract: C-Chain has no ML-DSA precompile.
|
|
72
|
-
registry is on Fuji only for now.
|
|
71
|
+
ML-DSA check runs in the verifier, not in a contract: C-Chain has no ML-DSA precompile.
|
|
73
72
|
|
|
74
73
|
Receipts are tamper-evident, not tamper-proof, and they do not prove that goods or a service
|
|
75
74
|
were delivered. Non-custodial: every key stays with whoever pays or receives. No external audit
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "nirium-avalanche",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.1",
|
|
4
4
|
"description": "Pay and charge with x402 on Avalanche, refuse a payment before it is signed, and keep a payer-signed receipt bound to the exact USDC transfer, optionally with a post-quantum (ML-DSA-65) signature",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "Apache-2.0",
|
package/verify-evm-pq.mjs
CHANGED
|
@@ -24,10 +24,12 @@ export const PQ_SIGNATURE_BYTES = 3309;
|
|
|
24
24
|
const STATEMENT_PREFIX = "nirium-audit-v1:";
|
|
25
25
|
const BASE64 = /^[A-Za-z0-9+/]+={0,2}$/;
|
|
26
26
|
|
|
27
|
-
/** NiriumPqKeyRegistry per network.
|
|
27
|
+
/** NiriumPqKeyRegistry per network. */
|
|
28
28
|
export const PQ_REGISTRY = Object.freeze({
|
|
29
29
|
// Fuji, deployed 4-dic-2026: tx 0xf8257751da2de50611bfc7eb558dfed84cb94034f5c5ffd72882747690e8187f, block 62126784
|
|
30
30
|
"eip155:43113": "0x3aE0F4004bb67B8f754DE1fa8EA666A1B301D5b3",
|
|
31
|
+
// C-Chain mainnet, deployed 5-dic-2026: tx 0x4f28ae73fffeea3008582975b41e13b5bee3047db7dd62ed52754145a2f75a46, block 102260794
|
|
32
|
+
"eip155:43114": "0xE7791Fa06FE503AacE8fa4f6FC2DFdc3922ba0a0",
|
|
31
33
|
});
|
|
32
34
|
|
|
33
35
|
export const PQ_REGISTRY_ABI = parseAbi([
|