Documentation ¶
Index ¶
- Constants
- Variables
- func DecodePrefixed(encoded_key string) (mb.Encoding, []byte, error)
- type CryptoManager
- type KeyPairs
- func (k *KeyPairs) GetDid() string
- func (k *KeyPairs) GetPrivateKey(relation signer.VerificationRelation) []byte
- func (k *KeyPairs) GetPublicKey(relation signer.VerificationRelation) ([]byte, error)
- func (k *KeyPairs) GetVerificationMethod(rel signer.VerificationRelation) string
- func (k *KeyPairs) Sign(relation signer.VerificationRelation, message []byte) (*signer.SigningResponse, error)
Constants ¶
View Source
const ( DidPrefix = "did:knox:" ProofType = "Ed25519VerificationKey2020" KeyAgreementType = "X25519KeyAgreementKey2019" )
Variables ¶
View Source
var MultiCodecPrefix = []byte{0xed, 0x01}
Functions ¶
Types ¶
type CryptoManager ¶
type CryptoManager interface { GenerateKeyPair(mnemonic string) (*KeyPairs, error) GenerateMnemonic() (string, error) }
func NewCryptoManager ¶
func NewCryptoManager() CryptoManager
type KeyPairs ¶
type KeyPairs struct { Mnemonic string MasterPublicKey string MasterPrivateKey []byte AuthenticationPublicKey string AuthenticationPrivateKey []byte CapabilityInvocationPublicKey string CapabilityInvocationPrivateKey []byte CapabilityDelegationPublicKey string CapabilityDelegationPrivateKey []byte AssertionMethodPublicKey string AssertionMethodPrivateKey []byte KeyAgreementPublicKey string KeyAgreementPrivateKey []byte }
func (*KeyPairs) GetPrivateKey ¶
func (k *KeyPairs) GetPrivateKey(relation signer.VerificationRelation) []byte
func (*KeyPairs) GetPublicKey ¶
func (k *KeyPairs) GetPublicKey(relation signer.VerificationRelation) ([]byte, error)
func (*KeyPairs) GetVerificationMethod ¶ added in v0.1.9
func (k *KeyPairs) GetVerificationMethod(rel signer.VerificationRelation) string
func (*KeyPairs) Sign ¶
func (k *KeyPairs) Sign(relation signer.VerificationRelation, message []byte) (*signer.SigningResponse, error)
Click to show internal directories.
Click to hide internal directories.