# Connect

#### 一. P2P Node

{% hint style="info" %}
tcp\://106.75.5.22:38333
{% endhint %}

Sample configuration file：

```
chain=signet

[signet]
rpcallowip=0.0.0.0/0
rpcbind=192.168.2.163
bind=user-machine-ip:38333
server=1
rpcpassword=sathub.pass
rpcuser=sathub.user
connect=106.75.5.22:38333
txindex=1

signetchallenge=5121038cce116112da87846abb3eea7ed6dc04d362f9a5d11dd575bdcd96df8bbd0f11210282a43fc95da4bb52533294867733b70140507745367f11c8c674972c1def3c322103878af834b52bfad5b8904bd41ea06007cf9c411719591d7d4be71dde6a37616653ae

fallbackfee=0.00001
onlynet=ipv4
onlynet=ipv6
noonion=1
deprecatedrpc=create_bdb
```

二. Electrumx Service

{% hint style="info" %}
<https://node.sathub.io:60601>
{% endhint %}

Sample configuration of Electrs is:

```
auth = "rpcuser:rpcpass"

daemon_p2p_addr = "bitcoind-node-ip:38333"
daemon_rpc_addr = "bitcoind-node-ip:38332"

electrum_rpc_addr = "0.0.0.0:60601"

log_filters = "INFO"

network = "signet"

server_banner = "Welcome to Sathub Signet testing ground"

skip_block_download_wait = true

signet_magic = "a92b03d3"

```

Example code with golang:

```
package main
import (
	"context"
	"log"
	"time"
	"github.com/checksum0/go-electrum/electrum"
)
func main() {
	client, err := electrum.NewClientTCP(context.Background(), "node.sathub.io:60601")
	if err != nil {
		log.Fatal(err)
	}

	serverVer, protocolVer, err := client.ServerVersion(context.Background())
	if err != nil {
		log.Fatal(err)
	}
	log.Printf("Server version: %s [Protocol %s]", serverVer, protocolVer)

	go func() {
		for {
			if err := client.Ping(context.Background()); err != nil {
				log.Fatal(err)
			}
			if banner, err := client.ServerBanner(context.Background()); err != nil {
				log.Fatal(err)
			} else {
				log.Printf("Server banner: %s", banner)
			}
			time.Sleep(3 * time.Second)
		}
	}()
	select {}
    }
```

三. Bitcoin Core RPC

{% hint style="info" %}
<http://106.75.5.22:38332>
{% endhint %}

Example code of golang

```
package main
import (
	"log"
	bitcoind "github.com/satshub/go-bitcoind/jsonrpc"
)

const (
	SERVER_HOST        = "106.75.5.22"
	SERVER_PORT        = 38332
	USER               = "sathub.user"
	PASSWD             = "sathub.pass"
	USESSL             = false
)

func main() {
	bc, err := bitcoind.New(SERVER_HOST, SERVER_PORT, USER, PASSWD, USESSL)
	if err != nil {
		log.Fatalln(err)
	}
	// getbestblockhash
	bestblockhash, err := bc.GetBestBlockhash()
	log.Println(err, bestblockhash)
}
```

&#x20;      If you want to get more information, please contact the maintainer via [X/Twitter Message Box](https://x.com/LiuYihen)


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.sathub.io/sathub-docs/connect.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
