2
0
mirror of synced 2025-02-25 04:25:16 +00:00

87 lines
2.2 KiB
TypeScript
Raw Normal View History

2016-07-25 03:55:16 -04:00
'use strict';
2016-07-15 23:47:35 -04:00
// This is SUPER useful, but adds 140kb (even zipped, adds 40kb)
//var unorm = require('unorm');
import { getAddress, getContractAddress, getIcapAddress } from './address';
2018-06-13 15:39:39 -04:00
import { AbiCoder, defaultAbiCoder, parseSignature } from './abi-coder';
import * as base64 from './base64';
import * as bigNumber from './bignumber';
2018-06-17 16:47:28 -04:00
import * as bytes from './bytes';
2018-06-18 05:42:41 -04:00
import { hashMessage, id, namehash } from './hash';
2018-06-13 15:39:39 -04:00
import { keccak256 } from './keccak256';
import * as sha2 from './sha2';
import * as solidity from './solidity';
import { randomBytes } from './random-bytes';
2018-06-18 05:42:41 -04:00
import properties = require('./properties');
2018-06-13 15:39:39 -04:00
import * as RLP from './rlp';
import * as utf8 from './utf8';
import * as units from './units';
import { fetchJson } from './web';
import { parse as parseTransaction } from './transaction';
2018-06-13 15:39:39 -04:00
export default {
AbiCoder: AbiCoder,
2018-06-13 15:39:39 -04:00
defaultAbiCoder: defaultAbiCoder,
parseSignature: parseSignature,
2017-04-04 17:26:09 -04:00
RLP: RLP,
2016-07-15 23:47:35 -04:00
2018-06-13 15:39:39 -04:00
fetchJson: fetchJson,
2018-06-18 05:42:41 -04:00
defineReadOnly: properties.defineReadOnly,
defineFrozen: properties.defineFrozen,
resolveProperties: properties.resolveProperties,
shallowCopy: properties.shallowCopy,
2016-07-15 23:47:35 -04:00
// NFKD (decomposed)
//etherSymbol: '\uD835\uDF63',
2016-07-15 23:47:35 -04:00
// NFKC (composed)
etherSymbol: '\u039e',
2016-07-15 23:47:35 -04:00
2018-06-17 16:47:28 -04:00
arrayify: bytes.arrayify,
2016-07-15 23:47:35 -04:00
2018-06-17 16:47:28 -04:00
concat: bytes.concat,
padZeros: bytes.padZeros,
stripZeros: bytes.stripZeros,
2016-07-15 23:47:35 -04:00
base64: base64,
bigNumberify: bigNumber.bigNumberify,
BigNumber: bigNumber.BigNumber,
2016-07-15 23:47:35 -04:00
2018-06-17 16:47:28 -04:00
hexlify: bytes.hexlify,
toUtf8Bytes: utf8.toUtf8Bytes,
toUtf8String: utf8.toUtf8String,
2016-08-23 22:06:26 -04:00
2018-06-18 05:42:41 -04:00
hashMessage: hashMessage,
2017-05-03 20:24:07 -04:00
namehash: namehash,
2017-10-17 16:05:44 -04:00
id: id,
2017-05-03 20:24:07 -04:00
2018-06-13 15:39:39 -04:00
getAddress: getAddress,
getIcapAddress: getIcapAddress,
2018-06-13 15:39:39 -04:00
getContractAddress: getContractAddress,
formatEther: units.formatEther,
parseEther: units.parseEther,
2016-07-15 23:47:35 -04:00
formatUnits: units.formatUnits,
parseUnits: units.parseUnits,
keccak256: keccak256,
2018-06-13 15:39:39 -04:00
sha256: sha2.sha256,
randomBytes: randomBytes,
solidityPack: solidity.pack,
solidityKeccak256: solidity.keccak256,
soliditySha256: solidity.sha256,
2018-06-17 16:47:28 -04:00
splitSignature: bytes.splitSignature,
2018-06-18 05:42:41 -04:00
joinSignature: bytes.joinSignature,
parseTransaction: parseTransaction
2016-07-15 23:47:35 -04:00
}