mirror of
https://github.com/aljazceru/ark.git
synced 2026-01-24 22:04:20 +01:00
* Export new methods * Use sdk in CLI * pr review refactor * go sync * Fixes * run integration test on every change * fixes * go sync * fix * Persist explorer url * Fix decoding bitcoin address * Add missing timeout to e2e test * Fix * Fixes --------- Co-authored-by: altafan <18440657+altafan@users.noreply.github.com>
35 lines
936 B
Go
35 lines
936 B
Go
package wallet
|
|
|
|
import (
|
|
"context"
|
|
|
|
"github.com/ark-network/ark/pkg/client-sdk/explorer"
|
|
)
|
|
|
|
const (
|
|
SingleKeyWallet = "singlekey"
|
|
)
|
|
|
|
type WalletService interface {
|
|
GetType() string
|
|
Create(
|
|
ctx context.Context, password, seed string,
|
|
) (walletSeed string, err error)
|
|
Lock(ctx context.Context, password string) (err error)
|
|
Unlock(ctx context.Context, password string) (alreadyUnlocked bool, err error)
|
|
IsLocked() bool
|
|
GetAddresses(
|
|
ctx context.Context,
|
|
) (offchainAddresses, boardingAddresses, redemptionAddresses []string, err error)
|
|
NewAddress(
|
|
ctx context.Context, change bool,
|
|
) (offchainAddr, onchainAddr string, err error)
|
|
NewAddresses(
|
|
ctx context.Context, change bool, num int,
|
|
) (offchainAddresses, onchainAddresses []string, err error)
|
|
SignTransaction(
|
|
ctx context.Context, explorerSvc explorer.Explorer, tx string,
|
|
) (signedTx string, err error)
|
|
Dump(ctx context.Context) (seed string, err error)
|
|
}
|