ripple-binary-codec 2.1.0 → 4.0.0-mpt-beta
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/dist/enums/definitions.json +103 -12
- package/dist/enums/src/enums/definitions.json +103 -12
- package/dist/src/enums/definitions.json +103 -12
- package/dist/src/types/amount.d.ts +29 -5
- package/dist/src/types/amount.js +85 -8
- package/dist/src/types/amount.js.map +1 -1
- package/dist/src/types/hash-192.d.ts +10 -0
- package/dist/src/types/hash-192.js +19 -0
- package/dist/src/types/hash-192.js.map +1 -0
- package/dist/src/types/index.d.ts +2 -1
- package/dist/src/types/index.js +4 -1
- package/dist/src/types/index.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/types/amount.d.ts +29 -5
- package/dist/types/amount.js +85 -8
- package/dist/types/amount.js.map +1 -1
- package/dist/types/hash-192.d.ts +10 -0
- package/dist/types/hash-192.js +19 -0
- package/dist/types/hash-192.js.map +1 -0
- package/dist/types/index.d.ts +2 -1
- package/dist/types/index.js +4 -1
- package/dist/types/index.js.map +1 -1
- package/package.json +3 -3
- package/src/enums/definitions.json +103 -12
- package/src/types/amount.ts +119 -12
- package/src/types/hash-192.ts +19 -0
- package/src/types/index.ts +3 -0
package/dist/types/amount.js
CHANGED
|
@@ -11,6 +11,7 @@ const serialized_type_1 = require("./serialized-type");
|
|
|
11
11
|
const bignumber_js_1 = __importDefault(require("bignumber.js"));
|
|
12
12
|
const utils_1 = require("@xrplf/isomorphic/utils");
|
|
13
13
|
const utils_2 = require("../utils");
|
|
14
|
+
const hash_192_1 = require("./hash-192");
|
|
14
15
|
/**
|
|
15
16
|
* Constants for validating amounts
|
|
16
17
|
*/
|
|
@@ -20,6 +21,7 @@ const MAX_IOU_PRECISION = 16;
|
|
|
20
21
|
const MAX_DROPS = new bignumber_js_1.default('1e17');
|
|
21
22
|
const MIN_XRP = new bignumber_js_1.default('1e-6');
|
|
22
23
|
const mask = BigInt(0x00000000ffffffff);
|
|
24
|
+
const mptMask = BigInt(0x8000000000000000);
|
|
23
25
|
/**
|
|
24
26
|
* BigNumber configuration for Amount IOUs
|
|
25
27
|
*/
|
|
@@ -30,15 +32,22 @@ bignumber_js_1.default.config({
|
|
|
30
32
|
],
|
|
31
33
|
});
|
|
32
34
|
/**
|
|
33
|
-
* Type guard for
|
|
35
|
+
* Type guard for AmountObjectIOU
|
|
34
36
|
*/
|
|
35
|
-
function
|
|
37
|
+
function isAmountObjectIOU(arg) {
|
|
36
38
|
const keys = Object.keys(arg).sort();
|
|
37
39
|
return (keys.length === 3 &&
|
|
38
40
|
keys[0] === 'currency' &&
|
|
39
41
|
keys[1] === 'issuer' &&
|
|
40
42
|
keys[2] === 'value');
|
|
41
43
|
}
|
|
44
|
+
/**
|
|
45
|
+
* Type guard for AmountObjectMPT
|
|
46
|
+
*/
|
|
47
|
+
function isAmountObjectMPT(arg) {
|
|
48
|
+
const keys = Object.keys(arg).sort();
|
|
49
|
+
return (keys.length === 2 && keys[0] === 'mpt_issuance_id' && keys[1] === 'value');
|
|
50
|
+
}
|
|
42
51
|
/**
|
|
43
52
|
* Class for serializing/Deserializing Amounts
|
|
44
53
|
*/
|
|
@@ -47,7 +56,7 @@ class Amount extends serialized_type_1.SerializedType {
|
|
|
47
56
|
super(bytes !== null && bytes !== void 0 ? bytes : Amount.defaultAmount.bytes);
|
|
48
57
|
}
|
|
49
58
|
/**
|
|
50
|
-
* Construct an amount from an IOU or string amount
|
|
59
|
+
* Construct an amount from an IOU, MPT or string amount
|
|
51
60
|
*
|
|
52
61
|
* @param value An Amount, object representing an IOU, or a string
|
|
53
62
|
* representing an integer amount
|
|
@@ -68,7 +77,7 @@ class Amount extends serialized_type_1.SerializedType {
|
|
|
68
77
|
amount[0] |= 0x40;
|
|
69
78
|
return new Amount(amount);
|
|
70
79
|
}
|
|
71
|
-
if (
|
|
80
|
+
if (isAmountObjectIOU(value)) {
|
|
72
81
|
const number = new bignumber_js_1.default(value.value);
|
|
73
82
|
Amount.assertIouIsValid(number);
|
|
74
83
|
if (number.isZero()) {
|
|
@@ -97,6 +106,18 @@ class Amount extends serialized_type_1.SerializedType {
|
|
|
97
106
|
const issuer = account_id_1.AccountID.from(value.issuer).toBytes();
|
|
98
107
|
return new Amount((0, utils_1.concat)([amount, currency, issuer]));
|
|
99
108
|
}
|
|
109
|
+
if (isAmountObjectMPT(value)) {
|
|
110
|
+
Amount.assertMptIsValid(value.value);
|
|
111
|
+
let leadingByte = new Uint8Array(1);
|
|
112
|
+
leadingByte[0] |= 0x60;
|
|
113
|
+
const num = BigInt(value.value);
|
|
114
|
+
const intBuf = [new Uint8Array(4), new Uint8Array(4)];
|
|
115
|
+
(0, utils_2.writeUInt32BE)(intBuf[0], Number(num >> BigInt(32)), 0);
|
|
116
|
+
(0, utils_2.writeUInt32BE)(intBuf[1], Number(num & BigInt(mask)), 0);
|
|
117
|
+
amount = (0, utils_1.concat)(intBuf);
|
|
118
|
+
const mptIssuanceID = hash_192_1.Hash192.from(value.mpt_issuance_id).toBytes();
|
|
119
|
+
return new Amount((0, utils_1.concat)([leadingByte, amount, mptIssuanceID]));
|
|
120
|
+
}
|
|
100
121
|
throw new Error('Invalid type to construct an Amount');
|
|
101
122
|
}
|
|
102
123
|
/**
|
|
@@ -106,8 +127,12 @@ class Amount extends serialized_type_1.SerializedType {
|
|
|
106
127
|
* @returns An Amount object
|
|
107
128
|
*/
|
|
108
129
|
static fromParser(parser) {
|
|
109
|
-
const
|
|
110
|
-
|
|
130
|
+
const isIOU = parser.peek() & 0x80;
|
|
131
|
+
if (isIOU)
|
|
132
|
+
return new Amount(parser.read(48));
|
|
133
|
+
// the amount can be either MPT or XRP at this point
|
|
134
|
+
const isMPT = parser.peek() & 0x20;
|
|
135
|
+
const numBytes = isMPT ? 33 : 8;
|
|
111
136
|
return new Amount(parser.read(numBytes));
|
|
112
137
|
}
|
|
113
138
|
/**
|
|
@@ -126,7 +151,7 @@ class Amount extends serialized_type_1.SerializedType {
|
|
|
126
151
|
const num = (msb << BigInt(32)) | lsb;
|
|
127
152
|
return `${sign}${num.toString()}`;
|
|
128
153
|
}
|
|
129
|
-
|
|
154
|
+
if (this.isIOU()) {
|
|
130
155
|
const parser = new binary_parser_1.BinaryParser(this.toString());
|
|
131
156
|
const mantissa = parser.read(8);
|
|
132
157
|
const currency = currency_1.Currency.fromParser(parser);
|
|
@@ -146,6 +171,22 @@ class Amount extends serialized_type_1.SerializedType {
|
|
|
146
171
|
issuer: issuer.toJSON(),
|
|
147
172
|
};
|
|
148
173
|
}
|
|
174
|
+
if (this.isMPT()) {
|
|
175
|
+
const parser = new binary_parser_1.BinaryParser(this.toString());
|
|
176
|
+
const leadingByte = parser.read(1);
|
|
177
|
+
const amount = parser.read(8);
|
|
178
|
+
const mptID = hash_192_1.Hash192.fromParser(parser);
|
|
179
|
+
const isPositive = leadingByte[0] & 0x40;
|
|
180
|
+
const sign = isPositive ? '' : '-';
|
|
181
|
+
const msb = BigInt((0, utils_2.readUInt32BE)(amount.slice(0, 4), 0));
|
|
182
|
+
const lsb = BigInt((0, utils_2.readUInt32BE)(amount.slice(4), 0));
|
|
183
|
+
const num = (msb << BigInt(32)) | lsb;
|
|
184
|
+
return {
|
|
185
|
+
value: `${sign}${num.toString()}`,
|
|
186
|
+
mpt_issuance_id: mptID.toString(),
|
|
187
|
+
};
|
|
188
|
+
}
|
|
189
|
+
throw new Error('Invalid amount to construct JSON');
|
|
149
190
|
}
|
|
150
191
|
/**
|
|
151
192
|
* Validate XRP amount
|
|
@@ -182,6 +223,26 @@ class Amount extends serialized_type_1.SerializedType {
|
|
|
182
223
|
this.verifyNoDecimal(decimal);
|
|
183
224
|
}
|
|
184
225
|
}
|
|
226
|
+
/**
|
|
227
|
+
* Validate MPT.value amount
|
|
228
|
+
*
|
|
229
|
+
* @param decimal BigNumber object representing MPT.value
|
|
230
|
+
* @returns void, but will throw if invalid amount
|
|
231
|
+
*/
|
|
232
|
+
static assertMptIsValid(amount) {
|
|
233
|
+
if (amount.indexOf('.') !== -1) {
|
|
234
|
+
throw new Error(`${amount.toString()} is an illegal amount`);
|
|
235
|
+
}
|
|
236
|
+
const decimal = new bignumber_js_1.default(amount);
|
|
237
|
+
if (!decimal.isZero()) {
|
|
238
|
+
if (decimal < (0, bignumber_js_1.default)(0)) {
|
|
239
|
+
throw new Error(`${amount.toString()} is an illegal amount`);
|
|
240
|
+
}
|
|
241
|
+
if (Number(BigInt(amount) & BigInt(mptMask)) != 0) {
|
|
242
|
+
throw new Error(`${amount.toString()} is an illegal amount`);
|
|
243
|
+
}
|
|
244
|
+
}
|
|
245
|
+
}
|
|
185
246
|
/**
|
|
186
247
|
* Ensure that the value after being multiplied by the exponent does not
|
|
187
248
|
* contain a decimal.
|
|
@@ -204,7 +265,23 @@ class Amount extends serialized_type_1.SerializedType {
|
|
|
204
265
|
* @returns true if Native (XRP)
|
|
205
266
|
*/
|
|
206
267
|
isNative() {
|
|
207
|
-
return (this.bytes[0] & 0x80) === 0;
|
|
268
|
+
return (this.bytes[0] & 0x80) === 0 && (this.bytes[0] & 0x20) === 0;
|
|
269
|
+
}
|
|
270
|
+
/**
|
|
271
|
+
* Test if this amount is in units of MPT
|
|
272
|
+
*
|
|
273
|
+
* @returns true if MPT
|
|
274
|
+
*/
|
|
275
|
+
isMPT() {
|
|
276
|
+
return (this.bytes[0] & 0x80) === 0 && (this.bytes[0] & 0x20) !== 0;
|
|
277
|
+
}
|
|
278
|
+
/**
|
|
279
|
+
* Test if this amount is in units of IOU
|
|
280
|
+
*
|
|
281
|
+
* @returns true if IOU
|
|
282
|
+
*/
|
|
283
|
+
isIOU() {
|
|
284
|
+
return (this.bytes[0] & 0x80) !== 0;
|
|
208
285
|
}
|
|
209
286
|
}
|
|
210
287
|
exports.Amount = Amount;
|
package/dist/types/amount.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"amount.js","sourceRoot":"","sources":["../../src/types/amount.ts"],"names":[],"mappings":";;;;;;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,CAAA;IACrE,CAAC;IAED;;;;OAIG;IACK,KAAK;QACX,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,GAAG,IAAI,CAAC,KAAK,CAAC,CAAA;IACrC,CAAC;;AAGM,wBAAM;AA7RN,oBAAa,GAAW,IAAI,MAAM,CAAC,IAAA,kBAAU,EAAC,kBAAkB,CAAC,CAAC,CAAA"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Hash192 = void 0;
|
|
4
|
+
const hash_1 = require("./hash");
|
|
5
|
+
/**
|
|
6
|
+
* Hash with a width of 192 bits
|
|
7
|
+
*/
|
|
8
|
+
class Hash192 extends hash_1.Hash {
|
|
9
|
+
constructor(bytes) {
|
|
10
|
+
if (bytes && bytes.byteLength === 0) {
|
|
11
|
+
bytes = Hash192.ZERO_192.bytes;
|
|
12
|
+
}
|
|
13
|
+
super(bytes !== null && bytes !== void 0 ? bytes : Hash192.ZERO_192.bytes);
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
exports.Hash192 = Hash192;
|
|
17
|
+
Hash192.width = 24;
|
|
18
|
+
Hash192.ZERO_192 = new Hash192(new Uint8Array(Hash192.width));
|
|
19
|
+
//# sourceMappingURL=hash-192.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"hash-192.js","sourceRoot":"","sources":["../../src/types/hash-192.ts"],"names":[],"mappings":";;;AAAA,iCAA6B;AAE7B;;GAEG;AACH,MAAM,OAAQ,SAAQ,WAAI;IAIxB,YAAY,KAAkB;QAC5B,IAAI,KAAK,IAAI,KAAK,CAAC,UAAU,KAAK,CAAC,EAAE;YACnC,KAAK,GAAG,OAAO,CAAC,QAAQ,CAAC,KAAK,CAAA;SAC/B;QAED,KAAK,CAAC,KAAK,aAAL,KAAK,cAAL,KAAK,GAAI,OAAO,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAA;IACxC,CAAC;;AAGM,0BAAO;AAZE,aAAK,GAAG,EAAE,CAAA;AACV,gBAAQ,GAAY,IAAI,OAAO,CAAC,IAAI,UAAU,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,CAAA"}
|
package/dist/types/index.d.ts
CHANGED
|
@@ -4,6 +4,7 @@ import { Blob } from './blob';
|
|
|
4
4
|
import { Currency } from './currency';
|
|
5
5
|
import { Hash128 } from './hash-128';
|
|
6
6
|
import { Hash160 } from './hash-160';
|
|
7
|
+
import { Hash192 } from './hash-192';
|
|
7
8
|
import { Hash256 } from './hash-256';
|
|
8
9
|
import { PathSet } from './path-set';
|
|
9
10
|
import { STArray } from './st-array';
|
|
@@ -15,4 +16,4 @@ import { UInt8 } from './uint-8';
|
|
|
15
16
|
import { Vector256 } from './vector-256';
|
|
16
17
|
import { type SerializedType } from './serialized-type';
|
|
17
18
|
declare const coreTypes: Record<string, typeof SerializedType>;
|
|
18
|
-
export { coreTypes, AccountID, Amount, Blob, Currency, Hash128, Hash160, Hash256, PathSet, STArray, STObject, UInt8, UInt16, UInt32, UInt64, Vector256, };
|
|
19
|
+
export { coreTypes, AccountID, Amount, Blob, Currency, Hash128, Hash160, Hash192, Hash256, PathSet, STArray, STObject, UInt8, UInt16, UInt32, UInt64, Vector256, };
|
package/dist/types/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.Vector256 = exports.UInt64 = exports.UInt32 = exports.UInt16 = exports.UInt8 = exports.STObject = exports.STArray = exports.PathSet = exports.Hash256 = exports.Hash160 = exports.Hash128 = exports.Currency = exports.Blob = exports.Amount = exports.AccountID = exports.coreTypes = void 0;
|
|
3
|
+
exports.Vector256 = exports.UInt64 = exports.UInt32 = exports.UInt16 = exports.UInt8 = exports.STObject = exports.STArray = exports.PathSet = exports.Hash256 = exports.Hash192 = exports.Hash160 = exports.Hash128 = exports.Currency = exports.Blob = exports.Amount = exports.AccountID = exports.coreTypes = void 0;
|
|
4
4
|
const account_id_1 = require("./account-id");
|
|
5
5
|
Object.defineProperty(exports, "AccountID", { enumerable: true, get: function () { return account_id_1.AccountID; } });
|
|
6
6
|
const amount_1 = require("./amount");
|
|
@@ -13,6 +13,8 @@ const hash_128_1 = require("./hash-128");
|
|
|
13
13
|
Object.defineProperty(exports, "Hash128", { enumerable: true, get: function () { return hash_128_1.Hash128; } });
|
|
14
14
|
const hash_160_1 = require("./hash-160");
|
|
15
15
|
Object.defineProperty(exports, "Hash160", { enumerable: true, get: function () { return hash_160_1.Hash160; } });
|
|
16
|
+
const hash_192_1 = require("./hash-192");
|
|
17
|
+
Object.defineProperty(exports, "Hash192", { enumerable: true, get: function () { return hash_192_1.Hash192; } });
|
|
16
18
|
const hash_256_1 = require("./hash-256");
|
|
17
19
|
Object.defineProperty(exports, "Hash256", { enumerable: true, get: function () { return hash_256_1.Hash256; } });
|
|
18
20
|
const issue_1 = require("./issue");
|
|
@@ -41,6 +43,7 @@ const coreTypes = {
|
|
|
41
43
|
Currency: currency_1.Currency,
|
|
42
44
|
Hash128: hash_128_1.Hash128,
|
|
43
45
|
Hash160: hash_160_1.Hash160,
|
|
46
|
+
Hash192: hash_192_1.Hash192,
|
|
44
47
|
Hash256: hash_256_1.Hash256,
|
|
45
48
|
Issue: issue_1.Issue,
|
|
46
49
|
PathSet: path_set_1.PathSet,
|
package/dist/types/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/types/index.ts"],"names":[],"mappings":";;;AAAA,6CAAwC;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/types/index.ts"],"names":[],"mappings":";;;AAAA,6CAAwC;AAiDtC,0FAjDO,sBAAS,OAiDP;AAhDX,qCAAiC;AAiD/B,uFAjDO,eAAM,OAiDP;AAhDR,iCAA6B;AAiD3B,qFAjDO,WAAI,OAiD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CAAC,CAAA"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "ripple-binary-codec",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "4.0.0-mpt-beta",
|
|
4
4
|
"description": "XRP Ledger binary codec",
|
|
5
5
|
"files": [
|
|
6
6
|
"dist/*",
|
|
@@ -41,7 +41,7 @@
|
|
|
41
41
|
"readmeFilename": "README.md",
|
|
42
42
|
"prettier": "@xrplf/prettier-config",
|
|
43
43
|
"engines": {
|
|
44
|
-
"node": ">=
|
|
44
|
+
"node": ">= 18"
|
|
45
45
|
},
|
|
46
|
-
"gitHead": "
|
|
46
|
+
"gitHead": "ef82f86f2540baef46b62aef7d1aa594d8f73591"
|
|
47
47
|
}
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
"PathSet": 18,
|
|
19
19
|
"Vector256": 19,
|
|
20
20
|
"UInt96": 20,
|
|
21
|
-
"
|
|
21
|
+
"Hash192": 21,
|
|
22
22
|
"UInt384": 22,
|
|
23
23
|
"UInt512": 23,
|
|
24
24
|
"Issue": 24,
|
|
@@ -53,6 +53,8 @@
|
|
|
53
53
|
"AMM": 121,
|
|
54
54
|
"DID": 73,
|
|
55
55
|
"Oracle": 128,
|
|
56
|
+
"MPTokenIssuance": 126,
|
|
57
|
+
"MPToken": 127,
|
|
56
58
|
"Any": -3,
|
|
57
59
|
"Child": -2,
|
|
58
60
|
"Nickname": 110,
|
|
@@ -260,6 +262,16 @@
|
|
|
260
262
|
"type": "UInt8"
|
|
261
263
|
}
|
|
262
264
|
],
|
|
265
|
+
[
|
|
266
|
+
"AssetScale",
|
|
267
|
+
{
|
|
268
|
+
"nth": 20,
|
|
269
|
+
"isVLEncoded": false,
|
|
270
|
+
"isSerialized": true,
|
|
271
|
+
"isSigningField": true,
|
|
272
|
+
"type": "UInt8"
|
|
273
|
+
}
|
|
274
|
+
],
|
|
263
275
|
[
|
|
264
276
|
"LedgerEntryType",
|
|
265
277
|
{
|
|
@@ -1070,6 +1082,46 @@
|
|
|
1070
1082
|
"type": "UInt64"
|
|
1071
1083
|
}
|
|
1072
1084
|
],
|
|
1085
|
+
[
|
|
1086
|
+
"MaximumAmount",
|
|
1087
|
+
{
|
|
1088
|
+
"nth": 24,
|
|
1089
|
+
"isVLEncoded": false,
|
|
1090
|
+
"isSerialized": true,
|
|
1091
|
+
"isSigningField": true,
|
|
1092
|
+
"type": "UInt64"
|
|
1093
|
+
}
|
|
1094
|
+
],
|
|
1095
|
+
[
|
|
1096
|
+
"OutstandingAmount",
|
|
1097
|
+
{
|
|
1098
|
+
"nth": 25,
|
|
1099
|
+
"isVLEncoded": false,
|
|
1100
|
+
"isSerialized": true,
|
|
1101
|
+
"isSigningField": true,
|
|
1102
|
+
"type": "UInt64"
|
|
1103
|
+
}
|
|
1104
|
+
],
|
|
1105
|
+
[
|
|
1106
|
+
"LockedAmount",
|
|
1107
|
+
{
|
|
1108
|
+
"nth": 26,
|
|
1109
|
+
"isVLEncoded": false,
|
|
1110
|
+
"isSerialized": true,
|
|
1111
|
+
"isSigningField": true,
|
|
1112
|
+
"type": "UInt64"
|
|
1113
|
+
}
|
|
1114
|
+
],
|
|
1115
|
+
[
|
|
1116
|
+
"MPTAmount",
|
|
1117
|
+
{
|
|
1118
|
+
"nth": 27,
|
|
1119
|
+
"isVLEncoded": false,
|
|
1120
|
+
"isSerialized": true,
|
|
1121
|
+
"isSigningField": true,
|
|
1122
|
+
"type": "UInt64"
|
|
1123
|
+
}
|
|
1124
|
+
],
|
|
1073
1125
|
[
|
|
1074
1126
|
"EmailHash",
|
|
1075
1127
|
{
|
|
@@ -1120,6 +1172,16 @@
|
|
|
1120
1172
|
"type": "Hash160"
|
|
1121
1173
|
}
|
|
1122
1174
|
],
|
|
1175
|
+
[
|
|
1176
|
+
"MPTokenIssuanceID",
|
|
1177
|
+
{
|
|
1178
|
+
"nth": 1,
|
|
1179
|
+
"isVLEncoded": false,
|
|
1180
|
+
"isSerialized": true,
|
|
1181
|
+
"isSigningField": true,
|
|
1182
|
+
"type": "Hash192"
|
|
1183
|
+
}
|
|
1184
|
+
],
|
|
1123
1185
|
[
|
|
1124
1186
|
"LedgerHash",
|
|
1125
1187
|
{
|
|
@@ -1980,6 +2042,16 @@
|
|
|
1980
2042
|
"type": "Blob"
|
|
1981
2043
|
}
|
|
1982
2044
|
],
|
|
2045
|
+
[
|
|
2046
|
+
"MPTokenMetadata",
|
|
2047
|
+
{
|
|
2048
|
+
"nth": 30,
|
|
2049
|
+
"isVLEncoded": true,
|
|
2050
|
+
"isSerialized": true,
|
|
2051
|
+
"isSigningField": true,
|
|
2052
|
+
"type": "Blob"
|
|
2053
|
+
}
|
|
2054
|
+
],
|
|
1983
2055
|
[
|
|
1984
2056
|
"Account",
|
|
1985
2057
|
{
|
|
@@ -2070,6 +2142,16 @@
|
|
|
2070
2142
|
"type": "AccountID"
|
|
2071
2143
|
}
|
|
2072
2144
|
],
|
|
2145
|
+
[
|
|
2146
|
+
"MPTokenHolder",
|
|
2147
|
+
{
|
|
2148
|
+
"nth": 11,
|
|
2149
|
+
"isVLEncoded": true,
|
|
2150
|
+
"isSerialized": true,
|
|
2151
|
+
"isSigningField": true,
|
|
2152
|
+
"type": "AccountID"
|
|
2153
|
+
}
|
|
2154
|
+
],
|
|
2073
2155
|
[
|
|
2074
2156
|
"HookAccount",
|
|
2075
2157
|
{
|
|
@@ -2798,16 +2880,17 @@
|
|
|
2798
2880
|
"temUNKNOWN": -264,
|
|
2799
2881
|
"temSEQ_AND_TICKET": -263,
|
|
2800
2882
|
"temBAD_NFTOKEN_TRANSFER_FEE": -262,
|
|
2801
|
-
"
|
|
2802
|
-
"
|
|
2803
|
-
"
|
|
2804
|
-
"
|
|
2805
|
-
"
|
|
2806
|
-
"
|
|
2807
|
-
"
|
|
2808
|
-
"
|
|
2809
|
-
"
|
|
2810
|
-
"
|
|
2883
|
+
"temBAD_MPTOKEN_TRANSFER_FEE": -261,
|
|
2884
|
+
"temBAD_AMM_TOKENS": -260,
|
|
2885
|
+
"temXCHAIN_EQUAL_DOOR_ACCOUNTS": -259,
|
|
2886
|
+
"temXCHAIN_BAD_PROOF": -258,
|
|
2887
|
+
"temXCHAIN_BRIDGE_BAD_ISSUES": -257,
|
|
2888
|
+
"temXCHAIN_BRIDGE_NONDOOR_OWNER": -256,
|
|
2889
|
+
"temXCHAIN_BRIDGE_BAD_MIN_ACCOUNT_CREATE_AMOUNT": -255,
|
|
2890
|
+
"temXCHAIN_BRIDGE_BAD_REWARD_AMOUNT": -254,
|
|
2891
|
+
"temEMPTY_DID": -253,
|
|
2892
|
+
"temARRAY_EMPTY": -252,
|
|
2893
|
+
"temARRAY_TOO_LARGE": -251,
|
|
2811
2894
|
|
|
2812
2895
|
"tefFAILURE": -199,
|
|
2813
2896
|
"tefALREADY": -198,
|
|
@@ -2923,7 +3006,11 @@
|
|
|
2923
3006
|
"tecINVALID_UPDATE_TIME": 188,
|
|
2924
3007
|
"tecTOKEN_PAIR_NOT_FOUND": 189,
|
|
2925
3008
|
"tecARRAY_EMPTY": 190,
|
|
2926
|
-
"tecARRAY_TOO_LARGE": 191
|
|
3009
|
+
"tecARRAY_TOO_LARGE": 191,
|
|
3010
|
+
"tecMPTOKEN_EXISTS": 192,
|
|
3011
|
+
"tecMPT_MAX_AMOUNT_EXCEEDED": 193,
|
|
3012
|
+
"tecMPT_LOCKED": 194,
|
|
3013
|
+
"tecMPT_NOT_SUPPORTED": 195
|
|
2927
3014
|
},
|
|
2928
3015
|
"TRANSACTION_TYPES": {
|
|
2929
3016
|
"Invalid": -1,
|
|
@@ -2974,6 +3061,10 @@
|
|
|
2974
3061
|
"DIDDelete": 50,
|
|
2975
3062
|
"OracleSet": 51,
|
|
2976
3063
|
"OracleDelete": 52,
|
|
3064
|
+
"MPTokenIssuanceCreate": 53,
|
|
3065
|
+
"MPTokenIssuanceDestroy": 54,
|
|
3066
|
+
"MPTokenAuthorize": 55,
|
|
3067
|
+
"MPTokenIssuanceSet": 56,
|
|
2977
3068
|
"EnableAmendment": 100,
|
|
2978
3069
|
"SetFee": 101,
|
|
2979
3070
|
"UNLModify": 102
|