Smart Contract

Certainly! Here's the documentation for the Smart Contracts section:

NeucronSDK Documentation

Smart Contracts

txAsm(options, queryParams)

Generates a transaction assembly for a given set of options.

import NeucronSDK from "./src/neucron-sdk.js";

const neucronSDK = new NeucronSDK();
const login = await neucronSDK.authentication.login({
  email: 'your_email@example.com',
  password: 'your_password'
});

const options = {
  'satoshi': 100,
  'script': 'OP_DUP OP_HASH160 4a548f3da5526d1e2f8b5c3584ebb9739edfbe3b OP_EQUALVERIFY OP_CHECKSIG'
};

const queryParams = {};

// eslint-disable-next-line no-console
console.log(await neucronSDK.smartContracts.txAsm(options, queryParams));

// Example Response:
// {
//   data: {
//     txid: '6f08e981ea01bcc0ee42a6df08d8692c34b23eaf560eded335ec66f0f853aac9'
//   },
//   status_code: 200
// }

txMultiple(options, queryParams)

Generates a multiple-input, multiple-output transaction for a given set of options.

Replace 'your_email@example.com' and 'your_password' with your actual credentials when using the documentation.

Last updated