@bithomp/xrpl-api 3.7.15 → 3.7.16
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.
|
@@ -94,6 +94,7 @@ export declare const AccountSetFlags: {
|
|
|
94
94
|
disallowIncomingPayChan: AccountSetAsfFlags;
|
|
95
95
|
disallowIncomingTrustline: AccountSetAsfFlags;
|
|
96
96
|
allowTrustLineClawback: AccountSetAsfFlags;
|
|
97
|
+
allowTrustLineLocking: AccountSetAsfFlags;
|
|
97
98
|
tshCollect: XahauAccountSetAsfFlags;
|
|
98
99
|
disallowIncomingRemit: XahauAccountSetAsfFlags;
|
|
99
100
|
};
|
|
@@ -103,6 +104,13 @@ export declare const SignerListFlagsKeys: {
|
|
|
103
104
|
export interface SignerListFlagsKeysInterface {
|
|
104
105
|
oneOwnerCount?: boolean;
|
|
105
106
|
}
|
|
107
|
+
export interface AccountFieldParametersInterface {
|
|
108
|
+
name: string;
|
|
109
|
+
encoding?: string;
|
|
110
|
+
length?: number;
|
|
111
|
+
defaults?: any;
|
|
112
|
+
shift?: number;
|
|
113
|
+
}
|
|
106
114
|
export declare const AccountFields: {
|
|
107
115
|
EmailHash: {
|
|
108
116
|
name: string;
|
|
@@ -75,6 +75,7 @@ exports.AccountSetFlags = {
|
|
|
75
75
|
disallowIncomingPayChan: xrpl_1.AccountSetAsfFlags.asfDisallowIncomingPayChan,
|
|
76
76
|
disallowIncomingTrustline: xrpl_1.AccountSetAsfFlags.asfDisallowIncomingTrustline,
|
|
77
77
|
allowTrustLineClawback: xrpl_1.AccountSetAsfFlags.asfAllowTrustLineClawback,
|
|
78
|
+
allowTrustLineLocking: xrpl_1.AccountSetAsfFlags.asfAllowTrustLineLocking,
|
|
78
79
|
tshCollect: XahauAccountSetAsfFlags.asfTshCollect,
|
|
79
80
|
disallowIncomingRemit: XahauAccountSetAsfFlags.asfDisallowIncomingRemit,
|
|
80
81
|
};
|
|
@@ -14,28 +14,28 @@ function parseField(info, value) {
|
|
|
14
14
|
}
|
|
15
15
|
return value;
|
|
16
16
|
}
|
|
17
|
-
function parseFields(
|
|
17
|
+
function parseFields(tx) {
|
|
18
18
|
const settings = {};
|
|
19
19
|
for (const fieldName in account_info_1.AccountFields) {
|
|
20
|
-
const fieldValue =
|
|
20
|
+
const fieldValue = tx[fieldName];
|
|
21
21
|
if (fieldValue != null) {
|
|
22
22
|
const info = account_info_1.AccountFields[fieldName];
|
|
23
23
|
settings[info.name] = parseField(info, fieldValue);
|
|
24
24
|
}
|
|
25
25
|
}
|
|
26
|
-
if (
|
|
27
|
-
settings.
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
26
|
+
if (tx.ClearFlag === account_info_1.AccountSetFlags.authorizedMinter && !settings.nftokenMinter) {
|
|
27
|
+
settings.nftokenMinter = "";
|
|
28
|
+
}
|
|
29
|
+
if (tx.SignerEntries && Array.isArray(tx.SignerEntries) && tx.SignerEntries.length > 0) {
|
|
30
|
+
settings.signerEntries = tx.SignerEntries.map((entry) => {
|
|
31
|
+
return {
|
|
32
|
+
account: entry.SignerEntry.Account,
|
|
33
|
+
signerWeight: entry.SignerEntry.SignerWeight,
|
|
34
|
+
};
|
|
35
|
+
});
|
|
36
|
+
}
|
|
37
|
+
if (tx.SignerQuorum) {
|
|
38
|
+
settings.signerQuorum = tx.SignerQuorum;
|
|
39
39
|
}
|
|
40
40
|
return settings;
|
|
41
41
|
}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
1
|
import { AccountSet, SetRegularKey, SignerListSet } from "xrpl";
|
|
2
|
-
|
|
2
|
+
import { FormattedSettingsSpecification } from "../../types/settings";
|
|
3
|
+
declare function parseSettings(tx: AccountSet | SetRegularKey | SignerListSet, nativeCurrency?: string): FormattedSettingsSpecification;
|
|
3
4
|
export default parseSettings;
|
package/lib/types/settings.d.ts
CHANGED
|
@@ -1,12 +1,5 @@
|
|
|
1
1
|
import { FormattedBaseSpecification } from "./specification";
|
|
2
|
-
|
|
3
|
-
address: string;
|
|
4
|
-
weight: number;
|
|
5
|
-
};
|
|
6
|
-
export type Signers = {
|
|
7
|
-
threshold?: number;
|
|
8
|
-
weights: WeightedSigner[];
|
|
9
|
-
};
|
|
2
|
+
import { FormattedTransactionSigner } from "./signers";
|
|
10
3
|
export type FormattedSettingsSpecification = {
|
|
11
4
|
defaultRipple?: boolean;
|
|
12
5
|
depositAuth?: boolean;
|
|
@@ -26,7 +19,7 @@ export type FormattedSettingsSpecification = {
|
|
|
26
19
|
regularKey?: string;
|
|
27
20
|
requireAuthorization?: boolean;
|
|
28
21
|
requireDestinationTag?: boolean;
|
|
29
|
-
signers?:
|
|
22
|
+
signers?: FormattedTransactionSigner[] | null;
|
|
30
23
|
transferRate?: number | null;
|
|
31
24
|
tickSize?: number;
|
|
32
25
|
nftokenMinter?: string;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bithomp/xrpl-api",
|
|
3
|
-
"version": "3.7.
|
|
3
|
+
"version": "3.7.16",
|
|
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",
|
|
@@ -42,7 +42,7 @@
|
|
|
42
42
|
"format": "prettier --write \"src/**/*.ts\" \"src/**/*.js\"",
|
|
43
43
|
"lint": "eslint",
|
|
44
44
|
"prepare": "npm run build",
|
|
45
|
-
"
|
|
45
|
+
"prepublishOnly": "npm test && npm run lint",
|
|
46
46
|
"preversion": "npm run lint",
|
|
47
47
|
"version": "npm run format && git add -A src",
|
|
48
48
|
"postversion": "git push && git push --tags"
|
|
@@ -69,9 +69,9 @@
|
|
|
69
69
|
"@types/mocha": "^10.0.10",
|
|
70
70
|
"@types/nconf": "^0.10.7",
|
|
71
71
|
"@types/node": "^22.15.21",
|
|
72
|
-
"@typescript-eslint/eslint-plugin": "^8.
|
|
73
|
-
"@typescript-eslint/parser": "^8.
|
|
74
|
-
"chai": "^6.2.
|
|
72
|
+
"@typescript-eslint/eslint-plugin": "^8.47.0",
|
|
73
|
+
"@typescript-eslint/parser": "^8.47.0",
|
|
74
|
+
"chai": "^6.2.1",
|
|
75
75
|
"chai-as-promised": "^8.0.2",
|
|
76
76
|
"eslint": "^9.39.1",
|
|
77
77
|
"eslint-config-prettier": "^10.1.8",
|