Taurus SDK
This section includes the following Taurus SDKs. Keep coming to check for updates.
Taurus-PROTECT Java SDK
This repository provides example Java code to consume some of the APIs of Taurus-PROTECT, covering:
- Wallet and deposit address lifecycle management
- Transactions creation and approval
- Querying blockchain assets and transaction history
- Compliance and governance operations
Repository: https://github.com/taurushq-io/taurus-protect-sdk/tree/main/taurus-protect-sdk-java
Modules
This repository contains two Java modules:
- openapi: Auto-generated from Taurus OpenAPI specifications. This module should not be modified.
- client: Higher-level Java code based on the openapi module. This is the recommended interface to interact with Taurus-PROTECT APIs.
Usage
To start interacting with Taurus-PROTECT APIs, create a ProtectClient instance with your host and credentials:
String host = "http://localhost:6000"; // Replace with your Taurus-PROTECT instance
String apiKey = "your-api-key";
String apiSecret = "your-api-secret";
ProtectClient client = new ProtectClient(host, apiKey, apiSecret);Example: Create an Address
try {
Address a = client.getAddressService().createAddress(
1, // Wallet ID
"My Address", // Address name
"Optional comment",
"" // Empty string to generate address
);
System.out.println("Created address: " + a);
} catch (ApiException e) {
System.out.println("API error: " + e.getMessage());
System.out.println("Details: " + e.getError());
throw new RuntimeException(e);
}
More examples are available in the client/src/test/java directory.
Notes
- Use the
clientmodule for all API interactions. - The
openapimodule is auto-generated and should not be manually modified.
License
This SDK is provided under the Apache 2.0 License.
Taurus-PROTECT Golang SDK
This repository provides example Go code to consume some of the APIs of Taurus-PROTECT, covering:
- Wallet and deposit address lifecycle management
- Transactions creation and approval
- Querying blockchain assets and transaction history
- Compliance and governance operations
Repository: https://github.com/taurushq-io/taurus-protect-sdk/tree/main/taurus-protect-sdk-go
Packages
This repository exposes the following Go packages:
- pkg/protect: High-level Go client used to interact with Taurus-PROTECT APIs. This is the recommended interface.
- pkg/protect/model: Go model types used by the SDK.
Usage
To start interacting with Taurus-PROTECT APIs, create a Client instance with your host and credentials:
import "github.com/taurushq-io/taurus-protect-sdk/taurus-protect-sdk-go/pkg/protect"
host := "https://api.protect.taurushq.com" // Replace with your Taurus-PROTECT instance
apiKey := "your-api-key"
apiSecret := "your-api-secret"
client, err := protect.NewClient(host, protect.WithCredentials(apiKey, apiSecret))
if err != nil {
panic(err)
}
defer client.Close()Example: List Wallets
ctx := context.Background()
// List wallets with pagination
wallets, pagination, err := client.Wallets().ListWallets(ctx, &model.ListWalletsOptions{
Limit: 50,
})
if err != nil {
return err
}
for _, wallet := range wallets {
fmt.Printf("%s: %s (%s/%s)\n", wallet.Name, wallet.Currency, wallet.Blockchain, wallet.Network)
}
if pagination != nil {
fmt.Printf("Total wallets: %d\n", pagination.TotalItems)
}More examples are available in the repository examples and test directories.
Notes
- Use the pkg/protect package for all API interactions.
License
This SDK is provided under the MIT License.
Taurus-PROTECT Python SDK
This repository provides example Python code to consume some of the APIs of Taurus-PROTECT, covering:
- Wallet and deposit address lifecycle management
- Transactions creation and approval
- Querying blockchain assets and transaction history
- Compliance and governance operations
Repository: https://github.com/taurushq-io/taurus-protect-sdk/tree/main/taurus-protect-sdk-python
Modules
This repository exposes the following main Python modules:
- taurus_protect: High-level Python client used to interact with Taurus-PROTECT APIs. This is the recommended interface.
- taurus_protect.models: Python model types used by the SDK.
Usage
To start interacting with Taurus-PROTECT APIs, create a ProtectClient instance with your host and credentials:
from taurus_protect import ProtectClient
host = "https://api.protect.taurushq.com" # Replace with your Taurus-PROTECT instance
api_key = "your-api-key"
api_secret = "your-api-secret-hex"
with ProtectClient.create(
host=host,
api_key=api_key,
api_secret=api_secret,
) as client:
# Use the client
wallets, _ = client.wallets.list()
Example: List Wallets
from taurus_protect import ProtectClient
host = "https://api.protect.taurushq.com" # Replace with your Taurus-PROTECT instance
api_key = "your-api-key"
api_secret = "your-api-secret-hex"
with ProtectClient.create(host=host, api_key=api_key, api_secret=api_secret) as client:
wallets, pagination = client.wallets.list(limit=50, offset=0)
for wallet in wallets:
print(f"{wallet.name}: {wallet.currency} ({wallet.blockchain}/{wallet.network})")
if pagination:
print(f"Total wallets: {pagination.total_items}")
More examples are available in the repository examples and test directories.
Notes
Use the taurus_protect module for all API interactions.
License
This SDK is provided under the MIT License.
Taurus-PROTECT TypeScript SDK
This repository provides example TypeScript code to consume some of the APIs of Taurus-PROTECT, covering:
- Wallet and deposit address lifecycle management
- Transactions creation and approval
- Querying blockchain assets and transaction history
- Compliance and governance operations
Repository: https://github.com/taurushq-io/taurus-protect-sdk/tree/main/taurus-protect-sdk-typescript
Modules
- ProtectClient: High-level TypeScript client used to interact with Taurus-PROTECT APIs.
- OpenAPI APIs: Low-level OpenAPI-generated APIs exposed through the SDK for advanced integrations.
Usage
To start interacting with Taurus-PROTECT APIs, create a ProtectClient instance with your host and credentials:
import { ProtectClient } from '@taurushq/protect-sdk';
const host = 'https://api.protect.taurushq.com'; // Replace with your Taurus-PROTECT instance
const apiKey = 'your-api-key';
const apiSecret = 'your-api-secret-hex';
const client = ProtectClient.create({
host,
apiKey,
apiSecret,
});Example: List Wallets
import { ProtectClient } from '@taurushq/protect-sdk';
const client = ProtectClient.create({
host: 'https://api.protect.taurushq.com',
apiKey: 'your-api-key',
apiSecret: 'your-api-secret-hex',
});
// List wallets with pagination
const { items: wallets, pagination } = await client.wallets.list({ limit: 50 });
for (const wallet of wallets) {
console.log(`${wallet.name}: ${wallet.currency} (${wallet.blockchain}/${wallet.network})`);
}
if (pagination) {
console.log(`Total wallets: ${pagination.totalItems}`);
}
client.close();More examples are available in the repository examples and test directories.
Notes
- Use the ProtectClient interface for all standard API interactions.
- Low-level OpenAPI APIs remain accessible through the client for advanced integrations.
License
This SDK is provided under the MIT License.