ChainProof class
Proves a blockchain key derives from the same HD wallet as the signing key
Constructors
-
ChainProof(List<
int> bytes) -
factory
Properties
- ADDRESS → String?
-
Derived blockchain address
no setter
- ALGORITHM → String?
-
Signature algorithm, which fixes the one hash the signature is over:
"secp256k1-compact-bitcoin": the Bitcoin signed-message hash
SHA-256(SHA-256("\x18Bitcoin Signed Message:\n" || CompactSize(len)
|| SIGNED_PAYLOAD)), as Bitcoin Core's signmessage signs it (the
double SHA-256 is the protocol's own, applied once);
"secp256k1-compact-ethereum": the EIP-191 personal_sign hash
Keccak-256("\x19Ethereum Signed Message:\n" || decimal(len) ||
SIGNED_PAYLOAD), low-S;
"ed25519": raw Ed25519 over SIGNED_PAYLOAD itself.
Both secp256k1 forms are the 65-byte compact recoverable signature
header||r||s (header 27 + recovery id, +4 for a compressed key; signers
emit 31 + recovery id). A verifier hashes SIGNED_PAYLOAD with the chain's
protocol, recovers the key and compares it with PUBLIC_KEY (33-byte
compressed). Nothing hashes the payload before the protocol hash.
no setter
- CHAIN → String?
-
Chain identifier (e.g., "bitcoin", "ethereum", "solana")
no setter
- ENCODING → String?
-
Signature encoding format: "compact" for the secp256k1 algorithms
(65-byte header||r||s), "raw-ed25519" for ed25519
no setter
- hashCode → int
-
The hash code for this object.
no setterinherited
- KEY_PATH → String?
-
BIP-44 derivation path (e.g., "m/44'/0'/0'/0/0")
no setter
- keyPath → String?
-
no setter
- PUBLIC_KEY → String?
-
Public key for this chain (hex-encoded)
no setter
- publicKey → String?
-
no setter
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- SIGNATURE → String?
-
Signature over the attestation payload (hex-encoded), in the chain's
own signed-message form (see ALGORITHM)
no setter
- SIGNED_PAYLOAD → String?
-
The canonical payload that was signed (hex-encoded)
no setter
- signedPayload → String?
-
no setter
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
override
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Constants
-
reader
→ const Reader<
ChainProof>