Documentation
¶
Overview ¶
Package wirewallet reaches a BRC-100 wallet over the wallet wire, the binary substrate both SDKs implement, and answers the one question an application asks a wallet before anything else: whose identity is this.
The wire is the only remote substrate here. The SDK's JSON substrate serialises the derivation arguments wrongly (a value receiver meets a pointer MarshalJSON) and drops action options, and both failures are silent; the wire is one serializer on both ends.
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ErrNotLoopback = errors.New("wirewallet: the wallet URL must be loopback; tunnel a remote wallet rather than exposing it")
ErrNotLoopback refuses a wallet that is not on this machine. The wire carries no authentication and no confidentiality, so a wallet reachable over a network is a key-use oracle for anyone who can reach it.
Functions ¶
func CheckURL ¶
CheckURL accepts an http URL whose host is a loopback address or "localhost". Anything else is ErrNotLoopback.
func Dial ¶
Dial returns a wallet.Interface that speaks to the wallet at base over the wire, presenting originator on every call. It makes no request itself.
func IdentityKeyOf ¶
func IdentityKeyOf(ctx context.Context, w wallet.Interface, originator string) (*ec.PublicKey, error)
IdentityKeyOf asks the wallet for its identity key: the root every record derivation hangs from, and the key a reader resolves a name to.
Types ¶
This section is empty.