Documentation ¶
Index ¶
- func AddBasicMessageRep(p *BasicMessageRep) (err error)
- func AddDeviceIDRep(d *DeviceIDRep) (err error)
- func AddIssueCredRep(p *IssueCredRep) (err error)
- func AddPSM(p *PSM) (err error)
- func AddPairwiseRep(p *PairwiseRep) (err error)
- func AddPresentProofRep(p *PresentProofRep) (err error)
- func AddRawPL(addr *endp.Addr, data []byte) (err error)
- func AllPSM(did string, tsSince *int64) (m *[]PSM, err error)
- func GetAllDeviceIDRep(did string) (m *[]DeviceIDRep, err error)
- func IsPSMReady(key StateKey) (yes bool, err error)
- func Open(filename string) (err error)
- func RmPSM(p *PSM) (err error)
- func RmRawPL(addr *endp.Addr) (err error)
- type BasicMessageRep
- type DB
- func (b *DB) AddBasicMessageRep(p *BasicMessageRep) (err error)
- func (b *DB) AddDeviceIDRep(d *DeviceIDRep) (err error)
- func (b *DB) AddIssueCredRep(p *IssueCredRep) (err error)
- func (b *DB) AddPairwiseRep(p *PairwiseRep) (err error)
- func (b *DB) AddPresentProofRep(p *PresentProofRep) (err error)
- func (b *DB) AddRawPL(addr *endp.Addr, data []byte) (err error)
- func (b *DB) AllPSM(did string, tsSinceNs *int64) (m *[]PSM, err error)
- func (b *DB) GetAllDeviceIDRep(did string) (m *[]DeviceIDRep, err error)
- func (b *DB) GetBasicMessageRep(k StateKey) (m *BasicMessageRep, err error)
- func (b *DB) GetIssueCredRep(k StateKey) (m *IssueCredRep, err error)
- func (b *DB) GetPSM(key StateKey) (s *PSM, err error)
- func (b *DB) GetPairwiseRep(k StateKey) (m *PairwiseRep, err error)
- func (b *DB) GetPresentProofRep(k StateKey) (m *PresentProofRep, err error)
- func (b *DB) IsPSMReady(key StateKey) (yes bool, err error)
- func (b *DB) Open(filename string) (err error)
- func (b *DB) RmRawPL(addr *endp.Addr) (err error)
- type DIDRep
- type DeviceIDRep
- type IssueCredRep
- func (rep *IssueCredRep) BuildCredRequest(packet comm.Packet) (cr string, err error)
- func (rep *IssueCredRep) Data() []byte
- func (rep *IssueCredRep) IssuerBuildCred(packet comm.Packet, credReq string) (c string, err error)
- func (rep *IssueCredRep) KData() []byte
- func (rep *IssueCredRep) StoreCred(packet comm.Packet, cred string) error
- type PSM
- func (p *PSM) Data() []byte
- func (p *PSM) FirstState() *State
- func (p *PSM) IsReady() bool
- func (p *PSM) LastState() *State
- func (p *PSM) Next() string
- func (p *PSM) PairwiseName() string
- func (p *PSM) PendingUserAction() bool
- func (p *PSM) Protocol() string
- func (p *PSM) TaskFor(plType string) (t comm.Task)
- func (p *PSM) Timestamp() int64
- type PairwiseRep
- type PayloadInfo
- type PresentProofRep
- type State
- type StateKey
- type SubState
- type WalletRep
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddBasicMessageRep ¶
func AddBasicMessageRep(p *BasicMessageRep) (err error)
func AddDeviceIDRep ¶
func AddDeviceIDRep(d *DeviceIDRep) (err error)
func AddIssueCredRep ¶
func AddIssueCredRep(p *IssueCredRep) (err error)
func AddPairwiseRep ¶
func AddPairwiseRep(p *PairwiseRep) (err error)
func AddPresentProofRep ¶
func AddPresentProofRep(p *PresentProofRep) (err error)
func GetAllDeviceIDRep ¶
func GetAllDeviceIDRep(did string) (m *[]DeviceIDRep, err error)
func IsPSMReady ¶
Types ¶
type BasicMessageRep ¶
type BasicMessageRep struct { Key StateKey PwName string Message string SendTimestamp int64 Timestamp int64 SentByMe bool Delivered bool }
func GetBasicMessageRep ¶
func GetBasicMessageRep(k StateKey) (m *BasicMessageRep, err error)
func NewBasicMessageRep ¶
func NewBasicMessageRep(d []byte) *BasicMessageRep
func (*BasicMessageRep) Data ¶
func (p *BasicMessageRep) Data() []byte
func (*BasicMessageRep) KData ¶
func (p *BasicMessageRep) KData() []byte
type DB ¶
type DB struct {
// contains filtered or unexported fields
}
func (*DB) AddBasicMessageRep ¶
func (b *DB) AddBasicMessageRep(p *BasicMessageRep) (err error)
func (*DB) AddDeviceIDRep ¶
func (b *DB) AddDeviceIDRep(d *DeviceIDRep) (err error)
func (*DB) AddIssueCredRep ¶
func (b *DB) AddIssueCredRep(p *IssueCredRep) (err error)
func (*DB) AddPairwiseRep ¶
func (b *DB) AddPairwiseRep(p *PairwiseRep) (err error)
func (*DB) AddPresentProofRep ¶
func (b *DB) AddPresentProofRep(p *PresentProofRep) (err error)
func (*DB) GetAllDeviceIDRep ¶
func (b *DB) GetAllDeviceIDRep(did string) (m *[]DeviceIDRep, err error)
func (*DB) GetBasicMessageRep ¶
func (b *DB) GetBasicMessageRep(k StateKey) (m *BasicMessageRep, err error)
func (*DB) GetIssueCredRep ¶
func (b *DB) GetIssueCredRep(k StateKey) (m *IssueCredRep, err error)
func (*DB) GetPairwiseRep ¶
func (b *DB) GetPairwiseRep(k StateKey) (m *PairwiseRep, err error)
func (*DB) GetPresentProofRep ¶
func (b *DB) GetPresentProofRep(k StateKey) (m *PresentProofRep, err error)
type DeviceIDRep ¶
func NewDeviceIDRep ¶
func NewDeviceIDRep(d []byte) *DeviceIDRep
func (*DeviceIDRep) Data ¶
func (p *DeviceIDRep) Data() []byte
func (*DeviceIDRep) Key ¶
func (p *DeviceIDRep) Key() []byte
type IssueCredRep ¶
type IssueCredRep struct { Key StateKey Timestamp int64 CredDefID string CredDef string CredOffer string CredReqMeta string Values string Attributes []didcomm.CredentialAttribute }
func GetIssueCredRep ¶
func GetIssueCredRep(k StateKey) (m *IssueCredRep, err error)
func NewIssueCredRep ¶
func NewIssueCredRep(d []byte) *IssueCredRep
func (*IssueCredRep) BuildCredRequest ¶
func (rep *IssueCredRep) BuildCredRequest(packet comm.Packet) (cr string, err error)
BuildCredRequest builds credential request which is PROVER/HOLDER SIDE action.
func (*IssueCredRep) Data ¶
func (rep *IssueCredRep) Data() []byte
func (*IssueCredRep) IssuerBuildCred ¶
IssuerBuildCred builds credentials in -- ISSUER SIDE --. Note! values are needed here!!
func (*IssueCredRep) KData ¶
func (rep *IssueCredRep) KData() []byte
type PSM ¶
func (*PSM) FirstState ¶
func (*PSM) Next ¶
Next is for getting the upcoming protocol message type. For example, if we are waiting a certain message from other end, we can check the message type with this function.
func (*PSM) PairwiseName ¶
func (*PSM) PendingUserAction ¶
PendingUserAction returns true if we the PSM is waiting an user action msg.
type PairwiseRep ¶
type PairwiseRep struct { Name string // In our implementation this is connection id! Key StateKey TheirLabel string Caller DIDRep Callee DIDRep }
func GetPairwiseRep ¶
func GetPairwiseRep(k StateKey) (m *PairwiseRep, err error)
func NewPairwiseRep ¶
func NewPairwiseRep(d []byte) *PairwiseRep
func (*PairwiseRep) Data ¶
func (p *PairwiseRep) Data() []byte
func (*PairwiseRep) KData ¶
func (p *PairwiseRep) KData() []byte
type PayloadInfo ¶
type PayloadInfo struct {
Type string
}
type PresentProofRep ¶
type PresentProofRep struct { Key StateKey ProofReq string Proof string Values string // currently only used for Task API to get data WeProposed bool Attributes []didcomm.ProofAttribute }
func GetPresentProofRep ¶
func GetPresentProofRep(k StateKey) (m *PresentProofRep, err error)
func NewPresentProofRep ¶
func NewPresentProofRep(d []byte) *PresentProofRep
func (*PresentProofRep) CreateProof ¶
func (rep *PresentProofRep) CreateProof(packet comm.Packet, rootDID string) (err error)
CreateProof is PROVER side helper.
func (*PresentProofRep) Data ¶
func (rep *PresentProofRep) Data() []byte
func (*PresentProofRep) KData ¶
func (rep *PresentProofRep) KData() []byte
func (*PresentProofRep) VerifyProof ¶
func (rep *PresentProofRep) VerifyProof(packet comm.Packet) (ack bool, err error)
type SubState ¶
type SubState uint
SubState is enumeration for the state transitions PSM will have during its execution. The above PUML diagram illustrates what transitions are currently recognized. The Ready state should have 2 internal states: ACK/NACK