Class EmulatorPubKeys
The covenant co-signer key each Arkade network runs, pinned rather than asked for.
public static class EmulatorPubKeys
- Inheritance
-
EmulatorPubKeys
- Inherited Members
Remarks
The emulator key is a property of the NETWORK, not of whoever happens to answer when you ask. Every participant in a covenant has to commit to the same one, so reading it from an endpoint means the endpoint decides what your money is locked to. A misconfigured address, a rotated deployment, or something standing in the way all produce a contract that is well formed, an address that looks ordinary, and a lockup the rest of the network will not honour — with the mismatch surfacing only when a counterparty fails to claim.
Keyed on the name the Arkade server advertises, not on the Bitcoin network: mutinynet resolves
to TestNet here, so the two are indistinguishable by that alone and pinning by it would
silently serve one network's key on another.
Networks without an emulator deployment are absent deliberately, and asking for one throws. There is no shape-based fallback because a wrong key cannot be detected downstream.
Fields
Bitcoin
Covenant co-signer for the mainnet Arkade deployment, compressed hex.
public const string Bitcoin = "0239c196415da47b26456a101daaa12ba9e445bfe153197f1e2b750bf40e52092e"
Field Value
Mutinynet
Covenant co-signer for the hosted mutinynet deployment, compressed hex.
public const string Mutinynet = "03f823b9b2febc81f4af967e77aed2f541cbd3397c6d8f5a72e32eb7b471af889a"
Field Value
Regtest
Covenant co-signer shipped with the arkade-regtest stack, compressed hex.
public const string Regtest = "02999413c46fa10ada5cbc4bcc79a1d09160c2ba3cfc812705d7a13e5e545fb2a9"
Field Value
Methods
AgreesWithPin(string?, string)
Whether the key an emulator reports for itself is the one this network is pinned to.
public static bool AgreesWithPin(string? networkName, string reported)
Parameters
networkNamestringThe server's own
networkvalue.reportedstringWhat the emulator's
/v1/infoanswered.
Returns
- bool
truewhen they agree, or when nothing is pinned to compare against.
Remarks
A diagnostic, not a step in deriving anything: nothing in this SDK reads the reported key to decide a covenant's co-signer. Reach for it when a claim is refused and the question is whether this deployment has rotated away from DefaultFor(string?) — which is the moment Resolve(string?, string?)'s override exists for.
DefaultFor(string?)
The pinned key for networkName, as the Arkade server names it.
public static string DefaultFor(string? networkName)
Parameters
networkNamestringThe server's own
networkvalue, e.g.mutinynet.
Returns
- string
The compressed 33-byte key, hex.
Exceptions
- InvalidOperationException
No key is pinned for that network.
Resolve(string?, string?)
The key to build covenants against: the network's pin, or pubkeyOverride
when the caller supplies one.
public static string Resolve(string? networkName, string? pubkeyOverride)
Parameters
networkNamestringThe server's own
networkvalue.pubkeyOverridestringA 33-byte compressed key, hex, or
nullfor the pin.
Returns
- string
The compressed 33-byte key, hex.
Remarks
Supplying an override means co-signing with a different service: every covenant built from the returned key can be completed by whoever holds it and by nobody else. It is the escape hatch for three situations, and the first is the one that matters operationally.
1. A network rotated its key and this SDK has not shipped the new constant. Nothing asks the service which key it signs with, so a rotation is invisible here until the constant is updated — covenants keep building against the retired key and it surfaces only when a claim is refused. Passing the new key restores service without waiting for a release, which makes a rotation a config change rather than an outage. 2. A private or self-hosted emulator, including on a network with no pin at all. 3. Tests and local stacks.
A malformed override throws rather than being passed through: a typo would otherwise surface as an unspendable contract long after the fact.
Exceptions
- InvalidOperationException
No key is pinned and none was supplied.
- ArgumentException
pubkeyOverrideis not a compressed key.