acapy

package module
v0.0.0-...-2207c83 Latest Latest
Warning

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

Go to latest
Published: Nov 29, 2022 License: MIT Imports: 12 Imported by: 1

README

go-acapy-client

A library for interacting with ACA-py in Go.

Context

You can create your own Self-Sovereign Identity solution using the Hyperledger Ursa, Indy, Aries stack. Learn more about the background by watching these videos:

To become an Aries developer, attend these courses by the Linux Foundation on edx.org:

Installation

$ go get -u github.com/ldej/go-acapy-client

Compatibility

Both ACA-py and go-acapy-client are under active development and might be incompatible. Currently go-acapy-client supports v0.6.0-pre of ACA-py.

Development

Start a local Indy ledger network VON-network. Make a checkout of github.com/bcgov/von-network. Then run:

./manage start --logs

This starts 4 Indy nodes and a von-webserver. The von-webserver has a web interface at localhost:9000 which allows you to browse the transactions in the blockchain.

Start a Tails server for the revocation registry tails files: Make a checkout of github.com/bcgov/indy-tails-server. Then run:

./docker/manage start

Start an Aries-Cloud-Agent-Python (ACA-py) instance and configure the right command line parameters. Read about ACA-py and the command line parameters on my blog:

Examples

Create a client, register a DID in the ledger and create an invitation.

package main

import "github.com/ldej/go-acapy-client"

func main() {
    var ledgerURL = "http://localhost:9000"
    var acapyURL = "http://localhost:8000"
    client := acapy.NewClient(acapyURL)
    
    didResponse, err := acapy.RegisterDID(ledgerURL, "Alice", "000000000000000000000000MySeed01", acapy.Endorser)
    if err != nil {
    	// handle error
    }

    // Start aca-py with registered DID
    
    invitation, err := client.CreateInvitation("Bob", false, false, false)
    if err != nil {
        // handle error
    }
}

Examples can be found in the examples folder.

Implemented Endpoints

Action Menu

{id} = connection identifier

Function Name Method Endpoint Implemented
- POST /action-menu/{id}/close
- POST /action-menu/{id}/fetch
- POST /action-menu/{id}/perform
- POST /action-menu/{id}/request
- POST /action-menu/{id}/send-menu
Basic Message

{id} = connection identifier

Function Name Method Endpoint Implemented
SendBasicMessage POST /connections/{id}/send-message
Connection

{id} = connection identifier

{ref_id} = inbound connection identifier

Function Name Method Endpoint Implemented
QueryConnections GET /connections
CreateInvitation POST /connections/create-invitation
- POST /connections/create-static
ReceiveInvitation POST /connections/receive-invitation
GetConnection GET /connections/{id}
RemoveConnection DELETE /connections/{id}
AcceptInvitation POST /connections/{id}/accept-invitation
AcceptRequest POST /connections/{id}/accept-request
- POST /connections/{id}/establish-inbound/{ref_id}
- GET /connections/{id}/metadata
- POST /connections/{id}/metadata
Credential Definitions

{id} = credential definition identifier

Function Name Method Endpoint Implemented
CreateCredentialDefinitions POST /credential-definitions
QueryCredentialDefinitions GET /credential-definitions/created
GetCredentialDefinition GET /credential-definitions/{id}
Credentials

{id} = credential identifier, also known as referent

Function Name Method Endpoint Implemented
CredentialMimeTypes GET /credential/mime-types/{id}
IsCredentialRevoked GET /credential/revoked/{id}
GetCredential GET /credential/{id}
RemoveCredential DELETE /credential/{id}
GetCredentials GET /credentials
DID Exchange

{id} = connection identifier

Function Name Method Endpoint Implemented
DIDExchangeAcceptInvitation POST /didexchange/{id}/accept-invitation
DIDExchangeAcceptRequest POST /didexchange/{id}/accept-request
Introduction

{id} = connection identifier

Function Name Method Endpoint Implemented
- POST /connections/{id}/start-introduction
Issue Credentials (Credential Exchange v1.0)

{id} = credential exchange identifier

Function Name Method Endpoint Implemented
CreateCredentialExchange POST /issue-credential/create
QueryCredentialExchange GET /issue-credential/records
GetCredentialExchange GET /issue-credential/records/{id}
RemoveCredentialExchange DELETE /issue-credential/records/{id}
IssueCredentialByID POST /issue-credential/records/{id}/issue
ReportCredentialExchangeProblem POST /issue-credential/records/{id}/problem-report
SendCredentialOfferByID POST /issue-credential/records/{id}/send-offer
SendCredentialRequestByID POST /issue-credential/records/{id}/send-request
StoreReceivedCredential POST /issue-credential/records/{id}/store
SendCredential POST /issue-credential/send
SendCredentialOffer POST /issue-credential/send-offer
SendCredentialProposal POST /issue-credential/send-proposal
Issue Credentials (Credential Exchange v2.0)

{id} = credential exchange identifier

Function Name Method Endpoint Implemented
CreateCredentialExchangeV2 POST /issue-credential-2.0/create
QueryCredentialExchangeV2 GET /issue-credential-2.0/records
GetCredentialExchangeV2 GET /issue-credential-2.0/records/{id}
RemoveCredentialExchangeV2 DELETE /issue-credential-2.0/records/{id}
IssueCredentialByIDV2 POST /issue-credential-2.0/records/{id}/issue
ReportCredentialExchangeProblemV2 POST /issue-credential-2.0/records/{id}/problem-report
SendCredentialOfferByIDV2 POST /issue-credential-2.0/records/{id}/send-offer
SendCredentialRequestByIDV2 POST /issue-credential-2.0/records/{id}/send-request
StoreReceivedCredentialV2 POST /issue-credential-2.0/records/{id}/store
SendCredentialV2 POST /issue-credential-2.0/send
SendCredentialOfferV2 POST /issue-credential-2.0/send-offer
SendCredentialProposalV2 POST /issue-credential-2.0/send-proposal
Ledger
Function Name Method Endpoint Implemented
GetDIDEndpointFromLedger GET /ledger/did-endpoint
GetDIDVerkeyFromLedger GET /ledger/did-verkey
GetDIDRoleFromLedger GET /ledger/get-nym-role
- POST /ledger/register-nym
- PATCH /ledger/rotate-public-did-keypair
- GET /ledger/taa
- POST /ledger/taa/accept
Mediation

{id} = connection identifier

{mid} = mediation identifier

Function Name Method Endpoint Implemented
- GET /mediation/default-mediator
- DELETE /mediation/default-mediator
- GET /mediation/keylists
- POST /mediation/keylists/{mid}/send-keylist-query
- POST /mediation/keylists{mid}/send-keylist-update
- POST /mediation/request/{id}
- GET /mediation/requests
- GET /mediation/requests/{mid}
DELETE /mediation/requests/{mid}
- POST /mediation/requests/{mid}/deny
- POST /mediation/requests/{mid}/grant
- PUT /mediation/{mid}/default-mediator
Out-of-Band
Function Name Method Endpoint Implemented
CreateOutOfBandInvitation POST /out-of-band/create-invitation
ReceiveOutOfBandInvitation POST /out-of-band/receive-invitation
Present Proof

{id} = presentation exchange identifier

Function Name Method Endpoint Implemented
CreatePresentationRequest POST /present-proof/create-request
QueryPresentationExchange GET /present-proof/records
GetPresentationExchangeByID GET /present-proof/records/{id}
RemovePresentationExchangeByID DELETE /present-proof/records/{id}
GetPresentationCredentialsByID GET /present-proof/records/{id}/credentials
SendPresentationRequestByID POST /present-proof/records/{id}/send-request
SendPresentationByID POST /present-proof/records/{id}/send-presentation
VerifyPresentationByID POST /present-proof/records/{id}/verify-presentation
SendPresentationProposal POST /present-proof/send-proposal
SendPresentationRequest POST /present-proof/send-request
Revocation

{id} = revocation registry identifier, {cred_def_id} = credential definition identifier

Function Name Method Endpoint Implemented
GetActiveRevocationRegistry GET /revocation/active-registry/{cred_def_id}
ClearPendingRevocations POST /revocation/clear-pending-revocations
CreateRevocationRegistry POST /revocation/create-registry
GetCredentialRevocationStatus GET /revocation/credential-record
PublishRevocations POST /revocation/publish-revocations
QueryRevocationRegistries GET /revocation/registries/created
GetRevocationRegistry GET /revocation/registry/{id}
UpdateRevocationRegistryTailsURI PATCH /revocation/registry/{id}
PublishRevocationRegistryDefinition POST /revocation/registry/{id}/definition
PublishRevocationRegistryEntry POST /revocation/registry/{id}/entry
GetNumberOfIssuedCredentials GET /revocation/registry/{id}/issued
SetRevocationRegistryState PATCH /revocation/registry/{id}/set-state
UploadRegistryTailsFile PUT /revocation/registry/{id}/tails-file
DownloadRegistryTailsFile GET /revocation/registry/{id}/tails-file
RevokeIssuedCredential POST /revocation/revoke
Schema

{id} = schema identifier

Function Name Method Endpoint Implemented
RegisterSchema POST /schemas
QuerySchemas GET /schemas/created
GetSchema GET /schemas/{id}
Server
Function Name Method Endpoint Implemented
Features GET /features
Plugins GET /plugins
Shutdown GET /shutdown
Status GET /status
IsAlive GET /status/live
IsReady GET /status/ready
ResetStatistics POST /status/reset
Trust ping
Function Name Method Endpoint Implemented
SendPing POST /connections/{id}/send-ping
Wallet
Function Name Method Endpoint Implemented
QueryDIDs GET /wallet/did
CreateLocalDID POST /wallet/did/create
RotateKeypair PATCH /wallet/did/local/rotate-keypair
GetPublicDID GET /wallet/did/public
SetPublicDID POST /wallet/did/public
GetDIDEndpointFromWallet GET /wallet/get-public-did
SetDIDEndpointInWallet POST /wallet/set-public-did
JSON-LD (unlisted in Swagger)
Function Name Method Endpoint Implemented
SignJSONLD GET /jsonld/sign
VerifyJSONLD GET /jsonld/verify

