Skip to content

ENDLESS 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.ENDLESS,
    methodName: "signTransaction",
    params: {
      transaction,
    },
  }));
}

Request Parameters

typescript
{
    chainType: ChainType.ENDLESS,
    methodName: "signTransaction",
    params: {
        function, //string, function name,such as 0x1::endless_account::transfer_coins
        functionArguments, //Array<string>, function arguments,
        typeArguments
    },
}

Return Value

typescript
{
    accountAuthenticator:{
        signature: string;
        public_key: string;
    },
    rawTxn:SimpleTransaction
}