html

package
v0.0.7 Latest Latest
Warning

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

Go to latest
Published: Feb 8, 2026 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GenerateDocsHTML

func GenerateDocsHTML(version, githubURL string) string

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

func GenerateIndexHTML(version, githubURL string) string

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

func GenerateMakerHTML(createWASMBytes []byte, version, githubURL string) string

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
	HolderShare  string       `json:"holderShare"`  // This friend's encoded share
	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.

Jump to

Keyboard shortcuts

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