Methods

Supported Methods

For the XRP Ledger, we support the following methods:

All methods and abstracted functions are included in the wc-client

Example (using wc-client)

import core from '@joey-wallet/wc-client/core';
const methods = core.methods
const sign = async () => {
  try {
    const response = await methods.signTransaction({
      provider,
      chainId: 'xrpl:0',
      request: {
        tx_json: {
          TransactionType: 'AccountSet',
          Account: account?.split(':')[2] as string,
        },
        options: { autofill: true, submit: true },
      },
    });

    setResponse(JSON.stringify(response));
  } catch (e: any) {
    console.error(e);
    if (e.message) setResponse(e.message);
    console.error(`error: ${e}`);
  }
};

Last updated