Documentation
¶
Index ¶
- Constants
- func NewBitcoinAccount(key types.DIDSecretKey) (types.WalletAccount, error)
- func ResolveAccount(didString string, key types.DIDSecretKey) (types.WalletAccount, error)
- type BitcoinAccount
- func (a *BitcoinAccount) Address() string
- func (a *BitcoinAccount) Info() *crypto.AccountData
- func (a *BitcoinAccount) Method() types.DIDMethod
- func (a *BitcoinAccount) PublicKey() (*crypto.Secp256k1PubKey, error)
- func (a *BitcoinAccount) Sign(msg []byte) ([]byte, error)
- func (a *BitcoinAccount) Type() string
- func (a *BitcoinAccount) Verify(msg []byte, sig []byte) (bool, error)
Constants ¶
View Source
const Method = types.DIDMethod("btcr")
Variables ¶
This section is empty.
Functions ¶
func NewBitcoinAccount ¶
func NewBitcoinAccount(key types.DIDSecretKey) (types.WalletAccount, error)
NewBitcoinAccount creates a new Bitcoin Wallet Actor DID
func ResolveAccount ¶
func ResolveAccount(didString string, key types.DIDSecretKey) (types.WalletAccount, error)
ResolveAccount resolves a Sonr Wallet Actor DID
Types ¶
type BitcoinAccount ¶
type BitcoinAccount struct { ID types.DIDIdentifier Resources []types.DIDResource // contains filtered or unexported fields }
func (*BitcoinAccount) Address ¶
func (a *BitcoinAccount) Address() string
Address returns the address of the account
func (*BitcoinAccount) Info ¶
func (a *BitcoinAccount) Info() *crypto.AccountData
Info returns the account data
func (*BitcoinAccount) Method ¶
func (a *BitcoinAccount) Method() types.DIDMethod
Method returns the DID method
func (*BitcoinAccount) PublicKey ¶
func (a *BitcoinAccount) PublicKey() (*crypto.Secp256k1PubKey, error)
PublicKey returns the public key of the account
func (*BitcoinAccount) Sign ¶
func (a *BitcoinAccount) Sign(msg []byte) ([]byte, error)
Sign signs a message with the account
func (*BitcoinAccount) Type ¶
func (a *BitcoinAccount) Type() string
Type returns the type of the account
Click to show internal directories.
Click to hide internal directories.