@bithomp/xrpl-api 2.3.6 → 2.3.10
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/connection.js +1 -1
- package/lib/models/account_nfts.d.ts +1 -0
- package/lib/models/account_nfts.js +10 -1
- package/lib/wallet.d.ts +2 -2
- package/lib/wallet.js +4 -1
- package/package.json +2 -2
package/lib/connection.js
CHANGED
|
@@ -96,7 +96,7 @@ class Connection extends events_1.EventEmitter {
|
|
|
96
96
|
}
|
|
97
97
|
async submit(transaction) {
|
|
98
98
|
try {
|
|
99
|
-
return await this.request({ command: "submit", tx_blob: transaction
|
|
99
|
+
return await this.request({ command: "submit", tx_blob: transaction });
|
|
100
100
|
}
|
|
101
101
|
catch (err) {
|
|
102
102
|
this.updateLatency(1000);
|
|
@@ -17,3 +17,4 @@ export interface AccountNFTokenInterface {
|
|
|
17
17
|
export declare function sortHelperAccountNFToken(a: AccountNFTokenInterface, b: AccountNFTokenInterface): SortDirection;
|
|
18
18
|
export declare function cipheredTaxon(tokenSeq: number, taxon: number): number;
|
|
19
19
|
export declare function parseNFTokenID(nftokenID: string): NFTokenInterface | null;
|
|
20
|
+
export declare function buildNFTokenID(flags: number, transferFee: number, issuer: string, taxon: number, sequence: number): string;
|
|
@@ -3,7 +3,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.parseNFTokenID = exports.cipheredTaxon = exports.sortHelperAccountNFToken = void 0;
|
|
6
|
+
exports.buildNFTokenID = exports.parseNFTokenID = exports.cipheredTaxon = exports.sortHelperAccountNFToken = void 0;
|
|
7
7
|
const bignumber_js_1 = __importDefault(require("bignumber.js"));
|
|
8
8
|
const AddressCodec = require("ripple-address-codec");
|
|
9
9
|
function sortHelperAccountNFToken(a, b) {
|
|
@@ -43,3 +43,12 @@ function parseNFTokenID(nftokenID) {
|
|
|
43
43
|
};
|
|
44
44
|
}
|
|
45
45
|
exports.parseNFTokenID = parseNFTokenID;
|
|
46
|
+
function buildNFTokenID(flags, transferFee, issuer, taxon, sequence) {
|
|
47
|
+
const scrambledTaxon = cipheredTaxon(sequence, taxon);
|
|
48
|
+
return (new bignumber_js_1.default(flags).toString(16).padStart(4, "0").toUpperCase() +
|
|
49
|
+
new bignumber_js_1.default(transferFee).toString(16).padStart(4, "0").toUpperCase() +
|
|
50
|
+
AddressCodec.decodeAccountID(issuer).toString("hex").toUpperCase() +
|
|
51
|
+
new bignumber_js_1.default(scrambledTaxon).toString(16).padStart(8, "0").toUpperCase() +
|
|
52
|
+
new bignumber_js_1.default(sequence).toString(16).padStart(8, "0").toUpperCase());
|
|
53
|
+
}
|
|
54
|
+
exports.buildNFTokenID = buildNFTokenID;
|
package/lib/wallet.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/// <reference types="node" />
|
|
2
2
|
import { Wallet, Transaction } from "xrpl";
|
|
3
|
-
import { XrplDefinitionsBase } from "ripple-binary-codec";
|
|
3
|
+
import { XrplDefinitionsBase, XrplDefinitions, DEFAULT_DEFINITIONS } from "ripple-binary-codec";
|
|
4
4
|
interface GenerateAddressInterface {
|
|
5
5
|
publicKey: string;
|
|
6
6
|
privateKey: string;
|
|
@@ -14,4 +14,4 @@ export declare function singTransaction(wallet: Wallet, transaction: Transaction
|
|
|
14
14
|
tx_blob: string;
|
|
15
15
|
hash: string;
|
|
16
16
|
};
|
|
17
|
-
export {};
|
|
17
|
+
export { XrplDefinitionsBase, XrplDefinitions, DEFAULT_DEFINITIONS };
|
package/lib/wallet.js
CHANGED
|
@@ -26,13 +26,16 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
26
26
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
27
27
|
};
|
|
28
28
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
29
|
-
exports.singTransaction = exports.checksumClassicAddress = exports.isValidClassicAddress = exports.generateAddress = void 0;
|
|
29
|
+
exports.DEFAULT_DEFINITIONS = exports.XrplDefinitions = exports.XrplDefinitionsBase = exports.singTransaction = exports.checksumClassicAddress = exports.isValidClassicAddress = exports.generateAddress = void 0;
|
|
30
30
|
const bignumber_js_1 = __importDefault(require("bignumber.js"));
|
|
31
31
|
const omitBy_1 = __importDefault(require("lodash/omitBy"));
|
|
32
32
|
const Crypto = __importStar(require("crypto"));
|
|
33
33
|
const xrpl_1 = require("xrpl");
|
|
34
34
|
const ripple_address_codec_1 = require("ripple-address-codec");
|
|
35
35
|
const ripple_binary_codec_1 = require("ripple-binary-codec");
|
|
36
|
+
Object.defineProperty(exports, "XrplDefinitionsBase", { enumerable: true, get: function () { return ripple_binary_codec_1.XrplDefinitionsBase; } });
|
|
37
|
+
Object.defineProperty(exports, "XrplDefinitions", { enumerable: true, get: function () { return ripple_binary_codec_1.XrplDefinitions; } });
|
|
38
|
+
Object.defineProperty(exports, "DEFAULT_DEFINITIONS", { enumerable: true, get: function () { return ripple_binary_codec_1.DEFAULT_DEFINITIONS; } });
|
|
36
39
|
const ripple_keypairs_1 = require("ripple-keypairs");
|
|
37
40
|
const Base58 = __importStar(require("./base58"));
|
|
38
41
|
const common_1 = require("./common");
|
package/package.json
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bithomp/xrpl-api",
|
|
3
|
-
"version": "2.3.
|
|
3
|
+
"version": "2.3.10",
|
|
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",
|
|
7
7
|
"author": "Bithomp AB",
|
|
8
8
|
"license": "GPL-3.0",
|
|
9
9
|
"-publishConfig": {
|
|
10
|
-
"
|
|
10
|
+
"registry": "https://npm.pkg.github.com/"
|
|
11
11
|
},
|
|
12
12
|
"repository": {
|
|
13
13
|
"type": "git",
|