@bithomp/xrpl-api 3.3.10 → 3.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (135) hide show
  1. package/lib/ledger/account_tx.js +11 -0
  2. package/lib/models/transaction.d.ts +1 -0
  3. package/lib/models/transaction.js +15 -0
  4. package/lib/models/transactions/SetRemarks.d.ts +3 -0
  5. package/lib/models/transactions/SetRemarks.js +2 -0
  6. package/lib/parse/ledger/delegate.d.ts +2 -0
  7. package/lib/parse/ledger/delegate.js +11 -0
  8. package/lib/parse/ledger/index.d.ts +2 -1
  9. package/lib/parse/ledger/index.js +4 -1
  10. package/lib/parse/ledger/permissions.d.ts +2 -0
  11. package/lib/parse/ledger/permissions.js +9 -0
  12. package/lib/parse/ledger/remark-flags.d.ts +5 -0
  13. package/lib/parse/ledger/remark-flags.js +8 -0
  14. package/lib/parse/ledger/remarks.d.ts +3 -0
  15. package/lib/parse/ledger/remarks.js +47 -0
  16. package/lib/parse/outcome/delegate_changes.d.ts +12 -0
  17. package/lib/parse/outcome/delegate_changes.js +59 -0
  18. package/lib/parse/outcome/index.d.ts +2 -0
  19. package/lib/parse/outcome/index.js +5 -1
  20. package/lib/parse/outcome/oracle_changes.d.ts +3 -3
  21. package/lib/parse/outcome/remarks_changes.d.ts +14 -0
  22. package/lib/parse/outcome/remarks_changes.js +68 -0
  23. package/lib/parse/outcome.js +22 -0
  24. package/lib/parse/specification/account-delete.d.ts +2 -1
  25. package/lib/parse/specification/account-delete.js +2 -0
  26. package/lib/parse/specification/amm-bid.d.ts +2 -1
  27. package/lib/parse/specification/amm-bid.js +2 -0
  28. package/lib/parse/specification/amm-clawback.d.ts +2 -1
  29. package/lib/parse/specification/amm-clawback.js +2 -0
  30. package/lib/parse/specification/amm-create.d.ts +2 -1
  31. package/lib/parse/specification/amm-create.js +2 -0
  32. package/lib/parse/specification/amm-delete.d.ts +2 -1
  33. package/lib/parse/specification/amm-delete.js +2 -0
  34. package/lib/parse/specification/amm-deposit.d.ts +2 -1
  35. package/lib/parse/specification/amm-deposit.js +2 -0
  36. package/lib/parse/specification/amm-vote.d.ts +2 -1
  37. package/lib/parse/specification/amm-vote.js +2 -0
  38. package/lib/parse/specification/amm-withdraw.d.ts +2 -1
  39. package/lib/parse/specification/amm-withdraw.js +2 -0
  40. package/lib/parse/specification/check-cancel.d.ts +2 -1
  41. package/lib/parse/specification/check-cancel.js +2 -0
  42. package/lib/parse/specification/check-cash.d.ts +2 -1
  43. package/lib/parse/specification/check-cash.js +2 -0
  44. package/lib/parse/specification/check-create.d.ts +2 -1
  45. package/lib/parse/specification/check-create.js +2 -0
  46. package/lib/parse/specification/clawback.d.ts +2 -1
  47. package/lib/parse/specification/clawback.js +2 -0
  48. package/lib/parse/specification/delegate-set.d.ts +4 -0
  49. package/lib/parse/specification/delegate-set.js +58 -0
  50. package/lib/parse/specification/deposit-preauth.d.ts +2 -1
  51. package/lib/parse/specification/deposit-preauth.js +2 -0
  52. package/lib/parse/specification/did-delete.d.ts +2 -1
  53. package/lib/parse/specification/did-delete.js +2 -0
  54. package/lib/parse/specification/did-set.d.ts +2 -1
  55. package/lib/parse/specification/did-set.js +2 -0
  56. package/lib/parse/specification/escrow-cancel.d.ts +2 -1
  57. package/lib/parse/specification/escrow-cancel.js +2 -0
  58. package/lib/parse/specification/escrow-create.d.ts +2 -1
  59. package/lib/parse/specification/escrow-create.js +2 -0
  60. package/lib/parse/specification/escrow-finish.d.ts +2 -1
  61. package/lib/parse/specification/escrow-finish.js +2 -0
  62. package/lib/parse/specification/mptoken-authorize.d.ts +2 -1
  63. package/lib/parse/specification/mptoken-authorize.js +2 -0
  64. package/lib/parse/specification/mptoken-issuance-create.d.ts +2 -1
  65. package/lib/parse/specification/mptoken-issuance-create.js +2 -0
  66. package/lib/parse/specification/mptoken-issuance-destroy.d.ts +2 -1
  67. package/lib/parse/specification/mptoken-issuance-destroy.js +2 -0
  68. package/lib/parse/specification/mptoken-issuance-set.d.ts +2 -1
  69. package/lib/parse/specification/mptoken-issuance-set.js +2 -0
  70. package/lib/parse/specification/nftoken-accept-offer.d.ts +2 -1
  71. package/lib/parse/specification/nftoken-accept-offer.js +2 -0
  72. package/lib/parse/specification/nftoken-burn.d.ts +2 -1
  73. package/lib/parse/specification/nftoken-burn.js +2 -0
  74. package/lib/parse/specification/nftoken-cancel-offer.d.ts +2 -1
  75. package/lib/parse/specification/nftoken-cancel-offer.js +2 -0
  76. package/lib/parse/specification/nftoken-create-offer.d.ts +2 -1
  77. package/lib/parse/specification/nftoken-create-offer.js +2 -0
  78. package/lib/parse/specification/nftoken-mint.d.ts +2 -1
  79. package/lib/parse/specification/nftoken-mint.js +2 -0
  80. package/lib/parse/specification/nftoken-modify.d.ts +2 -1
  81. package/lib/parse/specification/nftoken-modify.js +2 -0
  82. package/lib/parse/specification/offer-cancel.d.ts +2 -1
  83. package/lib/parse/specification/offer-cancel.js +2 -0
  84. package/lib/parse/specification/offer-create.d.ts +3 -2
  85. package/lib/parse/specification/offer-create.js +2 -0
  86. package/lib/parse/specification/oracle-delete.d.ts +2 -1
  87. package/lib/parse/specification/oracle-delete.js +2 -0
  88. package/lib/parse/specification/oracle-set.d.ts +2 -1
  89. package/lib/parse/specification/oracle-set.js +2 -0
  90. package/lib/parse/specification/payment-channel-claim.d.ts +2 -1
  91. package/lib/parse/specification/payment-channel-claim.js +2 -2
  92. package/lib/parse/specification/payment-channel-create.d.ts +2 -1
  93. package/lib/parse/specification/payment-channel-create.js +2 -0
  94. package/lib/parse/specification/payment-channel-fund.d.ts +2 -1
  95. package/lib/parse/specification/payment-channel-fund.js +2 -0
  96. package/lib/parse/specification/payment.d.ts +2 -1
  97. package/lib/parse/specification/payment.js +2 -0
  98. package/lib/parse/specification/set-remarks.d.ts +3 -0
  99. package/lib/parse/specification/set-remarks.js +56 -0
  100. package/lib/parse/specification/settings.js +2 -0
  101. package/lib/parse/specification/ticket-create.d.ts +2 -1
  102. package/lib/parse/specification/ticket-create.js +2 -0
  103. package/lib/parse/specification/trust-set.d.ts +4 -0
  104. package/lib/parse/specification/trust-set.js +74 -0
  105. package/lib/parse/specification/trustline.js +2 -0
  106. package/lib/parse/specification/unrecognized.d.ts +2 -1
  107. package/lib/parse/specification/unrecognized.js +2 -0
  108. package/lib/parse/specification/uritoken-burn.d.ts +2 -2
  109. package/lib/parse/specification/uritoken-burn.js +2 -2
  110. package/lib/parse/specification/uritoken-buy.d.ts +2 -2
  111. package/lib/parse/specification/uritoken-buy.js +2 -2
  112. package/lib/parse/specification/uritoken-cancel-sell-offer.d.ts +2 -2
  113. package/lib/parse/specification/uritoken-cancel-sell-offer.js +2 -2
  114. package/lib/parse/specification/uritoken-create-sell-offer.d.ts +2 -2
  115. package/lib/parse/specification/uritoken-create-sell-offer.js +2 -2
  116. package/lib/parse/specification/uritoken-mint.d.ts +2 -2
  117. package/lib/parse/specification/uritoken-mint.js +2 -2
  118. package/lib/parse/transaction.d.ts +3 -1
  119. package/lib/parse/transaction.js +8 -2
  120. package/lib/types/checks.d.ts +4 -4
  121. package/lib/types/delegate.d.ts +5 -0
  122. package/lib/types/delegate.js +2 -0
  123. package/lib/types/deposits.d.ts +2 -2
  124. package/lib/types/did.d.ts +3 -3
  125. package/lib/types/escrows.d.ts +3 -3
  126. package/lib/types/index.d.ts +2 -1
  127. package/lib/types/index.js +2 -1
  128. package/lib/types/mptokens.d.ts +1 -1
  129. package/lib/types/nftokens.d.ts +3 -3
  130. package/lib/types/oracle.d.ts +4 -12
  131. package/lib/types/payment_channels.d.ts +2 -4
  132. package/lib/types/remarks.d.ts +24 -0
  133. package/lib/types/remarks.js +6 -0
  134. package/lib/types/specification.d.ts +1 -0
  135. package/package.json +6 -6
