@open-rights-exchange/orejs
Version:
Orejs is a Javascript helper library to provide simple high-level access to the ore-protocol. Orejs uses eosJS as a wrapper to the EOS blockchain.
17 lines • 1.01 kB
JavaScript
;
var _a = require('./compose'), ChainAction = _a.ChainAction, composeAction = _a.composeAction;
var RIGHT_CONTRACT_NAME = 'rights.ore';
function setRightsInRegistry(oreAccountName, rightData, broadcast) {
if (broadcast === void 0) { broadcast = true; }
// Enables the rights issuers add & modify rights, seperately from instruments
// upsertright(account_name issuer, string &right_name, vector<ore_types::endpoint_url> urls, vector<account_name> issuer_whitelist)
var right_name = rightData.right_name, urls = rightData.urls, issuer_whitelist = rightData.issuer_whitelist;
var args = { contractName: RIGHT_CONTRACT_NAME, issuer_whitelist: issuer_whitelist, oreAccountName: oreAccountName, right_name: right_name, urls: urls };
var action = composeAction(ChainAction.Ore_UpsertRight, args);
var actions = [action];
return this.transact(actions, broadcast);
}
module.exports = {
setRightsInRegistry: setRightsInRegistry
};
//# sourceMappingURL=rightsregistry.js.map