tests

package
v0.1.3 Latest Latest
Warning

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

Go to latest
Published: Nov 10, 2022 License: Apache-2.0 Imports: 20 Imported by: 0

README

Running Tests

To run all SSI related tests:

go test -v -count=1 "./x/ssi/tests" 

If you want to run a single unit test of a particular test file (say TestVerificationMethodRotation()):

go test -v -count=1 -run "^TestVerificationMethodRotation$" "./x/ssi/tests"

To run multiple tests:

go test -v -count=1 -run ^(TestDidResolve|TestDidParam)$ "./x/ssi/tests"

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Creator string = "hid1kxqk5ejca8nfpw8pg47484rppv359xh7qcasy4"
View Source
var DidMethod string = "hid"

Functions

func CreateDidTx

func CreateDidTx(msgServer types.MsgServer, ctx context.Context, keyPair ed25519KeyPair) (string, error)

func GeneratePublicPrivateKeyPair

func GeneratePublicPrivateKeyPair() ed25519KeyPair

func QueryDid

func QueryDid(k *keeper.Keeper, ctx sdk.Context, Id string) *types.DidDocumentState

func TestKeeper

func TestKeeper(t testing.TB) (*keeper.Keeper, sdk.Context)

func UpdateDidTx

func UpdateDidTx(msgServer types.MsgServer, ctx context.Context, rpcElements DidRpcElements, versionId string) error

Types

type CredRpcElements

type CredRpcElements struct {
	Status  *types.CredentialStatus
	Proof   *types.CredentialProof
	Creator string
}

func GenerateCredStatusRPCElements

func GenerateCredStatusRPCElements(keyPair ed25519KeyPair, Id string, verficationMethod *types.VerificationMethod) CredRpcElements

func UpdateCredStatus

func UpdateCredStatus(newStatus string, credRpcElem CredRpcElements, keyPair ed25519KeyPair) CredRpcElements

type DidRpcElements

type DidRpcElements struct {
	DidDocument *types.Did
	Signatures  []*types.SignInfo
	Creator     string
}

func GenerateDidDocumentRPCElements

func GenerateDidDocumentRPCElements(keyPair ed25519KeyPair) DidRpcElements

func GetModifiedDidDocumentSignature

func GetModifiedDidDocumentSignature(modifiedDidDocument *types.Did, keyPair ed25519KeyPair, verificationMethodId string) DidRpcElements

type SchemaRpcElements

type SchemaRpcElements struct {
	SchemaDocument *types.SchemaDocument
	SchemaProof    *types.SchemaProof
	Creator        string
}

func GenerateSchemaDocumentRPCElements

func GenerateSchemaDocumentRPCElements(keyPair ed25519KeyPair, Id string, verficationMethodId string) SchemaRpcElements

Jump to

Keyboard shortcuts

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