@bithomp/xrpl-api 2.6.1 → 2.6.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -24,5 +24,5 @@ import parseNFTOfferFlags from "../parse/ledger/nftoken-offer-flags";
24
24
  import parseNFTokenAcceptOffer from "../parse/specification/nftoken-accept-offer";
25
25
  import parseNFTokenCancelOffer from "../parse/specification/nftoken-cancel-offer";
26
26
  import parseNFTokenCreateOffer from "../parse/specification/nftoken-create-offer";
27
- import parseURITokenFlags from "../parse/ledger/uri-token-flags";
27
+ import parseURITokenFlags from "../parse/ledger/uritoken-flags";
28
28
  export { parseNFTokenMint, parseNFTokenBurn, parseNFTokenFlags, parseNFTOfferFlags, parseNFTokenAcceptOffer, parseNFTokenCancelOffer, parseNFTokenCreateOffer, parseURITokenFlags, };
@@ -60,5 +60,5 @@ const nftoken_cancel_offer_1 = __importDefault(require("../parse/specification/n
60
60
  exports.parseNFTokenCancelOffer = nftoken_cancel_offer_1.default;
61
61
  const nftoken_create_offer_1 = __importDefault(require("../parse/specification/nftoken-create-offer"));
62
62
  exports.parseNFTokenCreateOffer = nftoken_create_offer_1.default;
63
- const uri_token_flags_1 = __importDefault(require("../parse/ledger/uri-token-flags"));
64
- exports.parseURITokenFlags = uri_token_flags_1.default;
63
+ const uritoken_flags_1 = __importDefault(require("../parse/ledger/uritoken-flags"));
64
+ exports.parseURITokenFlags = uritoken_flags_1.default;
@@ -0,0 +1,2 @@
1
+ import { FormattedImportBlobSpecification } from "../../v1/common/types/objects";
2
+ export declare function parseImportBlob(blob: string): FormattedImportBlobSpecification | string;
@@ -0,0 +1,41 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.parseImportBlob = void 0;
4
+ const ripple_binary_codec_1 = require("ripple-binary-codec");
5
+ ;
6
+ const ripple_hashes_1 = require("ripple-hashes");
7
+ const vl_1 = require("../../models/vl");
8
+ const transaction_1 = require("../../models/transaction");
9
+ function parseImportBlob(blob) {
10
+ try {
11
+ const decodedBlob = JSON.parse(Buffer.from(blob, "hex").toString("utf8"));
12
+ const data = decodedBlob.validation.data;
13
+ for (const key in data) {
14
+ if (data.hasOwnProperty(key)) {
15
+ data[key] = (0, ripple_binary_codec_1.decode)(data[key]);
16
+ }
17
+ }
18
+ const tx = (0, ripple_binary_codec_1.decode)(decodedBlob.transaction.blob);
19
+ const meta = (0, ripple_binary_codec_1.decode)(decodedBlob.transaction.meta);
20
+ const parsedTX = (0, transaction_1.getAccountTxDetails)({ tx: tx, meta: meta, validated: true }, false);
21
+ return {
22
+ ledger: decodedBlob.ledger,
23
+ validation: {
24
+ data,
25
+ unl: (0, vl_1.parseVL)(decodedBlob.validation.unl),
26
+ },
27
+ transaction: {
28
+ id: (0, ripple_hashes_1.computeBinaryTransactionHash)(decodedBlob.transaction.blob),
29
+ tx: (0, ripple_binary_codec_1.decode)(decodedBlob.transaction.blob),
30
+ meta: (0, ripple_binary_codec_1.decode)(decodedBlob.transaction.meta),
31
+ proof: decodedBlob.transaction.proof,
32
+ specification: parsedTX.specification,
33
+ outcome: parsedTX.outcome,
34
+ },
35
+ };
36
+ }
37
+ catch (e) {
38
+ return blob;
39
+ }
40
+ }
41
+ exports.parseImportBlob = parseImportBlob;
@@ -9,7 +9,7 @@ const nftoken_offer_changes_1 = require("./nftoken_offer_changes");
9
9
  const account_nfts_1 = require("../../models/account_nfts");
10
10
  const nftoken_flags_1 = __importDefault(require("../ledger/nftoken-flags"));
11
11
  const nftoken_offer_flags_1 = __importDefault(require("../ledger/nftoken-offer-flags"));
12
- const uri_token_flags_1 = __importDefault(require("../ledger/uri-token-flags"));
12
+ const uritoken_flags_1 = __importDefault(require("../ledger/uritoken-flags"));
13
13
  const common_1 = require("../../common");
14
14
  function parseAffectedObjects(tx) {
15
15
  return new AffectedObjects(tx).call();
@@ -118,7 +118,7 @@ class AffectedObjects {
118
118
  if (affectedNode.CreatedNode) {
119
119
  uritokens[uritokenID] = (0, common_1.removeUndefined)({
120
120
  uritokenID,
121
- flags: (0, uri_token_flags_1.default)(node.NewFields.Flags),
121
+ flags: (0, uritoken_flags_1.default)(node.NewFields.Flags),
122
122
  uri: node.NewFields.URI,
123
123
  digest: node.NewFields.Digest,
124
124
  issuer: node.NewFields.Issuer,
@@ -130,7 +130,7 @@ class AffectedObjects {
130
130
  if (affectedNode.ModifiedNode || affectedNode.DeletedNode) {
131
131
  uritokens[uritokenID] = (0, common_1.removeUndefined)({
132
132
  uritokenID,
133
- flags: (0, uri_token_flags_1.default)(node.FinalFields.Flags),
133
+ flags: (0, uritoken_flags_1.default)(node.FinalFields.Flags),
134
134
  uri: node.FinalFields.URI,
135
135
  digest: node.FinalFields.Digest,
136
136
  issuer: node.FinalFields.Issuer,
@@ -0,0 +1,13 @@
1
+ interface FormattedHooksExecutionInterface {
2
+ account: string;
3
+ emitCount: number;
4
+ executionIndex: number;
5
+ hash: string;
6
+ instructionCount: string;
7
+ result: number;
8
+ returnCode: string;
9
+ returnString: string;
10
+ stateChangeCount: number;
11
+ }
12
+ export declare function parseHooksExecutions(tx: any): FormattedHooksExecutionInterface[] | undefined;
13
+ export {};
@@ -0,0 +1,43 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.parseHooksExecutions = void 0;
4
+ function parseHooksExecutions(tx) {
5
+ return new HooksExecutions(tx).call();
6
+ }
7
+ exports.parseHooksExecutions = parseHooksExecutions;
8
+ class HooksExecutions {
9
+ constructor(tx) {
10
+ this.tx = tx;
11
+ this.executions = [];
12
+ }
13
+ call() {
14
+ const hookExecutions = this.tx.meta.HookExecutions;
15
+ if (!hookExecutions) {
16
+ return undefined;
17
+ }
18
+ for (const execution of hookExecutions) {
19
+ if (execution.HookExecution) {
20
+ this.executions.push(this.parseHookExecution(execution.HookExecution));
21
+ }
22
+ }
23
+ if (this.executions.length === 0) {
24
+ return undefined;
25
+ }
26
+ return this.executions;
27
+ }
28
+ parseHookExecution(hookExecution) {
29
+ let hookReturnString = Buffer.from(hookExecution.HookReturnString, "hex");
30
+ hookReturnString = hookReturnString.subarray(0, hookReturnString.indexOf(0x00));
31
+ return {
32
+ account: hookExecution.HookAccount,
33
+ emitCount: hookExecution.HookEmitCount,
34
+ executionIndex: hookExecution.HookExecutionIndex,
35
+ hash: hookExecution.HookHash,
36
+ instructionCount: hookExecution.HookInstructionCount,
37
+ result: hookExecution.HookResult,
38
+ returnCode: hookExecution.HookReturnCode,
39
+ returnString: hookReturnString.toString("utf-8"),
40
+ stateChangeCount: hookExecution.HookStateChangeCount,
41
+ };
42
+ }
43
+ }
@@ -7,3 +7,4 @@ export { parseBalanceChanges } from "./balance_changes";
7
7
  export { parseLockedBalanceChanges } from "./locked_balance_changes";
8
8
  export { parseChannelChanges } from "./channel_changes";
9
9
  export { parseOrderbookChanges } from "./orderbook_changes";
10
+ export { parseHooksExecutions } from "./hooks_executions";
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.parseOrderbookChanges = exports.parseChannelChanges = exports.parseLockedBalanceChanges = exports.parseBalanceChanges = exports.parseURITokenSellOfferChanges = exports.parseURITokenChanges = exports.parseNFTokenOfferChanges = exports.parseNFTokenChanges = exports.parseAffectedObjects = void 0;
3
+ exports.parseHooksExecutions = exports.parseOrderbookChanges = exports.parseChannelChanges = exports.parseLockedBalanceChanges = exports.parseBalanceChanges = exports.parseURITokenSellOfferChanges = exports.parseURITokenChanges = exports.parseNFTokenOfferChanges = exports.parseNFTokenChanges = exports.parseAffectedObjects = void 0;
4
4
  var affected_objects_1 = require("./affected_objects");
5
5
  Object.defineProperty(exports, "parseAffectedObjects", { enumerable: true, get: function () { return affected_objects_1.parseAffectedObjects; } });
6
6
  var nftoken_changes_1 = require("./nftoken_changes");
@@ -19,3 +19,5 @@ var channel_changes_1 = require("./channel_changes");
19
19
  Object.defineProperty(exports, "parseChannelChanges", { enumerable: true, get: function () { return channel_changes_1.parseChannelChanges; } });
20
20
  var orderbook_changes_1 = require("./orderbook_changes");
21
21
  Object.defineProperty(exports, "parseOrderbookChanges", { enumerable: true, get: function () { return orderbook_changes_1.parseOrderbookChanges; } });
22
+ var hooks_executions_1 = require("./hooks_executions");
23
+ Object.defineProperty(exports, "parseHooksExecutions", { enumerable: true, get: function () { return hooks_executions_1.parseHooksExecutions; } });
@@ -5,6 +5,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
6
  exports.parseOutcome = void 0;
7
7
  const index_1 = require("./outcome/index");
8
+ const import_1 = require("./ledger/import");
8
9
  const amount_1 = __importDefault(require("./ledger/amount"));
9
10
  const utils_1 = require("./utils");
10
11
  const common_1 = require("../common");
@@ -26,7 +27,7 @@ function removeEmptyCounterpartyInOrderbookChanges(orderbookChanges) {
26
27
  });
27
28
  }
28
29
  function parseDeliveredAmount(tx) {
29
- if (tx.TransactionType !== "Payment" || tx.meta.TransactionResult !== "tesSUCCESS") {
30
+ if (!["Import", "Payment"].includes(tx.TransactionType) || tx.meta.TransactionResult !== "tesSUCCESS") {
30
31
  return undefined;
31
32
  }
32
33
  if (tx.meta.delivered_amount && tx.meta.delivered_amount === "unavailable") {
@@ -41,8 +42,21 @@ function parseDeliveredAmount(tx) {
41
42
  if (tx.Amount && !(0, utils_1.isPartialPayment)(tx)) {
42
43
  return (0, amount_1.default)(tx.Amount);
43
44
  }
44
- if (tx.Amount && tx.ledger_index > 4594094) {
45
- return (0, amount_1.default)(tx.Amount);
45
+ if (tx.TransactionType === "Import") {
46
+ const balanceChanges = (0, index_1.parseBalanceChanges)(tx.meta);
47
+ const blob = (0, import_1.parseImportBlob)(tx.Blob);
48
+ if (typeof blob === "string") {
49
+ return undefined;
50
+ }
51
+ const account = blob.transaction.tx.Account;
52
+ const balanceChange = balanceChanges[account];
53
+ if (!balanceChange || balanceChange.length !== 1) {
54
+ return undefined;
55
+ }
56
+ return {
57
+ currency: balanceChange[0].currency,
58
+ value: balanceChange[0].value,
59
+ };
46
60
  }
47
61
  return undefined;
48
62
  }
@@ -60,6 +74,7 @@ function parseOutcome(tx) {
60
74
  const uritokenChanges = (0, index_1.parseURITokenChanges)(tx);
61
75
  const uritokenSellOfferChanges = (0, index_1.parseURITokenSellOfferChanges)(tx);
62
76
  const affectedObjects = (0, index_1.parseAffectedObjects)(tx);
77
+ const hooksExecutions = (0, index_1.parseHooksExecutions)(tx);
63
78
  removeEmptyCounterpartyInBalanceChanges(balanceChanges);
64
79
  removeEmptyCounterpartyInBalanceChanges(lockedBalanceChanges);
65
80
  removeEmptyCounterpartyInOrderbookChanges(orderbookChanges);
@@ -76,6 +91,7 @@ function parseOutcome(tx) {
76
91
  uritokenChanges: Object.keys(uritokenChanges).length > 0 ? uritokenChanges : undefined,
77
92
  uritokenSellOfferChanges: Object.keys(uritokenSellOfferChanges).length > 0 ? uritokenSellOfferChanges : undefined,
78
93
  affectedObjects: affectedObjects ? (0, common_1.removeUndefined)(affectedObjects) : undefined,
94
+ hooksExecutions,
79
95
  ledgerVersion: tx.ledger_index,
80
96
  indexInLedger: tx.meta.TransactionIndex,
81
97
  deliveredAmount: parseDeliveredAmount(tx),
@@ -0,0 +1,3 @@
1
+ import { FormattedImportSpecification } from "../../v1/common/types/objects/import";
2
+ declare function parseImport(tx: any): FormattedImportSpecification;
3
+ export default parseImport;
@@ -0,0 +1,45 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
15
+ }) : function(o, v) {
16
+ o["default"] = v;
17
+ });
18
+ var __importStar = (this && this.__importStar) || function (mod) {
19
+ if (mod && mod.__esModule) return mod;
20
+ var result = {};
21
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
22
+ __setModuleDefault(result, mod);
23
+ return result;
24
+ };
25
+ var __importDefault = (this && this.__importDefault) || function (mod) {
26
+ return (mod && mod.__esModule) ? mod : { "default": mod };
27
+ };
28
+ Object.defineProperty(exports, "__esModule", { value: true });
29
+ const assert = __importStar(require("assert"));
30
+ const common_1 = require("../../common");
31
+ const memos_1 = __importDefault(require("../ledger/memos"));
32
+ const import_1 = require("../ledger/import");
33
+ function parseImport(tx) {
34
+ assert.ok(tx.TransactionType === "Import");
35
+ const source = {
36
+ address: tx.Account,
37
+ tag: tx.SourceTag,
38
+ };
39
+ return {
40
+ blob: (0, import_1.parseImportBlob)(tx.Blob),
41
+ source: (0, common_1.removeUndefined)(source),
42
+ memos: (0, memos_1.default)(tx),
43
+ };
44
+ }
45
+ exports.default = parseImport;
@@ -0,0 +1,3 @@
1
+ import { FormattedInvokeSpecification } from "../../v1/common/types/objects/invoke";
2
+ declare function parseInvoke(tx: any): FormattedInvokeSpecification;
3
+ export default parseInvoke;
@@ -0,0 +1,47 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
15
+ }) : function(o, v) {
16
+ o["default"] = v;
17
+ });
18
+ var __importStar = (this && this.__importStar) || function (mod) {
19
+ if (mod && mod.__esModule) return mod;
20
+ var result = {};
21
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
22
+ __setModuleDefault(result, mod);
23
+ return result;
24
+ };
25
+ var __importDefault = (this && this.__importDefault) || function (mod) {
26
+ return (mod && mod.__esModule) ? mod : { "default": mod };
27
+ };
28
+ Object.defineProperty(exports, "__esModule", { value: true });
29
+ const assert = __importStar(require("assert"));
30
+ const common_1 = require("../../common");
31
+ const memos_1 = __importDefault(require("../ledger/memos"));
32
+ function parseInvoke(tx) {
33
+ assert.ok(tx.TransactionType === "Invoke");
34
+ const source = {
35
+ address: tx.Account,
36
+ tag: tx.SourceTag,
37
+ };
38
+ const destination = {
39
+ address: tx.Destination,
40
+ };
41
+ return {
42
+ source: (0, common_1.removeUndefined)(source),
43
+ destination: (0, common_1.removeUndefined)(destination),
44
+ memos: (0, memos_1.default)(tx),
45
+ };
46
+ }
47
+ exports.default = parseInvoke;
@@ -10,10 +10,13 @@ import { FormattedPaymentChannelClaimSpecification, FormattedPaymentChannelCreat
10
10
  import { FormattedTicketCreateSpecification } from "../v1/common/types/objects/tickets";
11
11
  import { FormattedTrustlineSpecification } from "../v1/common/types/objects/trustlines";
12
12
  import { FormattedNFTokenBurnSpecification, FormattedNFTokenMintSpecification, FormattedNFTokenCancelOfferSpecification, FormattedNFTokenCreateOfferSpecification, FormattedNFTokenAcceptOfferSpecification } from "../v1/common/types/objects/nftokens";
13
+ import { FormattedURITokenBurnSpecification, FormattedURITokenBuySpecification, FormattedURITokenCreateSellOfferSpecification, FormattedURITokenCancelSellOfferSpecification, FormattedURITokenMintSpecification } from "../v1/common/types/objects/uritokens";
14
+ import { FormattedImportSpecification } from "../v1/common/types/objects/import";
15
+ import { FormattedInvokeSpecification } from "../v1/common/types/objects/invoke";
13
16
  import { FormattedAmendmentSpecification } from "../v1/common/types/objects/amendments";
14
17
  import { FormattedFeeUpdateSpecification } from "../v1/common/types/objects/fees";
15
18
  declare function parseTransactionType(type: string): string;
16
- export type FormattedSpecification = FormattedSettingsSpecification | FormattedAccountDeleteSpecification | FormattedCheckCancelSpecification | FormattedCheckCashSpecification | FormattedCheckCreateSpecification | FormattedDepositPreauthSpecification | FormattedEscrowCancelSpecification | FormattedEscrowCreateSpecification | FormattedEscrowFinishSpecification | FormattedOfferCancelSpecification | FormattedOfferCreateSpecification | FormattedPaymentSpecification | FormattedPaymentChannelClaimSpecification | FormattedPaymentChannelCreateSpecification | FormattedPaymentChannelFundSpecification | FormattedTicketCreateSpecification | FormattedTrustlineSpecification | FormattedNFTokenBurnSpecification | FormattedNFTokenMintSpecification | FormattedNFTokenCancelOfferSpecification | FormattedNFTokenCreateOfferSpecification | FormattedNFTokenAcceptOfferSpecification | FormattedAmendmentSpecification | FormattedFeeUpdateSpecification;
19
+ export type FormattedSpecification = FormattedSettingsSpecification | FormattedAccountDeleteSpecification | FormattedCheckCancelSpecification | FormattedCheckCashSpecification | FormattedCheckCreateSpecification | FormattedDepositPreauthSpecification | FormattedEscrowCancelSpecification | FormattedEscrowCreateSpecification | FormattedEscrowFinishSpecification | FormattedOfferCancelSpecification | FormattedOfferCreateSpecification | FormattedPaymentSpecification | FormattedPaymentChannelClaimSpecification | FormattedPaymentChannelCreateSpecification | FormattedPaymentChannelFundSpecification | FormattedTicketCreateSpecification | FormattedTrustlineSpecification | FormattedNFTokenBurnSpecification | FormattedNFTokenMintSpecification | FormattedNFTokenCancelOfferSpecification | FormattedNFTokenCreateOfferSpecification | FormattedNFTokenAcceptOfferSpecification | FormattedURITokenBurnSpecification | FormattedURITokenBuySpecification | FormattedURITokenCreateSellOfferSpecification | FormattedURITokenCancelSellOfferSpecification | FormattedURITokenMintSpecification | FormattedImportSpecification | FormattedInvokeSpecification | FormattedAmendmentSpecification | FormattedFeeUpdateSpecification;
17
20
  export interface FormattedTransaction {
18
21
  type: string;
19
22
  address: string;
@@ -33,6 +33,8 @@ const uritoken_buy_1 = __importDefault(require("./specification/uritoken-buy"));
33
33
  const uritoken_cancel_sell_offer_1 = __importDefault(require("./specification/uritoken-cancel-sell-offer"));
34
34
  const uritoken_create_sell_offer_1 = __importDefault(require("./specification/uritoken-create-sell-offer"));
35
35
  const uritoken_mint_1 = __importDefault(require("./specification/uritoken-mint"));
36
+ const import_1 = __importDefault(require("./specification/import"));
37
+ const invoke_1 = __importDefault(require("./specification/invoke"));
36
38
  const amendment_1 = __importDefault(require("./specification/amendment"));
37
39
  const fee_update_1 = __importDefault(require("./specification/fee-update"));
38
40
  const transactionTypeToType = {
@@ -65,6 +67,8 @@ const transactionTypeToType = {
65
67
  URITokenCreateSellOffer: "uritokenCreateSellOffer",
66
68
  URITokenCancelSellOffer: "uritokenCancelSellOffer",
67
69
  URITokenBuy: "uritokenBuy",
70
+ Import: "import",
71
+ Invoke: "invoke",
68
72
  EnableAmendment: "amendment",
69
73
  SetFee: "feeUpdate",
70
74
  };
@@ -100,6 +104,8 @@ const parserTypeFunc = {
100
104
  uritokenCreateSellOffer: uritoken_create_sell_offer_1.default,
101
105
  uritokenCancelSellOffer: uritoken_cancel_sell_offer_1.default,
102
106
  uritokenMint: uritoken_mint_1.default,
107
+ import: import_1.default,
108
+ invoke: invoke_1.default,
103
109
  amendment: amendment_1.default,
104
110
  feeUpdate: fee_update_1.default,
105
111
  };
@@ -0,0 +1,14 @@
1
+ export interface HookExecutionObjectInterface {
2
+ HookExecution: HookExecutionInterface;
3
+ }
4
+ export interface HookExecutionInterface {
5
+ HookAccount: string;
6
+ HookEmitCount: number;
7
+ HookExecutionIndex: number;
8
+ HookHash: string;
9
+ HookInstructionCount: string;
10
+ HookResult: number;
11
+ HookReturnCode: string;
12
+ HookReturnString: string;
13
+ HookStateChangeCount: number;
14
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,23 @@
1
+ import { FormattedBaseSpecification } from "./specification";
2
+ import { FormattedSourceAddress } from "./account";
3
+ import { FormattedSpecification } from "../../../../parse/transaction";
4
+ import { Outcome } from "../../../../v1/transaction/types";
5
+ export type FormattedImportBlobSpecification = {
6
+ ledger: number;
7
+ validation: {
8
+ data: any;
9
+ unl: any;
10
+ };
11
+ transaction: {
12
+ id: string;
13
+ tx: any;
14
+ meta: any;
15
+ proof: any;
16
+ specification: FormattedSpecification;
17
+ outcome?: Outcome;
18
+ };
19
+ };
20
+ export type FormattedImportSpecification = {
21
+ source: FormattedSourceAddress;
22
+ blob: FormattedImportBlobSpecification | string;
23
+ } & FormattedBaseSpecification;
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -12,4 +12,11 @@ export * from "./settings";
12
12
  export * from "./signers";
13
13
  export * from "./transactions";
14
14
  export * from "./trustlines";
15
+ export * from "./nftokens";
16
+ export * from "./uritokens";
17
+ export * from "./amendments";
18
+ export * from "./fees";
19
+ export * from "./import";
20
+ export * from "./invoke";
21
+ export * from "./hook";
15
22
  export * from "../../../../types";
@@ -28,4 +28,11 @@ __exportStar(require("./settings"), exports);
28
28
  __exportStar(require("./signers"), exports);
29
29
  __exportStar(require("./transactions"), exports);
30
30
  __exportStar(require("./trustlines"), exports);
31
+ __exportStar(require("./nftokens"), exports);
32
+ __exportStar(require("./uritokens"), exports);
33
+ __exportStar(require("./amendments"), exports);
34
+ __exportStar(require("./fees"), exports);
35
+ __exportStar(require("./import"), exports);
36
+ __exportStar(require("./invoke"), exports);
37
+ __exportStar(require("./hook"), exports);
31
38
  __exportStar(require("../../../../types"), exports);
@@ -0,0 +1,6 @@
1
+ import { FormattedBaseSpecification } from "./specification";
2
+ import { FormattedSourceAddress, FormattedDestinationAddress } from "./account";
3
+ export type FormattedInvokeSpecification = {
4
+ source: FormattedSourceAddress;
5
+ destination: FormattedDestinationAddress;
6
+ } & FormattedBaseSpecification;
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bithomp/xrpl-api",
3
- "version": "2.6.1",
3
+ "version": "2.6.4",
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",
@@ -54,6 +54,7 @@
54
54
  "lodash": "^4.17.21",
55
55
  "ripple-address-codec": "^4.3.1",
56
56
  "ripple-binary-codec": "^1.10.0",
57
+ "ripple-hashes": "^0.3.4",
57
58
  "xrpl": "^2.13.0"
58
59
  },
59
60
  "devDependencies": {