You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Provide a high-level Go client library (importable package) that abstracts the complexity of integrating with the introspector service. Developers building Arkade Script-enabled wallets, SDKs, or tools should be able to do so without understanding the low-level details of key tweaking, script encoding, or co-signing protocol mechanics.
Current State
The repo already has foundational primitives:
pkg/arkade/tweak.go — ArkadeScriptHash, ComputeArkadeScriptPublicKey, ComputeArkadeScriptPrivateKey (key tweaking via tagged hash + point addition)
pkg/arkade/introspector_packet.go — OP_RETURN packet construction
pkg/client/transport_client.go — low-level TransportClient interface + NewGRPCClient(conn) implementation covering all four RPC methods: GetInfo, SubmitTx, SubmitIntent, SubmitFinalization
What's missing is a high-level, ergonomic public API on top of these primitives — something an external Go developer can go get and use without reading the internals.
Motivation
Currently, integrating introspector support requires:
Manually constructing a *grpc.ClientConn before you can call anything
Directly working with ComputeArkadeScriptPublicKey / ArkadeScriptHash with no obvious entry point
Hand-assembling Arkade scripts using raw opcodes
Orchestrating the two-step co-signing flow (SubmitIntent → SubmitFinalization) with no helper to guide sequencing
Understanding which transport to use (gRPC, or the HTTP gateway)
This is a high adoption barrier. A clean wrapper makes Arkade Script support accessible to go-sdk, arkd, and third-party integrators.
Reference Implementation
See ts-sdk#319 for the TypeScript reference. It includes:
Script codec — encode/decode Arkade extension opcodes with ASM helpers
Key tweaking — tweakKey(pubkey, script)
ArkadeVtxoScript — extends VtxoScript with auto-tweaking
Client.GetInfo, SubmitTx, SubmitIntent, SubmitFinalization — thin wrappers over TransportClient with ergonomic Go types (no protobuf types leaking to callers)
TweakKey(pubkey, script) / TweakPrivKey(privkey, script) — public helpers (thin wrappers over existing pkg/arkade/tweak.go)
ParseASM / Script.ToASM — encode/decode for debugging and logging
Proper Go module: either expose via the root module or a dedicated client/ module with a clean import path
Usage examples in docs/ or README
Unit tests for key tweaking, script builder, ASM roundtrip
Integration/e2e test showing the full intent → finalization flow (can mirror the ts-sdk e2e pattern)
Out of Scope
HTTP/REST client (the existing gRPC + HTTP gateway covers both; gRPC is preferred for Go)
Higher-level VtxoScript integration (belongs in go-sdk, not here)
Batch/round coordination helpers (orchestration belongs in arkd / go-sdk)
Notes
The pkg/client/transport_client.go interface is the right internal abstraction — the public Client type should compose it, not replace it.
Protobuf types should not appear in the public API surface; map them to plain Go structs internally.
The pkg/arkade primitives (ComputeArkadeScriptPublicKey, etc.) are already correct — the public helpers just need to wrap them with friendlier names and signatures.
go-sdk will likely be the primary consumer; coordinate with @altafan on the import path.
Summary
Provide a high-level Go client library (importable package) that abstracts the complexity of integrating with the introspector service. Developers building Arkade Script-enabled wallets, SDKs, or tools should be able to do so without understanding the low-level details of key tweaking, script encoding, or co-signing protocol mechanics.
Current State
The repo already has foundational primitives:
pkg/arkade/tweak.go—ArkadeScriptHash,ComputeArkadeScriptPublicKey,ComputeArkadeScriptPrivateKey(key tweaking via tagged hash + point addition)pkg/arkade/opcode.go— Arkade extension opcodes (0xc4–0xf2)pkg/arkade/script.go+tokenizer.go— script encoding/decodingpkg/arkade/introspector_packet.go— OP_RETURN packet constructionpkg/client/transport_client.go— low-levelTransportClientinterface +NewGRPCClient(conn)implementation covering all four RPC methods:GetInfo,SubmitTx,SubmitIntent,SubmitFinalizationWhat's missing is a high-level, ergonomic public API on top of these primitives — something an external Go developer can
go getand use without reading the internals.Motivation
Currently, integrating introspector support requires:
*grpc.ClientConnbefore you can call anythingComputeArkadeScriptPublicKey/ArkadeScriptHashwith no obvious entry pointSubmitIntent→SubmitFinalization) with no helper to guide sequencingThis is a high adoption barrier. A clean wrapper makes Arkade Script support accessible to go-sdk, arkd, and third-party integrators.
Reference Implementation
See ts-sdk#319 for the TypeScript reference. It includes:
tweakKey(pubkey, script)/info,/intent,/finalizeThe Go client should offer equivalent coverage, adapted to Go idioms and the existing
TransportClientabstraction.Proposed API (Go)
Scope
introspector.NewClient(ctx, url string) (*Client, error)— dials gRPC, respects TLS from URL schemeClient.GetInfo,SubmitTx,SubmitIntent,SubmitFinalization— thin wrappers overTransportClientwith ergonomic Go types (no protobuf types leaking to callers)TweakKey(pubkey, script)/TweakPrivKey(privkey, script)— public helpers (thin wrappers over existingpkg/arkade/tweak.go)ScriptBuilder— fluent builder for Arkade scripts, wrapping existing opcode/script primitivesParseASM/Script.ToASM— encode/decode for debugging and loggingclient/module with a clean import pathdocs/or READMEOut of Scope
VtxoScriptintegration (belongs in go-sdk, not here)Notes
pkg/client/transport_client.gointerface is the right internal abstraction — the publicClienttype should compose it, not replace it.pkg/arkadeprimitives (ComputeArkadeScriptPublicKey, etc.) are already correct — the public helpers just need to wrap them with friendlier names and signatures.