ava-labs/avalanchejs

exec delegate.ts issue

Opened this issue · 0 comments

avalanchejs % NODE_OPTIONS='--loader ts-node/esm' ts-node examples/p-chain/delegate.ts
(node:87144) ExperimentalWarning: --experimental-loader may be removed in the future; instead use register():
--import 'data:text/javascript,import { register } from "node:module"; import { pathToFileURL } from "node:url"; register("ts-node/esm", pathToFileURL("./"));'
(Use node --trace-warnings ... to show where the warning was created)
file:///Users/likunmiao/avalanchejs/src/vms/common/rpc.ts:28
constructor(private readonly url: string) {}
^
Error: couldn't issue tx: flow check failed: failed to verify transfer: invalid signature
at JrpcProvider.callMethod (file:///Users/likunmiao/avalanchejs/src/vms/common/rpc.ts:28:19)

.env file:
AVAX_PUBLIC_URL="https://api.avax-test.network"

PRIVATE_KEY=0x...........
C_CHAIN_ADDRESS=0x786f04F12C1601495FCC25DCb1eB8AcE497e936d
X_CHAIN_ADDRESS=X-fuji1qhr42lcank34fjryt4c35tht5ydmkser4wlfhk
P_CHAIN_ADDRESS=P-fuji1qhr42lcank34fjryt4c35tht5ydmkser4wlfhk
CORETH_ADDRESS=C-fuji1qhr42lcank34fjryt4c35tht5ydmkser4wlfhk

please help me!!!