mirror of
https://github.com/aljazceru/ark.git
synced 2025-12-17 20:24:21 +01:00
34 lines
883 B
Go
34 lines
883 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, onchainAddresses, 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,
|
|
) (singedTx string, err error)
|
|
}
|