mirror of
https://github.com/XRPLF/rippled.git
synced 2025-12-06 17:27:55 +00:00
Added interface for rt_accounts.
This commit is contained in:
@@ -148,7 +148,7 @@ Request.prototype.ripple_state = function (account, issuer, currency) {
|
|||||||
return this;
|
return this;
|
||||||
};
|
};
|
||||||
|
|
||||||
Request.prototype.accounts = function (accounts) {
|
Request.prototype.accounts = function (accounts, realtime) {
|
||||||
if ("object" !== typeof accounts) {
|
if ("object" !== typeof accounts) {
|
||||||
accounts = [accounts];
|
accounts = [accounts];
|
||||||
}
|
}
|
||||||
@@ -158,11 +158,19 @@ Request.prototype.accounts = function (accounts) {
|
|||||||
for (var i = 0, l = accounts.length; i < l; i++) {
|
for (var i = 0, l = accounts.length; i < l; i++) {
|
||||||
procAccounts.push(UInt160.json_rewrite(accounts[i]));
|
procAccounts.push(UInt160.json_rewrite(accounts[i]));
|
||||||
}
|
}
|
||||||
|
if (realtime) {
|
||||||
|
this.message.rt_accounts = procAccounts;
|
||||||
|
} else {
|
||||||
this.message.accounts = procAccounts;
|
this.message.accounts = procAccounts;
|
||||||
|
}
|
||||||
|
|
||||||
return this;
|
return this;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Request.prototype.rt_accounts = function (accounts) {
|
||||||
|
return this.accounts(accounts, true);
|
||||||
|
};
|
||||||
|
|
||||||
//
|
//
|
||||||
// Remote - access to a remote Ripple server via websocket.
|
// Remote - access to a remote Ripple server via websocket.
|
||||||
//
|
//
|
||||||
@@ -547,7 +555,7 @@ Remote.prototype.request_ledger = function (params) {
|
|||||||
|
|
||||||
// Only for unit testing.
|
// Only for unit testing.
|
||||||
Remote.prototype.request_ledger_hash = function () {
|
Remote.prototype.request_ledger_hash = function () {
|
||||||
assert(this.trusted); // If not trusted, need to check proof.
|
//assert(this.trusted); // If not trusted, need to check proof.
|
||||||
|
|
||||||
return new Request(this, 'ledger_closed');
|
return new Request(this, 'ledger_closed');
|
||||||
};
|
};
|
||||||
@@ -569,7 +577,7 @@ Remote.prototype.request_ledger_current = function () {
|
|||||||
// .ledger_index()
|
// .ledger_index()
|
||||||
// .offer_id()
|
// .offer_id()
|
||||||
Remote.prototype.request_ledger_entry = function (type) {
|
Remote.prototype.request_ledger_entry = function (type) {
|
||||||
assert(this.trusted); // If not trusted, need to check proof, maybe talk packet protocol.
|
//assert(this.trusted); // If not trusted, need to check proof, maybe talk packet protocol.
|
||||||
|
|
||||||
var self = this;
|
var self = this;
|
||||||
var request = new Request(this, 'ledger_entry');
|
var request = new Request(this, 'ledger_entry');
|
||||||
@@ -652,7 +660,7 @@ Remote.prototype.request_unsubscribe = function (streams) {
|
|||||||
};
|
};
|
||||||
|
|
||||||
Remote.prototype.request_transaction_entry = function (hash) {
|
Remote.prototype.request_transaction_entry = function (hash) {
|
||||||
assert(this.trusted); // If not trusted, need to check proof, maybe talk packet protocol.
|
//assert(this.trusted); // If not trusted, need to check proof, maybe talk packet protocol.
|
||||||
|
|
||||||
return (new Request(this, 'transaction_entry'))
|
return (new Request(this, 'transaction_entry'))
|
||||||
.tx_hash(hash);
|
.tx_hash(hash);
|
||||||
|
|||||||
Reference in New Issue
Block a user