Documentation Index
Fetch the complete documentation index at: https://second.tech/docs/llms.txt
Use this file to discover all available pages before exploring further.
We publish typed client packages that wrap the barkd REST API, so you can skip writing raw HTTP calls.
Prerequisites
Install
npm install @secondts/barkd
Usage
import { Configuration, WalletApi } from '@secondts/barkd'
const config = new Configuration({
basePath: 'http://localhost:3535'
})
const walletApi = new WalletApi(config)
// Create wallet
await walletApi.createWallet({
createWalletRequest: {
arkServer: 'https://ark.signet.2nd.dev',
chainSource: { esplora: { url: 'https://esplora.signet.2nd.dev' } },
network: 'signet',
mnemonic: 'your seed phrase'
}
})
// Get address
const { address } = await walletApi.address()
// Get balance
const balance = await walletApi.balance()
Prerequisites
Install
dotnet add package Second.Barkd
Usage
using Second.Barkd.Api;
using Second.Barkd.Client;
using Second.Barkd.Model;
var config = new Configuration
{
BasePath = "http://localhost:3535"
};
var walletApi = new WalletApi(config);
// Create wallet
await walletApi.CreateWalletAsync(new CreateWalletRequest(
arkServer: "ark.signet.2nd.dev",
chainSource: new ChainSourceConfig(
new ChainSourceConfigOneOf1(
new ChainSourceConfigOneOf1Esplora("https://esplora.signet.2nd.dev")
)
),
network: BarkNetwork.Signet,
mnemonic: "your seed phrase"
));
// Get address
var address = await walletApi.AddressAsync();
// Get balance
var balance = await walletApi.BalanceAsync();