Documentation
¶
Overview ¶
Package didv1 provides the version 1.0 of the protocol buffers definitions for the project.
Index ¶
- Constants
- Variables
- func RegisterAgentAPIHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
- func RegisterAgentAPIHandlerClient(ctx context.Context, mux *runtime.ServeMux, client AgentAPIClient) error
- func RegisterAgentAPIHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, ...) (err error)
- func RegisterAgentAPIHandlerServer(ctx context.Context, mux *runtime.ServeMux, server AgentAPIServer) error
- func RegisterAgentAPIServer(s grpc.ServiceRegistrar, srv AgentAPIServer)
- type AccountActivityRequest
- func (*AccountActivityRequest) Descriptor() ([]byte, []int)deprecated
- func (x *AccountActivityRequest) GetAddress() string
- func (x *AccountActivityRequest) GetNetwork() string
- func (x *AccountActivityRequest) GetProtocol() string
- func (*AccountActivityRequest) ProtoMessage()
- func (x *AccountActivityRequest) ProtoReflect() protoreflect.Message
- func (x *AccountActivityRequest) Reset()
- func (x *AccountActivityRequest) String() string
- type AccountActivityResponse
- func (*AccountActivityResponse) Descriptor() ([]byte, []int)deprecated
- func (x *AccountActivityResponse) GetCurrentRound() uint64
- func (x *AccountActivityResponse) GetNextToken() string
- func (x *AccountActivityResponse) GetTransactions() []*AlgoTransaction
- func (*AccountActivityResponse) ProtoMessage()
- func (x *AccountActivityResponse) ProtoReflect() protoreflect.Message
- func (x *AccountActivityResponse) Reset()
- func (x *AccountActivityResponse) String() string
- type AccountInformationRequest
- func (*AccountInformationRequest) Descriptor() ([]byte, []int)deprecated
- func (x *AccountInformationRequest) GetAddress() string
- func (x *AccountInformationRequest) GetNetwork() string
- func (x *AccountInformationRequest) GetProtocol() string
- func (*AccountInformationRequest) ProtoMessage()
- func (x *AccountInformationRequest) ProtoReflect() protoreflect.Message
- func (x *AccountInformationRequest) Reset()
- func (x *AccountInformationRequest) String() string
- type AccountInformationResponse
- func (*AccountInformationResponse) Descriptor() ([]byte, []int)deprecated
- func (x *AccountInformationResponse) GetBalance() uint64
- func (x *AccountInformationResponse) GetPendingRewards() uint64
- func (x *AccountInformationResponse) GetPendingTransactions() []*AlgoTransaction
- func (x *AccountInformationResponse) GetStatus() string
- func (x *AccountInformationResponse) GetTotalRewards() uint64
- func (*AccountInformationResponse) ProtoMessage()
- func (x *AccountInformationResponse) ProtoReflect() protoreflect.Message
- func (x *AccountInformationResponse) Reset()
- func (x *AccountInformationResponse) String() string
- type AgentAPIClient
- type AgentAPIServer
- type AgentAPI_AccountActivityClient
- type AgentAPI_AccountActivityServer
- type AlgoTransaction
- func (*AlgoTransaction) Descriptor() ([]byte, []int)deprecated
- func (x *AlgoTransaction) GetAmount() uint64
- func (x *AlgoTransaction) GetConfirmedRound() uint64
- func (x *AlgoTransaction) GetFee() uint64
- func (x *AlgoTransaction) GetNote() []byte
- func (x *AlgoTransaction) GetReceiver() string
- func (x *AlgoTransaction) GetSender() string
- func (*AlgoTransaction) ProtoMessage()
- func (x *AlgoTransaction) ProtoReflect() protoreflect.Message
- func (x *AlgoTransaction) Reset()
- func (x *AlgoTransaction) String() string
- type PingResponse
- type ProcessRequest
- func (*ProcessRequest) Descriptor() ([]byte, []int)deprecated
- func (x *ProcessRequest) GetTask() ProcessRequest_Task
- func (x *ProcessRequest) GetTicket() *Ticket
- func (*ProcessRequest) ProtoMessage()
- func (x *ProcessRequest) ProtoReflect() protoreflect.Message
- func (x *ProcessRequest) Reset()
- func (x *ProcessRequest) String() string
- type ProcessRequest_Task
- func (ProcessRequest_Task) Descriptor() protoreflect.EnumDescriptor
- func (x ProcessRequest_Task) Enum() *ProcessRequest_Task
- func (ProcessRequest_Task) EnumDescriptor() ([]byte, []int)deprecated
- func (x ProcessRequest_Task) Number() protoreflect.EnumNumber
- func (x ProcessRequest_Task) String() string
- func (ProcessRequest_Task) Type() protoreflect.EnumType
- type ProcessResponse
- func (*ProcessResponse) Descriptor() ([]byte, []int)deprecated
- func (x *ProcessResponse) GetIdentifier() string
- func (x *ProcessResponse) GetOk() bool
- func (*ProcessResponse) ProtoMessage()
- func (x *ProcessResponse) ProtoReflect() protoreflect.Message
- func (x *ProcessResponse) Reset()
- func (x *ProcessResponse) String() string
- type QueryRequest
- func (*QueryRequest) Descriptor() ([]byte, []int)deprecated
- func (x *QueryRequest) GetMethod() string
- func (x *QueryRequest) GetSubject() string
- func (*QueryRequest) ProtoMessage()
- func (x *QueryRequest) ProtoReflect() protoreflect.Message
- func (x *QueryRequest) Reset()
- func (x *QueryRequest) String() string
- type QueryResponse
- func (*QueryResponse) Descriptor() ([]byte, []int)deprecated
- func (x *QueryResponse) GetDocument() []byte
- func (x *QueryResponse) GetDocumentMetadata() []byte
- func (x *QueryResponse) GetProof() []byte
- func (*QueryResponse) ProtoMessage()
- func (x *QueryResponse) ProtoReflect() protoreflect.Message
- func (x *QueryResponse) Reset()
- func (x *QueryResponse) String() string
- type Ticket
- func (*Ticket) Descriptor() ([]byte, []int)deprecated
- func (t *Ticket) GetDID() (*did.Identifier, error)
- func (x *Ticket) GetDocument() []byte
- func (x *Ticket) GetDocumentMetadata() []byte
- func (x *Ticket) GetKeyId() string
- func (x *Ticket) GetNonceValue() int64
- func (x *Ticket) GetProof() []byte
- func (t *Ticket) GetProofLD() (*did.ProofLD, error)
- func (x *Ticket) GetSignature() []byte
- func (x *Ticket) GetTimestamp() int64
- func (t *Ticket) IncrementNonce()
- func (t *Ticket) MarshalBinary() ([]byte, error)
- func (t *Ticket) Nonce() int64
- func (*Ticket) ProtoMessage()
- func (x *Ticket) ProtoReflect() protoreflect.Message
- func (x *Ticket) Reset()
- func (t *Ticket) ResetNonce()
- func (t *Ticket) Solve(ctx context.Context, difficulty uint) string
- func (x *Ticket) String() string
- func (t *Ticket) Verify(difficulty uint) error
- type TxParametersResponse
- func (*TxParametersResponse) Descriptor() ([]byte, []int)deprecated
- func (x *TxParametersResponse) GetParams() []byte
- func (*TxParametersResponse) ProtoMessage()
- func (x *TxParametersResponse) ProtoReflect() protoreflect.Message
- func (x *TxParametersResponse) Reset()
- func (x *TxParametersResponse) String() string
- type TxSubmitRequest
- type TxSubmitResponse
- type UnimplementedAgentAPIServer
- func (UnimplementedAgentAPIServer) AccountActivity(*AccountActivityRequest, AgentAPI_AccountActivityServer) error
- func (UnimplementedAgentAPIServer) AccountInformation(context.Context, *AccountInformationRequest) (*AccountInformationResponse, error)
- func (UnimplementedAgentAPIServer) Ping(context.Context, *emptypb.Empty) (*PingResponse, error)
- func (UnimplementedAgentAPIServer) Process(context.Context, *ProcessRequest) (*ProcessResponse, error)
- func (UnimplementedAgentAPIServer) Query(context.Context, *QueryRequest) (*QueryResponse, error)
- func (UnimplementedAgentAPIServer) TxParameters(context.Context, *emptypb.Empty) (*TxParametersResponse, error)
- func (UnimplementedAgentAPIServer) TxSubmit(context.Context, *TxSubmitRequest) (*TxSubmitResponse, error)
- type UnsafeAgentAPIServer
Constants ¶
const ( AgentAPI_Ping_FullMethodName = "/did.v1.AgentAPI/Ping" AgentAPI_Process_FullMethodName = "/did.v1.AgentAPI/Process" AgentAPI_Query_FullMethodName = "/did.v1.AgentAPI/Query" AgentAPI_AccountInformation_FullMethodName = "/did.v1.AgentAPI/AccountInformation" AgentAPI_TxParameters_FullMethodName = "/did.v1.AgentAPI/TxParameters" AgentAPI_TxSubmit_FullMethodName = "/did.v1.AgentAPI/TxSubmit" AgentAPI_AccountActivity_FullMethodName = "/did.v1.AgentAPI/AccountActivity" )
Variables ¶
var ( ProcessRequest_Task_name = map[int32]string{ 0: "TASK_UNSPECIFIED", 1: "TASK_PUBLISH", } ProcessRequest_Task_value = map[string]int32{ "TASK_UNSPECIFIED": 0, "TASK_PUBLISH": 1, } )
Enum value maps for ProcessRequest_Task.
var AgentAPI_ServiceDesc = grpc.ServiceDesc{ ServiceName: "did.v1.AgentAPI", HandlerType: (*AgentAPIServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "Ping", Handler: _AgentAPI_Ping_Handler, }, { MethodName: "Process", Handler: _AgentAPI_Process_Handler, }, { MethodName: "Query", Handler: _AgentAPI_Query_Handler, }, { MethodName: "AccountInformation", Handler: _AgentAPI_AccountInformation_Handler, }, { MethodName: "TxParameters", Handler: _AgentAPI_TxParameters_Handler, }, { MethodName: "TxSubmit", Handler: _AgentAPI_TxSubmit_Handler, }, }, Streams: []grpc.StreamDesc{ { StreamName: "AccountActivity", Handler: _AgentAPI_AccountActivity_Handler, ServerStreams: true, }, }, Metadata: "did/v1/agent_api.proto", }
AgentAPI_ServiceDesc is the grpc.ServiceDesc for AgentAPI service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
var File_did_v1_agent_api_proto protoreflect.FileDescriptor
Functions ¶
func RegisterAgentAPIHandler ¶
func RegisterAgentAPIHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
RegisterAgentAPIHandler registers the http handlers for service AgentAPI to "mux". The handlers forward requests to the grpc endpoint over "conn".
func RegisterAgentAPIHandlerClient ¶
func RegisterAgentAPIHandlerClient(ctx context.Context, mux *runtime.ServeMux, client AgentAPIClient) error
RegisterAgentAPIHandlerClient registers the http handlers for service AgentAPI to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "AgentAPIClient". Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "AgentAPIClient" doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in "AgentAPIClient" to call the correct interceptors.
func RegisterAgentAPIHandlerFromEndpoint ¶
func RegisterAgentAPIHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error)
RegisterAgentAPIHandlerFromEndpoint is same as RegisterAgentAPIHandler but automatically dials to "endpoint" and closes the connection when "ctx" gets done.
func RegisterAgentAPIHandlerServer ¶
func RegisterAgentAPIHandlerServer(ctx context.Context, mux *runtime.ServeMux, server AgentAPIServer) error
RegisterAgentAPIHandlerServer registers the http handlers for service AgentAPI to "mux". UnaryRPC :call AgentAPIServer directly. StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterAgentAPIHandlerFromEndpoint instead.
func RegisterAgentAPIServer ¶
func RegisterAgentAPIServer(s grpc.ServiceRegistrar, srv AgentAPIServer)
Types ¶
type AccountActivityRequest ¶
type AccountActivityRequest struct { // L1 protocol. Protocol string `protobuf:"bytes,1,opt,name=protocol,proto3" json:"protocol,omitempty"` // Network identifier. Network string `protobuf:"bytes,2,opt,name=network,proto3" json:"network,omitempty"` // Account address. Address string `protobuf:"bytes,3,opt,name=address,proto3" json:"address,omitempty"` // contains filtered or unexported fields }
Open a channel for notifications about account activity.
func (*AccountActivityRequest) Descriptor
deprecated
func (*AccountActivityRequest) Descriptor() ([]byte, []int)
Deprecated: Use AccountActivityRequest.ProtoReflect.Descriptor instead.
func (*AccountActivityRequest) GetAddress ¶
func (x *AccountActivityRequest) GetAddress() string
func (*AccountActivityRequest) GetNetwork ¶
func (x *AccountActivityRequest) GetNetwork() string
func (*AccountActivityRequest) GetProtocol ¶
func (x *AccountActivityRequest) GetProtocol() string
func (*AccountActivityRequest) ProtoMessage ¶
func (*AccountActivityRequest) ProtoMessage()
func (*AccountActivityRequest) ProtoReflect ¶
func (x *AccountActivityRequest) ProtoReflect() protoreflect.Message
func (*AccountActivityRequest) Reset ¶
func (x *AccountActivityRequest) Reset()
func (*AccountActivityRequest) String ¶
func (x *AccountActivityRequest) String() string
type AccountActivityResponse ¶
type AccountActivityResponse struct { // Consensus round at which the results were computed. CurrentRound uint64 `protobuf:"varint,1,opt,name=current_round,json=currentRound,proto3" json:"current_round,omitempty"` // Used for pagination, when making another request provide this token // with the next parameter. NextToken string `protobuf:"bytes,2,opt,name=next_token,json=nextToken,proto3" json:"next_token,omitempty"` // Transaction details. Transactions []*AlgoTransaction `protobuf:"bytes,3,rep,name=transactions,proto3" json:"transactions,omitempty"` // contains filtered or unexported fields }
Provide near real-time details of account activity. Useful when requiring activity notifications.
func (*AccountActivityResponse) Descriptor
deprecated
func (*AccountActivityResponse) Descriptor() ([]byte, []int)
Deprecated: Use AccountActivityResponse.ProtoReflect.Descriptor instead.
func (*AccountActivityResponse) GetCurrentRound ¶
func (x *AccountActivityResponse) GetCurrentRound() uint64
func (*AccountActivityResponse) GetNextToken ¶
func (x *AccountActivityResponse) GetNextToken() string
func (*AccountActivityResponse) GetTransactions ¶
func (x *AccountActivityResponse) GetTransactions() []*AlgoTransaction
func (*AccountActivityResponse) ProtoMessage ¶
func (*AccountActivityResponse) ProtoMessage()
func (*AccountActivityResponse) ProtoReflect ¶
func (x *AccountActivityResponse) ProtoReflect() protoreflect.Message
func (*AccountActivityResponse) Reset ¶
func (x *AccountActivityResponse) Reset()
func (*AccountActivityResponse) String ¶
func (x *AccountActivityResponse) String() string
type AccountInformationRequest ¶
type AccountInformationRequest struct { // L1 protocol. Protocol string `protobuf:"bytes,1,opt,name=protocol,proto3" json:"protocol,omitempty"` // Network identifier. Network string `protobuf:"bytes,2,opt,name=network,proto3" json:"network,omitempty"` // Account address. Address string `protobuf:"bytes,3,opt,name=address,proto3" json:"address,omitempty"` // contains filtered or unexported fields }
Request information about a given crypto account.
func (*AccountInformationRequest) Descriptor
deprecated
func (*AccountInformationRequest) Descriptor() ([]byte, []int)
Deprecated: Use AccountInformationRequest.ProtoReflect.Descriptor instead.
func (*AccountInformationRequest) GetAddress ¶
func (x *AccountInformationRequest) GetAddress() string
func (*AccountInformationRequest) GetNetwork ¶
func (x *AccountInformationRequest) GetNetwork() string
func (*AccountInformationRequest) GetProtocol ¶
func (x *AccountInformationRequest) GetProtocol() string
func (*AccountInformationRequest) ProtoMessage ¶
func (*AccountInformationRequest) ProtoMessage()
func (*AccountInformationRequest) ProtoReflect ¶
func (x *AccountInformationRequest) ProtoReflect() protoreflect.Message
func (*AccountInformationRequest) Reset ¶
func (x *AccountInformationRequest) Reset()
func (*AccountInformationRequest) String ¶
func (x *AccountInformationRequest) String() string
type AccountInformationResponse ¶
type AccountInformationResponse struct { // Delegation status of the account. Status string `protobuf:"bytes,1,opt,name=status,proto3" json:"status,omitempty"` // Current balance in the account, without the pending rewards. Balance uint64 `protobuf:"varint,2,opt,name=balance,proto3" json:"balance,omitempty"` // Amount pending for rewards in this account. PendingRewards uint64 `protobuf:"varint,3,opt,name=pending_rewards,json=pendingRewards,proto3" json:"pending_rewards,omitempty"` // Total rewards the account has received, including pending rewards. TotalRewards uint64 `protobuf:"varint,4,opt,name=total_rewards,json=totalRewards,proto3" json:"total_rewards,omitempty"` // Transactions submitted by this account that are yet to be processed // by the network. PendingTransactions []*AlgoTransaction `protobuf:"bytes,5,rep,name=pending_transactions,json=pendingTransactions,proto3" json:"pending_transactions,omitempty"` // contains filtered or unexported fields }
Latest information available for a specified crypto account.
func (*AccountInformationResponse) Descriptor
deprecated
func (*AccountInformationResponse) Descriptor() ([]byte, []int)
Deprecated: Use AccountInformationResponse.ProtoReflect.Descriptor instead.
func (*AccountInformationResponse) GetBalance ¶
func (x *AccountInformationResponse) GetBalance() uint64
func (*AccountInformationResponse) GetPendingRewards ¶
func (x *AccountInformationResponse) GetPendingRewards() uint64
func (*AccountInformationResponse) GetPendingTransactions ¶
func (x *AccountInformationResponse) GetPendingTransactions() []*AlgoTransaction
func (*AccountInformationResponse) GetStatus ¶
func (x *AccountInformationResponse) GetStatus() string
func (*AccountInformationResponse) GetTotalRewards ¶
func (x *AccountInformationResponse) GetTotalRewards() uint64
func (*AccountInformationResponse) ProtoMessage ¶
func (*AccountInformationResponse) ProtoMessage()
func (*AccountInformationResponse) ProtoReflect ¶
func (x *AccountInformationResponse) ProtoReflect() protoreflect.Message
func (*AccountInformationResponse) Reset ¶
func (x *AccountInformationResponse) Reset()
func (*AccountInformationResponse) String ¶
func (x *AccountInformationResponse) String() string
type AgentAPIClient ¶
type AgentAPIClient interface { // Reachability test. Ping(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*PingResponse, error) // Process an incoming request ticket. Process(ctx context.Context, in *ProcessRequest, opts ...grpc.CallOption) (*ProcessResponse, error) // Return the current state of a DID subject. Query(ctx context.Context, in *QueryRequest, opts ...grpc.CallOption) (*QueryResponse, error) // Request information about an Algorand account. AccountInformation(ctx context.Context, in *AccountInformationRequest, opts ...grpc.CallOption) (*AccountInformationResponse, error) // Return the current transaction parameters for the network. TxParameters(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*TxParametersResponse, error) // Submit a raw signed transaction to the network for processing. TxSubmit(ctx context.Context, in *TxSubmitRequest, opts ...grpc.CallOption) (*TxSubmitResponse, error) // Provide near real-time notifications for account activity. AccountActivity(ctx context.Context, in *AccountActivityRequest, opts ...grpc.CallOption) (AgentAPI_AccountActivityClient, error) }
AgentAPIClient is the client API for AgentAPI service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
func NewAgentAPIClient ¶
func NewAgentAPIClient(cc grpc.ClientConnInterface) AgentAPIClient
type AgentAPIServer ¶
type AgentAPIServer interface { // Reachability test. Ping(context.Context, *emptypb.Empty) (*PingResponse, error) // Process an incoming request ticket. Process(context.Context, *ProcessRequest) (*ProcessResponse, error) // Return the current state of a DID subject. Query(context.Context, *QueryRequest) (*QueryResponse, error) // Request information about an Algorand account. AccountInformation(context.Context, *AccountInformationRequest) (*AccountInformationResponse, error) // Return the current transaction parameters for the network. TxParameters(context.Context, *emptypb.Empty) (*TxParametersResponse, error) // Submit a raw signed transaction to the network for processing. TxSubmit(context.Context, *TxSubmitRequest) (*TxSubmitResponse, error) // Provide near real-time notifications for account activity. AccountActivity(*AccountActivityRequest, AgentAPI_AccountActivityServer) error // contains filtered or unexported methods }
AgentAPIServer is the server API for AgentAPI service. All implementations must embed UnimplementedAgentAPIServer for forward compatibility
type AgentAPI_AccountActivityClient ¶
type AgentAPI_AccountActivityClient interface { Recv() (*AccountActivityResponse, error) grpc.ClientStream }
type AgentAPI_AccountActivityServer ¶
type AgentAPI_AccountActivityServer interface { Send(*AccountActivityResponse) error grpc.ServerStream }
type AlgoTransaction ¶
type AlgoTransaction struct { // Amount included in the transaction. Amount uint64 `protobuf:"varint,1,opt,name=amount,proto3" json:"amount,omitempty"` // Additional contextual metadata. Note []byte `protobuf:"bytes,2,opt,name=note,proto3" json:"note,omitempty"` // Destination address of the funds. Receiver string `protobuf:"bytes,3,opt,name=receiver,proto3" json:"receiver,omitempty"` // Origination address of the funds. Sender string `protobuf:"bytes,4,opt,name=sender,proto3" json:"sender,omitempty"` // Fees applicable. Fee uint64 `protobuf:"varint,5,opt,name=fee,proto3" json:"fee,omitempty"` // Round when the transaction was confirmed. The value is set to '0' // in the case of pending transactions. ConfirmedRound uint64 `protobuf:"varint,6,opt,name=confirmed_round,json=confirmedRound,proto3" json:"confirmed_round,omitempty"` // contains filtered or unexported fields }
Details about a transaction on the Algorand network.
func (*AlgoTransaction) Descriptor
deprecated
func (*AlgoTransaction) Descriptor() ([]byte, []int)
Deprecated: Use AlgoTransaction.ProtoReflect.Descriptor instead.
func (*AlgoTransaction) GetAmount ¶
func (x *AlgoTransaction) GetAmount() uint64
func (*AlgoTransaction) GetConfirmedRound ¶
func (x *AlgoTransaction) GetConfirmedRound() uint64
func (*AlgoTransaction) GetFee ¶
func (x *AlgoTransaction) GetFee() uint64
func (*AlgoTransaction) GetNote ¶
func (x *AlgoTransaction) GetNote() []byte
func (*AlgoTransaction) GetReceiver ¶
func (x *AlgoTransaction) GetReceiver() string
func (*AlgoTransaction) GetSender ¶
func (x *AlgoTransaction) GetSender() string
func (*AlgoTransaction) ProtoMessage ¶
func (*AlgoTransaction) ProtoMessage()
func (*AlgoTransaction) ProtoReflect ¶
func (x *AlgoTransaction) ProtoReflect() protoreflect.Message
func (*AlgoTransaction) Reset ¶
func (x *AlgoTransaction) Reset()
func (*AlgoTransaction) String ¶
func (x *AlgoTransaction) String() string
type PingResponse ¶
type PingResponse struct { // Responsiveness result. Ok bool `protobuf:"varint,1,opt,name=ok,proto3" json:"ok,omitempty"` // contains filtered or unexported fields }
Basic reachability test response.
func (*PingResponse) Descriptor
deprecated
func (*PingResponse) Descriptor() ([]byte, []int)
Deprecated: Use PingResponse.ProtoReflect.Descriptor instead.
func (*PingResponse) GetOk ¶
func (x *PingResponse) GetOk() bool
func (*PingResponse) ProtoMessage ¶
func (*PingResponse) ProtoMessage()
func (*PingResponse) ProtoReflect ¶
func (x *PingResponse) ProtoReflect() protoreflect.Message
func (*PingResponse) Reset ¶
func (x *PingResponse) Reset()
func (*PingResponse) String ¶
func (x *PingResponse) String() string
type ProcessRequest ¶
type ProcessRequest struct { // Mutation type. Task ProcessRequest_Task `protobuf:"varint,1,opt,name=task,proto3,enum=did.v1.ProcessRequest_Task" json:"task,omitempty"` // Request ticket. Ticket *Ticket `protobuf:"bytes,2,opt,name=ticket,proto3" json:"ticket,omitempty"` // contains filtered or unexported fields }
Mutation request, either to publish or deactivate a DID record.
func (*ProcessRequest) Descriptor
deprecated
func (*ProcessRequest) Descriptor() ([]byte, []int)
Deprecated: Use ProcessRequest.ProtoReflect.Descriptor instead.
func (*ProcessRequest) GetTask ¶
func (x *ProcessRequest) GetTask() ProcessRequest_Task
func (*ProcessRequest) GetTicket ¶
func (x *ProcessRequest) GetTicket() *Ticket
func (*ProcessRequest) ProtoMessage ¶
func (*ProcessRequest) ProtoMessage()
func (*ProcessRequest) ProtoReflect ¶
func (x *ProcessRequest) ProtoReflect() protoreflect.Message
func (*ProcessRequest) Reset ¶
func (x *ProcessRequest) Reset()
func (*ProcessRequest) String ¶
func (x *ProcessRequest) String() string
type ProcessRequest_Task ¶
type ProcessRequest_Task int32
Available mutations.
const ( // Invalid task selected. ProcessRequest_TASK_UNSPECIFIED ProcessRequest_Task = 0 // Publish a DID document. This same operation covers publishing // a completely new identifier or updating an existing one. ProcessRequest_TASK_PUBLISH ProcessRequest_Task = 1 )
func (ProcessRequest_Task) Descriptor ¶
func (ProcessRequest_Task) Descriptor() protoreflect.EnumDescriptor
func (ProcessRequest_Task) Enum ¶
func (x ProcessRequest_Task) Enum() *ProcessRequest_Task
func (ProcessRequest_Task) EnumDescriptor
deprecated
func (ProcessRequest_Task) EnumDescriptor() ([]byte, []int)
Deprecated: Use ProcessRequest_Task.Descriptor instead.
func (ProcessRequest_Task) Number ¶
func (x ProcessRequest_Task) Number() protoreflect.EnumNumber
func (ProcessRequest_Task) String ¶
func (x ProcessRequest_Task) String() string
func (ProcessRequest_Task) Type ¶
func (ProcessRequest_Task) Type() protoreflect.EnumType
type ProcessResponse ¶
type ProcessResponse struct { // Processing result, must be 'true' if the mutation was // properly applied. Ok bool `protobuf:"varint,1,opt,name=ok,proto3" json:"ok,omitempty"` // Contextual transaction identifier. Identifier string `protobuf:"bytes,2,opt,name=identifier,proto3" json:"identifier,omitempty"` // contains filtered or unexported fields }
Mutation result.
func (*ProcessResponse) Descriptor
deprecated
func (*ProcessResponse) Descriptor() ([]byte, []int)
Deprecated: Use ProcessResponse.ProtoReflect.Descriptor instead.
func (*ProcessResponse) GetIdentifier ¶
func (x *ProcessResponse) GetIdentifier() string
func (*ProcessResponse) GetOk ¶
func (x *ProcessResponse) GetOk() bool
func (*ProcessResponse) ProtoMessage ¶
func (*ProcessResponse) ProtoMessage()
func (*ProcessResponse) ProtoReflect ¶
func (x *ProcessResponse) ProtoReflect() protoreflect.Message
func (*ProcessResponse) Reset ¶
func (x *ProcessResponse) Reset()
func (*ProcessResponse) String ¶
func (x *ProcessResponse) String() string
type QueryRequest ¶
type QueryRequest struct { // DID method. Method string `protobuf:"bytes,1,opt,name=method,proto3" json:"method,omitempty"` // DID subject. Subject string `protobuf:"bytes,2,opt,name=subject,proto3" json:"subject,omitempty"` // contains filtered or unexported fields }
Queries allow to resolve a previously registered DID document.
func (*QueryRequest) Descriptor
deprecated
func (*QueryRequest) Descriptor() ([]byte, []int)
Deprecated: Use QueryRequest.ProtoReflect.Descriptor instead.
func (*QueryRequest) GetMethod ¶
func (x *QueryRequest) GetMethod() string
func (*QueryRequest) GetSubject ¶
func (x *QueryRequest) GetSubject() string
func (*QueryRequest) ProtoMessage ¶
func (*QueryRequest) ProtoMessage()
func (*QueryRequest) ProtoReflect ¶
func (x *QueryRequest) ProtoReflect() protoreflect.Message
func (*QueryRequest) Reset ¶
func (x *QueryRequest) Reset()
func (*QueryRequest) String ¶
func (x *QueryRequest) String() string
type QueryResponse ¶
type QueryResponse struct { // JSON-encoded DID document. Document []byte `protobuf:"bytes,1,opt,name=document,proto3" json:"document,omitempty"` // JSON-encoded DID proof. Proof []byte `protobuf:"bytes,2,opt,name=proof,proto3" json:"proof,omitempty"` // JSON-encoded DID document metadata. DocumentMetadata []byte `protobuf:"bytes,3,opt,name=document_metadata,json=documentMetadata,proto3" json:"document_metadata,omitempty"` // contains filtered or unexported fields }
Query response.
func (*QueryResponse) Descriptor
deprecated
func (*QueryResponse) Descriptor() ([]byte, []int)
Deprecated: Use QueryResponse.ProtoReflect.Descriptor instead.
func (*QueryResponse) GetDocument ¶
func (x *QueryResponse) GetDocument() []byte
func (*QueryResponse) GetDocumentMetadata ¶ added in v0.2.0
func (x *QueryResponse) GetDocumentMetadata() []byte
func (*QueryResponse) GetProof ¶
func (x *QueryResponse) GetProof() []byte
func (*QueryResponse) ProtoMessage ¶
func (*QueryResponse) ProtoMessage()
func (*QueryResponse) ProtoReflect ¶
func (x *QueryResponse) ProtoReflect() protoreflect.Message
func (*QueryResponse) Reset ¶
func (x *QueryResponse) Reset()
func (*QueryResponse) String ¶
func (x *QueryResponse) String() string
type Ticket ¶
type Ticket struct { // UNIX timestamp (in UTC) when the ticket was generated. // All ticket automatically expire after 5 minutes to // prevent replay attacks. Timestamp int64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"` // Nonce selected to solve the PoW challenge. NonceValue int64 `protobuf:"varint,2,opt,name=nonce_value,json=nonceValue,proto3" json:"nonce_value,omitempty"` // Cryptographic key identifier. Must be a valid 'authentication' method // on the DID document. The key will be used to generate the DID proof // and to sign the ticket itself. KeyId string `protobuf:"bytes,3,opt,name=key_id,json=keyId,proto3" json:"key_id,omitempty"` // JSON encoded DID document. Document []byte `protobuf:"bytes,4,opt,name=document,proto3" json:"document,omitempty"` // JSON encoded Proof document. Proof []byte `protobuf:"bytes,5,opt,name=proof,proto3" json:"proof,omitempty"` // Digital signature for the ticket, it's calculated using the // PoW solution as input. Signature []byte `protobuf:"bytes,6,opt,name=signature,proto3" json:"signature,omitempty"` // JSON-encoded DID document metadata. DocumentMetadata []byte `protobuf:"bytes,7,opt,name=document_metadata,json=documentMetadata,proto3" json:"document_metadata,omitempty"` // contains filtered or unexported fields }
Ticket required for write operations.
func NewTicket ¶
func NewTicket(id *did.Identifier, keyID string) (*Ticket, error)
NewTicket returns a properly initialized new ticket instance.
func (*Ticket) Descriptor
deprecated
func (*Ticket) GetDID ¶
func (t *Ticket) GetDID() (*did.Identifier, error)
GetDID retrieve the DID instance from the ticket contents.
func (*Ticket) GetDocument ¶
func (*Ticket) GetDocumentMetadata ¶ added in v0.2.0
func (*Ticket) GetNonceValue ¶
func (*Ticket) GetProofLD ¶
GetProofLD returns the decoded proof document contained in the ticket.
func (*Ticket) GetSignature ¶
func (*Ticket) GetTimestamp ¶
func (*Ticket) IncrementNonce ¶
func (t *Ticket) IncrementNonce()
IncrementNonce will adjust the internal nonce value by 1.
func (*Ticket) MarshalBinary ¶
MarshalBinary returns a deterministic binary encoding for the ticket instance using a byte concatenation of the form: 'timestamp | nonce | key_id | document | proof | document_metadata' where timestamp and nonce are individually encoded using little endian byte order.
func (*Ticket) ProtoMessage ¶
func (*Ticket) ProtoMessage()
func (*Ticket) ProtoReflect ¶
func (x *Ticket) ProtoReflect() protoreflect.Message
func (*Ticket) ResetNonce ¶
func (t *Ticket) ResetNonce()
ResetNonce returns the internal nonce value back to 0.
func (*Ticket) Verify ¶
Verify perform all the required validations to ensure the request ticket is ready for further processing
- Challenge is valid
- Contents are a properly encoded DID instance
- Contents don’t include any private key, for security reasons no private keys should ever be published on the network
- DID proof is valid
- Ticket signature is valid.
type TxParametersResponse ¶
type TxParametersResponse struct { // JSON-encoded parameters Params []byte `protobuf:"bytes,1,opt,name=params,proto3" json:"params,omitempty"` // contains filtered or unexported fields }
Current transaction parameters for the network.
func (*TxParametersResponse) Descriptor
deprecated
func (*TxParametersResponse) Descriptor() ([]byte, []int)
Deprecated: Use TxParametersResponse.ProtoReflect.Descriptor instead.
func (*TxParametersResponse) GetParams ¶
func (x *TxParametersResponse) GetParams() []byte
func (*TxParametersResponse) ProtoMessage ¶
func (*TxParametersResponse) ProtoMessage()
func (*TxParametersResponse) ProtoReflect ¶
func (x *TxParametersResponse) ProtoReflect() protoreflect.Message
func (*TxParametersResponse) Reset ¶
func (x *TxParametersResponse) Reset()
func (*TxParametersResponse) String ¶
func (x *TxParametersResponse) String() string
type TxSubmitRequest ¶
type TxSubmitRequest struct { // Raw signed transaction ready to be submitted to the network. Stx []byte `protobuf:"bytes,1,opt,name=stx,proto3" json:"stx,omitempty"` // contains filtered or unexported fields }
Submit a raw signed transaction to the network.
func (*TxSubmitRequest) Descriptor
deprecated
func (*TxSubmitRequest) Descriptor() ([]byte, []int)
Deprecated: Use TxSubmitRequest.ProtoReflect.Descriptor instead.
func (*TxSubmitRequest) GetStx ¶
func (x *TxSubmitRequest) GetStx() []byte
func (*TxSubmitRequest) ProtoMessage ¶
func (*TxSubmitRequest) ProtoMessage()
func (*TxSubmitRequest) ProtoReflect ¶
func (x *TxSubmitRequest) ProtoReflect() protoreflect.Message
func (*TxSubmitRequest) Reset ¶
func (x *TxSubmitRequest) Reset()
func (*TxSubmitRequest) String ¶
func (x *TxSubmitRequest) String() string
type TxSubmitResponse ¶
type TxSubmitResponse struct { // Transaction ID generated by the network as part of the successful // submit operation. Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` // contains filtered or unexported fields }
Transaction submit result and additional details.
func (*TxSubmitResponse) Descriptor
deprecated
func (*TxSubmitResponse) Descriptor() ([]byte, []int)
Deprecated: Use TxSubmitResponse.ProtoReflect.Descriptor instead.
func (*TxSubmitResponse) GetId ¶
func (x *TxSubmitResponse) GetId() string
func (*TxSubmitResponse) ProtoMessage ¶
func (*TxSubmitResponse) ProtoMessage()
func (*TxSubmitResponse) ProtoReflect ¶
func (x *TxSubmitResponse) ProtoReflect() protoreflect.Message
func (*TxSubmitResponse) Reset ¶
func (x *TxSubmitResponse) Reset()
func (*TxSubmitResponse) String ¶
func (x *TxSubmitResponse) String() string
type UnimplementedAgentAPIServer ¶
type UnimplementedAgentAPIServer struct { }
UnimplementedAgentAPIServer must be embedded to have forward compatible implementations.
func (UnimplementedAgentAPIServer) AccountActivity ¶
func (UnimplementedAgentAPIServer) AccountActivity(*AccountActivityRequest, AgentAPI_AccountActivityServer) error
func (UnimplementedAgentAPIServer) AccountInformation ¶
func (UnimplementedAgentAPIServer) AccountInformation(context.Context, *AccountInformationRequest) (*AccountInformationResponse, error)
func (UnimplementedAgentAPIServer) Ping ¶
func (UnimplementedAgentAPIServer) Ping(context.Context, *emptypb.Empty) (*PingResponse, error)
func (UnimplementedAgentAPIServer) Process ¶
func (UnimplementedAgentAPIServer) Process(context.Context, *ProcessRequest) (*ProcessResponse, error)
func (UnimplementedAgentAPIServer) Query ¶
func (UnimplementedAgentAPIServer) Query(context.Context, *QueryRequest) (*QueryResponse, error)
func (UnimplementedAgentAPIServer) TxParameters ¶
func (UnimplementedAgentAPIServer) TxParameters(context.Context, *emptypb.Empty) (*TxParametersResponse, error)
func (UnimplementedAgentAPIServer) TxSubmit ¶
func (UnimplementedAgentAPIServer) TxSubmit(context.Context, *TxSubmitRequest) (*TxSubmitResponse, error)
type UnsafeAgentAPIServer ¶
type UnsafeAgentAPIServer interface {
// contains filtered or unexported methods
}
UnsafeAgentAPIServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to AgentAPIServer will result in compilation errors.