@injectivelabs/wallet-magic 1.14.40 → 1.14.41-alpha.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 +2 -2
- package/dist/cjs/strategy/strategy.js +128 -169
- package/dist/cjs/strategy/strategy.js.map +1 -1
- package/package.json +8 -11
package/README.md
CHANGED
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
<!-- TODO -->
|
|
4
4
|
|
|
5
|
-
[](https://www.npmjs.com/package/@injectivelabs/wallet-magic)
|
|
6
|
+
[](https://www.npmjs.com/package/@injectivelabs/wallet-magic)
|
|
7
7
|
[]()
|
|
8
8
|
|
|
9
9
|
_Package to use Magic Wallets on Injective via the wallet strategy._
|
|
@@ -1,13 +1,4 @@
|
|
|
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
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
3
|
exports.Magic = void 0;
|
|
13
4
|
/* eslint-disable class-methods-use-this */
|
|
@@ -18,9 +9,11 @@ const oauth2_1 = require("@magic-ext/oauth2");
|
|
|
18
9
|
const cosmos_1 = require("@magic-ext/cosmos");
|
|
19
10
|
const wallet_base_1 = require("@injectivelabs/wallet-base");
|
|
20
11
|
class Magic extends wallet_base_1.BaseConcreteStrategy {
|
|
12
|
+
provider;
|
|
13
|
+
metadata;
|
|
14
|
+
magicWallet;
|
|
21
15
|
constructor(args) {
|
|
22
|
-
|
|
23
|
-
if (!((_a = args.metadata) === null || _a === void 0 ? void 0 : _a.apiKey)) {
|
|
16
|
+
if (!args.metadata?.apiKey) {
|
|
24
17
|
throw new exceptions_1.WalletException(new Error('You have to pass the apiKey within metadata to use Magic wallet'));
|
|
25
18
|
}
|
|
26
19
|
if (!args.metadata.rpcEndpoint) {
|
|
@@ -38,199 +31,165 @@ class Magic extends wallet_base_1.BaseConcreteStrategy {
|
|
|
38
31
|
],
|
|
39
32
|
});
|
|
40
33
|
}
|
|
41
|
-
getWalletDeviceType() {
|
|
42
|
-
return
|
|
43
|
-
return Promise.resolve(wallet_base_1.WalletDeviceType.Browser);
|
|
44
|
-
});
|
|
34
|
+
async getWalletDeviceType() {
|
|
35
|
+
return Promise.resolve(wallet_base_1.WalletDeviceType.Browser);
|
|
45
36
|
}
|
|
46
|
-
enable(
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
yield this.connectViaEmail(email);
|
|
54
|
-
}
|
|
55
|
-
else {
|
|
56
|
-
yield this.connectViaOauth(provider);
|
|
57
|
-
}
|
|
58
|
-
yield this.pollUserLoggedInState();
|
|
59
|
-
return Promise.resolve(true);
|
|
37
|
+
async enable({ email, provider, }) {
|
|
38
|
+
if (!provider) {
|
|
39
|
+
return Promise.resolve(true);
|
|
40
|
+
}
|
|
41
|
+
try {
|
|
42
|
+
if (provider === wallet_base_1.MagicProvider.Email) {
|
|
43
|
+
await this.connectViaEmail(email);
|
|
60
44
|
}
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
code: exceptions_1.UnspecifiedErrorCode,
|
|
64
|
-
type: exceptions_1.ErrorType.WalletError,
|
|
65
|
-
contextModule: wallet_base_1.WalletAction.GetAccounts,
|
|
66
|
-
});
|
|
45
|
+
else {
|
|
46
|
+
await this.connectViaOauth(provider);
|
|
67
47
|
}
|
|
68
|
-
|
|
48
|
+
await this.pollUserLoggedInState();
|
|
49
|
+
return Promise.resolve(true);
|
|
50
|
+
}
|
|
51
|
+
catch (e) {
|
|
52
|
+
throw new exceptions_1.WalletException(new Error(e.message), {
|
|
53
|
+
code: exceptions_1.UnspecifiedErrorCode,
|
|
54
|
+
type: exceptions_1.ErrorType.WalletError,
|
|
55
|
+
contextModule: wallet_base_1.WalletAction.GetAccounts,
|
|
56
|
+
});
|
|
57
|
+
}
|
|
69
58
|
}
|
|
70
|
-
connectViaEmail(email) {
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
return this.magicWallet.auth.loginWithMagicLink({ email });
|
|
76
|
-
});
|
|
59
|
+
async connectViaEmail(email) {
|
|
60
|
+
if (!email) {
|
|
61
|
+
throw new exceptions_1.WalletException(new Error('You have to pass the email for using Magic wallet'));
|
|
62
|
+
}
|
|
63
|
+
return this.magicWallet.auth.loginWithMagicLink({ email });
|
|
77
64
|
}
|
|
78
|
-
connectViaOauth(provider) {
|
|
79
|
-
return
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
redirectURI: window.location.origin,
|
|
83
|
-
});
|
|
65
|
+
async connectViaOauth(provider) {
|
|
66
|
+
return this.magicWallet.oauth2.loginWithRedirect({
|
|
67
|
+
provider: provider,
|
|
68
|
+
redirectURI: window.location.origin,
|
|
84
69
|
});
|
|
85
70
|
}
|
|
86
|
-
disconnect() {
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
yield this.magicWallet.user.logout();
|
|
93
|
-
});
|
|
71
|
+
async disconnect() {
|
|
72
|
+
const isUserLoggedIn = await this.magicWallet.user.isLoggedIn();
|
|
73
|
+
if (!isUserLoggedIn) {
|
|
74
|
+
return;
|
|
75
|
+
}
|
|
76
|
+
await this.magicWallet.user.logout();
|
|
94
77
|
}
|
|
95
|
-
getAddresses(
|
|
96
|
-
|
|
97
|
-
if (!provider) {
|
|
98
|
-
try {
|
|
99
|
-
yield this.magicWallet.oauth2.getRedirectResult();
|
|
100
|
-
}
|
|
101
|
-
catch (_b) {
|
|
102
|
-
// fail silently
|
|
103
|
-
}
|
|
104
|
-
}
|
|
78
|
+
async getAddresses({ provider, }) {
|
|
79
|
+
if (!provider) {
|
|
105
80
|
try {
|
|
106
|
-
|
|
107
|
-
if (!(publicAddress === null || publicAddress === void 0 ? void 0 : publicAddress.startsWith('inj'))) {
|
|
108
|
-
const address = yield this.magicWallet.cosmos.changeAddress('inj');
|
|
109
|
-
return [address || ''];
|
|
110
|
-
}
|
|
111
|
-
return [publicAddress || ''];
|
|
81
|
+
await this.magicWallet.oauth2.getRedirectResult();
|
|
112
82
|
}
|
|
113
|
-
catch
|
|
114
|
-
|
|
115
|
-
code: exceptions_1.UnspecifiedErrorCode,
|
|
116
|
-
type: exceptions_1.ErrorType.WalletError,
|
|
117
|
-
contextModule: wallet_base_1.WalletAction.GetAccounts,
|
|
118
|
-
});
|
|
83
|
+
catch {
|
|
84
|
+
// fail silently
|
|
119
85
|
}
|
|
120
|
-
}
|
|
86
|
+
}
|
|
87
|
+
try {
|
|
88
|
+
const { publicAddress } = await this.magicWallet.user.getInfo();
|
|
89
|
+
if (!publicAddress?.startsWith('inj')) {
|
|
90
|
+
const address = await this.magicWallet.cosmos.changeAddress('inj');
|
|
91
|
+
return [address || ''];
|
|
92
|
+
}
|
|
93
|
+
return [publicAddress || ''];
|
|
94
|
+
}
|
|
95
|
+
catch (e) {
|
|
96
|
+
throw new exceptions_1.WalletException(new Error(e.message), {
|
|
97
|
+
code: exceptions_1.UnspecifiedErrorCode,
|
|
98
|
+
type: exceptions_1.ErrorType.WalletError,
|
|
99
|
+
contextModule: wallet_base_1.WalletAction.GetAccounts,
|
|
100
|
+
});
|
|
101
|
+
}
|
|
121
102
|
}
|
|
122
103
|
// eslint-disable-next-line class-methods-use-this
|
|
123
|
-
getSessionOrConfirm(address) {
|
|
124
|
-
return
|
|
125
|
-
|
|
104
|
+
async getSessionOrConfirm(address) {
|
|
105
|
+
return Promise.resolve(`0x${Buffer.from(`Confirmation for ${address} at time: ${Date.now()}`).toString('hex')}`);
|
|
106
|
+
}
|
|
107
|
+
async sendEthereumTransaction(_transaction, _options) {
|
|
108
|
+
throw new exceptions_1.CosmosWalletException(new Error('sendEthereumTransaction is not supported. Leap only supports sending cosmos transactions'), {
|
|
109
|
+
code: exceptions_1.UnspecifiedErrorCode,
|
|
110
|
+
context: wallet_base_1.WalletAction.SendEthereumTransaction,
|
|
126
111
|
});
|
|
127
112
|
}
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
113
|
+
async sendTransaction(transaction, options) {
|
|
114
|
+
const { endpoints, txTimeout } = options;
|
|
115
|
+
if (!endpoints) {
|
|
116
|
+
throw new exceptions_1.WalletException(new Error('You have to pass endpoints.grpc within the options for using Magic wallet'));
|
|
117
|
+
}
|
|
118
|
+
const txApi = new sdk_ts_1.TxGrpcApi(endpoints.grpc);
|
|
119
|
+
const response = await txApi.broadcast(transaction, { txTimeout });
|
|
120
|
+
if (response.code !== 0) {
|
|
121
|
+
throw new exceptions_1.TransactionException(new Error(response.rawLog), {
|
|
131
122
|
code: exceptions_1.UnspecifiedErrorCode,
|
|
132
|
-
|
|
123
|
+
contextCode: response.code,
|
|
124
|
+
contextModule: response.codespace,
|
|
133
125
|
});
|
|
134
|
-
}
|
|
135
|
-
|
|
136
|
-
sendTransaction(transaction, options) {
|
|
137
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
138
|
-
const { endpoints, txTimeout } = options;
|
|
139
|
-
if (!endpoints) {
|
|
140
|
-
throw new exceptions_1.WalletException(new Error('You have to pass endpoints.grpc within the options for using Magic wallet'));
|
|
141
|
-
}
|
|
142
|
-
const txApi = new sdk_ts_1.TxGrpcApi(endpoints.grpc);
|
|
143
|
-
const response = yield txApi.broadcast(transaction, { txTimeout });
|
|
144
|
-
if (response.code !== 0) {
|
|
145
|
-
throw new exceptions_1.TransactionException(new Error(response.rawLog), {
|
|
146
|
-
code: exceptions_1.UnspecifiedErrorCode,
|
|
147
|
-
contextCode: response.code,
|
|
148
|
-
contextModule: response.codespace,
|
|
149
|
-
});
|
|
150
|
-
}
|
|
151
|
-
return response;
|
|
152
|
-
});
|
|
126
|
+
}
|
|
127
|
+
return response;
|
|
153
128
|
}
|
|
154
|
-
signEip712TypedData(eip712json, _address) {
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
return `0x${signature}`;
|
|
158
|
-
});
|
|
129
|
+
async signEip712TypedData(eip712json, _address) {
|
|
130
|
+
const signature = await this.magicWallet.cosmos.signTypedData(eip712json);
|
|
131
|
+
return `0x${signature}`;
|
|
159
132
|
}
|
|
160
133
|
// eslint-disable-next-line class-methods-use-this
|
|
161
|
-
signCosmosTransaction(_transaction) {
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
contextModule: wallet_base_1.WalletAction.SignTransaction,
|
|
167
|
-
});
|
|
134
|
+
async signCosmosTransaction(_transaction) {
|
|
135
|
+
throw new exceptions_1.WalletException(new Error('This wallet does not support signing Cosmos transactions'), {
|
|
136
|
+
code: exceptions_1.UnspecifiedErrorCode,
|
|
137
|
+
type: exceptions_1.ErrorType.WalletError,
|
|
138
|
+
contextModule: wallet_base_1.WalletAction.SignTransaction,
|
|
168
139
|
});
|
|
169
140
|
}
|
|
170
|
-
signAminoCosmosTransaction(_transaction) {
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
contextModule: wallet_base_1.WalletAction.SignTransaction,
|
|
176
|
-
});
|
|
141
|
+
async signAminoCosmosTransaction(_transaction) {
|
|
142
|
+
throw new exceptions_1.WalletException(new Error('This wallet does not support signAminoCosmosTransaction'), {
|
|
143
|
+
code: exceptions_1.UnspecifiedErrorCode,
|
|
144
|
+
type: exceptions_1.ErrorType.WalletError,
|
|
145
|
+
contextModule: wallet_base_1.WalletAction.SignTransaction,
|
|
177
146
|
});
|
|
178
147
|
}
|
|
179
|
-
signArbitrary(_signer, _data) {
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
contextModule: wallet_base_1.WalletAction.SignTransaction,
|
|
185
|
-
});
|
|
148
|
+
async signArbitrary(_signer, _data) {
|
|
149
|
+
throw new exceptions_1.WalletException(new Error('This wallet does not support signArbitrary'), {
|
|
150
|
+
code: exceptions_1.UnspecifiedErrorCode,
|
|
151
|
+
type: exceptions_1.ErrorType.WalletError,
|
|
152
|
+
contextModule: wallet_base_1.WalletAction.SignTransaction,
|
|
186
153
|
});
|
|
187
154
|
}
|
|
188
|
-
getEthereumChainId() {
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
context: wallet_base_1.WalletAction.GetChainId,
|
|
193
|
-
});
|
|
155
|
+
async getEthereumChainId() {
|
|
156
|
+
throw new exceptions_1.CosmosWalletException(new Error('getEthereumChainId is not supported on Magic wallet'), {
|
|
157
|
+
code: exceptions_1.UnspecifiedErrorCode,
|
|
158
|
+
context: wallet_base_1.WalletAction.GetChainId,
|
|
194
159
|
});
|
|
195
160
|
}
|
|
196
|
-
getEthereumTransactionReceipt(_txHash) {
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
context: wallet_base_1.WalletAction.GetEthereumTransactionReceipt,
|
|
202
|
-
});
|
|
161
|
+
async getEthereumTransactionReceipt(_txHash) {
|
|
162
|
+
throw new exceptions_1.CosmosWalletException(new Error('getEthereumTransactionReceipt is not supported on Cosmostation'), {
|
|
163
|
+
code: exceptions_1.UnspecifiedErrorCode,
|
|
164
|
+
type: exceptions_1.ErrorType.WalletError,
|
|
165
|
+
context: wallet_base_1.WalletAction.GetEthereumTransactionReceipt,
|
|
203
166
|
});
|
|
204
167
|
}
|
|
205
168
|
// eslint-disable-next-line class-methods-use-this
|
|
206
|
-
getPubKey() {
|
|
207
|
-
|
|
208
|
-
throw new exceptions_1.WalletException(new Error('You can only fetch PubKey from Cosmos native wallets'));
|
|
209
|
-
});
|
|
169
|
+
async getPubKey() {
|
|
170
|
+
throw new exceptions_1.WalletException(new Error('You can only fetch PubKey from Cosmos native wallets'));
|
|
210
171
|
}
|
|
211
|
-
pollUserLoggedInState() {
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
return result;
|
|
219
|
-
}
|
|
172
|
+
async pollUserLoggedInState(timeout = 60 * 1000) {
|
|
173
|
+
const POLL_INTERVAL = 3 * 1000;
|
|
174
|
+
for (let i = 0; i <= timeout / POLL_INTERVAL; i += 1) {
|
|
175
|
+
try {
|
|
176
|
+
const result = await this.magicWallet.user.isLoggedIn();
|
|
177
|
+
if (result) {
|
|
178
|
+
return result;
|
|
220
179
|
}
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
180
|
+
}
|
|
181
|
+
catch (e) {
|
|
182
|
+
// We throw only if the transaction failed on chain
|
|
183
|
+
if (e instanceof exceptions_1.TransactionException) {
|
|
184
|
+
throw e;
|
|
226
185
|
}
|
|
227
|
-
yield new Promise((resolve) => setTimeout(resolve, POLL_INTERVAL));
|
|
228
186
|
}
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
187
|
+
await new Promise((resolve) => setTimeout(resolve, POLL_INTERVAL));
|
|
188
|
+
}
|
|
189
|
+
// Transaction was not included in the block in the desired timeout
|
|
190
|
+
throw new exceptions_1.WalletException(new Error(`User did not verify sign in - timeout of ${timeout}ms`), {
|
|
191
|
+
context: 'Wallet',
|
|
192
|
+
contextModule: 'Magic-Wallet-pollUserLoggedInState',
|
|
234
193
|
});
|
|
235
194
|
}
|
|
236
195
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"strategy.js","sourceRoot":"","sources":["../../../src/strategy/strategy.ts"],"names":[],"mappings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M,aAAa,GAAG,CAAC,GAAG,IAAI,CAAA;QAE9B,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,IAAI,OAAO,GAAG,aAAa,EAAE,CAAC,IAAI,CAAC,EAAE,CAAC;YACrD,IAAI,CAAC;gBACH,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,UAAU,EAAE,CAAA;gBAEvD,IAAI,MAAM,EAAE,CAAC;oBACX,OAAO,MAAM,CAAA;gBACf,CAAC;YACH,CAAC;YAAC,OAAO,CAAU,EAAE,CAAC;gBACpB,mDAAmD;gBACnD,IAAI,CAAC,YAAY,iCAAoB,EAAE,CAAC;oBACtC,MAAM,CAAC,CAAA;gBACT,CAAC;YACH,CAAC;YAED,MAAM,IAAI,OAAO,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC,UAAU,CAAC,OAAO,EAAE,aAAa,CAAC,CAAC,CAAA;QACpE,CAAC;QAED,mEAAmE;QACnE,MAAM,IAAI,4BAAe,CACvB,IAAI,KAAK,CAAC,4CAA4C,OAAO,IAAI,CAAC,EAClE;YACE,OAAO,EAAE,QAAQ;YACjB,aAAa,EAAE,oCAAoC;SACpD,CACF,CAAA;IACH,CAAC;CACF;AA1SD,sBA0SC"}
|
package/package.json
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@injectivelabs/wallet-magic",
|
|
3
3
|
"description": "Magic wallet strategy for use with @injectivelabs/wallet-core.",
|
|
4
|
-
"version": "1.14.
|
|
4
|
+
"version": "1.14.41-alpha.0",
|
|
5
5
|
"sideEffects": false,
|
|
6
|
+
"type": "module",
|
|
6
7
|
"author": {
|
|
7
8
|
"name": "InjectiveLabs",
|
|
8
9
|
"email": "admin@injectivelabs.org"
|
|
@@ -55,23 +56,19 @@
|
|
|
55
56
|
"start": "node dist/index.js"
|
|
56
57
|
},
|
|
57
58
|
"dependencies": {
|
|
58
|
-
"@injectivelabs/exceptions": "^1.14.
|
|
59
|
-
"@injectivelabs/sdk-ts": "^1.14.
|
|
60
|
-
"@injectivelabs/ts-types": "^1.14.
|
|
61
|
-
"@injectivelabs/utils": "^1.14.
|
|
62
|
-
"@injectivelabs/wallet-base": "^1.14.
|
|
59
|
+
"@injectivelabs/exceptions": "^1.14.41-alpha.0",
|
|
60
|
+
"@injectivelabs/sdk-ts": "^1.14.41-alpha.0",
|
|
61
|
+
"@injectivelabs/ts-types": "^1.14.41-alpha.0",
|
|
62
|
+
"@injectivelabs/utils": "^1.14.41-alpha.0",
|
|
63
|
+
"@injectivelabs/wallet-base": "^1.14.41-alpha.0",
|
|
63
64
|
"@magic-ext/cosmos": "23.9.1",
|
|
64
65
|
"@magic-ext/oauth2": "9.9.0",
|
|
65
66
|
"magic-sdk": "28.9.0"
|
|
66
67
|
},
|
|
67
|
-
"gitHead": "
|
|
68
|
+
"gitHead": "0d2a71e8f8c59500fa4a45f2be48ead6c8bd2d93",
|
|
68
69
|
"typedoc": {
|
|
69
70
|
"entryPoint": "./src/index.ts",
|
|
70
71
|
"readmeFile": "./README.md",
|
|
71
72
|
"displayName": "wallet-magic API Documentation"
|
|
72
|
-
},
|
|
73
|
-
"resolutions": {
|
|
74
|
-
"**/libsodium": "npm:@bangjelkoski/noop",
|
|
75
|
-
"**/libsodium-wrappers": "npm:@bangjelkoski/noop"
|
|
76
73
|
}
|
|
77
74
|
}
|