@agent-fuel/sdk 0.3.0 → 0.3.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.cjs CHANGED
@@ -3836,9 +3836,16 @@ async function pay(args) {
3836
3836
  receiptUsed: receipt,
3837
3837
  systemProgram: web3_js.SystemProgram.programId
3838
3838
  });
3839
- const spendIx = await spendBuilder.instruction();
3840
- const recordIx = await recordBuilder.instruction();
3841
- const tx = new web3_js.Transaction().add(createAtaIx, spendIx, recordIx);
3839
+ const computeBuilder = rep.methods.computeScore().accounts({
3840
+ caller: agent.publicKey,
3841
+ agentProfile
3842
+ });
3843
+ const [spendIx, recordIx, computeIx] = await Promise.all([
3844
+ spendBuilder.instruction(),
3845
+ recordBuilder.instruction(),
3846
+ computeBuilder.instruction()
3847
+ ]);
3848
+ const tx = new web3_js.Transaction().add(createAtaIx, spendIx, recordIx, computeIx);
3842
3849
  try {
3843
3850
  const signature = await web3_js.sendAndConfirmTransaction(
3844
3851
  connection,