@airgap/coinlib-core 0.12.10-beta.0 → 0.12.10-beta.1
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/airgap-coinlib-core.min.js +4 -32
- package/package.json +1 -1
- package/protocols/substrate/common/data/account/SubstrateAccountInfo.d.ts +0 -1
- package/protocols/substrate/common/data/account/SubstrateAccountInfo.js +3 -31
- package/protocols/substrate/common/data/account/SubstrateAccountInfo.js.map +1 -1
|
@@ -135170,8 +135170,6 @@ exports.SubstrateBlockExplorerClient = SubstrateBlockExplorerClient;
|
|
|
135170
135170
|
"use strict";
|
|
135171
135171
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
135172
135172
|
exports.SubstrateAccountInfo = void 0;
|
|
135173
|
-
// tslint:disable: max-classes-per-file
|
|
135174
|
-
var SubstrateNetwork_1 = require("../../../SubstrateNetwork");
|
|
135175
135173
|
var SCALEDecoder_1 = require("../scale/SCALEDecoder");
|
|
135176
135174
|
var SubstrateAccountData = /** @class */ (function () {
|
|
135177
135175
|
function SubstrateAccountData(free, reserved, miscFrozen, feeFrozen) {
|
|
@@ -135203,44 +135201,18 @@ var SubstrateAccountInfo = /** @class */ (function () {
|
|
|
135203
135201
|
}
|
|
135204
135202
|
SubstrateAccountInfo.decode = function (network, runtimeVersion, raw) {
|
|
135205
135203
|
var decoder = new SCALEDecoder_1.SCALEDecoder(network, runtimeVersion, raw);
|
|
135206
|
-
var lengths = this.migrateFieldLengths(network, runtimeVersion);
|
|
135207
135204
|
var nonce = decoder.decodeNextInt(32);
|
|
135208
|
-
var consumers = decoder.decodeNextInt(
|
|
135209
|
-
var providers = decoder.decodeNextInt(
|
|
135210
|
-
var sufficients = decoder.decodeNextInt(
|
|
135205
|
+
var consumers = decoder.decodeNextInt(32);
|
|
135206
|
+
var providers = decoder.decodeNextInt(32);
|
|
135207
|
+
var sufficients = decoder.decodeNextInt(32);
|
|
135211
135208
|
var data = decoder.decodeNextObject(SubstrateAccountData.decode);
|
|
135212
135209
|
return new SubstrateAccountInfo(nonce.decoded, consumers.decoded, providers.decoded, sufficients.decoded, data.decoded);
|
|
135213
135210
|
};
|
|
135214
|
-
SubstrateAccountInfo.migrateFieldLengths = function (network, runtimeVersion) {
|
|
135215
|
-
if (runtimeVersion === undefined) {
|
|
135216
|
-
return {
|
|
135217
|
-
consumers: 32,
|
|
135218
|
-
providers: 32,
|
|
135219
|
-
sufficients: 32
|
|
135220
|
-
};
|
|
135221
|
-
}
|
|
135222
|
-
if ((network === SubstrateNetwork_1.SubstrateNetwork.KUSAMA && runtimeVersion >= 2030) ||
|
|
135223
|
-
(network === SubstrateNetwork_1.SubstrateNetwork.POLKADOT && runtimeVersion >= 30) ||
|
|
135224
|
-
(network === SubstrateNetwork_1.SubstrateNetwork.MOONBEAM && runtimeVersion >= 30)) {
|
|
135225
|
-
return {
|
|
135226
|
-
consumers: 32,
|
|
135227
|
-
providers: 32,
|
|
135228
|
-
sufficients: 32
|
|
135229
|
-
};
|
|
135230
|
-
}
|
|
135231
|
-
else {
|
|
135232
|
-
return {
|
|
135233
|
-
consumers: 32,
|
|
135234
|
-
providers: 32,
|
|
135235
|
-
sufficients: 0
|
|
135236
|
-
};
|
|
135237
|
-
}
|
|
135238
|
-
};
|
|
135239
135211
|
return SubstrateAccountInfo;
|
|
135240
135212
|
}());
|
|
135241
135213
|
exports.SubstrateAccountInfo = SubstrateAccountInfo;
|
|
135242
135214
|
|
|
135243
|
-
},{"
|
|
135215
|
+
},{"../scale/SCALEDecoder":580}],539:[function(require,module,exports){
|
|
135244
135216
|
(function (Buffer){(function (){
|
|
135245
135217
|
"use strict";
|
|
135246
135218
|
Object.defineProperty(exports, "__esModule", { value: true });
|
package/package.json
CHANGED
|
@@ -16,7 +16,6 @@ export declare class SubstrateAccountInfo {
|
|
|
16
16
|
readonly sufficients: SCALEInt;
|
|
17
17
|
readonly data: SubstrateAccountData;
|
|
18
18
|
static decode(network: SubstrateNetwork, runtimeVersion: number | undefined, raw: string): SubstrateAccountInfo;
|
|
19
|
-
private static migrateFieldLengths;
|
|
20
19
|
private constructor();
|
|
21
20
|
}
|
|
22
21
|
export {};
|
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.SubstrateAccountInfo = void 0;
|
|
4
|
-
// tslint:disable: max-classes-per-file
|
|
5
|
-
var SubstrateNetwork_1 = require("../../../SubstrateNetwork");
|
|
6
4
|
var SCALEDecoder_1 = require("../scale/SCALEDecoder");
|
|
7
5
|
var SubstrateAccountData = /** @class */ (function () {
|
|
8
6
|
function SubstrateAccountData(free, reserved, miscFrozen, feeFrozen) {
|
|
@@ -34,39 +32,13 @@ var SubstrateAccountInfo = /** @class */ (function () {
|
|
|
34
32
|
}
|
|
35
33
|
SubstrateAccountInfo.decode = function (network, runtimeVersion, raw) {
|
|
36
34
|
var decoder = new SCALEDecoder_1.SCALEDecoder(network, runtimeVersion, raw);
|
|
37
|
-
var lengths = this.migrateFieldLengths(network, runtimeVersion);
|
|
38
35
|
var nonce = decoder.decodeNextInt(32);
|
|
39
|
-
var consumers = decoder.decodeNextInt(
|
|
40
|
-
var providers = decoder.decodeNextInt(
|
|
41
|
-
var sufficients = decoder.decodeNextInt(
|
|
36
|
+
var consumers = decoder.decodeNextInt(32);
|
|
37
|
+
var providers = decoder.decodeNextInt(32);
|
|
38
|
+
var sufficients = decoder.decodeNextInt(32);
|
|
42
39
|
var data = decoder.decodeNextObject(SubstrateAccountData.decode);
|
|
43
40
|
return new SubstrateAccountInfo(nonce.decoded, consumers.decoded, providers.decoded, sufficients.decoded, data.decoded);
|
|
44
41
|
};
|
|
45
|
-
SubstrateAccountInfo.migrateFieldLengths = function (network, runtimeVersion) {
|
|
46
|
-
if (runtimeVersion === undefined) {
|
|
47
|
-
return {
|
|
48
|
-
consumers: 32,
|
|
49
|
-
providers: 32,
|
|
50
|
-
sufficients: 32
|
|
51
|
-
};
|
|
52
|
-
}
|
|
53
|
-
if ((network === SubstrateNetwork_1.SubstrateNetwork.KUSAMA && runtimeVersion >= 2030) ||
|
|
54
|
-
(network === SubstrateNetwork_1.SubstrateNetwork.POLKADOT && runtimeVersion >= 30) ||
|
|
55
|
-
(network === SubstrateNetwork_1.SubstrateNetwork.MOONBEAM && runtimeVersion >= 30)) {
|
|
56
|
-
return {
|
|
57
|
-
consumers: 32,
|
|
58
|
-
providers: 32,
|
|
59
|
-
sufficients: 32
|
|
60
|
-
};
|
|
61
|
-
}
|
|
62
|
-
else {
|
|
63
|
-
return {
|
|
64
|
-
consumers: 32,
|
|
65
|
-
providers: 32,
|
|
66
|
-
sufficients: 0
|
|
67
|
-
};
|
|
68
|
-
}
|
|
69
|
-
};
|
|
70
42
|
return SubstrateAccountInfo;
|
|
71
43
|
}());
|
|
72
44
|
exports.SubstrateAccountInfo = SubstrateAccountInfo;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SubstrateAccountInfo.js","sourceRoot":"","sources":["../../../../../../src/protocols/substrate/common/data/account/SubstrateAccountInfo.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"SubstrateAccountInfo.js","sourceRoot":"","sources":["../../../../../../src/protocols/substrate/common/data/account/SubstrateAccountInfo.ts"],"names":[],"mappings":";;;AAEA,sDAAuE;AAGvE;IAmBE,8BAA6B,IAAc,EAAW,QAAkB,EAAW,UAAoB,EAAW,SAAmB;QAAxG,SAAI,GAAJ,IAAI,CAAU;QAAW,aAAQ,GAAR,QAAQ,CAAU;QAAW,eAAU,GAAV,UAAU,CAAU;QAAW,cAAS,GAAT,SAAS,CAAU;IAAG,CAAC;IAlB3H,2BAAM,GAApB,UACE,OAAgB,EAChB,cAAkC,EAClC,GAAW;QAEX,IAAM,OAAO,GAAG,IAAI,2BAAY,CAAC,OAAO,EAAE,cAAc,EAAE,GAAG,CAAC,CAAA;QAE9D,IAAM,IAAI,GAAG,OAAO,CAAC,aAAa,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