applications

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: Oct 24, 2022 License: MIT Imports: 11 Imported by: 2

Documentation

Index

Constants

View Source
const (
	PoWApp       = "pow-app"
	PoWSeed      = "pow-seed"
	PoWChallenge = "pow-challenge"
	PoWPRNG      = "pow-prng"
	PoWSolution  = "pow-solution"
)

transcript constants

View Source
const AuthCapability = tapir.Capability("AuthenticationCapability")

AuthCapability defines the Authentication Capability granted by AuthApp

View Source
const HasTokensCapability = tapir.Capability("HasTokensCapability")

HasTokensCapability is granted once the client has obtained signed tokens

View Source
const SuccessfulProofOfWorkCapability = tapir.Capability("SuccessfulProofOfWorkCapability")

SuccessfulProofOfWorkCapability is given when a successfully PoW Challenge has been Completed

Variables

This section is empty.

Functions

This section is empty.

Types

type ApplicationChain

type ApplicationChain struct {
	TranscriptApp
	// contains filtered or unexported fields
}

ApplicationChain is a meta-app that can be used to build complex applications from other applications

func (*ApplicationChain) ChainApplication

func (appchain *ApplicationChain) ChainApplication(app tapir.Application, capability tapir.Capability) *ApplicationChain

ChainApplication adds a new application to the chain. Returns a pointer to app so this call can itself be chained.

func (*ApplicationChain) ChainInteractiveApplication

func (appchain *ApplicationChain) ChainInteractiveApplication(app tapir.InteractiveApplication) *ApplicationChain

ChainInteractiveApplication adds an interactive application to the chain. There can only be 1 interactive application.

func (*ApplicationChain) Init

func (appchain *ApplicationChain) Init(connection tapir.Connection)

Init is run when the connection is first started.

func (*ApplicationChain) Listen

func (appchain *ApplicationChain) Listen()

Listen calls listen on the Interactive application

func (*ApplicationChain) NewInstance

func (appchain *ApplicationChain) NewInstance() tapir.Application

NewInstance should always return a new instantiation of the application.

type AuthApp

type AuthApp struct {
	TranscriptApp
}

AuthApp is the concrete Application type that handles Authentication

func (*AuthApp) Init

func (ea *AuthApp) Init(connection tapir.Connection)

Init runs the entire AuthApp protocol, at the end of the protocol either the connection is granted AUTH capability or the connection is closed.

func (AuthApp) NewInstance

func (ea AuthApp) NewInstance() tapir.Application

NewInstance creates a new instance of the AuthApp

type AuthMessage

type AuthMessage struct {
	LongTermPublicKey  ed25519.PublicKey
	EphemeralPublicKey ed25519.PublicKey
}

AuthMessage is exchanged between peers to obtain the Auth Capability

type ProofOfWorkApplication

type ProofOfWorkApplication struct {
	TranscriptApp
}

ProofOfWorkApplication forces the incoming connection to do proof of work before granting a capability

func (*ProofOfWorkApplication) Init

func (powapp *ProofOfWorkApplication) Init(connection tapir.Connection)

Init is run when the connection is first started.

func (*ProofOfWorkApplication) NewInstance

func (powapp *ProofOfWorkApplication) NewInstance() tapir.Application

NewInstance should always return a new instantiation of the application.

type TokenApplication

type TokenApplication struct {
	TranscriptApp
	TokenService *privacypass.TokenServer
	Tokens       []*privacypass.Token
}

TokenApplication provides Tokens for PoW

func (*TokenApplication) Init

func (tokenapp *TokenApplication) Init(connection tapir.Connection)

Init is run when the connection is first started.

func (*TokenApplication) NewInstance

func (tokenapp *TokenApplication) NewInstance() tapir.Application

NewInstance should always return a new instantiation of the application.

type TranscriptApp

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

TranscriptApp defines a Tapir Meta-App which provides a global cryptographic transcript

func (*TranscriptApp) Init

func (ta *TranscriptApp) Init(connection tapir.Connection)

Init initializes the cryptographic transcript

func (TranscriptApp) NewInstance

func (TranscriptApp) NewInstance() tapir.Application

NewInstance creates a new TranscriptApp

func (*TranscriptApp) PropagateTranscript

func (ta *TranscriptApp) PropagateTranscript(transcript *core.Transcript)

PropagateTranscript overrides the default transcript and propagates a transcript from a previous session

func (*TranscriptApp) Transcript

func (ta *TranscriptApp) Transcript() *core.Transcript

Transcript returns a pointer to the cryptographic transcript

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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