mirror of
https://github.com/muun/recovery.git
synced 2025-11-10 22:10:14 -05:00
Release v0.3.0
This commit is contained in:
32
vendor/github.com/muun/libwallet/emergency_kit.go
generated
vendored
Normal file
32
vendor/github.com/muun/libwallet/emergency_kit.go
generated
vendored
Normal file
@@ -0,0 +1,32 @@
|
||||
package libwallet
|
||||
|
||||
import (
|
||||
"github.com/muun/libwallet/emergencykit"
|
||||
)
|
||||
|
||||
// EKInput input struct to fill the PDF
|
||||
type EKInput struct {
|
||||
FirstEncryptedKey string
|
||||
SecondEncryptedKey string
|
||||
}
|
||||
|
||||
// EKOutput with the html as string and the verification code
|
||||
type EKOutput struct {
|
||||
HTML string
|
||||
VerificationCode string
|
||||
}
|
||||
|
||||
// GenerateEmergencyKitHTML returns the translated html as a string along with the verification code
|
||||
func GenerateEmergencyKitHTML(ekParams *EKInput, language string) (*EKOutput, error) {
|
||||
out, err := emergencykit.GenerateHTML(&emergencykit.Input{
|
||||
FirstEncryptedKey: ekParams.FirstEncryptedKey,
|
||||
SecondEncryptedKey: ekParams.SecondEncryptedKey,
|
||||
}, language)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return &EKOutput{
|
||||
HTML: out.HTML,
|
||||
VerificationCode: out.VerificationCode,
|
||||
}, nil
|
||||
}
|
||||
Reference in New Issue
Block a user