Documentation ¶
Index ¶
- Constants
- Variables
- type ArkClient
- func LoadCovenantClient(sdkStore types.Store) (ArkClient, error)
- func LoadCovenantClientWithWallet(sdkStore types.Store, walletSvc wallet.WalletService) (ArkClient, error)
- func LoadCovenantlessClient(sdkStore types.Store) (ArkClient, error)
- func LoadCovenantlessClientWithWallet(sdkStore types.Store, walletSvc wallet.WalletService) (ArkClient, error)
- func NewCovenantClient(sdkStore types.Store) (ArkClient, error)
- func NewCovenantlessClient(sdkStore types.Store) (ArkClient, error)
- type Balance
- type CoinSelectOptions
- type InitArgs
- type InitWithWalletArgs
- type LockedOnchainBalance
- type OffchainBalance
- type OnchainBalance
- type Receiver
- type VtxoDetails
Constants ¶
View Source
const ( // transport GrpcClient = client.GrpcClient RestClient = client.RestClient // wallet SingleKeyWallet = wallet.SingleKeyWallet // store FileStore = types.FileStore InMemoryStore = types.InMemoryStore // explorer BitcoinExplorer = explorer.BitcoinExplorer LiquidExplorer = explorer.LiquidExplorer )
Variables ¶
View Source
var ( ErrAlreadyInitialized = fmt.Errorf("client already initialized") ErrNotInitialized = fmt.Errorf("client not initialized") )
Functions ¶
This section is empty.
Types ¶
type ArkClient ¶
type ArkClient interface { GetConfigData(ctx context.Context) (*types.Config, error) Init(ctx context.Context, args InitArgs) error InitWithWallet(ctx context.Context, args InitWithWalletArgs) error IsLocked(ctx context.Context) bool Unlock(ctx context.Context, password string) error Lock(ctx context.Context, password string) error Balance(ctx context.Context, computeExpiryDetails bool) (*Balance, error) Receive(ctx context.Context) (offchainAddr, boardingAddr string, err error) SendOnChain(ctx context.Context, receivers []Receiver) (string, error) SendOffChain( ctx context.Context, withExpiryCoinselect bool, receivers []Receiver, ) (string, error) UnilateralRedeem(ctx context.Context) error CollaborativeRedeem( ctx context.Context, addr string, amount uint64, withExpiryCoinselect bool, ) (string, error) Settle(ctx context.Context) (string, error) ListVtxos(ctx context.Context) (spendable, spent []client.Vtxo, err error) Dump(ctx context.Context) (seed string, err error) GetTransactionHistory(ctx context.Context) ([]types.Transaction, error) GetTransactionEventChannel() chan types.TransactionEvent RedeemNotes(ctx context.Context, notes []string) (string, error) SetNostrNotificationRecipient(ctx context.Context, nostrRecipient string) error SignTransaction(ctx context.Context, tx string) (string, error) Stop() error }
type Balance ¶
type Balance struct { OnchainBalance OnchainBalance `json:"onchain_balance"` OffchainBalance OffchainBalance `json:"offchain_balance"` }
type CoinSelectOptions ¶
type InitWithWalletArgs ¶
type LockedOnchainBalance ¶
type OffchainBalance ¶
type OffchainBalance struct { Total uint64 `json:"total"` NextExpiration string `json:"next_expiration,omitempty"` Details []VtxoDetails `json:"details"` }
type OnchainBalance ¶
type OnchainBalance struct { SpendableAmount uint64 `json:"spendable_amount"` LockedAmount []LockedOnchainBalance `json:"locked_amount,omitempty"` }
type VtxoDetails ¶
Source Files ¶
Click to show internal directories.
Click to hide internal directories.