numeric library

Classes

IKey
Public key, private key, or signature in binary form

Properties

base58Chars String
@module Numeric
read / write
base58Map List<int>
final
base64Chars String
read / write
base64Map List<int>
final
privateKeyDataSize int
Private key data size, excluding type field
read / write
publicKeyDataSize int
Public key data size, excluding type field
read / write
signatureDataSize int
Signature data size, excluding type field
read / write

Functions

base58ToBinary(int size, String s) Uint8List
Convert an unsigned base-58 number in s to a bignum @param size bignum size (bytes)
base64ToBinary(String s) Uint8List
Convert an unsigned base-64 number in s to a bignum
binaryToBase58(Uint8List bignum, {dynamic minDigits = 1}) String
Convert bignum to a base-58 number @param minDigits 0-pad result to this many digits
binaryToDecimal(Uint8List bignum, {dynamic minDigits = 1}) String
Convert bignum to an unsigned decimal number @param minDigits 0-pad result to this many digits
convertLegacyPublicKey(String s) String
If a key is in the legacy format (EOS prefix), then convert it to the new format (PUB_K1_). Leaves other formats untouched
convertLegacyPublicKeys(List<String> keys) List<String>
If a key is in the legacy format (EOS prefix), then convert it to the new format (PUB_K1_). Leaves other formats untouched
create_base58_map() List<int>
create_base64_map() List<int>
decimalToBinary(int size, String s) Uint8List
Convert an unsigned decimal number in s to a bignum @param size bignum size (bytes)
digestSuffixRipemd160(Uint8List data, String suffix) Uint8List
isNegative(Uint8List bignum) bool
Is bignum a negative number?
keyToString(IKey key, String suffix, String prefix) String
negate(Uint8List bignum) → void
Negate bignum
privateKeyToString(IKey key) String
Convert key to string (base-58) form */
publicKeyToString(IKey key) → dynamic
Convert key to string (base-58) form
signatureToString(IKey signature) String
Convert signature to string (base-58) form */
signedBinaryToDecimal(Uint8List bignum, {int minDigits = 1}) String
Convert bignum to a signed decimal number @param minDigits 0-pad result to this many digits
signedDecimalToBinary(int size, String s) Uint8List
Convert a signed decimal number in s to a bignum @param size bignum size (bytes)
stringToKey(String s, KeyType type, int size, String suffix) IKey
stringToPrivateKey(String s) IKey
Convert key in s to binary form
stringToPublicKey(String s) IKey
Convert key in s to binary form
stringToSignature(String s) IKey
Convert key in s to binary form */

Enums

KeyType
Key types this library supports */