evernode-js-client 0.6.23 → 0.6.25
Sign up to get free protection for your applications and to get access to all the features.
- package/evernode-license.pdf +0 -0
- package/index.js +7 -2
- package/package.json +2 -2
Binary file
|
package/index.js
CHANGED
@@ -53519,7 +53519,7 @@ class HostClient extends BaseEvernodeClient {
|
|
53519
53519
|
throw "Host already registered.";
|
53520
53520
|
|
53521
53521
|
// Check whether are there lease offers in for the host due to a previous registration.
|
53522
|
-
const existingLeaseURITokens = (await this.xrplAcc.getURITokens()).filter(n => EvernodeHelpers.isValidURI(n.URI, EvernodeConstants.LEASE_TOKEN_PREFIX_HEX));
|
53522
|
+
const existingLeaseURITokens = (await this.xrplAcc.getURITokens()).filter(n => n.Issuer == this.xrplAcc.address && EvernodeHelpers.isValidURI(n.URI, EvernodeConstants.LEASE_TOKEN_PREFIX_HEX));
|
53523
53523
|
if (existingLeaseURITokens) {
|
53524
53524
|
console.log("Burning unsold URITokens related to the previous leases.");
|
53525
53525
|
for (const uriToken of existingLeaseURITokens) {
|
@@ -55107,7 +55107,7 @@ const NFT_PAGE_LEDGER_ENTRY_TYPE_HEX = '0050';
|
|
55107
55107
|
|
55108
55108
|
class EvernodeHelpers {
|
55109
55109
|
static async getLeaseOffers(xrplAcc) {
|
55110
|
-
const hostUriOffers = (await xrplAcc.getURITokens()).filter(uriToken => this.isValidURI(uriToken.URI, EvernodeConstants.LEASE_TOKEN_PREFIX_HEX) && uriToken.Flags == 1 && uriToken.Amount);
|
55110
|
+
const hostUriOffers = (await xrplAcc.getURITokens()).filter(uriToken => uriToken.Issuer == xrplAcc.address && this.isValidURI(uriToken.URI, EvernodeConstants.LEASE_TOKEN_PREFIX_HEX) && uriToken.Flags == 1 && uriToken.Amount);
|
55111
55111
|
return hostUriOffers;
|
55112
55112
|
}
|
55113
55113
|
|
@@ -57759,6 +57759,11 @@ class XrplApi {
|
|
57759
57759
|
return resp?.result;
|
57760
57760
|
}
|
57761
57761
|
|
57762
|
+
async getServerInfo() {
|
57763
|
+
const resp = (await this.#handleClientRequest({ command: 'server_info' }));
|
57764
|
+
return resp?.result;
|
57765
|
+
}
|
57766
|
+
|
57762
57767
|
async getAccountObjects(address, options) {
|
57763
57768
|
return this.#requestWithPaging({ command: 'account_objects', account: address, ...options }, API_REQ_TYPE.ACCOUNT_OBJECTS);
|
57764
57769
|
}
|
package/package.json
CHANGED
@@ -5,8 +5,8 @@
|
|
5
5
|
"Evernode"
|
6
6
|
],
|
7
7
|
"homepage": "https://github.com/HotPocketDev/evernode-js-client",
|
8
|
-
"license": "
|
9
|
-
"version": "0.6.
|
8
|
+
"license": "SEE LICENSE IN https://raw.githubusercontent.com/EvernodeXRPL/evernode-resources/main/license/evernode-license.pdf",
|
9
|
+
"version": "0.6.25",
|
10
10
|
"dependencies": {
|
11
11
|
"elliptic": "6.5.4",
|
12
12
|
"libsodium-wrappers": "0.7.10",
|