32 Commits
Author SHA1 Message Date
Jaco Greeff 3804123ca6 Remove browser.ts global reference (#856)
* Remove browser.ts global reference

* fallback text

* formatting

* Additional formatting

* global > self > window > this

* Add x-global package

* Update tests

* Correct jest mapping
2021-01-24 15:58:42 +01:00
Jaco Greeff 542f484703 Move x-rxjs from @polkadot/api (#844)
* Move x-rxjs from @polkadot/api

* yarn

* x-rxjs bump

* jest config
2021-01-19 21:30:42 +01:00
Jaco Greeff 0b804ff776 Move @polkadot/hw-{ledger, ledger-transports} (#836)
* Move @polkadot/{ledger, ledger-transports}

* yarn rewrite

* Move to hw-*

* Update header
2021-01-14 22:37:51 +01:00
Jaco Greeff f0f0dec8ea 2021 (#824) 2021-01-03 11:20:22 +01:00
Jaco Greeff c353003c70 Bump dev (#765) 2020-11-11 11:49:33 +01:00
Jaco Greeff 32cfe3707e Remove jest getRandomValues polyfill (#748)
* Remove jest getRandomValues polyfill

* react-native in all x-*
2020-11-07 15:59:56 +01:00
Jaco Greeff d751c03d45 Bump wasm-crypto (#745)
* Bump wasm-crypto

* Use x-randomvalues for randomAsU8a
2020-11-07 11:18:06 +01:00
Jaco Greeff 695e19a8a7 Remove polyfills (#739)
* Remove polyfills

* CHANGELOG

* jestConfig

* Adjust jest

* Revert explicit overrides (from base)

* Fix dev

* 4.0.0

* Bump wasm-crypto

* min/max duplication

* Split tests, update dev

* startChar

* validate params

* complexity?

* secp256k1Verify options

* sign Options

* hasher extraction
2020-11-03 10:29:22 +01:00
Jaco Greeff 0f05954dc5 Move @polkadot/x-{fetch,textdecoder,textencoder,ws} (#737)
* Move @polkadot/x-{fetch,textdecoder,textencoder,ws}

* Adjust copyrights

* Fix jest aliassing

* tsconfig resolution
2020-10-29 21:28:22 +01:00
Jaco Greeff 7907ce6dbf Bump actions, cleanups (#727) 2020-10-26 11:31:49 +01:00
Jaco Greeff 3447cd40bf Add @polkadot/networks (#707)
* Add @polkadot/networks

* Update .github/workflows/ss58-registry.yml

* Use prefixes from @polkadot/network

* Update packages/networks/src/checkLatest.spec.ts

* Cleanups

* Auto-check fields based on schema

* typo

* language
2020-10-14 14:52:29 +02:00
Jaco Greeff 56a79924a0 SPDX (#687) 2020-09-17 16:13:39 +02:00
Jaco Greeff c4acca6c7c eslint update 2020-04-07 21:48:07 +02:00
Jaco Greeff cbec4add88 Bump dev (incl. lint fixes) (#579)
* Bump dev (incl. lint fixes)

* Fix failures
2020-04-01 21:20:50 +02:00
Jaco Greeff 48b753b8ac CHANGELOG update (#532) 2020-02-15 10:25:23 +01:00
Jaco Greeff bf5ba0f405 Add resolver for jest (#519) 2020-02-06 14:49:55 +01:00
Jaco Greeff 4ce452b40a Remove client-only packages (#503) 2020-01-15 12:27:12 +01:00
Jaco Greeff 80db504a3b Swap to using eslint (#435)
* WIP

* ... and more

* yet more...

* and examples (more-or-less) fixed

* Only problematic promisify left...

* Last batch

* rm config header

* Update

* Use Record

* Bumps
2019-07-14 11:12:46 +02:00
Jaco Greeff f82092e603 Allow blake2 & parity-codec in trie (#251)
* Start codec implementation

* Expose all constants

* NodeHeader encoding/decoding

* Encoding in NodeHeader

* Constants for Node types

* Moce codec to trie-codec

* Encode/decode in place (untested)

* WIP, tests starting to be put in place

* One passing test :)

* Another test bites the dust...

* One more test down...

* One more down

* Additional tests

* Formatting

* Long keys passing

* Trie tests

* Follow the script, no all-in-all encoder

* First simple trie test passing

* Another one down

* Extra checks remove (debug)

* 80% there with tests...

* One more, one left

* Trie tests passing

* ISC -> Apache-2.0

* Add compact util functions

* Tests to TypeScript

* Remove @polkadot/types deps, ethereum stub

* Bump

* Genesis tests with chainspecs

* Cleanup tests (ease of debugging)

* Substrate test passes, branch fails (again)

* Checks passing, tests passing

* Re-add Ethereum & snapshot tests (not passing atm)

* Re-add index test (also not 100%)

* Mid-way in generic trie-root

* Cleanup ethereumjs-testing definitions

* Update deps

* Less intrusive renames in trie-hash

* Self-review cleanups #1

* asNibbles -> toNibbles

* Cleanups

* Expand tests

* Cleanup imports

* Fix logger test (fly-by refactor)

* Update snapshot test
2018-11-22 14:29:34 +01:00
Luke Schoen 1fb1f9d743 docs: Fixes #157. Add Gitbook documentation for Polkadot-JS Common (#231)
* fix: Remove prior docs attempt files

* docs: Add Gitbook docs for common repo with examples. See detailed comments

* Remove old attempt at docs in docs/ folders

* Add Typedoc config typedoc.js

* Add .nvmrc for easily switching Node.js version with NVM

* Add ESLint config .eslintrc.json and .eslintignore

* Fix in tsconfig.json so is keyring not util-keyring

* Update package.json with dependencies and script same as in polkadot-js/api

* Update root README fixing CI icons, adding guide same as in polkadot-js/api, and fixing link to keyring, not util-keyring

* Update root .gitignore with Gitbook build files same as in polkadot-js/api

* Add Gitbook docs structure same as in polkadot-js/api

* Add Gitbook examples for keyring, trie-db, util-crypto

* Add Gitbook outer summary for the menu, Readme, logo and styles same as in polkadot-js/api

* Add Gitbook config book.json

* docs: Remove db and util-rlp from Gitbook summary menu since RLP not in PoC-3

* docs: Add Typedocs with examples for db MemoryDb and DiskDb

* docs: Update db/ Readme with CI icons fixed, and indicating that no methods exposed in Common Docs

* docs: Update keyring Readme with CI icons fixed and link to Common Docs

* fix: Fix keyring package.json info to refer to common, not client

* fix: Updates license in 4x files in keyring/address folder with keyring, not util-keyring

* docs: Add Typedocs to Keyring class, pair function, and testKeyring function

* docs: Update keyring Readme with CI icons fixed and link to Common Docs

* fix: Update package.json moving @polkadot/db from devDependencies to dependencies

* fix: Update test to iterate array not object with forEach

* fix: Use semicolon instead of comma in tests to fix linting errors. Fix typo

* docs: Add Typedoc to Trie class

* docs: Add Typedoc to is functions

* docs: Update keyring Readme with CI icons fixed and link to Common Docs

* fix: Add return type to encodeAux function

* docs: Add Typedoc to encode function

* fix: Fix formatting of Typedoc example for root

* docs: Add Typedoc for genRoot

* docs: Add Typedoc for pairsUniq

* docs: Add Typedoc for getSharedLength

* docs: Add Typedoc for sharedPrefixLength

* fix: Fix formatting of Typedoc example for rootOrdered, asNibbles, fromNibbles

* fix: Various fixes to util-crypto. See commit detail comments

* Update root Readme with class and function info
* Fix typos and Typedoc examples
* Expose mnemonic by exporting it in an index.ts
* Fix naming from naclKeypair to naclKeypairFromRandom
* Fix typos
* Fix randomAsU8s to be randomAsU8a
* Fix spelling of bitLength

* fix: Various fixes to util-rlp. See detailed commit comments

* Update keyring Readme with CI icons fixed and link to Common Docs mentioning since RLP not in PoC-3 nothing exposed in Common Docs
* Add Typedocs
* Move Typedocs to different file so they appear in Common Docs

* fix: Various fixes to util. See detailed commit comments

* Update root Readme to use Yarn and list and explain exposed Common Docs methods
* Fix typos and Typedoc examples

* fix: Restore tests back using variable they were iterating over before

* docs: Move nested part of Summary to individual package Readme. Add Usage to Readmes

* fix: Add missing semicolon to existing test

* fix: Remove docs/gitbook folder and files since generated by CI

* feat: Update Gitignore to ignore CI-generated files like .html and docs/gitbook/ folder

* docs: Remove CI-icons from all packages within polkadot-js/common, except its root Readme

* fix: Update to incorporate changes from PR #233 and #229

* fix: Ignore build directories in Jest tests using modulePathIgnorePatterns

* fix: Remove useless docs/html from .gitignore since there is no html subdirectory

* fix: Update util-crypto README with link to mnemonicToSeed instead of toSecret

* docs: Update keyring create account example to show result to user

* fix: Update dependencies in examples so the examples work again

* fix: Update keyring example 02 load accounts not to use addFromAddress

* fix: Update .gitignore so it is suitable for both polkadot-js common and api

* fix: Adjust .gitignore after testing changes that work with polkadot-js api too

* fix: Resolve .gitignore to overcome FileNotFoundError: No README file (or is ignored)

* fix: Remove from Git tracking docs/.nojekyll since generated

* fix: Add lerna to gitignore to match api repo

* Revert to original .gitignore. Does not work without Gitbooks files Git tracked

* docs: Hide trie-db Examples since have limited use
2018-10-19 17:33:58 +02:00
Jaco Greeff ec71003e78 Add mnemonic support to keyring & util-crypto (#222) 2018-10-12 17:05:36 +02:00
Jaco Greeff e1135a665b Re-implementation of Patricia-Merkle Trie (#203)
* Start of trie-db re-implementation

* WIP commit

* More WIP

* WIP, seems complete, untested

* Ported trie-db operational

* Add Ethereum trie tests

* Use u8aConcat to construct u8a

* Basic RocksDb interface

* Combine engines into DB, expand tests

* Update Trie with transaction wrapper

* LevelDb (sync) interface

* Remove unused (for now) package (compatibility)

* trie-d -> trie-db-old, trie-db-ext -> trie-db

* Version bump

* Skip old trie tests (package to be removed)

* Skip tests (fixed)

* Remove non-used RocksDb spec

* Skip FileFlat tests (deprecated?)
2018-09-01 22:17:57 +02:00
Jaco Greeff 5f3928a78e Add db-diskdown (simple disk-based LRU KV map) (#193)
* Add db-diskdown (simple disk-based LRU KV map)

* TODOs

* Split path based on key mapping

* Swap back to in-memory trie
2018-08-24 11:11:23 +02:00
Jaco Greeff 45ef701c78 Move type-* into api repo (#191) 2018-08-11 10:52:45 +02:00
Jaco Greeff cd6800fbac Flatten types,m codecs & builders (#152) 2018-06-27 11:03:52 +02:00
Jaco Greeff 78e01a0e16 Combine util, types & trie into common (#150)
* Pull in trie repo

* Bring in types repo
2018-06-26 21:26:51 +02:00
Jaco Greeff cdc848dce0 Add @polkadot/util-keyring (#99) 2018-02-23 11:41:59 +01:00
Jaco Greeff e832aebb07 Introduce @polkadot/util-rlp (#76)
* Add toU8a conversions

* Add u8a utilities

* @polkadot/rlp with encoding

* Decoding test runthrough

* Update util locations

* Convert util-triehash to use util-rlp

* Allow keccak from Uint8Array

* Pass Uint8Array to keccak input

* Update documentation

* Skip some doc generation

* Update @polkadot/dev

* Update doc typo

* Update allocations

* Retrieve tests from ethereumjs-testing

* Simplify test retrieval

* Exclude etereumjs-testing from flow
2018-02-08 14:50:54 +01:00
Jaco Greeff 6b3be0bc30 Introduce @polkadot/util-triehash (#75)
* Expand util-crypto test coverage

* Add @polkadot/util-triehash

* Update link to util-triehash
2018-02-07 13:41:45 +01:00
Jaco Greeff b5c5734c7c Add Blake2s & XXHash utility functions (#66)
* Initial split of util & util-crypto

* Add initial XXHash version

* Blake2s wit tests & documentation

* Add sha512 (from NaCl)

* Add randomBytes (from NaCl)

* Flow fixes

* Update documentation

* Update latest @polkadot/dev
2018-01-25 14:13:43 +01:00
Jaco Greeff 5d0a7231dc Fix alias links (#34)
* Fix alias links

* Update alias links

* Update generated docs
2017-12-01 20:34:51 +01:00
Jaco Greeff 87dd31f72a Update tests to use jest (#11) 2017-11-21 21:28:20 +01:00