SkillAgentSearch skills...

Electrum

Electrum protocol client

Install / Use

/learn @fairbank-io/Electrum
About this skill

Quality Score

0/100

Supported Platforms

Universal

README

Electrum Client

Build Status GoDoc Version Software License Go Report Card

Provides a pure Go electrum protocol client implementation.

Features include:

  • Simple to use
  • Subscriptions are managed via channels and context
  • Full TCP and TSL support
  • Safe for concurrent execution

Example

// Start a new client instance
client, _ := electrum.New(&electrum.Options{
  Address:   "node.xbt.eu:50002",
  KeepAlive: true,
})

// Execute synchronous operation
version, _ := client.ServerVersion()

// Start a subscription, will terminate automatically after 30 seconds
ctx, cancel := context.WithTimeout(context.Background(), 30 * time.Second)
defer cancel()
headers, _ := client.NotifyBlockHeaders(ctx)
for header := range headers {
  // Use header
}

// Finish client execution
client.Close()

Related Skills

View on GitHub
GitHub Stars10
CategoryDevelopment
Updated3y ago
Forks6

Languages

Go

Security Score

80/100

Audited on Sep 8, 2022

No findings