Documentation
¶
Index ¶
Constants ¶
const ( // VersionEd25519 is the version byte for Ed25519-derived addresses (spec §6.1). VersionEd25519 byte = 0xA0 // VersionP256 is reserved for P-256–derived addresses (spec §6.2). VersionP256 byte = 0xA1 // VersionParalism is reserved for Paralism / Bitcoin HASH160 addresses (spec §6.2). VersionParalism byte = 0xA2 // VersionEthereum is the version byte for Ethereum 20-byte addresses (spec §6.2). VersionEthereum byte = 0xA3 )
Variables ¶
var ( // ErrNotFound is returned when a Storage key is missing. ErrNotFound = errors.New("a2al: not found") // ErrInvalidAddress indicates a malformed or checksum-failed address string. ErrInvalidAddress = errors.New("a2al: invalid address") )
var ParalismBech32HRPs = []string{"bc", "pr"}
ParalismBech32HRPs lists accepted Bech32 human-readable parts (extend for new Paralism HRPs).
var ParalismBech32PreferredHRP = "bc"
ParalismBech32PreferredHRP is used when formatting Address.String() for version Paralism.
Functions ¶
func CommonPrefixLen ¶
CommonPrefixLen returns the number of leading bits where a and b agree (MSB first). If a == b, returns 256.
Types ¶
type Address ¶
type Address [21]byte
Address is a 21-byte logical address: version byte + 20-byte hash (spec §6.1).
func ParseAddress ¶
ParseAddress parses any supported address string (spec §6.3 priority order).
func ParseEthereumAddress ¶
ParseEthereumAddress is a convenience shortcut for Ethereum "0x" addresses.
func ParseParalismAddress ¶
ParseParalismAddress parses a Paralism/Bitcoin-style address string into a VersionParalism Address.
type AddressCodec ¶
type AddressCodec interface {
Version() byte
CanParse(s string) bool
Parse(s string) ([20]byte, error)
Format(addr20 [20]byte) string
}
AddressCodec handles string↔internal conversion for one blockchain address type.
type MemStorage ¶
type MemStorage struct {
// contains filtered or unexported fields
}
MemStorage is an in-memory Storage for tests and ephemeral use.
func (*MemStorage) Delete ¶
func (s *MemStorage) Delete(key string) error
Source Files
¶
Directories
¶
| Path | Synopsis |
|---|---|
|
cmd
|
|
|
a2al
command
a2al is the command-line client for the local a2ald daemon (REST API only).
|
a2al is the command-line client for the local a2ald daemon (REST API only). |
|
a2ald
command
a2ald is the A2AL daemon: DHT/QUIC host, REST API, Web UI, TCP gateway, MCP.
|
a2ald is the A2AL daemon: DHT/QUIC host, REST API, Web UI, TCP gateway, MCP. |
|
Package config holds Phase 3 daemon TOML settings (library layer; daemon owns persistence).
|
Package config holds Phase 3 daemon TOML settings (library layer; daemon owns persistence). |
|
Package daemon implements the a2ald runtime: DHT/QUIC host, REST API, TCP gateway, and MCP server.
|
Package daemon implements the a2ald runtime: DHT/QUIC host, REST API, TCP gateway, and MCP server. |
|
aidproxy
Package aidproxy implements the AID Resource Addressing Gateway.
|
Package aidproxy implements the AID Resource Addressing Gateway. |
|
Package host is the Phase 2 SDK: DHT + QUIC, nat-sense, multi-candidate endpoints (2b), optional UPnP, Happy Eyeballs dial, Publish/Resolve/Connect/Accept.
|
Package host is the Phase 2 SDK: DHT + QUIC, nat-sense, multi-candidate endpoints (2b), optional UPnP, Happy Eyeballs dial, Publish/Resolve/Connect/Accept. |
|
Package identity holds Phase 3 delegation proofs (master → operational key).
|
Package identity holds Phase 3 delegation proofs (master → operational key). |
|
internal
|
|
|
nodeks
Package nodeks loads or creates the daemon DHT node identity (node.key).
|
Package nodeks loads or creates the daemon DHT node identity (node.key). |
|
peerscache
Package peerscache persists DHT neighbor UDP dial strings for cold bootstrap.
|
Package peerscache persists DHT neighbor UDP dial strings for cold bootstrap. |
|
registry
Package registry persists REST-registered agents (operational key + TCP target).
|
Package registry persists REST-registered agents (operational key + TCP target). |
|
Package mobile exposes the a2ald daemon to Android and iOS via gomobile bind.
|
Package mobile exposes the a2ald daemon to Android and iOS via gomobile bind. |
|
Package natmap provides optional NAT helpers (Phase 2b: UPnP IGD port mapping).
|
Package natmap provides optional NAT helpers (Phase 2b: UPnP IGD port mapping). |
|
Package natsense implements observed address consensus (spec Phase 2a: ≥3 distinct reporters).
|
Package natsense implements observed address consensus (spec Phase 2a: ≥3 distinct reporters). |