forked from crypto-power/cryptopower
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feature: add DEX seed backup and restore
Signed-off-by: Philemon Ukane <[email protected]>
- Loading branch information
1 parent
be725eb
commit 00af8d8
Showing
11 changed files
with
405 additions
and
115 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
package libwallet | ||
|
||
import ( | ||
"decred.org/dcrdex/client/core" | ||
"decred.org/dcrdex/client/orderbook" | ||
"decred.org/dcrdex/dex" | ||
) | ||
|
||
type DexClient interface { | ||
Ready() <-chan struct{} | ||
WaitForShutdown() <-chan struct{} | ||
Shutdown() | ||
IsDEXPasswordSet() bool | ||
IsLoggedIn() bool | ||
InitWithPassword(pw, seed []byte) error | ||
Login(pw []byte) error | ||
Logout() error | ||
DBPath() string | ||
GetDEXConfig(dexAddr string, certI any) (*core.Exchange, error) | ||
BondsFeeBuffer(assetID uint32) uint64 | ||
HasWallet(assetID int32) bool | ||
AddWallet(assetID uint32, settings map[string]string, appPW, walletPW []byte) error | ||
PostBond(form *core.PostBondForm) (*core.PostBondResult, error) | ||
NotificationFeed() *core.NoteFeed | ||
Exchanges() map[string]*core.Exchange | ||
Exchange(host string) (*core.Exchange, error) | ||
ExportSeed(pw []byte) ([]byte, error) | ||
SyncBook(dex string, base, quote uint32) (*orderbook.OrderBook, core.BookFeed, error) | ||
Orders(filter *core.OrderFilter) ([]*core.Order, error) | ||
TradeAsync(pw []byte, form *core.TradeForm) (*core.InFlightOrder, error) | ||
WalletState(assetID uint32) *core.WalletState | ||
WalletSettings(assetID uint32) (map[string]string, error) | ||
MaxBuy(host string, base, quote uint32, rate uint64) (*core.MaxOrderEstimate, error) | ||
MaxSell(host string, base, quote uint32) (*core.MaxOrderEstimate, error) | ||
Cancel(oid dex.Bytes) error | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.