@bithomp/xrpl-api 3.0.5 → 3.0.7
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 +0 -4
- package/lib/faucet.js +0 -4
- package/lib/ledger/transaction.d.ts +1 -0
- package/lib/ledger/transaction.js +6 -1
- package/lib/parse/specification/payment.js +1 -1
- package/lib/types/amm.d.ts +1 -0
- package/lib/types/amm.js +1 -0
- package/lib/v1/transaction/payment.js +1 -1
- package/package.json +14 -14
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) {
|
|
@@ -29,6 +29,7 @@ interface SubmitPaymentTransactionV1Interface {
|
|
|
29
29
|
memos?: FormattedMemo[];
|
|
30
30
|
secret: string;
|
|
31
31
|
fee?: string;
|
|
32
|
+
sequence?: number;
|
|
32
33
|
}
|
|
33
34
|
export declare function submitPaymentTransactionV1(data: SubmitPaymentTransactionV1Interface, definitions?: XrplDefinitionsBase, validateTx?: boolean): Promise<TransactionResponse | FormattedTransaction | ErrorResponse>;
|
|
34
35
|
export declare function getAccountPaymentParams(account: string, connection?: Connection): Promise<AccountPaymentParamsInterface | ErrorResponse>;
|
|
@@ -195,7 +195,12 @@ async function submitPaymentTransactionV1(data, definitions, validateTx) {
|
|
|
195
195
|
else {
|
|
196
196
|
transaction.Fee = submitParams.fee;
|
|
197
197
|
}
|
|
198
|
-
|
|
198
|
+
if (data.sequence) {
|
|
199
|
+
transaction.Sequence = data.sequence;
|
|
200
|
+
}
|
|
201
|
+
else {
|
|
202
|
+
transaction.Sequence = submitParams.sequence;
|
|
203
|
+
}
|
|
199
204
|
transaction.LastLedgerSequence = submitParams.lastLedgerSequence;
|
|
200
205
|
const wallet = (0, wallet_1.walletFromSeed)(data.secret, { seedAddress: transaction.Account });
|
|
201
206
|
const signedTransaction = (0, wallet_1.signTransaction)(wallet, transaction, false, definitions, validateTx).tx_blob;
|
|
@@ -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.7",
|
|
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",
|
|
@@ -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.5",
|
|
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.6",
|
|
67
|
+
"@typescript-eslint/eslint-plugin": "^7.13.1",
|
|
68
|
+
"@typescript-eslint/parser": "^7.13.1",
|
|
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": "^1.0.0",
|
|
74
74
|
"eslint-plugin-import": "^2.29.1",
|
|
75
|
-
"eslint-plugin-n": "^17.
|
|
76
|
-
"eslint-plugin-promise": "^6.
|
|
75
|
+
"eslint-plugin-n": "^17.9.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.5",
|
|
80
80
|
"ts-node": "^10.9.2",
|
|
81
81
|
"typescript": "^5.4.5"
|
|
82
82
|
}
|