| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960 |
- import {
- keccak256,
- sha256,
- toUtf8Bytes,
- toUtf8String,
- recoverAddress,
- SigningKey,
- AbiCoder,
- Signature,
- concat,
- id,
- Mnemonic,
- Wordlist,
- wordlists,
- HDNodeWallet as ethersHDNodeWallet,
- getBytes,
- computeHmac,
- } from 'ethers';
- import type { BytesLike, SignatureLike } from 'ethers';
- import { Interface } from './interface.js';
- const splitSignature = (sigBytes: SignatureLike) => Signature.from(sigBytes);
- const joinSignature = (splitSig: SignatureLike) => Signature.from(splitSig).serialized;
- const arrayify = (value: BytesLike) => getBytes(value);
- const FormatTypes = {
- sighash: 'sighash',
- minimal: 'minimal',
- full: 'full',
- json: 'json',
- };
- const isValidMnemonic = Mnemonic.isValidMnemonic;
- computeHmac.register((algorithm, key, data) => {
- return computeHmac._(algorithm, Buffer.from(key), Buffer.from(data));
- });
- export {
- keccak256,
- sha256,
- toUtf8Bytes,
- toUtf8String,
- recoverAddress,
- Signature,
- SigningKey,
- AbiCoder,
- Interface,
- FormatTypes,
- splitSignature,
- joinSignature,
- arrayify,
- ethersHDNodeWallet,
- concat,
- id,
- Mnemonic,
- Wordlist,
- wordlists,
- isValidMnemonic,
- };
|