All URIs are relative to http://localhost
Method | HTTP request | Description |
---|---|---|
runScript | POST /{ledger}/script | Execute Numscript |
ScriptResult runScript(script)
Execute a Numscript and create the transaction if any
import { ScriptApi, createConfiguration } from '@numaryhq/ledger-nodejs';
import * as fs from 'fs';
const configuration = createConfiguration();
const apiInstance = new ScriptApi(configuration);
apiInstance.runScript("ledger_example", {
plain: "plain_example",
vars: {},
}, true ).then((data:any) => {
console.log('API called successfully. Returned data: ' + data);
}).catch((error:any) => console.error(error));
Name | Type | Description | Notes |
---|---|---|---|
script | Script | script | |
ledger | [string] | ledger | defaults to undefined |
preview | [boolean] | Preview mode | (optional) defaults to undefined |
ScriptResult
- Content-Type: application/json
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | OK | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]