28 lines
689 B
Go
28 lines
689 B
Go
|
package applications
|
||
|
|
||
|
import (
|
||
|
"cwtch.im/tapir"
|
||
|
"cwtch.im/tapir/primitives/core"
|
||
|
)
|
||
|
|
||
|
// TranscriptApp defines a Tapir Meta=App which provides a global cryptographic transcript
|
||
|
type TranscriptApp struct {
|
||
|
transcript *core.Transcript
|
||
|
}
|
||
|
|
||
|
// NewInstance creates a new TranscriptApp
|
||
|
func (TranscriptApp) NewInstance() tapir.Application {
|
||
|
ta := new(TranscriptApp)
|
||
|
return ta
|
||
|
}
|
||
|
|
||
|
// Init initializes the cryptographic transcript
|
||
|
func (ta *TranscriptApp) Init(connection tapir.Connection) {
|
||
|
ta.transcript = core.NewTranscript("tapir-transcript")
|
||
|
}
|
||
|
|
||
|
// Transcript returns a pointer to the cryptographic transcript
|
||
|
func (ta *TranscriptApp) Transcript() *core.Transcript {
|
||
|
return ta.transcript
|
||
|
}
|