Documentation ¶
Index ¶
- Constants
- func NewEthereumAccount(key types.DIDSecretKey) (types.WalletAccount, error)
- func ResolveAccount(didString string, key types.DIDSecretKey) (types.WalletAccount, error)
- type EthereumAccount
- func (a *EthereumAccount) Address() string
- func (a *EthereumAccount) Info() *crypto.AccountData
- func (a *EthereumAccount) Method() types.DIDMethod
- func (a *EthereumAccount) PublicKey() (*crypto.Secp256k1PubKey, error)
- func (a *EthereumAccount) Sign(msg []byte) ([]byte, error)
- func (a *EthereumAccount) Type() string
- func (a *EthereumAccount) Verify(msg []byte, sig []byte) (bool, error)
Constants ¶
View Source
const Method = types.DIDMethod("ethr")
Variables ¶
This section is empty.
Functions ¶
func NewEthereumAccount ¶
func NewEthereumAccount(key types.DIDSecretKey) (types.WalletAccount, error)
NewEthereumAccount creates a new Ethereum Wallet Actor DID
func ResolveAccount ¶
func ResolveAccount(didString string, key types.DIDSecretKey) (types.WalletAccount, error)
ResolveAccount resolves a Sonr Wallet Actor DID
Types ¶
type EthereumAccount ¶
type EthereumAccount struct { ID types.DIDIdentifier Resources []types.DIDResource // contains filtered or unexported fields }
func (*EthereumAccount) Address ¶
func (a *EthereumAccount) Address() string
Address returns the address of the account
func (*EthereumAccount) Info ¶
func (a *EthereumAccount) Info() *crypto.AccountData
Info returns the account data
func (*EthereumAccount) Method ¶
func (a *EthereumAccount) Method() types.DIDMethod
Method returns the DID method
func (*EthereumAccount) PublicKey ¶
func (a *EthereumAccount) PublicKey() (*crypto.Secp256k1PubKey, error)
PublicKey returns the public key of the account
func (*EthereumAccount) Sign ¶
func (a *EthereumAccount) Sign(msg []byte) ([]byte, error)
Sign signs a message with the account
func (*EthereumAccount) Type ¶
func (a *EthereumAccount) Type() string
Type returns the type of the account
Click to show internal directories.
Click to hide internal directories.