@airgap/astar 0.13.45-beta.2 → 0.13.45-beta.3
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/package.json +5 -5
- package/v0/index.js +6 -6
- package/v0/index.js.map +1 -1
- package/v0/protocol/astar/AstarProtocol.js +21 -40
- package/v0/protocol/astar/AstarProtocol.js.map +1 -1
- package/v0/protocol/astar/AstarProtocolOptions.js +39 -79
- package/v0/protocol/astar/AstarProtocolOptions.js.map +1 -1
- package/v0/protocol/shiden/ShidenProtocol.js +18 -37
- package/v0/protocol/shiden/ShidenProtocol.js.map +1 -1
- package/v0/protocol/shiden/ShidenProtocolOptions.js +30 -66
- package/v0/protocol/shiden/ShidenProtocolOptions.js.map +1 -1
- package/v1/controller/AstarAccountController.js +3 -23
- package/v1/controller/AstarAccountController.js.map +1 -1
- package/v1/controller/AstarTransactionController.js +3 -23
- package/v1/controller/AstarTransactionController.js.map +1 -1
- package/v1/index.js +3 -3
- package/v1/index.js.map +1 -1
- package/v1/module/AstarModule.d.ts +1 -1
- package/v1/module/AstarModule.js +40 -98
- package/v1/module/AstarModule.js.map +1 -1
- package/v1/module.js +2 -3
- package/v1/module.js.map +1 -1
- package/v1/node/AstarNodeClient.js +3 -23
- package/v1/node/AstarNodeClient.js.map +1 -1
- package/v1/protocol/AstarBaseProtocol.js +26 -88
- package/v1/protocol/AstarBaseProtocol.js.map +1 -1
- package/v1/protocol/AstarProtocol.js +18 -49
- package/v1/protocol/AstarProtocol.js.map +1 -1
- package/v1/protocol/ShidenProtocol.js +19 -50
- package/v1/protocol/ShidenProtocol.js.map +1 -1
- package/v1/serializer/v3/schemas/converter/transaction-converter.js +5 -6
- package/v1/serializer/v3/schemas/converter/transaction-converter.js.map +1 -1
- package/v1/serializer/v3/serializer-companion.js +75 -154
- package/v1/serializer/v3/serializer-companion.js.map +1 -1
- package/v1/serializer/v3/validators/transaction-validator.js +3 -23
- package/v1/serializer/v3/validators/transaction-validator.js.map +1 -1
- package/v1/serializer/v3/validators/validators.js +1 -1
- package/v1/serializer/v3/validators/validators.js.map +1 -1
- package/v1/types/configuration.d.ts +1 -1
- package/v1/types/crypto.d.ts +1 -1
- package/v1/types/protocol.d.ts +2 -2
|
@@ -1,21 +1,20 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
4
|
-
|
|
3
|
+
exports.astarUnsignedTransactionToRequest = astarUnsignedTransactionToRequest;
|
|
4
|
+
exports.astarSignedTransactionToResponse = astarSignedTransactionToResponse;
|
|
5
|
+
exports.astarTransactionSignRequestToUnsigned = astarTransactionSignRequestToUnsigned;
|
|
6
|
+
exports.astarTransactionSignResponseToSigned = astarTransactionSignResponseToSigned;
|
|
7
|
+
const v1_1 = require("@airgap/substrate/v1");
|
|
5
8
|
function astarUnsignedTransactionToRequest(unsigned, publicKey, callbackUrl) {
|
|
6
9
|
return (0, v1_1.substrateUnsignedTransactionToRequest)(unsigned, publicKey, callbackUrl);
|
|
7
10
|
}
|
|
8
|
-
exports.astarUnsignedTransactionToRequest = astarUnsignedTransactionToRequest;
|
|
9
11
|
function astarSignedTransactionToResponse(signed, accountIdentifier) {
|
|
10
12
|
return (0, v1_1.substrateSignedTransactionToResponse)(signed, accountIdentifier);
|
|
11
13
|
}
|
|
12
|
-
exports.astarSignedTransactionToResponse = astarSignedTransactionToResponse;
|
|
13
14
|
function astarTransactionSignRequestToUnsigned(request) {
|
|
14
15
|
return (0, v1_1.substrateTransactionSignRequestToUnsigned)(request);
|
|
15
16
|
}
|
|
16
|
-
exports.astarTransactionSignRequestToUnsigned = astarTransactionSignRequestToUnsigned;
|
|
17
17
|
function astarTransactionSignResponseToSigned(response) {
|
|
18
18
|
return (0, v1_1.substrateTransactionSignResponseToSigned)(response);
|
|
19
19
|
}
|
|
20
|
-
exports.astarTransactionSignResponseToSigned = astarTransactionSignResponseToSigned;
|
|
21
20
|
//# sourceMappingURL=transaction-converter.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"transaction-converter.js","sourceRoot":"","sources":["../../../../../../src/v1/serializer/v3/schemas/converter/transaction-converter.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"transaction-converter.js","sourceRoot":"","sources":["../../../../../../src/v1/serializer/v3/schemas/converter/transaction-converter.ts"],"names":[],"mappings":";;AAYA,8EAMC;AAED,4EAKC;AAED,sFAEC;AAED,oFAEC;AAjCD,6CAO6B;AAK7B,SAAgB,iCAAiC,CAC/C,QAAsC,EACtC,SAAiB,EACjB,WAAoB;IAEpB,OAAO,IAAA,0CAAqC,EAAC,QAAQ,EAAE,SAAS,EAAE,WAAW,CAAC,CAAA;AAChF,CAAC;AAED,SAAgB,gCAAgC,CAC9C,MAAkC,EAClC,iBAAyB;IAEzB,OAAO,IAAA,yCAAoC,EAAC,MAAM,EAAE,iBAAiB,CAAC,CAAA;AACxE,CAAC;AAED,SAAgB,qCAAqC,CAAC,OAAoC;IACxF,OAAO,IAAA,8CAAyC,EAAC,OAAO,CAAC,CAAA;AAC3D,CAAC;AAED,SAAgB,oCAAoC,CAAC,QAAsC;IACzF,OAAO,IAAA,6CAAwC,EAAC,QAAQ,CAAC,CAAA;AAC3D,CAAC"}
|
|
@@ -1,53 +1,17 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
-
});
|
|
10
|
-
};
|
|
11
|
-
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
12
|
-
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
13
|
-
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
14
|
-
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
15
|
-
function step(op) {
|
|
16
|
-
if (f) throw new TypeError("Generator is already executing.");
|
|
17
|
-
while (_) try {
|
|
18
|
-
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
19
|
-
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
20
|
-
switch (op[0]) {
|
|
21
|
-
case 0: case 1: t = op; break;
|
|
22
|
-
case 4: _.label++; return { value: op[1], done: false };
|
|
23
|
-
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
24
|
-
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
25
|
-
default:
|
|
26
|
-
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
27
|
-
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
28
|
-
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
29
|
-
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
30
|
-
if (t[2]) _.ops.pop();
|
|
31
|
-
_.trys.pop(); continue;
|
|
32
|
-
}
|
|
33
|
-
op = body.call(thisArg, _);
|
|
34
|
-
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
35
|
-
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
36
|
-
}
|
|
37
|
-
};
|
|
38
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
3
|
exports.AstarV3SerializerCompanion = void 0;
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
4
|
+
const coinlib_core_1 = require("@airgap/coinlib-core");
|
|
5
|
+
const validate_1 = require("@airgap/coinlib-core/dependencies/src/validate.js-0.13.1/validate");
|
|
6
|
+
const errors_1 = require("@airgap/coinlib-core/errors");
|
|
7
|
+
const serializer_1 = require("@airgap/serializer");
|
|
8
|
+
const transaction_converter_1 = require("./schemas/converter/transaction-converter");
|
|
9
|
+
const transaction_validator_1 = require("./validators/transaction-validator");
|
|
10
|
+
const validators_1 = require("./validators/validators");
|
|
11
|
+
const astarTransactionSignRequest = require('./schemas/generated/transaction-sign-request-astar.json');
|
|
12
|
+
const astarTransactionSignResponse = require('./schemas/generated/transaction-sign-response-astar.json');
|
|
13
|
+
class AstarV3SerializerCompanion {
|
|
14
|
+
constructor() {
|
|
51
15
|
this.schemas = [
|
|
52
16
|
{
|
|
53
17
|
type: serializer_1.IACMessageType.TransactionSignRequest,
|
|
@@ -71,119 +35,76 @@ var AstarV3SerializerCompanion = /** @class */ (function () {
|
|
|
71
35
|
}
|
|
72
36
|
];
|
|
73
37
|
this.astarTransactionValidator = new transaction_validator_1.AstarTransactionValidator();
|
|
74
|
-
Object.keys(validators_1.astarValidators).forEach(
|
|
38
|
+
Object.keys(validators_1.astarValidators).forEach((key) => {
|
|
75
39
|
validate_1.validators[key] = validators_1.astarValidators[key];
|
|
76
40
|
});
|
|
77
41
|
}
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
});
|
|
104
|
-
});
|
|
105
|
-
};
|
|
106
|
-
AstarV3SerializerCompanion.prototype.validateTransactionSignRequest = function (identifier, transactionSignRequest) {
|
|
107
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
108
|
-
var _a, _b;
|
|
109
|
-
return __generator(this, function (_c) {
|
|
110
|
-
switch (_c.label) {
|
|
111
|
-
case 0:
|
|
112
|
-
_a = identifier;
|
|
113
|
-
switch (_a) {
|
|
114
|
-
case coinlib_core_1.MainProtocolSymbols.ASTAR: return [3 /*break*/, 1];
|
|
115
|
-
case coinlib_core_1.MainProtocolSymbols.SHIDEN: return [3 /*break*/, 1];
|
|
116
|
-
}
|
|
117
|
-
return [3 /*break*/, 4];
|
|
118
|
-
case 1:
|
|
119
|
-
_c.trys.push([1, 3, , 4]);
|
|
120
|
-
return [4 /*yield*/, this.astarTransactionValidator.validateUnsignedTransaction(transactionSignRequest)];
|
|
121
|
-
case 2:
|
|
122
|
-
_c.sent();
|
|
123
|
-
return [2 /*return*/, true];
|
|
124
|
-
case 3:
|
|
125
|
-
_b = _c.sent();
|
|
126
|
-
return [2 /*return*/, false];
|
|
127
|
-
case 4: throw new errors_1.UnsupportedError(coinlib_core_1.Domain.SUBSTRATE, "Protocol ".concat(identifier, " not supported"));
|
|
42
|
+
async toTransactionSignRequest(identifier, unsignedTransaction, publicKey, callbackUrl) {
|
|
43
|
+
switch (identifier) {
|
|
44
|
+
case coinlib_core_1.MainProtocolSymbols.ASTAR:
|
|
45
|
+
case coinlib_core_1.MainProtocolSymbols.SHIDEN:
|
|
46
|
+
return (0, transaction_converter_1.astarUnsignedTransactionToRequest)(unsignedTransaction, publicKey, callbackUrl);
|
|
47
|
+
default:
|
|
48
|
+
throw new errors_1.UnsupportedError(coinlib_core_1.Domain.SUBSTRATE, `Protocol ${identifier} not supported`);
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
async fromTransactionSignRequest(identifier, transactionSignRequest) {
|
|
52
|
+
switch (identifier) {
|
|
53
|
+
case coinlib_core_1.MainProtocolSymbols.ASTAR:
|
|
54
|
+
case coinlib_core_1.MainProtocolSymbols.SHIDEN:
|
|
55
|
+
return (0, transaction_converter_1.astarTransactionSignRequestToUnsigned)(transactionSignRequest);
|
|
56
|
+
default:
|
|
57
|
+
throw new errors_1.UnsupportedError(coinlib_core_1.Domain.SUBSTRATE, `Protocol ${identifier} not supported`);
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
async validateTransactionSignRequest(identifier, transactionSignRequest) {
|
|
61
|
+
switch (identifier) {
|
|
62
|
+
case coinlib_core_1.MainProtocolSymbols.ASTAR:
|
|
63
|
+
case coinlib_core_1.MainProtocolSymbols.SHIDEN:
|
|
64
|
+
try {
|
|
65
|
+
await this.astarTransactionValidator.validateUnsignedTransaction(transactionSignRequest);
|
|
66
|
+
return true;
|
|
128
67
|
}
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
};
|
|
132
|
-
AstarV3SerializerCompanion.prototype.toTransactionSignResponse = function (identifier, signedTransaction, accountIdentifier) {
|
|
133
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
134
|
-
return __generator(this, function (_a) {
|
|
135
|
-
switch (identifier) {
|
|
136
|
-
case coinlib_core_1.MainProtocolSymbols.ASTAR:
|
|
137
|
-
case coinlib_core_1.MainProtocolSymbols.SHIDEN:
|
|
138
|
-
return [2 /*return*/, (0, transaction_converter_1.astarSignedTransactionToResponse)(signedTransaction, accountIdentifier)];
|
|
139
|
-
default:
|
|
140
|
-
throw new errors_1.UnsupportedError(coinlib_core_1.Domain.SUBSTRATE, "Protocol ".concat(identifier, " not supported"));
|
|
68
|
+
catch {
|
|
69
|
+
return false;
|
|
141
70
|
}
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
}
|
|
145
|
-
}
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
71
|
+
default:
|
|
72
|
+
throw new errors_1.UnsupportedError(coinlib_core_1.Domain.SUBSTRATE, `Protocol ${identifier} not supported`);
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
async toTransactionSignResponse(identifier, signedTransaction, accountIdentifier) {
|
|
76
|
+
switch (identifier) {
|
|
77
|
+
case coinlib_core_1.MainProtocolSymbols.ASTAR:
|
|
78
|
+
case coinlib_core_1.MainProtocolSymbols.SHIDEN:
|
|
79
|
+
return (0, transaction_converter_1.astarSignedTransactionToResponse)(signedTransaction, accountIdentifier);
|
|
80
|
+
default:
|
|
81
|
+
throw new errors_1.UnsupportedError(coinlib_core_1.Domain.SUBSTRATE, `Protocol ${identifier} not supported`);
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
async fromTransactionSignResponse(identifier, transactionSignResponse) {
|
|
85
|
+
switch (identifier) {
|
|
86
|
+
case coinlib_core_1.MainProtocolSymbols.ASTAR:
|
|
87
|
+
case coinlib_core_1.MainProtocolSymbols.SHIDEN:
|
|
88
|
+
return (0, transaction_converter_1.astarTransactionSignResponseToSigned)(transactionSignResponse);
|
|
89
|
+
default:
|
|
90
|
+
throw new errors_1.UnsupportedError(coinlib_core_1.Domain.SUBSTRATE, `Protocol ${identifier} not supported`);
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
async validateTransactionSignResponse(identifier, transactionSignResponse) {
|
|
94
|
+
switch (identifier) {
|
|
95
|
+
case coinlib_core_1.MainProtocolSymbols.ASTAR:
|
|
96
|
+
case coinlib_core_1.MainProtocolSymbols.SHIDEN:
|
|
97
|
+
try {
|
|
98
|
+
await this.astarTransactionValidator.validateSignedTransaction(transactionSignResponse);
|
|
99
|
+
return true;
|
|
155
100
|
}
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
});
|
|
159
|
-
};
|
|
160
|
-
AstarV3SerializerCompanion.prototype.validateTransactionSignResponse = function (identifier, transactionSignResponse) {
|
|
161
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
162
|
-
var _a, _b;
|
|
163
|
-
return __generator(this, function (_c) {
|
|
164
|
-
switch (_c.label) {
|
|
165
|
-
case 0:
|
|
166
|
-
_a = identifier;
|
|
167
|
-
switch (_a) {
|
|
168
|
-
case coinlib_core_1.MainProtocolSymbols.ASTAR: return [3 /*break*/, 1];
|
|
169
|
-
case coinlib_core_1.MainProtocolSymbols.SHIDEN: return [3 /*break*/, 1];
|
|
170
|
-
}
|
|
171
|
-
return [3 /*break*/, 4];
|
|
172
|
-
case 1:
|
|
173
|
-
_c.trys.push([1, 3, , 4]);
|
|
174
|
-
return [4 /*yield*/, this.astarTransactionValidator.validateSignedTransaction(transactionSignResponse)];
|
|
175
|
-
case 2:
|
|
176
|
-
_c.sent();
|
|
177
|
-
return [2 /*return*/, true];
|
|
178
|
-
case 3:
|
|
179
|
-
_b = _c.sent();
|
|
180
|
-
return [2 /*return*/, false];
|
|
181
|
-
case 4: throw new errors_1.UnsupportedError(coinlib_core_1.Domain.SUBSTRATE, "Protocol ".concat(identifier, " not supported"));
|
|
101
|
+
catch {
|
|
102
|
+
return false;
|
|
182
103
|
}
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
}
|
|
104
|
+
default:
|
|
105
|
+
throw new errors_1.UnsupportedError(coinlib_core_1.Domain.SUBSTRATE, `Protocol ${identifier} not supported`);
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
}
|
|
188
109
|
exports.AstarV3SerializerCompanion = AstarV3SerializerCompanion;
|
|
189
110
|
//# sourceMappingURL=serializer-companion.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"serializer-companion.js","sourceRoot":"","sources":["../../../../src/v1/serializer/v3/serializer-companion.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"serializer-companion.js","sourceRoot":"","sources":["../../../../src/v1/serializer/v3/serializer-companion.ts"],"names":[],"mappings":";;;AAAA,uDAAkE;AAClE,gGAA8F;AAC9F,wDAA8D;AAG9D,mDAAgH;AAGhH,qFAKkD;AAClD,8EAA8E;AAC9E,wDAAyD;AAEzD,MAAM,2BAA2B,GAAe,OAAO,CAAC,yDAAyD,CAAC,CAAA;AAClH,MAAM,4BAA4B,GAAe,OAAO,CAAC,0DAA0D,CAAC,CAAA;AAEpH,MAAa,0BAA0B;IA0BrC;QAzBgB,YAAO,GAA4B;YACjD;gBACE,IAAI,EAAE,2BAAc,CAAC,sBAAsB;gBAC3C,MAAM,EAAE,EAAE,MAAM,EAAE,2BAA2B,EAAE;gBAC/C,kBAAkB,EAAE,kCAAmB,CAAC,KAAK;aAC9C;YACD;gBACE,IAAI,EAAE,2BAAc,CAAC,uBAAuB;gBAC5C,MAAM,EAAE,EAAE,MAAM,EAAE,4BAA4B,EAAE;gBAChD,kBAAkB,EAAE,kCAAmB,CAAC,KAAK;aAC9C;YACD;gBACE,IAAI,EAAE,2BAAc,CAAC,sBAAsB;gBAC3C,MAAM,EAAE,EAAE,MAAM,EAAE,2BAA2B,EAAE;gBAC/C,kBAAkB,EAAE,kCAAmB,CAAC,MAAM;aAC/C;YACD;gBACE,IAAI,EAAE,2BAAc,CAAC,uBAAuB;gBAC5C,MAAM,EAAE,EAAE,MAAM,EAAE,4BAA4B,EAAE;gBAChD,kBAAkB,EAAE,kCAAmB,CAAC,MAAM;aAC/C;SACF,CAAA;QAEgB,8BAAyB,GAA8B,IAAI,iDAAyB,EAAE,CAAA;QAGrG,MAAM,CAAC,IAAI,CAAC,4BAAe,CAAC,CAAC,OAAO,CAAC,CAAC,GAAW,EAAE,EAAE;YACnD,qBAAU,CAAC,GAAG,CAAC,GAAG,4BAAe,CAAC,GAAmC,CAAC,CAAA;QACxE,CAAC,CAAC,CAAA;IACJ,CAAC;IAEM,KAAK,CAA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
4
|
-
extendStatics = Object.setPrototypeOf ||
|
|
5
|
-
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
6
|
-
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
|
7
|
-
return extendStatics(d, b);
|
|
8
|
-
};
|
|
9
|
-
return function (d, b) {
|
|
10
|
-
if (typeof b !== "function" && b !== null)
|
|
11
|
-
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
12
|
-
extendStatics(d, b);
|
|
13
|
-
function __() { this.constructor = d; }
|
|
14
|
-
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
15
|
-
};
|
|
16
|
-
})();
|
|
17
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
3
|
exports.AstarTransactionValidator = void 0;
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
function AstarTransactionValidator() {
|
|
23
|
-
return _super !== null && _super.apply(this, arguments) || this;
|
|
24
|
-
}
|
|
25
|
-
return AstarTransactionValidator;
|
|
26
|
-
}(v1_1.SubstrateTransactionValidator));
|
|
4
|
+
const v1_1 = require("@airgap/substrate/v1");
|
|
5
|
+
class AstarTransactionValidator extends v1_1.SubstrateTransactionValidator {
|
|
6
|
+
}
|
|
27
7
|
exports.AstarTransactionValidator = AstarTransactionValidator;
|
|
28
8
|
//# sourceMappingURL=transaction-validator.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"transaction-validator.js","sourceRoot":"","sources":["../../../../../src/v1/serializer/v3/validators/transaction-validator.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"transaction-validator.js","sourceRoot":"","sources":["../../../../../src/v1/serializer/v3/validators/transaction-validator.ts"],"names":[],"mappings":";;;AAEA,6CAAoE;AAEpE,MAAa,yBAA0B,SAAQ,kCAA6B;CAAmC;AAA/G,8DAA+G"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.astarValidators = void 0;
|
|
4
|
-
|
|
4
|
+
const v1_1 = require("@airgap/substrate/v1");
|
|
5
5
|
exports.astarValidators = v1_1.substrateValidators;
|
|
6
6
|
//# sourceMappingURL=validators.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"validators.js","sourceRoot":"","sources":["../../../../../src/v1/serializer/v3/validators/validators.ts"],"names":[],"mappings":";;;AAAA,
|
|
1
|
+
{"version":3,"file":"validators.js","sourceRoot":"","sources":["../../../../../src/v1/serializer/v3/validators/validators.ts"],"names":[],"mappings":";;;AAAA,6CAA0D;AAE7C,QAAA,eAAe,GAAG,wBAAmB,CAAA"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { SubstrateProtocolConfiguration, SubstrateSS58AccountConfiguration } from '@airgap/substrate/v1';
|
|
2
|
-
export
|
|
2
|
+
export type AstarTransactionType = never;
|
|
3
3
|
export interface AstarProtocolConfiguration extends SubstrateProtocolConfiguration<SubstrateSS58AccountConfiguration, AstarTransactionType> {
|
|
4
4
|
}
|
package/v1/types/crypto.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { Sr25519CryptoConfiguration } from '@airgap/module-kit';
|
|
2
|
-
export
|
|
2
|
+
export type AstarCryptoConfiguration = Sr25519CryptoConfiguration;
|
package/v1/types/protocol.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { SubstrateProtocolNetwork, SubstrateProtocolOptions } from '@airgap/substrate/v1';
|
|
2
2
|
import { AstarProtocolConfiguration } from './configuration';
|
|
3
|
-
export
|
|
4
|
-
export
|
|
3
|
+
export type AstarUnits = 'ASTR' | 'mASTR' | 'uASTR' | 'nASTR' | 'pASTR' | 'fASTR' | 'aASTR';
|
|
4
|
+
export type ShidenUnits = 'SDN' | 'mSDN' | 'uSDN' | 'nSDN' | 'pSDN' | 'fSDN' | 'aSDN';
|
|
5
5
|
export interface AstarProtocolNetwork extends SubstrateProtocolNetwork {
|
|
6
6
|
blockExplorerApi: string;
|
|
7
7
|
}
|