obyte.js
GitHubDiscord
0.1.8
0.1.8
  • 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
    • Sign message
    • 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 state vars (testnet)

Get state vars of an autonomous agents.

Example

const params = {
  address: 'TSDLQPZTSVDNC63G7YROC26CYCCZC4GO'
};

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

Returns

{
  last_proposal: '1',
  proposal_1: '1',
  proposal_1_amount: '25000',
  proposal_1_author: 'CWUD2ZRELMGI7CQIXRRGENRMSV2NFZOT',
  proposal_1_expiration: '1567288484',
  proposal_1_url: 'https://bit.ly/2Ka8HGo',
  proposal_1_vest: '40000',
  proposal_1_vote_K237YYRMBYWCJBLSZGLJTXLZVVEXLI2Y: '1',
  vested_JRYTRTNSVUXW7I2MMHUTNBMYSRGZRDCO: '10000',
  vested_K237YYRMBYWCJBLSZGLJTXLZVVEXLI2Y: '40000',
  vested_K237YYRMBYWCJBLSZGLJTXLZVVEXLI2Y_expiration: '1567288484',
  vested_total: '50000'
}

Learn more

PreviousDry run AA (testnet)NextGet AAs by base AAs (testnet)

Last updated 5 years ago

Autonomous agents documentation

Oscript editor

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