Commit Graph
125 Commits
Author SHA1 Message Date
Jaco 7eac688074 Small performance adjustments for Uint8Array indexing (#1603) 2022-07-18 14:51:39 +03:00
Jaco 4bb2c83213 Adjust exports (#1585) 2022-07-07 08:31:58 +03:00
Jaco c92d5cfb20 Remove deprecated call signatures (#1584) 2022-07-07 07:54:07 +03:00
Jaco 3bc62adf6f Sprinkle in readonly on array inputs (#1568) 2022-06-28 10:52:57 +03:00
Jaco 3db2990ce7 Change Date.now() to performance.now() (#1551)
* Change Date.now() to performance.now()

* Adjust
2022-06-20 11:29:59 +03:00
Jaco c4ceeb8382 Additional float conversion tests (#1550) 2022-06-20 08:09:51 +03:00
Jaco 4b46c179b2 floatToU8a & u8aToFloat (#1547)
* floatToU8a & u8aToFloat

* test for asserts
2022-06-19 10:17:35 +03:00
Jaco 4edb0f00b6 Adjust asserts (#1544) 2022-06-18 13:31:25 +03:00
Jaco 8549f1fe89 Adjust isAscii str vs u8a loops (#1540) 2022-06-16 21:34:35 +03:00
Jaco 2dd2f78f7e Use \d in regex (as applicable) (#1539)
* Use \d in regex (as applicable)

* Adjust
2022-06-16 17:13:34 +03:00
Jaco 68ba664c4c hexToU8a adjustments (#1536)
* hexToU8a adjustments

* Adjust test
2022-06-16 14:51:34 +03:00
Jaco fff30601a0 Unroll u8aToBn loops (#1535)
* Unroll u8aToBn loops

* Adjust with additional xor shortcuts

* Adjust mult -> shift (where below u32)

* assertUnreachable

* Add u8aToNumber
2022-06-16 11:29:23 +03:00
Jaco 1a73a3407e Adjust option extraction for helpers (#1533)
* Adjust option extraction for helpers

* Adjust
2022-06-15 21:17:07 +03:00
Jaco cdcc331e6e Additional internal comments for exposed functions (#1529) 2022-06-12 09:11:12 +03:00
Jaco e946243b6f Additional performance tests (#1512) 2022-06-03 18:53:57 +03:00
Jaco 8b72584d53 Add compactFromU8aLim (Remove extraneous *Strict) (#1505)
* Add compactFromU8aLim (Remove extraoneous *Strict)

* Fix build
2022-05-27 11:10:56 +03:00
Jaco fbf973dc2a Add u8a-only strict variants (#1503) 2022-05-25 10:02:01 +03:00
Jaco 3b5de80c54 Compact loop unrolling (#1502) 2022-05-25 07:26:07 +03:00
Jaco b20df563ce Buffer short-circuit (onlky convert when non-Uint8Array) (#1499) 2022-05-24 17:27:47 +03:00
Jaco a4256de444 Small u8aToU8a optimizations (#1498)
* Small u8aToU8a optimizations

* Slight order adjustments

* Adjust
2022-05-24 16:42:58 +03:00
Jaco 7177722a49 Fix buffer imports (#1495) 2022-05-20 15:17:39 +03:00
Jaco 83d0121a28 Additional deprecations (#1488)
* Additional deprecations

* Unsigned shift

* Adjust

* offset calc
2022-05-13 11:19:20 +03:00
Jaco be4619ba3d MArk deprecated function signatures (#1487) 2022-05-13 09:40:43 +03:00
Jaco 66e2382f26 Re-add top-level cryptoWaitReady (#1486) 2022-05-13 08:34:53 +03:00
Jaco 65939dbe9d Signed conversion on empty u8a (#1484) 2022-05-12 12:14:34 +03:00
Jaco 7341c32df5 Optimize u8aToHex with direct (non-hex) conversion (#1477)
* Optimize `u8aToHex` with direct (non-hex) conversion

* Adjust compactFromU8a tests
2022-05-07 11:54:08 +03:00
Jaco 30d5f5c118 Additional BN & BigInt negative tests (#1443) 2022-03-23 14:18:14 +02:00
Jaco 0859fe4b74 Small util return adjustments (#1351) 2022-01-03 13:56:54 +02:00
Jaco 3597a4eb4e 2022 (#1346) 2022-01-01 09:26:11 +02:00
Jaco feae08fc0f Adjust with tsconfig references (#1317)
* Adjust with tsconfig references

* tabs -> spaces

* Adjust

* Cleanup spacing

* Adjust

* eslint-specific config

* Bump deps

* Bumps

* Adjust

* Update tests
2021-12-14 08:23:16 +02:00
Jaco f514402b15 Small maintainability cleanups (#1304) 2021-12-09 10:44:56 +02:00
Jaco 7955022ce5 Helpers for 256/512 hashing (#1303)
* Helpers for 256/512 hashing

* Adjust u8aToU8a (u8a-only check earlier)

* Fix export

* Simplify

* revert
2021-12-09 10:10:51 +02:00
Jaco b1f9c37f6a x-bigint package (#1274)
* x-bigint package

* x-bigint in has*

* 8.0.6-8

* Adjust

* Adjust

* jest config

* Adjust

* Remove commented code

* Update README

* CHANGELOG
2021-12-02 07:29:44 +02:00
Jaco 776a653f42 Use BigInt only via xglobal (#1272)
* Use BigInt only via xglobal

* Adjust

* yarn
2021-12-01 20:37:11 +02:00
Jaco 9821eba11f Rename internal BigInt helper (#1244)
* Rename internal BigInt helper

* Consistency
2021-11-25 17:16:09 +02:00
Jaco a8f13bd387 Additional adjustments on newBigInt (#1241)
* Additional adjustments on newBigInt

* typing
2021-11-25 11:34:34 +02:00
Jaco 0ee4bc81f5 Performance test adjustments (#1239)
* Performance test adjustments

* testing

* adjust

* alphabet

* Adjust
2021-11-25 09:16:01 +02:00
Jaco 5e16b1e84c Remove concatBuffer viariant (#1234) 2021-11-23 17:56:33 +02:00
Jaco 75b60b9999 Adjust and enable old perfromance tests (#1233) 2021-11-23 16:54:39 +02:00
Jaco 6f0aa35098 Flatten calls (#1200) 2021-11-18 08:48:15 +02:00
Jaco fa5b5bca7e Additional bigint utilities (#1194)
* Additional bigint utilities

* Adjust tests

* biTo{Hex, U8a}

* Adjust

* Ordering

* biSqrt

* Fix toU8a

* Extensible BigInt

* Class TS issues....

* Move type def to types

* Update packages/util/src/bi/sqrt.spec.ts

* max/min

* min/max tests
2021-11-16 20:27:19 +02:00
Jaco 06c06a8b73 toBigInt utilities (#1191)
* toBigInt utilities

* Handle negatives?

* two's complement adjustments

* Adjust

* Compliment util extract

* dedupe

* Ensure > u32 tests
2021-11-15 20:46:48 +02:00
Jaco ac06f38118 Bump deps (#1187) 2021-11-15 14:30:31 +02:00
Jaco de7817e6b5 Use DataView as applicable (#1186)
* Use DataView as applicable

* .skip

* Fix hexToU8a length calc

* hello world
2021-11-15 13:01:47 +02:00
Jaco cf0aab479a Small utility adjustments (#1185) 2021-11-15 07:16:21 +02:00
Jaco 8ede488aec u8aEq w/ U32 and lower only (#1182)
* u8aEq w/ U32 and lower only

* Adjust mod

* Adjust signatures
2021-11-14 17:35:56 +02:00
Jaco 20821aad40 Performance optimizations (#1181)
* Performance optimizations

* Use slice internally to u8aEq

* Adjust

* formatting

* subarray

* Fixes

* Use DataView

* With alignment

* Use Float64Array when available

* Skip performance

* Renames

* Alignment comment

* Constants

* Use BYTES_PER_ELEMENT

* Adjust
2021-11-14 17:21:07 +02:00
Jaco d9231d26aa Additional Node-specific u8a utils (#1177)
* Additional Node-specific u8a utils

* toHexBuffer
2021-11-13 11:38:07 +02:00
Jaco ba0a183bd9 Re-use pre-define BN_{BE, LE}_* constants (#1175)
* Re-use pre-define BN_{BE, LE}_* constants

* ordering update

* bnMax/bnMin opt

* u8aToHex flatten
2021-11-12 09:19:49 +02:00
Jaco 8880e8fa8c 7.7.1 (#1152)
* 7.7.1

* Extract stringify replacer

* formatting

* linting

* isUnSorted{A, B}

* Adjust

* Complexity?

* Cleanups

* Update packages/util-crypto/src/address/derive.ts

* formatBalance

* Revert formatBalance
2021-10-31 16:44:17 +02:00