Webhooks

When an event occurs in ACA-py, for example a connection request has been received, a webhook is called on your controller on a certain topic. go-acapy-client provides a webhook handler where you can register your own functions to handle these events. Based on an event happening you can update your UI or inform the user about the event.

Read more about ACA-py webhooks on my blog.

func main() {
    r := mux.NewRouter()
	webhookHandler := acapy.CreateWebhooksHandler(acapy.WebhookHandlers{
		ConnectionsEventHandler:            ConnectionsEventHandler,
		BasicMessagesEventHandler:          BasicMessagesEventHandler,
		ProblemReportEventHandler:          ProblemReportEventHandler,
		CredentialExchangeEventHandler:     CredentialExchangeEventHandler,
		CredentialExchangeV2EventHandler:   CredentialExchangeV2EventHandler,
		CredentialExchangeDIFEventHandler:  CredentialExchangeDIFEventHandler,
		CredentialExchangeIndyEventHandler: CredentialExchangeIndyEventHandler,
		RevocationRegistryEventHandler:     RevocationRegistryEventHandler,
		PresentationExchangeEventHandler:   PresentationExchangeEventHandler,
		CredentialRevocationEventHandler:   CredentialRevocationEventHandler,
		PingEventHandler:                   PingEventHandler,
		OutOfBandEventHandler:              OutOfBandEventHandler,
	})
    
    r.HandleFunc("/webhooks/topic/{topic}/", webhookHandler).Methods(http.MethodPost)
    
    // and so on
}

func ConnectionsEventHandler(event acapy.ConnectionsEvent) {
    fmt.Printf("\n -> Connection %q (%s), update to state %q rfc23 state %q\n", event.Alias, event.ConnectionID, event.State, event.RFC23State)
}

func BasicMessagesEventHandler(event acapy.BasicMessagesEvent) {
    fmt.Printf("\n -> Received message on connection %s: %s\n", event.ConnectionID, event.Content)
}

func ProblemReportEventHandler(event acapy.ProblemReportEvent) {
    fmt.Printf("\n -> Received problem report: %+v\n", event)
}

func CredentialExchangeEventHandler(event acapy.CredentialExchange) {
    fmt.Printf("\n -> Credential Exchange update: %s - %s\n", event.CredentialExchangeID, event.State)
}

func CredentialExchangeV2EventHandler(event acapy.CredentialExchangeRecordV2) {
	fmt.Printf("\n -> Credential Exchange V2 update: %s - %s\n", event.CredentialExchangeID, event.State)
}

func CredentialExchangeDIFEventHandler(event acapy.CredentialExchangeDIF) {
	fmt.Printf("\n -> Credential Exchange DIF Event: %s - %s", event.CredentialExchangeID, event.State)
}

func CredentialExchangeIndyEventHandler(event acapy.CredentialExchangeIndy) {
	fmt.Printf("\n -> Credential Exchange Indy Event: %s - %s", event.CredentialExchangeID, event.CredentialExchangeIndyID)
}

func RevocationRegistryEventHandler(event acapy.RevocationRegistry) {
    fmt.Printf("\n -> Revocation Registry update: %s - %s\n", event.RevocationRegistryID, event.State)
}

func PresentationExchangeEventHandler(event acapy.PresentationExchange) {
    fmt.Printf("\n -> Presentation Exchange update: %s - %s\n", event.PresentationExchangeID, event.State)
}

func CredentialRevocationEventHandler(event acapy.IssuerCredentialRevocationEvent) {
    fmt.Printf("\n -> Issuer Credential Revocation: %s - %s - %s\n", event.CredentialExchangeID, event.RecordID, event.State)
}

func PingEventHandler(event acapy.PingEvent) {
    fmt.Printf("\n -> Ping Event: %q state: %q responded: %t\n", event.ConnectionID, event.State, event.Responded)
}

func OutOfBandEventHandler(event acapy.OutOfBandEvent) {
    fmt.Printf("\n -> Out of Band Event: %q state %q\n", event.InvitationID, event.State)
}

You are free to choose the URL for your webhooks. Don't forget to set the command-line parameter for ACA-py: --webhook-url http://localhost:{port}/webhooks. The URL you provide to ACA-py is the base URL which will be extended with /topic/{topic} by default. So whatever URL you choose, make sure that:

  • if the --webhook-url is http://myhost:{port}/webhooks
  • then the webhooks handler should listen on http://myhost:{port}/webhooks/topic/{topic}

The acapy.WebhookHandler is web framework agnostic and reads the topic from the URL by itself. The handler returned by acapy.WebhookHandler has the standard handler signature func (w http.ResponseWriter, r *http.Request) {}.

TODO

  • godoc
  • Proper error handling
  • Admin API Key
  • Tracing via global config
  • Automation of steps via global config
  • Payment decorators https://github.com/hyperledger/aries-rfcs/tree/master/features/0075-payment-decorators
  • Constructors for JSON-LD types
  • Add types for roles, states, predicates
  • Allow for a connection-less credential exchange
  • Allow for a connection-less proof by making a QR code of a payload below. The base64 payload is the result of your call to /present-proof/create-request.
{
    "@id": "3b67c4bf-3953-4ace-94ef-28e0969288c5",
    "@type": "did:sov:BzCbsNYhMrjHiqZDTUASHg;spec/present-proof/1.0/request-presentation",
    "request_presentations~attach": [
        {
            "@id": "libindy-request-presentation-0",
            "mime-type": "application/json",
            "data": {
                "base64": "eyJuYW1lIjoiQ29udGFjdCBBZGRyZXNzIiwidmVyc2lvbiI6IjEuMC4wIiwibm9uY2UiOiIzOTIyNTEwMjk1NjY5MzcxNDIxNTIzMDgiLCJyZXF1ZXN0ZWRfYXR0cmlidXRlcyI6eyJHaXZlbiBOYW1lcyI6eyJuYW1lIjoiZ2l2ZW5fbmFtZXMiLCJyZXN0cmljdGlvbnMiOlt7InNjaGVtYV9pc3N1ZXJfZGlkIjoiODU0NTlHeGpOeVNKOEh3VFRRNHZxNyIsInNjaGVtYV9uYW1lIjoidmVyaWZpZWRfcGVyc29uIiwic2NoZW1hX3ZlcnNpb24iOiIxLjQuMCJ9LHsic2NoZW1hX25hbWUiOiJ1bnZlcmlmaWVkX3BlcnNvbiIsInNjaGVtYV92ZXJzaW9uIjoiMC4xLjAiLCJpc3N1ZXJfZGlkIjoiOFlxN0VoS0JNdWpoMjVOa0xHR2IydCJ9XX0sIkZhbWlseSBOYW1lIjp7Im5hbWUiOiJmYW1pbHlfbmFtZSIsInJlc3RyaWN0aW9ucyI6W3sic2NoZW1hX2lzc3Vlcl9kaWQiOiI4NTQ1OUd4ak55U0o4SHdUVFE0dnE3Iiwic2NoZW1hX25hbWUiOiJ2ZXJpZmllZF9wZXJzb24iLCJzY2hlbWFfdmVyc2lvbiI6IjEuNC4wIn0seyJzY2hlbWFfbmFtZSI6InVudmVyaWZpZWRfcGVyc29uIiwic2NoZW1hX3ZlcnNpb24iOiIwLjEuMCIsImlzc3Vlcl9kaWQiOiI4WXE3RWhLQk11amgyNU5rTEdHYjJ0In1dfSwiRGF0ZSBvZiBCaXJ0aCI6eyJuYW1lIjoiYmlydGhkYXRlIiwicmVzdHJpY3Rpb25zIjpbeyJzY2hlbWFfaXNzdWVyX2RpZCI6Ijg1NDU5R3hqTnlTSjhId1RUUTR2cTciLCJzY2hlbWFfbmFtZSI6InZlcmlmaWVkX3BlcnNvbiIsInNjaGVtYV92ZXJzaW9uIjoiMS40LjAifSx7InNjaGVtYV9uYW1lIjoidW52ZXJpZmllZF9wZXJzb24iLCJzY2hlbWFfdmVyc2lvbiI6IjAuMS4wIiwiaXNzdWVyX2RpZCI6IjhZcTdFaEtCTXVqaDI1TmtMR0diMnQifV19LCJTdHJlZXQgQWRkcmVzcyI6eyJuYW1lIjoic3RyZWV0X2FkZHJlc3MiLCJyZXN0cmljdGlvbnMiOlt7InNjaGVtYV9pc3N1ZXJfZGlkIjoiODU0NTlHeGpOeVNKOEh3VFRRNHZxNyIsInNjaGVtYV9uYW1lIjoidmVyaWZpZWRfcGVyc29uIiwic2NoZW1hX3ZlcnNpb24iOiIxLjQuMCJ9LHsic2NoZW1hX25hbWUiOiJ1bnZlcmlmaWVkX3BlcnNvbiIsInNjaGVtYV92ZXJzaW9uIjoiMC4xLjAiLCJpc3N1ZXJfZGlkIjoiOFlxN0VoS0JNdWpoMjVOa0xHR2IydCJ9XX0sIlBvc3RhbCBDb2RlIjp7Im5hbWUiOiJwb3N0YWxfY29kZSIsInJlc3RyaWN0aW9ucyI6W3sic2NoZW1hX2lzc3Vlcl9kaWQiOiI4NTQ1OUd4ak55U0o4SHdUVFE0dnE3Iiwic2NoZW1hX25hbWUiOiJ2ZXJpZmllZF9wZXJzb24iLCJzY2hlbWFfdmVyc2lvbiI6IjEuNC4wIn0seyJzY2hlbWFfbmFtZSI6InVudmVyaWZpZWRfcGVyc29uIiwic2NoZW1hX3ZlcnNpb24iOiIwLjEuMCIsImlzc3Vlcl9kaWQiOiI4WXE3RWhLQk11amgyNU5rTEdHYjJ0In1dfSwiQ2l0eSI6eyJuYW1lIjoibG9jYWxpdHkiLCJyZXN0cmljdGlvbnMiOlt7InNjaGVtYV9pc3N1ZXJfZGlkIjoiODU0NTlHeGpOeVNKOEh3VFRRNHZxNyIsInNjaGVtYV9uYW1lIjoidmVyaWZpZWRfcGVyc29uIiwic2NoZW1hX3ZlcnNpb24iOiIxLjQuMCJ9LHsic2NoZW1hX25hbWUiOiJ1bnZlcmlmaWVkX3BlcnNvbiIsInNjaGVtYV92ZXJzaW9uIjoiMC4xLjAiLCJpc3N1ZXJfZGlkIjoiOFlxN0VoS0JNdWpoMjVOa0xHR2IydCJ9XX0sIlByb3ZpbmNlIjp7Im5hbWUiOiJyZWdpb24iLCJyZXN0cmljdGlvbnMiOlt7InNjaGVtYV9pc3N1ZXJfZGlkIjoiODU0NTlHeGpOeVNKOEh3VFRRNHZxNyIsInNjaGVtYV9uYW1lIjoidmVyaWZpZWRfcGVyc29uIiwic2NoZW1hX3ZlcnNpb24iOiIxLjQuMCJ9LHsic2NoZW1hX25hbWUiOiJ1bnZlcmlmaWVkX3BlcnNvbiIsInNjaGVtYV92ZXJzaW9uIjoiMC4xLjAiLCJpc3N1ZXJfZGlkIjoiOFlxN0VoS0JNdWpoMjVOa0xHR2IydCJ9XX0sIkNvdW50cnkiOnsibmFtZSI6ImNvdW50cnkiLCJyZXN0cmljdGlvbnMiOlt7InNjaGVtYV9pc3N1ZXJfZGlkIjoiODU0NTlHeGpOeVNKOEh3VFRRNHZxNyIsInNjaGVtYV9uYW1lIjoidmVyaWZpZWRfcGVyc29uIiwic2NoZW1hX3ZlcnNpb24iOiIxLjQuMCJ9LHsic2NoZW1hX25hbWUiOiJ1bnZlcmlmaWVkX3BlcnNvbiIsInNjaGVtYV92ZXJzaW9uIjoiMC4xLjAiLCJpc3N1ZXJfZGlkIjoiOFlxN0VoS0JNdWpoMjVOa0xHR2IydCJ9XX19LCJyZXF1ZXN0ZWRfcHJlZGljYXRlcyI6e319"
            }
        }
    ],
    "comment": null,
    "~service": {
        "recipientKeys": [
            "F2fFPEXABoPKt8mYjNAavBwbsmQKYqNTcv3HKqBgqpLw"
        ],
        "routingKeys": null,
        "serviceEndpoint": "https://my-url.test.org"
    }
}

