didapi

package
v0.2.3 Latest Latest
Warning

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

Go to latest
Published: Sep 13, 2024 License: GPL-3.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Valid = iota
	Expired
	Deactivated
	NonExist
)
View Source
const (
	CredentialValid = iota
	CredentialReserve
	CredentialRevoked
	CredentialNonExist
)

Variables

This section is empty.

Functions

This section is empty.

Types

type DidDocState

type DidDocState uint8

func (DidDocState) String

func (c DidDocState) String() string

type ResolveOperation

type ResolveOperation struct {
	Header  did.Header `json:"header"`
	Payload did.DIDDoc `json:"payload"`
	Proof   did.Proof  `json:"proof"`
}

type ResolvePayloadDIDInfo

type ResolvePayloadDIDInfo struct {
	DID        string                    `json:"did"`
	Status     int                       `json:"status"`
	RpcTXDatas []ResolveTranasactionData `json:"transaction,omitempty"`
}

resolve payload of DID transaction

type ResolveTranasactionData

type ResolveTranasactionData struct {
	TXID      string           `json:"txid"`
	Timestamp string           `json:"timestamp"`
	Operation ResolveOperation `json:"operation"`
}

type RpcOperation

type RpcOperation struct {
	Header  did.Header `json:"header"`
	Payload string     `json:"payload"`
	Proof   did.Proof  `json:"proof"`
}

type RpcPayloadDIDInfo

type RpcPayloadDIDInfo struct {
	DID        string                `json:"did"`
	Status     int                   `json:"status"`
	RpcTXDatas []RpcTranasactionData `json:"transaction,omitempty"`
}

payload of DID transaction

type RpcTranasactionData

type RpcTranasactionData struct {
	TXID      string       `json:"txid"`
	Timestamp string       `json:"timestamp"`
	Operation RpcOperation `json:"operation"`
}

func (*RpcTranasactionData) FromTranasactionData

func (rpcTxData *RpcTranasactionData) FromTranasactionData(txData did.DIDTransactionData) bool

func (*RpcTranasactionData) ToResolveTxData

func (rpcTxData *RpcTranasactionData) ToResolveTxData() ResolveTranasactionData

Jump to

Keyboard shortcuts

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