Files
lamport/sdk/abis/LamportSafe.json
zeekay e3dfe3fa18 feat(sdk): add TypeScript SDK and enhanced LaTeX paper
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
2025-12-25 21:03:31 -08:00

359 lines
6.4 KiB
JSON

[
{
"type": "constructor",
"inputs": [
{
"name": "_safe",
"type": "address",
"internalType": "address"
}
],
"stateMutability": "nonpayable"
},
{
"type": "function",
"name": "computeMessage",
"inputs": [
{
"name": "to",
"type": "address",
"internalType": "address"
},
{
"name": "value",
"type": "uint256",
"internalType": "uint256"
},
{
"name": "data",
"type": "bytes",
"internalType": "bytes"
},
{
"name": "operation",
"type": "uint8",
"internalType": "uint8"
},
{
"name": "nextPKH",
"type": "bytes32",
"internalType": "bytes32"
}
],
"outputs": [
{
"name": "m",
"type": "uint256",
"internalType": "uint256"
}
],
"stateMutability": "view"
},
{
"type": "function",
"name": "exec",
"inputs": [
{
"name": "to",
"type": "address",
"internalType": "address"
},
{
"name": "value",
"type": "uint256",
"internalType": "uint256"
},
{
"name": "data",
"type": "bytes",
"internalType": "bytes"
},
{
"name": "operation",
"type": "uint8",
"internalType": "uint8"
},
{
"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": [
{
"name": "success",
"type": "bool",
"internalType": "bool"
}
],
"stateMutability": "nonpayable"
},
{
"type": "function",
"name": "execCall",
"inputs": [
{
"name": "to",
"type": "address",
"internalType": "address"
},
{
"name": "value",
"type": "uint256",
"internalType": "uint256"
},
{
"name": "data",
"type": "bytes",
"internalType": "bytes"
},
{
"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": [
{
"name": "",
"type": "bool",
"internalType": "bool"
}
],
"stateMutability": "nonpayable"
},
{
"type": "function",
"name": "execDelegateCall",
"inputs": [
{
"name": "to",
"type": "address",
"internalType": "address"
},
{
"name": "data",
"type": "bytes",
"internalType": "bytes"
},
{
"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": [
{
"name": "",
"type": "bool",
"internalType": "bool"
}
],
"stateMutability": "nonpayable"
},
{
"type": "function",
"name": "getState",
"inputs": [],
"outputs": [
{
"name": "_pkh",
"type": "bytes32",
"internalType": "bytes32"
},
{
"name": "_nonce",
"type": "uint256",
"internalType": "uint256"
},
{
"name": "_initialized",
"type": "bool",
"internalType": "bool"
}
],
"stateMutability": "view"
},
{
"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": "nonce",
"inputs": [],
"outputs": [
{
"name": "",
"type": "uint256",
"internalType": "uint256"
}
],
"stateMutability": "view"
},
{
"type": "function",
"name": "pkh",
"inputs": [],
"outputs": [
{
"name": "",
"type": "bytes32",
"internalType": "bytes32"
}
],
"stateMutability": "view"
},
{
"type": "function",
"name": "safe",
"inputs": [],
"outputs": [
{
"name": "",
"type": "address",
"internalType": "address"
}
],
"stateMutability": "view"
},
{
"type": "event",
"name": "Executed",
"inputs": [
{
"name": "txHash",
"type": "bytes32",
"indexed": true,
"internalType": "bytes32"
},
{
"name": "nonce",
"type": "uint256",
"indexed": false,
"internalType": "uint256"
}
],
"anonymous": false
},
{
"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": "error",
"name": "AlreadyInitialized",
"inputs": []
},
{
"type": "error",
"name": "InvalidPKH",
"inputs": []
},
{
"type": "error",
"name": "InvalidSignature",
"inputs": []
},
{
"type": "error",
"name": "NotInitialized",
"inputs": []
},
{
"type": "error",
"name": "OnlySafe",
"inputs": []
},
{
"type": "error",
"name": "ZeroAddress",
"inputs": []
},
{
"type": "error",
"name": "ZeroPKH",
"inputs": []
}
]