Documentation
¶
Index ¶
- Variables
- type Client
- func (c *Client) CancelOffer(ctx context.Context, ID string) error
- func (c *Client) Close() error
- func (c *Client) ConfirmPaymentReceived(ctx context.Context, tradeID string) error
- func (c *Client) ConfirmPaymentStarted(ctx context.Context, tradeID string) error
- func (c *Client) Connect(ctx context.Context) (err error)
- func (c *Client) CreateOffer(ctx context.Context, req *CreateOfferRequest) (*OfferInfo, error)
- func (c *Client) CreatePaymentAccount(ctx context.Context, form string) (*PaymentAccount, error)
- func (c *Client) GetAddressBalance(ctx context.Context, addr string) (*AddressBalanceInfo, error)
- func (c *Client) GetBalances(ctx context.Context, curr string) (*BalancesInfo, error)
- func (c *Client) GetFundingAddresses(ctx context.Context) ([]*AddressBalanceInfo, error)
- func (c *Client) GetMarketPrice(ctx context.Context, curr string) (float64, error)
- func (c *Client) GetMyOffer(ctx context.Context, ID string) (*OfferInfo, error)
- func (c *Client) GetMyOffers(ctx context.Context, dir, curr string) ([]*OfferInfo, error)
- func (c *Client) GetOffer(ctx context.Context, ID string) (*OfferInfo, error)
- func (c *Client) GetOffers(ctx context.Context, dir, curr string) ([]*OfferInfo, error)
- func (c *Client) GetPaymentAccountForm(ctx context.Context, mthdID string) (map[string]interface{}, error)
- func (c *Client) GetPaymentAccounts(ctx context.Context) ([]*PaymentAccount, error)
- func (c *Client) GetPaymentMethods(ctx context.Context) ([]*PaymentMethod, error)
- func (c *Client) GetTrade(ctx context.Context, ID string) (*TradeInfo, error)
- func (c *Client) GetTradeStatistics(ctx context.Context) ([]*TradeStatistics3, error)
- func (c *Client) GetTransaction(ctx context.Context, txID string) (*TxInfo, error)
- func (c *Client) GetTxFeeRate(ctx context.Context) (*TxFeeRateInfo, error)
- func (c *Client) GetUnusedBsqAddress(ctx context.Context) (string, error)
- func (c *Client) GetVersion(ctx context.Context) (string, error)
- func (c *Client) KeepFunds(ctx context.Context, tradeID string) error
- func (c *Client) LockWallet(ctx context.Context) error
- func (c *Client) RemoveWalletPassword(ctx context.Context, passwd string) error
- func (c *Client) SendBsq(ctx context.Context, address, amount, txFeeRate string) (*TxInfo, error)
- func (c *Client) SendBtc(ctx context.Context, address, amount, txFeeRate, memo string) (*TxInfo, error)
- func (c *Client) SetTxFeeRatePreference(ctx context.Context, pref uint64) (*TxFeeRateInfo, error)
- func (c *Client) SetWalletPassword(ctx context.Context, passwdOld, passwdNew string) error
- func (c *Client) TakeOffer(ctx context.Context, offerID, accountID, takerFeeCurrency string) (*TradeInfo, error)
- func (c *Client) UnlockWallet(ctx context.Context, passwd string, timeout uint64) error
- func (c *Client) UnsetTxFeeRatePreference(ctx context.Context) (*TxFeeRateInfo, error)
- func (c *Client) WithdrawFunds(ctx context.Context, tradeID, address, memo string) error
- type PasswordCredential
Constants ¶
This section is empty.
Variables ¶
var ( ErrClientConnected = fmt.Errorf("Client already connected") ErrClientNotConnected = fmt.Errorf("Client not connected") )
Error codes
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client for Bisq API calls
func (*Client) CancelOffer ¶
CancelOffer to terminate an active offering
func (*Client) ConfirmPaymentReceived ¶
ConfirmPaymentReceived closes an arbitration process for payments
func (*Client) ConfirmPaymentStarted ¶
ConfirmPaymentStarted starts the arbitration process for payments
func (*Client) CreateOffer ¶
CreateOffer to create a new offering
func (*Client) CreatePaymentAccount ¶
CreatePaymentAccount creates a new payment account
func (*Client) GetAddressBalance ¶
GetAddressBalance returns the balance for a Bitcoin address
func (*Client) GetBalances ¶
GetBalances returns balance info for given currency
func (*Client) GetFundingAddresses ¶
GetFundingAddresses returns a list of available funding addresses
func (*Client) GetMarketPrice ¶
GetMarketPrice returns the price of Bitcoin in the given currency
func (*Client) GetMyOffer ¶
GetMyOffer returns our offer for a given ID
func (*Client) GetMyOffers ¶
GetMyOffers returns all of our offers for given criteria
func (*Client) GetPaymentAccountForm ¶
func (c *Client) GetPaymentAccountForm(ctx context.Context, mthdID string) (map[string]interface{}, error)
GetPaymentAccountForm returns a template for payment accounts
func (*Client) GetPaymentAccounts ¶
GetPaymentAccounts returns a list of payment accounts
func (*Client) GetPaymentMethods ¶
GetPaymentMethods returns all available payment methods
func (*Client) GetTradeStatistics ¶
GetTradeStatistics returns a list of past trades
func (*Client) GetTransaction ¶
GetTransaction with the specified ID
func (*Client) GetTxFeeRate ¶
GetTxFeeRate returns information about the proposed fee rate
func (*Client) GetUnusedBsqAddress ¶
GetUnusedBsqAddress returns an unused BSQ address in the wallet
func (*Client) GetVersion ¶
GetVersion returns the version of the Bisq server
func (*Client) LockWallet ¶
LockWallet locks a wallet from further usage
func (*Client) RemoveWalletPassword ¶
RemoveWalletPassword removes password protection from the wallet
func (*Client) SendBtc ¶
func (c *Client) SendBtc(ctx context.Context, address, amount, txFeeRate, memo string) (*TxInfo, error)
SendBtc to send given amount of Bitcoin to address
func (*Client) SetTxFeeRatePreference ¶
SetTxFeeRatePreference sets the preferred TxFeeRate
func (*Client) SetWalletPassword ¶
SetWalletPassword sets a new password for the wallet
func (*Client) TakeOffer ¶
func (c *Client) TakeOffer(ctx context.Context, offerID, accountID, takerFeeCurrency string) (*TradeInfo, error)
TakeOffer accepts an offer with given ID
func (*Client) UnlockWallet ¶
UnlockWallet with password for given period of time
func (*Client) UnsetTxFeeRatePreference ¶
UnsetTxFeeRatePreference unsets any previously specified preferene
type PasswordCredential ¶
type PasswordCredential string
PasswordCredential for Bisq API authentication: Must match "apiPassword=..." in "bisq.properties"
func (PasswordCredential) GetRequestMetadata ¶
func (c PasswordCredential) GetRequestMetadata(ctx context.Context, uri ...string) (map[string]string, error)
GetRequestMetadata for API password authentication
func (PasswordCredential) RequireTransportSecurity ¶
func (c PasswordCredential) RequireTransportSecurity() bool
RequireTransportSecurity signals that insecure (local) connections are fine