Skip to content

Commit

Permalink
fix: removed node assert
Browse files Browse the repository at this point in the history
  • Loading branch information
70nyIT committed Feb 16, 2024
1 parent 29a7e0a commit 2c281ee
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 8 deletions.
16 changes: 9 additions & 7 deletions example/example.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
import { privateKeyToAccount } from 'viem/accounts';
import { extractViewingPrivateKeyNode } from '../src/extractViewingPrivateKeyNode';
import { generateEphemeralPrivateKey } from '../src/generateEphemeralPrivateKey';
import { generateKeysFromSignature } from '../src/generateKeysFromSignature';
import { generateStealthAddresses } from '../src/generateStealthAddresses';
import {
predictStealthSafeAddressWithBytecode,
predictStealthSafeAddressWithClient
} from '../src/predictStealthSafeAddress';
predictStealthSafeAddressWithClient,
extractViewingPrivateKeyNode,
generateEphemeralPrivateKey,
generateKeysFromSignature,
generateStealthAddresses,
} from '../src';

/**
* End-to-end example of how to generate a stealth Safe addresses based on the user's private key and the key generation message to be signed.
Expand Down Expand Up @@ -76,11 +76,13 @@ export async function example({
chainId,
threshold: 1,
stealthAddresses,
safeVersion: '1.3.0',
});
const { stealthSafeAddress: stealthSafeAddressWithBytecode } = await predictStealthSafeAddressWithBytecode({
const { stealthSafeAddress: stealthSafeAddressWithBytecode } = predictStealthSafeAddressWithBytecode({
chainId,
threshold: 1,
stealthAddresses,
safeVersion: '1.3.0',
safeProxyBytecode: '0x608060405234801561001057600080fd5b506040516101e63803806101e68339818101604052602081101561003357600080fd5b8101908080519060200190929190505050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614156100ca576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260228152602001806101c46022913960400191505060405180910390fd5b806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505060ab806101196000396000f3fe608060405273ffffffffffffffffffffffffffffffffffffffff600054167fa619486e0000000000000000000000000000000000000000000000000000000060003514156050578060005260206000f35b3660008037600080366000845af43d6000803e60008114156070573d6000fd5b3d6000f3fea2646970667358221220d1429297349653a4918076d650332de1a1068c5f3e07c5c82360c277770b955264736f6c63430007060033496e76616c69642073696e676c65746f6e20616464726573732070726f7669646564',
});

Expand Down
2 changes: 1 addition & 1 deletion src/predictStealthSafeAddress.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import assert from 'node:assert';
import assert from 'assert';
import {
getFallbackHandlerDeployment,
getProxyFactoryDeployment,
Expand Down

0 comments on commit 2c281ee

Please sign in to comment.