autobahn.xbr._eip712_delegate_certificate
Module Contents¶
Classes¶
Functions¶
Delegate certificate: dynamic/one-time, off-chain. |
|
|
Sign the given data using a EIP712 based signature with the provided private key. |
|
Recover the signer address the given EIP712 signature was signed with. |
- autobahn.xbr._eip712_delegate_certificate.create_eip712_delegate_certificate(chainId: int, verifyingContract: bytes, validFrom: int, delegate: bytes, csPubKey: bytes, bootedAt: int, meta: str) dict [source]¶
Delegate certificate: dynamic/one-time, off-chain.
- Parameters
chainId –
verifyingContract –
validFrom –
delegate –
csPubKey –
bootedAt –
meta –
- Returns
- autobahn.xbr._eip712_delegate_certificate.sign_eip712_delegate_certificate(eth_privkey: bytes, chainId: int, verifyingContract: bytes, validFrom: int, delegate: bytes, csPubKey: bytes, bootedAt: int, meta: str) bytes [source]¶
Sign the given data using a EIP712 based signature with the provided private key.
- Parameters
eth_privkey – Signing key.
chainId –
verifyingContract –
validFrom –
delegate –
csPubKey –
bootedAt –
meta –
- Returns
The signature according to EIP712 (32+32+1 raw bytes).
- autobahn.xbr._eip712_delegate_certificate.recover_eip712_delegate_certificate(chainId: int, verifyingContract: bytes, validFrom: int, delegate: bytes, csPubKey: bytes, bootedAt: int, meta: str, signature: bytes) bytes [source]¶
Recover the signer address the given EIP712 signature was signed with.
- Parameters
chainId –
verifyingContract –
validFrom –
delegate –
csPubKey –
bootedAt –
signature –
meta –
- Returns
The (computed) signer address the signature was signed with.
- class autobahn.xbr._eip712_delegate_certificate.EIP712DelegateCertificate(chainId: int, verifyingContract: bytes, validFrom: int, delegate: bytes, csPubKey: bytes, bootedAt: int, meta: str, signatures: Optional[List[bytes]] = None)[source]¶
Bases:
autobahn.xbr._eip712_certificate.EIP712Certificate
- __slots__ = ['chainId', 'verifyingContract', 'validFrom', 'delegate', 'csPubKey', 'bootedAt', 'meta',...¶
- sign(key: autobahn.xbr._secmod.EthereumKey, binary: bool = False) bytes [source]¶
- static parse(obj) EIP712DelegateCertificate [source]¶
- save(filename: str) int [source]¶
Save certificate to file. File format (serialized as CBOR):
[cert_hash: bytes, cert_eip712: Dict[str, Any], cert_signatures: List[bytes]]
- Parameters
filename –
- Returns
- static load(filename) EIP712DelegateCertificate [source]¶