Documentation

Index

Constants

View Source
const DIDExchangeV1 = "did:sov:BzCbsNYhMrjHiqZDTUASHg;spec/didexchange/1.0"

Variables

View Source
var DefaultHandshakeProtocols = []string{DIDExchangeV1}
View Source
var ErrInvalidSchemaID = errors.New("invalid schema ID")

Functions

func CreateWebhooksHandler

func CreateWebhooksHandler(handlers WebhookHandlers) func(w http.ResponseWriter, r *http.Request)

func SchemaIDToParts

func SchemaIDToParts(schemaID string) (string, string, string, string, error)

SchemaIDToParts takes a schemaID, for example 6qnvgJtqwK44D8LFYnV5Yf:2:registration.dflow:1.0.0 and returns the schema's issuer DID, the `ver`, the schema name and the schema version.

Types

type AccumKey

type AccumKey struct {
	Z string `json:"z"`
}

type AttachDecorator

type AttachDecorator struct {
	ID       string `json:"@id"`
	MimeType string `json:"mime-type"`
	Data     struct {
		Base64 string `json:"base64"`
	} `json:"data"`
}

type Attachment

type Attachment struct {
	ID   string `json:"id"`   // either CredentialExchangeID or PresentationExchangeID
	Type string `json:"type"` // either credential-offer or present-proof
}

type BasicMessagesEvent

type BasicMessagesEvent struct {
	ConnectionID string `json:"connection_id"`
	MessageID    string `json:"message_id"`
	State        string `json:"state"`
	Content      string `json:"content"`
}

type Client

type Client struct {
	HTTPClient http.Client
	// contains filtered or unexported fields
}

func NewClient

func NewClient(acapyURL string) *Client

func (*Client) AcceptInvitation

func (c *Client) AcceptInvitation(connectionID string) (Connection, error)

func (*Client) AcceptRequest

func (c *Client) AcceptRequest(connectionID string) (Connection, error)

func (*Client) AutoRespondCredentialOffer

func (c *Client) AutoRespondCredentialOffer() *Client

func (*Client) ClearPendingRevocations

func (c *Client) ClearPendingRevocations(revocations PendingRevocations) (PendingRevocations, error)

ClearPendingRevocations Pass nil in case you want to clear all pending revocations

func (*Client) CounterOfferCredentialByID

func (c *Client) CounterOfferCredentialByID(
	credentialExchangeID string,
	credentialDefinitionID string,
	credentialPreview CredentialPreview,
	issuerDID string,
	schemaID string,
	schemaIssuerDID string,
	schemaName string,
	schemaVersion string,
	comment string,
) (CredentialExchangeRecord, error)

CounterOfferCredentialByID sends an count offer to the holder based on a previously received proposal

func (*Client) CreateCredentialDefinition

func (c *Client) CreateCredentialDefinition(tag string, supportRevocation bool, revocationRegistrySize int, schemaID string) (string, error)

func (*Client) CreateCredentialExchangeRecord

func (c *Client) CreateCredentialExchangeRecord(request CreateCredentialExchangeRecordRequest) (CredentialExchangeRecord, error)

func (*Client) CreateCredentialExchangeRecordV2

func (c *Client) CreateCredentialExchangeRecordV2(
	credentialPreview CredentialPreviewV2,
	credentialDefinitionID string,
	issuerDID string,
	schemaID string,
	comment string,
) (CredentialExchangeRecordResult, error)

func (*Client) CreateInvitation

func (c *Client) CreateInvitation(alias string, autoAccept bool, multiUse bool, public bool) (CreateInvitationResponse, error)

func (*Client) CreateLocalDID

func (c *Client) CreateLocalDID() (DID, error)

func (*Client) CreateOutOfBandCredential

func (c *Client) CreateOutOfBandCredential(request CreateCredentialExchangeRecordRequest) (OutOfBandCredential, error)

func (*Client) CreateOutOfBandInvitation

func (c *Client) CreateOutOfBandInvitation(request CreateOutOfBandInvitationRequest, autoAccept bool, multiUse bool) (OutOfBandInvitationResponse, error)

func (*Client) CreatePresentationRequest

func (c *Client) CreatePresentationRequest(request PresentationRequestRequest) (PresentationExchangeRecord, error)

func (*Client) CreateRevocationRegistry

func (c *Client) CreateRevocationRegistry(credentialDefinitionID string, maxCredNum int) (RevocationRegistry, error)

func (*Client) CredentialMimeTypes

func (c *Client) CredentialMimeTypes(credentialID string) (map[string]string, error)

func (*Client) DIDExchangeAcceptInvitation

func (c *Client) DIDExchangeAcceptInvitation(connectionID string, myEndpoint string, myLabel string) (Connection, error)

func (*Client) DIDExchangeAcceptRequest

func (c *Client) DIDExchangeAcceptRequest(connectionID string, myEndpoint string) (Connection, error)

func (*Client) DIDExchangeCreateRequest

func (c *Client) DIDExchangeCreateRequest(theirPublicDID string, mediationID string, myEndpoint string, myLabel string) (Connection, error)

>>>>> dr.jhyun ------------------------------------------------------------------------------------------------------

func (*Client) DisableTracing

func (c *Client) DisableTracing() *Client

func (*Client) DownloadRegistryTailsFile

func (c *Client) DownloadRegistryTailsFile(revocationRegistryID string) ([]byte, error)

func (*Client) EnableTracing

func (c *Client) EnableTracing() *Client

func (*Client) Features

func (c *Client) Features() ([]string, error)

func (*Client) FindMatchingCredentials

func (c *Client) FindMatchingCredentials(request PresentationRequest) (
	map[string]PresentationProofAttribute,
	map[string]PresentationProofPredicate,
	error,
)

func (*Client) GetActiveRevocationRegistry

func (c *Client) GetActiveRevocationRegistry(credentialDefinitionID string) (RevocationRegistry, error)

func (*Client) GetConnection

func (c *Client) GetConnection(connectionID string) (Connection, error)

func (*Client) GetCredential

func (c *Client) GetCredential(credentialID string) (Credential, error)

func (*Client) GetCredentialDefinition

func (c *Client) GetCredentialDefinition(credentialDefinitionID string) (CredentialDefinition, error)

func (*Client) GetCredentialExchange

func (c *Client) GetCredentialExchange(credentialExchangeID string) (CredentialExchangeRecord, error)

func (*Client) GetCredentialExchangeV2

func (c *Client) GetCredentialExchangeV2(credentialExchangeID string) (CredentialExchangeRecordResult, error)

func (*Client) GetCredentialRevocationStatus

func (c *Client) GetCredentialRevocationStatus(credentialExchangeID string, credentialRevocationID string, revocationRegistryID string) (CredentialRevocationRecord, error)

