chia-agent
Version:
chia rpc/websocket client library
260 lines (259 loc) • 13.4 kB
JavaScript
"use strict";
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
return new (P || (P = Promise))(function (resolve, reject) {
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
step((generator = generator.apply(thisArg, _arguments || [])).next());
});
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.get_root_history_command = exports.get_kv_diff = exports.get_kv_diff_command = exports.subscriptions = exports.subscriptions_command = exports.remove_subscriptions = exports.remove_subscriptions_command = exports.get_mirrors = exports.get_mirrors_command = exports.delete_mirror = exports.delete_mirror_command = exports.add_mirror = exports.add_mirror_command = exports.unsubscribe = exports.unsubscribe_command = exports.subscribe = exports.subscribe_command = exports.insert = exports.insert_command = exports.delete_key = exports.delete_key_command = exports.get_roots = exports.get_roots_command = exports.get_local_root = exports.get_local_root_command = exports.get_root = exports.get_root_command = exports.get_ancestors = exports.get_ancestors_command = exports.get_keys_values = exports.get_keys_values_command = exports.get_keys = exports.get_keys_command = exports.get_value = exports.get_value_command = exports.submit_all_pending_roots = exports.submit_all_pending_roots_command = exports.submit_pending_root = exports.submit_pending_root_command = exports.multistore_batch_update = exports.multistore_batch_update_command = exports.batch_update = exports.batch_update_command = exports.get_owned_stores = exports.get_owned_stores_command = exports.create_data_store = exports.create_data_store_command = exports.wallet_log_in = exports.wallet_log_in_command = exports.chia_data_layer_service = void 0;
exports.verify_proof = exports.verify_proof_command = exports.get_proof = exports.get_proof_command = exports.clear_pending_roots = exports.clear_pending_roots_command = exports.check_plugins = exports.check_plugins_command = exports.get_sync_status = exports.get_sync_status_command = exports.cancel_offer = exports.cancel_offer_command = exports.verify_offer = exports.verify_offer_command = exports.take_offer = exports.take_offer_command = exports.make_offer = exports.make_offer_command = exports.add_missing_files = exports.add_missing_files_command = exports.get_root_history = void 0;
exports.chia_data_layer_service = "chia_data_layer";
exports.wallet_log_in_command = "wallet_log_in";
function wallet_log_in(agent, params) {
return __awaiter(this, void 0, void 0, function* () {
return agent.sendMessage(exports.chia_data_layer_service, exports.wallet_log_in_command, params);
});
}
exports.wallet_log_in = wallet_log_in;
exports.create_data_store_command = "create_data_store";
function create_data_store(agent, params) {
return __awaiter(this, void 0, void 0, function* () {
return agent.sendMessage(exports.chia_data_layer_service, exports.create_data_store_command, params);
});
}
exports.create_data_store = create_data_store;
exports.get_owned_stores_command = "get_owned_stores";
function get_owned_stores(agent) {
return __awaiter(this, void 0, void 0, function* () {
return agent.sendMessage(exports.chia_data_layer_service, exports.get_owned_stores_command);
});
}
exports.get_owned_stores = get_owned_stores;
exports.batch_update_command = "batch_update";
function batch_update(agent, params) {
return __awaiter(this, void 0, void 0, function* () {
return agent.sendMessage(exports.chia_data_layer_service, exports.batch_update_command, params);
});
}
exports.batch_update = batch_update;
exports.multistore_batch_update_command = "multistore_batch_update";
function multistore_batch_update(agent, params) {
return __awaiter(this, void 0, void 0, function* () {
return agent.sendMessage(exports.chia_data_layer_service, exports.multistore_batch_update_command, params);
});
}
exports.multistore_batch_update = multistore_batch_update;
exports.submit_pending_root_command = "submit_pending_root";
function submit_pending_root(agent, params) {
return __awaiter(this, void 0, void 0, function* () {
return agent.sendMessage(exports.chia_data_layer_service, exports.submit_pending_root_command, params);
});
}
exports.submit_pending_root = submit_pending_root;
exports.submit_all_pending_roots_command = "submit_all_pending_roots";
function submit_all_pending_roots(agent, params) {
return __awaiter(this, void 0, void 0, function* () {
return agent.sendMessage(exports.chia_data_layer_service, exports.submit_all_pending_roots_command, params);
});
}
exports.submit_all_pending_roots = submit_all_pending_roots;
exports.get_value_command = "get_value";
function get_value(agent, params) {
return __awaiter(this, void 0, void 0, function* () {
return agent.sendMessage(exports.chia_data_layer_service, exports.get_value_command, params);
});
}
exports.get_value = get_value;
exports.get_keys_command = "get_keys";
function get_keys(agent, params) {
return __awaiter(this, void 0, void 0, function* () {
return agent.sendMessage(exports.chia_data_layer_service, exports.get_keys_command, params);
});
}
exports.get_keys = get_keys;
exports.get_keys_values_command = "get_keys_values";
function get_keys_values(agent, params) {
return __awaiter(this, void 0, void 0, function* () {
return agent.sendMessage(exports.chia_data_layer_service, exports.get_keys_values_command, params);
});
}
exports.get_keys_values = get_keys_values;
exports.get_ancestors_command = "get_ancestors";
function get_ancestors(agent, params) {
return __awaiter(this, void 0, void 0, function* () {
return agent.sendMessage(exports.chia_data_layer_service, exports.get_ancestors_command, params);
});
}
exports.get_ancestors = get_ancestors;
exports.get_root_command = "get_root";
function get_root(agent, params) {
return __awaiter(this, void 0, void 0, function* () {
return agent.sendMessage(exports.chia_data_layer_service, exports.get_root_command, params);
});
}
exports.get_root = get_root;
exports.get_local_root_command = "get_local_root";
function get_local_root(agent, params) {
return __awaiter(this, void 0, void 0, function* () {
return agent.sendMessage(exports.chia_data_layer_service, exports.get_local_root_command, params);
});
}
exports.get_local_root = get_local_root;
exports.get_roots_command = "get_roots";
function get_roots(agent, params) {
return __awaiter(this, void 0, void 0, function* () {
return agent.sendMessage(exports.chia_data_layer_service, exports.get_roots_command, params);
});
}
exports.get_roots = get_roots;
exports.delete_key_command = "delete_key";
function delete_key(agent, params) {
return __awaiter(this, void 0, void 0, function* () {
return agent.sendMessage(exports.chia_data_layer_service, exports.delete_key_command, params);
});
}
exports.delete_key = delete_key;
exports.insert_command = "insert";
function insert(agent, params) {
return __awaiter(this, void 0, void 0, function* () {
return agent.sendMessage(exports.chia_data_layer_service, exports.insert_command, params);
});
}
exports.insert = insert;
exports.subscribe_command = "subscribe";
function subscribe(agent, params) {
return __awaiter(this, void 0, void 0, function* () {
return agent.sendMessage(exports.chia_data_layer_service, exports.subscribe_command, params);
});
}
exports.subscribe = subscribe;
exports.unsubscribe_command = "unsubscribe";
function unsubscribe(agent, params) {
return __awaiter(this, void 0, void 0, function* () {
return agent.sendMessage(exports.chia_data_layer_service, exports.unsubscribe_command, params);
});
}
exports.unsubscribe = unsubscribe;
exports.add_mirror_command = "add_mirror";
function add_mirror(agent, params) {
return __awaiter(this, void 0, void 0, function* () {
return agent.sendMessage(exports.chia_data_layer_service, exports.add_mirror_command, params);
});
}
exports.add_mirror = add_mirror;
exports.delete_mirror_command = "delete_mirror";
function delete_mirror(agent, params) {
return __awaiter(this, void 0, void 0, function* () {
return agent.sendMessage(exports.chia_data_layer_service, exports.delete_mirror_command, params);
});
}
exports.delete_mirror = delete_mirror;
exports.get_mirrors_command = "get_mirrors";
function get_mirrors(agent, params) {
return __awaiter(this, void 0, void 0, function* () {
return agent.sendMessage(exports.chia_data_layer_service, exports.get_mirrors_command, params);
});
}
exports.get_mirrors = get_mirrors;
exports.remove_subscriptions_command = "remove_subscriptions";
function remove_subscriptions(agent, params) {
return __awaiter(this, void 0, void 0, function* () {
return agent.sendMessage(exports.chia_data_layer_service, exports.remove_subscriptions_command, params);
});
}
exports.remove_subscriptions = remove_subscriptions;
exports.subscriptions_command = "subscriptions";
function subscriptions(agent) {
return __awaiter(this, void 0, void 0, function* () {
return agent.sendMessage(exports.chia_data_layer_service, exports.subscriptions_command);
});
}
exports.subscriptions = subscriptions;
exports.get_kv_diff_command = "get_kv_diff";
function get_kv_diff(agent, params) {
return __awaiter(this, void 0, void 0, function* () {
return agent.sendMessage(exports.chia_data_layer_service, exports.get_kv_diff_command, params);
});
}
exports.get_kv_diff = get_kv_diff;
exports.get_root_history_command = "get_root_history";
function get_root_history(agent, params) {
return __awaiter(this, void 0, void 0, function* () {
return agent.sendMessage(exports.chia_data_layer_service, exports.get_root_history_command, params);
});
}
exports.get_root_history = get_root_history;
exports.add_missing_files_command = "add_missing_files";
function add_missing_files(agent, params) {
return __awaiter(this, void 0, void 0, function* () {
return agent.sendMessage(exports.chia_data_layer_service, exports.add_missing_files_command, params);
});
}
exports.add_missing_files = add_missing_files;
exports.make_offer_command = "make_offer";
function make_offer(agent, params) {
return __awaiter(this, void 0, void 0, function* () {
return agent.sendMessage(exports.chia_data_layer_service, exports.make_offer_command, params);
});
}
exports.make_offer = make_offer;
exports.take_offer_command = "take_offer";
function take_offer(agent, params) {
return __awaiter(this, void 0, void 0, function* () {
return agent.sendMessage(exports.chia_data_layer_service, exports.take_offer_command, params);
});
}
exports.take_offer = take_offer;
exports.verify_offer_command = "verify_offer";
function verify_offer(agent, params) {
return __awaiter(this, void 0, void 0, function* () {
return agent.sendMessage(exports.chia_data_layer_service, exports.verify_offer_command, params);
});
}
exports.verify_offer = verify_offer;
exports.cancel_offer_command = "cancel_offer";
function cancel_offer(agent, params) {
return __awaiter(this, void 0, void 0, function* () {
return agent.sendMessage(exports.chia_data_layer_service, exports.cancel_offer_command, params);
});
}
exports.cancel_offer = cancel_offer;
exports.get_sync_status_command = "get_sync_status";
function get_sync_status(agent, params) {
return __awaiter(this, void 0, void 0, function* () {
return agent.sendMessage(exports.chia_data_layer_service, exports.get_sync_status_command, params);
});
}
exports.get_sync_status = get_sync_status;
exports.check_plugins_command = "check_plugins";
function check_plugins(agent) {
return __awaiter(this, void 0, void 0, function* () {
return agent.sendMessage(exports.chia_data_layer_service, exports.check_plugins_command);
});
}
exports.check_plugins = check_plugins;
exports.clear_pending_roots_command = "clear_pending_roots";
function clear_pending_roots(agent, params) {
return __awaiter(this, void 0, void 0, function* () {
return agent.sendMessage(exports.chia_data_layer_service, exports.clear_pending_roots_command, params);
});
}
exports.clear_pending_roots = clear_pending_roots;
exports.get_proof_command = "get_proof";
function get_proof(agent, params) {
return __awaiter(this, void 0, void 0, function* () {
return agent.sendMessage(exports.chia_data_layer_service, exports.get_proof_command, params);
});
}
exports.get_proof = get_proof;
exports.verify_proof_command = "verify_proof";
function verify_proof(agent, params) {
return __awaiter(this, void 0, void 0, function* () {
return agent.sendMessage(exports.chia_data_layer_service, exports.verify_proof_command, params);
});
}
exports.verify_proof = verify_proof;