Documentation ¶
Overview ¶
types and functions for converting Bitmark accounts (the public key) and their signatures
Index ¶
- Constants
- type Account
- type AccountInterface
- type ED25519Account
- func (account *ED25519Account) Bytes() []byte
- func (account *ED25519Account) CheckSignature(message []byte, signature Signature) error
- func (account *ED25519Account) KeyType() int
- func (account ED25519Account) MarshalText() ([]byte, error)
- func (account *ED25519Account) PublicKeyBytes() []byte
- func (account *ED25519Account) String() string
- type NothingAccount
- func (account *NothingAccount) Bytes() []byte
- func (account *NothingAccount) CheckSignature(message []byte, signature Signature) error
- func (account *NothingAccount) KeyType() int
- func (account NothingAccount) MarshalText() ([]byte, error)
- func (account *NothingAccount) PublicKeyBytes() []byte
- func (account *NothingAccount) String() string
- type Signature
Constants ¶
const ( // list of valid algorithms Nothing = iota // zero keytype **Just for Testing** ED25519 = iota )
enumeration of supported key algorithms
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Account ¶
type Account struct {
AccountInterface
}
base type for accounts
func AccountFromBase58 ¶
this converts a Base58 encoded string and returns an account
one of the specific account types are returned using the base "AccountInterface" interface type to allow individual methods to be called.
func AccountFromBytes ¶
this converts a byte encoded buffer and returns an account
one of the specific account types are returned using the base "AccountInterface" interface type to allow individual methods to be called.
func (*Account) UnmarshalText ¶
type AccountInterface ¶
type ED25519Account ¶
for ed25519 signatures
func (*ED25519Account) Bytes ¶
func (account *ED25519Account) Bytes() []byte
byte slice for encoded key
func (*ED25519Account) CheckSignature ¶
func (account *ED25519Account) CheckSignature(message []byte, signature Signature) error
check the signature of a message
func (*ED25519Account) KeyType ¶
func (account *ED25519Account) KeyType() int
key type code (see enumeration above)
func (ED25519Account) MarshalText ¶
func (account ED25519Account) MarshalText() ([]byte, error)
convert an account to its Base58 JSON form
func (*ED25519Account) PublicKeyBytes ¶
func (account *ED25519Account) PublicKeyBytes() []byte
fetch the public key as byte slice
func (*ED25519Account) String ¶
func (account *ED25519Account) String() string
base58 encoding of encoded key
type NothingAccount ¶
just for debugging
func (*NothingAccount) Bytes ¶
func (account *NothingAccount) Bytes() []byte
byte slice for encoded key
func (*NothingAccount) CheckSignature ¶
func (account *NothingAccount) CheckSignature(message []byte, signature Signature) error
check the signature of a message
func (*NothingAccount) KeyType ¶
func (account *NothingAccount) KeyType() int
key type code (see enumeration above)
func (NothingAccount) MarshalText ¶
func (account NothingAccount) MarshalText() ([]byte, error)
convert an account to its Base58 JSON form
func (*NothingAccount) PublicKeyBytes ¶
func (account *NothingAccount) PublicKeyBytes() []byte
fetch the public key as byte slice
func (*NothingAccount) String ¶
func (account *NothingAccount) String() string
base58 encoding of encoded key
type Signature ¶
type Signature []byte
the type for a signature
func (Signature) GoString ¶
convert a binary signature to hex string for use by the fmt package (for %#v)
func (Signature) MarshalText ¶
convert signature to text
func (*Signature) Scan ¶
convert a text representation to a signature for use by the format package scan routines
func (Signature) String ¶
convert a binary signature to hex string for use by the fmt package (for %s)
func (*Signature) UnmarshalText ¶
convert text into a signature