@solana-mobile/wallet-adapter-mobile 0.0.1-alpha.5 → 0.0.1-alpha.6
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/lib/cjs/index.browser.js +13 -13
- package/lib/cjs/index.js +13 -13
- package/lib/cjs/index.native.js +13 -13
- package/lib/esm/index.browser.mjs +13 -13
- package/lib/esm/index.mjs +13 -13
- package/package.json +3 -3
package/lib/cjs/index.browser.js
CHANGED
|
@@ -98,8 +98,8 @@ class SolanaMobileWalletAdapter extends walletAdapterBase.BaseMessageSignerWalle
|
|
|
98
98
|
return;
|
|
99
99
|
}
|
|
100
100
|
try {
|
|
101
|
-
yield this.transact((
|
|
102
|
-
const { auth_token, pub_key: base58PublicKey, wallet_uri_base, } = yield
|
|
101
|
+
yield this.transact((wallet) => __awaiter(this, void 0, void 0, function* () {
|
|
102
|
+
const { auth_token, pub_key: base58PublicKey, wallet_uri_base, } = yield wallet.authorize({ identity: this._appIdentity });
|
|
103
103
|
try {
|
|
104
104
|
this._publicKey = new web3_js.PublicKey(base58PublicKey);
|
|
105
105
|
}
|
|
@@ -131,10 +131,10 @@ class SolanaMobileWalletAdapter extends walletAdapterBase.BaseMessageSignerWalle
|
|
|
131
131
|
yield this._authorizationResultCache.set(authorizationResult);
|
|
132
132
|
});
|
|
133
133
|
}
|
|
134
|
-
performReauthorization(
|
|
134
|
+
performReauthorization(wallet, currentAuthorizationResult) {
|
|
135
135
|
return __awaiter(this, void 0, void 0, function* () {
|
|
136
136
|
try {
|
|
137
|
-
const { auth_token } = yield
|
|
137
|
+
const { auth_token } = yield wallet.reauthorize({
|
|
138
138
|
auth_token: currentAuthorizationResult.auth_token,
|
|
139
139
|
});
|
|
140
140
|
if (currentAuthorizationResult.auth_token !== auth_token) {
|
|
@@ -175,9 +175,9 @@ class SolanaMobileWalletAdapter extends walletAdapterBase.BaseMessageSignerWalle
|
|
|
175
175
|
try {
|
|
176
176
|
const authorizationResult = this.assertIsAuthorized();
|
|
177
177
|
try {
|
|
178
|
-
return yield this.transact((
|
|
179
|
-
const freshAuthToken = yield this.performReauthorization(
|
|
180
|
-
const signedTransactions = yield
|
|
178
|
+
return yield this.transact((wallet) => __awaiter(this, void 0, void 0, function* () {
|
|
179
|
+
const freshAuthToken = yield this.performReauthorization(wallet, authorizationResult);
|
|
180
|
+
const signedTransactions = yield wallet.signTransaction({
|
|
181
181
|
auth_token: freshAuthToken,
|
|
182
182
|
transactions,
|
|
183
183
|
});
|
|
@@ -199,9 +199,9 @@ class SolanaMobileWalletAdapter extends walletAdapterBase.BaseMessageSignerWalle
|
|
|
199
199
|
try {
|
|
200
200
|
const authorizationResult = this.assertIsAuthorized();
|
|
201
201
|
try {
|
|
202
|
-
return yield this.transact((
|
|
203
|
-
const freshAuthToken = yield this.performReauthorization(
|
|
204
|
-
const signatures = yield
|
|
202
|
+
return yield this.transact((wallet) => __awaiter(this, void 0, void 0, function* () {
|
|
203
|
+
const freshAuthToken = yield this.performReauthorization(wallet, authorizationResult);
|
|
204
|
+
const signatures = yield wallet.signAndSendTransaction({
|
|
205
205
|
auth_token: freshAuthToken,
|
|
206
206
|
fee_payer: this.publicKey || undefined,
|
|
207
207
|
connection,
|
|
@@ -237,9 +237,9 @@ class SolanaMobileWalletAdapter extends walletAdapterBase.BaseMessageSignerWalle
|
|
|
237
237
|
try {
|
|
238
238
|
const authorizationResult = this.assertIsAuthorized();
|
|
239
239
|
try {
|
|
240
|
-
return yield this.transact((
|
|
241
|
-
const freshAuthToken = yield this.performReauthorization(
|
|
242
|
-
const [signedMessage] = yield
|
|
240
|
+
return yield this.transact((wallet) => __awaiter(this, void 0, void 0, function* () {
|
|
241
|
+
const freshAuthToken = yield this.performReauthorization(wallet, authorizationResult);
|
|
242
|
+
const [signedMessage] = yield wallet.signMessage({
|
|
243
243
|
auth_token: freshAuthToken,
|
|
244
244
|
payloads: [message],
|
|
245
245
|
});
|
package/lib/cjs/index.js
CHANGED
|
@@ -98,8 +98,8 @@ class SolanaMobileWalletAdapter extends walletAdapterBase.BaseMessageSignerWalle
|
|
|
98
98
|
return;
|
|
99
99
|
}
|
|
100
100
|
try {
|
|
101
|
-
yield this.transact((
|
|
102
|
-
const { auth_token, pub_key: base58PublicKey, wallet_uri_base, } = yield
|
|
101
|
+
yield this.transact((wallet) => __awaiter(this, void 0, void 0, function* () {
|
|
102
|
+
const { auth_token, pub_key: base58PublicKey, wallet_uri_base, } = yield wallet.authorize({ identity: this._appIdentity });
|
|
103
103
|
try {
|
|
104
104
|
this._publicKey = new web3_js.PublicKey(base58PublicKey);
|
|
105
105
|
}
|
|
@@ -131,10 +131,10 @@ class SolanaMobileWalletAdapter extends walletAdapterBase.BaseMessageSignerWalle
|
|
|
131
131
|
yield this._authorizationResultCache.set(authorizationResult);
|
|
132
132
|
});
|
|
133
133
|
}
|
|
134
|
-
performReauthorization(
|
|
134
|
+
performReauthorization(wallet, currentAuthorizationResult) {
|
|
135
135
|
return __awaiter(this, void 0, void 0, function* () {
|
|
136
136
|
try {
|
|
137
|
-
const { auth_token } = yield
|
|
137
|
+
const { auth_token } = yield wallet.reauthorize({
|
|
138
138
|
auth_token: currentAuthorizationResult.auth_token,
|
|
139
139
|
});
|
|
140
140
|
if (currentAuthorizationResult.auth_token !== auth_token) {
|
|
@@ -175,9 +175,9 @@ class SolanaMobileWalletAdapter extends walletAdapterBase.BaseMessageSignerWalle
|
|
|
175
175
|
try {
|
|
176
176
|
const authorizationResult = this.assertIsAuthorized();
|
|
177
177
|
try {
|
|
178
|
-
return yield this.transact((
|
|
179
|
-
const freshAuthToken = yield this.performReauthorization(
|
|
180
|
-
const signedTransactions = yield
|
|
178
|
+
return yield this.transact((wallet) => __awaiter(this, void 0, void 0, function* () {
|
|
179
|
+
const freshAuthToken = yield this.performReauthorization(wallet, authorizationResult);
|
|
180
|
+
const signedTransactions = yield wallet.signTransaction({
|
|
181
181
|
auth_token: freshAuthToken,
|
|
182
182
|
transactions,
|
|
183
183
|
});
|
|
@@ -199,9 +199,9 @@ class SolanaMobileWalletAdapter extends walletAdapterBase.BaseMessageSignerWalle
|
|
|
199
199
|
try {
|
|
200
200
|
const authorizationResult = this.assertIsAuthorized();
|
|
201
201
|
try {
|
|
202
|
-
return yield this.transact((
|
|
203
|
-
const freshAuthToken = yield this.performReauthorization(
|
|
204
|
-
const signatures = yield
|
|
202
|
+
return yield this.transact((wallet) => __awaiter(this, void 0, void 0, function* () {
|
|
203
|
+
const freshAuthToken = yield this.performReauthorization(wallet, authorizationResult);
|
|
204
|
+
const signatures = yield wallet.signAndSendTransaction({
|
|
205
205
|
auth_token: freshAuthToken,
|
|
206
206
|
fee_payer: this.publicKey || undefined,
|
|
207
207
|
connection,
|
|
@@ -237,9 +237,9 @@ class SolanaMobileWalletAdapter extends walletAdapterBase.BaseMessageSignerWalle
|
|
|
237
237
|
try {
|
|
238
238
|
const authorizationResult = this.assertIsAuthorized();
|
|
239
239
|
try {
|
|
240
|
-
return yield this.transact((
|
|
241
|
-
const freshAuthToken = yield this.performReauthorization(
|
|
242
|
-
const [signedMessage] = yield
|
|
240
|
+
return yield this.transact((wallet) => __awaiter(this, void 0, void 0, function* () {
|
|
241
|
+
const freshAuthToken = yield this.performReauthorization(wallet, authorizationResult);
|
|
242
|
+
const [signedMessage] = yield wallet.signMessage({
|
|
243
243
|
auth_token: freshAuthToken,
|
|
244
244
|
payloads: [message],
|
|
245
245
|
});
|
package/lib/cjs/index.native.js
CHANGED
|
@@ -101,8 +101,8 @@ class SolanaMobileWalletAdapter extends walletAdapterBase.BaseMessageSignerWalle
|
|
|
101
101
|
return;
|
|
102
102
|
}
|
|
103
103
|
try {
|
|
104
|
-
yield this.transact((
|
|
105
|
-
const { auth_token, pub_key: base58PublicKey, wallet_uri_base, } = yield
|
|
104
|
+
yield this.transact((wallet) => __awaiter(this, void 0, void 0, function* () {
|
|
105
|
+
const { auth_token, pub_key: base58PublicKey, wallet_uri_base, } = yield wallet.authorize({ identity: this._appIdentity });
|
|
106
106
|
try {
|
|
107
107
|
this._publicKey = new web3_js.PublicKey(base58PublicKey);
|
|
108
108
|
}
|
|
@@ -134,10 +134,10 @@ class SolanaMobileWalletAdapter extends walletAdapterBase.BaseMessageSignerWalle
|
|
|
134
134
|
yield this._authorizationResultCache.set(authorizationResult);
|
|
135
135
|
});
|
|
136
136
|
}
|
|
137
|
-
performReauthorization(
|
|
137
|
+
performReauthorization(wallet, currentAuthorizationResult) {
|
|
138
138
|
return __awaiter(this, void 0, void 0, function* () {
|
|
139
139
|
try {
|
|
140
|
-
const { auth_token } = yield
|
|
140
|
+
const { auth_token } = yield wallet.reauthorize({
|
|
141
141
|
auth_token: currentAuthorizationResult.auth_token,
|
|
142
142
|
});
|
|
143
143
|
if (currentAuthorizationResult.auth_token !== auth_token) {
|
|
@@ -178,9 +178,9 @@ class SolanaMobileWalletAdapter extends walletAdapterBase.BaseMessageSignerWalle
|
|
|
178
178
|
try {
|
|
179
179
|
const authorizationResult = this.assertIsAuthorized();
|
|
180
180
|
try {
|
|
181
|
-
return yield this.transact((
|
|
182
|
-
const freshAuthToken = yield this.performReauthorization(
|
|
183
|
-
const signedTransactions = yield
|
|
181
|
+
return yield this.transact((wallet) => __awaiter(this, void 0, void 0, function* () {
|
|
182
|
+
const freshAuthToken = yield this.performReauthorization(wallet, authorizationResult);
|
|
183
|
+
const signedTransactions = yield wallet.signTransaction({
|
|
184
184
|
auth_token: freshAuthToken,
|
|
185
185
|
transactions,
|
|
186
186
|
});
|
|
@@ -202,9 +202,9 @@ class SolanaMobileWalletAdapter extends walletAdapterBase.BaseMessageSignerWalle
|
|
|
202
202
|
try {
|
|
203
203
|
const authorizationResult = this.assertIsAuthorized();
|
|
204
204
|
try {
|
|
205
|
-
return yield this.transact((
|
|
206
|
-
const freshAuthToken = yield this.performReauthorization(
|
|
207
|
-
const signatures = yield
|
|
205
|
+
return yield this.transact((wallet) => __awaiter(this, void 0, void 0, function* () {
|
|
206
|
+
const freshAuthToken = yield this.performReauthorization(wallet, authorizationResult);
|
|
207
|
+
const signatures = yield wallet.signAndSendTransaction({
|
|
208
208
|
auth_token: freshAuthToken,
|
|
209
209
|
fee_payer: this.publicKey || undefined,
|
|
210
210
|
connection,
|
|
@@ -240,9 +240,9 @@ class SolanaMobileWalletAdapter extends walletAdapterBase.BaseMessageSignerWalle
|
|
|
240
240
|
try {
|
|
241
241
|
const authorizationResult = this.assertIsAuthorized();
|
|
242
242
|
try {
|
|
243
|
-
return yield this.transact((
|
|
244
|
-
const freshAuthToken = yield this.performReauthorization(
|
|
245
|
-
const [signedMessage] = yield
|
|
243
|
+
return yield this.transact((wallet) => __awaiter(this, void 0, void 0, function* () {
|
|
244
|
+
const freshAuthToken = yield this.performReauthorization(wallet, authorizationResult);
|
|
245
|
+
const [signedMessage] = yield wallet.signMessage({
|
|
246
246
|
auth_token: freshAuthToken,
|
|
247
247
|
payloads: [message],
|
|
248
248
|
});
|
|
@@ -94,8 +94,8 @@ class SolanaMobileWalletAdapter extends BaseMessageSignerWalletAdapter {
|
|
|
94
94
|
return;
|
|
95
95
|
}
|
|
96
96
|
try {
|
|
97
|
-
yield this.transact((
|
|
98
|
-
const { auth_token, pub_key: base58PublicKey, wallet_uri_base, } = yield
|
|
97
|
+
yield this.transact((wallet) => __awaiter(this, void 0, void 0, function* () {
|
|
98
|
+
const { auth_token, pub_key: base58PublicKey, wallet_uri_base, } = yield wallet.authorize({ identity: this._appIdentity });
|
|
99
99
|
try {
|
|
100
100
|
this._publicKey = new PublicKey(base58PublicKey);
|
|
101
101
|
}
|
|
@@ -127,10 +127,10 @@ class SolanaMobileWalletAdapter extends BaseMessageSignerWalletAdapter {
|
|
|
127
127
|
yield this._authorizationResultCache.set(authorizationResult);
|
|
128
128
|
});
|
|
129
129
|
}
|
|
130
|
-
performReauthorization(
|
|
130
|
+
performReauthorization(wallet, currentAuthorizationResult) {
|
|
131
131
|
return __awaiter(this, void 0, void 0, function* () {
|
|
132
132
|
try {
|
|
133
|
-
const { auth_token } = yield
|
|
133
|
+
const { auth_token } = yield wallet.reauthorize({
|
|
134
134
|
auth_token: currentAuthorizationResult.auth_token,
|
|
135
135
|
});
|
|
136
136
|
if (currentAuthorizationResult.auth_token !== auth_token) {
|
|
@@ -171,9 +171,9 @@ class SolanaMobileWalletAdapter extends BaseMessageSignerWalletAdapter {
|
|
|
171
171
|
try {
|
|
172
172
|
const authorizationResult = this.assertIsAuthorized();
|
|
173
173
|
try {
|
|
174
|
-
return yield this.transact((
|
|
175
|
-
const freshAuthToken = yield this.performReauthorization(
|
|
176
|
-
const signedTransactions = yield
|
|
174
|
+
return yield this.transact((wallet) => __awaiter(this, void 0, void 0, function* () {
|
|
175
|
+
const freshAuthToken = yield this.performReauthorization(wallet, authorizationResult);
|
|
176
|
+
const signedTransactions = yield wallet.signTransaction({
|
|
177
177
|
auth_token: freshAuthToken,
|
|
178
178
|
transactions,
|
|
179
179
|
});
|
|
@@ -195,9 +195,9 @@ class SolanaMobileWalletAdapter extends BaseMessageSignerWalletAdapter {
|
|
|
195
195
|
try {
|
|
196
196
|
const authorizationResult = this.assertIsAuthorized();
|
|
197
197
|
try {
|
|
198
|
-
return yield this.transact((
|
|
199
|
-
const freshAuthToken = yield this.performReauthorization(
|
|
200
|
-
const signatures = yield
|
|
198
|
+
return yield this.transact((wallet) => __awaiter(this, void 0, void 0, function* () {
|
|
199
|
+
const freshAuthToken = yield this.performReauthorization(wallet, authorizationResult);
|
|
200
|
+
const signatures = yield wallet.signAndSendTransaction({
|
|
201
201
|
auth_token: freshAuthToken,
|
|
202
202
|
fee_payer: this.publicKey || undefined,
|
|
203
203
|
connection,
|
|
@@ -233,9 +233,9 @@ class SolanaMobileWalletAdapter extends BaseMessageSignerWalletAdapter {
|
|
|
233
233
|
try {
|
|
234
234
|
const authorizationResult = this.assertIsAuthorized();
|
|
235
235
|
try {
|
|
236
|
-
return yield this.transact((
|
|
237
|
-
const freshAuthToken = yield this.performReauthorization(
|
|
238
|
-
const [signedMessage] = yield
|
|
236
|
+
return yield this.transact((wallet) => __awaiter(this, void 0, void 0, function* () {
|
|
237
|
+
const freshAuthToken = yield this.performReauthorization(wallet, authorizationResult);
|
|
238
|
+
const [signedMessage] = yield wallet.signMessage({
|
|
239
239
|
auth_token: freshAuthToken,
|
|
240
240
|
payloads: [message],
|
|
241
241
|
});
|
package/lib/esm/index.mjs
CHANGED
|
@@ -94,8 +94,8 @@ class SolanaMobileWalletAdapter extends BaseMessageSignerWalletAdapter {
|
|
|
94
94
|
return;
|
|
95
95
|
}
|
|
96
96
|
try {
|
|
97
|
-
yield this.transact((
|
|
98
|
-
const { auth_token, pub_key: base58PublicKey, wallet_uri_base, } = yield
|
|
97
|
+
yield this.transact((wallet) => __awaiter(this, void 0, void 0, function* () {
|
|
98
|
+
const { auth_token, pub_key: base58PublicKey, wallet_uri_base, } = yield wallet.authorize({ identity: this._appIdentity });
|
|
99
99
|
try {
|
|
100
100
|
this._publicKey = new PublicKey(base58PublicKey);
|
|
101
101
|
}
|
|
@@ -127,10 +127,10 @@ class SolanaMobileWalletAdapter extends BaseMessageSignerWalletAdapter {
|
|
|
127
127
|
yield this._authorizationResultCache.set(authorizationResult);
|
|
128
128
|
});
|
|
129
129
|
}
|
|
130
|
-
performReauthorization(
|
|
130
|
+
performReauthorization(wallet, currentAuthorizationResult) {
|
|
131
131
|
return __awaiter(this, void 0, void 0, function* () {
|
|
132
132
|
try {
|
|
133
|
-
const { auth_token } = yield
|
|
133
|
+
const { auth_token } = yield wallet.reauthorize({
|
|
134
134
|
auth_token: currentAuthorizationResult.auth_token,
|
|
135
135
|
});
|
|
136
136
|
if (currentAuthorizationResult.auth_token !== auth_token) {
|
|
@@ -171,9 +171,9 @@ class SolanaMobileWalletAdapter extends BaseMessageSignerWalletAdapter {
|
|
|
171
171
|
try {
|
|
172
172
|
const authorizationResult = this.assertIsAuthorized();
|
|
173
173
|
try {
|
|
174
|
-
return yield this.transact((
|
|
175
|
-
const freshAuthToken = yield this.performReauthorization(
|
|
176
|
-
const signedTransactions = yield
|
|
174
|
+
return yield this.transact((wallet) => __awaiter(this, void 0, void 0, function* () {
|
|
175
|
+
const freshAuthToken = yield this.performReauthorization(wallet, authorizationResult);
|
|
176
|
+
const signedTransactions = yield wallet.signTransaction({
|
|
177
177
|
auth_token: freshAuthToken,
|
|
178
178
|
transactions,
|
|
179
179
|
});
|
|
@@ -195,9 +195,9 @@ class SolanaMobileWalletAdapter extends BaseMessageSignerWalletAdapter {
|
|
|
195
195
|
try {
|
|
196
196
|
const authorizationResult = this.assertIsAuthorized();
|
|
197
197
|
try {
|
|
198
|
-
return yield this.transact((
|
|
199
|
-
const freshAuthToken = yield this.performReauthorization(
|
|
200
|
-
const signatures = yield
|
|
198
|
+
return yield this.transact((wallet) => __awaiter(this, void 0, void 0, function* () {
|
|
199
|
+
const freshAuthToken = yield this.performReauthorization(wallet, authorizationResult);
|
|
200
|
+
const signatures = yield wallet.signAndSendTransaction({
|
|
201
201
|
auth_token: freshAuthToken,
|
|
202
202
|
fee_payer: this.publicKey || undefined,
|
|
203
203
|
connection,
|
|
@@ -233,9 +233,9 @@ class SolanaMobileWalletAdapter extends BaseMessageSignerWalletAdapter {
|
|
|
233
233
|
try {
|
|
234
234
|
const authorizationResult = this.assertIsAuthorized();
|
|
235
235
|
try {
|
|
236
|
-
return yield this.transact((
|
|
237
|
-
const freshAuthToken = yield this.performReauthorization(
|
|
238
|
-
const [signedMessage] = yield
|
|
236
|
+
return yield this.transact((wallet) => __awaiter(this, void 0, void 0, function* () {
|
|
237
|
+
const freshAuthToken = yield this.performReauthorization(wallet, authorizationResult);
|
|
238
|
+
const [signedMessage] = yield wallet.signMessage({
|
|
239
239
|
auth_token: freshAuthToken,
|
|
240
240
|
payloads: [message],
|
|
241
241
|
});
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@solana-mobile/wallet-adapter-mobile",
|
|
3
3
|
"description": "An adapter for mobile wallet apps that conform to the Solana Mobile Wallet Adapter protocol",
|
|
4
|
-
"version": "0.0.1-alpha.
|
|
4
|
+
"version": "0.0.1-alpha.6",
|
|
5
5
|
"author": "Steven Luscher <steven.luscher@solanamobile.com>",
|
|
6
6
|
"repository": "https://github.com/solana-mobile/mobile-wallet-adapter",
|
|
7
7
|
"license": "Apache-2.0",
|
|
@@ -41,7 +41,7 @@
|
|
|
41
41
|
},
|
|
42
42
|
"dependencies": {
|
|
43
43
|
"@react-native-async-storage/async-storage": "^1.17.7",
|
|
44
|
-
"@solana-mobile/mobile-wallet-adapter-protocol-web3js": "^0.0.1-alpha.
|
|
44
|
+
"@solana-mobile/mobile-wallet-adapter-protocol-web3js": "^0.0.1-alpha.6",
|
|
45
45
|
"@solana/wallet-adapter-base": "^0.9.8",
|
|
46
46
|
"@solana/web3.js": "^1.20.0"
|
|
47
47
|
},
|
|
@@ -49,5 +49,5 @@
|
|
|
49
49
|
"agadoo": "^2.0.0",
|
|
50
50
|
"shx": "^0.3.4"
|
|
51
51
|
},
|
|
52
|
-
"gitHead": "
|
|
52
|
+
"gitHead": "8cef0e0dd72e01cd522b16b6e486a26abe1e032b"
|
|
53
53
|
}
|