blob: 3cf8ec786ba60c1ddebc81879e51f9df004da376 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
|
import { generatePseudoRandomSalt } from '@0xproject/order-utils';
import { crypto } from '@0xproject/order-utils/lib/src/crypto';
export const addressUtils = {
generatePseudoRandomAddress(): string {
const randomBigNum = generatePseudoRandomSalt();
const randomBuff = crypto.solSHA3([randomBigNum]);
const randomAddress = `0x${randomBuff.slice(0, 20).toString('hex')}`;
return randomAddress;
},
};
|