Skip to content

PUT Sign Transaction

Sign Transaction Example

typescript
import { Web3Kit, ChainType } from "@web3jskit/dapp";

interface ISignTransactionRes {
  signature: string;
}

function signTransaction(transaction: string) {
  const web3Kit = new Web3Kit();
  const serRes = (await web3Kit.request({
    chainType: ChainType.PUT,
    methodName: "signTransaction",
    params: {
      transaction,
    },
  })) as ISignTransactionRes;
}

Request Parameters

typescript
{
    chainType: ChainType.PUT,
    methodName: "signTransaction",
    params: {
        transaction, // Transaction content, in base58 format
    },
}

Return Value

typescript
{
    transaction: '', // Signed transaction, in base58 format
}