func (*Client) GetDIDEndpointFromLedger

func (c *Client) GetDIDEndpointFromLedger(did string, endpointType string) (string, error)

available endpoint types: Endpoint, Profile, LinkedDomains

func (*Client) GetDIDEndpointFromWallet

func (c *Client) GetDIDEndpointFromWallet(did string) (string, error)

func (*Client) GetDIDRoleFromLedger

func (c *Client) GetDIDRoleFromLedger(did string) (string, error)

Use DID instead of NYM, as NYM is outdated

func (*Client) GetDIDVerkeyFromLedger

func (c *Client) GetDIDVerkeyFromLedger(did string) (string, error)

func (*Client) GetNumberOfIssuedCredentials

func (c *Client) GetNumberOfIssuedCredentials(revocationRegistryID string) (int, error)

func (*Client) GetPresentationCredentialsByID

func (c *Client) GetPresentationCredentialsByID(presentationExchangeID string, count int, wql string, proofRequestReferents []string, start int) ([]PresentationCredential, error)

func (*Client) GetPresentationExchangeByID

func (c *Client) GetPresentationExchangeByID(presentationExchangeID string) (PresentationExchangeRecord, error)

func (*Client) GetPublicDID

func (c *Client) GetPublicDID() (DID, error)

func (*Client) GetRevocationRegistry

func (c *Client) GetRevocationRegistry(revocationRegistryID string) (RevocationRegistry, error)

func (*Client) GetSchema

func (c *Client) GetSchema(schemaID string) (Schema, error)

func (*Client) IsAlive

func (c *Client) IsAlive() (bool, error)

func (*Client) IsCredentialRevoked

func (c *Client) IsCredentialRevoked(credentialID string) (bool, error)

TODO from/to query params

func (*Client) IsReady

func (c *Client) IsReady() (bool, error)

func (*Client) IssueCredential

func (c *Client) IssueCredential(
	connectionID string,
	credentialPreview CredentialPreview,
	comment string,
	credentialDefinitionID string,
	issuerDID string,
	schemaID string,
) (CredentialExchangeRecord, error)

IssueCredential issues a credential to the holder

func (*Client) IssueCredentialByID

func (c *Client) IssueCredentialByID(credentialExchangeID string, comment string) (CredentialExchangeRecord, error)

IssueCredentialByID issues a credential to the holder based on a previously received request

func (*Client) IssueCredentialByIDV2

func (c *Client) IssueCredentialByIDV2(credentialExchangeID string, comment string) (CredentialExchangeRecordResult, error)

IssueCredentialByID issues a credential to the holder based on a previously received request

func (*Client) IssueCredentialV2

func (c *Client) IssueCredentialV2(
	connectionID string,
	credentialPreview CredentialPreviewV2,
	comment string,
	credentialDefinitionID string,
	issuerDID string,
	schemaID string,
) (CredentialExchangeRecordResult, error)

IssueCredential issues a credential to the holder

func (*Client) OfferCredential

func (c *Client) OfferCredential(
	connectionID string,
	credentialPreview CredentialPreview,
	credentialDefinitionID string,
	comment string,
) (CredentialExchangeRecord, error)

OfferCredential sends to the holder what the issuer can offer TODO support payment decorator

func (*Client) OfferCredentialByID

func (c *Client) OfferCredentialByID(credentialExchangeID string) (CredentialExchangeRecord, error)

OfferCredentialByID sends an offer to the holder based on a previously received proposal

func (*Client) OfferCredentialByIDV2

func (c *Client) OfferCredentialByIDV2(credentialExchangeID string) (CredentialExchangeRecordResult, error)

OfferCredentialByID sends an offer to the holder based on a previously received proposal

func (*Client) OfferCredentialV2

func (c *Client) OfferCredentialV2(
	connectionID string,
	credentialPreview CredentialPreviewV2,
	credentialDefinitionID string,
	comment string,
) (CredentialExchangeRecordResult, error)

OfferCredential sends to the holder what the issuer can offer TODO support payment decorator

func (*Client) Plugins

func (c *Client) Plugins() ([]string, error)

func (*Client) PreserveExchangeRecords

func (c *Client) PreserveExchangeRecords() *Client

func (*Client) ProposeCredential

func (c *Client) ProposeCredential(
	connectionID string,
	credentialPreview CredentialPreview,
	comment string,
	credentialDefinitionID string,
	issuerDID string,
	schemaID string,
) (CredentialExchangeRecord, error)

ProposeCredential tells the issuer what the holder hopes to receive

func (*Client) ProposeCredentialV2

func (c *Client) ProposeCredentialV2(
	connectionID string,
	credentialPreview CredentialPreviewV2,
	comment string,
	credentialDefinitionID string,
	issuerDID string,
	schemaID string,
) (CredentialExchangeRecordResult, error)

ProposeCredential tells the issuer what the holder hopes to receive

func (*Client) PublishRevocationRegistryDefinition

func (c *Client) PublishRevocationRegistryDefinition(revocationRegistryID string) (RevocationRegistry, error)

func (*Client) PublishRevocationRegistryEntry

func (c *Client) PublishRevocationRegistryEntry(revocationRegistryID string) (RevocationRegistry, error)

func (*Client) PublishRevocations

func (c *Client) PublishRevocations(revocations PendingRevocations) error

PublishRevocations Pass nil in case you want to publish all pending revocations

func (*Client) QueryConnections

func (c *Client) QueryConnections(params *QueryConnectionsParams) ([]Connection, error)

func (*Client) QueryCredentialDefinitions

func (c *Client) QueryCredentialDefinitions(params QueryCredentialDefinitionsParams) ([]string, error)

func (*Client) QueryCredentialExchange

func (c *Client) QueryCredentialExchange(params QueryCredentialExchangeParams) ([]CredentialExchangeRecord, error)

func (*Client) QueryCredentialExchangeV2

func (c *Client) QueryCredentialExchangeV2(params QueryCredentialExchangeParamsV2) ([]CredentialExchangeRecordResult, error)

func (*Client) QueryDIDs

func (c *Client) QueryDIDs(params QueryDIDsParams) ([]DID, error)

func (*Client) QueryPresentationExchange

func (c *Client) QueryPresentationExchange(params QueryPresentationExchangeParams) ([]PresentationExchangeRecord, error)

func (*Client) QueryRevocationRegistries

func (c *Client) QueryRevocationRegistries(credentialDefinitionID string, state string) ([]string, error)

func (*Client) QuerySchemas

func (c *Client) QuerySchemas(params QuerySchemasParams) ([]string, error)

func (*Client) ReceiveInvitation

func (c *Client) ReceiveInvitation(invitation Invitation, autoAccept bool) (Connection, error)

func (*Client) ReceiveOutOfBandInvitation

func (c *Client) ReceiveOutOfBandInvitation(invitation OutOfBandInvitation, autoAccept bool) (Connection, error)

func (*Client) RegisterSchema

func (c *Client) RegisterSchema(name string, version string, attributes []string) (Schema, error)

func (*Client) RemoveConnection

func (c *Client) RemoveConnection(connectionID string) error

func (*Client) RemoveCredential

func (c *Client) RemoveCredential(credentialID string) error

func (*Client) RemoveCredentialExchange

func (c *Client) RemoveCredentialExchange(credentialExchangeID string) error

func (*Client) RemoveCredentialExchangeV2

func (c *Client) RemoveCredentialExchangeV2(credentialExchangeID string) error

func (*Client) RemovePresentationExchangeByID

func (c *Client) RemovePresentationExchangeByID(presentationExchangeID string) error

func (*Client) ReportCredentialExchangeProblem

func (c *Client) ReportCredentialExchangeProblem(credentialExchangeID string, message string) error

func (*Client) ReportCredentialExchangeProblemV2

func (c *Client) ReportCredentialExchangeProblemV2(credentialExchangeID string, message string) error

func (*Client) ReportPresentationExchangeProblem

func (c *Client) ReportPresentationExchangeProblem(presentationExchangeID string, message string) error

>>>>> dr.jhyun ------------------------------------------------------------------------------------------------------

func (*Client) RequestCredentialByID

func (c *Client) RequestCredentialByID(credentialExchangeID string) (CredentialExchangeRecord, error)

RequestCredentialByID sends a credential request to the issuer based on a previously received offer

func (*Client) RequestCredentialByIDV2

func (c *Client) RequestCredentialByIDV2(credentialExchangeID string) (CredentialExchangeRecordResult, error)

RequestCredentialByID sends a credential request to the issuer based on a previously received offer

func (*Client) ResetStatistics

func (c *Client) ResetStatistics() error

func (*Client) RevokeIssuedCredential

func (c *Client) RevokeIssuedCredential(credentialExchangeID string, credentialRevocationID string, revocationRegistryID string, publish bool) error

func (*Client) RotateKeypair

func (c *Client) RotateKeypair(did string) error

func (*Client) SendBasicMessage

func (c *Client) SendBasicMessage(connectionID string, message string) error

func (*Client) SendPing

func (c *Client) SendPing(connectionID string) (Thread, error)

Trust Ping

func (*Client) SendPresentationByID

func (c *Client) SendPresentationByID(presentationExchangeID string, proof PresentationProof) (PresentationExchangeRecord, error)

func (*Client) SendPresentationProposal

func (c *Client) SendPresentationProposal(request PresentationProposalRequest) (PresentationExchangeRecord, error)

func (*Client) SendPresentationRequest

func (c *Client) SendPresentationRequest(request PresentationRequestRequest) (PresentationExchangeRecord, error)

func (*Client) SendPresentationRequestByID

func (c *Client) SendPresentationRequestByID(presentationExchangeID string, request PresentationRequestRequest) (PresentationExchangeRecord, error)

func (*Client) SetAPIKey