@@ -40,7 +40,7 @@ export type FormattedMPTokenIssuanceCreateSpecification = {
40
40
  sequence?: number;
41
41
  scale?: number;
42
42
  flags?: MPTokenIssuanceCreateFlagsKeysInterface;
43
- metadata?: string;
43
+ metadata?: string | null;
44
44
  maximumAmount?: string;
45
45
  transferFee?: number;
46
46
  } & FormattedBaseSpecification;
@@ -30,7 +30,7 @@ export type FormattedNFTokenMintSpecification = {
30
30
  nftokenTaxon: number;
31
31
  issuer?: string;
32
32
  transferFee?: number;
33
- uri?: string;
33
+ uri?: string | null;
34
34
  flags?: NFTokenFlagsKeysInterface;
35
35
  amount?: Amount;
36
36
  destination?: FormattedDestinationAddress;
@@ -39,7 +39,7 @@ export type FormattedNFTokenMintSpecification = {
39
39
  export type FormattedNFTokenModifySpecification = {
40
40
  nftokenID: string;
41
41
  owner?: string;
42
- uri?: string;
42
+ uri?: string | null;
43
43
  } & FormattedBaseSpecification;
44
44
  export type FormattedNFTokenCancelOfferSpecification = {
45
45
  nftokenOffers: string[];
@@ -56,5 +56,5 @@ export type FormattedNFTokenCreateOfferSpecification = {
56
56
  export type FormattedNFTokenAcceptOfferSpecification = {
57
57
  nftokenSellOffer?: string;
58
58
  nftokenBuyOffer?: string;
59
- nftokenBrokerFee?: string;
59
+ nftokenBrokerFee?: Amount;
60
60
  } & FormattedBaseSpecification;
@@ -1,12 +1,4 @@
1
1
  import { FormattedBaseSpecification } from "./specification";
2
- export interface OraclePriceDataSeriesInterface {
3
- PriceData: {
4
- BaseAsset: string;
5
- QuoteAsset: string;
6
- AssetPrice?: string;
7
- Scale?: number;
8
- };
9
- }
10
2
  export interface FormattedOraclePriceDataSeriesInterface {
11
3
  baseAsset: string;
12
4
  quoteAsset: string;
@@ -16,11 +8,11 @@ export interface FormattedOraclePriceDataSeriesInterface {
16
8
  }
17
9
  export type FormattedOracleSetSpecification = {
18
10
  oracleDocumentID: number;
19
- provider: string;
20
- uri?: string;
21
- assetClass: string;
11
+ provider?: string;
12
+ uri?: string | null;
13
+ assetClass?: string;
22
14
  lastUpdateTime: number;
23
- priceDataSeries: FormattedOraclePriceDataSeriesInterface[];
15
+ priceDataSeries?: FormattedOraclePriceDataSeriesInterface[];
24
16
  } & FormattedBaseSpecification;
25
17
  export type FormattedOracleDeleteSpecification = {
26
18
  oracleDocumentID: number;
@@ -5,8 +5,6 @@ export type FormattedPaymentChannelClaimSpecification = {
5
5
  channel: string;
6
6
  balance?: FormattedAmount;
7
7
  amount?: FormattedAmount;
8
- signature: string;
9
- publicKey: string;
10
8
  renew?: boolean;
11
9
  close?: boolean;
12
10
  } & FormattedBaseSpecification;
@@ -16,10 +14,10 @@ export type FormattedPaymentChannelCreateSpecification = {
16
14
  amount?: FormattedAmount;
17
15
  settleDelay: number;
18
16
  publicKey?: string;
19
- cancelAfter?: string;
17
+ cancelAfter?: string | number;
20
18
  } & FormattedBaseSpecification;
21
19
  export type FormattedPaymentChannelFundSpecification = {
22
20
  channel: string;
23
21
  amount?: FormattedAmount;
24
- expiration?: string;
22
+ expiration?: string | number;
25
23
  } & FormattedBaseSpecification;
@@ -0,0 +1,24 @@
1
+ import { SetRemarksFlags } from "../models/transactions/SetRemarks";
2
+ import { FormattedBaseSpecification } from "./specification";
3
+ export declare const RemarksFlagsKeys: {
4
+ immutable: SetRemarksFlags;
5
+ };
6
+ export interface RemarksFlagsKeysInterface {
7
+ immutable?: boolean;
8
+ }
9
+ export type Remark = {
10
+ Remark: {
11
+ RemarkName?: string;
12
+ RemarkValue?: string;
13
+ Flags?: number;
14
+ };
15
+ };
16
+ export type FormattedRemark = {
17
+ name?: string;
18
+ value?: string;
19
+ flags?: RemarksFlagsKeysInterface;
20
+ };
21
+ export type FormattedSetRemarksSpecification = {
22
+ ObjectID?: string;
23
+ Remarks?: FormattedRemark[];
24
+ } & FormattedBaseSpecification;
@@ -0,0 +1,6 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.RemarksFlagsKeys = void 0;
4
+ exports.RemarksFlagsKeys = {
5
+ immutable: 1,
6
+ };
@@ -6,6 +6,7 @@ export type FormattedBaseSpecification = {
6
6
  source?: FormattedSourceAddress;
7
7
  signers?: FormattedTransactionSigner[];
8
8
  signer?: FormattedSignerRegularKey;
9
+ delegate?: FormattedSignerRegularKey;
9
10
  emittedDetails?: FormattedEmitDetails;
10
11
  memos?: FormattedMemo[];
11
12
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bithomp/xrpl-api",
3
- "version": "3.3.10",
3
+ "version": "3.4.0",
4
4
  "description": "A Bithomp JavaScript/TypeScript library for interacting with the XRP Ledger",
5
5
  "main": "lib/index.js",
6
6
  "types": "lib/index.d.ts",
@@ -43,7 +43,7 @@
43
43
  "format": "prettier --write \"src/**/*.ts\" \"src/**/*.js\"",
44
44
  "lint": "eslint",
45
45
  "prepare": "npm run build",
46
- "-prepublishOnly": "npm test && npm run lint",
46
+ "prepublishOnly": "npm test && npm run lint",
47
47
  "preversion": "npm run lint",
48
48
  "version": "npm run format && git add -A src",
49
49
  "postversion": "git push && git push --tags"
@@ -74,13 +74,13 @@
74
74
  "@typescript-eslint/parser": "^8.34.0",
75
75
  "chai": "^4.5.0",
76
76
  "chai-as-promised": "^7.1.2",
77
- "eslint": "^9.28.0",
77
+ "eslint": "^9.31.0",
78
78
  "eslint-config-prettier": "^10.1.5",
79
79
  "eslint-plugin-chai-friendly": "^1.1.0",
80
- "eslint-plugin-import": "^2.31.0",
81
- "eslint-plugin-n": "^17.20.0",
80
+ "eslint-plugin-import": "^2.32.0",
81
+ "eslint-plugin-n": "^17.21.0",
82
82
  "eslint-plugin-promise": "^7.2.1",
83
- "mocha": "^11.6.0",
83
+ "mocha": "^11.7.1",
84
84
  "nconf": "^0.13.0",
85
85
  "ts-jest": "^29.4.0",
86
86
  "ts-node": "^10.9.2",