New address encoding (#356)

* [common] rework address encoding

* new address encoding

* replace offchain address by vtxo output key in DB

* merge migrations files into init one

* fix txbuilder fixtures

* fix transaction events
This commit is contained in:
Louis Singer
2024-10-18 16:50:07 +02:00
committed by GitHub
parent b1c9261f14
commit b536a9e652
58 changed files with 2243 additions and 1896 deletions

View File

@@ -10,6 +10,11 @@ const (
SingleKeyWallet = "singlekey"
)
type DescriptorAddress struct {
Descriptor string
Address string
}
type WalletService interface {
GetType() string
Create(
@@ -20,13 +25,13 @@ type WalletService interface {
IsLocked() bool
GetAddresses(
ctx context.Context,
) (offchainAddresses, boardingAddresses, redemptionAddresses []string, err error)
) (offchainAddresses, boardingAddresses, redemptionAddresses []DescriptorAddress, err error)
NewAddress(
ctx context.Context, change bool,
) (offchainAddr, onchainAddr string, err error)
) (offchainAddr, onchainAddr *DescriptorAddress, err error)
NewAddresses(
ctx context.Context, change bool, num int,
) (offchainAddresses, onchainAddresses []string, err error)
) (offchainAddresses, onchainAddresses []DescriptorAddress, err error)
SignTransaction(
ctx context.Context, explorerSvc explorer.Explorer, tx string,
) (signedTx string, err error)