@taquito/beacon-wallet 19.2.0 → 20.0.0-beta.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/README.md +9 -13
- package/dist/lib/taquito-beacon-wallet.js +42 -0
- package/dist/lib/version.js +2 -2
- package/dist/taquito-beacon-wallet.es6.js +44 -2
- package/dist/taquito-beacon-wallet.es6.js.map +1 -1
- package/dist/taquito-beacon-wallet.umd.js +44 -2
- package/dist/taquito-beacon-wallet.umd.js.map +1 -1
- package/dist/types/taquito-beacon-wallet.d.ts +5 -2
- package/package.json +4 -4
package/README.md
CHANGED
|
@@ -26,23 +26,19 @@ import { BeaconWallet } from '@taquito/beacon-wallet';
|
|
|
26
26
|
const options = {
|
|
27
27
|
name: 'MyAwesomeDapp',
|
|
28
28
|
iconUrl: 'https://taquito.io/img/favicon.svg',
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
PERMISSION_REQUEST_SUCCESS: {
|
|
32
|
-
handler: async (data) => {
|
|
33
|
-
console.log('permission data:', data);
|
|
34
|
-
},
|
|
35
|
-
},
|
|
36
|
-
},
|
|
29
|
+
network: { type: 'ghostnet' },
|
|
30
|
+
enableMetrics: true,
|
|
37
31
|
};
|
|
38
32
|
const wallet = new BeaconWallet(options);
|
|
39
33
|
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
34
|
+
await wallet.client.subscribeToEvent(
|
|
35
|
+
BeaconEvent.ACTIVE_ACCOUNT_SET,
|
|
36
|
+
async (account) => {
|
|
37
|
+
// An active account has been set, update the dApp UI
|
|
38
|
+
console.log(`${BeaconEvent.ACTIVE_ACCOUNT_SET} triggered: `, account);
|
|
44
39
|
},
|
|
45
|
-
|
|
40
|
+
);
|
|
41
|
+
await wallet.requestPermissions();
|
|
46
42
|
|
|
47
43
|
const Tezos = new TezosToolkit('https://YOUR_PREFERRED_RPC_URL');
|
|
48
44
|
Tezos.setWalletProvider(wallet);
|
|
@@ -78,6 +78,48 @@ class BeaconWallet {
|
|
|
78
78
|
return this.removeDefaultParams(walletParams, yield (0, taquito_1.createTransferOperation)(this.formatParameters(walletParams)));
|
|
79
79
|
});
|
|
80
80
|
}
|
|
81
|
+
mapStakeParamsToWalletParams(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(['alert']);
|
|
90
|
+
throw err;
|
|
91
|
+
}
|
|
92
|
+
return this.removeDefaultParams(walletParams, yield (0, taquito_1.createTransferOperation)(this.formatParameters(walletParams)));
|
|
93
|
+
});
|
|
94
|
+
}
|
|
95
|
+
mapUnstakeParamsToWalletParams(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(['alert']);
|
|
104
|
+
throw err;
|
|
105
|
+
}
|
|
106
|
+
return this.removeDefaultParams(walletParams, yield (0, taquito_1.createTransferOperation)(this.formatParameters(walletParams)));
|
|
107
|
+
});
|
|
108
|
+
}
|
|
109
|
+
mapFinalizeUnstakeParamsToWalletParams(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(['alert']);
|
|
118
|
+
throw err;
|
|
119
|
+
}
|
|
120
|
+
return this.removeDefaultParams(walletParams, yield (0, taquito_1.createTransferOperation)(this.formatParameters(walletParams)));
|
|
121
|
+
});
|
|
122
|
+
}
|
|
81
123
|
mapIncreasePaidStorageWalletParams(params) {
|
|
82
124
|
return __awaiter(this, void 0, void 0, function* () {
|
|
83
125
|
let walletParams;
|
package/dist/lib/version.js
CHANGED
|
@@ -3,6 +3,6 @@ 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
5
|
exports.VERSION = {
|
|
6
|
-
"commitHash": "
|
|
7
|
-
"version": "
|
|
6
|
+
"commitHash": "0ef631853ccfda5c5faed584f16069f34085817e",
|
|
7
|
+
"version": "20.0.0-beta.0"
|
|
8
8
|
};
|
|
@@ -63,8 +63,8 @@ class MissingRequiredScopes extends PermissionDeniedError {
|
|
|
63
63
|
|
|
64
64
|
// IMPORTANT: THIS FILE IS AUTO GENERATED! DO NOT MANUALLY EDIT OR CHECKIN!
|
|
65
65
|
const VERSION = {
|
|
66
|
-
"commitHash": "
|
|
67
|
-
"version": "
|
|
66
|
+
"commitHash": "0ef631853ccfda5c5faed584f16069f34085817e",
|
|
67
|
+
"version": "20.0.0-beta.0"
|
|
68
68
|
};
|
|
69
69
|
|
|
70
70
|
/**
|
|
@@ -124,6 +124,48 @@ class BeaconWallet {
|
|
|
124
124
|
return this.removeDefaultParams(walletParams, yield createTransferOperation(this.formatParameters(walletParams)));
|
|
125
125
|
});
|
|
126
126
|
}
|
|
127
|
+
mapStakeParamsToWalletParams(params) {
|
|
128
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
129
|
+
let walletParams;
|
|
130
|
+
yield this.client.showPrepare();
|
|
131
|
+
try {
|
|
132
|
+
walletParams = yield params();
|
|
133
|
+
}
|
|
134
|
+
catch (err) {
|
|
135
|
+
yield this.client.hideUI(['alert']);
|
|
136
|
+
throw err;
|
|
137
|
+
}
|
|
138
|
+
return this.removeDefaultParams(walletParams, yield createTransferOperation(this.formatParameters(walletParams)));
|
|
139
|
+
});
|
|
140
|
+
}
|
|
141
|
+
mapUnstakeParamsToWalletParams(params) {
|
|
142
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
143
|
+
let walletParams;
|
|
144
|
+
yield this.client.showPrepare();
|
|
145
|
+
try {
|
|
146
|
+
walletParams = yield params();
|
|
147
|
+
}
|
|
148
|
+
catch (err) {
|
|
149
|
+
yield this.client.hideUI(['alert']);
|
|
150
|
+
throw err;
|
|
151
|
+
}
|
|
152
|
+
return this.removeDefaultParams(walletParams, yield createTransferOperation(this.formatParameters(walletParams)));
|
|
153
|
+
});
|
|
154
|
+
}
|
|
155
|
+
mapFinalizeUnstakeParamsToWalletParams(params) {
|
|
156
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
157
|
+
let walletParams;
|
|
158
|
+
yield this.client.showPrepare();
|
|
159
|
+
try {
|
|
160
|
+
walletParams = yield params();
|
|
161
|
+
}
|
|
162
|
+
catch (err) {
|
|
163
|
+
yield this.client.hideUI(['alert']);
|
|
164
|
+
throw err;
|
|
165
|
+
}
|
|
166
|
+
return this.removeDefaultParams(walletParams, yield createTransferOperation(this.formatParameters(walletParams)));
|
|
167
|
+
});
|
|
168
|
+
}
|
|
127
169
|
mapIncreasePaidStorageWalletParams(params) {
|
|
128
170
|
return __awaiter(this, void 0, void 0, function* () {
|
|
129
171
|
let walletParams;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"taquito-beacon-wallet.es6.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"taquito-beacon-wallet.es6.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -63,8 +63,8 @@
|
|
|
63
63
|
|
|
64
64
|
// IMPORTANT: THIS FILE IS AUTO GENERATED! DO NOT MANUALLY EDIT OR CHECKIN!
|
|
65
65
|
const VERSION = {
|
|
66
|
-
"commitHash": "
|
|
67
|
-
"version": "
|
|
66
|
+
"commitHash": "0ef631853ccfda5c5faed584f16069f34085817e",
|
|
67
|
+
"version": "20.0.0-beta.0"
|
|
68
68
|
};
|
|
69
69
|
|
|
70
70
|
/**
|
|
@@ -124,6 +124,48 @@
|
|
|
124
124
|
return this.removeDefaultParams(walletParams, yield taquito.createTransferOperation(this.formatParameters(walletParams)));
|
|
125
125
|
});
|
|
126
126
|
}
|
|
127
|
+
mapStakeParamsToWalletParams(params) {
|
|
128
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
129
|
+
let walletParams;
|
|
130
|
+
yield this.client.showPrepare();
|
|
131
|
+
try {
|
|
132
|
+
walletParams = yield params();
|
|
133
|
+
}
|
|
134
|
+
catch (err) {
|
|
135
|
+
yield this.client.hideUI(['alert']);
|
|
136
|
+
throw err;
|
|
137
|
+
}
|
|
138
|
+
return this.removeDefaultParams(walletParams, yield taquito.createTransferOperation(this.formatParameters(walletParams)));
|
|
139
|
+
});
|
|
140
|
+
}
|
|
141
|
+
mapUnstakeParamsToWalletParams(params) {
|
|
142
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
143
|
+
let walletParams;
|
|
144
|
+
yield this.client.showPrepare();
|
|
145
|
+
try {
|
|
146
|
+
walletParams = yield params();
|
|
147
|
+
}
|
|
148
|
+
catch (err) {
|
|
149
|
+
yield this.client.hideUI(['alert']);
|
|
150
|
+
throw err;
|
|
151
|
+
}
|
|
152
|
+
return this.removeDefaultParams(walletParams, yield taquito.createTransferOperation(this.formatParameters(walletParams)));
|
|
153
|
+
});
|
|
154
|
+
}
|
|
155
|
+
mapFinalizeUnstakeParamsToWalletParams(params) {
|
|
156
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
157
|
+
let walletParams;
|
|
158
|
+
yield this.client.showPrepare();
|
|
159
|
+
try {
|
|
160
|
+
walletParams = yield params();
|
|
161
|
+
}
|
|
162
|
+
catch (err) {
|
|
163
|
+
yield this.client.hideUI(['alert']);
|
|
164
|
+
throw err;
|
|
165
|
+
}
|
|
166
|
+
return this.removeDefaultParams(walletParams, yield taquito.createTransferOperation(this.formatParameters(walletParams)));
|
|
167
|
+
});
|
|
168
|
+
}
|
|
127
169
|
mapIncreasePaidStorageWalletParams(params) {
|
|
128
170
|
return __awaiter(this, void 0, void 0, function* () {
|
|
129
171
|
let walletParams;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"taquito-beacon-wallet.umd.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"taquito-beacon-wallet.umd.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* @module @taquito/beacon-wallet
|
|
4
4
|
*/
|
|
5
5
|
import { DAppClient, DAppClientOptions, RequestPermissionInput } from '@airgap/beacon-dapp';
|
|
6
|
-
import { WalletDelegateParams, WalletIncreasePaidStorageParams, WalletOriginateParams, WalletProvider, WalletTransferParams } from '@taquito/taquito';
|
|
6
|
+
import { WalletDelegateParams, WalletIncreasePaidStorageParams, WalletOriginateParams, WalletProvider, WalletTransferParams, WalletStakeParams, WalletUnstakeParams, WalletFinalizeUnstakeParams } from '@taquito/taquito';
|
|
7
7
|
export { VERSION } from './version';
|
|
8
8
|
export { BeaconWalletNotInitialized, MissingRequiredScopes } from './errors';
|
|
9
9
|
export declare class BeaconWallet implements WalletProvider {
|
|
@@ -14,11 +14,14 @@ export declare class BeaconWallet implements WalletProvider {
|
|
|
14
14
|
getPKH(): Promise<string>;
|
|
15
15
|
getPK(): Promise<string>;
|
|
16
16
|
mapTransferParamsToWalletParams(params: () => Promise<WalletTransferParams>): Promise<any>;
|
|
17
|
+
mapStakeParamsToWalletParams(params: () => Promise<WalletStakeParams>): Promise<any>;
|
|
18
|
+
mapUnstakeParamsToWalletParams(params: () => Promise<WalletUnstakeParams>): Promise<any>;
|
|
19
|
+
mapFinalizeUnstakeParamsToWalletParams(params: () => Promise<WalletFinalizeUnstakeParams>): Promise<any>;
|
|
17
20
|
mapIncreasePaidStorageWalletParams(params: () => Promise<WalletIncreasePaidStorageParams>): Promise<any>;
|
|
18
21
|
mapOriginateParamsToWalletParams(params: () => Promise<WalletOriginateParams>): Promise<any>;
|
|
19
22
|
mapDelegateParamsToWalletParams(params: () => Promise<WalletDelegateParams>): Promise<any>;
|
|
20
23
|
formatParameters(params: any): any;
|
|
21
|
-
removeDefaultParams(params: WalletTransferParams | WalletOriginateParams | WalletDelegateParams, operatedParams: any): any;
|
|
24
|
+
removeDefaultParams(params: WalletTransferParams | WalletStakeParams | WalletUnstakeParams | WalletFinalizeUnstakeParams | WalletOriginateParams | WalletDelegateParams, operatedParams: any): any;
|
|
22
25
|
sendOperations(params: any[]): Promise<string>;
|
|
23
26
|
/**
|
|
24
27
|
*
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@taquito/beacon-wallet",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "20.0.0-beta.0",
|
|
4
4
|
"description": "Beacon wallet provider",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"tezos",
|
|
@@ -68,8 +68,8 @@
|
|
|
68
68
|
},
|
|
69
69
|
"dependencies": {
|
|
70
70
|
"@airgap/beacon-dapp": "^4.2.1",
|
|
71
|
-
"@taquito/core": "^
|
|
72
|
-
"@taquito/taquito": "^
|
|
71
|
+
"@taquito/core": "^20.0.0-beta.0",
|
|
72
|
+
"@taquito/taquito": "^20.0.0-beta.0"
|
|
73
73
|
},
|
|
74
74
|
"devDependencies": {
|
|
75
75
|
"@types/bluebird": "^3.5.40",
|
|
@@ -103,5 +103,5 @@
|
|
|
103
103
|
"webpack": "^5.89.0",
|
|
104
104
|
"webpack-cli": "^5.1.4"
|
|
105
105
|
},
|
|
106
|
-
"gitHead": "
|
|
106
|
+
"gitHead": "88980709574468fad5e4e7d63d34e1d71accf550"
|
|
107
107
|
}
|