Documentation ¶
Index ¶
- func FormatAC1(hash []byte) string
- func FormatAC2(hash []byte) string
- func FormatAC3(hash []byte) string
- func FormatAS1(seed []byte) string
- func FormatAS2(seed []byte) string
- func FormatAS3(seed []byte) string
- func FormatBTC(hash []byte) string
- func FormatETH(hash []byte) string
- func FormatFA(hash []byte) string
- func FormatFs(seed []byte) string
- func FormatMH(hash []byte, code uint64) string
- type Address
- type Lite
- type PrivateKey
- func FromED25519PrivateKey(key []byte) *PrivateKey
- func FromETHPrivateKey(key *ecdsa.PrivateKey) *PrivateKey
- func FromEcdsaPrivateKey(key *ecdsa.PrivateKey) *PrivateKey
- func FromPrivateKeyBytes(priv []byte, typ protocol.SignatureType) (*PrivateKey, error)
- func FromRSAPrivateKey(key *rsa.PrivateKey) *PrivateKey
- type PublicKey
- type PublicKeyHash
- type Unknown
- type UnknownHash
- type UnknownMultihash
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FormatAC1 ¶
FormatAC1 formats the hash of an Accumulate public key as an Accumulate AC1 address. (ed25519)
func FormatAC2 ¶ added in v1.4.0
FormatAC2 formats the hash of an Accumulate public key as an Accumulate AC2 (ecdsa) address.
func FormatAC3 ¶ added in v1.4.0
FormatAC3 formats the hash of an Accumulate public key as an Accumulate AC3 (rsa) address.
func FormatAS1 ¶
FormatAS1 formats an Accumulate private key as an Accumulate AS1 address. (ed25519)
func FormatAS2 ¶ added in v1.4.0
FormatAS2 formats an Accumulate private key as an Accumulate AS2 ecdsa address.
func FormatAS3 ¶ added in v1.4.0
FormatAS3 formats an Accumulate private key as an Accumulate AS3 rsa address.
func FormatBTC ¶
FormatBTC formats the hash of a Bitcoin public key as a P2PKH address, additionally prefixed with 'BT'.
Types ¶
type Address ¶
type Lite ¶
func (*Lite) GetPrivateKey ¶
func (*Lite) GetPublicKey ¶
func (*Lite) GetPublicKeyHash ¶
func (*Lite) GetType ¶
func (l *Lite) GetType() protocol.SignatureType
type PrivateKey ¶
func FromED25519PrivateKey ¶ added in v1.4.0
func FromED25519PrivateKey(key []byte) *PrivateKey
func FromETHPrivateKey ¶ added in v1.4.0
func FromETHPrivateKey(key *ecdsa.PrivateKey) *PrivateKey
func FromEcdsaPrivateKey ¶ added in v1.4.0
func FromEcdsaPrivateKey(key *ecdsa.PrivateKey) *PrivateKey
func FromPrivateKeyBytes ¶ added in v1.4.0
func FromPrivateKeyBytes(priv []byte, typ protocol.SignatureType) (*PrivateKey, error)
func FromRSAPrivateKey ¶ added in v1.4.0
func FromRSAPrivateKey(key *rsa.PrivateKey) *PrivateKey
func (*PrivateKey) GetPrivateKey ¶
func (p *PrivateKey) GetPrivateKey() ([]byte, bool)
func (*PrivateKey) String ¶
func (p *PrivateKey) String() string
type PublicKey ¶
type PublicKey struct { Type protocol.SignatureType Key []byte }
func FromED25519PublicKey ¶ added in v1.4.0
func FromEcdsaPublicKeyAsPKIX ¶ added in v1.4.0
func FromRSAPublicKey ¶ added in v1.4.0
func (*PublicKey) GetPrivateKey ¶
func (*PublicKey) GetPublicKey ¶
func (*PublicKey) GetPublicKeyHash ¶
func (*PublicKey) GetType ¶
func (p *PublicKey) GetType() protocol.SignatureType
type PublicKeyHash ¶
type PublicKeyHash struct { Type protocol.SignatureType Hash []byte }
func (*PublicKeyHash) GetPrivateKey ¶
func (p *PublicKeyHash) GetPrivateKey() ([]byte, bool)
func (*PublicKeyHash) GetPublicKey ¶
func (p *PublicKeyHash) GetPublicKey() ([]byte, bool)
func (*PublicKeyHash) GetPublicKeyHash ¶
func (p *PublicKeyHash) GetPublicKeyHash() ([]byte, bool)
func (*PublicKeyHash) GetType ¶
func (p *PublicKeyHash) GetType() protocol.SignatureType
func (*PublicKeyHash) String ¶
func (p *PublicKeyHash) String() string
type Unknown ¶
func (*Unknown) GetPrivateKey ¶
func (*Unknown) GetPublicKey ¶
func (*Unknown) GetPublicKeyHash ¶
func (*Unknown) GetType ¶
func (u *Unknown) GetType() protocol.SignatureType
type UnknownHash ¶
type UnknownHash struct {
Hash []byte
}
func (*UnknownHash) GetPrivateKey ¶
func (u *UnknownHash) GetPrivateKey() ([]byte, bool)
func (*UnknownHash) GetPublicKey ¶
func (u *UnknownHash) GetPublicKey() ([]byte, bool)
func (*UnknownHash) GetPublicKeyHash ¶
func (u *UnknownHash) GetPublicKeyHash() ([]byte, bool)
func (*UnknownHash) GetType ¶
func (u *UnknownHash) GetType() protocol.SignatureType
func (*UnknownHash) String ¶
func (u *UnknownHash) String() string
type UnknownMultihash ¶
type UnknownMultihash multihash.DecodedMultihash
func (*UnknownMultihash) GetPrivateKey ¶
func (u *UnknownMultihash) GetPrivateKey() ([]byte, bool)
func (*UnknownMultihash) GetPublicKey ¶
func (u *UnknownMultihash) GetPublicKey() ([]byte, bool)
func (*UnknownMultihash) GetPublicKeyHash ¶
func (u *UnknownMultihash) GetPublicKeyHash() ([]byte, bool)
func (*UnknownMultihash) GetType ¶
func (u *UnknownMultihash) GetType() protocol.SignatureType
func (*UnknownMultihash) String ¶
func (u *UnknownMultihash) String() string
Click to show internal directories.
Click to hide internal directories.