The cl-bip39 Reference Manual

Table of Contents

Next: , Previous: , Up: (dir)   [Contents][Index]

The cl-bip39 Reference Manual

This is the cl-bip39 Reference Manual, version 0.0.1, generated automatically by Declt version 2.4 patchlevel 1 "Will Decker" on Mon Jul 29 14:44:17 2019 GMT+0.


Next: , Previous: , Up: Top   [Contents][Index]

1 Introduction

CL-BIP39

CL-BIP39 is a Common Lisp implementation of BIP-0039 based on the reference implementation.

The library exports the following symbols:

Getting Started

The following examples show how to create a mnemonic sentence, validate it, and use it to generate a seed.

CL-USER> (cl-bip39:generate-bip39-mnemonic)
"rice grocery immense truck brave spread coin quality depend angle appear stuff"
CL-USER> (cl-bip39:bip39-mnemonic-p "rice grocery immense truck brave spread coin quality depend angle appear stuff")
T
CL-USER> (cl-bip39:generate-bip39-seed "rice grocery immense truck brave spread coin quality depend angle appear stuff")
"0bc0120ad16a21cab358d0cfe0030bc2bb53b906ea7fe6653ca414d6bb0ce1e0f4f262479164a5480f9d110c6fec017738dfb64bba347386f3a455d9213cf015"

Of course, it is possible to generate a mnemonic sentence with different length:

CL-USER> (cl-bip39:generate-bip39-mnemonic :entropy-size 192)
"coconut humble brave team ranch fossil soft mixed jewel favorite party tumble evil science february wealth visual labor"

And it is also possible to generate a seed with (and without) a passphrase:

CL-USER> (defparameter *mnemonic* (cl-bip39:generate-bip39-mnemonic))
*MNEMONIC*
CL-USER> (cl-bip39:generate-bip39-seed *mnemonic* "a-passphrase")
"ff04e5d7adfa23f2df26dfb2d158ed210378058d755d30bf3b18466411b83b42b3ed1f2043abd19310bd40c06c022cf8bc8baf626b1c673df48aa0cd0b27c03a"
CL-USER> (cl-bip39:generate-bip39-seed *mnemonic*)
"976282dccc72387628ccc76553bd06472eb4464e77a578132f1f0d0c37290e8f9c567ba7ab0390d175a742555fb55c8de6798c67c9302234803013d47e6651a4"

Limitations

Dependencies

Author & Maintainer

Smith Dhumbumroong (zodmaner@gmail.com)

License

Copyright (c) 2018 Smith Dhumbumroong

Licensed under the MIT License.


Next: , Previous: , Up: Top   [Contents][Index]

2 Systems

The main system appears first, followed by any subsystem dependency.


Previous: , Up: Systems   [Contents][Index]

2.1 cl-bip39

Author

Smith Dhumbumroong <zodmaner@gmail.com>

License

MIT

Description

A Common Lisp implementation of BIP-0039

Version

0.0.1

Dependencies
Source

cl-bip39.asd (file)

Components

Next: , Previous: , Up: Top   [Contents][Index]

3 Files

Files are sorted by type and then listed depth-first from the systems components trees.


Previous: , Up: Files   [Contents][Index]

3.1 Lisp


Next: , Previous: , Up: Lisp files   [Contents][Index]

3.1.1 cl-bip39.asd

Location

cl-bip39.asd

Systems

cl-bip39 (system)


Next: , Previous: , Up: Lisp files   [Contents][Index]

3.1.2 cl-bip39/package.lisp

Parent

cl-bip39 (system)

Location

package.lisp

Packages

cl-bip39


Next: , Previous: , Up: Lisp files   [Contents][Index]

3.1.3 cl-bip39/word-list-english.lisp

Dependency

package.lisp (file)

Parent

cl-bip39 (system)

Location

word-list-english.lisp

Internal Definitions

*word-list-english* (special variable)


Previous: , Up: Lisp files   [Contents][Index]

3.1.4 cl-bip39/cl-bip39.lisp

Dependency

word-list-english.lisp (file)

Parent

cl-bip39 (system)

Location

cl-bip39.lisp

Exported Definitions
Internal Definitions

Next: , Previous: , Up: Top   [Contents][Index]

4 Packages

Packages are listed by definition order.


Previous: , Up: Packages   [Contents][Index]

4.1 cl-bip39

Source

package.lisp (file)

Use List

common-lisp

Exported Definitions
Internal Definitions

Next: , Previous: , Up: Top   [Contents][Index]

5 Definitions

Definitions are sorted by export status, category, package, and then by lexicographic order.


Next: , Previous: , Up: Definitions   [Contents][Index]

5.1 Exported definitions


Previous: , Up: Exported definitions   [Contents][Index]

5.1.1 Functions

Function: bip39-mnemonic-p MNEMONIC
Package

cl-bip39

Source

cl-bip39.lisp (file)

Function: generate-bip39-mnemonic &key ENTROPY-SIZE
Package

cl-bip39

Source

cl-bip39.lisp (file)

Function: generate-bip39-seed MNEMONIC &optional PASSPHASE
Package

cl-bip39

Source

cl-bip39.lisp (file)


Previous: , Up: Definitions   [Contents][Index]

5.2 Internal definitions


Next: , Previous: , Up: Internal definitions   [Contents][Index]

5.2.1 Special variables

Special Variable: *word-list-english*
Package

cl-bip39

Source

word-list-english.lisp (file)


Next: , Previous: , Up: Internal definitions   [Contents][Index]

5.2.2 Functions

Function: bit-string-to-int BIT-STRING
Package

cl-bip39

Source

cl-bip39.lisp (file)

Function: bits-to-bytes BITS
Package

cl-bip39

Source

cl-bip39.lisp (file)

Function: byte-array-to-int BYTE-ARRAY
Package

cl-bip39

Source

cl-bip39.lisp (file)

Function: checksum-to-bit-string CHECKSUM ENTROPY-SIZE
Package

cl-bip39

Source

cl-bip39.lisp (file)

Function: cs-position ENT+CS-BIT-STRING
Package

cl-bip39

Source

cl-bip39.lisp (file)

Function: entropy-to-bit-string ENTROPY ENTROPY-SIZE
Package

cl-bip39

Source

cl-bip39.lisp (file)

Function: generate-initial-entropy ENTROPY-SIZE
Package

cl-bip39

Source

cl-bip39.lisp (file)

Function: int-to-byte-array INT
Package

cl-bip39

Source

cl-bip39.lisp (file)

Function: mnemonic-word-to-index MNEMONIC-WORD
Package

cl-bip39

Source

cl-bip39.lisp (file)

Function: sha256 BYTE-SEQUENCE
Package

cl-bip39

Source

cl-bip39.lisp (file)

Function: split-mnemonic MNEMONIC
Package

cl-bip39

Source

cl-bip39.lisp (file)


Next: , Previous: , Up: Internal definitions   [Contents][Index]

5.2.3 Generic functions

Generic Function: len CONDITION
Package

cl-bip39

Methods
Method: len (CONDITION invalid-mnemonic-sentence-length)
Source

cl-bip39.lisp (file)

Generic Function: size CONDITION
Package

cl-bip39

Methods
Method: size (CONDITION invalid-entropy-size)
Source

cl-bip39.lisp (file)

Generic Function: word CONDITION
Package

cl-bip39

Methods
Method: word (CONDITION invalid-word)
Source

cl-bip39.lisp (file)


Previous: , Up: Internal definitions   [Contents][Index]

5.2.4 Conditions

Condition: invalid-entropy-size ()
Package

cl-bip39

Source

cl-bip39.lisp (file)

Direct superclasses

error (condition)

Direct methods

size (method)

Direct slots
Slot: size
Initargs

:size

Readers

size (generic function)

Condition: invalid-mnemonic-sentence-length ()
Package

cl-bip39

Source

cl-bip39.lisp (file)

Direct superclasses

error (condition)

Direct methods

len (method)

Direct slots
Slot: len
Initargs

:len

Readers

len (generic function)

Condition: invalid-word ()
Package

cl-bip39

Source

cl-bip39.lisp (file)

Direct superclasses

error (condition)

Direct methods

word (method)

Direct slots
Slot: word
Initargs

:word

Readers

word (generic function)


Previous: , Up: Top   [Contents][Index]

Appendix A Indexes


Next: , Previous: , Up: Indexes   [Contents][Index]

A.1 Concepts