func (c *Client) SetAPIKey(apiKey string) *Client

func (*Client) SetDIDEndpointInWallet

func (c *Client) SetDIDEndpointInWallet(did string, endpoint string, endpointType string) error

func (*Client) SetPublicDID

func (c *Client) SetPublicDID(did string) (DID, error)

func (*Client) SetRevocationRegistryState

func (c *Client) SetRevocationRegistryState(revocationRegistryID string, state string) (RevocationRegistry, error)

func (*Client) Shutdown

func (c *Client) Shutdown() error

func (*Client) Status

func (c *Client) Status() (Status, error)

func (*Client) StoreCredentialByID

func (c *Client) StoreCredentialByID(credentialExchangeID string, credentialID string) (CredentialExchangeRecord, error)

StoreCredentialByID the holder stores a credential based on a previously received issued credential credentialID is optional: https://github.com/hyperledger/aries-cloudagent-python/issues/594#issuecomment-656113125

func (*Client) StoreCredentialByIDV2

func (c *Client) StoreCredentialByIDV2(credentialExchangeID string, credentialID string) (CredentialExchangeRecordResult, error)

StoreCredentialByID the holder stores a credential based on a previously received issued credential credentialID is optional: https://github.com/hyperledger/aries-cloudagent-python/issues/594#issuecomment-656113125

func (*Client) UpdateRevocationRegistryTailsURI

func (c *Client) UpdateRevocationRegistryTailsURI(revocationRegistryID string, tailsPublicURI string) (RevocationRegistry, error)

func (*Client) UploadRegistryTailsFile

func (c *Client) UploadRegistryTailsFile(revocationRegistryID string) error

func (*Client) VerifyPresentationByID

func (c *Client) VerifyPresentationByID(presentationExchangeID string) (PresentationExchangeRecord, error)

type Connection

type Connection struct {
	Accept              string `json:"accept"` // auto / manual
	Alias               string `json:"alias"`
	ConnectionID        string `json:"connection_id"`
	CreatedAt           string `json:"created_at"`
	ErrorMsg            string `json:"error_msg"`
	InboundConnectionID string `json:"inbound_connection_id"`
	InvitationKey       string `json:"invitation_key"`
	InvitationMode      string `json:"invitation_mode"` // once / multi
	InvitationMessageID string `json:"invitation_msg_id"`
	MyDID               string `json:"my_did"`
	RequestID           string `json:"request_id"`
	RFC23State          string `json:"rfc23_state"`
	RoutingState        string `json:"routing_state"`
	State               string `json:"state"`
	TheirDID            string `json:"their_did"`
	TheirLabel          string `json:"their_label"`
	TheirRole           string `json:"their_role"`
	UpdatedAt           string `json:"updated_at"`
}

type CreateCredentialExchangeRecordRequest

type CreateCredentialExchangeRecordRequest struct {
	CredentialDefinitionID string            `json:"cred_def_id,omitempty"`
	CredentialPreview      CredentialPreview `json:"credential_proposal"` // required
	IssuerDID              string            `json:"issuer_did,omitempty"`
	Comment                string            `json:"comment,omitempty"`
	SchemaID               string            `json:"schema_id,omitempty"`
	SchemaVersion          string            `json:"schema_version,omitempty"`
	SchemaIssuerDID        string            `json:"schema_issuer_did,omitempty"`
	SchemaName             string            `json:"schema_name,omitempty"`

	Trace      bool `json:"trace,omitempty"`
	AutoRemove bool `json:"auto_remove,omitempty"`
}

type CreateInvitationResponse

type CreateInvitationResponse struct {
	ConnectionID  string `json:"connection_id,omitempty"`
	InvitationURL string `json:"invitation_url,omitempty"`
	Invitation    struct {
		Type            string   `json:"@type,omitempty"`
		ID              string   `json:"@id,omitempty"`
		DID             string   `json:"did,omitempty"`
		ImageURL        string   `json:"imageUrl,omitempty"`
		Label           string   `json:"label,omitempty"`
		RecipientKeys   []string `json:"recipientKeys,omitempty"`
		RoutingKeys     []string `json:"routingKeys,omitempty"`
		ServiceEndpoint string   `json:"serviceEndpoint,omitempty"`
	} `json:"invitation,omitempty"`
}

type CreateOutOfBandInvitationRequest

type CreateOutOfBandInvitationRequest struct {
	// When I put something in Attachments it crashes,
	// the CredentialExchangeRecord or PresentationExchangeRecord should probably be in the right state
	Alias              string                 `json:"alias"`
	MyLabel            string                 `json:"my_label"`
	Attachments        []Attachment           `json:"attachments,omitempty"`
	HandshakeProtocols []string               `json:"handshake_protocols"`
	MediationID        string                 `json:"mediation_id,omitempty"`
	Metadata           map[string]interface{} `json:"metadata,omitempty"`
	UsePublicDID       bool                   `json:"use_public_did"`
}

CreateOutOfBandInvitationRequest must have IncludeHandshake true or, Attachments should be filled, or both

type Credential

type Credential struct {
	Referent               string            `json:"referent"` // Also known as CredentialID
	CredentialDefinitionID string            `json:"cred_def_id"`
	CredentialRevokeID     string            `json:"cred_rev_id"`
	SchemaID               string            `json:"schema_id"`
	RevokeRegistryID       string            `json:"rev_reg_id"`
	Attributes             map[string]string `json:"attrs"`
}

type CredentialDefinition

type CredentialDefinition struct {
	Version  string                    `json:"ver"`
	ID       string                    `json:"id"`
	SchemaID string                    `json:"schemaId"`
	Type     string                    `json:"type"`
	Tag      string                    `json:"tag"`
	Value    CredentialDefinitionValue `json:"value"`
}

type CredentialDefinitionValue

type CredentialDefinitionValue struct {
	Primary    Primary    `json:"primary"`
	Revocation Revocation `json:"revocation"`
}

type CredentialExchangeDIF

type CredentialExchangeDIF struct {
	CredentialExchangeDIFID string `json:"cred_ex_dif_id"`
	CreatedAt               string `json:"created_at"`
	CredentialExchangeID    string `json:"cred_ex_id"`
	Item                    string `json:"item"`
	State                   string `json:"state"`
	UpdatedAt               string `json:"updated_at"`
}

type CredentialExchangeIndy

type CredentialExchangeIndy struct {
	CredentialExchangeIndyID  string `json:"cred_ex_indy_id"`
	CreatedAt                 string `json:"created_at"`
	UpdatedAt                 string `json:"updated_at"`
	CredentialExchangeID      string `json:"cred_ex_id"`
	RevocationRegistryID      string `json:"rev_reg_id"`
	CredentialRequestMetadata struct {
		MasterSecretBlindingData struct {
			VPrime  string      `json:"v_prime"`
			VrPrime interface{} `json:"vr_prime"`
		} `json:"master_secret_blinding_data"`
		Nonce            string `json:"nonce"`
		MasterSecretName string `json:"master_secret_name"`
	} `json:"cred_request_metadata"`
}

type CredentialExchangeRecord

type CredentialExchangeRecord struct {
	CredentialExchangeID      string                    `json:"credential_exchange_id"`
	CredentialDefinitionID    string                    `json:"credential_definition_id"`
	ConnectionID              string                    `json:"connection_id"`
	ThreadID                  string                    `json:"thread_id"`
	ParentThreadID            string                    `json:"parent_thread_id"`
	SchemaID                  string                    `json:"schema_id"`
	RevocationID              string                    `json:"revocation_id"`
	RevocationRegistryID      string                    `json:"revoc_reg_id"`
	State                     string                    `json:"state"`
	CredentialOffer           CredentialOffer           `json:"credential_offer"`
	CredentialOfferMap        CredentialOfferMap        `json:"credential_offer_dict"`
	CredentialProposalMap     CredentialProposal        `json:"credential_proposal_dict"`
	CredentialRequest         CredentialRequest         `json:"credential_request"`
	CredentialRequestMetadata CredentialRequestMetadata `json:"credential_request_metadata"`
	Credential                Credential                `json:"credential"`
	RawCredential             RawCredential             `json:"raw_credential"`
	Role                      string                    `json:"role"`
	Initiator                 string                    `json:"initiator"`
	CreatedAt                 string                    `json:"created_at"`
	UpdatedAt                 string                    `json:"updated_at"`
	ErrorMessage              string                    `json:"error_msg"`
	Trace                     bool                      `json:"trace"`
	AutoOffer                 bool                      `json:"auto_offer"`
	AutoIssue                 bool                      `json:"auto_issue"`
	AutoRemove                bool                      `json:"auto_remove"`
}

This thing is so big that it deserves it's own file

type CredentialExchangeRecordResult

type CredentialExchangeRecordResult struct {
	CredentialExchangeRecord CredentialExchangeRecordV2 `json:"cred_ex_record"`
	DIF                      CredentialExchangeDIF      `json:"dif"`
	Indy                     CredentialExchangeIndy     `json:"indy"`
}

type CredentialExchangeRecordV2

type CredentialExchangeRecordV2 struct {
	CredentialExchangeID       string                      `json:"cred_ex_id"`
	CredentialExchangeIDStored string                      `json:"cred_id_stored"`
	ConnectionID               string                      `json:"conn_id"`
	ThreadID                   string                      `json:"thread_id"`
	ParentThreadID             string                      `json:"parent_thread_id"`
	State                      string                      `json:"state"`
	CredentialPreview          CredentialPreviewV2         `json:"cred_preview"`
	CredentialOffer            CredentialOfferV2           `json:"cred_offer"`
	CredentialProposal         CredentialProposalV2        `json:"cred_proposal"`
	CredentialRequest          CredentialRequestV2         `json:"cred_request"`
	CredentialRequestMetadata  CredentialRequestMetadataV2 `json:"cred_request_metadata"`
	CredentialIssue            CredentialIssue             `json:"cred_issue"`
	Role                       string                      `json:"role"`
	Initiator                  string                      `json:"initiator"`
	CreatedAt                  string                      `json:"created_at"`
	UpdatedAt                  string                      `json:"updated_at"`
	ErrorMessage               string                      `json:"error_msg"`
	Trace                      bool                        `json:"trace"`
	AutoOffer                  bool                        `json:"auto_offer"`
	AutoIssue                  bool                        `json:"auto_issue"`
	AutoRemove                 bool                        `json:"auto_remove"`
}

