@taquito/beacon-wallet 19.2.1 → 20.0.0-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.
@@ -28,6 +28,7 @@ Object.defineProperty(exports, "MissingRequiredScopes", { enumerable: true, get:
28
28
  class BeaconWallet {
29
29
  constructor(options) {
30
30
  this.client = (0, beacon_dapp_1.getDAppClientInstance)(options);
31
+ // Subscribe to the active account set event, this will update when there are account changes happening in the dApp
31
32
  this.client.subscribeToEvent(beacon_dapp_1.BeaconEvent.ACTIVE_ACCOUNT_SET, (data) => __awaiter(this, void 0, void 0, function* () {
32
33
  this.account = data;
33
34
  }));
@@ -79,6 +80,48 @@ class BeaconWallet {
79
80
  return this.removeDefaultParams(walletParams, yield (0, taquito_1.createTransferOperation)(this.formatParameters(walletParams)));
80
81
  });
81
82
  }
83
+ mapStakeParamsToWalletParams(params) {
84
+ return __awaiter(this, void 0, void 0, function* () {
85
+ let walletParams;
86
+ yield this.client.showPrepare();
87
+ try {
88
+ walletParams = yield params();
89
+ }
90
+ catch (err) {
91
+ yield this.client.hideUI(['alert']);
92
+ throw err;
93
+ }
94
+ return this.removeDefaultParams(walletParams, yield (0, taquito_1.createTransferOperation)(this.formatParameters(walletParams)));
95
+ });
96
+ }
97
+ mapUnstakeParamsToWalletParams(params) {
98
+ return __awaiter(this, void 0, void 0, function* () {
99
+ let walletParams;
100
+ yield this.client.showPrepare();
101
+ try {
102
+ walletParams = yield params();
103
+ }
104
+ catch (err) {
105
+ yield this.client.hideUI(['alert']);
106
+ throw err;
107
+ }
108
+ return this.removeDefaultParams(walletParams, yield (0, taquito_1.createTransferOperation)(this.formatParameters(walletParams)));
109
+ });
110
+ }
111
+ mapFinalizeUnstakeParamsToWalletParams(params) {
112
+ return __awaiter(this, void 0, void 0, function* () {
113
+ let walletParams;
114
+ yield this.client.showPrepare();
115
+ try {
116
+ walletParams = yield params();
117
+ }
118
+ catch (err) {
119
+ yield this.client.hideUI(['alert']);
120
+ throw err;
121
+ }
122
+ return this.removeDefaultParams(walletParams, yield (0, taquito_1.createTransferOperation)(this.formatParameters(walletParams)));
123
+ });
124
+ }
82
125
  mapIncreasePaidStorageWalletParams(params) {
83
126
  return __awaiter(this, void 0, void 0, function* () {
84
127
  let walletParams;
@@ -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": "2e05f6f865be17a1b367b284542b24ffa9823271",
7
- "version": "19.2.1"
6
+ "commitHash": "8e07853b62879d06b02ba80c84004fb591452edb",
7
+ "version": "20.0.0-RC.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": "2e05f6f865be17a1b367b284542b24ffa9823271",
67
- "version": "19.2.1"
66
+ "commitHash": "8e07853b62879d06b02ba80c84004fb591452edb",
67
+ "version": "20.0.0-RC.0"
68
68
  };
69
69
 
70
70
  /**
@@ -74,6 +74,7 @@ const VERSION = {
74
74
  class BeaconWallet {
75
75
  constructor(options) {
76
76
  this.client = getDAppClientInstance(options);
77
+ // Subscribe to the active account set event, this will update when there are account changes happening in the dApp
77
78
  this.client.subscribeToEvent(BeaconEvent.ACTIVE_ACCOUNT_SET, (data) => __awaiter(this, void 0, void 0, function* () {
78
79
  this.account = data;
79
80
  }));
@@ -125,6 +126,48 @@ class BeaconWallet {
125
126
  return this.removeDefaultParams(walletParams, yield createTransferOperation(this.formatParameters(walletParams)));
126
127
  });
127
128
  }
129
+ mapStakeParamsToWalletParams(params) {
130
+ return __awaiter(this, void 0, void 0, function* () {
131
+ let walletParams;
132
+ yield this.client.showPrepare();
133
+ try {
134
+ walletParams = yield params();
135
+ }
136
+ catch (err) {
137
+ yield this.client.hideUI(['alert']);
138
+ throw err;
139
+ }
140
+ return this.removeDefaultParams(walletParams, yield createTransferOperation(this.formatParameters(walletParams)));
141
+ });
142
+ }
143
+ mapUnstakeParamsToWalletParams(params) {
144
+ return __awaiter(this, void 0, void 0, function* () {
145
+ let walletParams;
146
+ yield this.client.showPrepare();
147
+ try {
148
+ walletParams = yield params();
149
+ }
150
+ catch (err) {
151
+ yield this.client.hideUI(['alert']);
152
+ throw err;
153
+ }
154
+ return this.removeDefaultParams(walletParams, yield createTransferOperation(this.formatParameters(walletParams)));
155
+ });
156
+ }
157
+ mapFinalizeUnstakeParamsToWalletParams(params) {
158
+ return __awaiter(this, void 0, void 0, function* () {
159
+ let walletParams;
160
+ yield this.client.showPrepare();
161
+ try {
162
+ walletParams = yield params();
163
+ }
164
+ catch (err) {
165
+ yield this.client.hideUI(['alert']);
166
+ throw err;
167
+ }
168
+ return this.removeDefaultParams(walletParams, yield createTransferOperation(this.formatParameters(walletParams)));
169
+ });
170
+ }
128
171
  mapIncreasePaidStorageWalletParams(params) {
129
172
  return __awaiter(this, void 0, void 0, function* () {
130
173
  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": "2e05f6f865be17a1b367b284542b24ffa9823271",
67
- "version": "19.2.1"
66
+ "commitHash": "8e07853b62879d06b02ba80c84004fb591452edb",
67
+ "version": "20.0.0-RC.0"
68
68
  };
69
69
 
70
70
  /**
@@ -74,6 +74,7 @@
74
74
  class BeaconWallet {
75
75
  constructor(options) {
76
76
  this.client = beaconDapp.getDAppClientInstance(options);
77
+ // Subscribe to the active account set event, this will update when there are account changes happening in the dApp
77
78
  this.client.subscribeToEvent(beaconDapp.BeaconEvent.ACTIVE_ACCOUNT_SET, (data) => __awaiter(this, void 0, void 0, function* () {
78
79
  this.account = data;
79
80
  }));
@@ -125,6 +126,48 @@
125
126
  return this.removeDefaultParams(walletParams, yield taquito.createTransferOperation(this.formatParameters(walletParams)));
126
127
  });
127
128
  }
129
+ mapStakeParamsToWalletParams(params) {
130
+ return __awaiter(this, void 0, void 0, function* () {
131
+ let walletParams;
132
+ yield this.client.showPrepare();
133
+ try {
134
+ walletParams = yield params();
135
+ }
136
+ catch (err) {
137
+ yield this.client.hideUI(['alert']);
138
+ throw err;
139
+ }
140
+ return this.removeDefaultParams(walletParams, yield taquito.createTransferOperation(this.formatParameters(walletParams)));
141
+ });
142
+ }
143
+ mapUnstakeParamsToWalletParams(params) {
144
+ return __awaiter(this, void 0, void 0, function* () {
145
+ let walletParams;
146
+ yield this.client.showPrepare();
147
+ try {
148
+ walletParams = yield params();
149
+ }
150
+ catch (err) {
151
+ yield this.client.hideUI(['alert']);
152
+ throw err;
153
+ }
154
+ return this.removeDefaultParams(walletParams, yield taquito.createTransferOperation(this.formatParameters(walletParams)));
155
+ });
156
+ }
157
+ mapFinalizeUnstakeParamsToWalletParams(params) {
158
+ return __awaiter(this, void 0, void 0, function* () {
159
+ let walletParams;
160
+ yield this.client.showPrepare();
161
+ try {
162
+ walletParams = yield params();
163
+ }
164
+ catch (err) {
165
+ yield this.client.hideUI(['alert']);
166
+ throw err;
167
+ }
168
+ return this.removeDefaultParams(walletParams, yield taquito.createTransferOperation(this.formatParameters(walletParams)));
169
+ });
170
+ }
128
171
  mapIncreasePaidStorageWalletParams(params) {
129
172
  return __awaiter(this, void 0, void 0, function* () {
130
173
  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, AccountInfo } 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 {
@@ -15,11 +15,14 @@ export declare class BeaconWallet implements WalletProvider {
15
15
  getPKH(): Promise<string>;
16
16
  getPK(): Promise<string>;
17
17
  mapTransferParamsToWalletParams(params: () => Promise<WalletTransferParams>): Promise<any>;
18
+ mapStakeParamsToWalletParams(params: () => Promise<WalletStakeParams>): Promise<any>;
19
+ mapUnstakeParamsToWalletParams(params: () => Promise<WalletUnstakeParams>): Promise<any>;
20
+ mapFinalizeUnstakeParamsToWalletParams(params: () => Promise<WalletFinalizeUnstakeParams>): Promise<any>;
18
21
  mapIncreasePaidStorageWalletParams(params: () => Promise<WalletIncreasePaidStorageParams>): Promise<any>;
19
22
  mapOriginateParamsToWalletParams(params: () => Promise<WalletOriginateParams>): Promise<any>;
20
23
  mapDelegateParamsToWalletParams(params: () => Promise<WalletDelegateParams>): Promise<any>;
21
24
  formatParameters(params: any): any;
22
- removeDefaultParams(params: WalletTransferParams | WalletOriginateParams | WalletDelegateParams, operatedParams: any): any;
25
+ removeDefaultParams(params: WalletTransferParams | WalletStakeParams | WalletUnstakeParams | WalletFinalizeUnstakeParams | WalletOriginateParams | WalletDelegateParams, operatedParams: any): any;
23
26
  sendOperations(params: any[]): Promise<string>;
24
27
  /**
25
28
  *
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@taquito/beacon-wallet",
3
- "version": "19.2.1",
3
+ "version": "20.0.0-RC.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.2",
71
- "@taquito/core": "^19.2.1",
72
- "@taquito/taquito": "^19.2.1"
71
+ "@taquito/core": "^20.0.0-RC.0",
72
+ "@taquito/taquito": "^20.0.0-RC.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": "3b9dbecb374ffd8136f494ae0817b2d1d530f8d9"
106
+ "gitHead": "35bba2dcede224a126fd82e28c441756a5b962e6"
107
107
  }