Documentation ¶
Index ¶
- type AccountV1
- func (a *AccountV1) DID() string
- func (a *AccountV1) DIDAlias() string
- func (a *AccountV1) GetAccountData() *crypto.AccountData
- func (a *AccountV1) Marshal() ([]byte, error)
- func (a *AccountV1) PublicKey() *secp256k1.PubKey
- func (a *AccountV1) Sign(pks *v1types.Keyshare, msg []byte) ([]byte, error)
- func (a *AccountV1) Unmarshal(data []byte) error
- func (a *AccountV1) Verify(msg, sig []byte) (bool, error)
- type EncryptionKey
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AccountV1 ¶
type AccountV1 struct { // Address is the address of the account. Address string `json:"address"` // CoinType is the coin type of the account. CoinType crypto.CoinType `json:"coin_type"` // Name is the name of the account. Name string `json:"name"` // Data is the marshalled keyshare Data []byte `json:"data"` PublicKeyshare *v1types.Keyshare `json:"public_keshare"` }
func NewAccountV1 ¶
NewAccountV1 creates a new account with the given name and coin type.
func (*AccountV1) GetAccountData ¶
func (a *AccountV1) GetAccountData() *crypto.AccountData
GetAccountData returns the proto representation of the account
func (*AccountV1) PublicKey ¶
The `PublicKey()` function is a method of the `KeyshareSet` type. It returns the public key corresponding to Alice's keyshare in the keyshare set. It does this by calling the `PubKey()` method of the `Keyshare` object corresponding to Alice's keyshare. If the keyshare set is not valid or if there is an error in retrieving the public key, it returns an error.
type EncryptionKey ¶
Click to show internal directories.
Click to hide internal directories.