Skip to content

Proposal: BIP32 (Hierarchical Deterministic Wallet) Support #61

@zulucrypto

Description

@zulucrypto

Preamble

SEP: Not assigned
Title: Stellar BIP32 (Hierarchical Deterministic Wallet) Support
Author: zulucrypto
Status: Draft
Created: 2017-11-03

Abstract

Defines a convention for using BIP32 paths to generate Stellar accounts.

This allows users of wallets that follow BIP39 (Mnemonic code for generating deterministic keys)
to use their same wallet for managing their Stellar accounts.

This is especially relevant to hardware wallets such as the Ledger Nano and Trezor.

Specification

BIP44 (https://github.com/bitcoin/bips/blob/master/bip-0044.mediawiki) defines
a BIP32 path for multiple coin types:

m / purpose' / coin_type' / account' / change / address_index

This specification follows BIP44 to build the initial path:

m/44'/

The coin_type is 148' as defined by Satoshi Labs in SLIP-0044 (https://github.com/satoshilabs/slips/blob/master/slip-0044.md)

m/44'/148'/

This specification now diverges from BIP44 since the remaining fields are not
applicable to Stellar.

Instead, the fields are defined as follows:

m / 44' / 148' / primary_asset' / account'

Primary Asset

This field defaults to 0' for XLM but can be set to one of the following values
for users that wish to store assets in separate addresses.

Using a different value for this field is optional and exists to help users organize
their accounts. Storing all assets in the default account should be supported by
all applications.

BIP32 Index Asset Description
0' XLM Stellar Lumens
1' ZuluCoin Example asset. TODO: assets would need some way of registering their constants here

TODO: It might be better to generate the BIP32 index by hashing the issuing address
somehow? This would also remove the requirement for assets to register themselves
in this document.

Account

A user-defined index for the user to create multiple accounts.

Examples

Simple Example

A brand new user would start with the following path:

m/44'/148'/0'/0'

The key at this path would determine their Stellar public address.

For most users, this would be all they need and multiple Assets could be stored
in this account.

User with multiple Assets

A user desiring to separate their assets into multiple accounts may use a path like:

m/44'/148/1'/0'

This would generate the first account for asset 1' (see Primary Asset section).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions