Skip to content

Commit e0a4d73

Browse files
committed
elements: add blech32 to addrtype
The elements getnewaddress rpc was fixed to actually return a bech32 (unblinded) address when requested specifically. This commit adds the (blinded) blech32 type to AddrType.
1 parent ef34d84 commit e0a4d73

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

gelements/elementsd.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ func (e *Elements) StartUp(host string, port uint) error {
101101
// Blocking!
102102
func (b *Elements) request(m jrpc2.Method, resp interface{}) error {
103103
id := b.NextId()
104-
mr := &jrpc2.Request{id, m}
104+
mr := &jrpc2.Request{Id: id, Method: m}
105105
jbytes, err := json.Marshal(mr)
106106
if err != nil {
107107
return err
@@ -354,10 +354,11 @@ const (
354354
Bech32 AddrType = iota
355355
P2shSegwit
356356
Legacy
357+
Blech32
357358
)
358359

359360
func (a AddrType) String() string {
360-
return []string{"bech32", "p2sh-segwit", "legacy"}[a]
361+
return []string{"bech32", "p2sh-segwit", "legacy", "blech32"}[a]
361362
}
362363

363364
func (r *GetNewAddressRequest) Name() string {

0 commit comments

Comments
 (0)