Documentation ¶
Index ¶
- Constants
- func ConcatKeys(dst map[string]ed25519.PrivateKey, src map[string]ed25519.PrivateKey) map[string]ed25519.PrivateKey
- func GenerateDID() string
- func GenerateFragment(did string) string
- func GenerateTestKeys() map[string]KeyPair
- type KeyPair
- type SignerKey
- type TestSetup
- func (s *TestSetup) CreateDid(pubKey ed25519.PublicKey, did string) *types.MsgCreateDidPayload
- func (s TestSetup) CreateTestDIDs(keys map[string]KeyPair) error
- func (s *TestSetup) CreateToUpdateDid(did *types.MsgCreateDidPayload) *types.MsgUpdateDidPayload
- func (s *TestSetup) InitDid(did string) (map[string]ed25519.PrivateKey, *types.MsgCreateDidPayload, error)
- func (s *TestSetup) SendCreateDid(msg *types.MsgCreateDidPayload, keys map[string]ed25519.PrivateKey) (*types.Did, error)
- func (s *TestSetup) SendUpdateDid(msg *types.MsgUpdateDidPayload, keys []SignerKey) (*types.Did, error)
- func (s *TestSetup) WrapCreateRequest(payload *types.MsgCreateDidPayload, keys map[string]ed25519.PrivateKey) *types.MsgCreateDid
- func (s *TestSetup) WrapUpdateRequest(payload *types.MsgUpdateDidPayload, keys []SignerKey) *types.MsgUpdateDid
Constants ¶
View Source
const ( AliceDID = "did:cheqd:test:aaaaaaaaaaaaaaaa" // 16 chars base58 BobDID = "did:cheqd:test:bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb" // 32 chars base58 CharlieDID = "did:cheqd:test:babbba14-f294-458a-9b9c-474d188680fd" // UUID ImposterDID = "did:cheqd:test:nananananananana" NotFounDID = "did:cheqd:test:nfdnfdnfdnfdnfdd" AliceKey1 = AliceDID + "#key-1" AliceKey2 = AliceDID + "#key-2" BobKey1 = BobDID + "#key-1" BobKey2 = BobDID + "#key-2" BobKey3 = BobDID + "#key-3" BobKey4 = BobDID + "#key-4" ImposterKey1 = ImposterDID + "#key-1" ImposterKey2 = ImposterDID + "#key-2" NotFoundKey1 = NotFounDID + "#key-1" CharlieKey1 = CharlieDID + "#key-1" CharlieKey2 = CharlieDID + "#key-2" CharlieKey3 = CharlieDID + "#key-3" CharlieKey4 = CharlieDID + "#key-4" )
View Source
const Ed25519VerificationKey2020 = "Ed25519VerificationKey2020"
Variables ¶
This section is empty.
Functions ¶
func ConcatKeys ¶
func ConcatKeys(dst map[string]ed25519.PrivateKey, src map[string]ed25519.PrivateKey) map[string]ed25519.PrivateKey
func GenerateDID ¶
func GenerateDID() string
func GenerateFragment ¶
func GenerateTestKeys ¶
Types ¶
type KeyPair ¶
type KeyPair struct { PrivateKey ed25519.PrivateKey PublicKey ed25519.PublicKey }
func GenerateKeyPair ¶
func GenerateKeyPair() KeyPair
type SignerKey ¶
type SignerKey struct {
// contains filtered or unexported fields
}
func MapToListOfSignerKeys ¶
func MapToListOfSignerKeys(mp map[string]ed25519.PrivateKey) []SignerKey
type TestSetup ¶
func (*TestSetup) CreateToUpdateDid ¶
func (s *TestSetup) CreateToUpdateDid(did *types.MsgCreateDidPayload) *types.MsgUpdateDidPayload
func (*TestSetup) InitDid ¶
func (s *TestSetup) InitDid(did string) (map[string]ed25519.PrivateKey, *types.MsgCreateDidPayload, error)
func (*TestSetup) SendCreateDid ¶
func (s *TestSetup) SendCreateDid(msg *types.MsgCreateDidPayload, keys map[string]ed25519.PrivateKey) (*types.Did, error)
func (*TestSetup) SendUpdateDid ¶
func (*TestSetup) WrapCreateRequest ¶
func (s *TestSetup) WrapCreateRequest(payload *types.MsgCreateDidPayload, keys map[string]ed25519.PrivateKey) *types.MsgCreateDid
func (*TestSetup) WrapUpdateRequest ¶
func (s *TestSetup) WrapUpdateRequest(payload *types.MsgUpdateDidPayload, keys []SignerKey) *types.MsgUpdateDid
Click to show internal directories.
Click to hide internal directories.