Add hex string of pubkey to AddressInfo.
This commit is contained in:
parent
89e3054bc5
commit
455a376df8
1 changed files with 3 additions and 0 deletions
|
@ -26,6 +26,7 @@ import (
|
||||||
"crypto/sha256"
|
"crypto/sha256"
|
||||||
"crypto/sha512"
|
"crypto/sha512"
|
||||||
"encoding/binary"
|
"encoding/binary"
|
||||||
|
"encoding/hex"
|
||||||
"errors"
|
"errors"
|
||||||
"fmt"
|
"fmt"
|
||||||
"github.com/conformal/btcec"
|
"github.com/conformal/btcec"
|
||||||
|
@ -920,6 +921,7 @@ type AddressInfo struct {
|
||||||
Compressed bool
|
Compressed bool
|
||||||
FirstBlock int32
|
FirstBlock int32
|
||||||
Imported bool
|
Imported bool
|
||||||
|
Pubkey string
|
||||||
}
|
}
|
||||||
|
|
||||||
// GetSortedActiveAddresses returns all wallet addresses that have been
|
// GetSortedActiveAddresses returns all wallet addresses that have been
|
||||||
|
@ -1405,6 +1407,7 @@ func (a *btcAddress) info(net btcwire.BitcoinNet) (*AddressInfo, error) {
|
||||||
Compressed: a.flags.compressed,
|
Compressed: a.flags.compressed,
|
||||||
FirstBlock: a.firstBlock,
|
FirstBlock: a.firstBlock,
|
||||||
Imported: a.chainIndex == importedKeyChainIdx,
|
Imported: a.chainIndex == importedKeyChainIdx,
|
||||||
|
Pubkey: hex.EncodeToString(a.pubKey),
|
||||||
}, nil
|
}, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue