Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
G
Geth-Modification
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
张蕾
Geth-Modification
Commits
86806d8b
Commit
86806d8b
authored
Apr 08, 2019
by
Guillaume Ballet
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update bip-39 ref and remove ebfe/scard from vendor
parent
8ee5bb22
Changes
10
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
426 additions
and
2210 deletions
+426
-2210
Gopkg.lock
vendor/github.com/tyler-smith/go-bip39/Gopkg.lock
+15
-0
Gopkg.toml
vendor/github.com/tyler-smith/go-bip39/Gopkg.toml
+26
-0
LICENSE
vendor/github.com/tyler-smith/go-bip39/LICENSE
+1
-1
Makefile
vendor/github.com/tyler-smith/go-bip39/Makefile
+11
-0
README.md
vendor/github.com/tyler-smith/go-bip39/README.md
+13
-6
bip39.go
vendor/github.com/tyler-smith/go-bip39/bip39.go
+240
-112
coverage.txt
vendor/github.com/tyler-smith/go-bip39/coverage.txt
+0
-15
wordlist.go
vendor/github.com/tyler-smith/go-bip39/wordlist.go
+0
-2067
triegen.go
vendor/golang.org/x/text/unicode/norm/triegen.go
+117
-0
vendor.json
vendor/vendor.json
+3
-9
No files found.
vendor/github.com/tyler-smith/go-bip39/Gopkg.lock
0 → 100644
View file @
86806d8b
# This file is autogenerated, do not edit; changes may be undone by the next 'dep ensure'.
[[projects]]
branch = "master"
name = "golang.org/x/crypto"
packages = ["pbkdf2"]
revision = "a49355c7e3f8fe157a85be2f77e6e269a0f89602"
[solve-meta]
analyzer-name = "dep"
analyzer-version = 1
inputs-digest = "d7f1a7207c39125afcb9ca2365832cb83458edfc17f2f7e8d28fd56f19436856"
solver-name = "gps-cdcl"
solver-version = 1
vendor/github.com/tyler-smith/go-bip39/Gopkg.toml
0 → 100644
View file @
86806d8b
# Gopkg.toml example
#
# Refer to https://github.com/golang/dep/blob/master/docs/Gopkg.toml.md
# for detailed Gopkg.toml documentation.
#
# required = ["github.com/user/thing/cmd/thing"]
# ignored = ["github.com/user/project/pkgX", "bitbucket.org/user/project/pkgA/pkgY"]
#
# [[constraint]]
# name = "github.com/user/project"
# version = "1.0.0"
#
# [[constraint]]
# name = "github.com/user/project2"
# branch = "dev"
# source = "github.com/myfork/project2"
#
# [[override]]
# name = "github.com/x/y"
# version = "2.4.0"
[[constraint]]
branch
=
"master"
name
=
"golang.org/x/crypto"
vendor/github.com/tyler-smith/go-bip39/LICENSE
View file @
86806d8b
The MIT License (MIT)
The MIT License (MIT)
Copyright (c) 2014
Tyler Smith
Copyright (c) 2014
-2018 Tyler Smith and contributors
Permission is hereby granted, free of charge, to any person obtaining a copy
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
of this software and associated documentation files (the "Software"), to deal
...
...
vendor/github.com/tyler-smith/go-bip39/Makefile
0 → 100644
View file @
86806d8b
.DEFAULT_GOAL
:=
help
tests
:
##
Run tests with coverage
go
test
-v
-cover
./...
profile_tests
:
##
Run tests and output coverage profiling
go
test
-v
-coverprofile
=
coverage.out .
go tool cover
-html
=
coverage.out
help
:
@
grep
-E
'^[a-zA-Z_-]+:.*?## .*$$'
$(MAKEFILE_LIST)
|
sort
|
awk
'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}'
vendor/github.com/tyler-smith/go-bip39/README.md
View file @
86806d8b
# go-bip39
# go-bip39
[

](https://travis-ci.org/tyler-smith/go-bip39)
A golang implementation of the BIP0039 spec for mnemonic seeds
[

](https://github.com/tyler-smith/go-bip39/blob/master/LICENSE)
[

](http://godoc.org/github.com/tyler-smith/go-bip39)
[

](https://goreportcard.com/report/github.com/tyler-smith/go-bip39)
[

](https://github.com/tyler-smith/go-bip39/issues)
## Credits
A golang implementation of the BIP0039 spec for mnemonic seeds
English wordlist and test vectors are from the standard Python BIP0039 implementation
from the Trezor guys:
[
https://github.com/trezor/python-mnemonic
](
https://github.com/trezor/python-mnemonic
)
## Example
## Example
...
@@ -36,3 +36,10 @@ func main(){
...
@@ -36,3 +36,10 @@ func main(){
fmt
.
Println
(
"Master public key: "
,
publicKey
)
fmt
.
Println
(
"Master public key: "
,
publicKey
)
}
}
```
```
## Credits
Wordlists are from the
[
bip39 spec
](
https://github.com/bitcoin/bips/tree/master/bip-0039
)
.
Test vectors are from the standard Python BIP0039 implementation from the
Trezor team:
[
https://github.com/trezor/python-mnemonic
](
https://github.com/trezor/python-mnemonic
)
vendor/github.com/tyler-smith/go-bip39/bip39.go
View file @
86806d8b
This diff is collapsed.
Click to expand it.
vendor/github.com/tyler-smith/go-bip39/coverage.txt
deleted
100644 → 0
View file @
8ee5bb22
github.com/CrowBits/go-bip39/bip39.go addChecksum 100.00% (11/11)
github.com/CrowBits/go-bip39/bip39.go IsMnemonicValid 100.00% (8/8)
github.com/CrowBits/go-bip39/bip39.go NewEntropy 100.00% (6/6)
github.com/CrowBits/go-bip39/bip39.go contains 100.00% (4/4)
github.com/CrowBits/go-bip39/bip39.go NewSeedWithErrorChecking 100.00% (4/4)
github.com/CrowBits/go-bip39/bip39.go validateEntropyBitSize 100.00% (3/3)
github.com/CrowBits/go-bip39/bip39.go validateEntropyWithChecksumBitSize 100.00% (3/3)
github.com/CrowBits/go-bip39/bip39.go padByteSlice 100.00% (2/2)
github.com/CrowBits/go-bip39/wordlist.go init 100.00% (2/2)
github.com/CrowBits/go-bip39/bip39.go NewSeed 100.00% (1/1)
github.com/CrowBits/go-bip39/bip39.go NewMnemonic 93.75% (15/16)
github.com/CrowBits/go-bip39/bip39.go MnemonicToByteArray 90.24% (37/41)
github.com/CrowBits/go-bip39 ---------------------------------- 95.05% (96/101)
vendor/github.com/tyler-smith/go-bip39/wordlist.go
deleted
100644 → 0
View file @
8ee5bb22
This diff is collapsed.
Click to expand it.
vendor/golang.org/x/text/unicode/norm/triegen.go
0 → 100644
View file @
86806d8b
// Copyright 2011 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
// +build ignore
// Trie table generator.
// Used by make*tables tools to generate a go file with trie data structures
// for mapping UTF-8 to a 16-bit value. All but the last byte in a UTF-8 byte
// sequence are used to lookup offsets in the index table to be used for the
// next byte. The last byte is used to index into a table with 16-bit values.
package
main
import
(
"fmt"
"io"
)
const
maxSparseEntries
=
16
type
normCompacter
struct
{
sparseBlocks
[][]
uint64
sparseOffset
[]
uint16
sparseCount
int
name
string
}
func
mostFrequentStride
(
a
[]
uint64
)
int
{
counts
:=
make
(
map
[
int
]
int
)
var
v
int
for
_
,
x
:=
range
a
{
if
stride
:=
int
(
x
)
-
v
;
v
!=
0
&&
stride
>=
0
{
counts
[
stride
]
++
}
v
=
int
(
x
)
}
var
maxs
,
maxc
int
for
stride
,
cnt
:=
range
counts
{
if
cnt
>
maxc
||
(
cnt
==
maxc
&&
stride
<
maxs
)
{
maxs
,
maxc
=
stride
,
cnt
}
}
return
maxs
}
func
countSparseEntries
(
a
[]
uint64
)
int
{
stride
:=
mostFrequentStride
(
a
)
var
v
,
count
int
for
_
,
tv
:=
range
a
{
if
int
(
tv
)
-
v
!=
stride
{
if
tv
!=
0
{
count
++
}
}
v
=
int
(
tv
)
}
return
count
}
func
(
c
*
normCompacter
)
Size
(
v
[]
uint64
)
(
sz
int
,
ok
bool
)
{
if
n
:=
countSparseEntries
(
v
);
n
<=
maxSparseEntries
{
return
(
n
+
1
)
*
4
+
2
,
true
}
return
0
,
false
}
func
(
c
*
normCompacter
)
Store
(
v
[]
uint64
)
uint32
{
h
:=
uint32
(
len
(
c
.
sparseOffset
))
c
.
sparseBlocks
=
append
(
c
.
sparseBlocks
,
v
)
c
.
sparseOffset
=
append
(
c
.
sparseOffset
,
uint16
(
c
.
sparseCount
))
c
.
sparseCount
+=
countSparseEntries
(
v
)
+
1
return
h
}
func
(
c
*
normCompacter
)
Handler
()
string
{
return
c
.
name
+
"Sparse.lookup"
}
func
(
c
*
normCompacter
)
Print
(
w
io
.
Writer
)
(
retErr
error
)
{
p
:=
func
(
f
string
,
x
...
interface
{})
{
if
_
,
err
:=
fmt
.
Fprintf
(
w
,
f
,
x
...
);
retErr
==
nil
&&
err
!=
nil
{
retErr
=
err
}
}
ls
:=
len
(
c
.
sparseBlocks
)
p
(
"// %sSparseOffset: %d entries, %d bytes
\n
"
,
c
.
name
,
ls
,
ls
*
2
)
p
(
"var %sSparseOffset = %#v
\n\n
"
,
c
.
name
,
c
.
sparseOffset
)
ns
:=
c
.
sparseCount
p
(
"// %sSparseValues: %d entries, %d bytes
\n
"
,
c
.
name
,
ns
,
ns
*
4
)
p
(
"var %sSparseValues = [%d]valueRange {"
,
c
.
name
,
ns
)
for
i
,
b
:=
range
c
.
sparseBlocks
{
p
(
"
\n
// Block %#x, offset %#x"
,
i
,
c
.
sparseOffset
[
i
])
var
v
int
stride
:=
mostFrequentStride
(
b
)
n
:=
countSparseEntries
(
b
)
p
(
"
\n
{value:%#04x,lo:%#02x},"
,
stride
,
uint8
(
n
))
for
i
,
nv
:=
range
b
{
if
int
(
nv
)
-
v
!=
stride
{
if
v
!=
0
{
p
(
",hi:%#02x},"
,
0x80
+
i
-
1
)
}
if
nv
!=
0
{
p
(
"
\n
{value:%#04x,lo:%#02x"
,
nv
,
0x80
+
i
)
}
}
v
=
int
(
nv
)
}
if
v
!=
0
{
p
(
",hi:%#02x},"
,
0x80
+
len
(
b
)
-
1
)
}
}
p
(
"
\n
}
\n\n
"
)
return
}
vendor/vendor.json
View file @
86806d8b
...
@@ -103,12 +103,6 @@
...
@@ -103,12 +103,6 @@
"revision"
:
"8e610b2b55bfd1bfa9436ab110d311f5e8a74dcb"
,
"revision"
:
"8e610b2b55bfd1bfa9436ab110d311f5e8a74dcb"
,
"revisionTime"
:
"2018-06-25T18:44:42Z"
"revisionTime"
:
"2018-06-25T18:44:42Z"
},
},
{
"checksumSHA1"
:
"B1sVd5XOmjuSFYivGhBd+vPlc1w="
,
"path"
:
"github.com/ebfe/scard"
,
"revision"
:
"0147d7ead790ac8a5ecc91ee6de68beb7b17c4e9"
,
"revisionTime"
:
"2017-12-31T19:32:11Z"
},
{
{
"checksumSHA1"
:
"zYnPsNAVm1/ViwCkN++dX2JQhBo="
,
"checksumSHA1"
:
"zYnPsNAVm1/ViwCkN++dX2JQhBo="
,
"path"
:
"github.com/edsrzf/mmap-go"
,
"path"
:
"github.com/edsrzf/mmap-go"
,
...
@@ -532,10 +526,10 @@
...
@@ -532,10 +526,10 @@
"revisionTime"
:
"2018-11-28T10:09:59Z"
"revisionTime"
:
"2018-11-28T10:09:59Z"
},
},
{
{
"checksumSHA1"
:
"
vW7IiPtoA4hQQ/ScHlbmRktY89U
="
,
"checksumSHA1"
:
"
SsMMqb3xn7hg1ZX5ugwZz5rzpx0
="
,
"path"
:
"github.com/tyler-smith/go-bip39"
,
"path"
:
"github.com/tyler-smith/go-bip39"
,
"revision"
:
"
8e7a99b3e716f36d3b080a9a70f9eb45abe4edcc
"
,
"revision"
:
"
dbb3b84ba2ef14e894f5e33d6c6e43641e665738
"
,
"revisionTime"
:
"201
6-06-29T16:38:56
Z"
"revisionTime"
:
"201
8-10-17T06:06:43
Z"
},
},
{
{
"checksumSHA1"
:
"nD6S4KB0S+YHxVMDDE+w3PyXaMk="
,
"checksumSHA1"
:
"nD6S4KB0S+YHxVMDDE+w3PyXaMk="
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment