obyte.js
GitHubDiscord
0.1.19
0.1.19
  • Obyte.js
  • Getting started
    • Quick start
    • Testnet
  • 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
    • Get data feed
    • Autonomous Agents
      • Dry run AA
      • Get AA state vars
      • Get AAs by base AAs
      • Get AA responses
      • Get AA response chain
      • Execute AA getter
    • 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
    • Multi
  • Client
    • Subscribe
    • Just saying
    • Requests
  • Utils
    • Sign a message
    • Validate signed message
    • Generate a random address
    • Get definition address
    • Is valid address
    • Keep connection alive
  • About
    • About
    • Links
    • Tutorials
Powered by GitBook
On this page
  • Returns
  • Example
  1. Post

Multi

Broadcast multiple messages in a single unit.

Returns

Returns the unit hash.

Example

const params = [
    {
        app: "payment",
        payload: {
            outputs: [
                { address: "AA_ADDRESS", amount: 10000 }
            ]
        }
    },
    {
        app: "payment",
        payload: {
            asset: "CUSTOM_ASSET_ID",
            outputs: [
                { address: "AA_ADDRESS", amount: 1 }
            ]
        }
    },
    {
        app: "data",
        payload: {
            key: "value",
            another_key: {
                subkey: "other value",
                another_subkey: 232
            }
        }
    }
];

client.post.multi(params, wif, function(err, result) {
  if (err) return console.error(err);
  console.log(err, result);
});

PreviousTextNextSubscribe

Last updated 3 years ago