THAMER
Sovereign Bitcoin Wallet

WALLET AI BITCOIN

Your Bitcoin Wallet. Your Keys. Your Engine.

Self-hosted Bitcoin software built for developers, applications, and AI agents.

CREATE WALLET

dispatch.go

TEXT FILE

757 B · Public source code for developers, search crawlers and AI agents

Download / RawBack to folder
Go · 30 lines
1package main
2
3import (
4    "encoding/json"
5    "errors"
6    "fmt"
7)
8
9type Args struct {
10    Net string `json:"net"`
11    Type string `json:"type"`
12}
13
14// Accept typed values after strict parsing and schema validation.
15func route(name string, a Args) (string, []byte, error) {
16    if name != "wab_wallet_balance" {
17        return "", nil, errors.New("unknown tool")
18    }
19    if a.Net != "test" || (a.Type != "segwit" && a.Type != "taproot") {
20        return "", nil, errors.New("invalid arguments")
21    }
22    body, err := json.Marshal(a)
23    return "/api/v5/btc/wallet/balance", body, err
24}
25
26func main() {
27    path, body, err := route("wab_wallet_balance", Args{"test", "segwit"})
28    if err != nil { panic(err) }
29    fmt.Printf("POST %s %s\n", path, body)
30}
Read-only source · Select a line number to link directly · Raw download above

Latest from the Lab

THAMER illustrated developer portrait and signature

ABOUT THE DEVELOPER

Independent Software Developer specializing in Bitcoin Script, Golang, and AI Agents.

Software engineering · Independent research · Open-source projects