This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Here are detailed **4** different methods with which a new account can be "associated" or "linked" on-chain | |
// In very clear terms, all this is doing is making the pubkey known to the chain. | |
// This is required because there is no way to determine either of the wallet addresses from the other. | |
import secp256k1 from "secp256k1"; | |
import { createPublicClient, createWalletClient, hexToNumber, http, numberToHex, parseSignature, toHex } from "viem"; | |
import { privateKeyToAccount, generatePrivateKey } from "viem/accounts"; | |
import { seiTestnet } from "viem/chains"; | |
import { ADDRESS_PRECOMPILE_ABI, ADDRESS_PRECOMPILE_ADDRESS } from '@sei-js/evm'; |