obyte.js
GitHubDiscord
0.1.7
0.1.7
  • Obyte.js
  • Getting started
    • Quick start
    • Testnet
  • Client
    • Subscribe
    • Just saying
  • API
    • Get witnesses
    • Get peers
    • Get joint
    • Get last MCI
    • Get history
    • Get attestation
    • Get attestations
    • Get bots
    • Get asset metadata
    • Get definition
    • Get balances
    • Get profile units
    • Dry run AA (testnet)
    • Get AA state vars (testnet)
    • Get AAs by base AAs (testnet)
    • Get AA responses (testnet)
    • Core
      • Catchup
      • Get hash tree
      • Get light props
      • Post joint
      • Pick divisible coins for amount
      • Heartbeat
  • Post
    • Address definition change
    • Attestation
    • Asset
    • Asset attestors
    • Data
    • Data feed
    • Definition
    • Definition template
    • Payment
    • Poll
    • Vote
    • Profile
    • Text
  • Utils
    • Generate a random address
    • Get definition address
    • Is valid address
    • Keep connection alive
  • About
    • About
    • Links
    • Tutorials
Powered by GitBook
On this page
  • Example
  • Returns
  • Learn more
  1. API

Get AA responses (testnet)

Example

const params = {
  aa: 'PVMCXUZBEHCFWOLXUDQVNCQZ476LNEW4'
};

client.api.getAaResponses(params, function(err, result) {
  console.log(result);
});

Returns

[
  {
    mci: 962423,
    trigger_address: 'K237YYRMBYWCJBLSZGLJTXLZVVEXLI2Y',
    aa_address: 'PVMCXUZBEHCFWOLXUDQVNCQZ476LNEW4',
    trigger_unit: 'Isf7lP0sHTW0sBx9zQOfnD0VlVibsyWtWTHkFbR5n/E=',
    bounced: 0,
    response_unit: 'B7hMp29fbV7CGgFpTlhYrh/k+a43d26Es/7ne03BR8c=',
    response: {},
    objResponseUnit: {
      version: '2.0t',
      alt: '2',
      timestamp: 1563470108,
      messages: [
        {
          app: 'payment',
          payload: {
            outputs: [
              {
                address: 'K237YYRMBYWCJBLSZGLJTXLZVVEXLI2Y',
                amount: 9000
              },
              {
                address: 'PVMCXUZBEHCFWOLXUDQVNCQZ476LNEW4',
                amount: 1016
              }
            ],
            inputs: [
              {
                unit: 'pNy7JMUIxIFh+S14ULAl4GzVKyiBVgHX7J7f9UUliGE=',
                message_index: 0,
                output_index: 0
              },
              {
                unit: 'Isf7lP0sHTW0sBx9zQOfnD0VlVibsyWtWTHkFbR5n/E=',
                message_index: 0,
                output_index: 1
              }
            ]
          },
          payload_location: 'inline',
          payload_hash: '2eEycwOCy5IX8ZUyGvCabMjfhgd8o0s+hEInNYIvSr4='
        }
      ],
      authors: [
        {
          address: 'PVMCXUZBEHCFWOLXUDQVNCQZ476LNEW4'
        }
      ],
      last_ball_unit: '28rtEiHGq3kUKebUId2FzVbYL8yQkkU0i8u/Irwqx8Y=',
      last_ball: 'w1Qhv92IovFTqkF2eIsYVYG9vvZLL14746Fc1EwGV1Q=',
      witness_list_unit: 'TvqutGPz3T4Cs6oiChxFlclY92M2MvCvfXR5/FETato=',
      parent_units: ['Isf7lP0sHTW0sBx9zQOfnD0VlVibsyWtWTHkFbR5n/E='],
      headers_commission: 265,
      payload_commission: 257,
      unit: 'B7hMp29fbV7CGgFpTlhYrh/k+a43d26Es/7ne03BR8c=',
      main_chain_index: 962438
    }
  },
  ...
]

Learn more

PreviousGet AAs by base AAs (testnet)NextCore

Last updated 5 years ago

Autonomous agents documentation

Oscript editor

https://developer.obyte.org/autonomous-agents
https://oscript.org