rest

package
v0.0.0-...-e13654e Latest Latest
Warning

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

Go to latest
Published: Aug 29, 2022 License: AGPL-3.0 Imports: 24 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AcceptOOBRequest

func AcceptOOBRequest(client *resty.Client, invitation json.RawMessage) (connection domain.Connection, err error)

func CreateOOBInvitation

func CreateOOBInvitation(client *resty.Client) (invitation json.RawMessage, err error)

Types

type Holder

type Holder struct {
	// contains filtered or unexported fields
}

func NewHolder

func NewHolder(endpoint string) (*Holder, error)

func (*Holder) AcceptCredential

func (h *Holder) AcceptCredential(piid string, name string) error

func (*Holder) AcceptOOBInvitation

func (h *Holder) AcceptOOBInvitation(invitation json.RawMessage) (err error)

func (*Holder) AcceptOffer

func (h *Holder) AcceptOffer(piid string) error

func (*Holder) AcceptPresentationRequest

func (h *Holder) AcceptPresentationRequest(piid string, presentation domain.Presentation) (err error)

func (*Holder) GetCredentialFromOffer

func (h *Holder) GetCredentialFromOffer(piid string) (credential *domain.Credential, err error)

func (*Holder) GetIssuedCredential

func (h *Holder) GetIssuedCredential(piid string) (credential *domain.Credential, err error)

func (*Holder) SendCredentialRequest

func (h *Holder) SendCredentialRequest(connection domain.Connection, credential domain.Credential) (piid string, err error)

type Issuer

type Issuer struct {
	// contains filtered or unexported fields
}

func NewIssuer

func NewIssuer(endpoint string) (*Issuer, error)

func (*Issuer) AcceptCredentialRequest

func (i *Issuer) AcceptCredentialRequest(piid string, credential domain.Credential) (err error)

func (*Issuer) AcceptOOBRequest

func (i *Issuer) AcceptOOBRequest(invitation json.RawMessage) (connection domain.Connection, err error)

func (*Issuer) CreateOOBInvitation

func (i *Issuer) CreateOOBInvitation() (invitation json.RawMessage, err error)

func (*Issuer) GetCredentialFromRequest

func (i *Issuer) GetCredentialFromRequest(piid string) (credential *domain.Credential, err error)

func (*Issuer) SendCredentialOffer

func (i *Issuer) SendCredentialOffer(connection domain.Connection, credential domain.Credential) (piid string, err error)

type VDR

type VDR struct {
	// contains filtered or unexported fields
}

func NewVDR

func NewVDR(endpoint string) (*VDR, error)

func (*VDR) CreateKeyDID

func (v *VDR) CreateKeyDID(pubKey ed25519.PublicKey) (id string, verificationMethodId string, err error)

type Verifier

type Verifier struct {
	// contains filtered or unexported fields
}

func NewVerifier

func NewVerifier(endpoint string) (*Verifier, error)

func (*Verifier) AcceptOOBRequest

func (v *Verifier) AcceptOOBRequest(invitation json.RawMessage) (connection domain.Connection, err error)

func (*Verifier) AcceptPresentation

func (v *Verifier) AcceptPresentation(piid string, name string) error

func (*Verifier) CreateOOBInvitation

func (v *Verifier) CreateOOBInvitation() (invitation json.RawMessage, err error)

func (*Verifier) GetIssuedPresentation

func (v *Verifier) GetIssuedPresentation(piid string) (presentation *domain.Presentation, err error)

func (*Verifier) SendPresentationRequest

func (v *Verifier) SendPresentationRequest(connection domain.Connection) (piid string, err error)

type Wallet

type Wallet struct {
	// contains filtered or unexported fields
}

func NewWallet

func NewWallet(endpoint string) (*Wallet, error)

func (*Wallet) AddKey

func (w *Wallet) AddKey(userId string, passphrase string, keyId string, privKey ed25519.PrivateKey) (err error)

func (*Wallet) CreateWallet

func (w *Wallet) CreateWallet(userId string, passphrase string) (err error)

func (*Wallet) SignCredential

func (w *Wallet) SignCredential(userId string, passphrase string, did string, credential domain.Credential) (domain.Credential, error)

func (*Wallet) SignPresentation

func (w *Wallet) SignPresentation(userId string, passphrase string, did string, presentation domain.Presentation) (domain.Presentation, error)

func (*Wallet) Verify

func (w *Wallet) Verify(body any) error

func (*Wallet) VerifyCredential

func (w *Wallet) VerifyCredential(userId string, passphrase string, rawCredential json.RawMessage) (err error)

func (*Wallet) VerifyPresentation

func (w *Wallet) VerifyPresentation(userId string, passphrase string, rawPresentation json.RawMessage) error

func (*Wallet) WalletExists

func (w *Wallet) WalletExists(userId string) bool

Jump to

Keyboard shortcuts

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