This SDK provides Golang bindings for interacting with blockchains through Fireblocks, enabling you to manage vault accounts, transactions, webhooks, and more. This isnt meant to be a full sdk, but a streamlined one with only function needed at this point
- VaultService:
- Create vault accounts
- Create asset wallets and addresses
- Find vault accounts by ID
- TransactionService:
- Estimate transaction fees
- Create transactions
- Find transactions by ID or external transaction ID
- WebhookService:
- Resend failed webhooks
- Verify webhook transactions
- CustomFlowSVC:
- Streamlined methods for address creation and sending transactions
go get github.com/otyang/fireblocks-sdk-golang.git
- Import the SDK:
import (
"github.com/otyang/fireblocks/client"
"github.com/otyang/fireblocks/transaction"
"github.com/otyang/fireblocks/vault"
"github.com/otyang/fireblocks/webhook"
)
- Create a Fireblocks client:
fireblocks, err := New(client.ConfigApiKey, client.ConfigPrivateKey, client.ConfigBaseURL, true)
Usage:
func main() {
client.ConfigApiKey = "api-key"
client.ConfigPrivateKey = "private-key"
client.ConfigBaseURL = "https://sandbox-api.fireblocks.io"
client.ConfigDebugMode = true
fireblocks, err := New(client.ConfigApiKey, client.ConfigPrivateKey, client.ConfigBaseURL, client.ConfigDebugMode)
if err != nil {
return err
}
// Create a vault account
vault, err := fireblocks.Vault.FindVaultAccountByID(context.Background(), "1")
if err != nil {
return err
}
// .....
feeResponse, err := client.Transaction.EstimateFeeForSendingToExternalAddress(
ctx context.Context, assetID, amount, treatAsGrossAmount,
)
// ... (other examples for transactions, webhooks, etc.)
}
To run tests on the endpoint, run the following command
go test -v
Or use make command to run all test at a go
make
- API Reference: https://developers.fireblocks.com/reference
Contributions are welcome! Please follow the contributing guidelines.
This SDK is licensed under the MIT License.