i am trying to implement stellar channel concept. i am following stellar channel link. I have created 6 channel accounts. Below is the programme i wrote


  var i=0;
  var len=0;
  var sourceKeys = Stellar.Keypair.fromSecret('SDJ5AQWLIAYT22TCYSKOQALI3SNUMPAR63SEL73ASALDP6PYDN54FARM');
  for (i = 0, len = channelAccounts.length; i < len; i++) {
  var transaction =
  new Stellar.TransactionBuilder(channelAccounts[i], opts={fee:100})
      source: sourceKeys.publicKey(),
      destination: destinationId,
      asset: Stellar.Asset.native(),
      amount: "1"
    // Wait a maximum of three minutes for the transaction

  transaction.sign(sourceKeys);   // base account must sign to approve the payment
  transaction.sign(channelKeys[i]);  // channel must sign to approve it being the source of the transaction

BUT this is giving me an error

 var sequenceNumber = new _bignumber2.default(this.source.sequenceNumber()).add(1);
TypeError: this.source.sequenceNumber is not a function

I dont know where i am doing wrong.

  • Are you sure this is a method and not a field?
    – Rob
    Sep 12, 2019 at 0:08
  • @Rob This line channelAccounts[i] in transactionbuilder need to be generate from Stellar.Keypair.fromSecret('corresponding private key'). That's how we will solve that issue
    – Suman Raj
    Sep 13, 2019 at 5:44

1 Answer 1


This is failing you because TransactionBuilder expects an AccountResponse as an argument.

Try the following:

const server = new Server(urlStellar);
const accountIssuer = (publicKey) => await server.loadAccount(publicKey);

new Stellar.TransactionBuilder(accountIssuer(i), opts={fee:100})

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.