@taquito/beacon-wallet 11.0.2 → 11.2.0-beta-RC.0
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/lib/taquito-beacon-wallet.js +93 -230
- package/dist/lib/taquito-beacon-wallet.js.map +1 -1
- package/dist/lib/version.js +2 -4
- package/dist/lib/version.js.map +1 -1
- package/dist/taquito-beacon-wallet.es6.js +184 -0
- package/dist/taquito-beacon-wallet.es6.js.map +1 -0
- package/dist/taquito-beacon-wallet.umd.js +96 -237
- package/dist/taquito-beacon-wallet.umd.js.map +1 -1
- package/dist/types/taquito-beacon-wallet.d.ts +3 -4
- package/package.json +23 -24
- package/dist/taquito-beacon-wallet.es5.js +0 -325
- package/dist/taquito-beacon-wallet.es5.js.map +0 -1
|
@@ -12,212 +12,99 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
12
12
|
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
13
13
|
});
|
|
14
14
|
};
|
|
15
|
-
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
16
|
-
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
17
|
-
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
18
|
-
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
19
|
-
function step(op) {
|
|
20
|
-
if (f) throw new TypeError("Generator is already executing.");
|
|
21
|
-
while (_) try {
|
|
22
|
-
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;
|
|
23
|
-
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
24
|
-
switch (op[0]) {
|
|
25
|
-
case 0: case 1: t = op; break;
|
|
26
|
-
case 4: _.label++; return { value: op[1], done: false };
|
|
27
|
-
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
28
|
-
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
29
|
-
default:
|
|
30
|
-
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
31
|
-
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
32
|
-
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
33
|
-
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
34
|
-
if (t[2]) _.ops.pop();
|
|
35
|
-
_.trys.pop(); continue;
|
|
36
|
-
}
|
|
37
|
-
op = body.call(thisArg, _);
|
|
38
|
-
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
39
|
-
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
40
|
-
}
|
|
41
|
-
};
|
|
42
|
-
var __values = (this && this.__values) || function(o) {
|
|
43
|
-
var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
|
|
44
|
-
if (m) return m.call(o);
|
|
45
|
-
if (o && typeof o.length === "number") return {
|
|
46
|
-
next: function () {
|
|
47
|
-
if (o && i >= o.length) o = void 0;
|
|
48
|
-
return { value: o && o[i++], done: !o };
|
|
49
|
-
}
|
|
50
|
-
};
|
|
51
|
-
throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
|
|
52
|
-
};
|
|
53
15
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
54
16
|
exports.BeaconWallet = exports.MissingRequiredScopes = exports.BeaconWalletNotInitialized = exports.VERSION = void 0;
|
|
55
|
-
|
|
56
|
-
|
|
17
|
+
const beacon_sdk_1 = require("@airgap/beacon-sdk");
|
|
18
|
+
const taquito_1 = require("@taquito/taquito");
|
|
57
19
|
var version_1 = require("./version");
|
|
58
20
|
Object.defineProperty(exports, "VERSION", { enumerable: true, get: function () { return version_1.VERSION; } });
|
|
59
|
-
|
|
60
|
-
|
|
21
|
+
class BeaconWalletNotInitialized extends Error {
|
|
22
|
+
constructor() {
|
|
23
|
+
super('You need to initialize BeaconWallet by calling beaconWallet.requestPermissions first');
|
|
61
24
|
this.name = 'BeaconWalletNotInitialized';
|
|
62
|
-
this.message = 'You need to initialize BeaconWallet by calling beaconWallet.requestPermissions first';
|
|
63
25
|
}
|
|
64
|
-
|
|
65
|
-
}());
|
|
26
|
+
}
|
|
66
27
|
exports.BeaconWalletNotInitialized = BeaconWalletNotInitialized;
|
|
67
|
-
|
|
68
|
-
|
|
28
|
+
class MissingRequiredScopes extends Error {
|
|
29
|
+
constructor(requiredScopes) {
|
|
30
|
+
super(`Required permissions scopes were not granted: ${requiredScopes.join(',')}`);
|
|
69
31
|
this.requiredScopes = requiredScopes;
|
|
70
32
|
this.name = 'MissingRequiredScopes';
|
|
71
|
-
this.message = "Required permissions scopes were not granted: " + requiredScopes.join(',');
|
|
72
33
|
}
|
|
73
|
-
|
|
74
|
-
}());
|
|
34
|
+
}
|
|
75
35
|
exports.MissingRequiredScopes = MissingRequiredScopes;
|
|
76
|
-
|
|
77
|
-
|
|
36
|
+
class BeaconWallet {
|
|
37
|
+
constructor(options) {
|
|
78
38
|
this.client = new beacon_sdk_1.DAppClient(options);
|
|
79
39
|
}
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
var scope = permissionScopes_1_1.value;
|
|
86
|
-
if (mandatoryScope.has(scope)) {
|
|
87
|
-
mandatoryScope.delete(scope);
|
|
88
|
-
}
|
|
89
|
-
}
|
|
90
|
-
}
|
|
91
|
-
catch (e_1_1) { e_1 = { error: e_1_1 }; }
|
|
92
|
-
finally {
|
|
93
|
-
try {
|
|
94
|
-
if (permissionScopes_1_1 && !permissionScopes_1_1.done && (_a = permissionScopes_1.return)) _a.call(permissionScopes_1);
|
|
40
|
+
validateRequiredScopesOrFail(permissionScopes, requiredScopes) {
|
|
41
|
+
const mandatoryScope = new Set(requiredScopes);
|
|
42
|
+
for (const scope of permissionScopes) {
|
|
43
|
+
if (mandatoryScope.has(scope)) {
|
|
44
|
+
mandatoryScope.delete(scope);
|
|
95
45
|
}
|
|
96
|
-
finally { if (e_1) throw e_1.error; }
|
|
97
46
|
}
|
|
98
47
|
if (mandatoryScope.size > 0) {
|
|
99
48
|
throw new MissingRequiredScopes(Array.from(mandatoryScope));
|
|
100
49
|
}
|
|
101
|
-
}
|
|
102
|
-
|
|
103
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
104
|
-
|
|
105
|
-
switch (_a.label) {
|
|
106
|
-
case 0: return [4 /*yield*/, this.client.requestPermissions(request)];
|
|
107
|
-
case 1:
|
|
108
|
-
_a.sent();
|
|
109
|
-
return [2 /*return*/];
|
|
110
|
-
}
|
|
111
|
-
});
|
|
50
|
+
}
|
|
51
|
+
requestPermissions(request) {
|
|
52
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
53
|
+
yield this.client.requestPermissions(request);
|
|
112
54
|
});
|
|
113
|
-
}
|
|
114
|
-
|
|
115
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
account = _a.sent();
|
|
122
|
-
if (!account) {
|
|
123
|
-
throw new BeaconWalletNotInitialized();
|
|
124
|
-
}
|
|
125
|
-
return [2 /*return*/, account.address];
|
|
126
|
-
}
|
|
127
|
-
});
|
|
55
|
+
}
|
|
56
|
+
getPKH() {
|
|
57
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
58
|
+
const account = yield this.client.getActiveAccount();
|
|
59
|
+
if (!account) {
|
|
60
|
+
throw new BeaconWalletNotInitialized();
|
|
61
|
+
}
|
|
62
|
+
return account.address;
|
|
128
63
|
});
|
|
129
|
-
}
|
|
130
|
-
|
|
131
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
case 3:
|
|
143
|
-
walletParams = _c.sent();
|
|
144
|
-
return [3 /*break*/, 6];
|
|
145
|
-
case 4:
|
|
146
|
-
err_1 = _c.sent();
|
|
147
|
-
return [4 /*yield*/, this.client.hideUI()];
|
|
148
|
-
case 5:
|
|
149
|
-
_c.sent();
|
|
150
|
-
throw err_1;
|
|
151
|
-
case 6:
|
|
152
|
-
_a = this.removeDefaultParams;
|
|
153
|
-
_b = [walletParams];
|
|
154
|
-
return [4 /*yield*/, taquito_1.createTransferOperation(this.formatParameters(walletParams))];
|
|
155
|
-
case 7: return [2 /*return*/, _a.apply(this, _b.concat([_c.sent()]))];
|
|
156
|
-
}
|
|
157
|
-
});
|
|
64
|
+
}
|
|
65
|
+
mapTransferParamsToWalletParams(params) {
|
|
66
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
67
|
+
let walletParams;
|
|
68
|
+
yield this.client.showPrepare();
|
|
69
|
+
try {
|
|
70
|
+
walletParams = yield params();
|
|
71
|
+
}
|
|
72
|
+
catch (err) {
|
|
73
|
+
yield this.client.hideUI();
|
|
74
|
+
throw err;
|
|
75
|
+
}
|
|
76
|
+
return this.removeDefaultParams(walletParams, yield taquito_1.createTransferOperation(this.formatParameters(walletParams)));
|
|
158
77
|
});
|
|
159
|
-
}
|
|
160
|
-
|
|
161
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
case 3:
|
|
173
|
-
walletParams = _c.sent();
|
|
174
|
-
return [3 /*break*/, 6];
|
|
175
|
-
case 4:
|
|
176
|
-
err_2 = _c.sent();
|
|
177
|
-
return [4 /*yield*/, this.client.hideUI()];
|
|
178
|
-
case 5:
|
|
179
|
-
_c.sent();
|
|
180
|
-
throw err_2;
|
|
181
|
-
case 6:
|
|
182
|
-
_a = this.removeDefaultParams;
|
|
183
|
-
_b = [walletParams];
|
|
184
|
-
return [4 /*yield*/, taquito_1.createOriginationOperation(this.formatParameters(walletParams))];
|
|
185
|
-
case 7: return [2 /*return*/, _a.apply(this, _b.concat([_c.sent()]))];
|
|
186
|
-
}
|
|
187
|
-
});
|
|
78
|
+
}
|
|
79
|
+
mapOriginateParamsToWalletParams(params) {
|
|
80
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
81
|
+
let walletParams;
|
|
82
|
+
yield this.client.showPrepare();
|
|
83
|
+
try {
|
|
84
|
+
walletParams = yield params();
|
|
85
|
+
}
|
|
86
|
+
catch (err) {
|
|
87
|
+
yield this.client.hideUI();
|
|
88
|
+
throw err;
|
|
89
|
+
}
|
|
90
|
+
return this.removeDefaultParams(walletParams, yield taquito_1.createOriginationOperation(this.formatParameters(walletParams)));
|
|
188
91
|
});
|
|
189
|
-
}
|
|
190
|
-
|
|
191
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
case 3:
|
|
203
|
-
walletParams = _c.sent();
|
|
204
|
-
return [3 /*break*/, 6];
|
|
205
|
-
case 4:
|
|
206
|
-
err_3 = _c.sent();
|
|
207
|
-
return [4 /*yield*/, this.client.hideUI()];
|
|
208
|
-
case 5:
|
|
209
|
-
_c.sent();
|
|
210
|
-
throw err_3;
|
|
211
|
-
case 6:
|
|
212
|
-
_a = this.removeDefaultParams;
|
|
213
|
-
_b = [walletParams];
|
|
214
|
-
return [4 /*yield*/, taquito_1.createSetDelegateOperation(this.formatParameters(walletParams))];
|
|
215
|
-
case 7: return [2 /*return*/, _a.apply(this, _b.concat([_c.sent()]))];
|
|
216
|
-
}
|
|
217
|
-
});
|
|
92
|
+
}
|
|
93
|
+
mapDelegateParamsToWalletParams(params) {
|
|
94
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
95
|
+
let walletParams;
|
|
96
|
+
yield this.client.showPrepare();
|
|
97
|
+
try {
|
|
98
|
+
walletParams = yield params();
|
|
99
|
+
}
|
|
100
|
+
catch (err) {
|
|
101
|
+
yield this.client.hideUI();
|
|
102
|
+
throw err;
|
|
103
|
+
}
|
|
104
|
+
return this.removeDefaultParams(walletParams, yield taquito_1.createSetDelegateOperation(this.formatParameters(walletParams)));
|
|
218
105
|
});
|
|
219
|
-
}
|
|
220
|
-
|
|
106
|
+
}
|
|
107
|
+
formatParameters(params) {
|
|
221
108
|
if (params.fee) {
|
|
222
109
|
params.fee = params.fee.toString();
|
|
223
110
|
}
|
|
@@ -228,8 +115,8 @@ var BeaconWallet = /** @class */ (function () {
|
|
|
228
115
|
params.gasLimit = params.gasLimit.toString();
|
|
229
116
|
}
|
|
230
117
|
return params;
|
|
231
|
-
}
|
|
232
|
-
|
|
118
|
+
}
|
|
119
|
+
removeDefaultParams(params, operatedParams) {
|
|
233
120
|
// If fee, storageLimit or gasLimit is undefined by user
|
|
234
121
|
// in case of beacon wallet, dont override it by
|
|
235
122
|
// defaults.
|
|
@@ -243,62 +130,38 @@ var BeaconWallet = /** @class */ (function () {
|
|
|
243
130
|
delete operatedParams.gas_limit;
|
|
244
131
|
}
|
|
245
132
|
return operatedParams;
|
|
246
|
-
}
|
|
247
|
-
|
|
248
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
}
|
|
258
|
-
permissions = account.scopes;
|
|
259
|
-
this.validateRequiredScopesOrFail(permissions, [beacon_sdk_1.PermissionScope.OPERATION_REQUEST]);
|
|
260
|
-
return [4 /*yield*/, this.client.requestOperation({ operationDetails: params })];
|
|
261
|
-
case 2:
|
|
262
|
-
transactionHash = (_a.sent()).transactionHash;
|
|
263
|
-
return [2 /*return*/, transactionHash];
|
|
264
|
-
}
|
|
265
|
-
});
|
|
133
|
+
}
|
|
134
|
+
sendOperations(params) {
|
|
135
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
136
|
+
const account = yield this.client.getActiveAccount();
|
|
137
|
+
if (!account) {
|
|
138
|
+
throw new BeaconWalletNotInitialized();
|
|
139
|
+
}
|
|
140
|
+
const permissions = account.scopes;
|
|
141
|
+
this.validateRequiredScopesOrFail(permissions, [beacon_sdk_1.PermissionScope.OPERATION_REQUEST]);
|
|
142
|
+
const { transactionHash } = yield this.client.requestOperation({ operationDetails: params });
|
|
143
|
+
return transactionHash;
|
|
266
144
|
});
|
|
267
|
-
}
|
|
145
|
+
}
|
|
268
146
|
/**
|
|
269
147
|
*
|
|
270
148
|
* @description Removes all beacon values from the storage. After using this method, this instance is no longer usable.
|
|
271
149
|
* You will have to instanciate a new BeaconWallet.
|
|
272
150
|
*/
|
|
273
|
-
|
|
274
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
275
|
-
|
|
276
|
-
switch (_a.label) {
|
|
277
|
-
case 0: return [4 /*yield*/, this.client.destroy()];
|
|
278
|
-
case 1:
|
|
279
|
-
_a.sent();
|
|
280
|
-
return [2 /*return*/];
|
|
281
|
-
}
|
|
282
|
-
});
|
|
151
|
+
disconnect() {
|
|
152
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
153
|
+
yield this.client.destroy();
|
|
283
154
|
});
|
|
284
|
-
}
|
|
155
|
+
}
|
|
285
156
|
/**
|
|
286
157
|
*
|
|
287
158
|
* @description This method removes the active account from local storage by setting it to undefined.
|
|
288
159
|
*/
|
|
289
|
-
|
|
290
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
291
|
-
|
|
292
|
-
switch (_a.label) {
|
|
293
|
-
case 0: return [4 /*yield*/, this.client.setActiveAccount()];
|
|
294
|
-
case 1:
|
|
295
|
-
_a.sent();
|
|
296
|
-
return [2 /*return*/];
|
|
297
|
-
}
|
|
298
|
-
});
|
|
160
|
+
clearActiveAccount() {
|
|
161
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
162
|
+
yield this.client.setActiveAccount();
|
|
299
163
|
});
|
|
300
|
-
}
|
|
301
|
-
|
|
302
|
-
}());
|
|
164
|
+
}
|
|
165
|
+
}
|
|
303
166
|
exports.BeaconWallet = BeaconWallet;
|
|
304
167
|
//# sourceMappingURL=taquito-beacon-wallet.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"taquito-beacon-wallet.js","sourceRoot":"","sources":["../../src/taquito-beacon-wallet.ts"],"names":[],"mappings":";AAAA;;;GAGG
|
|
1
|
+
{"version":3,"file":"taquito-beacon-wallet.js","sourceRoot":"","sources":["../../src/taquito-beacon-wallet.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;;;;;;;;;;AAEH,mDAK4B;AAE5B,8CAQ0B;AAE1B,qCAAoC;AAA3B,kGAAA,OAAO,OAAA;AAEhB,MAAa,0BAA2B,SAAQ,KAAK;IAGnD;QACE,KAAK,CAAC,sFAAsF,CAAC,CAAC;QAHhG,SAAI,GAAG,4BAA4B,CAAC;IAIpC,CAAC;CACF;AAND,gEAMC;AAED,MAAa,qBAAsB,SAAQ,KAAK;IAG9C,YAAmB,cAAiC;QAClD,KAAK,CAAC,iDAAiD,cAAc,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;QADlE,mBAAc,GAAd,cAAc,CAAmB;QAFpD,SAAI,GAAG,uBAAuB,CAAC;IAI/B,CAAC;CACF;AAND,sDAMC;AAED,MAAa,YAAY;IAGvB,YAAY,OAA0B;QACpC,IAAI,CAAC,MAAM,GAAG,IAAI,uBAAU,CAAC,OAAO,CAAC,CAAC;IACxC,CAAC;IAEO,4BAA4B,CAClC,gBAAmC,EACnC,cAAiC;QAEjC,MA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QACZ,IAAI,CAAC,MAAM,CAAC,GAAG,EAAE;YACf,OAAO,cAAc,CAAC,GAAG,CAAC;SAC3B;QACD,IAAI,CAAC,MAAM,CAAC,YAAY,EAAE;YACxB,OAAO,cAAc,CAAC,aAAa,CAAC;SACrC;QACD,IAAI,CAAC,MAAM,CAAC,QAAQ,EAAE;YACpB,OAAO,cAAc,CAAC,SAAS,CAAC;SACjC;QACD,OAAO,cAAc,CAAC;IACxB,CAAC;IAEK,cAAc,CAAC,MAAa;;YAChC,MAAM,OAAO,GAAG,MAAM,IAAI,CAAC,MAAM,CAAC,gBAAgB,EAAE,CAAC;YACrD,IAAI,CAAC,OAAO,EAAE;gBACZ,MAAM,IAAI,0BAA0B,EAAE,CAAC;aACxC;YACD,MAAM,WAAW,GAAG,OAAO,CAAC,MAAM,CAAC;YACnC,IAAI,CAAC,4BAA4B,CAAC,WAAW,EAAE,CAAC,4BAAe,CAAC,iBAAiB,CAAC,CAAC,CAAC;YAEpF,MAAM,EAAE,eAAe,EAAE,GAAG,MAAM,IAAI,CAAC,MAAM,CAAC,gBAAgB,CAAC,EAAE,gBAAgB,EAAE,MAAM,EAAE,CAAC,CAAC;YAC7F,OAAO,eAAe,CAAC;QACzB,CAAC;KAAA;IAED;;;;OAIG;IACG,UAAU;;YACd,MAAM,IAAI,CAAC,MAAM,CAAC,OAAO,EAAE,CAAC;QAC9B,CAAC;KAAA;IAED;;;OAGG;IACG,kBAAkB;;YACtB,MAAM,IAAI,CAAC,MAAM,CAAC,gBAAgB,EAAE,CAAC;QACvC,CAAC;KAAA;CACF;AA7ID,oCA6IC"}
|
package/dist/lib/version.js
CHANGED
|
@@ -2,10 +2,8 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.VERSION = void 0;
|
|
4
4
|
// IMPORTANT: THIS FILE IS AUTO GENERATED! DO NOT MANUALLY EDIT OR CHECKIN!
|
|
5
|
-
/* tslint:disable */
|
|
6
5
|
exports.VERSION = {
|
|
7
|
-
"commitHash": "
|
|
8
|
-
"version": "11.0.
|
|
6
|
+
"commitHash": "e03d983c780c7f96d8291ddd1251ea82f4581858",
|
|
7
|
+
"version": "11.2.0-beta-RC.0"
|
|
9
8
|
};
|
|
10
|
-
/* tslint:enable */
|
|
11
9
|
//# sourceMappingURL=version.js.map
|
package/dist/lib/version.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"version.js","sourceRoot":"","sources":["../../src/version.ts"],"names":[],"mappings":";;;AACA,2EAA2E;
|
|
1
|
+
{"version":3,"file":"version.js","sourceRoot":"","sources":["../../src/version.ts"],"names":[],"mappings":";;;AACA,2EAA2E;AAC9D,QAAA,OAAO,GAAG;IACnB,YAAY,EAAE,0CAA0C;IACxD,SAAS,EAAE,kBAAkB;CAChC,CAAC"}
|
|
@@ -0,0 +1,184 @@
|
|
|
1
|
+
import { DAppClient, PermissionScope } from '@airgap/beacon-sdk';
|
|
2
|
+
import { createTransferOperation, createOriginationOperation, createSetDelegateOperation } from '@taquito/taquito';
|
|
3
|
+
|
|
4
|
+
/*! *****************************************************************************
|
|
5
|
+
Copyright (c) Microsoft Corporation.
|
|
6
|
+
|
|
7
|
+
Permission to use, copy, modify, and/or distribute this software for any
|
|
8
|
+
purpose with or without fee is hereby granted.
|
|
9
|
+
|
|
10
|
+
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
|
11
|
+
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
|
12
|
+
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
|
13
|
+
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
14
|
+
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
15
|
+
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
16
|
+
PERFORMANCE OF THIS SOFTWARE.
|
|
17
|
+
***************************************************************************** */
|
|
18
|
+
|
|
19
|
+
function __awaiter(thisArg, _arguments, P, generator) {
|
|
20
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
21
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
22
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
23
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
24
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
25
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
26
|
+
});
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
// IMPORTANT: THIS FILE IS AUTO GENERATED! DO NOT MANUALLY EDIT OR CHECKIN!
|
|
30
|
+
const VERSION = {
|
|
31
|
+
"commitHash": "e03d983c780c7f96d8291ddd1251ea82f4581858",
|
|
32
|
+
"version": "11.2.0-beta-RC.0"
|
|
33
|
+
};
|
|
34
|
+
|
|
35
|
+
/**
|
|
36
|
+
* @packageDocumentation
|
|
37
|
+
* @module @taquito/beacon-wallet
|
|
38
|
+
*/
|
|
39
|
+
class BeaconWalletNotInitialized extends Error {
|
|
40
|
+
constructor() {
|
|
41
|
+
super('You need to initialize BeaconWallet by calling beaconWallet.requestPermissions first');
|
|
42
|
+
this.name = 'BeaconWalletNotInitialized';
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
class MissingRequiredScopes extends Error {
|
|
46
|
+
constructor(requiredScopes) {
|
|
47
|
+
super(`Required permissions scopes were not granted: ${requiredScopes.join(',')}`);
|
|
48
|
+
this.requiredScopes = requiredScopes;
|
|
49
|
+
this.name = 'MissingRequiredScopes';
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
class BeaconWallet {
|
|
53
|
+
constructor(options) {
|
|
54
|
+
this.client = new DAppClient(options);
|
|
55
|
+
}
|
|
56
|
+
validateRequiredScopesOrFail(permissionScopes, requiredScopes) {
|
|
57
|
+
const mandatoryScope = new Set(requiredScopes);
|
|
58
|
+
for (const scope of permissionScopes) {
|
|
59
|
+
if (mandatoryScope.has(scope)) {
|
|
60
|
+
mandatoryScope.delete(scope);
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
if (mandatoryScope.size > 0) {
|
|
64
|
+
throw new MissingRequiredScopes(Array.from(mandatoryScope));
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
requestPermissions(request) {
|
|
68
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
69
|
+
yield this.client.requestPermissions(request);
|
|
70
|
+
});
|
|
71
|
+
}
|
|
72
|
+
getPKH() {
|
|
73
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
74
|
+
const account = yield this.client.getActiveAccount();
|
|
75
|
+
if (!account) {
|
|
76
|
+
throw new BeaconWalletNotInitialized();
|
|
77
|
+
}
|
|
78
|
+
return account.address;
|
|
79
|
+
});
|
|
80
|
+
}
|
|
81
|
+
mapTransferParamsToWalletParams(params) {
|
|
82
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
83
|
+
let walletParams;
|
|
84
|
+
yield this.client.showPrepare();
|
|
85
|
+
try {
|
|
86
|
+
walletParams = yield params();
|
|
87
|
+
}
|
|
88
|
+
catch (err) {
|
|
89
|
+
yield this.client.hideUI();
|
|
90
|
+
throw err;
|
|
91
|
+
}
|
|
92
|
+
return this.removeDefaultParams(walletParams, yield createTransferOperation(this.formatParameters(walletParams)));
|
|
93
|
+
});
|
|
94
|
+
}
|
|
95
|
+
mapOriginateParamsToWalletParams(params) {
|
|
96
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
97
|
+
let walletParams;
|
|
98
|
+
yield this.client.showPrepare();
|
|
99
|
+
try {
|
|
100
|
+
walletParams = yield params();
|
|
101
|
+
}
|
|
102
|
+
catch (err) {
|
|
103
|
+
yield this.client.hideUI();
|
|
104
|
+
throw err;
|
|
105
|
+
}
|
|
106
|
+
return this.removeDefaultParams(walletParams, yield createOriginationOperation(this.formatParameters(walletParams)));
|
|
107
|
+
});
|
|
108
|
+
}
|
|
109
|
+
mapDelegateParamsToWalletParams(params) {
|
|
110
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
111
|
+
let walletParams;
|
|
112
|
+
yield this.client.showPrepare();
|
|
113
|
+
try {
|
|
114
|
+
walletParams = yield params();
|
|
115
|
+
}
|
|
116
|
+
catch (err) {
|
|
117
|
+
yield this.client.hideUI();
|
|
118
|
+
throw err;
|
|
119
|
+
}
|
|
120
|
+
return this.removeDefaultParams(walletParams, yield createSetDelegateOperation(this.formatParameters(walletParams)));
|
|
121
|
+
});
|
|
122
|
+
}
|
|
123
|
+
formatParameters(params) {
|
|
124
|
+
if (params.fee) {
|
|
125
|
+
params.fee = params.fee.toString();
|
|
126
|
+
}
|
|
127
|
+
if (params.storageLimit) {
|
|
128
|
+
params.storageLimit = params.storageLimit.toString();
|
|
129
|
+
}
|
|
130
|
+
if (params.gasLimit) {
|
|
131
|
+
params.gasLimit = params.gasLimit.toString();
|
|
132
|
+
}
|
|
133
|
+
return params;
|
|
134
|
+
}
|
|
135
|
+
removeDefaultParams(params, operatedParams) {
|
|
136
|
+
// If fee, storageLimit or gasLimit is undefined by user
|
|
137
|
+
// in case of beacon wallet, dont override it by
|
|
138
|
+
// defaults.
|
|
139
|
+
if (!params.fee) {
|
|
140
|
+
delete operatedParams.fee;
|
|
141
|
+
}
|
|
142
|
+
if (!params.storageLimit) {
|
|
143
|
+
delete operatedParams.storage_limit;
|
|
144
|
+
}
|
|
145
|
+
if (!params.gasLimit) {
|
|
146
|
+
delete operatedParams.gas_limit;
|
|
147
|
+
}
|
|
148
|
+
return operatedParams;
|
|
149
|
+
}
|
|
150
|
+
sendOperations(params) {
|
|
151
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
152
|
+
const account = yield this.client.getActiveAccount();
|
|
153
|
+
if (!account) {
|
|
154
|
+
throw new BeaconWalletNotInitialized();
|
|
155
|
+
}
|
|
156
|
+
const permissions = account.scopes;
|
|
157
|
+
this.validateRequiredScopesOrFail(permissions, [PermissionScope.OPERATION_REQUEST]);
|
|
158
|
+
const { transactionHash } = yield this.client.requestOperation({ operationDetails: params });
|
|
159
|
+
return transactionHash;
|
|
160
|
+
});
|
|
161
|
+
}
|
|
162
|
+
/**
|
|
163
|
+
*
|
|
164
|
+
* @description Removes all beacon values from the storage. After using this method, this instance is no longer usable.
|
|
165
|
+
* You will have to instanciate a new BeaconWallet.
|
|
166
|
+
*/
|
|
167
|
+
disconnect() {
|
|
168
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
169
|
+
yield this.client.destroy();
|
|
170
|
+
});
|
|
171
|
+
}
|
|
172
|
+
/**
|
|
173
|
+
*
|
|
174
|
+
* @description This method removes the active account from local storage by setting it to undefined.
|
|
175
|
+
*/
|
|
176
|
+
clearActiveAccount() {
|
|
177
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
178
|
+
yield this.client.setActiveAccount();
|
|
179
|
+
});
|
|
180
|
+
}
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
export { BeaconWallet, BeaconWalletNotInitialized, MissingRequiredScopes, VERSION };
|
|
184
|
+
//# sourceMappingURL=taquito-beacon-wallet.es6.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"taquito-beacon-wallet.es6.js","sources":["../src/version.ts","../src/taquito-beacon-wallet.ts"],"sourcesContent":["\n// IMPORTANT: THIS FILE IS AUTO GENERATED! DO NOT MANUALLY EDIT OR CHECKIN!\nexport const VERSION = {\n \"commitHash\": \"e03d983c780c7f96d8291ddd1251ea82f4581858\",\n \"version\": \"11.2.0-beta-RC.0\"\n};\n","/**\n * @packageDocumentation\n * @module @taquito/beacon-wallet\n */\n\nimport {\n DAppClient,\n DAppClientOptions,\n RequestPermissionInput,\n PermissionScope,\n} from '@airgap/beacon-sdk';\n\nimport {\n createOriginationOperation,\n createSetDelegateOperation,\n createTransferOperation,\n WalletDelegateParams,\n WalletOriginateParams,\n WalletProvider,\n WalletTransferParams,\n} from '@taquito/taquito';\n\nexport { VERSION } from './version';\n\nexport class BeaconWalletNotInitialized extends Error {\n name = 'BeaconWalletNotInitialized';\n\n constructor() {\n super('You need to initialize BeaconWallet by calling beaconWallet.requestPermissions first');\n }\n}\n\nexport class MissingRequiredScopes extends Error {\n name = 'MissingRequiredScopes';\n\n constructor(public requiredScopes: PermissionScope[]) {\n super(`Required permissions scopes were not granted: ${requiredScopes.join(',')}`);\n }\n}\n\nexport class BeaconWallet implements WalletProvider {\n public client: DAppClient;\n\n constructor(options: DAppClientOptions) {\n this.client = new DAppClient(options);\n }\n\n private validateRequiredScopesOrFail(\n permissionScopes: PermissionScope[],\n requiredScopes: PermissionScope[]\n ) {\n const mandatoryScope = new Set(requiredScopes);\n\n for (const scope of permissionScopes) {\n if (mandatoryScope.has(scope)) {\n mandatoryScope.delete(scope);\n }\n }\n\n if (mandatoryScope.size > 0) {\n throw new MissingRequiredScopes(Array.from(mandatoryScope));\n }\n }\n\n async requestPermissions(request?: RequestPermissionInput) {\n await this.client.requestPermissions(request);\n }\n\n async getPKH() {\n const account = await this.client.getActiveAccount();\n if (!account) {\n throw new BeaconWalletNotInitialized();\n }\n return account.address;\n }\n\n async mapTransferParamsToWalletParams(params: () => Promise<WalletTransferParams>) {\n let walletParams: WalletTransferParams;\n await this.client.showPrepare();\n try {\n walletParams = await params();\n } catch (err) {\n await this.client.hideUI();\n throw err;\n }\n return this.removeDefaultParams(\n walletParams,\n await createTransferOperation(this.formatParameters(walletParams))\n );\n }\n\n async mapOriginateParamsToWalletParams(params: () => Promise<WalletOriginateParams>) {\n let walletParams: WalletOriginateParams;\n await this.client.showPrepare();\n try {\n walletParams = await params();\n } catch (err) {\n await this.client.hideUI();\n throw err;\n }\n return this.removeDefaultParams(\n walletParams,\n await createOriginationOperation(this.formatParameters(walletParams))\n );\n }\n\n async mapDelegateParamsToWalletParams(params: () => Promise<WalletDelegateParams>) {\n let walletParams: WalletDelegateParams;\n await this.client.showPrepare();\n try {\n walletParams = await params();\n } catch (err) {\n await this.client.hideUI();\n throw err;\n }\n return this.removeDefaultParams(\n walletParams,\n await createSetDelegateOperation(this.formatParameters(walletParams))\n );\n }\n\n formatParameters(params: any) {\n if (params.fee) {\n params.fee = params.fee.toString();\n }\n if (params.storageLimit) {\n params.storageLimit = params.storageLimit.toString();\n }\n if (params.gasLimit) {\n params.gasLimit = params.gasLimit.toString();\n }\n return params;\n }\n\n removeDefaultParams(\n params: WalletTransferParams | WalletOriginateParams | WalletDelegateParams,\n operatedParams: any\n ) {\n // If fee, storageLimit or gasLimit is undefined by user\n // in case of beacon wallet, dont override it by\n // defaults.\n if (!params.fee) {\n delete operatedParams.fee;\n }\n if (!params.storageLimit) {\n delete operatedParams.storage_limit;\n }\n if (!params.gasLimit) {\n delete operatedParams.gas_limit;\n }\n return operatedParams;\n }\n\n async sendOperations(params: any[]) {\n const account = await this.client.getActiveAccount();\n if (!account) {\n throw new BeaconWalletNotInitialized();\n }\n const permissions = account.scopes;\n this.validateRequiredScopesOrFail(permissions, [PermissionScope.OPERATION_REQUEST]);\n\n const { transactionHash } = await this.client.requestOperation({ operationDetails: params });\n return transactionHash;\n }\n\n /**\n *\n * @description Removes all beacon values from the storage. After using this method, this instance is no longer usable.\n * You will have to instanciate a new BeaconWallet.\n */\n async disconnect() {\n await this.client.destroy();\n }\n\n /**\n *\n * @description This method removes the active account from local storage by setting it to undefined.\n */\n async clearActiveAccount() {\n await this.client.setActiveAccount();\n }\n}\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AACA;MACa,OAAO,GAAG;IACnB,YAAY,EAAE,0CAA0C;IACxD,SAAS,EAAE,kBAAkB;;;ACJjC;;;;MAwBa,0BAA2B,SAAQ,KAAK;IAGnD;QACE,KAAK,CA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