yarn add obyte-http-client
import obyte from "obyte-http-client"
import obyte from "obyte-http-client";
export default new obyte.Client({
testnet: true
});
import obyteClientInstance from "...";
const witnesses = obyteClientInstance.getWitnesses();
const witnesses = obyteClientInstance.getWitnesses(); // use cache
const witnesses = obyteClientInstance.getWitnesses(true); // update every time
const peers = obyteClientInstance.getPeers();
const joint = obyteClientInstance.getJoint('k37Xlns198EHCtubX5X0kqbrnC9XYVTa0aFpR78gidM=');
const last_mci = obyteClientInstance.getLastMci();
const history = obyteClientInstance.getHistory(["ULQA63NGEZACP4N7ZMBUBISH6ZTCUS2Q"]);
const attestation = obyteClientInstance.getAttestation("H5EZTQE7ABFH27AUDTQFMZIALANK6RBG", "email", "obyte@obyte.org");
const attestations = obyteClientInstance.getAttestations("ULQA63NGEZACP4N7ZMBUBISH6ZTCUS2Q");
const definition = obyteClientInstance.getDefinition("TMWNLXR42CKIP4A774BQGNVBZAPHY7GH");
const balances = obyteClientInstance.getBalances(["TMWNLXR42CKIP4A774BQGNVBZAPHY7GH"]);
const profile_units = obyteClientInstance.getProfileUnits(["TMWNLXR42CKIP4A774BQGNVBZAPHY7GH"]);
const data = obyteClientInstance.getDataFeed(["I2ADHGP4HL6J37NQAD73J7E5SKFIXJOT"], "timestamp", "none");
const trigger = {
address: 'K237YYRMBYWCJBLSZGLJTXLZVVEXLI2Y', // sent from address
outputs: {
'base': 10000 // default AA bounce fee in bytes
},
data: {
'vest': true
}
};
const result = obyteClientInstance.dryRunAa("TSDLQPZTSVDNC63G7YROC26CYCCZC4GO", trigger);
const state_vars = obyteClientInstance.getAaStateVars("TSDLQPZTSVDNC63G7YROC26CYCCZC4GO", "proposal_1");
const aas = obyteClientInstance.getAasByBaseAas("QFM5ECICVHZKRVTW3EMVTUSYJ6P2WLDY"); // or ["QFM5ECICVHZKRVTW3EMVTUSYJ6P2WLDY"]
const responses = obyteClientInstance.getAaResponses("PVMCXUZBEHCFWOLXUDQVNCQZ476LNEW4"); // or ["PVMCXUZBEHCFWOLXUDQVNCQZ476LNEW4"]
const response_chain = obyteClientInstance.getAaResponseChain("QjJsukONZ57VBVtLk/0ak1jMYNW0vw7q0So95KBJH2k=");
const result = obyteClientInstance.executeGetter("VLKI3XMMX5YULOBA6ZXBXDPI6TXF6V3D", "get_exchange_result", [0, 100]);
To support our work, donate through kivach.org.