Documentation
¶
Index ¶
- func GenerateDocsHTML(version, githubURL string) string
- func GenerateIndexHTML(version, githubURL string) string
- func GenerateMakerHTML(createWASMBytes []byte, version, githubURL string) string
- func GenerateRecoverHTML(wasmBytes []byte, version, githubURL string, ...) string
- func GetCreateWASMBytes() []byte
- func GetRecoverWASMBytes() []byte
- func SetCreateWASMBytes(data []byte)
- type FriendInfo
- type PersonalizationData
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GenerateDocsHTML ¶
GenerateDocsHTML creates the documentation page HTML with embedded CSS. version is the rememory version string. githubURL is the URL to download CLI binaries.
func GenerateIndexHTML ¶
GenerateIndexHTML creates the landing page HTML with embedded CSS. version is the rememory version string. githubURL is the URL to download CLI binaries.
func GenerateMakerHTML ¶
GenerateMakerHTML creates the complete maker.html with all assets embedded. createWASMBytes is the create.wasm binary (runs in browser for bundle creation). Note: create.wasm self-contains recover.wasm embedded within it (via html.GetRecoverWASMBytes()). version is the rememory version string. githubURL is the URL to download CLI binaries.
func GenerateRecoverHTML ¶
func GenerateRecoverHTML(wasmBytes []byte, version, githubURL string, personalization *PersonalizationData) string
GenerateRecoverHTML creates the complete recover.html with all assets embedded. wasmBytes should be the compiled recover.wasm binary. version is the rememory version string. githubURL is the URL to download CLI binaries. personalization can be nil for a generic recover.html, or provided to personalize for a specific friend.
func GetCreateWASMBytes ¶
func GetCreateWASMBytes() []byte
GetCreateWASMBytes returns the full WASM binary with bundle creation. This larger WASM is used in maker.html for the creation tool. Note: Must be set via SetCreateWASMBytes before use (done in CLI init).
func GetRecoverWASMBytes ¶
func GetRecoverWASMBytes() []byte
GetRecoverWASMBytes returns the embedded recovery-only WASM binary. This smaller WASM is used in recover.html for bundle distribution.
func SetCreateWASMBytes ¶
func SetCreateWASMBytes(data []byte)
SetCreateWASMBytes sets the create.wasm bytes. Called by CLI initialization to avoid circular embedding.
Types ¶
type FriendInfo ¶
type FriendInfo struct {
Name string `json:"name"`
Email string `json:"email,omitempty"`
Phone string `json:"phone,omitempty"`
}
FriendInfo holds friend contact information for the UI.
type PersonalizationData ¶
type PersonalizationData struct {
Holder string `json:"holder"` // This friend's name
OtherFriends []FriendInfo `json:"otherFriends"` // List of other friends
Threshold int `json:"threshold"` // Required shares (K)
Total int `json:"total"` // Total shares (N)
}
PersonalizationData holds the data to personalize recover.html for a specific friend.