# README
About
This is the source code repository for muun's wallet core library. Muun is a non-custodial 2-of-2 multisig wallet with a special focus on security and ease of use.
This library is used by our mobile wallets with gomobile.
Responsible Disclosure
Send us an email to report any security related bugs or vulnerabilities at [email protected].
You can encrypt your email message using our public PGP key.
Public key fingerprint: 1299 28C1 E79F E011 6DA4 C80F 8DB7 FD0F 61E6 ED76
# Packages
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
# Functions
AddEmergencyKitMetadata produces a copy of the PDF file at `srcFile` with embedded metadata, writing it into `dstFile`.
No description provided by the author
CreateAddressV1 returns a P2PKH MuunAddress from a publicKey for use in TransactionSchemeV1.
No description provided by the author
No description provided by the author
CreateAddressV4 returns a P2WSH MuunAddress from a user HD-pubkey and a Muun co-signing HD-pubkey.
CreateAddressV5 returns a P2TR MuunAddress using Musig with the signing and cosigning keys.
No description provided by the author
No description provided by the author
DoPaymentRequestCall builds a MuunPaymentUri from a url and a network.
No description provided by the author
GenerateEmergencyKitHTML returns the translated html as a string along with the verification code and the kit metadata, represented in an opaque string.
GenerateInvoiceSecrets returns a slice of new secrets to register with the remote server.
No description provided by the author
GenerateRecoveryCode generates a new random recovery code using a cryptographically secure random number generator.
No description provided by the author
GetPaymentURI builds a MuunPaymentURI from text (Bitcoin Uri, Muun Uri or address) and a network.
GetRecoveryCodeVersion returns the version for the recovery code given.
Init configures the libwallet.
KeyDecrypt decrypts a key encrypted with KeyEncrypt.
KeyEncrypt encrypts an HD priv key using a user-provided secret into a string We use SCrypt256 for key derivation and AES-CBC-PKCS7 for encryption.
No description provided by the author
Withdraw will parse an LNURL withdraw QR and begin a withdraw process.
Mainnet returns an instance of the Bitcoin Main Network.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
NewHDPrivateKey builds an HD priv key from a seed for a given network.
NewHDPrivateKeyFromBytes builds an HD priv key from the compress priv and chain code for a given network.
NewHDPrivateKeyFromString creates an HD priv key from a base58-encoded string If the parsed key is public, it returns an error.
NewHDPublicKeyFromString creates an HD pub key from a base58-encoded string If the parsed key is private, it returns an error.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
ParseInvoice parses an Invoice from an invoice string and a network.
PersistInvoiceSecrets stores secrets registered with the remote server in the device local database.
RecoveryCodeToKey generates a challenge private key using the recovery code as a seed.
Regtest returns an instance of the Bitcoin Regression Network.
No description provided by the author
No description provided by the author
No description provided by the author
Testnet returns an instance of the Bitcoin Test Network.
ValidateRecoveryCode returns an error if the recovery code is not valid or nil otherwise.
No description provided by the author
# Constants
These constants are here for clients usage.
These constants are here for clients usage.
These constants are here for clients usage.
These constants are here for clients usage.
These constants are here for clients usage.
These constants are here for clients usage.
These constants are here for clients usage.
No description provided by the author
No description provided by the author
No description provided by the author
EKVersionDescriptors is the first PDF including the descriptors.
EKVersionMusig add the musig descriptors.
No description provided by the author
EKVersionOnlyKeys is the encrypted keys to be written down / emailed.
EncodedKeyLength is the size of a modern encoded key, as exported by the clients.
EncodedKeyLengthLegacy is the size of a legacy key, when salt resided only in the 2nd key.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
RecoveryCodeAlphabet contains all upper-case characters except for numbers/letters that look alike.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
# Variables
No description provided by the author
No description provided by the author
# Structs
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
Config defines the global libwallet configuration.
No description provided by the author
No description provided by the author
No description provided by the author
EKInput input struct to fill the PDF.
EKOutput with the html as string and the verification code.
EncryptedPrivateKeyInfo is a Gomobile-compatible version of EncryptedPrivateKey using hex-encoding.
No description provided by the author
No description provided by the author
HDPrivateKey is an HD capable priv key.
HDPublicKey is an HD capable pub key.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
Invoice is muun's invoice struct.
No description provided by the author
InvoiceOptions defines additional options that can be configured when creating a new invoice.
InvoiceSecrets represents a bundle of secrets required to generate invoices from the client.
InvoiceSecretsList is a wrapper around an InvoiceSecrets slice to be able to pass through the gomobile bridge.
No description provided by the author
No description provided by the author
No description provided by the author
MuunPaymentURI is muun's uri struct.
Network has the parameters for operating in a given Bitcoin network.
No description provided by the author
Generalized form of "send payment to this/these bitcoin addresses".
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
RouteHints is a struct returned by the remote server containing the data necessary for constructing an invoice locally.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
# Interfaces
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
Listener is an interface implemented by the apps to receive notifications of data changes from the libwallet code.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author