wirewallet

package
v0.35.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 16, 2026 License: Apache-2.0 Imports: 13 Imported by: 2 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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 serializes 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

View Source
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

func CheckURL(raw string) error

CheckURL accepts an http URL whose host is a loopback address or "localhost". Anything else is ErrNotLoopback.

func Dial

func Dial(originator, base string, timeout time.Duration) (wallet.Interface, error)

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.

func Serve

func Serve(w wallet.Interface) http.Handler

Serve is the other end of the wire: an HTTP handler that routes the SDK client's calls to w. It exists so that any wallet.Interface, an embedded one included, can be served as a wallet an application drives over the wire, which is how the transport is tested without a third party.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL