> For the complete documentation index, see [llms.txt](https://docs-sdk.crypto-chief.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs-sdk.crypto-chief.com/processing/go.md).

# Go SDK

The official Go client for the [Crypto Chief](https://crypto-chief.com/processing/) crypto processing API. One import gives you typed access to payments, payouts, on-chain transactions, wallets, and webhooks across 25+ chains.

[![Go Reference](https://pkg.go.dev/badge/github.com/crypto-chiefs/cryptochief-crypto-processing-go.svg)](https://pkg.go.dev/github.com/crypto-chiefs/cryptochief-crypto-processing-go)

## Requirements

* Go **1.20+**
* A Crypto Chief **Merchant ID** and **API key** (Dashboard → Project)

## Installation

```bash
go get github.com/crypto-chiefs/cryptochief-crypto-processing-go@latest
```

```go
import "github.com/crypto-chiefs/cryptochief-crypto-processing-go"
```

The package name is `cryptochief`, so you call it as `cryptochief.New(...)`.

## Quickstart

```go
c, err := cryptochief.New("MERCHANT_ID", "API_KEY")
if err != nil {
    log.Fatal(err)
}

est, err := c.Payouts.Estimate(context.Background(), &cryptochief.EstimatePayoutRequest{
    Network:   cryptochief.ChainEthSepolia,
    Coin:      "ETH",
    Amount:    "0.0001",
    ToAddress: "0xRecipient...",
})
if err != nil {
    log.Fatal(err)
}
fmt.Println("amount to receive:", est.AmountToReceive)
```

{% hint style="success" %}
If `Estimate` returns without an error, your credentials and signing are working end-to-end.
{% endhint %}

## What you can do

| Domain                        | Service                             | Key methods                                                                                                             |
| ----------------------------- | ----------------------------------- | ----------------------------------------------------------------------------------------------------------------------- |
| Single & batch payouts        | `c.Payouts`                         | `Estimate`, `Execute`, `BatchExecute`, `Info`, `History`                                                                |
| Sign / execute arbitrary txs  | `c.Transactions`                    | `Sign`, `Execute`, `SignEVMCall`, `JettonTransfer`                                                                      |
| Accept payments               | `c.PayIns`                          | `Create`, `SelectAsset`, `Cancel`, `Info`, `History`                                                                    |
| Wallets + RSA decrypt         | `c.Wallets`                         | `Generate`, `List`, `Info`, `Freeze`, `RebindMaster`, `SetCallbackURL`, `SetLabel`, `PayInHistory`, `DecryptPrivateKey` |
| Treasury sweeps               | `c.Sweeps`                          | `Force`, `History`, `WalletHistory`, `Settings`, `UpdateSettings`                                                       |
| Static deposits & withdrawals | `c.StaticDeposits`, `c.Withdrawals` | `Info`, `History`                                                                                                       |
| API credits                   | `c.Credits`                         | `Balance`, `Topup`                                                                                                      |
| On-chain queries              | `c.Blockchain`                      | `SupportedChains`, `ContractsList`, `ContractsAvailable`, `WalletBalance`, `TransactionStatus`                          |
| Fiat ↔ crypto rates           | `c.Currencies`                      | `FiatToCrypto`, `CryptoToFiat`, `Fiats`, `Cryptos`                                                                      |

## Explore the guides

<table data-view="cards"><thead><tr><th></th><th></th><th data-hidden data-card-target data-type="content-ref"></th></tr></thead><tbody><tr><td><strong>🔑 Authentication</strong></td><td>Credentials, client setup, and request signing.</td><td><a href="/pages/ECORWaiNPePsQYBxG8Uc">/pages/ECORWaiNPePsQYBxG8Uc</a></td></tr><tr><td><strong>💸 Send a payout</strong></td><td>Estimate, execute idempotently, and confirm.</td><td><a href="/pages/lsOQgZ6xxRf8WYxz1HH5">/pages/lsOQgZ6xxRf8WYxz1HH5</a></td></tr><tr><td><strong>📥 Accept payments</strong></td><td>Create PayIn invoices and read deposits.</td><td><a href="/pages/YXg8w5b2BHxOqIDpyMUq">/pages/YXg8w5b2BHxOqIDpyMUq</a></td></tr><tr><td><strong>📡 Webhooks</strong></td><td>Verify signatures and handle typed events.</td><td><a href="/pages/YUSfSqzzuAQsB0Se4LcH">/pages/YUSfSqzzuAQsB0Se4LcH</a></td></tr><tr><td><strong>🧩 Contract calls</strong></td><td>EVM / TRON ABI calls with no hand-encoded calldata.</td><td><a href="/pages/lN1NvCOTifHv8QbxINLq">/pages/lN1NvCOTifHv8QbxINLq</a></td></tr><tr><td><strong>💎 TON transfers</strong></td><td>Jetton, NFT, and comment transfers in one call.</td><td><a href="/pages/SiKyvcQf0hp3o1lbXCoy">/pages/SiKyvcQf0hp3o1lbXCoy</a></td></tr></tbody></table>
