walletrpc: expose wallet import related RPCs

This commit is contained in:
Wilmer Paulino 2021-02-19 17:42:07 -08:00
parent 2d163b788b
commit 5301c7e83f
No known key found for this signature in database
GPG Key ID: 6DF57B9F9514972F
6 changed files with 1601 additions and 146 deletions

@ -275,6 +275,9 @@ http:
- selector: walletrpc.WalletKit.DeriveKey
post: "/v2/wallet/key"
body: "*"
- selector: walletrpc.WalletKit.ImportPublicKey
post: "/v2/wallet/key/import"
body: "*"
- selector: walletrpc.WalletKit.NextAddr
post: "/v2/wallet/address/next"
body: "*"
@ -302,6 +305,11 @@ http:
- selector: walletrpc.WalletKit.FinalizePsbt
post: "/v2/wallet/psbt/finalize"
body: "*"
- selector: walletrpc.WalletKit.ListAccounts
get: "/v2/wallet/accounts"
- selector: walletrpc.WalletKit.ImportAccount
post: "/v2/wallet/accounts/import"
body: "*"
# watchtowerrpc/watchtower.proto
- selector: watchtowerrpc.Watchtower.GetInfo

@ -26,6 +26,37 @@ var _ = math.Inf
// proto package needs to be updated.
const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package
type AddressType int32
const (
AddressType_UNKNOWN AddressType = 0
AddressType_WITNESS_PUBKEY_HASH AddressType = 1
AddressType_NESTED_WITNESS_PUBKEY_HASH AddressType = 2
AddressType_HYBRID_NESTED_WITNESS_PUBKEY_HASH AddressType = 3
)
var AddressType_name = map[int32]string{
0: "UNKNOWN",
1: "WITNESS_PUBKEY_HASH",
2: "NESTED_WITNESS_PUBKEY_HASH",
3: "HYBRID_NESTED_WITNESS_PUBKEY_HASH",
}
var AddressType_value = map[string]int32{
"UNKNOWN": 0,
"WITNESS_PUBKEY_HASH": 1,
"NESTED_WITNESS_PUBKEY_HASH": 2,
"HYBRID_NESTED_WITNESS_PUBKEY_HASH": 3,
}
func (x AddressType) String() string {
return proto.EnumName(AddressType_name, int32(x))
}
func (AddressType) EnumDescriptor() ([]byte, []int) {
return fileDescriptor_6cc6942ac78249e5, []int{0}
}
type WitnessType int32
const (
@ -131,7 +162,7 @@ func (x WitnessType) String() string {
}
func (WitnessType) EnumDescriptor() ([]byte, []int) {
return fileDescriptor_6cc6942ac78249e5, []int{0}
return fileDescriptor_6cc6942ac78249e5, []int{1}
}
type ListUnspentRequest struct {
@ -551,6 +582,405 @@ func (m *AddrResponse) GetAddr() string {
return ""
}
type Account struct {
// The name used to identify the account.
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
//
//The type of addresses the account supports.
//AddressType | External Branch | Internal Branch
//---------------------------------------------------------------------
//WITNESS_PUBKEY_HASH | P2WPKH | P2WPKH
//NESTED_WITNESS_PUBKEY_HASH | NP2WPKH | NP2WPKH
//HYBRID_NESTED_WITNESS_PUBKEY_HASH | NP2WPKH | P2WPKH
AddressType AddressType `protobuf:"varint,2,opt,name=address_type,json=addressType,proto3,enum=walletrpc.AddressType" json:"address_type,omitempty"`
//
//The public key backing the account that all keys are derived from
//represented as an extended key. This will always be empty for the default
//imported account in which single public keys are imported into.
ExtendedPublicKey string `protobuf:"bytes,3,opt,name=extended_public_key,json=extendedPublicKey,proto3" json:"extended_public_key,omitempty"`
//
//The fingerprint of the root key from which the account public key was
//derived from. This will always be zero for the default imported account in
//which single public keys are imported into.
MasterKeyFingerprint uint32 `protobuf:"varint,4,opt,name=master_key_fingerprint,json=masterKeyFingerprint,proto3" json:"master_key_fingerprint,omitempty"`
//
//The derivation path corresponding to the account public key. This will
//always be empty for the default imported account in which single public keys
//are imported into.
DerivationPath string `protobuf:"bytes,5,opt,name=derivation_path,json=derivationPath,proto3" json:"derivation_path,omitempty"`
//
//The number of keys derived from the external branch of the account public
//key. This will always be zero for the default imported account in which
//single public keys are imported into.
ExternalKeyCount uint32 `protobuf:"varint,6,opt,name=external_key_count,json=externalKeyCount,proto3" json:"external_key_count,omitempty"`
//
//The number of keys derived from the internal branch of the account public
//key. This will always be zero for the default imported account in which
//single public keys are imported into.
InternalKeyCount uint32 `protobuf:"varint,7,opt,name=internal_key_count,json=internalKeyCount,proto3" json:"internal_key_count,omitempty"`
// Whether the wallet stores private keys for the account.
WatchOnly bool `protobuf:"varint,8,opt,name=watch_only,json=watchOnly,proto3" json:"watch_only,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *Account) Reset() { *m = Account{} }
func (m *Account) String() string { return proto.CompactTextString(m) }
func (*Account) ProtoMessage() {}
func (*Account) Descriptor() ([]byte, []int) {
return fileDescriptor_6cc6942ac78249e5, []int{9}
}
func (m *Account) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_Account.Unmarshal(m, b)
}
func (m *Account) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_Account.Marshal(b, m, deterministic)
}
func (m *Account) XXX_Merge(src proto.Message) {
xxx_messageInfo_Account.Merge(m, src)
}
func (m *Account) XXX_Size() int {
return xxx_messageInfo_Account.Size(m)
}
func (m *Account) XXX_DiscardUnknown() {
xxx_messageInfo_Account.DiscardUnknown(m)
}
var xxx_messageInfo_Account proto.InternalMessageInfo
func (m *Account) GetName() string {
if m != nil {
return m.Name
}
return ""
}
func (m *Account) GetAddressType() AddressType {
if m != nil {
return m.AddressType
}
return AddressType_UNKNOWN
}
func (m *Account) GetExtendedPublicKey() string {
if m != nil {
return m.ExtendedPublicKey
}
return ""
}
func (m *Account) GetMasterKeyFingerprint() uint32 {
if m != nil {
return m.MasterKeyFingerprint
}
return 0
}
func (m *Account) GetDerivationPath() string {
if m != nil {
return m.DerivationPath
}
return ""
}
func (m *Account) GetExternalKeyCount() uint32 {
if m != nil {
return m.ExternalKeyCount
}
return 0
}
func (m *Account) GetInternalKeyCount() uint32 {
if m != nil {
return m.InternalKeyCount
}
return 0
}
func (m *Account) GetWatchOnly() bool {
if m != nil {
return m.WatchOnly
}
return false
}
type ListAccountsRequest struct {
// An optional filter to only return accounts matching this name.
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
// An optional filter to only return accounts matching this address type.
AddressType AddressType `protobuf:"varint,2,opt,name=address_type,json=addressType,proto3,enum=walletrpc.AddressType" json:"address_type,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *ListAccountsRequest) Reset() { *m = ListAccountsRequest{} }
func (m *ListAccountsRequest) String() string { return proto.CompactTextString(m) }
func (*ListAccountsRequest) ProtoMessage() {}
func (*ListAccountsRequest) Descriptor() ([]byte, []int) {
return fileDescriptor_6cc6942ac78249e5, []int{10}
}
func (m *ListAccountsRequest) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_ListAccountsRequest.Unmarshal(m, b)
}
func (m *ListAccountsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_ListAccountsRequest.Marshal(b, m, deterministic)
}
func (m *ListAccountsRequest) XXX_Merge(src proto.Message) {
xxx_messageInfo_ListAccountsRequest.Merge(m, src)
}
func (m *ListAccountsRequest) XXX_Size() int {
return xxx_messageInfo_ListAccountsRequest.Size(m)
}
func (m *ListAccountsRequest) XXX_DiscardUnknown() {
xxx_messageInfo_ListAccountsRequest.DiscardUnknown(m)
}
var xxx_messageInfo_ListAccountsRequest proto.InternalMessageInfo
func (m *ListAccountsRequest) GetName() string {
if m != nil {
return m.Name
}
return ""
}
func (m *ListAccountsRequest) GetAddressType() AddressType {
if m != nil {
return m.AddressType
}
return AddressType_UNKNOWN
}
type ListAccountsResponse struct {
Accounts []*Account `protobuf:"bytes,1,rep,name=accounts,proto3" json:"accounts,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *ListAccountsResponse) Reset() { *m = ListAccountsResponse{} }
func (m *ListAccountsResponse) String() string { return proto.CompactTextString(m) }
func (*ListAccountsResponse) ProtoMessage() {}
func (*ListAccountsResponse) Descriptor() ([]byte, []int) {
return fileDescriptor_6cc6942ac78249e5, []int{11}
}
func (m *ListAccountsResponse) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_ListAccountsResponse.Unmarshal(m, b)
}
func (m *ListAccountsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_ListAccountsResponse.Marshal(b, m, deterministic)
}
func (m *ListAccountsResponse) XXX_Merge(src proto.Message) {
xxx_messageInfo_ListAccountsResponse.Merge(m, src)
}
func (m *ListAccountsResponse) XXX_Size() int {
return xxx_messageInfo_ListAccountsResponse.Size(m)
}
func (m *ListAccountsResponse) XXX_DiscardUnknown() {
xxx_messageInfo_ListAccountsResponse.DiscardUnknown(m)
}
var xxx_messageInfo_ListAccountsResponse proto.InternalMessageInfo
func (m *ListAccountsResponse) GetAccounts() []*Account {
if m != nil {
return m.Accounts
}
return nil
}
type ImportAccountRequest struct {
// A name to identify the account with.
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
//
//A public key that corresponds to a wallet account represented as an extended
//key. It must conform to a derivation path of the form
//m/purpose'/coin_type'/account'.
ExtendedPublicKey string `protobuf:"bytes,2,opt,name=extended_public_key,json=extendedPublicKey,proto3" json:"extended_public_key,omitempty"`
//
//The fingerprint of the root key (also known as the key with derivation path
//m/) from which the account public key was derived from. This may be required
//by some hardware wallets for proper identification and signing.
MasterKeyFingerprint uint32 `protobuf:"varint,3,opt,name=master_key_fingerprint,json=masterKeyFingerprint,proto3" json:"master_key_fingerprint,omitempty"`
//
//An address type is only required when the extended account public key has a
//legacy version (xpub, tpub, etc.), such that the wallet cannot detect what
//address scheme it belongs to.
AddressType AddressType `protobuf:"varint,4,opt,name=address_type,json=addressType,proto3,enum=walletrpc.AddressType" json:"address_type,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *ImportAccountRequest) Reset() { *m = ImportAccountRequest{} }
func (m *ImportAccountRequest) String() string { return proto.CompactTextString(m) }
func (*ImportAccountRequest) ProtoMessage() {}
func (*ImportAccountRequest) Descriptor() ([]byte, []int) {
return fileDescriptor_6cc6942ac78249e5, []int{12}
}
func (m *ImportAccountRequest) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_ImportAccountRequest.Unmarshal(m, b)
}
func (m *ImportAccountRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_ImportAccountRequest.Marshal(b, m, deterministic)
}
func (m *ImportAccountRequest) XXX_Merge(src proto.Message) {
xxx_messageInfo_ImportAccountRequest.Merge(m, src)
}
func (m *ImportAccountRequest) XXX_Size() int {
return xxx_messageInfo_ImportAccountRequest.Size(m)
}
func (m *ImportAccountRequest) XXX_DiscardUnknown() {
xxx_messageInfo_ImportAccountRequest.DiscardUnknown(m)
}
var xxx_messageInfo_ImportAccountRequest proto.InternalMessageInfo
func (m *ImportAccountRequest) GetName() string {
if m != nil {
return m.Name
}
return ""
}
func (m *ImportAccountRequest) GetExtendedPublicKey() string {
if m != nil {
return m.ExtendedPublicKey
}
return ""
}
func (m *ImportAccountRequest) GetMasterKeyFingerprint() uint32 {
if m != nil {
return m.MasterKeyFingerprint
}
return 0
}
func (m *ImportAccountRequest) GetAddressType() AddressType {
if m != nil {
return m.AddressType
}
return AddressType_UNKNOWN
}
type ImportAccountResponse struct {
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *ImportAccountResponse) Reset() { *m = ImportAccountResponse{} }
func (m *ImportAccountResponse) String() string { return proto.CompactTextString(m) }
func (*ImportAccountResponse) ProtoMessage() {}
func (*ImportAccountResponse) Descriptor() ([]byte, []int) {
return fileDescriptor_6cc6942ac78249e5, []int{13}
}
func (m *ImportAccountResponse) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_ImportAccountResponse.Unmarshal(m, b)
}
func (m *ImportAccountResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_ImportAccountResponse.Marshal(b, m, deterministic)
}
func (m *ImportAccountResponse) XXX_Merge(src proto.Message) {
xxx_messageInfo_ImportAccountResponse.Merge(m, src)
}
func (m *ImportAccountResponse) XXX_Size() int {
return xxx_messageInfo_ImportAccountResponse.Size(m)
}
func (m *ImportAccountResponse) XXX_DiscardUnknown() {
xxx_messageInfo_ImportAccountResponse.DiscardUnknown(m)
}
var xxx_messageInfo_ImportAccountResponse proto.InternalMessageInfo
type ImportPublicKeyRequest struct {
// A compressed public key represented as raw bytes.
PublicKey []byte `protobuf:"bytes,1,opt,name=public_key,json=publicKey,proto3" json:"public_key,omitempty"`
// The type of address that will be generated from the public key.
AddressType AddressType `protobuf:"varint,2,opt,name=address_type,json=addressType,proto3,enum=walletrpc.AddressType" json:"address_type,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *ImportPublicKeyRequest) Reset() { *m = ImportPublicKeyRequest{} }
func (m *ImportPublicKeyRequest) String() string { return proto.CompactTextString(m) }
func (*ImportPublicKeyRequest) ProtoMessage() {}
func (*ImportPublicKeyRequest) Descriptor() ([]byte, []int) {
return fileDescriptor_6cc6942ac78249e5, []int{14}
}
func (m *ImportPublicKeyRequest) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_ImportPublicKeyRequest.Unmarshal(m, b)
}
func (m *ImportPublicKeyRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_ImportPublicKeyRequest.Marshal(b, m, deterministic)
}
func (m *ImportPublicKeyRequest) XXX_Merge(src proto.Message) {
xxx_messageInfo_ImportPublicKeyRequest.Merge(m, src)
}
func (m *ImportPublicKeyRequest) XXX_Size() int {
return xxx_messageInfo_ImportPublicKeyRequest.Size(m)
}
func (m *ImportPublicKeyRequest) XXX_DiscardUnknown() {
xxx_messageInfo_ImportPublicKeyRequest.DiscardUnknown(m)
}
var xxx_messageInfo_ImportPublicKeyRequest proto.InternalMessageInfo
func (m *ImportPublicKeyRequest) GetPublicKey() []byte {
if m != nil {
return m.PublicKey
}
return nil
}
func (m *ImportPublicKeyRequest) GetAddressType() AddressType {
if m != nil {
return m.AddressType
}
return AddressType_UNKNOWN
}
type ImportPublicKeyResponse struct {
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *ImportPublicKeyResponse) Reset() { *m = ImportPublicKeyResponse{} }
func (m *ImportPublicKeyResponse) String() string { return proto.CompactTextString(m) }
func (*ImportPublicKeyResponse) ProtoMessage() {}
func (*ImportPublicKeyResponse) Descriptor() ([]byte, []int) {
return fileDescriptor_6cc6942ac78249e5, []int{15}
}
func (m *ImportPublicKeyResponse) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_ImportPublicKeyResponse.Unmarshal(m, b)
}
func (m *ImportPublicKeyResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_ImportPublicKeyResponse.Marshal(b, m, deterministic)
}
func (m *ImportPublicKeyResponse) XXX_Merge(src proto.Message) {
xxx_messageInfo_ImportPublicKeyResponse.Merge(m, src)
}
func (m *ImportPublicKeyResponse) XXX_Size() int {
return xxx_messageInfo_ImportPublicKeyResponse.Size(m)
}
func (m *ImportPublicKeyResponse) XXX_DiscardUnknown() {
xxx_messageInfo_ImportPublicKeyResponse.DiscardUnknown(m)
}
var xxx_messageInfo_ImportPublicKeyResponse proto.InternalMessageInfo
type Transaction struct {
//
//The raw serialized transaction.
@ -567,7 +997,7 @@ func (m *Transaction) Reset() { *m = Transaction{} }
func (m *Transaction) String() string { return proto.CompactTextString(m) }
func (*Transaction) ProtoMessage() {}
func (*Transaction) Descriptor() ([]byte, []int) {
return fileDescriptor_6cc6942ac78249e5, []int{9}
return fileDescriptor_6cc6942ac78249e5, []int{16}
}
func (m *Transaction) XXX_Unmarshal(b []byte) error {
@ -619,7 +1049,7 @@ func (m *PublishResponse) Reset() { *m = PublishResponse{} }
func (m *PublishResponse) String() string { return proto.CompactTextString(m) }
func (*PublishResponse) ProtoMessage() {}
func (*PublishResponse) Descriptor() ([]byte, []int) {
return fileDescriptor_6cc6942ac78249e5, []int{10}
return fileDescriptor_6cc6942ac78249e5, []int{17}
}
func (m *PublishResponse) XXX_Unmarshal(b []byte) error {
@ -671,7 +1101,7 @@ func (m *SendOutputsRequest) Reset() { *m = SendOutputsRequest{} }
func (m *SendOutputsRequest) String() string { return proto.CompactTextString(m) }
func (*SendOutputsRequest) ProtoMessage() {}
func (*SendOutputsRequest) Descriptor() ([]byte, []int) {
return fileDescriptor_6cc6942ac78249e5, []int{11}
return fileDescriptor_6cc6942ac78249e5, []int{18}
}
func (m *SendOutputsRequest) XXX_Unmarshal(b []byte) error {
@ -740,7 +1170,7 @@ func (m *SendOutputsResponse) Reset() { *m = SendOutputsResponse{} }
func (m *SendOutputsResponse) String() string { return proto.CompactTextString(m) }
func (*SendOutputsResponse) ProtoMessage() {}
func (*SendOutputsResponse) Descriptor() ([]byte, []int) {
return fileDescriptor_6cc6942ac78249e5, []int{12}
return fileDescriptor_6cc6942ac78249e5, []int{19}
}
func (m *SendOutputsResponse) XXX_Unmarshal(b []byte) error {
@ -781,7 +1211,7 @@ func (m *EstimateFeeRequest) Reset() { *m = EstimateFeeRequest{} }
func (m *EstimateFeeRequest) String() string { return proto.CompactTextString(m) }
func (*EstimateFeeRequest) ProtoMessage() {}
func (*EstimateFeeRequest) Descriptor() ([]byte, []int) {
return fileDescriptor_6cc6942ac78249e5, []int{13}
return fileDescriptor_6cc6942ac78249e5, []int{20}
}
func (m *EstimateFeeRequest) XXX_Unmarshal(b []byte) error {
@ -823,7 +1253,7 @@ func (m *EstimateFeeResponse) Reset() { *m = EstimateFeeResponse{} }
func (m *EstimateFeeResponse) String() string { return proto.CompactTextString(m) }
func (*EstimateFeeResponse) ProtoMessage() {}
func (*EstimateFeeResponse) Descriptor() ([]byte, []int) {
return fileDescriptor_6cc6942ac78249e5, []int{14}
return fileDescriptor_6cc6942ac78249e5, []int{21}
}
func (m *EstimateFeeResponse) XXX_Unmarshal(b []byte) error {
@ -895,7 +1325,7 @@ func (m *PendingSweep) Reset() { *m = PendingSweep{} }
func (m *PendingSweep) String() string { return proto.CompactTextString(m) }
func (*PendingSweep) ProtoMessage() {}
func (*PendingSweep) Descriptor() ([]byte, []int) {
return fileDescriptor_6cc6942ac78249e5, []int{15}
return fileDescriptor_6cc6942ac78249e5, []int{22}
}
func (m *PendingSweep) XXX_Unmarshal(b []byte) error {
@ -1005,7 +1435,7 @@ func (m *PendingSweepsRequest) Reset() { *m = PendingSweepsRequest{} }
func (m *PendingSweepsRequest) String() string { return proto.CompactTextString(m) }
func (*PendingSweepsRequest) ProtoMessage() {}
func (*PendingSweepsRequest) Descriptor() ([]byte, []int) {
return fileDescriptor_6cc6942ac78249e5, []int{16}
return fileDescriptor_6cc6942ac78249e5, []int{23}
}
func (m *PendingSweepsRequest) XXX_Unmarshal(b []byte) error {
@ -1039,7 +1469,7 @@ func (m *PendingSweepsResponse) Reset() { *m = PendingSweepsResponse{} }
func (m *PendingSweepsResponse) String() string { return proto.CompactTextString(m) }
func (*PendingSweepsResponse) ProtoMessage() {}
func (*PendingSweepsResponse) Descriptor() ([]byte, []int) {
return fileDescriptor_6cc6942ac78249e5, []int{17}
return fileDescriptor_6cc6942ac78249e5, []int{24}
}
func (m *PendingSweepsResponse) XXX_Unmarshal(b []byte) error {
@ -1094,7 +1524,7 @@ func (m *BumpFeeRequest) Reset() { *m = BumpFeeRequest{} }
func (m *BumpFeeRequest) String() string { return proto.CompactTextString(m) }
func (*BumpFeeRequest) ProtoMessage() {}
func (*BumpFeeRequest) Descriptor() ([]byte, []int) {
return fileDescriptor_6cc6942ac78249e5, []int{18}
return fileDescriptor_6cc6942ac78249e5, []int{25}
}
func (m *BumpFeeRequest) XXX_Unmarshal(b []byte) error {
@ -1161,7 +1591,7 @@ func (m *BumpFeeResponse) Reset() { *m = BumpFeeResponse{} }
func (m *BumpFeeResponse) String() string { return proto.CompactTextString(m) }
func (*BumpFeeResponse) ProtoMessage() {}
func (*BumpFeeResponse) Descriptor() ([]byte, []int) {
return fileDescriptor_6cc6942ac78249e5, []int{19}
return fileDescriptor_6cc6942ac78249e5, []int{26}
}
func (m *BumpFeeResponse) XXX_Unmarshal(b []byte) error {
@ -1197,7 +1627,7 @@ func (m *ListSweepsRequest) Reset() { *m = ListSweepsRequest{} }
func (m *ListSweepsRequest) String() string { return proto.CompactTextString(m) }
func (*ListSweepsRequest) ProtoMessage() {}
func (*ListSweepsRequest) Descriptor() ([]byte, []int) {
return fileDescriptor_6cc6942ac78249e5, []int{20}
return fileDescriptor_6cc6942ac78249e5, []int{27}
}
func (m *ListSweepsRequest) XXX_Unmarshal(b []byte) error {
@ -1239,7 +1669,7 @@ func (m *ListSweepsResponse) Reset() { *m = ListSweepsResponse{} }
func (m *ListSweepsResponse) String() string { return proto.CompactTextString(m) }
func (*ListSweepsResponse) ProtoMessage() {}
func (*ListSweepsResponse) Descriptor() ([]byte, []int) {
return fileDescriptor_6cc6942ac78249e5, []int{21}
return fileDescriptor_6cc6942ac78249e5, []int{28}
}
func (m *ListSweepsResponse) XXX_Unmarshal(b []byte) error {
@ -1320,7 +1750,7 @@ func (m *ListSweepsResponse_TransactionIDs) Reset() { *m = ListSweepsRes
func (m *ListSweepsResponse_TransactionIDs) String() string { return proto.CompactTextString(m) }
func (*ListSweepsResponse_TransactionIDs) ProtoMessage() {}
func (*ListSweepsResponse_TransactionIDs) Descriptor() ([]byte, []int) {
return fileDescriptor_6cc6942ac78249e5, []int{21, 0}
return fileDescriptor_6cc6942ac78249e5, []int{28, 0}
}
func (m *ListSweepsResponse_TransactionIDs) XXX_Unmarshal(b []byte) error {
@ -1364,7 +1794,7 @@ func (m *LabelTransactionRequest) Reset() { *m = LabelTransactionRequest
func (m *LabelTransactionRequest) String() string { return proto.CompactTextString(m) }
func (*LabelTransactionRequest) ProtoMessage() {}
func (*LabelTransactionRequest) Descriptor() ([]byte, []int) {
return fileDescriptor_6cc6942ac78249e5, []int{22}
return fileDescriptor_6cc6942ac78249e5, []int{29}
}
func (m *LabelTransactionRequest) XXX_Unmarshal(b []byte) error {
@ -1416,7 +1846,7 @@ func (m *LabelTransactionResponse) Reset() { *m = LabelTransactionRespon
func (m *LabelTransactionResponse) String() string { return proto.CompactTextString(m) }
func (*LabelTransactionResponse) ProtoMessage() {}
func (*LabelTransactionResponse) Descriptor() ([]byte, []int) {
return fileDescriptor_6cc6942ac78249e5, []int{23}
return fileDescriptor_6cc6942ac78249e5, []int{30}
}
func (m *LabelTransactionResponse) XXX_Unmarshal(b []byte) error {
@ -1459,7 +1889,7 @@ func (m *FundPsbtRequest) Reset() { *m = FundPsbtRequest{} }
func (m *FundPsbtRequest) String() string { return proto.CompactTextString(m) }
func (*FundPsbtRequest) ProtoMessage() {}
func (*FundPsbtRequest) Descriptor() ([]byte, []int) {
return fileDescriptor_6cc6942ac78249e5, []int{24}
return fileDescriptor_6cc6942ac78249e5, []int{31}
}
func (m *FundPsbtRequest) XXX_Unmarshal(b []byte) error {
@ -1591,7 +2021,7 @@ func (m *FundPsbtResponse) Reset() { *m = FundPsbtResponse{} }
func (m *FundPsbtResponse) String() string { return proto.CompactTextString(m) }
func (*FundPsbtResponse) ProtoMessage() {}
func (*FundPsbtResponse) Descriptor() ([]byte, []int) {
return fileDescriptor_6cc6942ac78249e5, []int{25}
return fileDescriptor_6cc6942ac78249e5, []int{32}
}
func (m *FundPsbtResponse) XXX_Unmarshal(b []byte) error {
@ -1655,7 +2085,7 @@ func (m *TxTemplate) Reset() { *m = TxTemplate{} }
func (m *TxTemplate) String() string { return proto.CompactTextString(m) }
func (*TxTemplate) ProtoMessage() {}
func (*TxTemplate) Descriptor() ([]byte, []int) {
return fileDescriptor_6cc6942ac78249e5, []int{26}
return fileDescriptor_6cc6942ac78249e5, []int{33}
}
func (m *TxTemplate) XXX_Unmarshal(b []byte) error {
@ -1708,7 +2138,7 @@ func (m *UtxoLease) Reset() { *m = UtxoLease{} }
func (m *UtxoLease) String() string { return proto.CompactTextString(m) }
func (*UtxoLease) ProtoMessage() {}
func (*UtxoLease) Descriptor() ([]byte, []int) {
return fileDescriptor_6cc6942ac78249e5, []int{27}
return fileDescriptor_6cc6942ac78249e5, []int{34}
}
func (m *UtxoLease) XXX_Unmarshal(b []byte) error {
@ -1769,7 +2199,7 @@ func (m *FinalizePsbtRequest) Reset() { *m = FinalizePsbtRequest{} }
func (m *FinalizePsbtRequest) String() string { return proto.CompactTextString(m) }
func (*FinalizePsbtRequest) ProtoMessage() {}
func (*FinalizePsbtRequest) Descriptor() ([]byte, []int) {
return fileDescriptor_6cc6942ac78249e5, []int{28}
return fileDescriptor_6cc6942ac78249e5, []int{35}
}
func (m *FinalizePsbtRequest) XXX_Unmarshal(b []byte) error {
@ -1818,7 +2248,7 @@ func (m *FinalizePsbtResponse) Reset() { *m = FinalizePsbtResponse{} }
func (m *FinalizePsbtResponse) String() string { return proto.CompactTextString(m) }
func (*FinalizePsbtResponse) ProtoMessage() {}
func (*FinalizePsbtResponse) Descriptor() ([]byte, []int) {
return fileDescriptor_6cc6942ac78249e5, []int{29}
return fileDescriptor_6cc6942ac78249e5, []int{36}
}
func (m *FinalizePsbtResponse) XXX_Unmarshal(b []byte) error {
@ -1863,7 +2293,7 @@ func (m *ListLeasesRequest) Reset() { *m = ListLeasesRequest{} }
func (m *ListLeasesRequest) String() string { return proto.CompactTextString(m) }
func (*ListLeasesRequest) ProtoMessage() {}
func (*ListLeasesRequest) Descriptor() ([]byte, []int) {
return fileDescriptor_6cc6942ac78249e5, []int{30}
return fileDescriptor_6cc6942ac78249e5, []int{37}
}
func (m *ListLeasesRequest) XXX_Unmarshal(b []byte) error {
@ -1896,7 +2326,7 @@ func (m *ListLeasesResponse) Reset() { *m = ListLeasesResponse{} }
func (m *ListLeasesResponse) String() string { return proto.CompactTextString(m) }
func (*ListLeasesResponse) ProtoMessage() {}
func (*ListLeasesResponse) Descriptor() ([]byte, []int) {
return fileDescriptor_6cc6942ac78249e5, []int{31}
return fileDescriptor_6cc6942ac78249e5, []int{38}
}
func (m *ListLeasesResponse) XXX_Unmarshal(b []byte) error {
@ -1925,6 +2355,7 @@ func (m *ListLeasesResponse) GetLockedUtxos() []*UtxoLease {
}
func init() {
proto.RegisterEnum("walletrpc.AddressType", AddressType_name, AddressType_value)
proto.RegisterEnum("walletrpc.WitnessType", WitnessType_name, WitnessType_value)
proto.RegisterType((*ListUnspentRequest)(nil), "walletrpc.ListUnspentRequest")
proto.RegisterType((*ListUnspentResponse)(nil), "walletrpc.ListUnspentResponse")
@ -1935,6 +2366,13 @@ func init() {
proto.RegisterType((*KeyReq)(nil), "walletrpc.KeyReq")
proto.RegisterType((*AddrRequest)(nil), "walletrpc.AddrRequest")
proto.RegisterType((*AddrResponse)(nil), "walletrpc.AddrResponse")
proto.RegisterType((*Account)(nil), "walletrpc.Account")
proto.RegisterType((*ListAccountsRequest)(nil), "walletrpc.ListAccountsRequest")
proto.RegisterType((*ListAccountsResponse)(nil), "walletrpc.ListAccountsResponse")
proto.RegisterType((*ImportAccountRequest)(nil), "walletrpc.ImportAccountRequest")
proto.RegisterType((*ImportAccountResponse)(nil), "walletrpc.ImportAccountResponse")
proto.RegisterType((*ImportPublicKeyRequest)(nil), "walletrpc.ImportPublicKeyRequest")
proto.RegisterType((*ImportPublicKeyResponse)(nil), "walletrpc.ImportPublicKeyResponse")
proto.RegisterType((*Transaction)(nil), "walletrpc.Transaction")
proto.RegisterType((*PublishResponse)(nil), "walletrpc.PublishResponse")
proto.RegisterType((*SendOutputsRequest)(nil), "walletrpc.SendOutputsRequest")
@ -1965,127 +2403,148 @@ func init() {
func init() { proto.RegisterFile("walletrpc/walletkit.proto", fileDescriptor_6cc6942ac78249e5) }
var fileDescriptor_6cc6942ac78249e5 = []byte{
// 1914 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x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 0xe7, 0xc5, 0x89,
0x97, 0x50, 0xe6, 0x2f, 0x50, 0x4a, 0x76, 0xa3, 0x48, 0x76, 0xff, 0x03, 0xdd, 0x70, 0xf5, 0xd3,
0x47, 0x79, 0x84, 0xf0, 0x3a, 0x64, 0x83, 0x0e, 0x10, 0xc9, 0xe7, 0x49, 0xb4, 0xb8, 0xd5, 0x67,
0x0b, 0xb1, 0x28, 0xcf, 0xe4, 0xd6, 0x21, 0x96, 0x67, 0x0b, 0xba, 0x94, 0x58, 0x9e, 0x2d, 0xea,
0x39, 0x8e, 0x7e, 0xf5, 0xe7, 0x83, 0x5b, 0x8b, 0x0c, 0xc6, 0xd7, 0xb5, 0xbe, 0x33, 0x3a, 0x18,
0xd2, 0x61, 0xda, 0xb6, 0xec, 0x5b, 0x1b, 0x93, 0x89, 0xe3, 0xdd, 0x1d, 0x0c, 0x6d, 0xf3, 0x80,
0x75, 0x4e, 0x07, 0xa1, 0x9c, 0xeb, 0x65, 0xf6, 0x5f, 0x85, 0x2f, 0xff, 0x1f, 0x00, 0x00, 0xff,
0xff, 0x0a, 0xc3, 0xd3, 0xee, 0x9e, 0x18, 0x00, 0x00,
}
// Reference imports to suppress errors if they are not otherwise used.
@ -2132,6 +2591,43 @@ type WalletKitClient interface {
//NextAddr returns the next unused address within the wallet.
NextAddr(ctx context.Context, in *AddrRequest, opts ...grpc.CallOption) (*AddrResponse, error)
//
//ListAccounts retrieves all accounts belonging to the wallet by default. A
//name and key scope filter can be provided to filter through all of the
//wallet accounts and return only those matching.
ListAccounts(ctx context.Context, in *ListAccountsRequest, opts ...grpc.CallOption) (*ListAccountsResponse, error)
//
//ImportAccount imports an account backed by an account extended public key.
//The master key fingerprint denotes the fingerprint of the root key
//corresponding to the account public key (also known as the key with
//derivation path m/). This may be required by some hardware wallets for
//proper identification and signing.
//
//The address type can usually be inferred from the key's version, but may be
//required for certain keys to map them into the proper scope.
//
//For BIP-0044 keys, an address type must be specified as we intend to not
//support importing BIP-0044 keys into the wallet using the legacy
//pay-to-pubkey-hash (P2PKH) scheme. A nested witness address type will force
//the standard BIP-0049 derivation scheme, while a witness address type will
//force the standard BIP-0084 derivation scheme.
//
//For BIP-0049 keys, an address type must also be specified to make a
//distinction between the standard BIP-0049 address schema (nested witness
//pubkeys everywhere) and our own BIP-0049Plus address schema (nested pubkeys
//externally, witness pubkeys internally).
//
//NOTE: Events (deposits/spends) for keys derived from an account will only be
//detected by lnd if they happen after the import. Rescans to detect past
//events will be supported later on.
ImportAccount(ctx context.Context, in *ImportAccountRequest, opts ...grpc.CallOption) (*ImportAccountResponse, error)
//
//ImportPublicKey imports a public key as watch-only into the wallet.
//
//NOTE: Events (deposits/spends) for a key will only be detected by lnd if
//they happen after the import. Rescans to detect past events will be
//supported later on.
ImportPublicKey(ctx context.Context, in *ImportPublicKeyRequest, opts ...grpc.CallOption) (*ImportPublicKeyResponse, error)
//
//PublishTransaction attempts to publish the passed transaction to the
//network. Once this returns without an error, the wallet will continually
//attempt to re-broadcast the transaction on start up, until it enters the
@ -2301,6 +2797,33 @@ func (c *walletKitClient) NextAddr(ctx context.Context, in *AddrRequest, opts ..
return out, nil
}
func (c *walletKitClient) ListAccounts(ctx context.Context, in *ListAccountsRequest, opts ...grpc.CallOption) (*ListAccountsResponse, error) {
out := new(ListAccountsResponse)
err := c.cc.Invoke(ctx, "/walletrpc.WalletKit/ListAccounts", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *walletKitClient) ImportAccount(ctx context.Context, in *ImportAccountRequest, opts ...grpc.CallOption) (*ImportAccountResponse, error) {
out := new(ImportAccountResponse)
err := c.cc.Invoke(ctx, "/walletrpc.WalletKit/ImportAccount", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *walletKitClient) ImportPublicKey(ctx context.Context, in *ImportPublicKeyRequest, opts ...grpc.CallOption) (*ImportPublicKeyResponse, error) {
out := new(ImportPublicKeyResponse)
err := c.cc.Invoke(ctx, "/walletrpc.WalletKit/ImportPublicKey", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *walletKitClient) PublishTransaction(ctx context.Context, in *Transaction, opts ...grpc.CallOption) (*PublishResponse, error) {
out := new(PublishResponse)
err := c.cc.Invoke(ctx, "/walletrpc.WalletKit/PublishTransaction", in, out, opts...)
@ -2416,6 +2939,43 @@ type WalletKitServer interface {
//NextAddr returns the next unused address within the wallet.
NextAddr(context.Context, *AddrRequest) (*AddrResponse, error)
//
//ListAccounts retrieves all accounts belonging to the wallet by default. A
//name and key scope filter can be provided to filter through all of the
//wallet accounts and return only those matching.
ListAccounts(context.Context, *ListAccountsRequest) (*ListAccountsResponse, error)
//
//ImportAccount imports an account backed by an account extended public key.
//The master key fingerprint denotes the fingerprint of the root key
//corresponding to the account public key (also known as the key with
//derivation path m/). This may be required by some hardware wallets for
//proper identification and signing.
//
//The address type can usually be inferred from the key's version, but may be
//required for certain keys to map them into the proper scope.
//
//For BIP-0044 keys, an address type must be specified as we intend to not
//support importing BIP-0044 keys into the wallet using the legacy
//pay-to-pubkey-hash (P2PKH) scheme. A nested witness address type will force
//the standard BIP-0049 derivation scheme, while a witness address type will
//force the standard BIP-0084 derivation scheme.
//
//For BIP-0049 keys, an address type must also be specified to make a
//distinction between the standard BIP-0049 address schema (nested witness
//pubkeys everywhere) and our own BIP-0049Plus address schema (nested pubkeys
//externally, witness pubkeys internally).
//
//NOTE: Events (deposits/spends) for keys derived from an account will only be
//detected by lnd if they happen after the import. Rescans to detect past
//events will be supported later on.
ImportAccount(context.Context, *ImportAccountRequest) (*ImportAccountResponse, error)
//
//ImportPublicKey imports a public key as watch-only into the wallet.
//
//NOTE: Events (deposits/spends) for a key will only be detected by lnd if
//they happen after the import. Rescans to detect past events will be
//supported later on.
ImportPublicKey(context.Context, *ImportPublicKeyRequest) (*ImportPublicKeyResponse, error)
//
//PublishTransaction attempts to publish the passed transaction to the
//network. Once this returns without an error, the wallet will continually
//attempt to re-broadcast the transaction on start up, until it enters the
@ -2539,6 +3099,15 @@ func (*UnimplementedWalletKitServer) DeriveKey(ctx context.Context, req *signrpc
func (*UnimplementedWalletKitServer) NextAddr(ctx context.Context, req *AddrRequest) (*AddrResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method NextAddr not implemented")
}
func (*UnimplementedWalletKitServer) ListAccounts(ctx context.Context, req *ListAccountsRequest) (*ListAccountsResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method ListAccounts not implemented")
}
func (*UnimplementedWalletKitServer) ImportAccount(ctx context.Context, req *ImportAccountRequest) (*ImportAccountResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method ImportAccount not implemented")
}
func (*UnimplementedWalletKitServer) ImportPublicKey(ctx context.Context, req *ImportPublicKeyRequest) (*ImportPublicKeyResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method ImportPublicKey not implemented")
}
func (*UnimplementedWalletKitServer) PublishTransaction(ctx context.Context, req *Transaction) (*PublishResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method PublishTransaction not implemented")
}
@ -2697,6 +3266,60 @@ func _WalletKit_NextAddr_Handler(srv interface{}, ctx context.Context, dec func(
return interceptor(ctx, in, info, handler)
}
func _WalletKit_ListAccounts_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(ListAccountsRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(WalletKitServer).ListAccounts(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/walletrpc.WalletKit/ListAccounts",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(WalletKitServer).ListAccounts(ctx, req.(*ListAccountsRequest))
}
return interceptor(ctx, in, info, handler)
}
func _WalletKit_ImportAccount_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(ImportAccountRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(WalletKitServer).ImportAccount(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/walletrpc.WalletKit/ImportAccount",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(WalletKitServer).ImportAccount(ctx, req.(*ImportAccountRequest))
}
return interceptor(ctx, in, info, handler)
}
func _WalletKit_ImportPublicKey_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(ImportPublicKeyRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(WalletKitServer).ImportPublicKey(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/walletrpc.WalletKit/ImportPublicKey",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(WalletKitServer).ImportPublicKey(ctx, req.(*ImportPublicKeyRequest))
}
return interceptor(ctx, in, info, handler)
}
func _WalletKit_PublishTransaction_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(Transaction)
if err := dec(in); err != nil {
@ -2891,6 +3514,18 @@ var _WalletKit_serviceDesc = grpc.ServiceDesc{
MethodName: "NextAddr",
Handler: _WalletKit_NextAddr_Handler,
},
{
MethodName: "ListAccounts",
Handler: _WalletKit_ListAccounts_Handler,
},
{
MethodName: "ImportAccount",
Handler: _WalletKit_ImportAccount_Handler,
},
{
MethodName: "ImportPublicKey",
Handler: _WalletKit_ImportPublicKey_Handler,
},
{
MethodName: "PublishTransaction",
Handler: _WalletKit_PublishTransaction_Handler,

@ -253,6 +253,107 @@ func local_request_WalletKit_NextAddr_0(ctx context.Context, marshaler runtime.M
}
var (
filter_WalletKit_ListAccounts_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)}
)
func request_WalletKit_ListAccounts_0(ctx context.Context, marshaler runtime.Marshaler, client WalletKitClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
var protoReq ListAccountsRequest
var metadata runtime.ServerMetadata
if err := req.ParseForm(); err != nil {
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
}
if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_WalletKit_ListAccounts_0); err != nil {
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
}
msg, err := client.ListAccounts(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
return msg, metadata, err
}
func local_request_WalletKit_ListAccounts_0(ctx context.Context, marshaler runtime.Marshaler, server WalletKitServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
var protoReq ListAccountsRequest
var metadata runtime.ServerMetadata
if err := runtime.PopulateQueryParameters(&protoReq, req.URL.Query(), filter_WalletKit_ListAccounts_0); err != nil {
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
}
msg, err := server.ListAccounts(ctx, &protoReq)
return msg, metadata, err
}
func request_WalletKit_ImportAccount_0(ctx context.Context, marshaler runtime.Marshaler, client WalletKitClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
var protoReq ImportAccountRequest
var metadata runtime.ServerMetadata
newReader, berr := utilities.IOReaderFactory(req.Body)
if berr != nil {
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr)
}
if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF {
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
}
msg, err := client.ImportAccount(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
return msg, metadata, err
}
func local_request_WalletKit_ImportAccount_0(ctx context.Context, marshaler runtime.Marshaler, server WalletKitServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
var protoReq ImportAccountRequest
var metadata runtime.ServerMetadata
newReader, berr := utilities.IOReaderFactory(req.Body)
if berr != nil {
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr)
}
if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF {
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
}
msg, err := server.ImportAccount(ctx, &protoReq)
return msg, metadata, err
}
func request_WalletKit_ImportPublicKey_0(ctx context.Context, marshaler runtime.Marshaler, client WalletKitClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
var protoReq ImportPublicKeyRequest
var metadata runtime.ServerMetadata
newReader, berr := utilities.IOReaderFactory(req.Body)
if berr != nil {
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr)
}
if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF {
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
}
msg, err := client.ImportPublicKey(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
return msg, metadata, err
}
func local_request_WalletKit_ImportPublicKey_0(ctx context.Context, marshaler runtime.Marshaler, server WalletKitServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
var protoReq ImportPublicKeyRequest
var metadata runtime.ServerMetadata
newReader, berr := utilities.IOReaderFactory(req.Body)
if berr != nil {
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr)
}
if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF {
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
}
msg, err := server.ImportPublicKey(ctx, &protoReq)
return msg, metadata, err
}
func request_WalletKit_PublishTransaction_0(ctx context.Context, marshaler runtime.Marshaler, client WalletKitClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
var protoReq Transaction
var metadata runtime.ServerMetadata
@ -707,6 +808,66 @@ func RegisterWalletKitHandlerServer(ctx context.Context, mux *runtime.ServeMux,
})
mux.Handle("GET", pattern_WalletKit_ListAccounts_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
ctx, cancel := context.WithCancel(req.Context())
defer cancel()
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req)
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
resp, md, err := local_request_WalletKit_ListAccounts_0(rctx, inboundMarshaler, server, req, pathParams)
ctx = runtime.NewServerMetadataContext(ctx, md)
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
forward_WalletKit_ListAccounts_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
})
mux.Handle("POST", pattern_WalletKit_ImportAccount_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
ctx, cancel := context.WithCancel(req.Context())
defer cancel()
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req)
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
resp, md, err := local_request_WalletKit_ImportAccount_0(rctx, inboundMarshaler, server, req, pathParams)
ctx = runtime.NewServerMetadataContext(ctx, md)
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
forward_WalletKit_ImportAccount_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
})
mux.Handle("POST", pattern_WalletKit_ImportPublicKey_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
ctx, cancel := context.WithCancel(req.Context())
defer cancel()
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req)
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
resp, md, err := local_request_WalletKit_ImportPublicKey_0(rctx, inboundMarshaler, server, req, pathParams)
ctx = runtime.NewServerMetadataContext(ctx, md)
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
forward_WalletKit_ImportPublicKey_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
})
mux.Handle("POST", pattern_WalletKit_PublishTransaction_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
ctx, cancel := context.WithCancel(req.Context())
defer cancel()
@ -1068,6 +1229,66 @@ func RegisterWalletKitHandlerClient(ctx context.Context, mux *runtime.ServeMux,
})
mux.Handle("GET", pattern_WalletKit_ListAccounts_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
ctx, cancel := context.WithCancel(req.Context())
defer cancel()
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
rctx, err := runtime.AnnotateContext(ctx, mux, req)
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
resp, md, err := request_WalletKit_ListAccounts_0(rctx, inboundMarshaler, client, req, pathParams)
ctx = runtime.NewServerMetadataContext(ctx, md)
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
forward_WalletKit_ListAccounts_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
})
mux.Handle("POST", pattern_WalletKit_ImportAccount_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
ctx, cancel := context.WithCancel(req.Context())
defer cancel()
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
rctx, err := runtime.AnnotateContext(ctx, mux, req)
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
resp, md, err := request_WalletKit_ImportAccount_0(rctx, inboundMarshaler, client, req, pathParams)
ctx = runtime.NewServerMetadataContext(ctx, md)
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
forward_WalletKit_ImportAccount_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
})
mux.Handle("POST", pattern_WalletKit_ImportPublicKey_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
ctx, cancel := context.WithCancel(req.Context())
defer cancel()
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
rctx, err := runtime.AnnotateContext(ctx, mux, req)
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
resp, md, err := request_WalletKit_ImportPublicKey_0(rctx, inboundMarshaler, client, req, pathParams)
ctx = runtime.NewServerMetadataContext(ctx, md)
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
forward_WalletKit_ImportPublicKey_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
})
mux.Handle("POST", pattern_WalletKit_PublishTransaction_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
ctx, cancel := context.WithCancel(req.Context())
defer cancel()
@ -1266,6 +1487,12 @@ var (
pattern_WalletKit_NextAddr_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"v2", "wallet", "address", "next"}, "", runtime.AssumeColonVerbOpt(true)))
pattern_WalletKit_ListAccounts_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"v2", "wallet", "accounts"}, "", runtime.AssumeColonVerbOpt(true)))
pattern_WalletKit_ImportAccount_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"v2", "wallet", "accounts", "import"}, "", runtime.AssumeColonVerbOpt(true)))
pattern_WalletKit_ImportPublicKey_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"v2", "wallet", "key", "import"}, "", runtime.AssumeColonVerbOpt(true)))
pattern_WalletKit_PublishTransaction_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"v2", "wallet", "tx"}, "", runtime.AssumeColonVerbOpt(true)))
pattern_WalletKit_SendOutputs_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"v2", "wallet", "send"}, "", runtime.AssumeColonVerbOpt(true)))
@ -1300,6 +1527,12 @@ var (
forward_WalletKit_NextAddr_0 = runtime.ForwardResponseMessage
forward_WalletKit_ListAccounts_0 = runtime.ForwardResponseMessage
forward_WalletKit_ImportAccount_0 = runtime.ForwardResponseMessage
forward_WalletKit_ImportPublicKey_0 = runtime.ForwardResponseMessage
forward_WalletKit_PublishTransaction_0 = runtime.ForwardResponseMessage
forward_WalletKit_SendOutputs_0 = runtime.ForwardResponseMessage

@ -55,6 +55,50 @@ service WalletKit {
*/
rpc NextAddr (AddrRequest) returns (AddrResponse);
/*
ListAccounts retrieves all accounts belonging to the wallet by default. A
name and key scope filter can be provided to filter through all of the
wallet accounts and return only those matching.
*/
rpc ListAccounts (ListAccountsRequest) returns (ListAccountsResponse);
/*
ImportAccount imports an account backed by an account extended public key.
The master key fingerprint denotes the fingerprint of the root key
corresponding to the account public key (also known as the key with
derivation path m/). This may be required by some hardware wallets for
proper identification and signing.
The address type can usually be inferred from the key's version, but may be
required for certain keys to map them into the proper scope.
For BIP-0044 keys, an address type must be specified as we intend to not
support importing BIP-0044 keys into the wallet using the legacy
pay-to-pubkey-hash (P2PKH) scheme. A nested witness address type will force
the standard BIP-0049 derivation scheme, while a witness address type will
force the standard BIP-0084 derivation scheme.
For BIP-0049 keys, an address type must also be specified to make a
distinction between the standard BIP-0049 address schema (nested witness
pubkeys everywhere) and our own BIP-0049Plus address schema (nested pubkeys
externally, witness pubkeys internally).
NOTE: Events (deposits/spends) for keys derived from an account will only be
detected by lnd if they happen after the import. Rescans to detect past
events will be supported later on.
*/
rpc ImportAccount (ImportAccountRequest) returns (ImportAccountResponse);
/*
ImportPublicKey imports a public key as watch-only into the wallet.
NOTE: Events (deposits/spends) for a key will only be detected by lnd if
they happen after the import. Rescans to detect past events will be
supported later on.
*/
rpc ImportPublicKey (ImportPublicKeyRequest)
returns (ImportPublicKeyResponse);
/*
PublishTransaction attempts to publish the passed transaction to the
network. Once this returns without an error, the wallet will continually
@ -250,6 +294,113 @@ message AddrResponse {
string addr = 1;
}
enum AddressType {
UNKNOWN = 0;
WITNESS_PUBKEY_HASH = 1;
NESTED_WITNESS_PUBKEY_HASH = 2;
HYBRID_NESTED_WITNESS_PUBKEY_HASH = 3;
}
message Account {
// The name used to identify the account.
string name = 1;
/*
The type of addresses the account supports.
AddressType | External Branch | Internal Branch
---------------------------------------------------------------------
WITNESS_PUBKEY_HASH | P2WPKH | P2WPKH
NESTED_WITNESS_PUBKEY_HASH | NP2WPKH | NP2WPKH
HYBRID_NESTED_WITNESS_PUBKEY_HASH | NP2WPKH | P2WPKH
*/
AddressType address_type = 2;
/*
The public key backing the account that all keys are derived from
represented as an extended key. This will always be empty for the default
imported account in which single public keys are imported into.
*/
string extended_public_key = 3;
/*
The fingerprint of the root key from which the account public key was
derived from. This will always be zero for the default imported account in
which single public keys are imported into.
*/
uint32 master_key_fingerprint = 4;
/*
The derivation path corresponding to the account public key. This will
always be empty for the default imported account in which single public keys
are imported into.
*/
string derivation_path = 5;
/*
The number of keys derived from the external branch of the account public
key. This will always be zero for the default imported account in which
single public keys are imported into.
*/
uint32 external_key_count = 6;
/*
The number of keys derived from the internal branch of the account public
key. This will always be zero for the default imported account in which
single public keys are imported into.
*/
uint32 internal_key_count = 7;
// Whether the wallet stores private keys for the account.
bool watch_only = 8;
}
message ListAccountsRequest {
// An optional filter to only return accounts matching this name.
string name = 1;
// An optional filter to only return accounts matching this address type.
AddressType address_type = 2;
}
message ListAccountsResponse {
repeated Account accounts = 1;
}
message ImportAccountRequest {
// A name to identify the account with.
string name = 1;
/*
A public key that corresponds to a wallet account represented as an extended
key. It must conform to a derivation path of the form
m/purpose'/coin_type'/account'.
*/
string extended_public_key = 2;
/*
The fingerprint of the root key (also known as the key with derivation path
m/) from which the account public key was derived from. This may be required
by some hardware wallets for proper identification and signing.
*/
uint32 master_key_fingerprint = 3;
/*
An address type is only required when the extended account public key has a
legacy version (xpub, tpub, etc.), such that the wallet cannot detect what
address scheme it belongs to.
*/
AddressType address_type = 4;
}
message ImportAccountResponse {
}
message ImportPublicKeyRequest {
// A compressed public key represented as raw bytes.
bytes public_key = 1;
// The type of address that will be generated from the public key.
AddressType address_type = 2;
}
message ImportPublicKeyResponse {
}
message Transaction {
/*
The raw serialized transaction.

@ -11,6 +11,86 @@
"application/json"
],
"paths": {
"/v2/wallet/accounts": {
"get": {
"summary": "ListAccounts retrieves all accounts belonging to the wallet by default. A\nname and key scope filter can be provided to filter through all of the\nwallet accounts and return only those matching.",
"operationId": "ListAccounts",
"responses": {
"200": {
"description": "A successful response.",
"schema": {
"$ref": "#/definitions/walletrpcListAccountsResponse"
}
},
"default": {
"description": "An unexpected error response",
"schema": {
"$ref": "#/definitions/runtimeError"
}
}
},
"parameters": [
{
"name": "name",
"description": "An optional filter to only return accounts matching this name.",
"in": "query",
"required": false,
"type": "string"
},
{
"name": "address_type",
"description": "An optional filter to only return accounts matching this address type.",
"in": "query",
"required": false,
"type": "string",
"enum": [
"UNKNOWN",
"WITNESS_PUBKEY_HASH",
"NESTED_WITNESS_PUBKEY_HASH",
"HYBRID_NESTED_WITNESS_PUBKEY_HASH"
],
"default": "UNKNOWN"
}
],
"tags": [
"WalletKit"
]
}
},
"/v2/wallet/accounts/import": {
"post": {
"summary": "ImportAccount imports an account backed by an account extended public key.\nThe master key fingerprint denotes the fingerprint of the root key\ncorresponding to the account public key (also known as the key with\nderivation path m/). This may be required by some hardware wallets for\nproper identification and signing.",
"description": "The address type can usually be inferred from the key's version, but may be\nrequired for certain keys to map them into the proper scope.\n\nFor BIP-0044 keys, an address type must be specified as we intend to not\nsupport importing BIP-0044 keys into the wallet using the legacy\npay-to-pubkey-hash (P2PKH) scheme. A nested witness address type will force\nthe standard BIP-0049 derivation scheme, while a witness address type will\nforce the standard BIP-0084 derivation scheme.\n\nFor BIP-0049 keys, an address type must also be specified to make a\ndistinction between the standard BIP-0049 address schema (nested witness\npubkeys everywhere) and our own BIP-0049Plus address schema (nested pubkeys\nexternally, witness pubkeys internally).\n\nNOTE: Events (deposits/spends) for keys derived from an account will only be\ndetected by lnd if they happen after the import. Rescans to detect past\nevents will be supported later on.",
"operationId": "ImportAccount",
"responses": {
"200": {
"description": "A successful response.",
"schema": {
"$ref": "#/definitions/walletrpcImportAccountResponse"
}
},
"default": {
"description": "An unexpected error response",
"schema": {
"$ref": "#/definitions/runtimeError"
}
}
},
"parameters": [
{
"name": "body",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/walletrpcImportAccountRequest"
}
}
],
"tags": [
"WalletKit"
]
}
},
"/v2/wallet/address/next": {
"post": {
"summary": "NextAddr returns the next unused address within the wallet.",
@ -144,6 +224,40 @@
]
}
},
"/v2/wallet/key/import": {
"post": {
"summary": "ImportPublicKey imports a public key as watch-only into the wallet.",
"description": "NOTE: Events (deposits/spends) for a key will only be detected by lnd if\nthey happen after the import. Rescans to detect past events will be\nsupported later on.",
"operationId": "ImportPublicKey",
"responses": {
"200": {
"description": "A successful response.",
"schema": {
"$ref": "#/definitions/walletrpcImportPublicKeyResponse"
}
},
"default": {
"description": "An unexpected error response",
"schema": {
"$ref": "#/definitions/runtimeError"
}
}
},
"parameters": [
{
"name": "body",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/walletrpcImportPublicKeyRequest"
}
}
],
"tags": [
"WalletKit"
]
}
},
"/v2/wallet/key/next": {
"post": {
"summary": "DeriveNextKey attempts to derive the *next* key within the key family\n(account in BIP43) specified. This method should return the next external\nchild within this branch.",
@ -731,6 +845,47 @@
}
}
},
"walletrpcAccount": {
"type": "object",
"properties": {
"name": {
"type": "string",
"description": "The name used to identify the account."
},
"address_type": {
"$ref": "#/definitions/walletrpcAddressType",
"title": "The type of addresses the account supports.\nAddressType | External Branch | Internal Branch\n---------------------------------------------------------------------\nWITNESS_PUBKEY_HASH | P2WPKH | P2WPKH\nNESTED_WITNESS_PUBKEY_HASH | NP2WPKH | NP2WPKH\nHYBRID_NESTED_WITNESS_PUBKEY_HASH | NP2WPKH | P2WPKH"
},
"extended_public_key": {
"type": "string",
"description": "The public key backing the account that all keys are derived from\nrepresented as an extended key. This will always be empty for the default\nimported account in which single public keys are imported into."
},
"master_key_fingerprint": {
"type": "integer",
"format": "int64",
"description": "The fingerprint of the root key from which the account public key was\nderived from. This will always be zero for the default imported account in\nwhich single public keys are imported into."
},
"derivation_path": {
"type": "string",
"description": "The derivation path corresponding to the account public key. This will\nalways be empty for the default imported account in which single public keys\nare imported into."
},
"external_key_count": {
"type": "integer",
"format": "int64",
"description": "The number of keys derived from the external branch of the account public\nkey. This will always be zero for the default imported account in which\nsingle public keys are imported into."
},
"internal_key_count": {
"type": "integer",
"format": "int64",
"description": "The number of keys derived from the internal branch of the account public\nkey. This will always be zero for the default imported account in which\nsingle public keys are imported into."
},
"watch_only": {
"type": "boolean",
"format": "boolean",
"description": "Whether the wallet stores private keys for the account."
}
}
},
"walletrpcAddrRequest": {
"type": "object",
"properties": {
@ -749,6 +904,16 @@
}
}
},
"walletrpcAddressType": {
"type": "string",
"enum": [
"UNKNOWN",
"WITNESS_PUBKEY_HASH",
"NESTED_WITNESS_PUBKEY_HASH",
"HYBRID_NESTED_WITNESS_PUBKEY_HASH"
],
"default": "UNKNOWN"
},
"walletrpcBumpFeeRequest": {
"type": "object",
"properties": {
@ -870,6 +1035,48 @@
}
}
},
"walletrpcImportAccountRequest": {
"type": "object",
"properties": {
"name": {
"type": "string",
"description": "A name to identify the account with."
},
"extended_public_key": {
"type": "string",
"description": "A public key that corresponds to a wallet account represented as an extended\nkey. It must conform to a derivation path of the form\nm/purpose'/coin_type'/account'."
},
"master_key_fingerprint": {
"type": "integer",
"format": "int64",
"description": "The fingerprint of the root key (also known as the key with derivation path\nm/) from which the account public key was derived from. This may be required\nby some hardware wallets for proper identification and signing."
},
"address_type": {
"$ref": "#/definitions/walletrpcAddressType",
"description": "An address type is only required when the extended account public key has a\nlegacy version (xpub, tpub, etc.), such that the wallet cannot detect what\naddress scheme it belongs to."
}
}
},
"walletrpcImportAccountResponse": {
"type": "object"
},
"walletrpcImportPublicKeyRequest": {
"type": "object",
"properties": {
"public_key": {
"type": "string",
"format": "byte",
"description": "A compressed public key represented as raw bytes."
},
"address_type": {
"$ref": "#/definitions/walletrpcAddressType",
"description": "The type of address that will be generated from the public key."
}
}
},
"walletrpcImportPublicKeyResponse": {
"type": "object"
},
"walletrpcKeyReq": {
"type": "object",
"properties": {
@ -936,6 +1143,17 @@
}
}
},
"walletrpcListAccountsResponse": {
"type": "object",
"properties": {
"accounts": {
"type": "array",
"items": {
"$ref": "#/definitions/walletrpcAccount"
}
}
}
},
"walletrpcListLeasesResponse": {
"type": "object",
"properties": {

@ -12,11 +12,14 @@ import (
"path/filepath"
"time"
"github.com/btcsuite/btcd/btcec"
"github.com/btcsuite/btcd/chaincfg/chainhash"
"github.com/btcsuite/btcd/txscript"
"github.com/btcsuite/btcd/wire"
"github.com/btcsuite/btcutil"
"github.com/btcsuite/btcutil/hdkeychain"
"github.com/btcsuite/btcutil/psbt"
"github.com/btcsuite/btcwallet/waddrmgr"
"github.com/btcsuite/btcwallet/wtxmgr"
"github.com/grpc-ecosystem/grpc-gateway/runtime"
"github.com/lightningnetwork/lnd/input"
@ -128,6 +131,18 @@ var (
Entity: "onchain",
Action: "write",
}},
"/walletrpc.WalletKit/ListAccounts": {{
Entity: "onchain",
Action: "read",
}},
"/walletrpc.WalletKit/ImportAccount": {{
Entity: "onchain",
Action: "write",
}},
"/walletrpc.WalletKit/ImportPublicKey": {{
Entity: "onchain",
Action: "write",
}},
}
// DefaultWalletKitMacFilename is the default name of the wallet kit
@ -1215,3 +1230,198 @@ func (w *WalletKit) FinalizePsbt(_ context.Context,
RawFinalTx: finalTxBytes.Bytes(),
}, nil
}
// marshalWalletAccount converts the properties of an account into its RPC
// representation.
func marshalWalletAccount(account *waddrmgr.AccountProperties) (*Account, error) {
var addrType AddressType
switch account.KeyScope {
case waddrmgr.KeyScopeBIP0049Plus:
// No address schema present represents the traditional BIP-0049
// address derivation scheme.
if account.AddrSchema == nil {
addrType = AddressType_HYBRID_NESTED_WITNESS_PUBKEY_HASH
break
}
switch account.AddrSchema {
case &waddrmgr.KeyScopeBIP0049AddrSchema:
addrType = AddressType_NESTED_WITNESS_PUBKEY_HASH
default:
return nil, fmt.Errorf("unsupported address schema %v",
*account.AddrSchema)
}
case waddrmgr.KeyScopeBIP0084:
addrType = AddressType_WITNESS_PUBKEY_HASH
default:
return nil, fmt.Errorf("account %v has unsupported "+
"key scope %v", account.AccountName, account.KeyScope)
}
rpcAccount := &Account{
Name: account.AccountName,
AddressType: addrType,
ExternalKeyCount: account.ExternalKeyCount,
InternalKeyCount: account.InternalKeyCount,
WatchOnly: account.IsWatchOnly,
}
// The remaining fields can only be done on accounts other than the
// default imported one existing within each key scope.
if account.AccountName != waddrmgr.ImportedAddrAccountName {
nonHardenedIndex := account.AccountPubKey.ChildIndex() -
hdkeychain.HardenedKeyStart
rpcAccount.ExtendedPublicKey = account.AccountPubKey.String()
rpcAccount.MasterKeyFingerprint = account.MasterKeyFingerprint
rpcAccount.DerivationPath = fmt.Sprintf("%v/%v'",
account.KeyScope, nonHardenedIndex)
}
return rpcAccount, nil
}
// ListAccounts retrieves all accounts belonging to the wallet by default. A
// name and key scope filter can be provided to filter through all of the wallet
// accounts and return only those matching.
func (w *WalletKit) ListAccounts(ctx context.Context,
req *ListAccountsRequest) (*ListAccountsResponse, error) {
// Map the supported address types into their corresponding key scope.
var keyScopeFilter *waddrmgr.KeyScope
switch req.AddressType {
case AddressType_UNKNOWN:
break
case AddressType_WITNESS_PUBKEY_HASH:
keyScope := waddrmgr.KeyScopeBIP0084
keyScopeFilter = &keyScope
case AddressType_NESTED_WITNESS_PUBKEY_HASH,
AddressType_HYBRID_NESTED_WITNESS_PUBKEY_HASH:
keyScope := waddrmgr.KeyScopeBIP0049Plus
keyScopeFilter = &keyScope
default:
return nil, fmt.Errorf("unhandled address type %v", req.AddressType)
}
accounts, err := w.cfg.Wallet.ListAccounts(req.Name, keyScopeFilter)
if err != nil {
return nil, err
}
rpcAccounts := make([]*Account, 0, len(accounts))
for _, account := range accounts {
// Don't include the default imported accounts created by the
// wallet in the response if they don't have any keys imported.
if account.AccountName == waddrmgr.ImportedAddrAccountName &&
account.ImportedKeyCount == 0 {
continue
}
rpcAccount, err := marshalWalletAccount(account)
if err != nil {
return nil, err
}
rpcAccounts = append(rpcAccounts, rpcAccount)
}
return &ListAccountsResponse{Accounts: rpcAccounts}, nil
}
// parseAddrType parses an address type from its RPC representation to a
// *waddrmgr.AddressType.
func parseAddrType(addrType AddressType,
required bool) (*waddrmgr.AddressType, error) {
switch addrType {
case AddressType_UNKNOWN:
if required {
return nil, errors.New("an address type must be specified")
}
return nil, nil
case AddressType_WITNESS_PUBKEY_HASH:
addrTyp := waddrmgr.WitnessPubKey
return &addrTyp, nil
case AddressType_NESTED_WITNESS_PUBKEY_HASH:
addrTyp := waddrmgr.NestedWitnessPubKey
return &addrTyp, nil
case AddressType_HYBRID_NESTED_WITNESS_PUBKEY_HASH:
addrTyp := waddrmgr.WitnessPubKey
return &addrTyp, nil
default:
return nil, fmt.Errorf("unhandled address type %v", addrType)
}
}
// ImportAccount imports an account backed by an account extended public key.
// The master key fingerprint denotes the fingerprint of the root key
// corresponding to the account public key (also known as the key with
// derivation path m/). This may be required by some hardware wallets for proper
// identification and signing.
//
// The address type can usually be inferred from the key's version, but may be
// required for certain keys to map them into the proper scope.
//
// For BIP-0044 keys, an address type must be specified as we intend to not
// support importing BIP-0044 keys into the wallet using the legacy
// pay-to-pubkey-hash (P2PKH) scheme. A nested witness address type will force
// the standard BIP-0049 derivation scheme, while a witness address type will
// force the standard BIP-0084 derivation scheme.
//
// For BIP-0049 keys, an address type must also be specified to make a
// distinction between the standard BIP-0049 address schema (nested witness
// pubkeys everywhere) and our own BIP-0049Plus address schema (nested pubkeys
// externally, witness pubkeys internally).
func (w *WalletKit) ImportAccount(ctx context.Context,
req *ImportAccountRequest) (*ImportAccountResponse, error) {
accountPubKey, err := hdkeychain.NewKeyFromString(req.ExtendedPublicKey)
if err != nil {
return nil, err
}
addrType, err := parseAddrType(req.AddressType, false)
if err != nil {
return nil, err
}
err = w.cfg.Wallet.ImportAccount(
req.Name, accountPubKey, req.MasterKeyFingerprint, addrType,
)
if err != nil {
return nil, err
}
return &ImportAccountResponse{}, nil
}
// ImportPublicKey imports a single derived public key into the wallet. The
// address type can usually be inferred from the key's version, but in the case
// of legacy versions (xpub, tpub), an address type must be specified as we
// intend to not support importing BIP-44 keys into the wallet using the legacy
// pay-to-pubkey-hash (P2PKH) scheme.
func (w *WalletKit) ImportPublicKey(ctx context.Context,
req *ImportPublicKeyRequest) (*ImportPublicKeyResponse, error) {
pubKey, err := btcec.ParsePubKey(req.PublicKey, btcec.S256())
if err != nil {
return nil, err
}
addrType, err := parseAddrType(req.AddressType, true)
if err != nil {
return nil, err
}
if err := w.cfg.Wallet.ImportPublicKey(pubKey, *addrType); err != nil {
return nil, err
}
return &ImportPublicKeyResponse{}, nil
}