This thing is so big that it deserves it's own file

type CredentialIssue

type CredentialIssue struct {
	Type              string            `json:"@type"` // did:sov:BzCbsNYhMrjHiqZDTUASHg;spec/issue-credential/2.0/issue-credential
	ID                string            `json:"@id"`
	CredentialsAttach []AttachDecorator `json:"credentials~attach"`
	Formats           []Format          `json:"formats"`
	Comment           string            `json:"comment"`
}

type CredentialOffer

type CredentialOffer struct {
	SchemaID               string `json:"schema_id"`
	CredentialDefinitionID string `json:"cred_def_id"`
	KeyCorrectnessProof    struct {
		C     string     `json:"c"`
		XzCap string     `json:"xz_cap"`
		XrCap [][]string `json:"xr_cap"`
	} `json:"key_correctness_proof"`
	Nonce string `json:"nonce"`
}

type CredentialOfferMap

type CredentialOfferMap struct {
	Type              string            `json:"@type"` // did:sov:BzCbsNYhMrjHiqZDTUASHg;spec/issue-credential/1.0/offer-credential
	ID                string            `json:"@id"`
	Thread            Thread            `json:"~thread"`
	CredentialPreview CredentialPreview `json:"credential_preview"`
	Comment           string            `json:"comment"`
	OffersAttach      []OfferAttach     `json:"offers~attach"`
}

type CredentialOfferV2

type CredentialOfferV2 struct {
	Type              string              `json:"@type"` // did:sov:BzCbsNYhMrjHiqZDTUASHg;spec/issue-credential/2.0/offer-credential
	ID                string              `json:"@id"`
	Thread            Thread              `json:"~thread"`
	CredentialPreview CredentialPreviewV2 `json:"credential_preview"`
	OffersAttach      []AttachDecorator   `json:"offers~attach"`
	Formats           []Format            `json:"formats"`
}

type CredentialPreview

type CredentialPreview struct {
	Type       string                       `json:"@type"`
	Attributes []CredentialPreviewAttribute `json:"attributes"`
}

func NewCredentialPreview

func NewCredentialPreview(attributes []CredentialPreviewAttribute) CredentialPreview

type CredentialPreviewAttribute

type CredentialPreviewAttribute struct {
	Name     string `json:"name"`
	MimeType string `json:"mime-type"` // optional
	Value    string `json:"value"`
}

type CredentialPreviewAttributeV2

type CredentialPreviewAttributeV2 struct {
	Name     string `json:"name"`
	MimeType string `json:"mime-type"` // optional
	Value    string `json:"value"`
}

type CredentialPreviewV2

type CredentialPreviewV2 struct {
	Type       string                         `json:"@type"` // did:sov:BzCbsNYhMrjHiqZDTUASHg;spec/issue-credential/2.0/credential-preview
	Attributes []CredentialPreviewAttributeV2 `json:"attributes"`
}

func NewCredentialPreviewV2

func NewCredentialPreviewV2(attributes []CredentialPreviewAttributeV2) CredentialPreviewV2

type CredentialProposal

type CredentialProposal struct {
	ID                     string            `json:"@id"`
	Type                   string            `json:"@type"` // did:sov:BzCbsNYhMrjHiqZDTUASHg;spec/issue-credential/1.0/propose-credential
	CredentialDefinitionID string            `json:"cred_def_id"`
	SchemaID               string            `json:"schema_id"`
	IssuerDID              string            `json:"issuer_did"`
	SchemaName             string            `json:"schema_name"`
	SchemaIssuerDID        string            `json:"schema_issuer_did"`
	SchemaVersion          string            `json:"schema_version"`
	Comment                string            `json:"comment"`
	CredentialPreview      CredentialPreview `json:"credential_proposal"`
}

type CredentialProposalV2

type CredentialProposalV2 struct {
	ID                string              `json:"@id"`
	Type              string              `json:"@type"` // did:sov:BzCbsNYhMrjHiqZDTUASHg;spec/issue-credential/2.0/propose-credential
	FiltersAttach     []FilterAttach      `json:"filters~attach"`
	Comment           string              `json:"comment"`
	CredentialPreview CredentialPreviewV2 `json:"credential_proposal"`
	Formats           []Format            `json:"formats"`
}

type CredentialRequest

type CredentialRequest struct {
	CredentialDefinitionID string `json:"cred_def_id"`
	ProverDID              string `json:"prover_did"`
	BlindedMs              struct {
		U                   string   `json:"u"`
		Ur                  string   `json:"ur"`
		HiddenAttributes    []string `json:"hidden_attributes"`
		CommittedAttributes struct {
		} `json:"committed_attributes"` // TODO
	} `json:"blinded_ms"`
	BlindedMsCorrectnessProof struct {
		C        string `json:"c"`
		VDashCap string `json:"v_dash_cap"`
		MCaps    struct {
			MasterSecret string `json:"master_secret"`
		} `json:"m_caps"`
		RCaps struct {
		} `json:"r_caps"`
	} `json:"blinded_ms_correctness_proof"`
	Nonce string `json:"nonce"`
}

type CredentialRequestMetadata

type CredentialRequestMetadata struct {
	Description string `json:"description"`
}

type CredentialRequestMetadataV2

type CredentialRequestMetadataV2 struct {
	Description string `json:"description"`
}

type CredentialRequestV2

type CredentialRequestV2 struct {
	Type           string            `json:"@type"` // did:sov:BzCbsNYhMrjHiqZDTUASHg;spec/issue-credential/2.0/request-credential
	ID             string            `json:"@id"`
	Thread         Thread            `json:"~thread"`
	RequestsAttach []AttachDecorator `json:"requests~attach"`
	Formats        []Format          `json:"formats"`
}

type CredentialRevocationRecord

type CredentialRevocationRecord struct {
	CreatedAt              string `json:"created_at"`
	UpdatedAt              string `json:"updated_at"`
	CredentialDefinitionID string `json:"cred_def_id"`
	CredentialRevocationID string `json:"cred_rev_id"`
	RecordID               string `json:"record_id"`
	RevocationRegistryID   string `json:"rev_reg_id"`
	CredentialExchangeID   string `json:"cred_ex_id"`
	State                  string `json:"state"` // issued/revoked
}

type DID

type DID struct {
	DID     string `json:"did"`
	VerKey  string `json:"verkey"`
	Posture string `json:"posture"`
	KeyType string `json:"key_type"`
	Method  string `json:"method"`
}

type DIDRole

type DIDRole string
const (
	Endorser       DIDRole = "ENDORSER"
	Steward        DIDRole = "STEWARD"
	Trustee        DIDRole = "TRUSTEE"
	NetworkMonitor DIDRole = "NETWORK_MONITOR"
)

type Filter

type Filter struct {
	DIF  map[string]string `json:"dif"`
	Indy IndyFilter        `json:"indy"`
}

type FilterAttach

type FilterAttach struct {
	ID       string `json:"@id"` // dif or indy
	MimeType string `json:"mime-type"`
	Data     struct {
		Base64 string `json:"base64"`
	} `json:"data"`
}

type Format

type Format struct {
	AttachID string `json:"attach_id"` // dif or indy
	Format   string `json:"format"`    // dif/credential-manifest@v1.0 or hlindy-zkp-v1.0
}

type IndyFilter

type IndyFilter struct {
	CredentialDefinitionID string `json:"cred_def_id,omitempty"`
	IssuerDID              string `json:"issuer_did,omitempty"`
	SchemaID               string `json:"schema_id,omitempty"`
	SchemaName             string `json:"schema_name,omitempty"`
	SchemaVersion          string `json:"schema_version,omitempty"`
	SchemaIssuerDID        string `json:"schema_issuer_did,omitempty"`
}

type Invitation

type Invitation struct {
	ID              string   `json:"@id,omitempty"`
	DID             string   `json:"did,omitempty"`
	ImageURL        string   `json:"imageUrl,omitempty"`
	Label           string   `json:"label,omitempty"`
	RecipientKeys   []string `json:"recipientKeys,omitempty"`
	RoutingKeys     []string `json:"routingKeys,omitempty"`
	ServiceEndpoint string   `json:"serviceEndpoint,omitempty"`
}

type NonRevoked

type NonRevoked struct {
	From int64 `json:"from"`
	To   int64 `json:"to"`
}

type OfferAttach

type OfferAttach struct {
	ID       string `json:"@id"` // libindy-cred-offer-0
	MimeType string `json:"mime-type"`
	Data     struct {
		Base64 string `json:"base64"`
	} `json:"data"`
}

type OutOfBandCredential

type OutOfBandCredential struct {
	ID                string            `json:"@id"`
	Type              string            `json:"@type"`
	Comment           string            `json:"comment"`
	Service           Service           `json:"~service"`
	CredentialPreview CredentialPreview `json:"credential_preview"`
	OffersAttach      []OfferAttach     `json:"offers~attach"`
}

type OutOfBandEvent

type OutOfBandEvent struct {
	InvitationID        string              `json:"invitation_id"`
	InvitationMessageID string              `json:"invi_msg_id"`
	Invitation          OutOfBandInvitation `json:"invitation"`
	State               string              `json:"state"`
	InvitationURL       string              `json:"invitation_url"`
	UpdatedAt           string              `json:"updated_at"`
	CreatedAt           string              `json:"created_at"`
	AutoAccept          bool                `json:"auto_accept"`
	MultiUse            bool                `json:"multi_use"`
	Trace               bool                `json:"trace"`
}

