@bithomp/xrpl-api 3.1.18 → 3.2.1
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.
- package/lib/client.js +1 -0
- package/lib/common/index.js +17 -7
- package/lib/index.js +17 -7
- package/lib/ledger/account_info.js +17 -7
- package/lib/ledger/account_lines.js +17 -7
- package/lib/ledger/account_namespace.js +17 -7
- package/lib/ledger/account_nfts.js +17 -7
- package/lib/ledger/account_objects.js +17 -7
- package/lib/ledger/account_offers.js +17 -7
- package/lib/ledger/account_tx.js +44 -21
- package/lib/ledger/amm_info.js +17 -7
- package/lib/ledger/book_offers.js +17 -7
- package/lib/ledger/currency.js +17 -7
- package/lib/ledger/fee.js +17 -7
- package/lib/ledger/gateway_balances.js +17 -7
- package/lib/ledger/ledger.js +17 -7
- package/lib/ledger/ledger_entry.js +17 -7
- package/lib/ledger/manifest.js +17 -7
- package/lib/ledger/nft_info.js +17 -7
- package/lib/ledger/server_definitions.js +17 -7
- package/lib/ledger/server_info.js +17 -7
- package/lib/ledger/transaction.js +17 -7
- package/lib/ledger/vl-v2.js +17 -7
- package/lib/ledger/vl.js +17 -7
- package/lib/models/index.d.ts +3 -0
- package/lib/models/index.js +6 -1
- package/lib/models/manifest.js +17 -7
- package/lib/models/mptoken.d.ts +7 -0
- package/lib/models/mptoken.js +26 -0
- package/lib/models/vl.js +17 -7
- package/lib/parse/index.js +17 -7
- package/lib/parse/ledger/account-order.js +3 -3
- package/lib/parse/ledger/amount.d.ts +2 -2
- package/lib/parse/ledger/amount.js +8 -5
- package/lib/parse/ledger/mptoken-authorize-flags.d.ts +5 -0
- package/lib/parse/ledger/mptoken-authorize-flags.js +8 -0
- package/lib/parse/ledger/mptoken-issuance-create-flags.d.ts +5 -0
- package/lib/parse/ledger/mptoken-issuance-create-flags.js +8 -0
- package/lib/parse/ledger/mptoken-issuance-set-flags.d.ts +5 -0
- package/lib/parse/ledger/mptoken-issuance-set-flags.js +8 -0
- package/lib/parse/ledger/orderbook-order.js +3 -3
- package/lib/parse/outcome/amm_changes.d.ts +2 -1
- package/lib/parse/outcome/balance_changes.d.ts +15 -2
- package/lib/parse/outcome/balance_changes.js +33 -2
- package/lib/parse/outcome/delivered_amount.d.ts +2 -2
- package/lib/parse/outcome/did_changes.d.ts +2 -1
- package/lib/parse/outcome/escrow_changes.d.ts +1 -1
- package/lib/parse/outcome/index.d.ts +2 -0
- package/lib/parse/outcome/index.js +5 -1
- package/lib/parse/outcome/locked_balance_changes.d.ts +14 -2
- package/lib/parse/outcome/locked_balance_changes.js +2 -21
- package/lib/parse/outcome/mptoken_changes.d.ts +1 -0
- package/lib/parse/outcome/mptoken_changes.js +84 -0
- package/lib/parse/outcome/mptoken_issuance_changes.d.ts +1 -0
- package/lib/parse/outcome/mptoken_issuance_changes.js +94 -0
- package/lib/parse/outcome/oracle_changes.d.ts +2 -1
- package/lib/parse/outcome/orderbook_changes.d.ts +14 -2
- package/lib/parse/outcome/orderbook_changes.js +2 -2
- package/lib/parse/outcome/orderbook_quality.js +17 -7
- package/lib/parse/outcome.js +4 -20
- package/lib/parse/specification/account-delete.js +17 -7
- package/lib/parse/specification/amendment.js +17 -7
- package/lib/parse/specification/amm-bid.js +17 -7
- package/lib/parse/specification/amm-create.js +17 -7
- package/lib/parse/specification/amm-delete.js +17 -7
- package/lib/parse/specification/amm-deposit.js +17 -7
- package/lib/parse/specification/amm-vote.js +17 -7
- package/lib/parse/specification/amm-withdraw.js +17 -7
- package/lib/parse/specification/check-cancel.js +17 -7
- package/lib/parse/specification/check-cash.js +17 -7
- package/lib/parse/specification/check-create.js +17 -7
- package/lib/parse/specification/clawback.js +17 -7
- package/lib/parse/specification/deposit-preauth.js +17 -7
- package/lib/parse/specification/did-delete.js +17 -7
- package/lib/parse/specification/did-set.js +17 -7
- package/lib/parse/specification/escrow-cancel.js +17 -7
- package/lib/parse/specification/escrow-create.js +17 -7
- package/lib/parse/specification/escrow-finish.js +17 -7
- package/lib/parse/specification/genesis-mint.js +17 -7
- package/lib/parse/specification/import.js +17 -7
- package/lib/parse/specification/invoke.js +17 -7
- package/lib/parse/specification/mptoken-authorize.d.ts +3 -0
- package/lib/parse/specification/mptoken-authorize.js +58 -0
- package/lib/parse/specification/mptoken-issuance-create.d.ts +3 -0
- package/lib/parse/specification/mptoken-issuance-create.js +60 -0
- package/lib/parse/specification/mptoken-issuance-destroy.d.ts +3 -0
- package/lib/parse/specification/mptoken-issuance-destroy.js +52 -0
- package/lib/parse/specification/mptoken-issuance-set.d.ts +3 -0
- package/lib/parse/specification/mptoken-issuance-set.js +58 -0
- package/lib/parse/specification/nftoken-accept-offer.js +22 -7
- package/lib/parse/specification/nftoken-burn.js +22 -7
- package/lib/parse/specification/nftoken-cancel-offer.js +22 -7
- package/lib/parse/specification/nftoken-create-offer.js +17 -7
- package/lib/parse/specification/nftoken-mint.js +34 -7
- package/lib/parse/specification/offer-cancel.js +22 -9
- package/lib/parse/specification/offer-create.js +22 -9
- package/lib/parse/specification/oracle-delete.js +17 -9
- package/lib/parse/specification/oracle-set.js +17 -7
- package/lib/parse/specification/payment-channel-claim.js +17 -7
- package/lib/parse/specification/payment-channel-create.js +17 -7
- package/lib/parse/specification/payment-channel-fund.js +17 -7
- package/lib/parse/specification/payment.js +17 -7
- package/lib/parse/specification/remit.js +17 -7
- package/lib/parse/specification/settings.js +17 -7
- package/lib/parse/specification/ticket-create.js +17 -7
- package/lib/parse/specification/trustline.js +17 -7
- package/lib/parse/specification/unl-report.js +17 -7
- package/lib/parse/specification/uritoken-burn.js +17 -7
- package/lib/parse/specification/uritoken-buy.js +17 -7
- package/lib/parse/specification/uritoken-cancel-sell-offer.js +17 -7
- package/lib/parse/specification/uritoken-create-sell-offer.js +17 -7
- package/lib/parse/specification/uritoken-mint.js +17 -7
- package/lib/parse/transaction.d.ts +4 -1
- package/lib/parse/transaction.js +24 -8
- package/lib/parse/utils.d.ts +2 -2
- package/lib/parse/utils.js +4 -1
- package/lib/types/account.d.ts +2 -2
- package/lib/types/amounts.d.ts +6 -2
- package/lib/types/checks.d.ts +2 -2
- package/lib/types/mptokens.d.ts +54 -0
- package/lib/types/mptokens.js +19 -0
- package/lib/types/nftokens.d.ts +3 -0
- package/lib/types/outcome.d.ts +6 -19
- package/lib/v1/utils.d.ts +1 -1
- package/lib/v1/utils.js +18 -10
- package/lib/validator.js +18 -16
- package/lib/wallet.js +17 -7
- package/package.json +17 -14
|
@@ -15,13 +15,23 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
|
|
|
15
15
|
}) : function(o, v) {
|
|
16
16
|
o["default"] = v;
|
|
17
17
|
});
|
|
18
|
-
var __importStar = (this && this.__importStar) || function (
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
};
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
25
35
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
26
36
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
27
37
|
};
|
|
@@ -15,13 +15,23 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
|
|
|
15
15
|
}) : function(o, v) {
|
|
16
16
|
o["default"] = v;
|
|
17
17
|
});
|
|
18
|
-
var __importStar = (this && this.__importStar) || function (
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
};
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
25
35
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
36
|
const assert = __importStar(require("assert"));
|
|
27
37
|
const common_1 = require("../../common");
|
|
@@ -15,13 +15,23 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
|
|
|
15
15
|
}) : function(o, v) {
|
|
16
16
|
o["default"] = v;
|
|
17
17
|
});
|
|
18
|
-
var __importStar = (this && this.__importStar) || function (
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
};
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
25
35
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
36
|
const assert = __importStar(require("assert"));
|
|
27
37
|
const xrpl_1 = require("xrpl");
|
|
@@ -15,13 +15,23 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
|
|
|
15
15
|
}) : function(o, v) {
|
|
16
16
|
o["default"] = v;
|
|
17
17
|
});
|
|
18
|
-
var __importStar = (this && this.__importStar) || function (
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
};
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
25
35
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
36
|
const assert = __importStar(require("assert"));
|
|
27
37
|
const common_1 = require("../../common");
|
|
@@ -15,13 +15,23 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
|
|
|
15
15
|
}) : function(o, v) {
|
|
16
16
|
o["default"] = v;
|
|
17
17
|
});
|
|
18
|
-
var __importStar = (this && this.__importStar) || function (
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
};
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
25
35
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
36
|
const assert = __importStar(require("assert"));
|
|
27
37
|
const common_1 = require("../../common");
|
|
@@ -15,13 +15,23 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
|
|
|
15
15
|
}) : function(o, v) {
|
|
16
16
|
o["default"] = v;
|
|
17
17
|
});
|
|
18
|
-
var __importStar = (this && this.__importStar) || function (
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
};
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
25
35
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
36
|
const assert = __importStar(require("assert"));
|
|
27
37
|
const common_1 = require("../../common");
|
|
@@ -15,13 +15,23 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
|
|
|
15
15
|
}) : function(o, v) {
|
|
16
16
|
o["default"] = v;
|
|
17
17
|
});
|
|
18
|
-
var __importStar = (this && this.__importStar) || function (
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
};
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
25
35
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
36
|
const assert = __importStar(require("assert"));
|
|
27
37
|
const common_1 = require("../../common");
|
|
@@ -15,13 +15,23 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
|
|
|
15
15
|
}) : function(o, v) {
|
|
16
16
|
o["default"] = v;
|
|
17
17
|
});
|
|
18
|
-
var __importStar = (this && this.__importStar) || function (
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
};
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
25
35
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
36
|
const assert = __importStar(require("assert"));
|
|
27
37
|
const common_1 = require("../../common");
|
|
@@ -15,13 +15,23 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
|
|
|
15
15
|
}) : function(o, v) {
|
|
16
16
|
o["default"] = v;
|
|
17
17
|
});
|
|
18
|
-
var __importStar = (this && this.__importStar) || function (
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
};
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
25
35
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
26
36
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
27
37
|
};
|
|
@@ -18,11 +18,14 @@ import { FormattedUNLReportSpecification } from "../types/unl_reports";
|
|
|
18
18
|
import { FormattedRemitsSpecification } from "../types/remits";
|
|
19
19
|
import { FormattedClawbackSpecification } from "../types/clawback";
|
|
20
20
|
import { FormattedAmmBidSpecification, FormattedAmmCreateSpecification, FormattedAmmDeleteSpecification, FormattedAmmDepositSpecification, FormattedAmmWithdrawSpecification, FormattedAmmVoteSpecification } from "../types/amm";
|
|
21
|
+
import { FormattedDIDSetSpecification, FormattedDIDDeleteSpecification } from "../types/did";
|
|
22
|
+
import { FormattedOracleSetSpecification, FormattedOracleDeleteSpecification } from "../types/oracle";
|
|
23
|
+
import { FormattedMPTokenIssuanceCreateSpecification, FormattedMPTokenAuthorizeSpecification, FormattedMPTokenIssuanceSetSpecification, FormattedMPTokenIssuanceDestroySpecification } from "../types/mptokens";
|
|
21
24
|
import { FormattedGenesisMintSpecification } from "../types/genesis_mint";
|
|
22
25
|
import { FormattedAmendmentSpecification } from "../types/amendments";
|
|
23
26
|
import { FormattedFeeUpdateSpecification } from "../types/fees";
|
|
24
27
|
declare function parseTransactionType(type: string): string;
|
|
25
|
-
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 | FormattedUNLReportSpecification | FormattedRemitsSpecification | FormattedClawbackSpecification | FormattedAmmBidSpecification | FormattedAmmCreateSpecification | FormattedAmmDeleteSpecification | FormattedAmmDepositSpecification | FormattedAmmWithdrawSpecification | FormattedAmmVoteSpecification | FormattedGenesisMintSpecification | FormattedAmendmentSpecification | FormattedFeeUpdateSpecification;
|
|
28
|
+
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 | FormattedUNLReportSpecification | FormattedRemitsSpecification | FormattedClawbackSpecification | FormattedAmmBidSpecification | FormattedAmmCreateSpecification | FormattedAmmDeleteSpecification | FormattedAmmDepositSpecification | FormattedAmmWithdrawSpecification | FormattedAmmVoteSpecification | FormattedGenesisMintSpecification | FormattedAmendmentSpecification | FormattedFeeUpdateSpecification | FormattedDIDSetSpecification | FormattedDIDDeleteSpecification | FormattedOracleSetSpecification | FormattedOracleDeleteSpecification | FormattedMPTokenIssuanceCreateSpecification | FormattedMPTokenAuthorizeSpecification | FormattedMPTokenIssuanceSetSpecification | FormattedMPTokenIssuanceDestroySpecification;
|
|
26
29
|
export interface FormattedTransaction {
|
|
27
30
|
type: string;
|
|
28
31
|
address: string;
|
package/lib/parse/transaction.js
CHANGED
|
@@ -50,6 +50,10 @@ const did_set_1 = __importDefault(require("./specification/did-set"));
|
|
|
50
50
|
const did_delete_1 = __importDefault(require("./specification/did-delete"));
|
|
51
51
|
const oracle_set_1 = __importDefault(require("./specification/oracle-set"));
|
|
52
52
|
const oracle_delete_1 = __importDefault(require("./specification/oracle-delete"));
|
|
53
|
+
const mptoken_issuance_create_1 = __importDefault(require("./specification/mptoken-issuance-create"));
|
|
54
|
+
const mptoken_authorize_1 = __importDefault(require("./specification/mptoken-authorize"));
|
|
55
|
+
const mptoken_issuance_set_1 = __importDefault(require("./specification/mptoken-issuance-set"));
|
|
56
|
+
const mptoken_issuance_destroy_1 = __importDefault(require("./specification/mptoken-issuance-destroy"));
|
|
53
57
|
const genesis_mint_1 = __importDefault(require("./specification/genesis-mint"));
|
|
54
58
|
const amendment_1 = __importDefault(require("./specification/amendment"));
|
|
55
59
|
const fee_update_1 = __importDefault(require("./specification/fee-update"));
|
|
@@ -98,6 +102,10 @@ const transactionTypeToType = {
|
|
|
98
102
|
DIDDelete: "didDelete",
|
|
99
103
|
OracleSet: "oracleSet",
|
|
100
104
|
OracleDelete: "oracleDelete",
|
|
105
|
+
MPTokenIssuanceCreate: "MPTokenIssuanceCreate",
|
|
106
|
+
MPTokenAuthorize: "MPTokenAuthorize",
|
|
107
|
+
MPTokenIssuanceSet: "MPTokenIssuanceSet",
|
|
108
|
+
MPTokenIssuanceDestroy: "MPTokenIssuanceDestroy",
|
|
101
109
|
GenesisMint: "genesisMint",
|
|
102
110
|
EnableAmendment: "amendment",
|
|
103
111
|
SetFee: "feeUpdate",
|
|
@@ -148,6 +156,10 @@ const parserTypeFunc = {
|
|
|
148
156
|
didDelete: did_delete_1.default,
|
|
149
157
|
oracleSet: oracle_set_1.default,
|
|
150
158
|
oracleDelete: oracle_delete_1.default,
|
|
159
|
+
MPTokenIssuanceCreate: mptoken_issuance_create_1.default,
|
|
160
|
+
MPTokenAuthorize: mptoken_authorize_1.default,
|
|
161
|
+
MPTokenIssuanceSet: mptoken_issuance_set_1.default,
|
|
162
|
+
MPTokenIssuanceDestroy: mptoken_issuance_destroy_1.default,
|
|
151
163
|
genesisMint: genesis_mint_1.default,
|
|
152
164
|
amendment: amendment_1.default,
|
|
153
165
|
feeUpdate: fee_update_1.default,
|
|
@@ -159,20 +171,24 @@ function unrecognizedParser(_tx) {
|
|
|
159
171
|
};
|
|
160
172
|
}
|
|
161
173
|
function parseTransaction(tx, includeRawTransaction, nativeCurrency, definitions) {
|
|
162
|
-
|
|
174
|
+
let universalTx = tx;
|
|
175
|
+
if (universalTx.tx_json) {
|
|
176
|
+
universalTx = { ...universalTx, ...universalTx.tx_json };
|
|
177
|
+
}
|
|
178
|
+
const type = parseTransactionType(universalTx.TransactionType);
|
|
163
179
|
const parser = parserTypeFunc[type];
|
|
164
|
-
const specification = parser ? parser(
|
|
180
|
+
const specification = parser ? parser(universalTx) : unrecognizedParser(universalTx);
|
|
165
181
|
if (!parser) {
|
|
166
182
|
includeRawTransaction = true;
|
|
167
183
|
}
|
|
168
|
-
const outcome = (0, outcome_1.parseOutcome)(
|
|
184
|
+
const outcome = (0, outcome_1.parseOutcome)(universalTx, nativeCurrency, definitions);
|
|
169
185
|
return (0, common_1.removeUndefined)({
|
|
170
186
|
type: type,
|
|
171
|
-
address: (0, account_1.parseAccount)(
|
|
172
|
-
sequence:
|
|
173
|
-
ticketSequence:
|
|
174
|
-
id:
|
|
175
|
-
ctid:
|
|
187
|
+
address: (0, account_1.parseAccount)(universalTx.Account),
|
|
188
|
+
sequence: universalTx.Sequence,
|
|
189
|
+
ticketSequence: universalTx.TicketSequence,
|
|
190
|
+
id: universalTx.hash,
|
|
191
|
+
ctid: universalTx.ctid,
|
|
176
192
|
specification: (0, common_1.removeUndefined)(specification),
|
|
177
193
|
outcome: outcome ? (0, common_1.removeUndefined)(outcome) : undefined,
|
|
178
194
|
rawTransaction: includeRawTransaction ? JSON.stringify(tx) : undefined,
|
package/lib/parse/utils.d.ts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { TransactionMetadata } from "xrpl";
|
|
2
|
-
import { FormattedIssuedCurrencyAmount } from "../types";
|
|
2
|
+
import { FormattedIssuedCurrencyAmount, FormattedIssuedMPTAmount } from "../types";
|
|
3
3
|
declare function adjustQualityForXRP(quality: string, takerGetsCurrency: string, takerPaysCurrency: string): string;
|
|
4
4
|
declare function parseQuality(quality?: number | null): number | undefined;
|
|
5
5
|
declare function parseTimestamp(rippleTime?: number | null): string | undefined;
|
|
6
6
|
declare function isPartialPayment(tx: any): boolean;
|
|
7
|
-
declare function removeGenericCounterparty(amount: FormattedIssuedCurrencyAmount, address: string): FormattedIssuedCurrencyAmount;
|
|
7
|
+
declare function removeGenericCounterparty(amount: FormattedIssuedCurrencyAmount | FormattedIssuedMPTAmount, address: string): FormattedIssuedCurrencyAmount | FormattedIssuedMPTAmount;
|
|
8
8
|
declare function normalizeNodes(metadata: TransactionMetadata): any[];
|
|
9
9
|
declare function hexToString(hex: string | undefined): string | undefined;
|
|
10
10
|
declare function stringToHex(value: string | undefined): string | undefined;
|
package/lib/parse/utils.js
CHANGED
|
@@ -42,7 +42,10 @@ function isPartialPayment(tx) {
|
|
|
42
42
|
return (tx.Flags & xrpl_1.PaymentFlags.tfPartialPayment) !== 0;
|
|
43
43
|
}
|
|
44
44
|
function removeGenericCounterparty(amount, address) {
|
|
45
|
-
|
|
45
|
+
if ("counterparty" in amount) {
|
|
46
|
+
return amount.counterparty === address ? lodash_1.default.omit(amount, "counterparty") : amount;
|
|
47
|
+
}
|
|
48
|
+
return amount;
|
|
46
49
|
}
|
|
47
50
|
function normalizeNode(affectedNode) {
|
|
48
51
|
const diffType = Object.keys(affectedNode)[0];
|
package/lib/types/account.d.ts
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { FormattedBaseSpecification } from "./specification";
|
|
2
|
-
import { FormattedIssuedCurrencyAmount } from "./amounts";
|
|
2
|
+
import { FormattedIssuedCurrencyAmount, FormattedIssuedMPTAmount } from "./amounts";
|
|
3
3
|
export type FormattedAccountDeleteSpecification = {
|
|
4
4
|
source?: FormattedSourceAddress;
|
|
5
5
|
destination?: FormattedDestinationAddress;
|
|
6
6
|
} & FormattedBaseSpecification;
|
|
7
7
|
export type FormattedSourceAddress = {
|
|
8
8
|
address: string;
|
|
9
|
-
maxAmount?: FormattedIssuedCurrencyAmount;
|
|
9
|
+
maxAmount?: FormattedIssuedCurrencyAmount | FormattedIssuedMPTAmount;
|
|
10
10
|
tag?: number;
|
|
11
11
|
};
|
|
12
12
|
export type FormattedDestinationAddress = {
|
package/lib/types/amounts.d.ts
CHANGED
|
@@ -12,5 +12,9 @@ export interface IssuedCurrencyAmount extends IssuedCurrency {
|
|
|
12
12
|
export interface FormattedIssuedCurrencyAmount extends FormattedIssuedCurrency {
|
|
13
13
|
value: string;
|
|
14
14
|
}
|
|
15
|
-
export
|
|
16
|
-
|
|
15
|
+
export interface FormattedIssuedMPTAmount {
|
|
16
|
+
mpt_issuance_id?: string;
|
|
17
|
+
value: string;
|
|
18
|
+
}
|
|
19
|
+
export type Amount = IssuedCurrencyAmount | FormattedIssuedMPTAmount | string;
|
|
20
|
+
export type FormattedAmount = FormattedIssuedCurrencyAmount | FormattedIssuedMPTAmount | string;
|
package/lib/types/checks.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { FormattedBaseSpecification } from "./specification";
|
|
2
|
-
import { FormattedIssuedCurrencyAmount } from "./amounts";
|
|
2
|
+
import { FormattedIssuedCurrencyAmount, FormattedIssuedMPTAmount } from "./amounts";
|
|
3
3
|
import { FormattedSourceAddress, FormattedDestinationAddress } from "./account";
|
|
4
4
|
export type FormattedCheckCancelSpecification = {
|
|
5
5
|
checkID: string;
|
|
@@ -12,7 +12,7 @@ export type FormattedCheckCashSpecification = {
|
|
|
12
12
|
export type FormattedCheckCreateSpecification = {
|
|
13
13
|
source?: FormattedSourceAddress;
|
|
14
14
|
destination?: FormattedDestinationAddress;
|
|
15
|
-
sendMax: FormattedIssuedCurrencyAmount;
|
|
15
|
+
sendMax: FormattedIssuedCurrencyAmount | FormattedIssuedMPTAmount;
|
|
16
16
|
expiration?: string;
|
|
17
17
|
invoiceID?: string;
|
|
18
18
|
} & FormattedBaseSpecification;
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import { MPTokenIssuanceCreateFlags, MPTokenIssuanceSetFlags, MPTokenAuthorizeFlags } from "xrpl";
|
|
2
|
+
import { FormattedBaseSpecification } from "./specification";
|
|
3
|
+
export declare const MPTokenIssuanceCreateFlagsKeys: {
|
|
4
|
+
canLock: MPTokenIssuanceCreateFlags;
|
|
5
|
+
requireAuth: MPTokenIssuanceCreateFlags;
|
|
6
|
+
canEscrow: MPTokenIssuanceCreateFlags;
|
|
7
|
+
canTrade: MPTokenIssuanceCreateFlags;
|
|
8
|
+
canTransfer: MPTokenIssuanceCreateFlags;
|
|
9
|
+
canClawback: MPTokenIssuanceCreateFlags;
|
|
10
|
+
};
|
|
11
|
+
export interface MPTokenIssuanceCreateFlagsKeysInterface {
|
|
12
|
+
canLock?: boolean;
|
|
13
|
+
requireAuth?: boolean;
|
|
14
|
+
canEscrow?: boolean;
|
|
15
|
+
canTrade?: boolean;
|
|
16
|
+
canTransfer?: boolean;
|
|
17
|
+
canClawback?: boolean;
|
|
18
|
+
}
|
|
19
|
+
export declare const MPTokenIssuanceSetFlagsKeys: {
|
|
20
|
+
lock: MPTokenIssuanceSetFlags;
|
|
21
|
+
unlock: MPTokenIssuanceSetFlags;
|
|
22
|
+
};
|
|
23
|
+
export interface MPTokenIssuanceSetFlagsKeysInterface {
|
|
24
|
+
lock?: boolean;
|
|
25
|
+
unlock?: boolean;
|
|
26
|
+
}
|
|
27
|
+
export declare const MPTokenAuthorizeFlagsKeys: {
|
|
28
|
+
unauthorize: MPTokenAuthorizeFlags;
|
|
29
|
+
};
|
|
30
|
+
export interface MPTokenAuthorizeFlagsKeysInterface {
|
|
31
|
+
unauthorize?: boolean;
|
|
32
|
+
}
|
|
33
|
+
export type FormattedMPTokenAuthorizeSpecification = {
|
|
34
|
+
flags?: MPTokenAuthorizeFlagsKeysInterface;
|
|
35
|
+
holder?: string;
|
|
36
|
+
mptIssuanceID?: string;
|
|
37
|
+
} & FormattedBaseSpecification;
|
|
38
|
+
export type FormattedMPTokenIssuanceCreateSpecification = {
|
|
39
|
+
issuer?: string;
|
|
40
|
+
sequence?: number;
|
|
41
|
+
scale?: number;
|
|
42
|
+
flags?: MPTokenIssuanceCreateFlagsKeysInterface;
|
|
43
|
+
metadata?: string;
|
|
44
|
+
maximumAmount?: string;
|
|
45
|
+
transferFee?: number;
|
|
46
|
+
} & FormattedBaseSpecification;
|
|
47
|
+
export type FormattedMPTokenIssuanceDestroySpecification = {
|
|
48
|
+
mptIssuanceID?: string;
|
|
49
|
+
} & FormattedBaseSpecification;
|
|
50
|
+
export type FormattedMPTokenIssuanceSetSpecification = {
|
|
51
|
+
flags?: MPTokenIssuanceSetFlagsKeysInterface;
|
|
52
|
+
holder?: string;
|
|
53
|
+
mptIssuanceID?: string;
|
|
54
|
+
} & FormattedBaseSpecification;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.MPTokenAuthorizeFlagsKeys = exports.MPTokenIssuanceSetFlagsKeys = exports.MPTokenIssuanceCreateFlagsKeys = void 0;
|
|
4
|
+
const xrpl_1 = require("xrpl");
|
|
5
|
+
exports.MPTokenIssuanceCreateFlagsKeys = {
|
|
6
|
+
canLock: xrpl_1.MPTokenIssuanceCreateFlags.tfMPTCanLock,
|
|
7
|
+
requireAuth: xrpl_1.MPTokenIssuanceCreateFlags.tfMPTRequireAuth,
|
|
8
|
+
canEscrow: xrpl_1.MPTokenIssuanceCreateFlags.tfMPTCanEscrow,
|
|
9
|
+
canTrade: xrpl_1.MPTokenIssuanceCreateFlags.tfMPTCanTrade,
|
|
10
|
+
canTransfer: xrpl_1.MPTokenIssuanceCreateFlags.tfMPTCanTransfer,
|
|
11
|
+
canClawback: xrpl_1.MPTokenIssuanceCreateFlags.tfMPTCanClawback,
|
|
12
|
+
};
|
|
13
|
+
exports.MPTokenIssuanceSetFlagsKeys = {
|
|
14
|
+
lock: xrpl_1.MPTokenIssuanceSetFlags.tfMPTLock,
|
|
15
|
+
unlock: xrpl_1.MPTokenIssuanceSetFlags.tfMPTUnlock,
|
|
16
|
+
};
|
|
17
|
+
exports.MPTokenAuthorizeFlagsKeys = {
|
|
18
|
+
unauthorize: xrpl_1.MPTokenAuthorizeFlags.tfMPTUnauthorize,
|
|
19
|
+
};
|
package/lib/types/nftokens.d.ts
CHANGED
|
@@ -30,6 +30,9 @@ export type FormattedNFTokenMintSpecification = {
|
|
|
30
30
|
transferFee?: number;
|
|
31
31
|
uri?: string;
|
|
32
32
|
flags?: NFTokenFlagsKeysInterface;
|
|
33
|
+
amount?: Amount;
|
|
34
|
+
destination?: FormattedDestinationAddress;
|
|
35
|
+
expiration?: number;
|
|
33
36
|
} & FormattedBaseSpecification;
|
|
34
37
|
export type FormattedNFTokenCancelOfferSpecification = {
|
|
35
38
|
nftokenOffers: string[];
|
package/lib/types/outcome.d.ts
CHANGED
|
@@ -1,22 +1,13 @@
|
|
|
1
|
+
import { FormattedIssuedCurrencyAmount, FormattedIssuedMPTAmount } from "./amounts";
|
|
2
|
+
import { LockedBalanceChanges } from "../parse/outcome/locked_balance_changes";
|
|
3
|
+
import { BalanceChanges } from "../parse/outcome/balance_changes";
|
|
1
4
|
export type Outcome = {
|
|
2
5
|
result?: string;
|
|
3
6
|
ledgerVersion?: number;
|
|
4
7
|
indexInLedger?: number;
|
|
5
8
|
fee?: string;
|
|
6
|
-
balanceChanges?:
|
|
7
|
-
|
|
8
|
-
currency: string;
|
|
9
|
-
counterparty?: string;
|
|
10
|
-
value: string;
|
|
11
|
-
}[];
|
|
12
|
-
};
|
|
13
|
-
lockedBalanceChanges?: {
|
|
14
|
-
[key: string]: {
|
|
15
|
-
currency: string;
|
|
16
|
-
counterparty?: string;
|
|
17
|
-
value: string;
|
|
18
|
-
}[];
|
|
19
|
-
};
|
|
9
|
+
balanceChanges?: BalanceChanges;
|
|
10
|
+
lockedBalanceChanges?: LockedBalanceChanges;
|
|
20
11
|
orderbookChanges?: object;
|
|
21
12
|
channelChanges?: object;
|
|
22
13
|
nftokenChanges?: object;
|
|
@@ -25,10 +16,6 @@ export type Outcome = {
|
|
|
25
16
|
uritokenSellOfferChanges?: object;
|
|
26
17
|
affectedObjects?: object;
|
|
27
18
|
ammChanges?: object;
|
|
28
|
-
deliveredAmount?:
|
|
29
|
-
currency: string;
|
|
30
|
-
counterparty?: string;
|
|
31
|
-
value: string;
|
|
32
|
-
};
|
|
19
|
+
deliveredAmount?: FormattedIssuedCurrencyAmount | FormattedIssuedMPTAmount;
|
|
33
20
|
timestamp?: string;
|
|
34
21
|
};
|
package/lib/v1/utils.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Amount, FormattedIssuedCurrencyAmount } from "../types";
|
|
2
|
-
export declare function toRippledAmount(amount: Amount | FormattedIssuedCurrencyAmount): Amount;
|
|
2
|
+
export declare function toRippledAmount(amount: Amount | FormattedIssuedCurrencyAmount): Amount | undefined;
|
|
3
3
|
export interface ClassicAccountAndTag {
|
|
4
4
|
classicAccount: string;
|
|
5
5
|
tag: number | false | undefined;
|
package/lib/v1/utils.js
CHANGED
|
@@ -8,18 +8,26 @@ const client_1 = require("../client");
|
|
|
8
8
|
function toRippledAmount(amount) {
|
|
9
9
|
if (typeof amount === "string")
|
|
10
10
|
return amount;
|
|
11
|
-
if (
|
|
12
|
-
|
|
11
|
+
if ("currency" in amount) {
|
|
12
|
+
if (amount.currency === (0, client_1.getNativeCurrency)()) {
|
|
13
|
+
return (0, common_1.xrpToDrops)(amount.value);
|
|
14
|
+
}
|
|
15
|
+
else if (amount.currency === "drops") {
|
|
16
|
+
return amount.value;
|
|
17
|
+
}
|
|
18
|
+
const issuer = amount.counterparty || amount.issuer;
|
|
19
|
+
return {
|
|
20
|
+
currency: amount.currency,
|
|
21
|
+
issuer,
|
|
22
|
+
value: amount.value,
|
|
23
|
+
};
|
|
13
24
|
}
|
|
14
|
-
if (
|
|
15
|
-
return
|
|
25
|
+
if ("mpt_issuance_id" in amount) {
|
|
26
|
+
return {
|
|
27
|
+
value: amount.value,
|
|
28
|
+
mpt_issuance_id: amount.mpt_issuance_id,
|
|
29
|
+
};
|
|
16
30
|
}
|
|
17
|
-
const issuer = amount.counterparty || amount.issuer;
|
|
18
|
-
return {
|
|
19
|
-
currency: amount.currency,
|
|
20
|
-
issuer,
|
|
21
|
-
value: amount.value,
|
|
22
|
-
};
|
|
23
31
|
}
|
|
24
32
|
function getClassicAccountAndTag(Account, expectedTag) {
|
|
25
33
|
if ((0, ripple_address_codec_1.isValidXAddress)(Account)) {
|