Jump to:   C   F   L  
Index Entry  Section

C
cl-bip39.asd: The cl-bip39<dot>asd file
cl-bip39/cl-bip39.lisp: The cl-bip39/cl-bip39<dot>lisp file
cl-bip39/package.lisp: The cl-bip39/package<dot>lisp file
cl-bip39/word-list-english.lisp: The cl-bip39/word-list-english<dot>lisp file

F
File, Lisp, cl-bip39.asd: The cl-bip39<dot>asd file
File, Lisp, cl-bip39/cl-bip39.lisp: The cl-bip39/cl-bip39<dot>lisp file
File, Lisp, cl-bip39/package.lisp: The cl-bip39/package<dot>lisp file
File, Lisp, cl-bip39/word-list-english.lisp: The cl-bip39/word-list-english<dot>lisp file

L
Lisp File, cl-bip39.asd: The cl-bip39<dot>asd file
Lisp File, cl-bip39/cl-bip39.lisp: The cl-bip39/cl-bip39<dot>lisp file
Lisp File, cl-bip39/package.lisp: The cl-bip39/package<dot>lisp file
Lisp File, cl-bip39/word-list-english.lisp: The cl-bip39/word-list-english<dot>lisp file

Jump to:   C   F   L  

Next: , Previous: , Up: Indexes   [Contents][Index]

A.2 Functions

Jump to:   B   C   E   F   G   I   L   M   S   W  
Index Entry  Section

B
bip39-mnemonic-p: Exported functions
bit-string-to-int: Internal functions
bits-to-bytes: Internal functions
byte-array-to-int: Internal functions

C
checksum-to-bit-string: Internal functions
cs-position: Internal functions

E
entropy-to-bit-string: Internal functions

F
Function, bip39-mnemonic-p: Exported functions
Function, bit-string-to-int: Internal functions
Function, bits-to-bytes: Internal functions
Function, byte-array-to-int: Internal functions
Function, checksum-to-bit-string: Internal functions
Function, cs-position: Internal functions
Function, entropy-to-bit-string: Internal functions
Function, generate-bip39-mnemonic: Exported functions
Function, generate-bip39-seed: Exported functions
Function, generate-initial-entropy: Internal functions
Function, int-to-byte-array: Internal functions
Function, mnemonic-word-to-index: Internal functions
Function, sha256: Internal functions
Function, split-mnemonic: Internal functions

G
generate-bip39-mnemonic: Exported functions
generate-bip39-seed: Exported functions
generate-initial-entropy: Internal functions
Generic Function, len: Internal generic functions
Generic Function, size: Internal generic functions
Generic Function, word: Internal generic functions

I
int-to-byte-array: Internal functions

L
len: Internal generic functions
len: Internal generic functions

M
Method, len: Internal generic functions
Method, size: Internal generic functions
Method, word: Internal generic functions
mnemonic-word-to-index: Internal functions

S
sha256: Internal functions
size: Internal generic functions
size: Internal generic functions
split-mnemonic: Internal functions

W
word: Internal generic functions
word: Internal generic functions

Jump to:   B   C   E   F   G   I   L   M   S   W  

Next: , Previous: , Up: Indexes   [Contents][Index]

A.3 Variables

Jump to:   *  
L   S   W  
Index Entry  Section

*
*word-list-english*: Internal special variables

L
len: Internal conditions

S
size: Internal conditions
Slot, len: Internal conditions
Slot, size: Internal conditions
Slot, word: Internal conditions
Special Variable, *word-list-english*: Internal special variables

W
word: Internal conditions

Jump to:   *  
L   S   W  

Previous: , Up: Indexes   [Contents][Index]

A.4 Data types

Jump to:   C   I   P   S  
Index Entry  Section

C
cl-bip39: The cl-bip39 system
cl-bip39: The cl-bip39 package
Condition, invalid-entropy-size: Internal conditions
Condition, invalid-mnemonic-sentence-length: Internal conditions
Condition, invalid-word: Internal conditions

I
invalid-entropy-size: Internal conditions
invalid-mnemonic-sentence-length: Internal conditions
invalid-word: Internal conditions

P
Package, cl-bip39: The cl-bip39 package

S
System, cl-bip39: The cl-bip39 system

Jump to:   C   I   P   S