tronprotocol / tronweb

Javascript API Library for interacting with the TRON Network
MIT License
423 stars 271 forks source link

Sign Arbitrary Message #404

Closed rahmaniali-ir closed 1 year ago

rahmaniali-ir commented 1 year ago

I'm trying to do a similar thing as Keplr's sign arbitrary message with tronWeb using typescript in angular

This is how Keplr is doing it as explained here:

signArbitrary(
    chainId: string,
    signer: string,
    data: string | Uint8Array
): Promise<StdSignature>;

I went through the documentation but I couldn't find it. I'll appreciate any help.

start940315 commented 1 year ago

Maybe you need trx._signTypedData. You can find example here