Documentation ¶
Index ¶
- Constants
- Variables
- func CheckTxRouter(method string, param string, nonce string, signature string, nodeID string, ...) types.ResponseCheckTx
- func DeliverTxRouter(method string, param string, nonce string, signature string, nodeID string, ...) types.ResponseDeliverTx
- func QueryRouter(method string, param string, app *DIDApplication, height int64) types.ResponseQuery
- func ReturnCheckTx(code uint32, log string) types.ResponseCheckTx
- func ReturnDeliverTxLog(code uint32, log string, extraData string) types.ResponseDeliverTx
- func ReturnQuery(value []byte, log string, height int64, app *DIDApplication) types.ResponseQuery
- type ASNode
- type ASNodeResult
- type Accessor
- type AccessorMethod
- type AddNodeTokenParam
- type AddServiceParam
- type ApproveService
- type CheckExistingAccessorGroupIDParam
- type CheckExistingAccessorIDParam
- type CheckExistingIdentityParam
- type CheckExistingIdentityResult
- type CheckExistingResult
- type ClearRegisterMsqDestinationTimeoutParam
- type CloseRequestParam
- type CreateIdentityParam
- type CreateIdpResponseParam
- type DIDApplication
- func (app *DIDApplication) BeginBlock(req types.RequestBeginBlock) types.ResponseBeginBlock
- func (app *DIDApplication) CheckTx(tx []byte) (res types.ResponseCheckTx)
- func (app *DIDApplication) Commit() types.ResponseCommit
- func (app *DIDApplication) DeleteStateDB(key []byte)
- func (app *DIDApplication) DeliverTx(tx []byte) (res types.ResponseDeliverTx)
- func (app *DIDApplication) EndBlock(req types.RequestEndBlock) types.ResponseEndBlock
- func (app *DIDApplication) Info(req types.RequestInfo) (resInfo types.ResponseInfo)
- func (app *DIDApplication) InitChain(req types.RequestInitChain) types.ResponseInitChain
- func (app *DIDApplication) Query(reqQuery types.RequestQuery) (res types.ResponseQuery)
- func (app *DIDApplication) SetStateDB(key, value []byte)
- func (app *DIDApplication) Validators() (validators []types.Validator)
- type DataRequest
- type DeclareIdentityProofParam
- type DisableAccessorMethodParam
- type DisableMsqDestinationParam
- type DisableNamespaceParam
- type DisableNodeParam
- type DisableServiceDestinationByNDIDParam
- type DisableServiceDestinationParam
- type DisableServiceParam
- type GetAccessorGroupIDParam
- type GetAccessorGroupIDResult
- type GetAccessorKeyParam
- type GetAccessorKeyResult
- type GetAccessorMethodParam
- type GetAccessorMethodResult
- type GetAsNodesByServiceIdParam
- type GetAsNodesByServiceIdResult
- type GetAsNodesByServiceIdWithNameResult
- type GetDataSignatureParam
- type GetDataSignatureResult
- type GetIdentityInfoParam
- type GetIdentityInfoResult
- type GetIdentityProofParam
- type GetIdentityProofResult
- type GetIdpNodesParam
- type GetIdpNodesResult
- type GetMsqAddressParam
- type GetNodeInfoIdPResult
- type GetNodeInfoParam
- type GetNodeInfoResult
- type GetNodeMasterPublicKeyParam
- type GetNodeMasterPublicKeyResult
- type GetNodePublicKeyParam
- type GetNodePublicKeyResult
- type GetNodeTokenParam
- type GetNodeTokenResult
- type GetPriceFuncParam
- type GetPriceFuncResult
- type GetRequestDetailResult
- type GetRequestParam
- type GetRequestResult
- type GetServiceDetailParam
- type GetServicesByAsIDParam
- type GetServicesByAsIDResult
- type GetUsedTokenReportParam
- type InitNDIDParam
- type MaxIalAal
- type MsqAddress
- type MsqDestination
- type MsqDestinationNode
- type Namespace
- type Node
- type NodeDetail
- type NodePublicKey
- type ReduceNodeTokenParam
- type RegisterMsqAddressParam
- type RegisterMsqDestinationParam
- type RegisterNode
- type RegisterServiceDestinationByNDIDParam
- type RegisterServiceDestinationParam
- type Report
- type Request
- type RequestIDParam
- type Response
- type ResponseValid
- type Service
- type ServiceDetail
- type SetDataReceivedParam
- type SetNodeTokenParam
- type SetPriceFuncParam
- type SetValidatorParam
- type SignDataParam
- type State
- type TimeOutBlockRegisterMsqDestination
- type TimeOutRequestParam
- type TransferNDIDParam
- type UpdateIdentityParam
- type UpdateNodeByNDIDParam
- type UpdateNodeParam
- type UpdateServiceDestinationParam
- type UpdateServiceParam
- type User
Constants ¶
View Source
const (
ValidatorSetChangePrefix string = "val:"
)
Variables ¶
View Source
var IsCheckOwnerRequestMethod = map[string]bool{ "CloseRequest": true, "TimeOutRequest": true, "SetDataReceived": true, }
View Source
var IsMasterKeyMethod = map[string]bool{ "UpdateNode": true, }
View Source
var IsMethod = map[string]bool{ "InitNDID": true, "RegisterNode": true, "AddNodeToken": true, "ReduceNodeToken": true, "SetNodeToken": true, "SetPriceFunc": true, "AddNamespace": true, "SetValidator": true, "AddService": true, "UpdateNodeByNDID": true, "UpdateService": true, "RegisterServiceDestinationByNDID": true, "DisableNode": true, "DisableNamespace": true, "DisableService": true, "DisableServiceDestinationByNDID": true, "EnableNode": true, "EnableServiceDestinationByNDID": true, "EnableNamespace": true, "EnableService": true, "RegisterMsqDestination": true, "AddAccessorMethod": true, "CreateIdpResponse": true, "CreateIdentity": true, "UpdateIdentity": true, "DeclareIdentityProof": true, "SignData": true, "RegisterServiceDestination": true, "UpdateServiceDestination": true, "CreateRequest": true, "RegisterMsqAddress": true, "UpdateNode": true, "CloseRequest": true, "TimeOutRequest": true, "SetDataReceived": true, "DisableServiceDestination": true, "EnableServiceDestination": true, "ClearRegisterMsqDestinationTimeout": true, "SetTimeOutBlockRegisterMsqDestination": true, }
Functions ¶
func CheckTxRouter ¶
func CheckTxRouter(method string, param string, nonce string, signature string, nodeID string, app *DIDApplication) types.ResponseCheckTx
CheckTxRouter is Pointer to function
func DeliverTxRouter ¶
func DeliverTxRouter(method string, param string, nonce string, signature string, nodeID string, app *DIDApplication) types.ResponseDeliverTx
DeliverTxRouter is Pointer to function
func QueryRouter ¶
func QueryRouter(method string, param string, app *DIDApplication, height int64) types.ResponseQuery
QueryRouter is Pointer to function
func ReturnCheckTx ¶
func ReturnCheckTx(code uint32, log string) types.ResponseCheckTx
ReturnCheckTx return types.ResponseDeliverTx
func ReturnDeliverTxLog ¶
func ReturnDeliverTxLog(code uint32, log string, extraData string) types.ResponseDeliverTx
ReturnDeliverTxLog return types.ResponseDeliverTx
func ReturnQuery ¶
func ReturnQuery(value []byte, log string, height int64, app *DIDApplication) types.ResponseQuery
ReturnQuery return types.ResponseQuery
Types ¶
type ASNodeResult ¶
type AccessorMethod ¶
type AddNodeTokenParam ¶
type AddServiceParam ¶
type ApproveService ¶
type ApproveService struct {
Active bool `json:"active"`
}
type CheckExistingAccessorGroupIDParam ¶
type CheckExistingAccessorGroupIDParam struct {
AccessorGroupID string `json:"accessor_group_id"`
}
type CheckExistingAccessorIDParam ¶
type CheckExistingAccessorIDParam struct {
AccessorID string `json:"accessor_id"`
}
type CheckExistingIdentityParam ¶
type CheckExistingIdentityParam struct {
HashID string `json:"hash_id"`
}
type CheckExistingIdentityResult ¶
type CheckExistingIdentityResult struct {
Exist bool `json:"exist"`
}
type CheckExistingResult ¶
type CheckExistingResult struct {
Exist bool `json:"exist"`
}
type ClearRegisterMsqDestinationTimeoutParam ¶
type ClearRegisterMsqDestinationTimeoutParam struct {
HashID string `json:"hash_id"`
}
type CloseRequestParam ¶
type CloseRequestParam struct { RequestID string `json:"request_id"` ResponseValidList []ResponseValid `json:"response_valid_list"` }
type CreateIdentityParam ¶
type CreateIdpResponseParam ¶
type DIDApplication ¶
type DIDApplication struct { types.BaseApplication ValUpdates []types.Validator Version string CurrentBlock int64 // contains filtered or unexported fields }
func NewDIDApplication ¶
func NewDIDApplication(logger *logrus.Entry, tree *iavl.VersionedTree) *DIDApplication
func (*DIDApplication) BeginBlock ¶
func (app *DIDApplication) BeginBlock(req types.RequestBeginBlock) types.ResponseBeginBlock
Track the block hash and header information
func (*DIDApplication) CheckTx ¶
func (app *DIDApplication) CheckTx(tx []byte) (res types.ResponseCheckTx)
func (*DIDApplication) Commit ¶
func (app *DIDApplication) Commit() types.ResponseCommit
func (*DIDApplication) DeleteStateDB ¶
func (app *DIDApplication) DeleteStateDB(key []byte)
func (*DIDApplication) DeliverTx ¶
func (app *DIDApplication) DeliverTx(tx []byte) (res types.ResponseDeliverTx)
func (*DIDApplication) EndBlock ¶
func (app *DIDApplication) EndBlock(req types.RequestEndBlock) types.ResponseEndBlock
Update the validator set
func (*DIDApplication) Info ¶
func (app *DIDApplication) Info(req types.RequestInfo) (resInfo types.ResponseInfo)
func (*DIDApplication) InitChain ¶
func (app *DIDApplication) InitChain(req types.RequestInitChain) types.ResponseInitChain
Save the validators in the merkle tree
func (*DIDApplication) Query ¶
func (app *DIDApplication) Query(reqQuery types.RequestQuery) (res types.ResponseQuery)
func (*DIDApplication) SetStateDB ¶
func (app *DIDApplication) SetStateDB(key, value []byte)
func (*DIDApplication) Validators ¶
func (app *DIDApplication) Validators() (validators []types.Validator)
type DataRequest ¶
type DisableAccessorMethodParam ¶
type DisableAccessorMethodParam struct {
AccessorID string `json:"accessor_id"`
}
type DisableMsqDestinationParam ¶
type DisableMsqDestinationParam struct {
HashID string `json:"hash_id"`
}
type DisableNamespaceParam ¶
type DisableNamespaceParam struct {
Namespace string `json:"namespace"`
}
type DisableNodeParam ¶
type DisableNodeParam struct {
NodeID string `json:"node_id"`
}
type DisableServiceDestinationParam ¶
type DisableServiceDestinationParam struct {
ServiceID string `json:"service_id"`
}
type DisableServiceParam ¶
type DisableServiceParam struct {
ServiceID string `json:"service_id"`
}
type GetAccessorGroupIDParam ¶
type GetAccessorGroupIDParam struct {
AccessorID string `json:"accessor_id"`
}
type GetAccessorGroupIDResult ¶
type GetAccessorGroupIDResult struct {
AccessorGroupID string `json:"accessor_group_id"`
}
type GetAccessorKeyParam ¶
type GetAccessorKeyParam struct {
AccessorID string `json:"accessor_id"`
}
type GetAccessorKeyResult ¶
type GetAccessorMethodParam ¶
type GetAccessorMethodParam struct {
AccessorID string `json:"accessor_id"`
}
type GetAccessorMethodResult ¶
type GetAsNodesByServiceIdParam ¶
type GetAsNodesByServiceIdParam struct {
ServiceID string `json:"service_id"`
}
type GetAsNodesByServiceIdResult ¶
type GetAsNodesByServiceIdResult struct {
Node []ASNode `json:"node"`
}
type GetAsNodesByServiceIdWithNameResult ¶
type GetAsNodesByServiceIdWithNameResult struct {
Node []ASNodeResult `json:"node"`
}
type GetDataSignatureParam ¶
type GetDataSignatureResult ¶
type GetDataSignatureResult struct {
Signature string `json:"signature"`
}
type GetIdentityInfoParam ¶
type GetIdentityInfoResult ¶
type GetIdentityInfoResult struct {
Ial float64 `json:"ial"`
}
type GetIdentityProofParam ¶
type GetIdentityProofResult ¶
type GetIdentityProofResult struct {
IdentityProof string `json:"identity_proof"`
}
type GetIdpNodesParam ¶
type GetIdpNodesResult ¶
type GetIdpNodesResult struct {
Node []MsqDestinationNode `json:"node"`
}
type GetMsqAddressParam ¶
type GetMsqAddressParam struct {
NodeID string `json:"node_id"`
}
type GetNodeInfoIdPResult ¶
type GetNodeInfoParam ¶
type GetNodeInfoParam struct {
NodeID string `json:"node_id"`
}
type GetNodeInfoResult ¶
type GetNodeMasterPublicKeyParam ¶
type GetNodeMasterPublicKeyParam struct {
NodeID string `json:"node_id"`
}
type GetNodeMasterPublicKeyResult ¶
type GetNodeMasterPublicKeyResult struct {
MasterPublicKey string `json:"master_public_key"`
}
type GetNodePublicKeyParam ¶
type GetNodePublicKeyParam struct {
NodeID string `json:"node_id"`
}
type GetNodePublicKeyResult ¶
type GetNodePublicKeyResult struct {
PublicKey string `json:"public_key"`
}
type GetNodeTokenParam ¶
type GetNodeTokenParam struct {
NodeID string `json:"node_id"`
}
type GetNodeTokenResult ¶
type GetNodeTokenResult struct {
Amount float64 `json:"amount"`
}
type GetPriceFuncParam ¶
type GetPriceFuncParam struct {
Func string `json:"func"`
}
type GetPriceFuncResult ¶
type GetPriceFuncResult struct {
Price float64 `json:"price"`
}
type GetRequestDetailResult ¶
type GetRequestDetailResult struct { RequestID string `json:"request_id"` MinIdp int `json:"min_idp"` MinAal float64 `json:"min_aal"` MinIal float64 `json:"min_ial"` Timeout int `json:"request_timeout"` DataRequestList []DataRequest `json:"data_request_list"` MessageHash string `json:"request_message_hash"` Responses []Response `json:"response_list"` IsClosed bool `json:"closed"` IsTimedOut bool `json:"timed_out"` Special bool `json:"special"` Mode int `json:"mode"` }
type GetRequestParam ¶
type GetRequestParam struct {
RequestID string `json:"request_id"`
}
type GetRequestResult ¶
type GetServiceDetailParam ¶
type GetServiceDetailParam struct {
ServiceID string `json:"service_id"`
}
type GetServicesByAsIDParam ¶
type GetServicesByAsIDParam struct {
AsID string `json:"as_id"`
}
type GetServicesByAsIDResult ¶
type GetServicesByAsIDResult struct {
Services []Service `json:"services"`
}
type GetUsedTokenReportParam ¶
type GetUsedTokenReportParam struct {
NodeID string `json:"node_id"`
}
type InitNDIDParam ¶
type MsqAddress ¶
type MsqDestination ¶
type MsqDestination struct {
Nodes []Node `json:"nodes"`
}
type MsqDestinationNode ¶
type NodeDetail ¶
type NodePublicKey ¶
type ReduceNodeTokenParam ¶
type RegisterMsqAddressParam ¶
type RegisterMsqDestinationParam ¶
type RegisterMsqDestinationParam struct {
Users []User `json:"users"`
}
type RegisterNode ¶
type Request ¶
type Request struct { RequestID string `json:"request_id"` MinIdp int `json:"min_idp"` MinAal float64 `json:"min_aal"` MinIal float64 `json:"min_ial"` Timeout int `json:"request_timeout"` DataRequestList []DataRequest `json:"data_request_list"` MessageHash string `json:"request_message_hash"` Responses []Response `json:"response_list"` IsClosed bool `json:"closed"` IsTimedOut bool `json:"timed_out"` CanAddAccessor bool `json:"can_add_accessor"` Owner string `json:"owner"` Mode int `json:"mode"` }
type RequestIDParam ¶
type RequestIDParam struct {
RequestID string `json:"request_id"`
}
type Response ¶
type Response struct { Ial float64 `json:"ial"` Aal float64 `json:"aal"` Status string `json:"status"` Signature string `json:"signature"` IdentityProof string `json:"identity_proof"` PrivateProofHash string `json:"private_proof_hash"` IdpID string `json:"idp_id"` ValidProof *bool `json:"valid_proof"` ValidIal *bool `json:"valid_ial"` ValidSignature *bool `json:"valid_signature"` }
type ResponseValid ¶
type ServiceDetail ¶
type SetDataReceivedParam ¶
type SetNodeTokenParam ¶
type SetPriceFuncParam ¶
type SetValidatorParam ¶
type SignDataParam ¶
type TimeOutBlockRegisterMsqDestination ¶
type TimeOutBlockRegisterMsqDestination struct {
TimeOutBlock int64 `json:"time_out_block"`
}
type TimeOutRequestParam ¶
type TimeOutRequestParam struct { RequestID string `json:"request_id"` ResponseValidList []ResponseValid `json:"response_valid_list"` }
type TransferNDIDParam ¶
type TransferNDIDParam struct {
PublicKey string `json:"public_key"`
}
type UpdateIdentityParam ¶
type UpdateNodeByNDIDParam ¶
type UpdateNodeParam ¶
type UpdateServiceParam ¶
Click to show internal directories.
Click to hide internal directories.