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 joint

Request data of a specific unit.

PreviousGet peersNextGet last MCI

Last updated 6 years ago

Example

const unit = 'k37Xlns198EHCtubX5X0kqbrnC9XYVTa0aFpR78gidM=';

client.api.getJoint(unit, function(err, result) {
  console.log(result);
});

Try on .

Returns

{
  joint: {
    unit: {
      unit: 'k37Xlns198EHCtubX5X0kqbrnC9XYVTa0aFpR78gidM=',
      version: '1.0',
      alt: '1',
      witness_list_unit: 'oj8yEksX9Ubq7lLc+p6F2uyHUuynugeVq4+ikT67X6E=',
      last_ball_unit: '9tIFlniHyoVJEp0i+WHMTZqnnR1UqgAhrIWFRkgE8m0=',
      last_ball: 'qxl8Rq1IjVUICgbm9A1+d+ZC3pG75HoDEFTchdL6scg=',
      headers_commission: 344,
      payload_commission: 123,
      main_chain_index: 2870558,
      timestamp: 1529756195,
      parent_units: [
        '0V3X7wyTl/17YX83YbjFgyJ2LRNxbgT5jXQOdLvZR2A=',
        'HJoe07dHWj5fH5s7PMgwbtryM/o14YERshGVz4cP1BQ='
      ],
      authors: [
        {
          address: 'S7N5FE42F6ONPNDQLCF64E2MGFYKQR2I',
          authentifiers: {
            r: 'nNx6QBfwIQkZydLEDXs/di0U5wqFaw4L15OCGICFGkwDgDh3KK+ks5hxFoUhSLxiZZIeNt1gIjmpKFv+bIiDtQ=='
          }
        }
      ],
      messages: [
        {
          app: 'payment',
          payload_hash: 'g0eNA+42F6Zxx650BLNxUKAwx3R3HJ/pC1tjxXVg8Lg=',
          payload_location: 'inline',
          payload: {
            inputs: [
              {
                type: 'witnessing',
                from_main_chain_index: 580671,
                to_main_chain_index: 580684
              }
            ],
            outputs: [
              {
                address: 'S7N5FE42F6ONPNDQLCF64E2MGFYKQR2I',
                amount: 79
              }
            ]
          }
        }
      ]
    },
    ball: 'XRz6FcvpNLjrzXkCeQGIM/ekqQTrmB/kBEpn1grsrI0='
  }
}

Learn more

"12. Unit structure" (page 15)

JSFiddle
https://obyte.org/Byteball.pdf