setup

package
v1.0.0-develop.19 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 8, 2022 License: Apache-2.0 Imports: 22 Imported by: 0

Documentation

Index

Constants

View Source
const DID_NAMESPACE = "testnet"

Variables

This section is empty.

Functions

func BuildEd25519VerificationKey2020VerificationMaterial

func BuildEd25519VerificationKey2020VerificationMaterial(publicKey ed25519.PublicKey) string

func BuildJsonWebKey2020VerificationMaterial

func BuildJsonWebKey2020VerificationMaterial(publicKey ed25519.PublicKey) string

func GenerateDID

func GenerateDID(idtype IDType) string

Types

type CreatedDidDocInfo

type CreatedDidDocInfo struct {
	DidDocInfo
	VersionId string
}

type DidDocInfo

type DidDocInfo struct {
	Msg          *types.MsgCreateDidDocPayload
	Did          string
	CollectionId string
	KeyPair      KeyPair
	KeyId        string
	SignInput    SignInput
}

type IDType

type IDType int
const (
	Base58_16bytes   IDType = iota
	Base58_16symbols IDType = iota
	UUID             IDType = iota
)

type KeyPair

type KeyPair struct {
	Private ed25519.PrivateKey
	Public  ed25519.PublicKey
}

func GenerateKeyPair

func GenerateKeyPair() KeyPair

type SignInput

type SignInput struct {
	VerificationMethodId string
	Key                  ed25519.PrivateKey
}

type TestSetup

type TestSetup struct {
	Cdc codec.Codec

	SdkCtx sdk.Context
	StdCtx context.Context

	Keeper      keeper.Keeper
	MsgServer   types.MsgServer
	QueryServer types.QueryServer
}

func Setup

func Setup() TestSetup

func (*TestSetup) BuildDidDocWithCustomDID

func (s *TestSetup) BuildDidDocWithCustomDID(did string) DidDocInfo

func (*TestSetup) BuildDidDocWithCustomId

func (s *TestSetup) BuildDidDocWithCustomId(uuid string) DidDocInfo

func (*TestSetup) BuildSimpleDidDoc

func (s *TestSetup) BuildSimpleDidDoc() DidDocInfo

func (*TestSetup) CreateCustomDidDoc

func (s *TestSetup) CreateCustomDidDoc(info DidDocInfo) CreatedDidDocInfo

func (*TestSetup) CreateDid

func (s *TestSetup) CreateDid(payload *types.MsgCreateDidDocPayload, signInputs []SignInput) (*types.MsgCreateDidDocResponse, error)

func (*TestSetup) CreateDidDocWithExternalControllers

func (s *TestSetup) CreateDidDocWithExternalControllers(controllers []string, signInputs []SignInput) CreatedDidDocInfo

func (*TestSetup) CreateSimpleDid

func (s *TestSetup) CreateSimpleDid() CreatedDidDocInfo

func (*TestSetup) DeactivateDidDoc

func (s *TestSetup) DeactivateDidDoc(payload *types.MsgDeactivateDidDocPayload, signInputs []SignInput) (*types.MsgDeactivateDidDocResponse, error)

func (*TestSetup) QueryAllDidDocVersionsMetadata

func (s *TestSetup) QueryAllDidDocVersionsMetadata(did string) (*types.QueryGetAllDidDocVersionsMetadataResponse, error)

func (*TestSetup) QueryDidDoc

func (s *TestSetup) QueryDidDoc(did string) (*types.QueryGetDidDocResponse, error)

func (*TestSetup) QueryDidDocVersion

func (s *TestSetup) QueryDidDocVersion(did, version string) (*types.QueryGetDidDocVersionResponse, error)

func (*TestSetup) UpdateDidDoc

func (s *TestSetup) UpdateDidDoc(payload *types.MsgUpdateDidDocPayload, signInputs []SignInput) (*types.MsgUpdateDidDocResponse, error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL