Documentation
¶
Index ¶
- Constants
- Variables
- func DeriveMultisigAddress(signatories []string, threshold uint16) (string, error)
- func TestnetAddressFromMnemonic(mnemonic string) string
- func ValidateTestnetAddress(address string) (bool, error)
- func ValidateXXNetworkAddress(address string) (bool, error)
- func XXNetworkAddressFromMnemonic(mnemonic string) string
- type GenSpec
- type Node
- type Path
- type Sleeve
Constants ¶
const EntropySize = 32
const MnemonicWords = 24
Variables ¶
var N *big.Int
Functions ¶
func DeriveMultisigAddress ¶ added in v0.2.1
Derive a Multisig address from signatories addresses and threshold MSigAddress = BLAKE2B_256("modlpy/utilisuba" || signatories.length << 2 || sorted_signatories || threshold)
func TestnetAddressFromMnemonic ¶ added in v0.2.1
func ValidateTestnetAddress ¶ added in v0.2.1
func ValidateXXNetworkAddress ¶ added in v0.2.0
Types ¶
type GenSpec ¶ added in v0.2.0
type GenSpec struct {
// contains filtered or unexported fields
}
Generation spec for a Sleeve wallet Account and WOTS+ params can be specified
func DefaultGenSpec ¶ added in v0.2.0
func DefaultGenSpec() GenSpec
func NewGenSpec ¶ added in v0.2.1
func NewGenSpec(account uint32, params wots.ParamsEncoding) GenSpec
func (GenSpec) PathFromSpec ¶ added in v0.2.0
type Node ¶
func ComputeNode ¶
Compute BIP32 node from seed and path
func NewMasterNode ¶
Derive the master node from a seed
func (*Node) ComputeHardenedChild ¶
Compute the hardened child node with given index Place child Key and Code directly in Node (mutate) Only hard derivations allowed, so idx must be >= 2^31
type Sleeve ¶
type Sleeve struct {
// contains filtered or unexported fields
}
///////////////////////////////////////////////////////////////////// SLEEVE WALLET
Sleeve is a novel way of embedding a quantum secure key in the generation of curve based, non quantum secure keys Find out more about Sleeve at: xx.network/sleeve A complete diagram of the Sleeve wallet generation can be found in the docs folder. This implementation of Sleeve uses a WOTS+ key as the underlying quantum secure key, and the diagram for the generation of this key can also be found in the docs folder. Essentially, the input for wallet generation is random entropy, which is encoded into a mnemonic phrase using BIP39. Then a BIP44 custom path of m/44'/1955'/0'/0'/0' is used in a BIP32 derivation to generate a 256 bit child private key and 256 bit chain code. The private key and chain code are used, respectively, as the secret and public seeds in WOTS+ generation. After the WOTS+ key is generated, we save the quantum secure public key (PK). This public key will be used as the Wallet address when full quantum secure capabilities are implemented in the future. The private key is also used to derive a "sleeve secret key". This secret key allows the WOTS+ public key to be safely shared at anytime, without compromising the non quantum secure keys generated by Sleeve. This secret key will be used in the future to redeem non quantum secure wallets into the WOTS+ quantum secure wallet. The sleeve output is generated using SHA3_256 to hash the sleeve private key and WOTS+ public key together. The resulting hash value is then encoded using BIP39, providing the output mnemonic, which can be used to generate non quantum secure keys on any blockchain platform.
func NewSleeve ¶
Create a sleeve reading entropy from the provided CSPRNG, with the supplied passphrase and using the given generation spec
func NewSleeveFromEntropy ¶
Create a sleeve with provided entropy, passphrase and using the given generation spec Entropy must have 32 bytes
func NewSleeveFromMnemonic ¶
Create a sleeve with provided mneomonic and passphrase Mnemonic must be valid under BIP39 and have 24 words
func (*Sleeve) GetMnemonic ¶
Get the Sleeve's quantum secure mnemonic
func (*Sleeve) GetOutputMnemonic ¶
Get the Sleeve's standard mnemonic (output)