Documentation ¶
Index ¶
- type Account
- type Balance
- type BlockInfo
- type BuildData
- type CustomPeriod
- type Deposit
- type FragmenterReply
- type Market
- type MarketCollectedFees
- type MarketFee
- type MarketInfo
- type MarketPrice
- type MarketReport
- type MarketStartegy
- type MarketVolume
- type Notification
- type Page
- type PredefinedPeriod
- type PubSubStore
- type RepoManager
- type SecurePubSub
- type Subscription
- type SwapAccept
- type SwapComplete
- type SwapFail
- type SwapRequest
- type TimeRange
- type Topic
- type Trade
- type TradeFeeInfo
- type TradePreview
- type TradeStatus
- type TradeType
- type Transaction
- type TxInput
- type TxOutput
- type UnblindedInput
- type Utxo
- type UtxoKey
- type UtxoStatus
- type Wallet
- type WalletAccount
- type WalletInfo
- type WalletService
- type WalletStatus
- type WalletTxEventType
- type WalletTxNotification
- type WalletUtxoEventType
- type WalletUtxoNotification
- type Webhook
- type WebhookInfo
- type Withdrawal
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Account ¶ added in v1.0.0
type Account interface { CreateAccount( ctx context.Context, accountName string, isMarket bool, ) (WalletAccount, error) DeriveAddresses( ctx context.Context, accountName string, num int, ) ([]string, error) DeriveChangeAddresses( ctx context.Context, accountName string, num int, ) ([]string, error) ListAddresses(ctx context.Context, accountName string) ([]string, error) GetBalance( ctx context.Context, accountName string, ) (map[string]Balance, error) ListUtxos( ctx context.Context, accountName string, ) ([]Utxo, []Utxo, error) DeleteAccount(ctx context.Context, accountName string) error }
type CustomPeriod ¶ added in v1.0.0
type FragmenterReply ¶ added in v1.0.0
type MarketCollectedFees ¶ added in v1.0.0
type MarketCollectedFees interface { GetBaseAmount() uint64 GetQuoteAmount() uint64 GetTradeFeeInfo() []TradeFeeInfo GetStartDate() string GetEndDate() string }
type MarketInfo ¶ added in v1.0.0
type MarketInfo interface { GetMarket() Market GetAccountName() string IsTradable() bool GetStrategyType() MarketStartegy GetBalance() map[string]Balance GetFee() MarketFee GetPrice() MarketPrice }
type MarketPrice ¶ added in v1.0.0
type MarketReport ¶ added in v1.0.0
type MarketReport interface { GetMarket() Market GetCollectedFees() MarketCollectedFees GetTotalVolume() MarketVolume GetVolumesPerFrame() []MarketVolume }
type MarketStartegy ¶
type MarketVolume ¶ added in v1.0.0
type Notification ¶ added in v1.0.0
type Notification interface { GetTxNotifications() chan WalletTxNotification GetUtxoNotifications() chan WalletUtxoNotification }
type PredefinedPeriod ¶ added in v1.0.0
type PubSubStore ¶ added in v0.4.0
type PubSubStore interface { // Init initialize the store with an optional encryption password. Init(password string) error // IsLocked returns whether the store is locked. IsLocked() bool // Lock locks the store. Lock() // UnlockStore unlocks the internal store. Unlock(password string) error // ChangePassword allows to change the encryption password. ChangePassword(oldPwd, newPwd string) error // Close should be used to gracefully close the connection with the store. Close() error }
PubSubStore defines the methods to manage the internal store of a SecurePubSub service.
type RepoManager ¶ added in v0.3.1
type RepoManager interface { MarketRepository() domain.MarketRepository TradeRepository() domain.TradeRepository DepositRepository() domain.DepositRepository WithdrawalRepository() domain.WithdrawalRepository Close() }
RepoManager interface defines the methods for swap, price and unspent.
type SecurePubSub ¶ added in v0.4.0
type SecurePubSub interface { // Store returns the internal store. Store() PubSubStore // Subscribes some client for a topic. Subscribe(topic string, args ...interface{}) (string, error) // Unsubscribe removes some client defined by its id for a topic. Unsubscribe(topic, id string) error // ListSubscriptionsForTopic returns the info of all clients subscribed for // a certain topic. ListSubscriptionsForTopic(topic string) []Subscription // Publish publishes a message for a certain topic. All clients subscribed // for such topic will receive the message. Publish(topic string, message string) error // TopicsByCode returns the all the topics supported by the service mapped by their // code. TopicsByCode() map[int]Topic // TopicsByLabel returns the all the topics supported by the service mapped by their // label. TopicsByLabel() map[string]Topic }
SecurePubSub defines the methods of a pubsub service and its internal store. This service might need to store some data in memory or on the disk, for this reason along with the typical methods of a pubsub service, allows to manage an internal optionally encrypted storage.
type Subscription ¶ added in v0.4.0
type SwapAccept ¶ added in v1.0.0
type SwapAccept interface { GetId() string GetRequestId() string GetTransaction() string GetUnblindedInputs() []UnblindedInput }
type SwapComplete ¶ added in v1.0.0
type SwapRequest ¶ added in v1.0.0
type TimeRange ¶ added in v1.0.0
type TimeRange interface { GetPredefinedPeriod() PredefinedPeriod GetCustomPeriod() CustomPeriod }
type Trade ¶ added in v1.0.0
type Trade interface { GetId() string GetStatus() TradeStatus GetSwapInfo() SwapRequest GetSwapFailInfo() SwapFail GetRequestTimestamp() int64 GetAcceptTimestamp() int64 GetCompleteTimestamp() int64 GetSettleTimestamp() int64 GetExpiryTimestamp() int64 GetMarket() Market GetMarketFee() MarketFee GetMarketPrice() MarketPrice }
type TradeFeeInfo ¶ added in v1.0.0
type TradePreview ¶ added in v1.0.0
type TradeStatus ¶ added in v1.0.0
type Transaction ¶
type Transaction interface { GetTransaction(ctx context.Context, txid string) (string, error) EstimateFees( ctx context.Context, ins []TxInput, outs []TxOutput, ) (uint64, error) SelectUtxos( ctx context.Context, accountName, asset string, amount uint64, ) ([]Utxo, uint64, int64, error) CreatePset( ctx context.Context, ins []TxInput, outs []TxOutput, ) (string, error) UpdatePset( ctx context.Context, pset string, ins []TxInput, outs []TxOutput, ) (string, error) BlindPset( ctx context.Context, pset string, extraUnblindedIns []UnblindedInput, ) (string, error) SignPset( ctx context.Context, pset string, extractRawTx bool, ) (string, error) Transfer( ctx context.Context, accountName string, outs []TxOutput, millisatsPerByte uint64, ) (string, error) BroadcastTransaction(ctx context.Context, txHex string) (string, error) }
type UnblindedInput ¶ added in v1.0.0
type Utxo ¶ added in v1.0.0
type Utxo interface { UtxoKey GetAsset() string GetValue() uint64 GetScript() string GetAssetBlinder() string GetValueBlinder() string GetConfirmedStatus() UtxoStatus GetSpentStatus() UtxoStatus GetRedeemScript() string }
type UtxoStatus ¶ added in v1.0.0
type Wallet ¶ added in v1.0.0
type Wallet interface { GenSeed(ctx context.Context) ([]string, error) InitWallet(ctx context.Context, mnemonic []string, password string) error RestoreWallet(ctx context.Context, mnemonic []string, password string) error Unlock(ctx context.Context, password string) error Lock(ctx context.Context, password string) error ChangePassword(ctx context.Context, oldPwd, newPwd string) error Status(ctx context.Context) (WalletStatus, error) Info(ctx context.Context) (WalletInfo, error) }
type WalletAccount ¶ added in v1.0.0
type WalletInfo ¶ added in v1.0.0
type WalletService ¶ added in v1.0.0
type WalletService interface { Wallet() Wallet Account() Account Transaction() Transaction Notification() Notification Close() }
type WalletStatus ¶ added in v1.0.0
type WalletTxEventType ¶ added in v1.0.0
type WalletTxNotification ¶ added in v1.0.0
type WalletTxNotification interface { GetEventType() WalletTxEventType GetAccountNames() []string GetTxHex() string GetBlockDetails() BlockInfo }
type WalletUtxoEventType ¶ added in v1.0.0
type WalletUtxoNotification ¶ added in v1.0.0
type WalletUtxoNotification interface { GetEventType() WalletUtxoEventType GetUtxos() []Utxo }
type WebhookInfo ¶ added in v1.0.0
Click to show internal directories.
Click to hide internal directories.