did

package
v0.0.0-...-e11dbd8 Latest Latest
Warning

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

Go to latest
Published: Oct 23, 2022 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DATA_FORMAT_JSON   = "application/json"
	DATA_FORMAT_VC_JWT = "application/vc+jwt"
	DATA_FORMAT_VC_LDP = "application/vc+ldp"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type DIDDocument

type DIDDocument struct {
	ID                   string               `json:"id" bson:"_id"`
	AlsoKnownAs          []string             `json:"alsoKnownAs"`
	Controller           []string             `json:"controller"`
	VerificationMethods  []VerificationMethod `json:"verificationMethod"`
	Authentication       []VerificationMethod `json:"authentication"`
	AssertionMethod      []VerificationMethod `json:"assertionMethod"`
	KeyAgreement         []VerificationMethod `json:"keyAgreement"`
	CapabilityInvocation []VerificationMethod `json:"capabilityInvocation"`
	CapabilityDelegation []VerificationMethod `json:"capabilityDelegation"`
	Service              []Service            `json:"service"`
}

type Descriptor

type Descriptor struct {
	Nonce      string `json:"nonce"`
	Method     string `json:"method"`
	DataCID    string `json:"dataCid"`
	DataFormat string `json:"dataFormat"`
}

type JWS

type JWS struct {
	Payload    string         `json:"payload"`
	Signatures []JWSSignature `json:"signatures"`
}

type JWSSignature

type JWSSignature struct {
	Protected string `json:"protected"`
	Signature string `json:"signature"`
}

type Message

type Message struct {
	Data          string      `json:"data,omitempty"`
	Descriptor    Descriptor  `json:"descriptor,omitempty"`
	Attestation   interface{} `json:"attestation,omitempty"`
	Authorization interface{} `json:"authorization,omitempty"`
}

func (Message) GetDecodedData

func (msg Message) GetDecodedData() []byte

func (Message) SetEncodedData

func (msg Message) SetEncodedData(data []byte)

type MessageResultEntry

type MessageResultEntry struct {
	Result []byte `json:"result"`
}

type MessageResultObject

type MessageResultObject struct {
	Status  ResponseStatus       `json:"status"`
	Entries []MessageResultEntry `json:"entries"`
}

type RequestObject

type RequestObject struct {
	Target   string    `json:"target"`
	Messages []Message `json:"messages"`
}

type ResponseObject

type ResponseObject struct {
	Status  ResponseStatus        `json:"status"`
	Replies []MessageResultObject `json:"replies"`
}

type ResponseStatus

type ResponseStatus struct {
	Code   int    `json:"code"`
	Detail string `json:"detail"`
}

type Service

type Service struct {
	ID        string            `json:"id"`
	Endpoints []ServiceEndpoint `json:"endpoints"`
}

type ServiceEndpoint

type ServiceEndpoint struct {
	ID      string `json:"id"`
	Purpose string `json:"purpose"`
	URI     string `json:"uri"`
}

type VerificationMethod

type VerificationMethod struct {
	ID         string            `json:"id"`
	Type       string            `json:"type"`
	Controller string            `json:"controller"`
	Methods    map[string]string `json:"methods"`
}

Jump to

Keyboard shortcuts

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