@bithomp/xrpl-api 3.0.4 → 3.0.6
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/faucet.d.ts
CHANGED
|
@@ -50,10 +50,6 @@ export declare const FaucetNetworks: {
|
|
|
50
50
|
url: string;
|
|
51
51
|
format: string;
|
|
52
52
|
};
|
|
53
|
-
amm: {
|
|
54
|
-
url: string;
|
|
55
|
-
format: string;
|
|
56
|
-
};
|
|
57
53
|
};
|
|
58
54
|
export declare function getFaucetNetwork(network: string): FaucetNetworkInterface | undefined;
|
|
59
55
|
export declare function foundWallet(network: string | FaucetNetworkInterface, account?: string): Promise<any>;
|
package/lib/faucet.js
CHANGED
|
@@ -27,10 +27,6 @@ exports.FaucetNetworks = {
|
|
|
27
27
|
url: "https://hooks-testnet-v3.xrpl-labs.com/newcreds",
|
|
28
28
|
format: "xrpl-labs",
|
|
29
29
|
},
|
|
30
|
-
amm: {
|
|
31
|
-
url: "https://ammfaucet.devnet.rippletest.net/accounts",
|
|
32
|
-
format: "xrpl",
|
|
33
|
-
},
|
|
34
30
|
};
|
|
35
31
|
function getFaucetNetwork(network) {
|
|
36
32
|
if (network in exports.FaucetNetworks) {
|
|
@@ -11,6 +11,7 @@ const amount_1 = __importDefault(require("../ledger/amount"));
|
|
|
11
11
|
const asset_1 = __importDefault(require("../ledger/asset"));
|
|
12
12
|
const auth_accounts_1 = __importDefault(require("../ledger/auth-accounts"));
|
|
13
13
|
const client_1 = require("../../client");
|
|
14
|
+
const models_1 = require("../../models");
|
|
14
15
|
function parseAmmStatus(node) {
|
|
15
16
|
if (node.diffType === "CreatedNode") {
|
|
16
17
|
return "created";
|
|
@@ -28,7 +29,7 @@ function parseAuctionSlot(auctionSlot) {
|
|
|
28
29
|
account: auctionSlot.Account,
|
|
29
30
|
authAccounts: (0, auth_accounts_1.default)(auctionSlot.AuthAccounts),
|
|
30
31
|
discountedFee: auctionSlot.DiscountedFee,
|
|
31
|
-
expiration: auctionSlot.Expiration,
|
|
32
|
+
expiration: auctionSlot.Expiration ? (0, models_1.ledgerTimeToUnixTime)(auctionSlot.Expiration) : undefined,
|
|
32
33
|
price: auctionSlot.Price,
|
|
33
34
|
timeInterval: auctionSlot.TimeInterval,
|
|
34
35
|
};
|
|
@@ -33,7 +33,7 @@ const common_1 = require("../../common");
|
|
|
33
33
|
const amount_1 = __importDefault(require("../ledger/amount"));
|
|
34
34
|
const memos_1 = require("../ledger/memos");
|
|
35
35
|
function isNoDirectRipple(tx) {
|
|
36
|
-
return (tx.Flags & xrpl_1.PaymentFlags.
|
|
36
|
+
return (tx.Flags & xrpl_1.PaymentFlags.tfNoRippleDirect) !== 0;
|
|
37
37
|
}
|
|
38
38
|
function isQualityLimited(tx) {
|
|
39
39
|
return (tx.Flags & xrpl_1.PaymentFlags.tfLimitQuality) !== 0;
|
package/lib/types/amm.d.ts
CHANGED
package/lib/types/amm.js
CHANGED
|
@@ -8,6 +8,7 @@ exports.AMMDepositFlagsKeys = {
|
|
|
8
8
|
twoAsset: xrpl_1.AMMDepositFlags.tfTwoAsset,
|
|
9
9
|
oneAssetLPToken: xrpl_1.AMMDepositFlags.tfOneAssetLPToken,
|
|
10
10
|
limitLPToken: xrpl_1.AMMDepositFlags.tfLimitLPToken,
|
|
11
|
+
twoAssetIfEmpty: xrpl_1.AMMDepositFlags.tfTwoAssetIfEmpty,
|
|
11
12
|
};
|
|
12
13
|
exports.AMMWithdrawFlagsKeys = {
|
|
13
14
|
lpToken: xrpl_1.AMMWithdrawFlags.tfLPToken,
|
|
@@ -106,7 +106,7 @@ function createPaymentTransaction(address, paymentArgument) {
|
|
|
106
106
|
txJSON.Memos = payment.memos.map(memos_1.formattedMemoToMemo);
|
|
107
107
|
}
|
|
108
108
|
if (payment.noDirectRipple === true) {
|
|
109
|
-
txJSON.Flags |= xrpl_1.PaymentFlags.
|
|
109
|
+
txJSON.Flags |= xrpl_1.PaymentFlags.tfNoRippleDirect;
|
|
110
110
|
}
|
|
111
111
|
if (payment.limitQuality === true) {
|
|
112
112
|
txJSON.Flags |= xrpl_1.PaymentFlags.tfLimitQuality;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bithomp/xrpl-api",
|
|
3
|
-
"version": "3.0.
|
|
3
|
+
"version": "3.0.6",
|
|
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",
|
|
@@ -39,7 +39,7 @@
|
|
|
39
39
|
"format": "prettier --write \"src/**/*.ts\" \"src/**/*.js\"",
|
|
40
40
|
"lint": "eslint -c .eslintrc.json --ext .ts src/",
|
|
41
41
|
"prepare": "npm run build",
|
|
42
|
-
"prepublishOnly": "npm test && npm run lint",
|
|
42
|
+
"-prepublishOnly": "npm test && npm run lint",
|
|
43
43
|
"preversion": "npm run lint",
|
|
44
44
|
"version": "npm run format && git add -A src",
|
|
45
45
|
"postversion": "git push && git push --tags"
|
|
@@ -48,35 +48,35 @@
|
|
|
48
48
|
"lib/**/*"
|
|
49
49
|
],
|
|
50
50
|
"dependencies": {
|
|
51
|
-
"axios": "^1.
|
|
51
|
+
"axios": "^1.7.2",
|
|
52
52
|
"base-x": "^4.0.0",
|
|
53
53
|
"bignumber.js": "^9.1.2",
|
|
54
54
|
"elliptic": "^6.5.5",
|
|
55
55
|
"lodash": "^4.17.21",
|
|
56
56
|
"ripple-address-codec": "^5.0.0",
|
|
57
|
-
"ripple-binary-codec": "^2.
|
|
58
|
-
"xrpl": "^3.
|
|
57
|
+
"ripple-binary-codec": "^2.1.0",
|
|
58
|
+
"xrpl": "^3.1.0"
|
|
59
59
|
},
|
|
60
60
|
"devDependencies": {
|
|
61
|
-
"@types/chai": "^4.3.
|
|
61
|
+
"@types/chai": "^4.3.16",
|
|
62
62
|
"@types/chai-as-promised": "^7.1.8",
|
|
63
|
-
"@types/lodash": "^4.17.
|
|
63
|
+
"@types/lodash": "^4.17.4",
|
|
64
64
|
"@types/mocha": "^10.0.6",
|
|
65
65
|
"@types/nconf": "^0.10.6",
|
|
66
|
-
"@types/node": "^20.
|
|
67
|
-
"@typescript-eslint/eslint-plugin": "^7.
|
|
68
|
-
"@typescript-eslint/parser": "^7.
|
|
66
|
+
"@types/node": "^20.14.0",
|
|
67
|
+
"@typescript-eslint/eslint-plugin": "^7.12.0",
|
|
68
|
+
"@typescript-eslint/parser": "^7.12.0",
|
|
69
69
|
"chai": "^4.4.1",
|
|
70
|
-
"chai-as-promised": "^7.1.
|
|
70
|
+
"chai-as-promised": "^7.1.2",
|
|
71
71
|
"eslint": "^8.57.0",
|
|
72
72
|
"eslint-config-prettier": "^9.1.0",
|
|
73
|
-
"eslint-plugin-chai-friendly": "^0.
|
|
73
|
+
"eslint-plugin-chai-friendly": "^0.8.0",
|
|
74
74
|
"eslint-plugin-import": "^2.29.1",
|
|
75
|
-
"eslint-plugin-n": "^17.
|
|
76
|
-
"eslint-plugin-promise": "^6.
|
|
75
|
+
"eslint-plugin-n": "^17.7.0",
|
|
76
|
+
"eslint-plugin-promise": "^6.2.0",
|
|
77
77
|
"mocha": "^10.4.0",
|
|
78
78
|
"nconf": "^0.12.1",
|
|
79
|
-
"ts-jest": "^29.1.
|
|
79
|
+
"ts-jest": "^29.1.4",
|
|
80
80
|
"ts-node": "^10.9.2",
|
|
81
81
|
"typescript": "^5.4.5"
|
|
82
82
|
}
|