Developer Questions

Ask a Question

getting this error var Keypair = ripple_keypairs_1.default.deriveKeypair(familyseed); ^ TypeError: Cannot read properties of undefined (reading 'deriveKeypair')

if (process.argv.length < 3) {
  console.log('usage: node dist/index <secret_type> <secret> <destination> <amount>');
  console.log ("secret type\n1. family\n2. Mnemonic\n\n")
  process.exit(1);
}
import { XrplClient }  from "xrpl-client";
import { utils, derive, sign } from "xrpl-accountlib";


const cilent = new XrplClient('wss://s.altnet.rippletest.net:51233');

const main = async () => {
    let account: any;
    if (isNaN(Number(process.argv[5]))){
        console.log('Invalid amount');
        process.exit(1);
    }
    if (process.argv[2] !== "1" && process.argv[2] !== "2") {
        console.log('\nPlease enter appropriate secret type from the selection\n');
        process.exit(1);
    }
    if (!utils.isValidAddress(process.argv[4])) {
        console.log('Invalid destination address');
        process.exit(1);
    }
    if (process.argv[2] === "1"){
        if (!utils.isValidSeed(process.argv[3])) {
        console.log('Invalid family seed');
        process.exit(1);
        }
        account = derive.familySeed(process.argv[3]);
    }
    
    if (process.argv[2] === "2" ) {
        if (!utils.isValidMnemnic(process.argv[3])) {
            console.log('Invalid Mnemonic');
            process.exit(1);
        }
        account = derive.mnemonic(process.argv[3]);
    }
    
    console.log(process.argv[3])
    const data = await cilent.send({
        id :1, 
        command: 'account_info',
        account: account.address,
        strict: true,
    });
    /*console.log(data);*/

    if (data.error){
        console.log ("Error: ", data.error_message);
        process.exit(1);
    }
    console.log("Balance: ", Number(data.account_data.Balance) / 1000000);
    if (
        Number(data.account_data.Balance) / 1000000 <= 
        Number(process.argv[5]) +10
    ) {
        console.log("Not enough balance");
        process.exit(1);
    }
    

    const { id, signedTransaction } = sign(
        {
            TransactionType: 'Payment',
            account: account.address,
            Destination: process.argv[4],
            Amount: String(Number(process.argv[5]) * 1000000),
            Sequence: data.account_data.Sequence,
            Fee: String(12),
        }, 
    account);
    console.log(id);
    console.log(signedTransaction);
    /*

    if (data.error){
        console.log ("Error: ", data.error_message);
        process.exit(1);
    }

    console.log("LedgerEntryType: ", data.result.account_data?.LedgerEntryType);
    console.log("Balance: ", data.result.account_data.Balance / 1000000, "XRP");
    console.log("OwnerCount: ", data.result.account_data?.OwnerCount);
    console.log("Sequence: ", data.result.account_data?.Sequence);
    console.log("Current Ledger Index: ", data?.ledger_current_index);
    */
};

main();

Reading a memoField in a hook ..

So i have my ascii value for my memofield ...

ANSWERED

temMALFORMED on NFTTokenMint when using Memos

I'm getting a transaction malformed when using Memos on an NFTTokenMint transaction.

Have hard time calling the XUMM api from my frontend

Goedemiddag :)

ANSWERED

Signing payload from specific address and towards a specific network

Hello,
I'm wondering whether it's possible, via the XUMM API, to indicate:

Transaction History

I am trying to lookup a XUMM transaction that is almost 60 days old in our system. We are using the XUMM API and have the response payload with Transaction ID, Payload Response UUIDv4 and Reference Call UUIDv4. When I try to retrieve the Payload UUID or Transaction ID I get a response ""code":813".

Generate an XRPL account

Hey guys,

Problem of sign in payload

hey team we are trying to integrate XUMM for our website in web browser. we need to sign a customised hash in order to go through. however the following code does not wake up any QR code process. Can you help give some idea?

Bypass the Black Hole Account destination

Hello,
Hope you are doing good. I have a question, How can I bypass the black hole account burn navigate back screen in the Xumm wallet app? is there a way to do that? Can I turn off that security check?
Thanks.

ANSWERED

Publish on App store

App store not allow my app with XUMM app login.
I have tried many time to publish on app store but fails every time.