Documentation
¶
Index ¶
- Variables
- func Address58(config *aklib.Config, p Bytes) (string, error)
- func Address58ForAddress(p Bytes) string
- func Decapsulate(priv *sidh.PrivateKey, ctext []byte) ([]byte, error)
- func Decode58(value string) ([]byte, error)
- func DecryptSeed(ct []byte, pwd []byte) ([]byte, error)
- func Encapsulate(cfg *aklib.Config, d string) (ctext []byte, secret []byte, err error)
- func Encode58(encoded []byte) string
- func EncryptSeed(pt []byte, pwd []byte) []byte
- func GenerateSeed32() []byte
- func HDFrom58(cfg *aklib.Config, seed58 string, pwd []byte) ([]byte, bool, error)
- func HDSeed58(conf *aklib.Config, seed, pwd []byte, isNode bool) string
- func HDseed(masterkey []byte, indices ...uint32) []byte
- func IsValidSIKEPublicKey(cfg *aklib.Config, d string) (*sidh.PublicKey, error)
- func MultisigAddress(cfg *aklib.Config, m byte, address ...Bytes) string
- func MultisigAddress58(cfg *aklib.Config, bmul Bytes) (string, error)
- func NewSIKEPrivatekey(seed []byte) (*sidh.PrivateKey, error)
- func ParseAddress58ForAddress(pub58 string) ([]byte, error)
- func SIKEPublicKey(cfg *aklib.Config, priv *sidh.PrivateKey) string
- type Address
- func (a *Address) Address(cfg *aklib.Config) Bytes
- func (a *Address) Address58(cfg *aklib.Config) string
- func (*Address) Descriptor() ([]byte, []int)
- func (this *Address) Equal(that interface{}) bool
- func (m *Address) Marshal() (dAtA []byte, err error)
- func (m *Address) MarshalTo(dAtA []byte) (int, error)
- func (*Address) ProtoMessage()
- func (a *Address) PublicKey() []byte
- func (m *Address) Reset()
- func (a *Address) Sign(msg []byte) (*Signature, error)
- func (m *Address) Size() (n int)
- func (m *Address) String() string
- func (m *Address) Unmarshal(dAtA []byte) error
- func (m *Address) XXX_DiscardUnknown()
- func (m *Address) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (dst *Address) XXX_Merge(src proto.Message)
- func (m *Address) XXX_Size() int
- func (m *Address) XXX_Unmarshal(b []byte) error
- type Bytes
- type Signature
- func (sig *Signature) Address(cfg *aklib.Config, isNode bool) Bytes
- func (*Signature) Descriptor() ([]byte, []int)
- func (this *Signature) Equal(that interface{}) bool
- func (m *Signature) Marshal() (dAtA []byte, err error)
- func (m *Signature) MarshalTo(dAtA []byte) (int, error)
- func (*Signature) ProtoMessage()
- func (m *Signature) Reset()
- func (m *Signature) Size() (n int)
- func (m *Signature) String() string
- func (m *Signature) Unmarshal(dAtA []byte) error
- func (sig *Signature) Verify(msg []byte) error
- func (m *Signature) XXX_DiscardUnknown()
- func (m *Signature) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (dst *Signature) XXX_Merge(src proto.Message)
- func (m *Signature) XXX_Size() int
- func (m *Signature) XXX_Unmarshal(b []byte) error
Constants ¶
This section is empty.
Variables ¶
var ( ErrInvalidLengthAddress = fmt.Errorf("proto: negative length found during unmarshaling") ErrIntOverflowAddress = fmt.Errorf("proto: integer overflow") )
Functions ¶
func Address58ForAddress ¶
Address58ForAddress converts address bytes to encode58 format.
func Decapsulate ¶
func Decapsulate(priv *sidh.PrivateKey, ctext []byte) ([]byte, error)
Decapsulate returns decrypted plain bytes.
func DecryptSeed ¶
DecryptSeed decrypts by AES256 with MAC.
func Encapsulate ¶
Encapsulate returns secret and cipher bytes encrypted by pub.
func EncryptSeed ¶
EncryptSeed encrypts by AES256 with MAC.
func IsValidSIKEPublicKey ¶
IsValidSIKEPublicKey returns pubkey if d is a valid public key.
func MultisigAddress ¶
MultisigAddress returns an multisig address.
func MultisigAddress58 ¶
MultisigAddress58 returns an multisig address string.
func NewSIKEPrivatekey ¶
func NewSIKEPrivatekey(seed []byte) (*sidh.PrivateKey, error)
NewSIKEPrivatekey makes a sike privatekey from seed
func ParseAddress58ForAddress ¶
ParseAddress58ForAddress parses and checks base58 encoded address and returns binary public key.
func SIKEPublicKey ¶
func SIKEPublicKey(cfg *aklib.Config, priv *sidh.PrivateKey) string
SIKEPublicKey returns the public key in transaction in string.
Types ¶
type Address ¶
type Address struct { IsNode bool `protobuf:"varint,1,opt,name=is_node,json=isNode,proto3" json:"is_node,omitempty"` PrivateKey *bliss.PrivateKeyT `protobuf:"bytes,2,opt,name=private_key,json=privateKey,proto3" json:"private_key,omitempty"` }
Address represents an address an assciated Merkle Tree in ADK.
func NewPopulatedAddress ¶
func (*Address) Descriptor ¶
func (*Address) ProtoMessage ¶
func (*Address) ProtoMessage()
func (*Address) XXX_DiscardUnknown ¶
func (m *Address) XXX_DiscardUnknown()
func (*Address) XXX_Marshal ¶
func (*Address) XXX_Unmarshal ¶
type Bytes ¶
type Bytes []byte
Bytes is a byte representation of address.
func MultisigAddressByte ¶
MultisigAddressByte returns an multisig address bytes.
func ParseAddress58 ¶
ParseAddress58 parses and checks base58 encoded address and returns binary public key and its height.
func ParseMultisigAddress ¶
ParseMultisigAddress parses and checks base58 encoded multisig address and returns binary address..
func (Bytes) MarshalJSON ¶
MarshalJSON returns m as the JSON encoding of m.
func (*Bytes) UnmarshalJSON ¶
UnmarshalJSON sets *bs to a copy of data.
type Signature ¶
type Signature struct { PublicKey []byte `protobuf:"bytes,1,opt,name=public_key,json=publicKey,proto3" json:"public_key,omitempty"` Sig []byte `protobuf:"bytes,2,opt,name=sig,proto3" json:"sig,omitempty"` }
Signature is a signature for hashed-address..
func NewPopulatedSignature ¶
func (*Signature) Descriptor ¶
func (*Signature) ProtoMessage ¶
func (*Signature) ProtoMessage()
func (*Signature) XXX_DiscardUnknown ¶
func (m *Signature) XXX_DiscardUnknown()