Files
ark/pkg/client-sdk/wallet/wallet.go
2024-08-09 17:46:42 +02:00

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)
}