MystenLabs / sui-gas-pool

Apache License 2.0
16 stars 6 forks source link

how to get user's user_sig #55

Open klren0312 opened 4 days ago

klren0312 commented 4 days ago

must use the wallet's privatekey to generate user_sig? I think the readme is incomplete, I don't know how to use it directly code:

const exampleMnemonic = ''
const keyPair = Ed25519Keypair.deriveKeypair(exampleMnemonic);
const {signature} = await keyPair.signTransaction(serializedTx)
console.log(signature, toBase64(serializedTx))

response:

{
    "effects": null,
    "error": "Sponsor 0x6db319f04b2c601f5fdf1e400bf7e2262a7a1338d867e6b63f360c7af3d3c989 is not registered"
}