Documentation ¶
Index ¶
- Constants
- func PublicDID() string
- func PublicVerkey() string
- type AgencyClient
- type Agent
- type Connection
- type ConnectionStatus
- type ConnectionStore
- func (s *ConnectionStore) AddConnection(id string, c *ConnectionStatus) (*Connection, error)
- func (s *ConnectionStore) AddConnectionInvitation(id, invitationJSON string) (string, error)
- func (s *ConnectionStore) CreateInvitation() (invitation string, err error)
- func (s *ConnectionStore) GetConnection(id string) (*Connection, error)
- func (s *ConnectionStore) GetConnectionInvitation(id string) (string, error)
- func (s *ConnectionStore) HandleConnectionNotification(notification *agency.Notification) (err error)
- func (s *ConnectionStore) RequestConnection(id string) (invitationID string, err error)
- func (s *ConnectionStore) TrustPing(connectionID string) (res string, err error)
- type Credential
- type CredentialAttribute
- type CredentialProposal
- type CredentialStatus
- type CredentialStore
- func (s *CredentialStore) AcceptCredentialProposal(id string) (threadID string, err error)
- func (s *CredentialStore) GetCredential(id string) (bool, IssueCredentialState, error)
- func (s *CredentialStore) GetCredentialContent(id string) (*Credential, error)
- func (s *CredentialStore) HandleCredentialNotification(notification *agency.Notification) (err error)
- func (s *CredentialStore) HandleCredentialQuestion(question *agency.Question) (err error)
- func (s *CredentialStore) IssueCredential(id string) (err error)
- func (s *CredentialStore) OfferCredential(connectionID, credDefID string, attributes []*CredentialAttribute) (threadID string, err error)
- func (s *CredentialStore) ProposeCredential(connectionID, credDefID string, attributes []*CredentialAttribute) (threadID string, err error)
- func (s *CredentialStore) ReceiveCredential(id string) (err error)
- func (s *CredentialStore) RequestCredential(id string) (threadID string, err error)
- type IssueCredentialState
- type PresentProofState
- type Proof
- type ProofAttribute
- type ProofPredicate
- type ProofPresentation
- type ProofStatus
- type ProofStore
- func (s *ProofStore) GetProof(id string) (bool, PresentProofState, error)
- func (s *ProofStore) HandleProofNotification(notification *agency.Notification) (err error)
- func (s *ProofStore) HandleProofQuestion(question *agency.Question) (err error)
- func (s *ProofStore) ProposeProof(connectionID string, attributes []*ProofAttribute) (threadID string, err error)
- func (s *ProofStore) RequestProof(connectionID string, attributes []*ProofAttribute, ...) (threadID string, err error)
- func (s *ProofStore) SendProofPresentation(id string) (threadID string, err error)
- func (s *ProofStore) VerifyPresentation(id string) (err error)
- type QuestionHeader
- type SchemaStore
- func (s *SchemaStore) AddStoredSchema(storeID, id string) (string, error)
- func (s *SchemaStore) CreateSchema(name, version string, attributes []string) (id string, err error)
- func (s *SchemaStore) GetSchema(schemaID string) (schemaJSON string, err error)
- func (s *SchemaStore) GetStoredSchema(id string) (string, error)
Constants ¶
View Source
const AgencyPort = 50051
View Source
const MaxWaitTime = time.Minute * 3
View Source
const WaitTime = time.Millisecond * 500
Variables ¶
This section is empty.
Functions ¶
func PublicVerkey ¶ added in v0.1.19
func PublicVerkey() string
Types ¶
type AgencyClient ¶
type AgencyClient struct { Conn client.Conn AgentClient agency.AgentServiceClient ProtocolClient agency.ProtocolServiceClient }
type Agent ¶
type Agent struct { User string JWT string Client *AgencyClient AgencyHost string *ConnectionStore *CredentialStore *ProofStore *SchemaStore }
func (*Agent) CreateCredDef ¶ added in v0.1.6
func (*Agent) GetCredDef ¶ added in v0.1.6
type Connection ¶
type Connection struct {
ID string `json:"id"`
}
type ConnectionStatus ¶
type ConnectionStatus = agency.ProtocolStatus_DIDExchangeStatus
type ConnectionStore ¶
type ConnectionStore struct { User string // contains filtered or unexported fields }
func InitConnections ¶
func InitConnections(a *AgencyClient, userName string) *ConnectionStore
func (*ConnectionStore) AddConnection ¶
func (s *ConnectionStore) AddConnection(id string, c *ConnectionStatus) (*Connection, error)
func (*ConnectionStore) AddConnectionInvitation ¶
func (s *ConnectionStore) AddConnectionInvitation(id, invitationJSON string) (string, error)
func (*ConnectionStore) CreateInvitation ¶
func (s *ConnectionStore) CreateInvitation() (invitation string, err error)
func (*ConnectionStore) GetConnection ¶
func (s *ConnectionStore) GetConnection(id string) (*Connection, error)
func (*ConnectionStore) GetConnectionInvitation ¶
func (s *ConnectionStore) GetConnectionInvitation(id string) (string, error)
func (*ConnectionStore) HandleConnectionNotification ¶
func (s *ConnectionStore) HandleConnectionNotification(notification *agency.Notification) (err error)
func (*ConnectionStore) RequestConnection ¶
func (s *ConnectionStore) RequestConnection(id string) (invitationID string, err error)
type Credential ¶
type CredentialAttribute ¶
type CredentialAttribute = agency.Protocol_IssuingAttributes_Attribute
type CredentialProposal ¶ added in v0.1.6
type CredentialProposal = agency.Question_IssueProposeMsg
type CredentialStatus ¶
type CredentialStatus = agency.ProtocolStatus_IssueCredentialStatus
type CredentialStore ¶
type CredentialStore struct {
// contains filtered or unexported fields
}
func InitCredentials ¶
func InitCredentials(a *AgencyClient) *CredentialStore
func (*CredentialStore) AcceptCredentialProposal ¶ added in v0.1.6
func (s *CredentialStore) AcceptCredentialProposal(id string) (threadID string, err error)
func (*CredentialStore) GetCredential ¶
func (s *CredentialStore) GetCredential(id string) (bool, IssueCredentialState, error)
func (*CredentialStore) GetCredentialContent ¶ added in v0.1.8
func (s *CredentialStore) GetCredentialContent(id string) (*Credential, error)
func (*CredentialStore) HandleCredentialNotification ¶
func (s *CredentialStore) HandleCredentialNotification(notification *agency.Notification) (err error)
func (*CredentialStore) HandleCredentialQuestion ¶ added in v0.1.6
func (s *CredentialStore) HandleCredentialQuestion(question *agency.Question) (err error)
func (*CredentialStore) IssueCredential ¶ added in v0.1.8
func (s *CredentialStore) IssueCredential(id string) (err error)
func (*CredentialStore) OfferCredential ¶ added in v0.1.6
func (s *CredentialStore) OfferCredential( connectionID, credDefID string, attributes []*CredentialAttribute, ) (threadID string, err error)
func (*CredentialStore) ProposeCredential ¶
func (s *CredentialStore) ProposeCredential( connectionID, credDefID string, attributes []*CredentialAttribute, ) (threadID string, err error)
func (*CredentialStore) ReceiveCredential ¶ added in v0.1.10
func (s *CredentialStore) ReceiveCredential(id string) (err error)
func (*CredentialStore) RequestCredential ¶
func (s *CredentialStore) RequestCredential(id string) (threadID string, err error)
type IssueCredentialState ¶ added in v0.1.8
type IssueCredentialState int
const ( PROPOSAL IssueCredentialState = 1 OFFER IssueCredentialState = 2 REQUEST IssueCredentialState = 3 CREDENTIAL IssueCredentialState = 4 DONE IssueCredentialState = 5 FAILURE IssueCredentialState = 6 )
func (IssueCredentialState) String ¶ added in v0.1.8
func (e IssueCredentialState) String() string
type PresentProofState ¶ added in v0.1.8
type PresentProofState int
const ( StateProofProposal PresentProofState = 1 StateProofRequest PresentProofState = 2 StateProofPresentation PresentProofState = 3 StateProofDone PresentProofState = 4 )
func (PresentProofState) String ¶ added in v0.1.8
func (e PresentProofState) String() string
type ProofAttribute ¶
type ProofAttribute = agency.Protocol_Proof_Attribute
type ProofPredicate ¶ added in v0.1.6
type ProofPredicate = agency.Protocol_Predicates_Predicate
type ProofPresentation ¶ added in v0.1.6
type ProofPresentation = agency.Question_ProofVerifyMsg
type ProofStatus ¶
type ProofStatus = agency.ProtocolStatus_PresentProofStatus
type ProofStore ¶
type ProofStore struct {
// contains filtered or unexported fields
}
func InitProofs ¶
func InitProofs(a *AgencyClient) *ProofStore
func (*ProofStore) GetProof ¶
func (s *ProofStore) GetProof(id string) (bool, PresentProofState, error)
func (*ProofStore) HandleProofNotification ¶
func (s *ProofStore) HandleProofNotification(notification *agency.Notification) (err error)
func (*ProofStore) HandleProofQuestion ¶ added in v0.1.6
func (s *ProofStore) HandleProofQuestion(question *agency.Question) (err error)
func (*ProofStore) ProposeProof ¶ added in v0.1.8
func (s *ProofStore) ProposeProof(connectionID string, attributes []*ProofAttribute) (threadID string, err error)
func (*ProofStore) RequestProof ¶ added in v0.1.8
func (s *ProofStore) RequestProof( connectionID string, attributes []*ProofAttribute, predicates []*ProofPredicate, ) (threadID string, err error)
func (*ProofStore) SendProofPresentation ¶
func (s *ProofStore) SendProofPresentation(id string) (threadID string, err error)
func (*ProofStore) VerifyPresentation ¶ added in v0.1.8
func (s *ProofStore) VerifyPresentation(id string) (err error)
type QuestionHeader ¶ added in v0.1.6
type QuestionHeader struct {
// contains filtered or unexported fields
}
type SchemaStore ¶ added in v0.1.6
type SchemaStore struct {
// contains filtered or unexported fields
}
func InitSchemas ¶ added in v0.1.6
func InitSchemas(a *AgencyClient) *SchemaStore
func (*SchemaStore) AddStoredSchema ¶ added in v0.1.6
func (s *SchemaStore) AddStoredSchema(storeID, id string) (string, error)
func (*SchemaStore) CreateSchema ¶ added in v0.1.6
func (s *SchemaStore) CreateSchema(name, version string, attributes []string) (id string, err error)
func (*SchemaStore) GetSchema ¶ added in v0.1.6
func (s *SchemaStore) GetSchema(schemaID string) (schemaJSON string, err error)
func (*SchemaStore) GetStoredSchema ¶ added in v0.1.6
func (s *SchemaStore) GetStoredSchema(id string) (string, error)
Click to show internal directories.
Click to hide internal directories.