evernode-js-client 0.6.10 → 0.6.12

Sign up to get free protection for your applications and to get access to all the features.
package/index.js CHANGED
@@ -11889,7 +11889,7 @@ class BaseEvernodeClient {
11889
11889
 
11890
11890
  /**
11891
11891
  * Get start index (timestamp) of the moment.
11892
- * @param {number} index [Optional] Index (timestamp) to get the moment value.
11892
+ * @param {number} index [Optional] Index (timestamp) to get the moment start index.
11893
11893
  * @returns The index (timestamp) of the moment as a 'number'. Returns the current moment's start index (timestamp) if ledger index parameter is not given.
11894
11894
  */
11895
11895
  async getMomentStartIndex(index = null) {
@@ -12346,6 +12346,9 @@ class BaseEvernodeClient {
12346
12346
  const tokenIdStateIndex = StateHelpers.getHookStateIndex(this.governorAddress, tokenIdStatekey);
12347
12347
  const tokenIdLedgerEntry = await this.xrplApi.getLedgerEntry(tokenIdStateIndex);
12348
12348
 
12349
+ const hostAcc = new XrplAccount(hostAddress, null, { xrplApi: this.xrplApi });
12350
+ addrStateDecoded.domain = await hostAcc.getDomain();
12351
+
12349
12352
  const tokenIdStateData = tokenIdLedgerEntry?.HookStateData;
12350
12353
  if (tokenIdStateData) {
12351
12354
  const tokenIdStateDecoded = StateHelpers.decodeTokenIdState(Buffer.from(tokenIdStateData, 'hex'));
@@ -12363,7 +12366,7 @@ class BaseEvernodeClient {
12363
12366
  }
12364
12367
 
12365
12368
  /**
12366
- * Get all the hosts registered in Evernode. The result's are paginated. Default page size is 20. Note: Specifying both filter and pagination does not supported.
12369
+ * Get the hosts registered in Evernode. The result's are paginated. Default page size is 20. _Note: Specifying both filter and pagination does not supported._
12367
12370
  * @param {object} filters [Optional] Filter criteria to filter the hosts. The filter key can be a either property of the host.
12368
12371
  * @param {number} pageSize [Optional] Page size for the results.
12369
12372
  * @param {string} nextPageToken [Optional] Next page's token, If received by the previous result set.
@@ -12386,8 +12389,8 @@ class BaseEvernodeClient {
12386
12389
  }
12387
12390
 
12388
12391
  /**
12389
- * Get all the candidates proposed in Evernode. The result's are paginated. Default page size is 20. Note: Specifying both filter and pagination does not supported.
12390
- * @param {object} filters [Optional] Filter criteria to filter the hosts. The filter key can be a either property of the host.
12392
+ * Get the candidates proposed in Evernode. The result's are paginated. Default page size is 20. _Note: Specifying both filter and pagination does not supported._
12393
+ * @param {object} filters [Optional] Filter criteria to filter the candidates. The filter key can be a either property of the candidate.
12391
12394
  * @param {number} pageSize [Optional] Page size for the results.
12392
12395
  * @param {string} nextPageToken [Optional] Next page's token, If received by the previous result set.
12393
12396
  * @returns The list of candidates. The response will be in '{data: [], nextPageToken: ''}' only if there are more pages. Otherwise the response will only contain the host list.
@@ -12508,7 +12511,7 @@ class BaseEvernodeClient {
12508
12511
  }
12509
12512
 
12510
12513
  /**
12511
- * Get proposed candidate info.
12514
+ * Get proposed new hook candidate info.
12512
12515
  * @param {string} ownerAddress [Optional] Address of the owner.
12513
12516
  * @returns The candidate information. Returns null if no candidate.
12514
12517
  */
@@ -12542,9 +12545,9 @@ class BaseEvernodeClient {
12542
12545
  }
12543
12546
 
12544
12547
  /**
12545
- *
12548
+ * Get proposed dud host candidates.
12546
12549
  * @param {string} ownerAddress | Address of the owner
12547
- * @returns An array of candidate information. Returns empty array if no candidates;
12550
+ * @returns An array of candidate information. Returns empty array if no candidates.
12548
12551
  */
12549
12552
  async getDudHostCandidatesByOwner(ownerAddress = this.xrplAcc.address) {
12550
12553
  try {
@@ -12560,7 +12563,7 @@ class BaseEvernodeClient {
12560
12563
  }
12561
12564
 
12562
12565
  /**
12563
- * Get proposed candidate info.
12566
+ * Get candidate info.
12564
12567
  * @param {string} candidateId Id of the candidate.
12565
12568
  * @returns The candidate information. Returns null if no candidate.
12566
12569
  */
@@ -12651,9 +12654,9 @@ class BaseEvernodeClient {
12651
12654
  }
12652
12655
 
12653
12656
  /**
12654
- * Withdraw a hook candidate.
12655
- * @param {*} hashes Hook candidate hashes in hex format, <GOVERNOR_HASH(32)><REGISTRY_HASH(32)><HEARTBEAT_HASH(32)>.
12656
- * @param {*} shortName Short name for the proposal candidate.
12657
+ * Propose a new hook candidate.
12658
+ * @param {string} hashes Hook candidate hashes in hex format, <GOVERNOR_HASH(32)><REGISTRY_HASH(32)><HEARTBEAT_HASH(32)>.
12659
+ * @param {string} shortName Short name for the proposal candidate.
12657
12660
  * @param {*} options [Optional] transaction options.
12658
12661
  * @returns Proposed candidate id.
12659
12662
  */
@@ -12724,7 +12727,7 @@ class BaseEvernodeClient {
12724
12727
 
12725
12728
  /**
12726
12729
  * Report dud host for removal.
12727
- * @param {*} hostAddress Address of the dud host.
12730
+ * @param {string} hostAddress Address of the dud host.
12728
12731
  * @param {*} options [Optional] transaction options.
12729
12732
  * @returns Transaction result.
12730
12733
  */
@@ -12773,16 +12776,17 @@ const FoundationEvents = {}
12773
12776
 
12774
12777
  class FoundationClient extends BaseEvernodeClient {
12775
12778
 
12776
- /**
12777
- * Constructs a tenant client instance.
12778
- * @param {string} xrpAddress XRPL address of the tenant.
12779
- * @param {string} XRPL secret of the tenant.
12780
- * @param {object} options [Optional] An object with 'rippledServer' URL and 'governorAddress'.
12781
- */
12782
12779
  constructor(xrpAddress, xrpSecret, options = {}) {
12783
12780
  super(xrpAddress, xrpSecret, Object.values(FoundationEvents), false, options);
12784
12781
  }
12785
12782
 
12783
+ /**
12784
+ * Propose a new hook candidate.
12785
+ * @param {string} hashes Hook candidate hashes in hex format, <GOVERNOR_HASH(32)><REGISTRY_HASH(32)><HEARTBEAT_HASH(32)>.
12786
+ * @param {string} shortName Short name for the proposal candidate.
12787
+ * @param {*} options [Optional] transaction options.
12788
+ * @returns Proposed candidate id.
12789
+ */
12786
12790
  async propose(hashes, shortName, options = {}) {
12787
12791
  if (this.xrplAcc.address !== this.config.foundationAddress)
12788
12792
  throw `Invalid foundation address ${this.xrplAcc.address}.`;
@@ -12790,6 +12794,12 @@ class FoundationClient extends BaseEvernodeClient {
12790
12794
  return await super._propose(hashes, shortName, options);
12791
12795
  }
12792
12796
 
12797
+ /**
12798
+ * Withdraw a hook candidate.
12799
+ * @param {string} candidateId Id of the candidate in hex format.
12800
+ * @param {*} options [Optional] transaction options.
12801
+ * @returns Transaction result.
12802
+ */
12793
12803
  async withdraw(candidateId, options = {}) {
12794
12804
  if (this.xrplAcc.address !== this.config.foundationAddress)
12795
12805
  throw `Invalid foundation address ${this.xrplAcc.address}.`;
@@ -12826,6 +12836,12 @@ class FoundationClient extends BaseEvernodeClient {
12826
12836
  });
12827
12837
  }
12828
12838
 
12839
+ /**
12840
+ * Report dud host for removal.
12841
+ * @param {string} hostAddress Address of the dud host.
12842
+ * @param {*} options [Optional] transaction options.
12843
+ * @returns Transaction result.
12844
+ */
12829
12845
  async reportDudHost(hostAddress, options = {}) {
12830
12846
  if (this.xrplAcc.address !== this.config.foundationAddress)
12831
12847
  throw `Invalid foundation address ${this.xrplAcc.address}.`;
@@ -12964,6 +12980,11 @@ const { GovernorClient } = __nccwpck_require__(335);
12964
12980
  const { HeartbeatClient } = __nccwpck_require__(6510);
12965
12981
 
12966
12982
  class HookClientFactory {
12983
+ /**
12984
+ * Creates a hook client from given type.
12985
+ * @param {string} hookType Type of the Required Hook. (Supported Hook types 'GOVERNOR', 'REGISTRY' and 'HEARTBEAT')
12986
+ * @returns Instance of requested HookClient type.
12987
+ */
12967
12988
  static async create(hookType) {
12968
12989
  let hookClient;
12969
12990
  switch (hookType) {
@@ -13123,12 +13144,20 @@ class HostClient extends BaseEvernodeClient {
13123
13144
  super(xrpAddress, xrpSecret, Object.values(HostEvents), true, options);
13124
13145
  }
13125
13146
 
13147
+ /**
13148
+ * Get registration URI token info.
13149
+ * @returns The registration URI token object.
13150
+ */
13126
13151
  async getRegistrationUriToken() {
13127
13152
  // Find an owned NFT with matching Evernode host NFT prefix.
13128
13153
  const uriToken = (await this.xrplAcc.getURITokens()).find(n => n.URI.startsWith(EvernodeConstants.TOKEN_PREFIX_HEX) && n.Issuer === this.config.registryAddress);
13129
13154
  return uriToken ?? null;
13130
13155
  }
13131
13156
 
13157
+ /**
13158
+ * Get host info if registered.
13159
+ * @returns Host info object if registered, Otherwise null.
13160
+ */
13132
13161
  async getRegistration() {
13133
13162
  // Check whether we own an evernode host token.
13134
13163
  const regUriToken = await this.getRegistrationUriToken();
@@ -13140,18 +13169,26 @@ class HostClient extends BaseEvernodeClient {
13140
13169
  return null;
13141
13170
  }
13142
13171
 
13172
+ /**
13173
+ * Get lease offers created by the host.
13174
+ * @returns Array of lease offer objects.
13175
+ */
13143
13176
  async getLeaseOffers() {
13144
13177
  return await EvernodeHelpers.getLeaseOffers(this.xrplAcc);
13145
13178
  }
13146
13179
 
13147
- async cancelOffer(offerIndex) {
13148
- return this.xrplAcc.cancelOffer(offerIndex);
13149
- }
13150
-
13180
+ /**
13181
+ * Check wether the host is registered.
13182
+ * @returns Boolean if the host is registered or not.
13183
+ */
13151
13184
  async isRegistered() {
13152
13185
  return (await this.getRegistration()) !== null;
13153
13186
  }
13154
13187
 
13188
+ /**
13189
+ * Prepare the host account with account fields and trust lines.
13190
+ * @param {string} domain Domain which the host machine is reachable.
13191
+ */
13155
13192
  async prepareAccount(domain) {
13156
13193
  const [flags, trustLines, msgKey, curDomain] = await Promise.all([
13157
13194
  this.xrplAcc.getFlags(),
@@ -13174,6 +13211,12 @@ class HostClient extends BaseEvernodeClient {
13174
13211
  await this.xrplAcc.setTrustLine(EvernodeConstants.EVR, this.config.evrIssuerAddress, "99999999999999");
13175
13212
  }
13176
13213
 
13214
+ /**
13215
+ * Create a lease offer.
13216
+ * @param {number} leaseIndex Index number for the lease.
13217
+ * @param {number} leaseAmount Amount (EVRs) of the lease offer.
13218
+ * @param {string} tosHash Hex hash of the Terms Of Service text.
13219
+ */
13177
13220
  async offerLease(leaseIndex, leaseAmount, tosHash) {
13178
13221
  // <prefix><lease index 16)><half of tos hash><lease amount (int64)><identifier (uint32)>
13179
13222
  const prefixLen = EvernodeConstants.LEASE_TOKEN_PREFIX_HEX.length / 2;
@@ -13209,10 +13252,29 @@ class HostClient extends BaseEvernodeClient {
13209
13252
  this.config.evrIssuerAddress);
13210
13253
  }
13211
13254
 
13255
+ /**
13256
+ * Expire the lease offer.
13257
+ * @param {string} uriTokenId Hex URI token id of the lease.
13258
+ */
13212
13259
  async expireLease(uriTokenId) {
13213
13260
  await this.xrplAcc.burnURIToken(uriTokenId);
13214
13261
  }
13215
13262
 
13263
+ /**
13264
+ * Register the host in the Evernode network.
13265
+ * @param {string} countryCode Upper case country code with two letters.
13266
+ * @param {number} cpuMicroSec CPU cycle in micro seconds of the host.
13267
+ * @param {number} ramMb Ram size in mega bytes.
13268
+ * @param {number} diskMb Disk size in mega bytes.
13269
+ * @param {number} totalInstanceCount Total number of instance slots in the host.
13270
+ * @param {string} cpuModel Model of the host CPU.
13271
+ * @param {number} cpuCount Number of CPUs in the host.
13272
+ * @param {number} cpuSpeed CPU MHz.
13273
+ * @param {string} description Description about the host.
13274
+ * @param {string} emailAddress Email address of the host.
13275
+ * @param {*} options [Optional] transaction options.
13276
+ * @returns Transaction result.
13277
+ */
13216
13278
  async register(countryCode, cpuMicroSec, ramMb, diskMb, totalInstanceCount, cpuModel, cpuCount, cpuSpeed, description, emailAddress, options = {}) {
13217
13279
  if (!/^([A-Z]{2})$/.test(countryCode))
13218
13280
  throw "countryCode should consist of 2 uppercase alphabetical characters";
@@ -13356,6 +13418,11 @@ class HostClient extends BaseEvernodeClient {
13356
13418
  return await this.isRegistered();
13357
13419
  }
13358
13420
 
13421
+ /**
13422
+ * Deregister a host from the Evernode network.
13423
+ * @param {*} options [Optional] transaction options.
13424
+ * @returns Boolean whether host is registered or not.
13425
+ */
13359
13426
  async deregister(options = {}) {
13360
13427
 
13361
13428
  if (!(await this.isRegistered()))
@@ -13379,6 +13446,21 @@ class HostClient extends BaseEvernodeClient {
13379
13446
  return await this.isRegistered();
13380
13447
  }
13381
13448
 
13449
+ /**
13450
+ * Update the host registration in the Evernode network.
13451
+ * @param {number} activeInstanceCount Currently active instance count in the host.
13452
+ * @param {string} version Sashimono version installed on the host
13453
+ * @param {number} totalInstanceCount Total number of instance slots in the host.
13454
+ * @param {string} tokenID Registration Token Id of the host.
13455
+ * @param {string} countryCode Upper case country code with two letters.
13456
+ * @param {number} cpuMicroSec
13457
+ * @param {number} ramMb Ram size in mega bytes.
13458
+ * @param {number} diskMb Disk size in mega bytes.
13459
+ * @param {string} description Description about the host.
13460
+ * @param {string} emailAddress Email address of the host.
13461
+ * @param {*} options [Optional] transaction options.
13462
+ * @returns Transaction result.
13463
+ */
13382
13464
  async updateRegInfo(activeInstanceCount = null, version = null, totalInstanceCount = null, tokenID = null, countryCode = null, cpuMicroSec = null, ramMb = null, diskMb = null, description = null, emailAddress = null, options = {}) {
13383
13465
  // <token_id(32)><country_code(2)><cpu_microsec(4)><ram_mb(4)><disk_mb(4)><total_instance_count(4)><active_instances(4)><description(26)><version(3)><email(40)>
13384
13466
  const paramBuf = Buffer.alloc(HOST_UPDATE_PARAM_SIZE, 0);
@@ -13423,6 +13505,12 @@ class HostClient extends BaseEvernodeClient {
13423
13505
  });
13424
13506
  }
13425
13507
 
13508
+ /**
13509
+ * Send a heartbeat from the host.
13510
+ * @param {*} voteInfo [Optional] Candidate votes if there's any `{ '<candidateId>': '{number 0|1} vote', ... }`
13511
+ * @param {*} options [Optional] transaction options.
13512
+ * @returns Transaction result.
13513
+ */
13426
13514
  async heartbeat(voteInfo = {}, options = {}) {
13427
13515
  let data;
13428
13516
  // Prepare voteInfo
@@ -13461,6 +13549,14 @@ class HostClient extends BaseEvernodeClient {
13461
13549
  }
13462
13550
  }
13463
13551
 
13552
+ /**
13553
+ * Send acquire success response to the tenant.
13554
+ * @param {string} txHash Acquire lease transaction hash in hex.
13555
+ * @param {string} tenantAddress XRPL address of the tenant.
13556
+ * @param {string} instanceInfo Created instance info.
13557
+ * @param {*} options [Optional] transaction options.
13558
+ * @returns Transaction result.
13559
+ */
13464
13560
  async acquireSuccess(txHash, tenantAddress, instanceInfo, options = {}) {
13465
13561
 
13466
13562
  // Encrypt the instance info with the tenant's encryption key (Specified in MessageKey field of the tenant account).
@@ -13506,6 +13602,15 @@ class HostClient extends BaseEvernodeClient {
13506
13602
  });
13507
13603
  }
13508
13604
 
13605
+ /**
13606
+ * Send acquire error response to the tenant.
13607
+ * @param {string} txHash Acquire lease transaction hash in hex.
13608
+ * @param {string} tenantAddress Xrpl address of the tenant.
13609
+ * @param {number} leaseAmount Lease amount to be refunded.
13610
+ * @param {string} reason Reason for the error.
13611
+ * @param {*} options [Optional] transaction options.
13612
+ * @returns Transaction result.
13613
+ */
13509
13614
  async acquireError(txHash, tenantAddress, leaseAmount, reason, options = {}) {
13510
13615
 
13511
13616
  return this.xrplAcc.makePayment(tenantAddress,
@@ -13524,6 +13629,14 @@ class HostClient extends BaseEvernodeClient {
13524
13629
  });
13525
13630
  }
13526
13631
 
13632
+ /**
13633
+ * Send extend success response to the tenant.
13634
+ * @param {string} txHash Extend lease transaction hash in hex.
13635
+ * @param {string} tenantAddress XRPL address of the tenant.
13636
+ * @param {number} expiryMoment Moment which the instance will expire.
13637
+ * @param {*} options [Optional] transaction options.
13638
+ * @returns Transaction result.
13639
+ */
13527
13640
  async extendSuccess(txHash, tenantAddress, expiryMoment, options = {}) {
13528
13641
  let buf = Buffer.allocUnsafe(4);
13529
13642
  buf.writeUInt32BE(expiryMoment);
@@ -13544,6 +13657,15 @@ class HostClient extends BaseEvernodeClient {
13544
13657
  });
13545
13658
  }
13546
13659
 
13660
+ /**
13661
+ * Send extend error response to the tenant.
13662
+ * @param {string} txHash Extend lease transaction hash in hex.
13663
+ * @param {string} tenantAddress Xrpl address of the tenant.
13664
+ * @param {string} reason Reason for the error.
13665
+ * @param {number} refund Amount to be refunded.
13666
+ * @param {*} options [Optional] transaction options.
13667
+ * @returns Transaction result.
13668
+ */
13547
13669
  async extendError(txHash, tenantAddress, reason, refund, options = {}) {
13548
13670
 
13549
13671
  // Required to refund the paid EVR amount as the offer extention is not successfull.
@@ -13563,6 +13685,14 @@ class HostClient extends BaseEvernodeClient {
13563
13685
  });
13564
13686
  }
13565
13687
 
13688
+ /**
13689
+ * Send refunds to the tenant.
13690
+ * @param {string} txHash Request transaction hash in hex.
13691
+ * @param {string} tenantAddress Xrpl address of the tenant.
13692
+ * @param {number} refundAmount Amount to be refunded.
13693
+ * @param {*} options [Optional] transaction options.
13694
+ * @returns Transaction result.
13695
+ */
13566
13696
  async refundTenant(txHash, tenantAddress, refundAmount, options = {}) {
13567
13697
  return this.xrplAcc.makePayment(tenantAddress,
13568
13698
  refundAmount.toString(),
@@ -13580,6 +13710,11 @@ class HostClient extends BaseEvernodeClient {
13580
13710
  });
13581
13711
  }
13582
13712
 
13713
+ /**
13714
+ * Request registration rebates from the registry.
13715
+ * @param {*} options [Optional] transaction options.
13716
+ * @returns Transaction result.
13717
+ */
13583
13718
  async requestRebate(options = {}) {
13584
13719
  return this.xrplAcc.makePayment(this.config.registryAddress,
13585
13720
  XrplConstants.MIN_XRP_AMOUNT,
@@ -13596,14 +13731,11 @@ class HostClient extends BaseEvernodeClient {
13596
13731
  });
13597
13732
  }
13598
13733
 
13599
- getLeaseNFTokenIdPrefix() {
13600
- let buf = Buffer.allocUnsafe(24);
13601
- buf.writeUInt16BE(1);
13602
- buf.writeUInt16BE(0, 2);
13603
- codec.decodeAccountID(this.xrplAcc.address).copy(buf, 4);
13604
- return buf.toString('hex');
13605
- }
13606
-
13734
+ /**
13735
+ * Initiate a host transfer.
13736
+ * @param {string} transfereeAddress [Optional] Xrpl account address to host registration to be transferred.
13737
+ * @param {*} options [Optional] transaction options.
13738
+ */
13607
13739
  async transfer(transfereeAddress = this.xrplAcc.address, options = {}) {
13608
13740
  if (!(await this.isRegistered()))
13609
13741
  throw "Host is not registered.";
@@ -13650,6 +13782,10 @@ class HostClient extends BaseEvernodeClient {
13650
13782
  throw 'Token hasn\'t transferred within timeout.';
13651
13783
  }
13652
13784
 
13785
+ /**
13786
+ * Check whether this host is a transferee.
13787
+ * @returns Boolean wether the host is a transferee or not.
13788
+ */
13653
13789
  async isTransferee() {
13654
13790
 
13655
13791
  // Check the availability of TRANSFEREE state for this host address.
@@ -13663,6 +13799,13 @@ class HostClient extends BaseEvernodeClient {
13663
13799
  return false;
13664
13800
  }
13665
13801
 
13802
+ /**
13803
+ * Propose a new hook candidate.
13804
+ * @param {string} hashes Hook candidate hashes in hex format, <GOVERNOR_HASH(32)><REGISTRY_HASH(32)><HEARTBEAT_HASH(32)>.
13805
+ * @param {string} shortName Short name for the proposal candidate.
13806
+ * @param {*} options [Optional] transaction options.
13807
+ * @returns Proposed candidate id.
13808
+ */
13666
13809
  async propose(hashes, shortName, options = {}) {
13667
13810
  if (!(await this.isRegistered()))
13668
13811
  throw 'Host should be registered to propose candidates.';
@@ -13670,6 +13813,12 @@ class HostClient extends BaseEvernodeClient {
13670
13813
  return await super._propose(hashes, shortName, options);
13671
13814
  }
13672
13815
 
13816
+ /**
13817
+ * Withdraw a hook candidate.
13818
+ * @param {string} candidateId Id of the candidate in hex format.
13819
+ * @param {*} options [Optional] transaction options.
13820
+ * @returns Transaction result.
13821
+ */
13673
13822
  async withdraw(candidateId, options = {}) {
13674
13823
  if (!(await this.isRegistered()))
13675
13824
  throw 'Host should be registered to withdraw candidates.';
@@ -13677,6 +13826,12 @@ class HostClient extends BaseEvernodeClient {
13677
13826
  return await super._withdraw(candidateId, options);
13678
13827
  }
13679
13828
 
13829
+ /**
13830
+ * Report dud host for removal.
13831
+ * @param {string} hostAddress Address of the dud host.
13832
+ * @param {*} options [Optional] transaction options.
13833
+ * @returns Transaction result.
13834
+ */
13680
13835
  async reportDudHost(hostAddress, options = {}) {
13681
13836
  if (!(await this.isRegistered()))
13682
13837
  throw 'Host should be registered to report dud hosts.';
@@ -13716,12 +13871,6 @@ const TenantEvents = {
13716
13871
 
13717
13872
  class TenantClient extends BaseEvernodeClient {
13718
13873
 
13719
- /**
13720
- * Constructs a tenant client instance.
13721
- * @param {string} xrpAddress XRPL address of the tenant.
13722
- * @param {string} XRPL secret of the tenant.
13723
- * @param {object} options [Optional] An object with 'rippledServer' URL and 'governorAddress'.
13724
- */
13725
13874
  constructor(xrpAddress, xrpSecret, options = {}) {
13726
13875
  super(xrpAddress, xrpSecret, Object.values(TenantEvents), false, options);
13727
13876
  }
@@ -13758,7 +13907,7 @@ class TenantClient extends BaseEvernodeClient {
13758
13907
  }
13759
13908
 
13760
13909
  /**
13761
- *
13910
+ * Prepare and submit acquire transaction.(Single signed scenario)
13762
13911
  * @param {string} hostAddress XRPL address of the host to acquire the lease.
13763
13912
  * @param {object} requirement The instance requirements and configuration.
13764
13913
  * @param {object} options [Optional] Options for the XRPL transaction.
@@ -13766,6 +13915,19 @@ class TenantClient extends BaseEvernodeClient {
13766
13915
  */
13767
13916
  async acquireLeaseSubmit(hostAddress, requirement, options = {}) {
13768
13917
 
13918
+ const preparedAcquireTxn = await this.prepareAcquireLeaseTransaction(hostAddress, requirement, options);
13919
+ return await this.xrplAcc.signAndSubmit(preparedAcquireTxn);
13920
+ }
13921
+
13922
+ /**
13923
+ * Prepare the Acquire transaction.
13924
+ * @param {string} hostAddress XRPL address of the host to acquire the lease.
13925
+ * @param {object} requirement The instance requirements and configuration.
13926
+ * @param {object} options [Optional] Options for the XRPL transaction.
13927
+ * @returns Prepared Acquire transaction.
13928
+ */
13929
+ async prepareAcquireLeaseTransaction(hostAddress, requirement, options = {}) {
13930
+
13769
13931
  const hostAcc = await this.getLeaseHost(hostAddress);
13770
13932
  let selectedOfferIndex = options.leaseOfferIndex;
13771
13933
 
@@ -13778,7 +13940,7 @@ class TenantClient extends BaseEvernodeClient {
13778
13940
  }
13779
13941
  else {
13780
13942
  // Attempt to get relevant available offer using selectedOfferIndex.
13781
- buyUriOffer = uriTokenOffers && uriTokenOffers.find(uriOffer => { uriOffer.index === selectedOfferIndex });
13943
+ buyUriOffer = uriTokenOffers && uriTokenOffers.find(uriOffer => (uriOffer.index === selectedOfferIndex));
13782
13944
  }
13783
13945
 
13784
13946
  if (!buyUriOffer)
@@ -13795,14 +13957,14 @@ class TenantClient extends BaseEvernodeClient {
13795
13957
  } else if (options.messageKey === 'none') {
13796
13958
  doEncrypt = false;
13797
13959
  } else
13798
- throw "Tenant encryption key not valid.";
13960
+ throw { reason: ErrorReasons.INTERNAL_ERR, error: "Host encryption key not valid." };
13799
13961
  } else {
13800
13962
  encKey = await hostAcc.getMessageKey();
13801
13963
  }
13802
13964
 
13803
13965
  if (doEncrypt) {
13804
13966
  if (!encKey)
13805
- throw "Tenant encryption key not set.";
13967
+ throw { reason: ErrorReasons.INTERNAL_ERR, error: "Host encryption key not set." };
13806
13968
  const encrypted = await EncryptionHelper.encrypt(encKey, requirement, {
13807
13969
  iv: options.iv, // Must be null or 16 bytes.
13808
13970
  ephemPrivateKey: options.ephemPrivateKey // Must be null or 32 bytes.
@@ -13811,7 +13973,7 @@ class TenantClient extends BaseEvernodeClient {
13811
13973
  data = Buffer.concat([Buffer.from([0x01]), Buffer.from(encrypted, 'base64')]).toString('base64');
13812
13974
  }
13813
13975
 
13814
- return this.xrplAcc.buyURIToken(
13976
+ return await this.xrplAcc.prepareBuyURIToken(
13815
13977
  buyUriOffer,
13816
13978
  [
13817
13979
  { type: EventTypes.ACQUIRE_LEASE, format: MemoFormats.BASE64, data: data }
@@ -13907,8 +14069,21 @@ class TenantClient extends BaseEvernodeClient {
13907
14069
  * @returns The transaction result.
13908
14070
  */
13909
14071
  async extendLeaseSubmit(hostAddress, amount, tokenID, options = {}) {
14072
+ const preparedExtendTxn = await this.prepareExtendLeaseTransaction(hostAddress, amount, tokenID, options);
14073
+ return await this.xrplAcc.signAndSubmit(preparedExtendTxn);
14074
+ }
14075
+
14076
+ /**
14077
+ * This function is called to prepare an instance extension transaction for a particular host.
14078
+ * @param {string} hostAddress XRPL account address of the host.
14079
+ * @param {number} amount Cost for the extended moments , in EVRs.
14080
+ * @param {string} tokenID Tenant received instance name. this name can be retrieve by performing acquire Lease.
14081
+ * @param {object} options This is an optional field and contains necessary details for the transactions.
14082
+ * @returns The prepared transaction.
14083
+ */
14084
+ async prepareExtendLeaseTransaction(hostAddress, amount, tokenID, options = {}) {
13910
14085
  const host = await this.getLeaseHost(hostAddress);
13911
- return this.xrplAcc.makePayment(
14086
+ return await this.xrplAcc.prepareMakePayment(
13912
14087
  host.address, amount.toString(),
13913
14088
  EvernodeConstants.EVR,
13914
14089
  this.config.evrIssuerAddress,
@@ -14022,7 +14197,7 @@ module.exports = {
14022
14197
  /***/ ((module) => {
14023
14198
 
14024
14199
  const DefaultValues = {
14025
- governorAddress: 'raVhw4Q8FQr296jdaDLDfZ4JDhh7tFG7SF',
14200
+ governorAddress: 'rGVHr1PrfL93UAjyw3DWZoi9adz2sLp2yL',
14026
14201
  rippledServer: 'wss://hooks-testnet-v3.xrpl-labs.com',
14027
14202
  xrplApi: null,
14028
14203
  stateIndexId: 'evernodeindex',
@@ -14036,10 +14211,18 @@ const HookTypes = {
14036
14211
  }
14037
14212
 
14038
14213
  class Defaults {
14214
+ /**
14215
+ * Override Evernode default configs.
14216
+ * @param {object} newDefaults Configurations to override `{ governorAddress: '{string} governor xrpl address', rippledServer: '{string} rippled server url', xrplApi: '{XrplApi} xrpl instance', stateIndexId: '{string} firestore index', networkID: '{number} rippled network id' }`
14217
+ */
14039
14218
  static set(newDefaults) {
14040
14219
  Object.assign(DefaultValues, newDefaults)
14041
14220
  }
14042
14221
 
14222
+ /**
14223
+ * Read Evernode default configs.
14224
+ * @returns The Object of Evernode configs
14225
+ */
14043
14226
  static get() {
14044
14227
  return { ...DefaultValues };
14045
14228
  }
@@ -16078,7 +16261,7 @@ const xrpl = __nccwpck_require__(4666);
16078
16261
  const kp = __nccwpck_require__(8150);
16079
16262
  const codec = __nccwpck_require__(597);
16080
16263
  const crypto = __nccwpck_require__(6113);
16081
- const { XrplConstants } = __nccwpck_require__(3307);
16264
+ const { XrplConstants, XrplTransactionTypes } = __nccwpck_require__(3307);
16082
16265
  const { TransactionHelper } = __nccwpck_require__(7071);
16083
16266
  const { EventEmitter } = __nccwpck_require__(6170);
16084
16267
  const { DefaultValues } = __nccwpck_require__(8262);
@@ -16218,7 +16401,12 @@ class XrplAccount {
16218
16401
  return await this.xrplApi.isValidKeyForAddress(this.wallet.publicKey, this.address);
16219
16402
  }
16220
16403
 
16221
- setAccountFields(fields, options = {}) {
16404
+ async setAccountFields(fields, options = {}) {
16405
+ const preparedTxn = await this.prepareSetAccountFields(fields, options);
16406
+ return await this.signAndSubmit(preparedTxn);
16407
+ }
16408
+
16409
+ async prepareSetAccountFields(fields, options = {}) {
16222
16410
  /**
16223
16411
  * Example for fields
16224
16412
  *
@@ -16233,7 +16421,7 @@ class XrplAccount {
16233
16421
  throw "AccountSet fields cannot be empty.";
16234
16422
 
16235
16423
  const tx = {
16236
- TransactionType: 'AccountSet',
16424
+ TransactionType: XrplTransactionTypes.ACCOUNT_SET,
16237
16425
  Account: this.address
16238
16426
  };
16239
16427
 
@@ -16256,7 +16444,13 @@ class XrplAccount {
16256
16444
  }
16257
16445
  }
16258
16446
 
16259
- return this.#submitAndVerifyTransaction(tx, options);
16447
+ return await this.#prepareSubmissionTransaction(tx, options);
16448
+ }
16449
+
16450
+ async setSignerList(signerList = [], options = {}) {
16451
+
16452
+ const preparedTxn = await this.prepareSetSignerList(signerList, options);
16453
+ return await this.signAndSubmit(preparedTxn);
16260
16454
  }
16261
16455
 
16262
16456
  /**
@@ -16265,7 +16459,7 @@ class XrplAccount {
16265
16459
  * @param {*} options Ex: {signerQuorum: 1, sequence: 6543233}
16266
16460
  * @returns a promise
16267
16461
  */
16268
- setSignerList(signerList = [], options = {}) {
16462
+ async prepareSetSignerList(signerList = [], options = {}) {
16269
16463
  if (options.signerQuorum < 0)
16270
16464
  throw ("Everpocket: quorum can't be less than zero.");
16271
16465
 
@@ -16280,10 +16474,12 @@ class XrplAccount {
16280
16474
  throw ("Everpocket: Total weight is less than the quorum");
16281
16475
  }
16282
16476
 
16477
+ signerList = signerList.sort((a, b) => a.account < b.account ? -1 : 1);
16478
+
16283
16479
  const signerListTx =
16284
16480
  {
16285
16481
  Flags: 0,
16286
- TransactionType: "SignerListSet",
16482
+ TransactionType: XrplTransactionTypes.SIGNER_LIST_SET,
16287
16483
  Account: this.address,
16288
16484
  SignerQuorum: options.signerQuorum,
16289
16485
  SignerEntries: [
@@ -16295,15 +16491,20 @@ class XrplAccount {
16295
16491
  }))
16296
16492
  ]
16297
16493
  };
16298
- return this.#submitAndVerifyTransaction(signerListTx, options);
16494
+ return await this.#prepareSubmissionTransaction(signerListTx, options);
16299
16495
  }
16300
16496
 
16301
- makePayment(toAddr, amount, currency, issuer = null, memos = null, options = {}) {
16497
+ async makePayment(toAddr, amount, currency, issuer = null, memos = null, options = {}) {
16498
+ const preparedTxn = await this.prepareMakePayment(toAddr, amount, currency, issuer, memos, options);
16499
+ return await this.signAndSubmit(preparedTxn);
16500
+ }
16501
+
16502
+ async prepareMakePayment(toAddr, amount, currency, issuer = null, memos = null, options = {}) {
16302
16503
 
16303
16504
  const amountObj = makeAmountObject(amount, currency, issuer);
16304
16505
 
16305
- return this.#submitAndVerifyTransaction({
16306
- TransactionType: 'Payment',
16506
+ return await this.#prepareSubmissionTransaction({
16507
+ TransactionType: XrplTransactionTypes.PAYMENT,
16307
16508
  Account: this.address,
16308
16509
  Amount: amountObj,
16309
16510
  Destination: toAddr,
@@ -16312,13 +16513,18 @@ class XrplAccount {
16312
16513
  }, options);
16313
16514
  }
16314
16515
 
16315
- setTrustLine(currency, issuer, limit, allowRippling = false, memos = null, options = {}) {
16516
+ async setTrustLine(currency, issuer, limit, allowRippling = false, memos = null, options = {}) {
16517
+ const preparedTxn = await this.prepareSetTrustLine(currency, issuer, limit, allowRippling, memos, options);
16518
+ return await this.signAndSubmit(preparedTxn);
16519
+ }
16520
+
16521
+ async prepareSetTrustLine(currency, issuer, limit, allowRippling = false, memos = null, options = {}) {
16316
16522
 
16317
16523
  if (typeof limit !== 'string')
16318
16524
  throw "Limit must be a string.";
16319
16525
 
16320
16526
  let tx = {
16321
- TransactionType: 'TrustSet',
16527
+ TransactionType: XrplTransactionTypes.TRUST_SET,
16322
16528
  Account: this.address,
16323
16529
  LimitAmount: {
16324
16530
  currency: currency,
@@ -16332,13 +16538,18 @@ class XrplAccount {
16332
16538
  if (!allowRippling)
16333
16539
  tx.Flags = 131072; // tfSetNoRipple;
16334
16540
 
16335
- return this.#submitAndVerifyTransaction(tx, options);
16541
+ return await this.#prepareSubmissionTransaction(tx, options);
16336
16542
  }
16337
16543
 
16338
- setRegularKey(regularKey, memos = null, options = {}) {
16544
+ async setRegularKey(regularKey, memos = null, options = {}) {
16545
+ const preparedTxn = await this.prepareSetRegularKey(regularKey, memos, options);
16546
+ return await this.signAndSubmit(preparedTxn);
16547
+ }
16548
+
16549
+ async prepareSetRegularKey(regularKey, memos = null, options = {}) {
16339
16550
 
16340
- return this.#submitAndVerifyTransaction({
16341
- TransactionType: 'SetRegularKey',
16551
+ return await this.#prepareSubmissionTransaction({
16552
+ TransactionType: XrplTransactionTypes.SET_REGULAR_KEY,
16342
16553
  Account: this.address,
16343
16554
  RegularKey: regularKey,
16344
16555
  Memos: TransactionHelper.formatMemos(memos),
@@ -16346,7 +16557,12 @@ class XrplAccount {
16346
16557
  }, options);
16347
16558
  }
16348
16559
 
16349
- cashCheck(check, options = {}) {
16560
+ async cashCheck(check, options = {}) {
16561
+ const preparedTxn = await this.prepareCashCheck(check, options);
16562
+ return await this.signAndSubmit(preparedTxn);
16563
+ }
16564
+
16565
+ async prepareCashCheck(check, options = {}) {
16350
16566
  const checkIDhasher = crypto.createHash('sha512')
16351
16567
  checkIDhasher.update(Buffer.from('0043', 'hex'))
16352
16568
  checkIDhasher.update(Buffer.from(codec.decodeAccountID(check.Account)))
@@ -16356,8 +16572,8 @@ class XrplAccount {
16356
16572
  const checkID = checkIDhasher.digest('hex').slice(0, 64).toUpperCase()
16357
16573
  console.log("Calculated checkID:", checkID);
16358
16574
 
16359
- return this.#submitAndVerifyTransaction({
16360
- TransactionType: 'CheckCash',
16575
+ return await this.#prepareSubmissionTransaction({
16576
+ TransactionType: XrplTransactionTypes.CHECK_CASH,
16361
16577
  Account: this.address,
16362
16578
  CheckID: checkID,
16363
16579
  Amount: {
@@ -16368,13 +16584,18 @@ class XrplAccount {
16368
16584
  }, options);
16369
16585
  }
16370
16586
 
16371
- offerSell(sellAmount, sellCurrency, sellIssuer, forAmount, forCurrency, forIssuer = null, expiration = 4294967295, memos = null, options = {}) {
16587
+ async offerSell(sellAmount, sellCurrency, sellIssuer, forAmount, forCurrency, forIssuer = null, expiration = 4294967295, memos = null, options = {}) {
16588
+ const preparedTxn = await this.prepareOfferSell(sellAmount, sellCurrency, sellIssuer, forAmount, forCurrency, forIssuer, expiration, memos, options);
16589
+ return await this.signAndSubmit(preparedTxn);
16590
+ }
16591
+
16592
+ async prepareOfferSell(sellAmount, sellCurrency, sellIssuer, forAmount, forCurrency, forIssuer = null, expiration = 4294967295, memos = null, options = {}) {
16372
16593
 
16373
16594
  const sellAmountObj = makeAmountObject(sellAmount, sellCurrency, sellIssuer);
16374
16595
  const forAmountObj = makeAmountObject(forAmount, forCurrency, forIssuer);
16375
16596
 
16376
- return this.#submitAndVerifyTransaction({
16377
- TransactionType: 'OfferCreate',
16597
+ return await this.#prepareSubmissionTransaction({
16598
+ TransactionType: XrplTransactionTypes.OFFER_CREATE,
16378
16599
  Account: this.address,
16379
16600
  TakerGets: sellAmountObj,
16380
16601
  TakerPays: forAmountObj,
@@ -16384,13 +16605,18 @@ class XrplAccount {
16384
16605
  }, options);
16385
16606
  }
16386
16607
 
16387
- offerBuy(buyAmount, buyCurrency, buyIssuer, forAmount, forCurrency, forIssuer = null, expiration = 4294967295, memos = null, options = {}) {
16608
+ async offerBuy(buyAmount, buyCurrency, buyIssuer, forAmount, forCurrency, forIssuer = null, expiration = 4294967295, memos = null, options = {}) {
16609
+ const preparedTxn = await this.prepareOfferBuy(buyAmount, buyCurrency, buyIssuer, forAmount, forCurrency, forIssuer, expiration, memos, options);
16610
+ return await this.signAndSubmit(preparedTxn);
16611
+ }
16612
+
16613
+ async prepareOfferBuy(buyAmount, buyCurrency, buyIssuer, forAmount, forCurrency, forIssuer = null, expiration = 4294967295, memos = null, options = {}) {
16388
16614
 
16389
16615
  const buyAmountObj = makeAmountObject(buyAmount, buyCurrency, buyIssuer);
16390
16616
  const forAmountObj = makeAmountObject(forAmount, forCurrency, forIssuer);
16391
16617
 
16392
- return this.#submitAndVerifyTransaction({
16393
- TransactionType: 'OfferCreate',
16618
+ return await this.#prepareSubmissionTransaction({
16619
+ TransactionType: XrplTransactionTypes.OFFER_CREATE,
16394
16620
  Account: this.address,
16395
16621
  TakerGets: forAmountObj,
16396
16622
  TakerPays: buyAmountObj,
@@ -16400,9 +16626,14 @@ class XrplAccount {
16400
16626
  }, options);
16401
16627
  }
16402
16628
 
16403
- cancelOffer(offerSequence, memos = null, options = {}) {
16404
- return this.#submitAndVerifyTransaction({
16405
- TransactionType: 'OfferCancel',
16629
+ async cancelOffer(offerSequence, memos = null, options = {}) {
16630
+ const preparedTxn = await this.prepareCancelOffer(offerSequence, memos, options);
16631
+ return await this.signAndSubmit(preparedTxn);
16632
+ }
16633
+
16634
+ async prepareCancelOffer(offerSequence, memos = null, options = {}) {
16635
+ return await this.#prepareSubmissionTransaction({
16636
+ TransactionType: XrplTransactionTypes.OFFER_CANCEL,
16406
16637
  Account: this.address,
16407
16638
  OfferSequence: offerSequence,
16408
16639
  Memos: TransactionHelper.formatMemos(memos),
@@ -16410,9 +16641,14 @@ class XrplAccount {
16410
16641
  }, options);
16411
16642
  }
16412
16643
 
16413
- mintNft(uri, taxon, transferFee, flags = {}, memos = null, options = {}) {
16414
- return this.#submitAndVerifyTransaction({
16415
- TransactionType: 'NFTokenMint',
16644
+ async mintNft(uri, taxon, transferFee, flags = {}, memos = null, options = {}) {
16645
+ const preparedTxn = await this.prepareMintNft(uri, taxon, transferFee, flags, memos, options);
16646
+ return await this.signAndSubmit(preparedTxn);
16647
+ }
16648
+
16649
+ async prepareMintNft(uri, taxon, transferFee, flags = {}, memos = null, options = {}) {
16650
+ return await this.#prepareSubmissionTransaction({
16651
+ TransactionType: XrplTransactionTypes.NF_TOKEN_MINT,
16416
16652
  Account: this.address,
16417
16653
  URI: flags.isHexUri ? uri : TransactionHelper.asciiToHex(uri).toUpperCase(),
16418
16654
  NFTokenTaxon: taxon,
@@ -16423,11 +16659,16 @@ class XrplAccount {
16423
16659
  }, options);
16424
16660
  }
16425
16661
 
16426
- offerSellNft(nfTokenId, amount, currency, issuer = null, destination = null, expiration = 4294967295, memos = null, options = {}) {
16662
+ async offerSellNft(nfTokenId, amount, currency, issuer = null, destination = null, expiration = 4294967295, memos = null, options = {}) {
16663
+ const preparedTxn = await this.prepareOfferSellNft(nfTokenId, amount, currency, issuer, destination, expiration, memos, options);
16664
+ return await this.signAndSubmit(preparedTxn);
16665
+ }
16666
+
16667
+ async prepareOfferSellNft(nfTokenId, amount, currency, issuer = null, destination = null, expiration = 4294967295, memos = null, options = {}) {
16427
16668
 
16428
16669
  const amountObj = makeAmountObject(amount, currency, issuer);
16429
16670
  const tx = {
16430
- TransactionType: 'NFTokenCreateOffer',
16671
+ TransactionType: XrplTransactionTypes.NF_TOKEN_CREATE_OFFER,
16431
16672
  Account: this.address,
16432
16673
  NFTokenID: nfTokenId,
16433
16674
  Amount: amountObj,
@@ -16437,15 +16678,20 @@ class XrplAccount {
16437
16678
  HookParameters: TransactionHelper.formatHookParams(options.hookParams)
16438
16679
  };
16439
16680
 
16440
- return this.#submitAndVerifyTransaction(destination ? { ...tx, Destination: destination } : tx, options);
16681
+ return await this.#prepareSubmissionTransaction(destination ? { ...tx, Destination: destination } : tx, options);
16441
16682
  }
16442
16683
 
16443
- offerBuyNft(nfTokenId, owner, amount, currency, issuer = null, expiration = 4294967295, memos = null, options = {}) {
16684
+ async offerBuyNft(nfTokenId, owner, amount, currency, issuer = null, expiration = 4294967295, memos = null, options = {}) {
16685
+ const preparedTxn = await this.prepareOfferSellNft(nfTokenId, owner, amount, currency, issuer, expiration, memos, options);
16686
+ return await this.signAndSubmit(preparedTxn);
16687
+ }
16688
+
16689
+ async prepareOfferBuyNft(nfTokenId, owner, amount, currency, issuer = null, expiration = 4294967295, memos = null, options = {}) {
16444
16690
 
16445
16691
  const amountObj = makeAmountObject(amount, currency, issuer);
16446
16692
 
16447
- return this.#submitAndVerifyTransaction({
16448
- TransactionType: 'NFTokenCreateOffer',
16693
+ return await this.#prepareSubmissionTransaction({
16694
+ TransactionType: XrplTransactionTypes.NF_TOKEN_CREATE_OFFER,
16449
16695
  Account: this.address,
16450
16696
  NFTokenID: nfTokenId,
16451
16697
  Owner: owner,
@@ -16457,10 +16703,16 @@ class XrplAccount {
16457
16703
  }, options);
16458
16704
  }
16459
16705
 
16460
- sellNft(offerId, memos = null, options = {}) {
16461
16706
 
16462
- return this.#submitAndVerifyTransaction({
16463
- TransactionType: 'NFTokenAcceptOffer',
16707
+ async sellNft(offerId, memos = null, options = {}) {
16708
+ const preparedTxn = await this.prepareSellNft(offerId, memos, options);
16709
+ return await this.signAndSubmit(preparedTxn);
16710
+ }
16711
+
16712
+ async prepareSellNft(offerId, memos = null, options = {}) {
16713
+
16714
+ return await this.#prepareSubmissionTransaction({
16715
+ TransactionType: XrplTransactionTypes.NF_TOKEN_ACCEPT_OFFER,
16464
16716
  Account: this.address,
16465
16717
  NFTokenBuyOffer: offerId,
16466
16718
  Memos: TransactionHelper.formatMemos(memos),
@@ -16468,10 +16720,15 @@ class XrplAccount {
16468
16720
  }, options);
16469
16721
  }
16470
16722
 
16471
- buyNft(offerId, memos = null, options = {}) {
16723
+ async buyNft(offerId, memos = null, options = {}) {
16724
+ const preparedTxn = await this.prepareBuyNft(offerId, memos, options);
16725
+ return await this.signAndSubmit(preparedTxn);
16726
+ }
16727
+
16728
+ async prepareBuyNft(offerId, memos = null, options = {}) {
16472
16729
 
16473
- return this.#submitAndVerifyTransaction({
16474
- TransactionType: 'NFTokenAcceptOffer',
16730
+ return await this.#prepareSubmissionTransaction({
16731
+ TransactionType: XrplTransactionTypes.NF_TOKEN_ACCEPT_OFFER,
16475
16732
  Account: this.address,
16476
16733
  NFTokenSellOffer: offerId,
16477
16734
  Memos: TransactionHelper.formatMemos(memos),
@@ -16479,17 +16736,22 @@ class XrplAccount {
16479
16736
  }, options);
16480
16737
  }
16481
16738
 
16482
- burnNft(nfTokenId, owner = null, memos = null, options = {}) {
16739
+ async burnNft(nfTokenId, owner = null, memos = null, options = {}) {
16740
+ const preparedTxn = await this.prepareBurnNft(nfTokenId, owner, memos, options);
16741
+ return await this.signAndSubmit(preparedTxn);
16742
+ }
16743
+
16744
+ async prepareBurnNft(nfTokenId, owner = null, memos = null, options = {}) {
16483
16745
 
16484
16746
  const tx = {
16485
- TransactionType: 'NFTokenBurn',
16747
+ TransactionType: XrplTransactionTypes.NF_TOKEN_ACCEPT_OFFER,
16486
16748
  Account: this.address,
16487
16749
  NFTokenID: nfTokenId,
16488
16750
  Memos: TransactionHelper.formatMemos(memos),
16489
16751
  HookParameters: TransactionHelper.formatHookParams(options.hookParams)
16490
16752
  };
16491
16753
 
16492
- return this.#submitAndVerifyTransaction(owner ? { ...tx, Owner: owner } : tx, options);
16754
+ return await this.#prepareSubmissionTransaction(owner ? { ...tx, Owner: owner } : tx, options);
16493
16755
  }
16494
16756
 
16495
16757
  generateKeylet(type, data = {}) {
@@ -16533,6 +16795,7 @@ class XrplAccount {
16533
16795
  this.#subscribed = false;
16534
16796
  }
16535
16797
 
16798
+
16536
16799
  #submitAndVerifyTransaction(tx, options) {
16537
16800
 
16538
16801
  if (!this.wallet)
@@ -16648,10 +16911,15 @@ class XrplAccount {
16648
16911
 
16649
16912
  // URIToken related methods
16650
16913
 
16651
- mintURIToken(uri, digest = null, flags = {}, options = {}) {
16914
+ async mintURIToken(uri, digest = null, flags = {}, options = {}) {
16915
+ const preparedTxn = await this.prepareMintURIToken(uri, digest, flags, options);
16916
+ return await this.signAndSubmit(preparedTxn);
16917
+ }
16918
+
16919
+ async prepareMintURIToken(uri, digest = null, flags = {}, options = {}) {
16652
16920
  const tx = {
16653
16921
  Account: this.address,
16654
- TransactionType: "URITokenMint",
16922
+ TransactionType: XrplTransactionTypes.URI_TOKEN_MINT,
16655
16923
  URI: flags.isHexUri ? uri : TransactionHelper.asciiToHex(uri).toUpperCase(),
16656
16924
  Flags: flags.isBurnable ? 1 : 0
16657
16925
  }
@@ -16659,24 +16927,34 @@ class XrplAccount {
16659
16927
  if (digest)
16660
16928
  tx.Digest = digest;
16661
16929
 
16662
- return this.#submitAndVerifyTransaction(tx, options);
16930
+ return await this.#prepareSubmissionTransaction(tx, options);
16663
16931
  }
16664
16932
 
16665
- burnURIToken(uriTokenID, options = {}) {
16933
+
16934
+ async burnURIToken(uriTokenID, options = {}) {
16935
+ const preparedTxn = await this.prepareBurnURIToken(uriTokenID, options);
16936
+ return await this.signAndSubmit(preparedTxn);
16937
+ }
16938
+
16939
+ async prepareBurnURIToken(uriTokenID, options = {}) {
16666
16940
  const tx = {
16667
16941
  Account: this.address,
16668
- TransactionType: "URITokenBurn",
16942
+ TransactionType: XrplTransactionTypes.URI_TOKEN_BURN,
16669
16943
  URITokenID: uriTokenID
16670
16944
  }
16671
- return this.#submitAndVerifyTransaction(tx, options);
16945
+ return await this.#prepareSubmissionTransaction(tx, options);
16672
16946
  }
16673
16947
 
16674
- sellURIToken(uriTokenID, amount, currency, issuer = null, toAddr = null, memos = null, options = {}) {
16675
- const amountObj = makeAmountObject(amount, currency, issuer);
16948
+ async sellURIToken(uriTokenID, amount, currency, issuer = null, toAddr = null, memos = null, options = {}) {
16949
+ const preparedTxn = await this.prepareSellURIToken(uriTokenID, amount, currency, issuer, toAddr, memos, options);
16950
+ return await this.signAndSubmit(preparedTxn);
16951
+ }
16676
16952
 
16953
+ async prepareSellURIToken(uriTokenID, amount, currency, issuer = null, toAddr = null, memos = null, options = {}) {
16954
+ const amountObj = makeAmountObject(amount, currency, issuer);
16677
16955
  const tx = {
16678
16956
  Account: this.address,
16679
- TransactionType: "URITokenCreateSellOffer",
16957
+ TransactionType: XrplTransactionTypes.URI_TOKEN_CREATE_SELL_OFFER,
16680
16958
  Amount: amountObj,
16681
16959
  URITokenID: uriTokenID
16682
16960
  };
@@ -16690,13 +16968,18 @@ class XrplAccount {
16690
16968
  if (options.hookParams)
16691
16969
  tx.HookParameters = TransactionHelper.formatHookParams(options.hookParams);
16692
16970
 
16693
- return this.#submitAndVerifyTransaction(tx, options);
16971
+ return await this.#prepareSubmissionTransaction(tx, options);
16972
+ }
16973
+
16974
+ async buyURIToken(uriToken, memos = null, options = {}) {
16975
+ const preparedTxn = await this.prepareBuyURIToken(uriToken, memos, options);
16976
+ return await this.signAndSubmit(preparedTxn);
16694
16977
  }
16695
16978
 
16696
- buyURIToken(uriToken, memos = null, options = {}) {
16979
+ async prepareBuyURIToken(uriToken, memos = null, options = {}) {
16697
16980
  const tx = {
16698
16981
  Account: this.address,
16699
- TransactionType: "URITokenBuy",
16982
+ TransactionType: XrplTransactionTypes.URI_TOKEN_BUY_OFFER,
16700
16983
  Amount: uriToken.Amount,
16701
16984
  URITokenID: uriToken.index
16702
16985
  }
@@ -16707,13 +16990,18 @@ class XrplAccount {
16707
16990
  if (options.hookParams)
16708
16991
  tx.HookParameters = TransactionHelper.formatHookParams(options.hookParams);
16709
16992
 
16710
- return this.#submitAndVerifyTransaction(tx, options);
16993
+ return await this.#prepareSubmissionTransaction(tx, options);
16711
16994
  }
16712
16995
 
16713
16996
  async clearURITokenOffer(uriTokenID, options = {}) {
16714
- return this.#submitAndVerifyTransaction({
16997
+ const preparedTxn = await this.prepareClearURITokenOffer(uriTokenID, options);
16998
+ return await this.signAndSubmit(preparedTxn);
16999
+ }
17000
+
17001
+ async prepareClearURITokenOffer(uriTokenID, options = {}) {
17002
+ return await this.#prepareSubmissionTransaction({
16715
17003
  Account: this.address,
16716
- TransactionType: "URITokenCancelSellOffer",
17004
+ TransactionType: XrplTransactionTypes.URI_TOKEN_CANCEL_SELL_OFFER,
16717
17005
  URITokenID: uriTokenID
16718
17006
  }, options);
16719
17007
  }
@@ -16757,6 +17045,50 @@ class XrplAccount {
16757
17045
  // Get the first 32 bytes of hash.
16758
17046
  return digest.substring(0, 64).toUpperCase();
16759
17047
  }
17048
+
17049
+
17050
+ /**
17051
+ * Prepare a transaction for submission. (Signing Free)
17052
+ * @param {object} tx Partially prepared transaction.
17053
+ * @param {*} options Options regarding to the transaction submission.
17054
+ * @returns Submission transaction.
17055
+ */
17056
+ async #prepareSubmissionTransaction(tx, options) {
17057
+ // Attach tx options to the transaction.
17058
+ const txOptions = {
17059
+ LastLedgerSequence: options.maxLedgerIndex || (this.xrplApi.ledgerIndex + XrplConstants.MAX_LEDGER_OFFSET),
17060
+ Sequence: options.sequence || await this.getSequence(),
17061
+ SigningPubKey: '', // This field is required for fee calculation.
17062
+ Fee: '0', // This field is required for fee calculation.
17063
+ NetworkID: DefaultValues.networkID
17064
+ }
17065
+
17066
+ Object.assign(tx, txOptions);
17067
+ const txnBlob = xrplCodec.encode(tx);
17068
+ const fees = options.fee || await this.xrplApi.getTransactionFee(txnBlob);
17069
+ delete tx['SigningPubKey'];
17070
+ tx.Fee = fees + '';
17071
+ return tx;
17072
+ }
17073
+
17074
+ /**
17075
+ * Sign and submit prepared transaction.
17076
+ * @param {object} preparedTransaction Prepared transaction.
17077
+ * @returns result of the submitted transaction.
17078
+ */
17079
+ async signAndSubmit(preparedTransaction) {
17080
+ const signedTxn = this.sign(preparedTransaction, false);
17081
+ return await this.xrplApi.submit(preparedTransaction, signedTxn.tx_blob);
17082
+ }
17083
+
17084
+ /**
17085
+ * Submit a multi-singed transaction.
17086
+ * @param {object} tx Signed transaction.
17087
+ * @returns Result of the transaction.
17088
+ */
17089
+ async submitMultisigned(tx) {
17090
+ return await this.xrplApi.submitMultisigned(tx)
17091
+ }
16760
17092
  }
16761
17093
 
16762
17094
  function makeAmountObject(amount, currency, issuer) {
@@ -16801,6 +17133,8 @@ const API_REQ_TYPE = {
16801
17133
  TRANSACTIONS: 'transactions'
16802
17134
  }
16803
17135
 
17136
+ const LEDGER_CLOSE_TIME = 1000
17137
+
16804
17138
  class XrplApi {
16805
17139
 
16806
17140
  #rippledServer;
@@ -17093,8 +17427,99 @@ class XrplApi {
17093
17427
  await this.#client.request({ command: 'subscribe', streams: [streamName] });
17094
17428
  }
17095
17429
 
17430
+ /**
17431
+ * Watching to acquire the transaction submission. (Waits until txn. is applied to the ledger.)
17432
+ * @param {string} txHash Transaction Hash
17433
+ * @param {number} lastLedger Last ledger sequence of the transaction.
17434
+ * @param {object} submissionResult Result of the submission.
17435
+ * @returns Returns the applied transaction object.
17436
+ */
17437
+ async #waitForFinalTransactionOutcome(txHash, lastLedger, submissionResult) {
17438
+ if (lastLedger == null)
17439
+ throw 'Transaction must contain a LastLedgerSequence value for reliable submission.';
17440
+
17441
+ await new Promise(r => setTimeout(r, LEDGER_CLOSE_TIME));
17442
+
17443
+ const latestLedger = this.#client.getLedgerIndex();
17444
+
17445
+ if (lastLedger < latestLedger) {
17446
+ throw `The latest ledger sequence ${latestLedger} is greater than the transaction's LastLedgerSequence (${lastLedger}).\n` +
17447
+ `Preliminary result: ${submissionResult}`;
17448
+ }
17449
+
17450
+ const txResponse = await this.getTxnInfo(txHash)
17451
+ .catch(async (error) => {
17452
+ const message = error?.data?.error;
17453
+ if (message === 'txnNotFound') {
17454
+ return await this.#waitForFinalTransactionOutcome(
17455
+ txHash,
17456
+ lastLedger,
17457
+ submissionResult
17458
+ );
17459
+ }
17460
+ throw `${message} \n Preliminary result: ${submissionResult}.\nFull error details: ${String(
17461
+ error,)}`;
17462
+ });
17463
+
17464
+ if (txResponse.validated)
17465
+ return txResponse;
17466
+
17467
+ return await this.#waitForFinalTransactionOutcome(txHash, lastLedger, submissionResult);
17468
+ }
17469
+
17470
+ /**
17471
+ * Arrange the transaction result to a standard format.
17472
+ * @param {object} tx Submitted Transaction
17473
+ * @param {object} submissionResult Response related to that transaction.
17474
+ * @returns prepared response of the transaction result.
17475
+ */
17476
+ async #prepareResponse(tx, submissionResult) {
17477
+ const resultCode = submissionResult?.result?.engine_result;
17478
+ if (resultCode === "tesSUCCESS" || resultCode === "tefPAST_SEQ" || resultCode === "tefALREADY") {
17479
+ const result = await this.#waitForFinalTransactionOutcome(submissionResult.result.tx_json.hash, tx.LastLedgerSequence, submissionResult);
17480
+ const txResult = {
17481
+ id: result?.hash,
17482
+ code: result?.meta?.TransactionResult,
17483
+ details: result
17484
+ };
17485
+
17486
+ console.log("Transaction result: " + txResult.code);
17487
+ const hookExecRes = txResult.details?.meta?.HookExecutions?.map(o => {
17488
+ return {
17489
+ result: o.HookExecution?.HookResult,
17490
+ returnCode: parseInt(o.HookExecution?.HookReturnCode, 16),
17491
+ message: TransactionHelper.hexToASCII(o.HookExecution?.HookReturnString).replace(/\x00+$/, '')
17492
+ }
17493
+ });
17494
+ if (txResult.code === "tesSUCCESS")
17495
+ return { ...txResult, ...(hookExecRes ? { hookExecutionResult: hookExecRes } : {}) };
17496
+ else
17497
+ return { ...txResult, ...(hookExecRes ? { hookExecutionResult: hookExecRes } : {}) };
17498
+ }
17499
+ else
17500
+ throw resultCode ? `Transaction failed with error ${resultCode}` : 'Transaction failed';
17501
+
17502
+ }
17503
+
17504
+ /**
17505
+ * Submit a multi-signature transaction.
17506
+ * @param {object} tx Multi-signed transaction object.
17507
+ * @returns response object of the submitted transaction.
17508
+ */
17096
17509
  async submitMultisigned(tx) {
17097
- return await this.#client.request({ command: 'submit_multisigned', tx_json: tx });
17510
+ tx.SigningPubKey = "";
17511
+ const submissionResult = await this.#client.request({ command: 'submit_multisigned', tx_json: tx });
17512
+ return await this.#prepareResponse(tx, submissionResult);
17513
+ }
17514
+
17515
+ /**
17516
+ * Submit a single-signature transaction.
17517
+ * @param {string} tx_blob
17518
+ * @returns response object of the submitted transaction.
17519
+ */
17520
+ async submit(tx, tx_blob) {
17521
+ const submissionResult = await this.#client.request({ command: 'submit', tx_blob: tx_blob });
17522
+ return await this.#prepareResponse(tx, submissionResult);
17098
17523
  }
17099
17524
 
17100
17525
  /**
@@ -17136,9 +17561,30 @@ const XrplConstants = {
17136
17561
  MIN_XRP_AMOUNT: '1' // drops
17137
17562
  }
17138
17563
 
17564
+ const XrplTransactionTypes = {
17565
+ PAYMENT: 'Payment',
17566
+ SIGNER_LIST_SET: 'SignerListSet',
17567
+ TRUST_SET: 'TrustSet',
17568
+ CHECK_CASH: 'CheckCash',
17569
+ ACCOUNT_SET: 'AccountSet',
17570
+ SET_REGULAR_KEY: 'SetRegularKey',
17571
+ OFFER_CREATE: 'OfferCreate',
17572
+ OFFER_CANCEL: 'OfferCancel',
17573
+ URI_TOKEN_MINT: 'URITokenMint',
17574
+ URI_TOKEN_BURN: 'URITokenBurn',
17575
+ URI_TOKEN_CREATE_SELL_OFFER: 'URITokenCreateSellOffer',
17576
+ URI_TOKEN_BUY_OFFER: 'URITokenBuy',
17577
+ URI_TOKEN_CANCEL_SELL_OFFER: 'URITokenCancelSellOffer',
17578
+ NF_TOKEN_MINT: 'NFTokenMint',
17579
+ NF_TOKEN_CREATE_OFFER: 'NFTokenCreateOffer',
17580
+ NF_TOKEN_ACCEPT_OFFER: 'NFTokenAcceptOffer',
17581
+ NF_TOKEN_BURN: 'NFTokenBurn'
17582
+ }
17583
+
17139
17584
  module.exports = {
17140
17585
  XrplApiEvents,
17141
- XrplConstants
17586
+ XrplConstants,
17587
+ XrplTransactionTypes
17142
17588
  }
17143
17589
 
17144
17590
  /***/ }),
@@ -17227,7 +17673,7 @@ module.exports = require("xrpl");
17227
17673
  /***/ ((module) => {
17228
17674
 
17229
17675
  "use strict";
17230
- module.exports = JSON.parse('{"FIELDS":[["Generic",{"isSerialized":false,"isSigningField":false,"isVLEncoded":false,"nth":0,"type":"Unknown"}],["Invalid",{"isSerialized":false,"isSigningField":false,"isVLEncoded":false,"nth":-1,"type":"Unknown"}],["ObjectEndMarker",{"isSerialized":false,"isSigningField":true,"isVLEncoded":false,"nth":1,"type":"STObject"}],["ArrayEndMarker",{"isSerialized":false,"isSigningField":true,"isVLEncoded":false,"nth":1,"type":"STArray"}],["hash",{"isSerialized":false,"isSigningField":false,"isVLEncoded":false,"nth":257,"type":"Hash256"}],["index",{"isSerialized":false,"isSigningField":false,"isVLEncoded":false,"nth":258,"type":"Hash256"}],["taker_gets_funded",{"isSerialized":false,"isSigningField":false,"isVLEncoded":false,"nth":258,"type":"Amount"}],["taker_pays_funded",{"isSerialized":false,"isSigningField":false,"isVLEncoded":false,"nth":259,"type":"Amount"}],["LedgerEntryType",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":1,"type":"UInt16"}],["TransactionType",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":2,"type":"UInt16"}],["SignerWeight",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":3,"type":"UInt16"}],["TransferFee",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":4,"type":"UInt16"}],["Version",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":16,"type":"UInt16"}],["HookStateChangeCount",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":17,"type":"UInt16"}],["HookEmitCount",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":18,"type":"UInt16"}],["HookExecutionIndex",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":19,"type":"UInt16"}],["HookApiVersion",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":20,"type":"UInt16"}],["NetworkID",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":1,"type":"UInt32"}],["Flags",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":2,"type":"UInt32"}],["SourceTag",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":3,"type":"UInt32"}],["Sequence",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":4,"type":"UInt32"}],["PreviousTxnLgrSeq",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":5,"type":"UInt32"}],["LedgerSequence",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":6,"type":"UInt32"}],["CloseTime",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":7,"type":"UInt32"}],["ParentCloseTime",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":8,"type":"UInt32"}],["SigningTime",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":9,"type":"UInt32"}],["Expiration",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":10,"type":"UInt32"}],["TransferRate",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":11,"type":"UInt32"}],["WalletSize",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":12,"type":"UInt32"}],["OwnerCount",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":13,"type":"UInt32"}],["DestinationTag",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":14,"type":"UInt32"}],["HighQualityIn",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":16,"type":"UInt32"}],["HighQualityOut",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":17,"type":"UInt32"}],["LowQualityIn",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":18,"type":"UInt32"}],["LowQualityOut",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":19,"type":"UInt32"}],["QualityIn",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":20,"type":"UInt32"}],["QualityOut",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":21,"type":"UInt32"}],["StampEscrow",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":22,"type":"UInt32"}],["BondAmount",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":23,"type":"UInt32"}],["LoadFee",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":24,"type":"UInt32"}],["OfferSequence",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":25,"type":"UInt32"}],["FirstLedgerSequence",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":26,"type":"UInt32"}],["LastLedgerSequence",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":27,"type":"UInt32"}],["TransactionIndex",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":28,"type":"UInt32"}],["OperationLimit",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":29,"type":"UInt32"}],["ReferenceFeeUnits",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":30,"type":"UInt32"}],["ReserveBase",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":31,"type":"UInt32"}],["ReserveIncrement",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":32,"type":"UInt32"}],["SetFlag",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":33,"type":"UInt32"}],["ClearFlag",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":34,"type":"UInt32"}],["SignerQuorum",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":35,"type":"UInt32"}],["CancelAfter",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":36,"type":"UInt32"}],["FinishAfter",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":37,"type":"UInt32"}],["SignerListID",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":38,"type":"UInt32"}],["SettleDelay",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":39,"type":"UInt32"}],["TicketCount",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":40,"type":"UInt32"}],["TicketSequence",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":41,"type":"UInt32"}],["NFTokenTaxon",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":42,"type":"UInt32"}],["MintedNFTokens",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":43,"type":"UInt32"}],["BurnedNFTokens",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":44,"type":"UInt32"}],["HookStateCount",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":45,"type":"UInt32"}],["EmitGeneration",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":46,"type":"UInt32"}],["LockCount",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":47,"type":"UInt32"}],["RewardTime",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":98,"type":"UInt32"}],["RewardLgrFirst",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":99,"type":"UInt32"}],["RewardLgrLast",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":100,"type":"UInt32"}],["IndexNext",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":1,"type":"UInt64"}],["IndexPrevious",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":2,"type":"UInt64"}],["BookNode",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":3,"type":"UInt64"}],["OwnerNode",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":4,"type":"UInt64"}],["BaseFee",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":5,"type":"UInt64"}],["ExchangeRate",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":6,"type":"UInt64"}],["LowNode",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":7,"type":"UInt64"}],["HighNode",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":8,"type":"UInt64"}],["DestinationNode",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":9,"type":"UInt64"}],["Cookie",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":10,"type":"UInt64"}],["ServerVersion",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":11,"type":"UInt64"}],["NFTokenOfferNode",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":12,"type":"UInt64"}],["EmitBurden",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":13,"type":"UInt64"}],["HookInstructionCount",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":17,"type":"UInt64"}],["HookReturnCode",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":18,"type":"UInt64"}],["ReferenceCount",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":19,"type":"UInt64"}],["RewardAccumulator",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":100,"type":"UInt64"}],["EmailHash",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":1,"type":"Hash128"}],["LedgerHash",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":1,"type":"Hash256"}],["ParentHash",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":2,"type":"Hash256"}],["TransactionHash",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":3,"type":"Hash256"}],["AccountHash",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":4,"type":"Hash256"}],["PreviousTxnID",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":5,"type":"Hash256"}],["LedgerIndex",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":6,"type":"Hash256"}],["WalletLocator",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":7,"type":"Hash256"}],["RootIndex",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":8,"type":"Hash256"}],["AccountTxnID",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":9,"type":"Hash256"}],["NFTokenID",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":10,"type":"Hash256"}],["EmitParentTxnID",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":11,"type":"Hash256"}],["EmitNonce",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":12,"type":"Hash256"}],["EmitHookHash",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":13,"type":"Hash256"}],["BookDirectory",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":16,"type":"Hash256"}],["InvoiceID",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":17,"type":"Hash256"}],["Nickname",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":18,"type":"Hash256"}],["Amendment",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":19,"type":"Hash256"}],["HookOn",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":20,"type":"Hash256"}],["Digest",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":21,"type":"Hash256"}],["Channel",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":22,"type":"Hash256"}],["ConsensusHash",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":23,"type":"Hash256"}],["CheckID",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":24,"type":"Hash256"}],["ValidatedHash",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":25,"type":"Hash256"}],["PreviousPageMin",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":26,"type":"Hash256"}],["NextPageMin",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":27,"type":"Hash256"}],["NFTokenBuyOffer",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":28,"type":"Hash256"}],["NFTokenSellOffer",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":29,"type":"Hash256"}],["HookStateKey",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":30,"type":"Hash256"}],["HookHash",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":31,"type":"Hash256"}],["HookNamespace",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":32,"type":"Hash256"}],["HookSetTxnID",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":33,"type":"Hash256"}],["OfferID",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":34,"type":"Hash256"}],["EscrowID",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":35,"type":"Hash256"}],["URITokenID",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":36,"type":"Hash256"}],["hash",{"isSerialized":true,"isSigningField":false,"isVLEncoded":false,"nth":1,"type":"Hash256"}],["index",{"isSerialized":true,"isSigningField":false,"isVLEncoded":false,"nth":2,"type":"Hash256"}],["Amount",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":1,"type":"Amount"}],["Balance",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":2,"type":"Amount"}],["LimitAmount",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":3,"type":"Amount"}],["TakerPays",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":4,"type":"Amount"}],["TakerGets",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":5,"type":"Amount"}],["LowLimit",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":6,"type":"Amount"}],["HighLimit",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":7,"type":"Amount"}],["Fee",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":8,"type":"Amount"}],["SendMax",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":9,"type":"Amount"}],["DeliverMin",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":10,"type":"Amount"}],["MinimumOffer",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":16,"type":"Amount"}],["RippleEscrow",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":17,"type":"Amount"}],["DeliveredAmount",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":18,"type":"Amount"}],["NFTokenBrokerFee",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":19,"type":"Amount"}],["HookCallbackFee",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":20,"type":"Amount"}],["LockedBalance",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":21,"type":"Amount"}],["PublicKey",{"isSerialized":true,"isSigningField":true,"isVLEncoded":true,"nth":1,"type":"Blob"}],["MessageKey",{"isSerialized":true,"isSigningField":true,"isVLEncoded":true,"nth":2,"type":"Blob"}],["SigningPubKey",{"isSerialized":true,"isSigningField":true,"isVLEncoded":true,"nth":3,"type":"Blob"}],["TxnSignature",{"isSerialized":true,"isSigningField":false,"isVLEncoded":true,"nth":4,"type":"Blob"}],["URI",{"isSerialized":true,"isSigningField":true,"isVLEncoded":true,"nth":5,"type":"Blob"}],["Signature",{"isSerialized":true,"isSigningField":false,"isVLEncoded":true,"nth":6,"type":"Blob"}],["Domain",{"isSerialized":true,"isSigningField":true,"isVLEncoded":true,"nth":7,"type":"Blob"}],["FundCode",{"isSerialized":true,"isSigningField":true,"isVLEncoded":true,"nth":8,"type":"Blob"}],["RemoveCode",{"isSerialized":true,"isSigningField":true,"isVLEncoded":true,"nth":9,"type":"Blob"}],["ExpireCode",{"isSerialized":true,"isSigningField":true,"isVLEncoded":true,"nth":10,"type":"Blob"}],["CreateCode",{"isSerialized":true,"isSigningField":true,"isVLEncoded":true,"nth":11,"type":"Blob"}],["MemoType",{"isSerialized":true,"isSigningField":true,"isVLEncoded":true,"nth":12,"type":"Blob"}],["MemoData",{"isSerialized":true,"isSigningField":true,"isVLEncoded":true,"nth":13,"type":"Blob"}],["MemoFormat",{"isSerialized":true,"isSigningField":true,"isVLEncoded":true,"nth":14,"type":"Blob"}],["Fulfillment",{"isSerialized":true,"isSigningField":true,"isVLEncoded":true,"nth":16,"type":"Blob"}],["Condition",{"isSerialized":true,"isSigningField":true,"isVLEncoded":true,"nth":17,"type":"Blob"}],["MasterSignature",{"isSerialized":true,"isSigningField":false,"isVLEncoded":true,"nth":18,"type":"Blob"}],["UNLModifyValidator",{"isSerialized":true,"isSigningField":true,"isVLEncoded":true,"nth":19,"type":"Blob"}],["ValidatorToDisable",{"isSerialized":true,"isSigningField":true,"isVLEncoded":true,"nth":20,"type":"Blob"}],["ValidatorToReEnable",{"isSerialized":true,"isSigningField":true,"isVLEncoded":true,"nth":21,"type":"Blob"}],["HookStateData",{"isSerialized":true,"isSigningField":true,"isVLEncoded":true,"nth":22,"type":"Blob"}],["HookReturnString",{"isSerialized":true,"isSigningField":true,"isVLEncoded":true,"nth":23,"type":"Blob"}],["HookParameterName",{"isSerialized":true,"isSigningField":true,"isVLEncoded":true,"nth":24,"type":"Blob"}],["HookParameterValue",{"isSerialized":true,"isSigningField":true,"isVLEncoded":true,"nth":25,"type":"Blob"}],["Blob",{"isSerialized":true,"isSigningField":true,"isVLEncoded":true,"nth":26,"type":"Blob"}],["Account",{"isSerialized":true,"isSigningField":true,"isVLEncoded":true,"nth":1,"type":"AccountID"}],["Owner",{"isSerialized":true,"isSigningField":true,"isVLEncoded":true,"nth":2,"type":"AccountID"}],["Destination",{"isSerialized":true,"isSigningField":true,"isVLEncoded":true,"nth":3,"type":"AccountID"}],["Issuer",{"isSerialized":true,"isSigningField":true,"isVLEncoded":true,"nth":4,"type":"AccountID"}],["Authorize",{"isSerialized":true,"isSigningField":true,"isVLEncoded":true,"nth":5,"type":"AccountID"}],["Unauthorize",{"isSerialized":true,"isSigningField":true,"isVLEncoded":true,"nth":6,"type":"AccountID"}],["RegularKey",{"isSerialized":true,"isSigningField":true,"isVLEncoded":true,"nth":8,"type":"AccountID"}],["NFTokenMinter",{"isSerialized":true,"isSigningField":true,"isVLEncoded":true,"nth":9,"type":"AccountID"}],["EmitCallback",{"isSerialized":true,"isSigningField":true,"isVLEncoded":true,"nth":10,"type":"AccountID"}],["HookAccount",{"isSerialized":true,"isSigningField":true,"isVLEncoded":true,"nth":16,"type":"AccountID"}],["TransactionMetaData",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":2,"type":"STObject"}],["CreatedNode",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":3,"type":"STObject"}],["DeletedNode",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":4,"type":"STObject"}],["ModifiedNode",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":5,"type":"STObject"}],["PreviousFields",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":6,"type":"STObject"}],["FinalFields",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":7,"type":"STObject"}],["NewFields",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":8,"type":"STObject"}],["TemplateEntry",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":9,"type":"STObject"}],["Memo",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":10,"type":"STObject"}],["SignerEntry",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":11,"type":"STObject"}],["NFToken",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":12,"type":"STObject"}],["EmitDetails",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":13,"type":"STObject"}],["Hook",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":14,"type":"STObject"}],["Signer",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":16,"type":"STObject"}],["Majority",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":18,"type":"STObject"}],["DisabledValidator",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":19,"type":"STObject"}],["EmittedTxn",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":20,"type":"STObject"}],["HookExecution",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":21,"type":"STObject"}],["HookDefinition",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":22,"type":"STObject"}],["HookParameter",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":23,"type":"STObject"}],["HookGrant",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":24,"type":"STObject"}],["Signers",{"isSerialized":true,"isSigningField":false,"isVLEncoded":false,"nth":3,"type":"STArray"}],["SignerEntries",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":4,"type":"STArray"}],["Template",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":5,"type":"STArray"}],["Necessary",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":6,"type":"STArray"}],["Sufficient",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":7,"type":"STArray"}],["AffectedNodes",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":8,"type":"STArray"}],["Memos",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":9,"type":"STArray"}],["NFTokens",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":10,"type":"STArray"}],["Hooks",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":11,"type":"STArray"}],["Majorities",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":16,"type":"STArray"}],["DisabledValidators",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":17,"type":"STArray"}],["HookExecutions",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":18,"type":"STArray"}],["HookParameters",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":19,"type":"STArray"}],["HookGrants",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":20,"type":"STArray"}],["CloseResolution",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":1,"type":"UInt8"}],["Method",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":2,"type":"UInt8"}],["TransactionResult",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":3,"type":"UInt8"}],["TickSize",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":16,"type":"UInt8"}],["UNLModifyDisabling",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":17,"type":"UInt8"}],["HookResult",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":18,"type":"UInt8"}],["TakerPaysCurrency",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":1,"type":"Hash160"}],["TakerPaysIssuer",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":2,"type":"Hash160"}],["TakerGetsCurrency",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":3,"type":"Hash160"}],["TakerGetsIssuer",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":4,"type":"Hash160"}],["Paths",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":1,"type":"PathSet"}],["Indexes",{"isSerialized":true,"isSigningField":true,"isVLEncoded":true,"nth":1,"type":"Vector256"}],["Hashes",{"isSerialized":true,"isSigningField":true,"isVLEncoded":true,"nth":2,"type":"Vector256"}],["Amendments",{"isSerialized":true,"isSigningField":true,"isVLEncoded":true,"nth":3,"type":"Vector256"}],["NFTokenOffers",{"isSerialized":true,"isSigningField":true,"isVLEncoded":true,"nth":4,"type":"Vector256"}],["HookNamespaces",{"isSerialized":true,"isSigningField":true,"isVLEncoded":true,"nth":5,"type":"Vector256"}],["Transaction",{"isSerialized":false,"isSigningField":false,"isVLEncoded":false,"nth":1,"type":"Transaction"}],["LedgerEntry",{"isSerialized":false,"isSigningField":false,"isVLEncoded":false,"nth":1,"type":"LedgerEntry"}],["Validation",{"isSerialized":false,"isSigningField":false,"isVLEncoded":false,"nth":1,"type":"Validation"}],["Metadata",{"isSerialized":false,"isSigningField":false,"isVLEncoded":false,"nth":1,"type":"Metadata"}]],"LEDGER_ENTRY_TYPES":{"AccountRoot":97,"Amendments":102,"Any":0,"Check":67,"Child":7378,"Contract":99,"DepositPreauth":112,"DirectoryNode":100,"EmittedTxn":69,"Escrow":117,"FeeSettings":115,"GeneratorMap":103,"Hook":72,"HookDefinition":68,"HookState":118,"Invalid":-1,"LedgerHashes":104,"NFTokenOffer":55,"NFTokenPage":80,"NegativeUNL":78,"Nickname":110,"Offer":111,"PayChannel":120,"RippleState":114,"SignerList":83,"Ticket":84,"URIToken":85},"TRANSACTION_RESULTS":{"tecCANT_ACCEPT_OWN_NFTOKEN_OFFER":158,"tecCLAIM":100,"tecCRYPTOCONDITION_ERROR":146,"tecDIR_FULL":121,"tecDST_TAG_NEEDED":143,"tecDUPLICATE":149,"tecEXPIRED":148,"tecFAILED_PROCESSING":105,"tecFROZEN":137,"tecHAS_OBLIGATIONS":151,"tecHOOK_REJECTED":153,"tecINSUFFICIENT_FUNDS":159,"tecINSUFFICIENT_PAYMENT":161,"tecINSUFFICIENT_RESERVE":141,"tecINSUFF_FEE":136,"tecINSUF_RESERVE_LINE":122,"tecINSUF_RESERVE_OFFER":123,"tecINTERNAL":144,"tecINVARIANT_FAILED":147,"tecKILLED":150,"tecMAX_SEQUENCE_REACHED":154,"tecNEED_MASTER_KEY":142,"tecNFTOKEN_BUY_SELL_MISMATCH":156,"tecNFTOKEN_OFFER_TYPE_MISMATCH":157,"tecNO_ALTERNATIVE_KEY":130,"tecNO_AUTH":134,"tecNO_DST":124,"tecNO_DST_INSUF_XRP":125,"tecNO_ENTRY":140,"tecNO_ISSUER":133,"tecNO_LINE":135,"tecNO_LINE_INSUF_RESERVE":126,"tecNO_LINE_REDUNDANT":127,"tecNO_PERMISSION":139,"tecNO_REGULAR_KEY":131,"tecNO_SUITABLE_NFTOKEN_PAGE":155,"tecNO_TARGET":138,"tecOBJECT_NOT_FOUND":160,"tecOVERSIZE":145,"tecOWNERS":132,"tecPATH_DRY":128,"tecPATH_PARTIAL":101,"tecPRECISION_LOSS":163,"tecREQUIRES_FLAG":162,"tecTOO_SOON":152,"tecUNFUNDED":129,"tecUNFUNDED_ADD":102,"tecUNFUNDED_OFFER":103,"tecUNFUNDED_PAYMENT":104,"tefALREADY":-198,"tefBAD_ADD_AUTH":-197,"tefBAD_AUTH":-196,"tefBAD_AUTH_MASTER":-183,"tefBAD_LEDGER":-195,"tefBAD_QUORUM":-185,"tefBAD_SIGNATURE":-186,"tefCREATED":-194,"tefEXCEPTION":-193,"tefFAILURE":-199,"tefINTERNAL":-192,"tefINVARIANT_FAILED":-182,"tefMASTER_DISABLED":-188,"tefMAX_LEDGER":-187,"tefNFTOKEN_IS_NOT_TRANSFERABLE":-179,"tefNOT_MULTI_SIGNING":-184,"tefNO_AUTH_REQUIRED":-191,"tefNO_TICKET":-180,"tefPAST_SEQ":-190,"tefTOO_BIG":-181,"tefWRONG_PRIOR":-189,"telBAD_DOMAIN":-398,"telBAD_PATH_COUNT":-397,"telBAD_PUBLIC_KEY":-396,"telCAN_NOT_QUEUE":-392,"telCAN_NOT_QUEUE_BALANCE":-391,"telCAN_NOT_QUEUE_BLOCKED":-389,"telCAN_NOT_QUEUE_BLOCKS":-390,"telCAN_NOT_QUEUE_FEE":-388,"telCAN_NOT_QUEUE_FULL":-387,"telFAILED_PROCESSING":-395,"telINSUF_FEE_P":-394,"telLOCAL_ERROR":-399,"telNETWORK_ID_MAKES_TX_NON_CANONICAL":-384,"telNON_LOCAL_EMITTED_TXN":-383,"telNO_DST_PARTIAL":-393,"telREQUIRES_NETWORK_ID":-385,"telWRONG_NETWORK":-386,"temBAD_AMOUNT":-298,"temBAD_CURRENCY":-297,"temBAD_EXPIRATION":-296,"temBAD_FEE":-295,"temBAD_ISSUER":-294,"temBAD_LIMIT":-293,"temBAD_NFTOKEN_TRANSFER_FEE":-260,"temBAD_OFFER":-292,"temBAD_PATH":-291,"temBAD_PATH_LOOP":-290,"temBAD_QUORUM":-271,"temBAD_REGKEY":-289,"temBAD_SEND_XRP_LIMIT":-288,"temBAD_SEND_XRP_MAX":-287,"temBAD_SEND_XRP_NO_DIRECT":-286,"temBAD_SEND_XRP_PARTIAL":-285,"temBAD_SEND_XRP_PATHS":-284,"temBAD_SEQUENCE":-283,"temBAD_SIGNATURE":-282,"temBAD_SIGNER":-272,"temBAD_SRC_ACCOUNT":-281,"temBAD_TICK_SIZE":-269,"temBAD_TRANSFER_RATE":-280,"temBAD_WEIGHT":-270,"temCANNOT_PREAUTH_SELF":-267,"temDISABLED":-273,"temDST_IS_SRC":-279,"temDST_NEEDED":-278,"temHOOK_DATA_TOO_LARGE":-265,"temHOOK_REJECTED":-264,"temINVALID":-277,"temINVALID_ACCOUNT_ID":-268,"temINVALID_COUNT":-266,"temINVALID_FLAG":-276,"temMALFORMED":-299,"temREDUNDANT":-275,"temRIPPLE_EMPTY":-274,"temSEQ_AND_TICKET":-261,"temUNCERTAIN":-263,"temUNKNOWN":-262,"terFUNDS_SPENT":-98,"terINSUF_FEE_B":-97,"terLAST":-91,"terNO_ACCOUNT":-96,"terNO_AUTH":-95,"terNO_HOOK":-87,"terNO_LINE":-94,"terNO_RIPPLE":-90,"terOWNERS":-93,"terPRE_SEQ":-92,"terPRE_TICKET":-88,"terQUEUED":-89,"terRETRY":-99,"tesSUCCESS":0},"TRANSACTION_TYPES":{"AccountDelete":21,"AccountSet":3,"Amendment":100,"CheckCancel":18,"CheckCash":17,"CheckCreate":16,"ClaimReward":98,"Contract":9,"DepositPreauth":19,"EmitFailure":103,"EscrowCancel":4,"EscrowCreate":1,"EscrowFinish":2,"Fee":101,"Invalid":-1,"Invoke":99,"NFTokenAcceptOffer":29,"NFTokenBurn":26,"NFTokenCancelOffer":28,"NFTokenCreateOffer":27,"NFTokenMint":25,"NicknameSet":6,"OfferCancel":8,"OfferCreate":7,"Payment":0,"PaymentChannelClaim":15,"PaymentChannelCreate":13,"PaymentChannelFund":14,"SetHook":22,"SetRegularKey":5,"SignerListSet":12,"SpinalTap":11,"TicketCreate":10,"TrustSet":20,"UNLModify":102,"URITokenBurn":46,"URITokenBuy":47,"URITokenCancelSellOffer":49,"URITokenCreateSellOffer":48,"URITokenMint":45},"TYPES":{"AccountID":8,"Amount":6,"Blob":7,"Done":-1,"Hash128":4,"Hash160":17,"Hash256":5,"LedgerEntry":10002,"Metadata":10004,"NotPresent":0,"PathSet":18,"STArray":15,"STObject":14,"Transaction":10001,"UInt16":1,"UInt192":21,"UInt32":2,"UInt384":22,"UInt512":23,"UInt64":3,"UInt8":16,"UInt96":20,"Unknown":-2,"Validation":10003,"Vector256":19},"hash":"67D2FC42C6321687BCC47B1D912D7EB2E077A7016D6E2D5B8A2E128D7493B650"}');
17676
+ module.exports = JSON.parse('{"FIELDS":[["Generic",{"isSerialized":false,"isSigningField":false,"isVLEncoded":false,"nth":0,"type":"Unknown"}],["Invalid",{"isSerialized":false,"isSigningField":false,"isVLEncoded":false,"nth":-1,"type":"Unknown"}],["ObjectEndMarker",{"isSerialized":false,"isSigningField":true,"isVLEncoded":false,"nth":1,"type":"STObject"}],["ArrayEndMarker",{"isSerialized":false,"isSigningField":true,"isVLEncoded":false,"nth":1,"type":"STArray"}],["hash",{"isSerialized":false,"isSigningField":false,"isVLEncoded":false,"nth":257,"type":"Hash256"}],["index",{"isSerialized":false,"isSigningField":false,"isVLEncoded":false,"nth":258,"type":"Hash256"}],["taker_gets_funded",{"isSerialized":false,"isSigningField":false,"isVLEncoded":false,"nth":258,"type":"Amount"}],["taker_pays_funded",{"isSerialized":false,"isSigningField":false,"isVLEncoded":false,"nth":259,"type":"Amount"}],["LedgerEntryType",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":1,"type":"UInt16"}],["TransactionType",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":2,"type":"UInt16"}],["SignerWeight",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":3,"type":"UInt16"}],["TransferFee",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":4,"type":"UInt16"}],["Version",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":16,"type":"UInt16"}],["HookStateChangeCount",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":17,"type":"UInt16"}],["HookEmitCount",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":18,"type":"UInt16"}],["HookExecutionIndex",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":19,"type":"UInt16"}],["HookApiVersion",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":20,"type":"UInt16"}],["NetworkID",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":1,"type":"UInt32"}],["Flags",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":2,"type":"UInt32"}],["SourceTag",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":3,"type":"UInt32"}],["Sequence",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":4,"type":"UInt32"}],["PreviousTxnLgrSeq",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":5,"type":"UInt32"}],["LedgerSequence",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":6,"type":"UInt32"}],["CloseTime",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":7,"type":"UInt32"}],["ParentCloseTime",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":8,"type":"UInt32"}],["SigningTime",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":9,"type":"UInt32"}],["Expiration",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":10,"type":"UInt32"}],["TransferRate",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":11,"type":"UInt32"}],["WalletSize",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":12,"type":"UInt32"}],["OwnerCount",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":13,"type":"UInt32"}],["DestinationTag",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":14,"type":"UInt32"}],["HighQualityIn",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":16,"type":"UInt32"}],["HighQualityOut",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":17,"type":"UInt32"}],["LowQualityIn",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":18,"type":"UInt32"}],["LowQualityOut",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":19,"type":"UInt32"}],["QualityIn",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":20,"type":"UInt32"}],["QualityOut",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":21,"type":"UInt32"}],["StampEscrow",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":22,"type":"UInt32"}],["BondAmount",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":23,"type":"UInt32"}],["LoadFee",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":24,"type":"UInt32"}],["OfferSequence",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":25,"type":"UInt32"}],["FirstLedgerSequence",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":26,"type":"UInt32"}],["LastLedgerSequence",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":27,"type":"UInt32"}],["TransactionIndex",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":28,"type":"UInt32"}],["OperationLimit",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":29,"type":"UInt32"}],["ReferenceFeeUnits",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":30,"type":"UInt32"}],["ReserveBase",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":31,"type":"UInt32"}],["ReserveIncrement",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":32,"type":"UInt32"}],["SetFlag",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":33,"type":"UInt32"}],["ClearFlag",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":34,"type":"UInt32"}],["SignerQuorum",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":35,"type":"UInt32"}],["CancelAfter",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":36,"type":"UInt32"}],["FinishAfter",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":37,"type":"UInt32"}],["SignerListID",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":38,"type":"UInt32"}],["SettleDelay",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":39,"type":"UInt32"}],["TicketCount",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":40,"type":"UInt32"}],["TicketSequence",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":41,"type":"UInt32"}],["NFTokenTaxon",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":42,"type":"UInt32"}],["MintedNFTokens",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":43,"type":"UInt32"}],["BurnedNFTokens",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":44,"type":"UInt32"}],["HookStateCount",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":45,"type":"UInt32"}],["EmitGeneration",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":46,"type":"UInt32"}],["LockCount",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":49,"type":"UInt32"}],["FirstNFTokenSequence",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":50,"type":"UInt32"}],["ImportSequence",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":97,"type":"UInt32"}],["RewardTime",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":98,"type":"UInt32"}],["RewardLgrFirst",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":99,"type":"UInt32"}],["RewardLgrLast",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":100,"type":"UInt32"}],["IndexNext",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":1,"type":"UInt64"}],["IndexPrevious",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":2,"type":"UInt64"}],["BookNode",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":3,"type":"UInt64"}],["OwnerNode",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":4,"type":"UInt64"}],["BaseFee",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":5,"type":"UInt64"}],["ExchangeRate",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":6,"type":"UInt64"}],["LowNode",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":7,"type":"UInt64"}],["HighNode",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":8,"type":"UInt64"}],["DestinationNode",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":9,"type":"UInt64"}],["Cookie",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":10,"type":"UInt64"}],["ServerVersion",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":11,"type":"UInt64"}],["NFTokenOfferNode",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":12,"type":"UInt64"}],["EmitBurden",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":13,"type":"UInt64"}],["HookInstructionCount",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":17,"type":"UInt64"}],["HookReturnCode",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":18,"type":"UInt64"}],["ReferenceCount",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":19,"type":"UInt64"}],["RewardAccumulator",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":100,"type":"UInt64"}],["EmailHash",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":1,"type":"Hash128"}],["LedgerHash",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":1,"type":"Hash256"}],["ParentHash",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":2,"type":"Hash256"}],["TransactionHash",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":3,"type":"Hash256"}],["AccountHash",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":4,"type":"Hash256"}],["PreviousTxnID",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":5,"type":"Hash256"}],["LedgerIndex",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":6,"type":"Hash256"}],["WalletLocator",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":7,"type":"Hash256"}],["RootIndex",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":8,"type":"Hash256"}],["AccountTxnID",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":9,"type":"Hash256"}],["NFTokenID",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":10,"type":"Hash256"}],["EmitParentTxnID",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":11,"type":"Hash256"}],["EmitNonce",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":12,"type":"Hash256"}],["EmitHookHash",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":13,"type":"Hash256"}],["BookDirectory",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":16,"type":"Hash256"}],["InvoiceID",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":17,"type":"Hash256"}],["Nickname",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":18,"type":"Hash256"}],["Amendment",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":19,"type":"Hash256"}],["HookOn",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":20,"type":"Hash256"}],["Digest",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":21,"type":"Hash256"}],["Channel",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":22,"type":"Hash256"}],["ConsensusHash",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":23,"type":"Hash256"}],["CheckID",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":24,"type":"Hash256"}],["ValidatedHash",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":25,"type":"Hash256"}],["PreviousPageMin",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":26,"type":"Hash256"}],["NextPageMin",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":27,"type":"Hash256"}],["NFTokenBuyOffer",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":28,"type":"Hash256"}],["NFTokenSellOffer",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":29,"type":"Hash256"}],["HookStateKey",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":30,"type":"Hash256"}],["HookHash",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":31,"type":"Hash256"}],["HookNamespace",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":32,"type":"Hash256"}],["HookSetTxnID",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":33,"type":"Hash256"}],["OfferID",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":34,"type":"Hash256"}],["EscrowID",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":35,"type":"Hash256"}],["URITokenID",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":36,"type":"Hash256"}],["GovernanceMarks",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":98,"type":"Hash256"}],["GovernanceFlags",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":99,"type":"Hash256"}],["hash",{"isSerialized":true,"isSigningField":false,"isVLEncoded":false,"nth":1,"type":"Hash256"}],["index",{"isSerialized":true,"isSigningField":false,"isVLEncoded":false,"nth":2,"type":"Hash256"}],["Amount",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":1,"type":"Amount"}],["Balance",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":2,"type":"Amount"}],["LimitAmount",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":3,"type":"Amount"}],["TakerPays",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":4,"type":"Amount"}],["TakerGets",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":5,"type":"Amount"}],["LowLimit",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":6,"type":"Amount"}],["HighLimit",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":7,"type":"Amount"}],["Fee",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":8,"type":"Amount"}],["SendMax",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":9,"type":"Amount"}],["DeliverMin",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":10,"type":"Amount"}],["MinimumOffer",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":16,"type":"Amount"}],["RippleEscrow",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":17,"type":"Amount"}],["DeliveredAmount",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":18,"type":"Amount"}],["NFTokenBrokerFee",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":19,"type":"Amount"}],["HookCallbackFee",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":20,"type":"Amount"}],["LockedBalance",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":21,"type":"Amount"}],["BaseFeeDrops",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":22,"type":"Amount"}],["ReserveBaseDrops",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":23,"type":"Amount"}],["ReserveIncrementDrops",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":24,"type":"Amount"}],["PublicKey",{"isSerialized":true,"isSigningField":true,"isVLEncoded":true,"nth":1,"type":"Blob"}],["MessageKey",{"isSerialized":true,"isSigningField":true,"isVLEncoded":true,"nth":2,"type":"Blob"}],["SigningPubKey",{"isSerialized":true,"isSigningField":true,"isVLEncoded":true,"nth":3,"type":"Blob"}],["TxnSignature",{"isSerialized":true,"isSigningField":false,"isVLEncoded":true,"nth":4,"type":"Blob"}],["URI",{"isSerialized":true,"isSigningField":true,"isVLEncoded":true,"nth":5,"type":"Blob"}],["Signature",{"isSerialized":true,"isSigningField":false,"isVLEncoded":true,"nth":6,"type":"Blob"}],["Domain",{"isSerialized":true,"isSigningField":true,"isVLEncoded":true,"nth":7,"type":"Blob"}],["FundCode",{"isSerialized":true,"isSigningField":true,"isVLEncoded":true,"nth":8,"type":"Blob"}],["RemoveCode",{"isSerialized":true,"isSigningField":true,"isVLEncoded":true,"nth":9,"type":"Blob"}],["ExpireCode",{"isSerialized":true,"isSigningField":true,"isVLEncoded":true,"nth":10,"type":"Blob"}],["CreateCode",{"isSerialized":true,"isSigningField":true,"isVLEncoded":true,"nth":11,"type":"Blob"}],["MemoType",{"isSerialized":true,"isSigningField":true,"isVLEncoded":true,"nth":12,"type":"Blob"}],["MemoData",{"isSerialized":true,"isSigningField":true,"isVLEncoded":true,"nth":13,"type":"Blob"}],["MemoFormat",{"isSerialized":true,"isSigningField":true,"isVLEncoded":true,"nth":14,"type":"Blob"}],["Fulfillment",{"isSerialized":true,"isSigningField":true,"isVLEncoded":true,"nth":16,"type":"Blob"}],["Condition",{"isSerialized":true,"isSigningField":true,"isVLEncoded":true,"nth":17,"type":"Blob"}],["MasterSignature",{"isSerialized":true,"isSigningField":false,"isVLEncoded":true,"nth":18,"type":"Blob"}],["UNLModifyValidator",{"isSerialized":true,"isSigningField":true,"isVLEncoded":true,"nth":19,"type":"Blob"}],["ValidatorToDisable",{"isSerialized":true,"isSigningField":true,"isVLEncoded":true,"nth":20,"type":"Blob"}],["ValidatorToReEnable",{"isSerialized":true,"isSigningField":true,"isVLEncoded":true,"nth":21,"type":"Blob"}],["HookStateData",{"isSerialized":true,"isSigningField":true,"isVLEncoded":true,"nth":22,"type":"Blob"}],["HookReturnString",{"isSerialized":true,"isSigningField":true,"isVLEncoded":true,"nth":23,"type":"Blob"}],["HookParameterName",{"isSerialized":true,"isSigningField":true,"isVLEncoded":true,"nth":24,"type":"Blob"}],["HookParameterValue",{"isSerialized":true,"isSigningField":true,"isVLEncoded":true,"nth":25,"type":"Blob"}],["Blob",{"isSerialized":true,"isSigningField":true,"isVLEncoded":true,"nth":26,"type":"Blob"}],["Account",{"isSerialized":true,"isSigningField":true,"isVLEncoded":true,"nth":1,"type":"AccountID"}],["Owner",{"isSerialized":true,"isSigningField":true,"isVLEncoded":true,"nth":2,"type":"AccountID"}],["Destination",{"isSerialized":true,"isSigningField":true,"isVLEncoded":true,"nth":3,"type":"AccountID"}],["Issuer",{"isSerialized":true,"isSigningField":true,"isVLEncoded":true,"nth":4,"type":"AccountID"}],["Authorize",{"isSerialized":true,"isSigningField":true,"isVLEncoded":true,"nth":5,"type":"AccountID"}],["Unauthorize",{"isSerialized":true,"isSigningField":true,"isVLEncoded":true,"nth":6,"type":"AccountID"}],["RegularKey",{"isSerialized":true,"isSigningField":true,"isVLEncoded":true,"nth":8,"type":"AccountID"}],["NFTokenMinter",{"isSerialized":true,"isSigningField":true,"isVLEncoded":true,"nth":9,"type":"AccountID"}],["EmitCallback",{"isSerialized":true,"isSigningField":true,"isVLEncoded":true,"nth":10,"type":"AccountID"}],["HookAccount",{"isSerialized":true,"isSigningField":true,"isVLEncoded":true,"nth":16,"type":"AccountID"}],["TransactionMetaData",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":2,"type":"STObject"}],["CreatedNode",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":3,"type":"STObject"}],["DeletedNode",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":4,"type":"STObject"}],["ModifiedNode",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":5,"type":"STObject"}],["PreviousFields",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":6,"type":"STObject"}],["FinalFields",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":7,"type":"STObject"}],["NewFields",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":8,"type":"STObject"}],["TemplateEntry",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":9,"type":"STObject"}],["Memo",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":10,"type":"STObject"}],["SignerEntry",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":11,"type":"STObject"}],["NFToken",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":12,"type":"STObject"}],["EmitDetails",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":13,"type":"STObject"}],["Hook",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":14,"type":"STObject"}],["Signer",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":16,"type":"STObject"}],["Majority",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":18,"type":"STObject"}],["DisabledValidator",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":19,"type":"STObject"}],["EmittedTxn",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":20,"type":"STObject"}],["HookExecution",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":21,"type":"STObject"}],["HookDefinition",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":22,"type":"STObject"}],["HookParameter",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":23,"type":"STObject"}],["HookGrant",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":24,"type":"STObject"}],["ImportVLKey",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":94,"type":"STObject"}],["ActiveValidator",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":95,"type":"STObject"}],["GenesisMint",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":96,"type":"STObject"}],["Signers",{"isSerialized":true,"isSigningField":false,"isVLEncoded":false,"nth":3,"type":"STArray"}],["SignerEntries",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":4,"type":"STArray"}],["Template",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":5,"type":"STArray"}],["Necessary",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":6,"type":"STArray"}],["Sufficient",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":7,"type":"STArray"}],["AffectedNodes",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":8,"type":"STArray"}],["Memos",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":9,"type":"STArray"}],["NFTokens",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":10,"type":"STArray"}],["Hooks",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":11,"type":"STArray"}],["Majorities",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":16,"type":"STArray"}],["DisabledValidators",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":17,"type":"STArray"}],["HookExecutions",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":18,"type":"STArray"}],["HookParameters",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":19,"type":"STArray"}],["HookGrants",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":20,"type":"STArray"}],["ImportVLKeys",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":94,"type":"STArray"}],["ActiveValidators",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":95,"type":"STArray"}],["GenesisMints",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":96,"type":"STArray"}],["CloseResolution",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":1,"type":"UInt8"}],["Method",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":2,"type":"UInt8"}],["TransactionResult",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":3,"type":"UInt8"}],["TickSize",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":16,"type":"UInt8"}],["UNLModifyDisabling",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":17,"type":"UInt8"}],["HookResult",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":18,"type":"UInt8"}],["TakerPaysCurrency",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":1,"type":"Hash160"}],["TakerPaysIssuer",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":2,"type":"Hash160"}],["TakerGetsCurrency",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":3,"type":"Hash160"}],["TakerGetsIssuer",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":4,"type":"Hash160"}],["Paths",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":1,"type":"PathSet"}],["Indexes",{"isSerialized":true,"isSigningField":true,"isVLEncoded":true,"nth":1,"type":"Vector256"}],["Hashes",{"isSerialized":true,"isSigningField":true,"isVLEncoded":true,"nth":2,"type":"Vector256"}],["Amendments",{"isSerialized":true,"isSigningField":true,"isVLEncoded":true,"nth":3,"type":"Vector256"}],["NFTokenOffers",{"isSerialized":true,"isSigningField":true,"isVLEncoded":true,"nth":4,"type":"Vector256"}],["HookNamespaces",{"isSerialized":true,"isSigningField":true,"isVLEncoded":true,"nth":5,"type":"Vector256"}],["Transaction",{"isSerialized":false,"isSigningField":false,"isVLEncoded":false,"nth":1,"type":"Transaction"}],["LedgerEntry",{"isSerialized":false,"isSigningField":false,"isVLEncoded":false,"nth":1,"type":"LedgerEntry"}],["Validation",{"isSerialized":false,"isSigningField":false,"isVLEncoded":false,"nth":1,"type":"Validation"}],["Metadata",{"isSerialized":false,"isSigningField":false,"isVLEncoded":false,"nth":1,"type":"Metadata"}]],"LEDGER_ENTRY_TYPES":{"AccountRoot":97,"Amendments":102,"Any":0,"Check":67,"Child":7378,"Contract":99,"DepositPreauth":112,"DirectoryNode":100,"EmittedTxn":69,"Escrow":117,"FeeSettings":115,"GeneratorMap":103,"Hook":72,"HookDefinition":68,"HookState":118,"ImportVlseq":73,"Invalid":-1,"LedgerHashes":104,"NFTokenOffer":55,"NFTokenPage":80,"NegativeUNL":78,"Nickname":110,"Offer":111,"PayChannel":120,"RippleState":114,"SignerList":83,"Ticket":84,"UNLReport":82,"URIToken":85},"TRANSACTION_RESULTS":{"tecAMM_BALANCE":163,"tecAMM_FAILED_BID":167,"tecAMM_FAILED_DEPOSIT":164,"tecAMM_FAILED_VOTE":168,"tecAMM_FAILED_WITHDRAW":165,"tecAMM_INVALID_TOKENS":166,"tecAMM_UNFUNDED":162,"tecBAD_XCHAIN_TRANSFER_ISSUE":171,"tecCANT_ACCEPT_OWN_NFTOKEN_OFFER":158,"tecCLAIM":100,"tecCRYPTOCONDITION_ERROR":146,"tecDIR_FULL":121,"tecDST_TAG_NEEDED":143,"tecDUPLICATE":149,"tecEXPIRED":148,"tecFAILED_PROCESSING":105,"tecFROZEN":137,"tecHAS_OBLIGATIONS":151,"tecHOOK_REJECTED":153,"tecINSUFFICIENT_FUNDS":159,"tecINSUFFICIENT_PAYMENT":161,"tecINSUFFICIENT_RESERVE":141,"tecINSUFF_FEE":136,"tecINSUF_RESERVE_LINE":122,"tecINSUF_RESERVE_OFFER":123,"tecINTERNAL":144,"tecINVARIANT_FAILED":147,"tecKILLED":150,"tecLAST_POSSIBLE_ENTRY":255,"tecMAX_SEQUENCE_REACHED":154,"tecNEED_MASTER_KEY":142,"tecNFTOKEN_BUY_SELL_MISMATCH":156,"tecNFTOKEN_OFFER_TYPE_MISMATCH":157,"tecNO_ALTERNATIVE_KEY":130,"tecNO_AUTH":134,"tecNO_DST":124,"tecNO_DST_INSUF_XRP":125,"tecNO_ENTRY":140,"tecNO_ISSUER":133,"tecNO_LINE":135,"tecNO_LINE_INSUF_RESERVE":126,"tecNO_LINE_REDUNDANT":127,"tecNO_PERMISSION":139,"tecNO_REGULAR_KEY":131,"tecNO_SUITABLE_NFTOKEN_PAGE":155,"tecNO_TARGET":138,"tecOBJECT_NOT_FOUND":160,"tecOVERSIZE":145,"tecOWNERS":132,"tecPATH_DRY":128,"tecPATH_PARTIAL":101,"tecPRECISION_LOSS":170,"tecREQUIRES_FLAG":169,"tecTOO_SOON":152,"tecUNFUNDED":129,"tecUNFUNDED_ADD":102,"tecUNFUNDED_OFFER":103,"tecUNFUNDED_PAYMENT":104,"tecXCHAIN_ACCOUNT_CREATE_PAST":182,"tecXCHAIN_ACCOUNT_CREATE_TOO_MANY":183,"tecXCHAIN_BAD_CLAIM_ID":173,"tecXCHAIN_BAD_PUBLIC_KEY_ACCOUNT_PAIR":186,"tecXCHAIN_CLAIM_NO_QUORUM":174,"tecXCHAIN_CREATE_ACCOUNT_NONXRP_ISSUE":176,"tecXCHAIN_INSUFF_CREATE_AMOUNT":181,"tecXCHAIN_NO_CLAIM_ID":172,"tecXCHAIN_NO_SIGNERS_LIST":179,"tecXCHAIN_PAYMENT_FAILED":184,"tecXCHAIN_PROOF_UNKNOWN_KEY":175,"tecXCHAIN_REWARD_MISMATCH":178,"tecXCHAIN_SELF_COMMIT":185,"tecXCHAIN_SENDING_ACCOUNT_MISMATCH":180,"tecXCHAIN_WRONG_CHAIN":177,"tefALREADY":-198,"tefBAD_ADD_AUTH":-197,"tefBAD_AUTH":-196,"tefBAD_AUTH_MASTER":-183,"tefBAD_LEDGER":-195,"tefBAD_QUORUM":-185,"tefBAD_SIGNATURE":-186,"tefCREATED":-194,"tefEXCEPTION":-193,"tefFAILURE":-199,"tefINTERNAL":-192,"tefINVARIANT_FAILED":-182,"tefMASTER_DISABLED":-188,"tefMAX_LEDGER":-187,"tefNFTOKEN_IS_NOT_TRANSFERABLE":-179,"tefNOT_MULTI_SIGNING":-184,"tefNO_AUTH_REQUIRED":-191,"tefNO_TICKET":-180,"tefPAST_IMPORT_SEQ":-178,"tefPAST_IMPORT_VL_SEQ":-177,"tefPAST_SEQ":-190,"tefTOO_BIG":-181,"tefWRONG_PRIOR":-189,"telBAD_DOMAIN":-398,"telBAD_PATH_COUNT":-397,"telBAD_PUBLIC_KEY":-396,"telCAN_NOT_QUEUE":-392,"telCAN_NOT_QUEUE_BALANCE":-391,"telCAN_NOT_QUEUE_BLOCKED":-389,"telCAN_NOT_QUEUE_BLOCKS":-390,"telCAN_NOT_QUEUE_FEE":-388,"telCAN_NOT_QUEUE_FULL":-387,"telCAN_NOT_QUEUE_IMPORT":-381,"telFAILED_PROCESSING":-395,"telIMPORT_VL_KEY_NOT_RECOGNISED":-382,"telINSUF_FEE_P":-394,"telLOCAL_ERROR":-399,"telNETWORK_ID_MAKES_TX_NON_CANONICAL":-384,"telNON_LOCAL_EMITTED_TXN":-383,"telNO_DST_PARTIAL":-393,"telREQUIRES_NETWORK_ID":-385,"telWRONG_NETWORK":-386,"temAMM_BAD_TOKENS":-261,"temBAD_AMOUNT":-298,"temBAD_CURRENCY":-297,"temBAD_EXPIRATION":-296,"temBAD_FEE":-295,"temBAD_ISSUER":-294,"temBAD_LIMIT":-293,"temBAD_NFTOKEN_TRANSFER_FEE":-262,"temBAD_OFFER":-292,"temBAD_PATH":-291,"temBAD_PATH_LOOP":-290,"temBAD_QUORUM":-271,"temBAD_REGKEY":-289,"temBAD_SEND_XRP_LIMIT":-288,"temBAD_SEND_XRP_MAX":-287,"temBAD_SEND_XRP_NO_DIRECT":-286,"temBAD_SEND_XRP_PARTIAL":-285,"temBAD_SEND_XRP_PATHS":-284,"temBAD_SEQUENCE":-283,"temBAD_SIGNATURE":-282,"temBAD_SIGNER":-272,"temBAD_SRC_ACCOUNT":-281,"temBAD_TICK_SIZE":-269,"temBAD_TRANSFER_RATE":-280,"temBAD_WEIGHT":-270,"temCANNOT_PREAUTH_SELF":-267,"temDISABLED":-273,"temDST_IS_SRC":-279,"temDST_NEEDED":-278,"temHOOK_DATA_TOO_LARGE":-253,"temHOOK_REJECTED":-252,"temINVALID":-277,"temINVALID_ACCOUNT_ID":-268,"temINVALID_COUNT":-266,"temINVALID_FLAG":-276,"temMALFORMED":-299,"temREDUNDANT":-275,"temRIPPLE_EMPTY":-274,"temSEQ_AND_TICKET":-263,"temUNCERTAIN":-265,"temUNKNOWN":-264,"temXCHAIN_BAD_PROOF":-259,"temXCHAIN_BRIDGE_BAD_ISSUES":-258,"temXCHAIN_BRIDGE_BAD_MIN_ACCOUNT_CREATE_AMOUNT":-256,"temXCHAIN_BRIDGE_BAD_REWARD_AMOUNT":-255,"temXCHAIN_BRIDGE_NONDOOR_OWNER":-257,"temXCHAIN_EQUAL_DOOR_ACCOUNTS":-260,"temXCHAIN_TOO_MANY_ATTESTATIONS":-254,"terFUNDS_SPENT":-98,"terINSUF_FEE_B":-97,"terLAST":-91,"terNO_ACCOUNT":-96,"terNO_AMM":-87,"terNO_AUTH":-95,"terNO_HOOK":-86,"terNO_LINE":-94,"terNO_RIPPLE":-90,"terOWNERS":-93,"terPRE_SEQ":-92,"terPRE_TICKET":-88,"terQUEUED":-89,"terRETRY":-99,"tesSUCCESS":0},"TRANSACTION_TYPES":{"AccountDelete":21,"AccountSet":3,"Amendment":100,"CheckCancel":18,"CheckCash":17,"CheckCreate":16,"ClaimReward":98,"Contract":9,"DepositPreauth":19,"EmitFailure":103,"EscrowCancel":4,"EscrowCreate":1,"EscrowFinish":2,"Fee":101,"GenesisMint":96,"Import":97,"Invalid":-1,"Invoke":99,"NFTokenAcceptOffer":29,"NFTokenBurn":26,"NFTokenCancelOffer":28,"NFTokenCreateOffer":27,"NFTokenMint":25,"NicknameSet":6,"OfferCancel":8,"OfferCreate":7,"Payment":0,"PaymentChannelClaim":15,"PaymentChannelCreate":13,"PaymentChannelFund":14,"SetHook":22,"SetRegularKey":5,"SignerListSet":12,"SpinalTap":11,"TicketCreate":10,"TrustSet":20,"UNLModify":102,"UNLReport":104,"URITokenBurn":46,"URITokenBuy":47,"URITokenCancelSellOffer":49,"URITokenCreateSellOffer":48,"URITokenMint":45},"TYPES":{"AccountID":8,"Amount":6,"Blob":7,"Done":-1,"Hash128":4,"Hash160":17,"Hash256":5,"LedgerEntry":10002,"Metadata":10004,"NotPresent":0,"PathSet":18,"STArray":15,"STObject":14,"Transaction":10001,"UInt16":1,"UInt192":21,"UInt32":2,"UInt384":22,"UInt512":23,"UInt64":3,"UInt8":16,"UInt96":20,"Unknown":-2,"Validation":10003,"Vector256":19},"hash":"536D5FE29A8BB5EC112DE2770AA2D1E2249EF7FDAAFA325E89A1EE9B322F3978"}');
17231
17677
 
17232
17678
  /***/ })
17233
17679