TypeError: client.payForTransaction is not a function

am trying to run payforTx

const payForTx = await client. payForTransaction(signedContractCallTx, { onAccount: payerAccount })
console.log(payForTx)

but i get this error UnhandledPromiseRejectionWarning: TypeError: client.payForTransaction is not a function

Any help

Hi @mghase, I am sorry you are facing this issue right now. This feature isn’t included in a release yet. You can only use it right now when adding the develop branch as dependency.

Instructions how to do that here:

1 Like

am geting this error during installation

npm i github:aeternity/aepp-sdk-js#develop
npm ERR! code 1
npm ERR! git dep preparation failed
npm ERR! command /usr/local/bin/node /usr/local/lib/node_modules/npm/bin/npm-cli.js install --force --cache=/Users/mawasiliano/.npm --prefer-offline=false --prefer-online=false --offline=false --no-progress --no-save --no-audit
npm ERR! npm WARN using --force Recommended protections disabled.
npm ERR! npm ERR! cb() never called!
npm ERR!
npm ERR! npm ERR! This is an error with npm itself. Please report this error at:
npm ERR! npm ERR! https://github.com/npm/cli/issues
npm ERR!
npm ERR! npm ERR! A complete log of this run can be found in:
npm ERR! npm ERR! /Users/mawasiliano/.npm/_logs/2021-07-20T15_48_09_219Z-debug.log

npm ERR! A complete log of this run can be found in:
npm ERR! /Users/mawasiliano/.npm/_logs/2021-07-20T15_48_12_745Z-debug.log

that’s strange. on my end it took a very long time but it finally worked. had no errors.

maybe you need to clean up your project before executing the command. on stackoverflow I found this answer: https://stackoverflow.com/a/66460379/2343286

1 Like