type OutOfBandInvitation

type OutOfBandInvitation struct {
	Type               string    `json:"@type"` // did:sov:BzCbsNYhMrjHiqZDTUASHg;spec/out-of-band/1.0/invitation
	ID                 string    `json:"@id"`
	Label              string    `json:"label"`
	HandshakeProtocols []string  `json:"handshake_protocols"` // did:sov:BzCbsNYhMrjHiqZDTUASHg;spec/didexchange/v1.0
	Service            []Service `json:"service"`
	ServiceBlocks      []Service `json:"service_blocks,omitempty"`
	ServiceDIDs        []string  `json:"service_dids,omitempty"`
}

type OutOfBandInvitationResponse

type OutOfBandInvitationResponse struct {
	AutoAccept          bool                `json:"auto_accept"`
	InvitationMessageID string              `json:"invi_msg_id"`
	UpdatedAt           string              `json:"updated_at"`
	State               string              `json:"state"`
	InvitationID        string              `json:"invitation_id"`
	InvitationURL       string              `json:"invitation_url"`
	Trace               bool                `json:"trace"`
	MultiUse            bool                `json:"multi_use"`
	CreatedAt           string              `json:"created_at"`
	Invitation          OutOfBandInvitation `json:"invitation"`
}

type PendingRevocations

type PendingRevocations map[string][]string

A map from revocation registry identifier to credential revocation identifiers For example:

map[string][]string{
	"6i7GFi2cDx524ZNfxmGWcp:4:6i7GFi2cDx524ZNfxmGWcp:3:CL:165:default:CL_ACCUM:159875bc-a5c7-4d51-b5c0-b4782a01fb94": ["1"].
}

type PingEvent

type PingEvent struct {
	Comment      string `json:"comment"`
	ConnectionID string `json:"connection_id"`
	Responded    bool   `json:"responded"`
	State        string `json:"state"`
	ThreadID     string `json:"thread_id"`
}

type Predicate

type Predicate struct {
	Name                   string        `json:"name"`
	CredentialDefinitionID string        `json:"cred_def_id"`
	Predicate              PredicateType `json:"predicate"`
	Threshold              int           `json:"threshold"`
}

type PredicateType

type PredicateType string
const (
	PredicateLT  PredicateType = "<"
	PredicateLTE PredicateType = "<="
	PredicateGT  PredicateType = ">"
	PredicateGTE PredicateType = ">="
)

type Presentation

type Presentation struct {
	// Proof          Proof          `json:"proof"` // TODO
	RequestedProof RequestedProof `json:"requested_proof"`
	Identifiers    []struct {
		SchemaID               string `json:"schema_id"`
		CredentialDefinitionID string `json:"cred_def_id"`
		RevocationRegistryID   string `json:"rev_reg_id"`
		Timestamp              int    `json:"timestamp"`
	} `json:"identifiers"`
}

type PresentationAttribute

type PresentationAttribute struct {
	Name                   string `json:"name"`
	CredentialDefinitionID string `json:"cred_def_id"`
	MimeType               string `json:"mime-type"`
	Value                  string `json:"value"`
	Referent               string `json:"referent"`
}

type PresentationCredential

type PresentationCredential struct {
	CredentialInfo struct {
		Referent               string            `json:"referent"`
		Attrs                  map[string]string `json:"attrs"`
		SchemaID               string            `json:"schema_id"`
		CredentialDefinitionID string            `json:"cred_def_id"`
		RevocationRegistryID   string            `json:"rev_reg_id"`
		CredentialRevocationID string            `json:"cred_rev_id"`
	} `json:"cred_info"`
	Interval struct {
		From int `json:"from"`
		To   int `json:"to"`
	} `json:"interval"`
	PresentationReferents []string `json:"presentation_referents"`
}

type PresentationExchangeRecord

type PresentationExchangeRecord struct {
	PresentationExchangeID   string                  `json:"presentation_exchange_id"`
	ConnectionID             string                  `json:"connection_id"`
	ThreadID                 string                  `json:"thread_id"`
	State                    string                  `json:"state"`
	Initiator                string                  `json:"initiator"`
	Role                     string                  `json:"role"`
	PresentationProposalDict PresentationProposalMap `json:"presentation_proposal_dict"`
	PresentationRequest      PresentationRequest     `json:"presentation_request"`
	PresentationRequestDict  PresentationRequestMap  `json:"presentation_request_dict"` // TODO ?, modified by dr.jhyun
	Presentation             Presentation            `json:"presentation"`
	Verified                 string                  `json:"verified"`
	CreatedAt                string                  `json:"created_at"`
	UpdatedAt                string                  `json:"updated_at"`
	ErrorMsg                 string                  `json:"error_msg"`
	AutoPresent              bool                    `json:"auto_present"`
	Trace                    bool                    `json:"trace"`
}

type PresentationPreview

type PresentationPreview struct {
	Type       string                  `json:"@type"`
	Attributes []PresentationAttribute `json:"attributes"`
	Predicates []Predicate             `json:"predicates"`
}

func NewPresentationPreview

func NewPresentationPreview(attributes []PresentationAttribute, predicates []Predicate) PresentationPreview

type PresentationProof

type PresentationProof struct {
	RequestedAttributes    map[string]PresentationProofAttribute `json:"requested_attributes"`
	RequestedPredicates    map[string]PresentationProofPredicate `json:"requested_predicates"`
	SelfAttestedAttributes map[string]string                     `json:"self_attested_attributes"`
	Trace                  bool                                  `json:"trace"`
}

func NewPresentationProof

func NewPresentationProof(
	requestedAttributes map[string]PresentationProofAttribute,
	requestedPredicates map[string]PresentationProofPredicate,
	selfAttestedAttributes map[string]string,
) PresentationProof

type PresentationProofAttribute

type PresentationProofAttribute struct {
	Revealed     bool   `json:"revealed"`
	Timestamp    int64  `json:"timestamp"`
	CredentialID string `json:"cred_id"` // referent?
}

type PresentationProofPredicate

type PresentationProofPredicate struct {
	Timestamp    int64  `json:"timestamp"`
	CredentialID string `json:"cred_id"` // referent?
}

type PresentationProposalMap

type PresentationProposalMap struct {
	Type                 string              `json:"@type"` // did:sov:BzCbsNYhMrjHiqZDTUASHg;spec/present-proof/1.0/propose-presentation
	ThreadID             string              `json:"@id"`
	Comment              string              `json:"comment"`
	PresentationProposal PresentationPreview `json:"presentation_proposal"`
}

type PresentationProposalRequest

type PresentationProposalRequest struct {
	Comment             string              `json:"comment"`
	AutoPresent         bool                `json:"auto_present"`
	PresentationPreview PresentationPreview `json:"presentation_proposal"`
	ConnectionID        string              `json:"connection_id"`
	Trace               bool                `json:"trace"`
}

type PresentationRequest

type PresentationRequest struct {
	Name                string                        `json:"name"`
	Version             string                        `json:"version"`
	Nonce               string                        `json:"nonce"`
	RequestedAttributes map[string]RequestedAttribute `json:"requested_attributes"`
	RequestedPredicates map[string]RequestedPredicate `json:"requested_predicates"`
}

type PresentationRequestMap

type PresentationRequestMap struct {
	ThreadID                   string            `json:"@id"`
	Type                       string            `json:"@type"` // did:sov:BzCbsNYhMrjHiqZDTUASHg;spec/present-proof/1.0/propose-presentation
	Comment                    string            `json:"comment"`
	RequestPresentationsAttach []AttachDecorator `json:"request_presentations~attach"`
}

>>>>> dr.jhyun ------------------------------------------------------------------------------------------------------

type PresentationRequestRequest

type PresentationRequestRequest struct {
	Trace        bool         `json:"trace"`
	Comment      string       `json:"comment"`
	ConnectionID string       `json:"connection_id"`
	ProofRequest ProofRequest `json:"proof_request"`
}

type Primary

type Primary struct {
	N     string `json:"n"`
	S     string `json:"s"`
	R     R      `json:"r"`
	Rctxt string `json:"rctxt"`
	Z     string `json:"z"`
}

type ProblemReportEvent

type ProblemReportEvent struct {
	Type   string `json:"@type"`
	ID     string `json:"@id"`
	Thread struct {
		Thid string `json:"thid"`
	} `json:"~thread"`
	ExplainLtxt string `json:"explain-ltxt"`
}

type ProofPredicate

type ProofPredicate struct {
	SubProofIndex int `json:"sub_proof_index"`
}

type ProofRequest

type ProofRequest struct {
	Name                string                        `json:"name"`
	Nonce               string                        `json:"nonce"`                // TODO what is this nonce
	RequestedPredicates map[string]RequestedPredicate `json:"requested_predicates"` // cannot be nil
	RequestedAttributes map[string]RequestedAttribute `json:"requested_attributes"` // cannot be nil
	Version             string                        `json:"version"`
	NonRevoked          *NonRevoked                   `json:"non_revoked,omitempty"`
}

func NewProofRequest

func NewProofRequest(
	name string,
	nonce string,
	requestedPredicates map[string]RequestedPredicate,
	requestedAttributes map[string]RequestedAttribute,
	version string,
	nonRevoked *NonRevoked,
) ProofRequest

type PublicKeys

type PublicKeys struct {
	AccumKey AccumKey `json:"accumKey"`
}

type QueryConnectionsParams

type QueryConnectionsParams struct {

	// Alias of connection invitation
	Alias string `json:"alias,omitempty"`

	// Initiator is Connection invitation initiator
	Initiator string `json:"initiator,omitempty"`

	// Invitation key
	InvitationKey string `json:"invitation_key,omitempty"`

	// MyDID is DID of the agent
	MyDID string `json:"my_did,omitempty"`

	// State of the connection invitation
	State string `json:"state"`

	// TheirDID is other party's DID
	TheirDID string `json:"their_did,omitempty"`

	// TheirRole is other party's role
	TheirRole string `json:"their_role,omitempty"`
}

