evernode-js-client 0.5.3 → 0.5.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/index.js +26 -3
  2. package/package.json +1 -1
package/index.js CHANGED
@@ -12145,6 +12145,17 @@ class BaseEvernodeClient {
12145
12145
  }
12146
12146
  }
12147
12147
  }
12148
+ else if (tx.Memos.length >= 1 &&
12149
+ tx.Memos[0].type === MemoTypes.HOST_REBATE) {
12150
+
12151
+ return {
12152
+ name: EvernodeEvents.HostRebate,
12153
+ data: {
12154
+ transaction: tx,
12155
+ host: tx.Account
12156
+ }
12157
+ }
12158
+ }
12148
12159
 
12149
12160
  return null;
12150
12161
  }
@@ -12626,6 +12637,15 @@ class HostClient extends BaseEvernodeClient {
12626
12637
  options.transactionOptions);
12627
12638
  }
12628
12639
 
12640
+ async requestRebate(options = {}) {
12641
+ return this.xrplAcc.makePayment(this.registryAddress,
12642
+ XrplConstants.MIN_XRP_AMOUNT,
12643
+ XrplConstants.XRP,
12644
+ null,
12645
+ [{ type: MemoTypes.HOST_REBATE, format: "", data: "" }],
12646
+ options.transactionOptions);
12647
+ }
12648
+
12629
12649
  getLeaseNFTokenIdPrefix() {
12630
12650
  let buf = Buffer.allocUnsafe(24);
12631
12651
  buf.writeUInt16BE(1);
@@ -12656,7 +12676,8 @@ const RegistryEvents = {
12656
12676
  RegistryInitialized: EvernodeEvents.RegistryInitialized,
12657
12677
  Heartbeat: EvernodeEvents.Heartbeat,
12658
12678
  HostPostDeregistered: EvernodeEvents.HostPostDeregistered,
12659
- DeadHostPrune: EvernodeEvents.DeadHostPrune
12679
+ DeadHostPrune: EvernodeEvents.DeadHostPrune,
12680
+ HostRebate: EvernodeEvents.HostRebate
12660
12681
  }
12661
12682
 
12662
12683
  class RegistryClient extends BaseEvernodeClient {
@@ -13398,7 +13419,8 @@ const MemoTypes = {
13398
13419
  REGISTRY_INIT: 'evnInitialize',
13399
13420
  REFUND: 'evnRefund',
13400
13421
  REFUND_REF: 'evnRefundRef',
13401
- DEAD_HOST_PRUNE: 'evnDeadHostPrune'
13422
+ DEAD_HOST_PRUNE: 'evnDeadHostPrune',
13423
+ HOST_REBATE: 'evnHostRebate'
13402
13424
  }
13403
13425
 
13404
13426
  const MemoFormats = {
@@ -13466,7 +13488,8 @@ const EvernodeEvents = {
13466
13488
  HostRegUpdated: "HostRegUpdated",
13467
13489
  HostReRegistered: "HostReRegistered",
13468
13490
  RegistryInitialized: "RegistryInitialized",
13469
- DeadHostPrune: "DeadHostPrune"
13491
+ DeadHostPrune: "DeadHostPrune",
13492
+ HostRebate: "HostRebate"
13470
13493
  }
13471
13494
 
13472
13495
  module.exports = {
package/package.json CHANGED
@@ -6,7 +6,7 @@
6
6
  ],
7
7
  "homepage": "https://github.com/HotPocketDev/evernode-js-client",
8
8
  "license": "MIT",
9
- "version": "0.5.3",
9
+ "version": "0.5.4",
10
10
  "dependencies": {
11
11
  "elliptic": "6.5.4",
12
12
  "ripple-address-codec": "4.2.0",