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

engine_client_test.go

TEXT FILE

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

Download / RawBack to folder
Go · 26 lines
1package examples
2
3import (
4	"context"
5	"net/http"
6	"net/http/httptest"
7	"strings"
8	"testing"
9)
10
11func TestPostJSON(t *testing.T) {
12	count := 0
13	s := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
14		count++
15		w.Header().Set("Content-Type", "application/json")
16		w.Write([]byte(`{"ok":true}`))
17	}))
18	defer s.Close()
19	b, e := PostJSON(context.Background(), s.Client(), s.URL, []byte(`{"command":"balance"}`))
20	if e != nil {
21		t.Fatal(e)
22	}
23	if count != 1 || !strings.Contains(string(b), `"ok":true`) {
24		t.Fatalf("count=%d response=%s", count, b)
25	}
26}
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