Files
ark/pkg/client-sdk/wallet/wallet.go
Louis Singer 06dd01ecb1 Change representation of taproot trees & Internal fixes (#384)
* migrate descriptors --> tapscripts

* fix covenantless

* dynamic boarding exit delay

* remove duplicates in tree and bitcointree

* agnostic signatures validation

* revert GetInfo change

* renaming VtxoScript var

* Agnostic script server (#6)

* Hotfix: Prevent ZMQ-based bitcoin wallet to panic  (#383)

* Hotfix bct embedded wallet w/ ZMQ

* Fixes

* Rename vtxo is_oor to is_pending (#385)

* Rename vtxo is_oor > is_pending

* Clean swaggers

* Revert changes to client and sdk

* descriptor in oneof

* support CHECKSIG_ADD in MultisigClosure

* use right witness size in OOR tx fee estimation

* Revert changes

---------

Co-authored-by: Pietralberto Mazza <18440657+altafan@users.noreply.github.com>
2024-11-20 18:51:03 +01:00

43 lines
1.1 KiB
Go

package wallet
import (
"context"
"github.com/ark-network/ark/pkg/client-sdk/explorer"
)
const (
SingleKeyWallet = "singlekey"
)
type TapscriptsAddress struct {
Tapscripts []string
Address string
}
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 []TapscriptsAddress, err error)
NewAddress(
ctx context.Context, change bool,
) (offchainAddr, onchainAddr *TapscriptsAddress, err error)
NewAddresses(
ctx context.Context, change bool, num int,
) (offchainAddresses, onchainAddresses []TapscriptsAddress, err error)
SignTransaction(
ctx context.Context, explorerSvc explorer.Explorer, tx string,
) (signedTx string, err error)
SignMessage(
ctx context.Context, message []byte,
) (signature string, err error)
Dump(ctx context.Context) (seed string, err error)
}