es/ae/oracle.js
async function postQueryToOracle (oracleId, query, options = {}) {
  const opt = R.merge(this.Ae.defaults, options)
  const senderId = await this.address()

  const { tx: oracleRegisterTx, queryId } = await this.oraclePostQueryTx(R.merge(opt, {
    oracleId,
    senderId,
    query
  }))
  return {
    ...(await this.send(oracleRegisterTx, opt)),
    ...(await (await getOracleObject.bind(this)(oracleId)).getQuery(queryId))
  }
}
async function postQueryToOracle (oracleId, query, options = {}) {
  const opt = R.merge(this.Ae.defaults, options)
  const senderId = await this.address()

  const { tx: oracleRegisterTx, queryId } = await this.oraclePostQueryTx(R.merge(opt, {
    oracleId,
    senderId,
    query
  }))
  return {
    ...(await this.send(oracleRegisterTx, opt)),
    ...(await (await getOracleObject.bind(this)(oracleId)).getQuery(queryId))
  }
}
async function postQueryToOracle ( oracleId , query , options = { } ) { const opt = R . merge ( this . Ae . defaults , options ) const senderId = await this . address ( ) const { tx : oracleRegisterTx , queryId } = await this . oraclePostQueryTx ( R . merge ( opt , { oracleId , senderId , query } ) ) return { ... ( await this . send ( oracleRegisterTx , opt ) ) , ... ( await ( await getOracleObject . bind ( this ) ( oracleId ) ) . getQuery ( queryId ) ) } }
Post query to oracle
@alias module:@aeternity/aepp-sdk/es/ae/oracle
@instance
@function
@category async
@param {String} oracleId Oracle public key
@param {String} query Oracle query object
@param {Object} [options={}]
@param {String|Number} [options.queryTtl] queryTtl Oracle query time to leave
@param {String|Number} [options.responseTtl] queryFee Oracle query response time to leave
@param {String|Number} [options.queryFee] queryFee Oracle query fee
@param {Number} [options.fee] fee Transaction fee
@param {Number} [options.ttl] Transaction time to leave
@return {Promise<Object>} Query object
Post query to oracle