mirror of
https://github.com/luxfi/lamport.git
synced 2026-10-30 16:21:45 +00:00
SDK (@luxfi/lamport): - Key generation: generateKeyPair(), generateKeyChain() - Signing: sign(), signWithRotation() - Verification: verify(), computePKH(), computeMessage() - Threshold: generateKeyShares(), createSigningSession(), combineSignatures() - Safe integration: prepareSafeTransaction() - Contract ABIs: LamportVerifier, LamportSafe, LamportThreshold, LamportOptimized - Solidity contracts included for direct import Paper (v1.0.0): - Added historical context (Lamport 1979 → NIST 2024) - Updated gas benchmarks from actual tests - Added threshold architecture section - Comprehensive security theorems and proofs - NIST PQC comparison table - 10 bibliography references - Table of contents and appendices Ready for npm publish: pnpm publish --access public
213 lines
3.8 KiB
JSON
213 lines
3.8 KiB
JSON
[
|
|
{
|
|
"type": "function",
|
|
"name": "computeMessage",
|
|
"inputs": [
|
|
{
|
|
"name": "txHash",
|
|
"type": "bytes32",
|
|
"internalType": "bytes32"
|
|
},
|
|
{
|
|
"name": "nextPKH",
|
|
"type": "bytes32",
|
|
"internalType": "bytes32"
|
|
}
|
|
],
|
|
"outputs": [
|
|
{
|
|
"name": "",
|
|
"type": "uint256",
|
|
"internalType": "uint256"
|
|
}
|
|
],
|
|
"stateMutability": "view"
|
|
},
|
|
{
|
|
"type": "function",
|
|
"name": "computePKH",
|
|
"inputs": [
|
|
{
|
|
"name": "pub",
|
|
"type": "bytes32[2][256]",
|
|
"internalType": "bytes32[2][256]"
|
|
}
|
|
],
|
|
"outputs": [
|
|
{
|
|
"name": "",
|
|
"type": "bytes32",
|
|
"internalType": "bytes32"
|
|
}
|
|
],
|
|
"stateMutability": "pure"
|
|
},
|
|
{
|
|
"type": "function",
|
|
"name": "init",
|
|
"inputs": [
|
|
{
|
|
"name": "firstPKH",
|
|
"type": "bytes32",
|
|
"internalType": "bytes32"
|
|
}
|
|
],
|
|
"outputs": [],
|
|
"stateMutability": "nonpayable"
|
|
},
|
|
{
|
|
"type": "function",
|
|
"name": "initialized",
|
|
"inputs": [],
|
|
"outputs": [
|
|
{
|
|
"name": "",
|
|
"type": "bool",
|
|
"internalType": "bool"
|
|
}
|
|
],
|
|
"stateMutability": "view"
|
|
},
|
|
{
|
|
"type": "function",
|
|
"name": "pkh",
|
|
"inputs": [],
|
|
"outputs": [
|
|
{
|
|
"name": "",
|
|
"type": "bytes32",
|
|
"internalType": "bytes32"
|
|
}
|
|
],
|
|
"stateMutability": "view"
|
|
},
|
|
{
|
|
"type": "function",
|
|
"name": "verify",
|
|
"inputs": [
|
|
{
|
|
"name": "bits",
|
|
"type": "uint256",
|
|
"internalType": "uint256"
|
|
},
|
|
{
|
|
"name": "sig",
|
|
"type": "bytes32[256]",
|
|
"internalType": "bytes32[256]"
|
|
},
|
|
{
|
|
"name": "pub",
|
|
"type": "bytes32[2][256]",
|
|
"internalType": "bytes32[2][256]"
|
|
}
|
|
],
|
|
"outputs": [
|
|
{
|
|
"name": "valid",
|
|
"type": "bool",
|
|
"internalType": "bool"
|
|
}
|
|
],
|
|
"stateMutability": "view"
|
|
},
|
|
{
|
|
"type": "function",
|
|
"name": "verifyAndRotate",
|
|
"inputs": [
|
|
{
|
|
"name": "bits",
|
|
"type": "uint256",
|
|
"internalType": "uint256"
|
|
},
|
|
{
|
|
"name": "sig",
|
|
"type": "bytes32[256]",
|
|
"internalType": "bytes32[256]"
|
|
},
|
|
{
|
|
"name": "pub",
|
|
"type": "bytes32[2][256]",
|
|
"internalType": "bytes32[2][256]"
|
|
},
|
|
{
|
|
"name": "nextPKH",
|
|
"type": "bytes32",
|
|
"internalType": "bytes32"
|
|
}
|
|
],
|
|
"outputs": [],
|
|
"stateMutability": "nonpayable"
|
|
},
|
|
{
|
|
"type": "event",
|
|
"name": "Initialized",
|
|
"inputs": [
|
|
{
|
|
"name": "pkh",
|
|
"type": "bytes32",
|
|
"indexed": true,
|
|
"internalType": "bytes32"
|
|
}
|
|
],
|
|
"anonymous": false
|
|
},
|
|
{
|
|
"type": "event",
|
|
"name": "KeyRotated",
|
|
"inputs": [
|
|
{
|
|
"name": "oldPkh",
|
|
"type": "bytes32",
|
|
"indexed": true,
|
|
"internalType": "bytes32"
|
|
},
|
|
{
|
|
"name": "newPkh",
|
|
"type": "bytes32",
|
|
"indexed": true,
|
|
"internalType": "bytes32"
|
|
}
|
|
],
|
|
"anonymous": false
|
|
},
|
|
{
|
|
"type": "event",
|
|
"name": "Verified",
|
|
"inputs": [
|
|
{
|
|
"name": "message",
|
|
"type": "bytes32",
|
|
"indexed": true,
|
|
"internalType": "bytes32"
|
|
},
|
|
{
|
|
"name": "valid",
|
|
"type": "bool",
|
|
"indexed": false,
|
|
"internalType": "bool"
|
|
}
|
|
],
|
|
"anonymous": false
|
|
},
|
|
{
|
|
"type": "error",
|
|
"name": "AlreadyInitialized",
|
|
"inputs": []
|
|
},
|
|
{
|
|
"type": "error",
|
|
"name": "InvalidPKH",
|
|
"inputs": []
|
|
},
|
|
{
|
|
"type": "error",
|
|
"name": "InvalidSignature",
|
|
"inputs": []
|
|
},
|
|
{
|
|
"type": "error",
|
|
"name": "NotInitialized",
|
|
"inputs": []
|
|
}
|
|
]
|