lib/order/txns/index.js

  1. /*
  2. * Copyright (C) 2021-2022 Algodex VASP (BVI) Corp.
  3. *
  4. * This Source Code Form is subject to the terms of the Mozilla Public
  5. * License, v. 2.0. If a copy of the MPL was not distributed with this
  6. * file, You can obtain one at https://mozilla.org/MPL/2.0/.
  7. */
  8. const makeApplicationCreateTxn = require('./makeApplicationCreateTxn');
  9. const buyTxns = require('./buy');
  10. const sellTxns = require('./sell');
  11. const closeTxns = require('./close');
  12. /**
  13. * # Transactions
  14. *
  15. * @namespace Transactions
  16. **/
  17. module.exports = {
  18. ...buyTxns,
  19. ...sellTxns,
  20. ...closeTxns,
  21. makeApplicationCreateTxn,
  22. };
  23. /**
  24. * # Signable Transaction
  25. *
  26. * A shape for all transactions. It's main purpoes is to associate a transaction to it's signing method.
  27. * It either has a Logic Signature Account or needs to be signed by the end user's Wallet.
  28. *
  29. * @typedef {Object} SignableTxn
  30. * @property {algosdk.Transaction} unsignedTxn A unsigned Transaction
  31. * @property {algosdk.Account | Wallet | undefined} [senderAcct] Wallet or Algosdk Account
  32. * @property {algosdk.LogicSigAccount | undefined} [lsig] Logic Signature Account
  33. * @memberOf Transactions
  34. */
  35. /**
  36. * # Outer Transactions
  37. *
  38. * Returned by any transaction factory in the {@link module:txns/buy} or {@link module:txns/sell} modules. These
  39. * structures are based on the underlying TEAL Smart Contract. You can find out more in each transaction
  40. * generators documentation page.
  41. *
  42. * @typedef {Transactions.SignableTxn} OuterTransactions
  43. * @memberOf Transactions
  44. */
  45. JAVASCRIPT
    Copied!