btcr

package
v0.7.4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 13, 2023 License: GPL-3.0 Imports: 3 Imported by: 0

Documentation

Index

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

func (*BitcoinAccount) Verify

func (a *BitcoinAccount) Verify(msg []byte, sig []byte) (bool, error)

Verify verifies a signature

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL