Source

js-stellar-base/src/operations/inflation.js

  1. import xdr from '../xdr';
  2. /**
  3. * This operation generates the inflation.
  4. * @function
  5. * @alias Operation.inflation
  6. * @param {object} [opts] Options object
  7. * @param {string} [opts.source] - The optional source account.
  8. * @returns {xdr.InflationOp} Inflation operation
  9. */
  10. export function inflation(opts = {}) {
  11. const opAttributes = {};
  12. opAttributes.body = xdr.OperationBody.inflation();
  13. this.setSourceAccount(opAttributes, opts);
  14. return new xdr.Operation(opAttributes);
  15. }