QueryConnectionsParams model

Parameters for querying connections

type QueryCredentialDefinitionsParams

type QueryCredentialDefinitionsParams struct {
	CredentialDefinitionID string `json:"cred_def_id"`
	IssuerDID              string `json:"issuer_did"`
	SchemaID               string `json:"schema_id"`
	SchemaIssuerDID        string `json:"schema_issuer_did"`
	SchemaName             string `json:"schema_name"`
	SchemaVersion          string `json:"schema_version"`
}

type QueryCredentialExchangeParams

type QueryCredentialExchangeParams struct {
	ConnectionID string `json:"connection_id"`
	Role         string `json:"role"`
	State        string `json:"state"`
	ThreadID     string `json:"thread_id"`
}

type QueryCredentialExchangeParamsV2

type QueryCredentialExchangeParamsV2 struct {
	ConnectionID string `json:"connection_id"`
	Role         string `json:"role"`
	State        string `json:"state"`
	ThreadID     string `json:"thread_id"`
}

type QueryDIDsParams

type QueryDIDsParams DID

type QueryPresentationExchangeParams

type QueryPresentationExchangeParams struct {
	ConnectionID string
	Role         string
	State        string
	ThreadID     string
}

type QuerySchemasParams

type QuerySchemasParams struct {
	SchemaID        string `json:"schema_id"`
	SchemaIssuerDID string `json:"schema_issuer_did"`
	SchemaName      string `json:"schema_name"`
	SchemaVersion   string `json:"schema_version"`
}

type R

type R struct {
	Score        string `json:"score"`
	MasterSecret string `json:"master_secret"`
}

type RawCredential

type RawCredential struct {
	Description string `json:"raw_credential"`
}

type RawEncoded

type RawEncoded struct {
	Raw     string `json:"raw"`
	Encoded string `json:"encoded"`
}

type RegisterDIDResponse

type RegisterDIDResponse struct {
	DID    string `json:"did"`
	Seed   string `json:"seed"`
	Verkey string `json:"verkey"`
}

func RegisterDID

func RegisterDID(ledgerURL string, alias string, seed string, role DIDRole) (RegisterDIDResponse, error)

type RequestedAttribute

type RequestedAttribute struct {
	Restrictions []Restrictions `json:"restrictions"`    // Required when using Names, otherwise empty slice instead of nil
	Name         string         `json:"name,omitempty"`  // XOR with Names
	Names        []string       `json:"names,omitempty"` // XOR with Name | Requires non-empty restrictions
	NonRevoked   NonRevoked     `json:"non_revoked"`     // Optional
}

func NewRequestedAttribute

func NewRequestedAttribute(
	restrictions *Restrictions,
	name string,
	names []string,
	nonRevoked NonRevoked,
) (RequestedAttribute, error)

type RequestedPredicate

type RequestedPredicate struct {
	Restrictions []Restrictions `json:"restrictions"`   // Required when using Names, otherwise empty slice instead of nil
	Name         string         `json:"name,omitempty"` // XOR with Names
	// dr.jhyun
	// Names        []string       `json:"names,omitempty"` // XOR with Name | Requires non-empty restrictions
	PType      PredicateType `json:"p_type"`
	PValue     int           `json:"p_value"`
	NonRevoked NonRevoked    `json:"non_revoked"` // Optional
}

func NewRequestedPredicate

func NewRequestedPredicate(
	restrictions *Restrictions,
	name string,

	ptype PredicateType,
	pvalue int,
	nonRevoked NonRevoked,
) (RequestedPredicate, error)

type RequestedProof

type RequestedProof struct {
	RevealedAttrs      map[string]RevealedAttr      `json:"revealed_attrs"`
	RevealedAttrGroups map[string]RevealedAttrGroup `json:"revealed_attr_groups"`
	SelfAttestedAttrs  struct{}                     `json:"self_attested_attrs"`
	UnrevealedAttrs    struct{}                     `json:"unrevealed_attrs"`
	Predicates         map[string]ProofPredicate    `json:"predicates"`
}

TODO >>>>> dr.jhyun ------------------------------------------------------------------------------------------------------

type Restrictions

type Restrictions struct {
	SchemaVersion          string `json:"schema_version,omitempty"`
	CredentialDefinitionID string `json:"cred_def_id,omitempty"`
	SchemaName             string `json:"schema_name,omitempty"`
	SchemaIssuerDID        string `json:"schema_issuer_did,omitempty"`
	IssuerDID              string `json:"issuer_did,omitempty"`
	SchemaID               string `json:"schema_id,omitempty"`
}

func (Restrictions) IsEmpty

func (r Restrictions) IsEmpty() bool

type RevealedAttr

type RevealedAttr struct {
	SubProofIndex int    `json:"sub_proof_index"`
	Raw           string `json:"raw"`
	Encoded       string `json:"encoded"`
}

type RevealedAttrGroup

type RevealedAttrGroup struct {
	SubProofIndex int                   `json:"sub_proof_index"`
	Values        map[string]RawEncoded `json:"values"`
}

type Revocation

type Revocation struct {
	G      string `json:"g"`
	GDash  string `json:"g_dash"`
	H      string `json:"h"`
	H0     string `json:"h0"`
	H1     string `json:"h1"`
	H2     string `json:"h2"`
	Htilde string `json:"htilde"`
	HCap   string `json:"h_cap"`
	U      string `json:"u"`
	Pk     string `json:"pk"`
	Y      string `json:"y"`
}

type RevocationRegistry

type RevocationRegistry struct {
	UpdatedAt            string                       `json:"updated_at"`
	Type                 string                       `json:"revoc_def_type"`
	PendingPub           []interface{}                `json:"pending_pub"`
	CreatedAt            string                       `json:"created_at"`
	Tag                  string                       `json:"tag"`
	RecordID             string                       `json:"record_id"`
	CredDefID            string                       `json:"cred_def_id"`
	TailsHash            string                       `json:"tails_hash"`
	MaxCredNum           int                          `json:"max_cred_num"`
	State                string                       `json:"state"`
	IssuerDid            string                       `json:"issuer_did"`
	Definition           RevocationRegistryDefinition `json:"revoc_reg_def"`
	TailsLocalPath       string                       `json:"tails_local_path"`
	Entry                RevocationRegistryEntry      `json:"revoc_reg_entry"`
	RevocationRegistryID string                       `json:"revoc_reg_id"`
}

type RevocationRegistryDefinition

type RevocationRegistryDefinition struct {
	Ver          string                            `json:"ver"`
	ID           string                            `json:"id"`
	RevocDefType string                            `json:"revocDefType"`
	Tag          string                            `json:"tag"`
	CredDefID    string                            `json:"credDefId"`
	Value        RevocationRegistryDefinitionValue `json:"value"`
}

type RevocationRegistryDefinitionValue

type RevocationRegistryDefinitionValue struct {
	IssuanceType  string     `json:"issuanceType"`
	MaxCredNum    int        `json:"maxCredNum"`
	PublicKeys    PublicKeys `json:"publicKeys"`
	TailsHash     string     `json:"tailsHash"`
	TailsLocation string     `json:"tailsLocation"`
}

type RevocationRegistryEntry

type RevocationRegistryEntry struct {
	Ver   string                            `json:"ver"`
	Value RevocationRegistryDefinitionValue `json:"value"`
}

type Schema

type Schema struct {
	Ver            string   `json:"ver"`
	ID             string   `json:"id"`
	Name           string   `json:"name"`
	Version        string   `json:"version"`
	AttributeNames []string `json:"attrNames"`
	SeqNo          int      `json:"seqNo"`
}

type Service

type Service struct {
	DID             string   `json:"did,omitempty"`
	ID              string   `json:"id,omitempty"`
	Type            string   `json:"type,omitempty"` // did-communication
	RecipientKeys   []string `json:"recipientKeys,omitempty"`
	RoutingKeys     []string `json:"routingKeys,omitempty"`
	ServiceEndpoint string   `json:"serviceEndpoint,omitempty"`
}

type Status

type Status struct {
	Version   string `json:"version"`
	Label     string `json:"label"`
	Conductor struct {
		InSessions  int `json:"in_sessions"`
		OutEncode   int `json:"out_encode"`
		OutDeliver  int `json:"out_deliver"`
		TaskActive  int `json:"task_active"`
		TaskDone    int `json:"task_done"`
		TaskFailed  int `json:"task_failed"`
		TaskPending int `json:"task_pending"`
	} `json:"conductor"`
}

type Thread

type Thread struct {
	ThreadID string `json:"thread_id"`
}

type Value

type Value struct {
	Accum string `json:"accum"`
}

type WebhookHandlers

type WebhookHandlers struct {
	ConnectionsEventHandler            func(event Connection)
	BasicMessagesEventHandler          func(event BasicMessagesEvent)
	ProblemReportEventHandler          func(event ProblemReportEvent)
	CredentialExchangeEventHandler     func(event CredentialExchangeRecord)
	CredentialExchangeV2EventHandler   func(event CredentialExchangeRecordV2)
	CredentialExchangeDIFEventHandler  func(event CredentialExchangeDIF)
	CredentialExchangeIndyEventHandler func(event CredentialExchangeIndy)
	RevocationRegistryEventHandler     func(event RevocationRegistry)
	PresentationExchangeEventHandler   func(event PresentationExchangeRecord)
	CredentialRevocationEventHandler   func(event CredentialRevocationRecord)
	PingEventHandler                   func(event PingEvent)
	OutOfBandEventHandler              func(event OutOfBandEvent)
}

Jump to

Keyboard shortcuts

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