@mezo-org/passport 0.15.1-dev.6 → 0.16.0-dev.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.
Files changed (63) hide show
  1. package/dist/src/components/Dropdown/Dropdown.js +1 -1
  2. package/dist/src/components/Dropdown/Dropdown.js.map +1 -1
  3. package/dist/src/components/Dropdown/Receive/Receive.js +1 -1
  4. package/dist/src/components/Dropdown/Receive/Receive.js.map +1 -1
  5. package/dist/src/components/Dropdown/Root/AccountAddressActions.js +1 -1
  6. package/dist/src/components/Dropdown/Root/AccountAddressActions.js.map +1 -1
  7. package/dist/src/components/Dropdown/Root/WalletAddress.js +1 -1
  8. package/dist/src/components/Dropdown/Root/WalletAddress.js.map +1 -1
  9. package/dist/src/config.d.ts +2 -2
  10. package/dist/src/config.d.ts.map +1 -1
  11. package/dist/src/config.js +1 -1
  12. package/dist/src/config.js.map +1 -1
  13. package/dist/src/hooks/index.d.ts +0 -1
  14. package/dist/src/hooks/index.d.ts.map +1 -1
  15. package/dist/src/hooks/index.js +0 -1
  16. package/dist/src/hooks/index.js.map +1 -1
  17. package/dist/src/hooks/useAuthenticateWithWallet.js +1 -1
  18. package/dist/src/hooks/useAuthenticateWithWallet.js.map +1 -1
  19. package/dist/src/hooks/useBorrowData.js +1 -1
  20. package/dist/src/hooks/useBorrowData.js.map +1 -1
  21. package/dist/src/hooks/useCollateralPrice.js +1 -1
  22. package/dist/src/hooks/useCollateralPrice.js.map +1 -1
  23. package/dist/src/hooks/useCreateAccount.js +1 -1
  24. package/dist/src/hooks/useCreateAccount.js.map +1 -1
  25. package/dist/src/hooks/useLinkAccount.js +1 -1
  26. package/dist/src/hooks/useLinkAccount.js.map +1 -1
  27. package/dist/src/hooks/useTokensBalances.d.ts.map +1 -1
  28. package/dist/src/hooks/useTokensBalances.js +10 -2
  29. package/dist/src/hooks/useTokensBalances.js.map +1 -1
  30. package/dist/src/hooks/useWalletAccount.d.ts +1 -1
  31. package/dist/src/hooks/useWalletAccount.d.ts.map +1 -1
  32. package/dist/src/hooks/useWalletAccount.js +4 -6
  33. package/dist/src/hooks/useWalletAccount.js.map +1 -1
  34. package/dist/src/hooks/useWatchTransferEvents.d.ts.map +1 -1
  35. package/dist/src/hooks/useWatchTransferEvents.js +1 -0
  36. package/dist/src/hooks/useWatchTransferEvents.js.map +1 -1
  37. package/dist/src/lib/contracts/artifacts/MEZO.json +428 -0
  38. package/dist/src/lib/contracts/index.d.ts +1 -1
  39. package/dist/src/lib/contracts/index.d.ts.map +1 -1
  40. package/dist/src/lib/contracts/index.js +3 -0
  41. package/dist/src/lib/contracts/index.js.map +1 -1
  42. package/dist/src/utils/assets.d.ts +15 -0
  43. package/dist/src/utils/assets.d.ts.map +1 -1
  44. package/dist/src/utils/assets.js +13 -0
  45. package/dist/src/utils/assets.js.map +1 -1
  46. package/package.json +7 -7
  47. package/src/components/Dropdown/Dropdown.tsx +1 -1
  48. package/src/components/Dropdown/Receive/Receive.tsx +1 -1
  49. package/src/components/Dropdown/Root/AccountAddressActions.tsx +1 -1
  50. package/src/components/Dropdown/Root/WalletAddress.tsx +1 -1
  51. package/src/config.ts +3 -3
  52. package/src/hooks/index.ts +0 -1
  53. package/src/hooks/useAuthenticateWithWallet.ts +1 -1
  54. package/src/hooks/useBorrowData.ts +1 -1
  55. package/src/hooks/useCollateralPrice.ts +1 -1
  56. package/src/hooks/useCreateAccount.ts +1 -1
  57. package/src/hooks/useLinkAccount.ts +1 -1
  58. package/src/hooks/useTokensBalances.ts +10 -1
  59. package/src/hooks/useWalletAccount.ts +5 -13
  60. package/src/hooks/useWatchTransferEvents.ts +1 -0
  61. package/src/lib/contracts/artifacts/MEZO.json +428 -0
  62. package/src/lib/contracts/index.ts +4 -0
  63. package/src/utils/assets.ts +14 -0
@@ -0,0 +1,428 @@
1
+ {
2
+ "address": "0x7B7c000000000000000000000000000000000001",
3
+ "abi": [
4
+ {
5
+ "anonymous": false,
6
+ "inputs": [
7
+ {
8
+ "indexed": true,
9
+ "internalType": "address",
10
+ "name": "owner",
11
+ "type": "address"
12
+ },
13
+ {
14
+ "indexed": true,
15
+ "internalType": "address",
16
+ "name": "spender",
17
+ "type": "address"
18
+ },
19
+ {
20
+ "indexed": false,
21
+ "internalType": "uint256",
22
+ "name": "value",
23
+ "type": "uint256"
24
+ }
25
+ ],
26
+ "name": "Approval",
27
+ "type": "event"
28
+ },
29
+ {
30
+ "anonymous": false,
31
+ "inputs": [
32
+ {
33
+ "indexed": true,
34
+ "internalType": "address",
35
+ "name": "to",
36
+ "type": "address"
37
+ },
38
+ {
39
+ "indexed": false,
40
+ "internalType": "uint256",
41
+ "name": "amount",
42
+ "type": "uint256"
43
+ }
44
+ ],
45
+ "name": "Minted",
46
+ "type": "event"
47
+ },
48
+ {
49
+ "anonymous": false,
50
+ "inputs": [
51
+ {
52
+ "indexed": true,
53
+ "internalType": "address",
54
+ "name": "minter",
55
+ "type": "address"
56
+ }
57
+ ],
58
+ "name": "MinterSet",
59
+ "type": "event"
60
+ },
61
+ {
62
+ "anonymous": false,
63
+ "inputs": [
64
+ {
65
+ "indexed": true,
66
+ "internalType": "address",
67
+ "name": "from",
68
+ "type": "address"
69
+ },
70
+ {
71
+ "indexed": true,
72
+ "internalType": "address",
73
+ "name": "to",
74
+ "type": "address"
75
+ },
76
+ {
77
+ "indexed": false,
78
+ "internalType": "uint256",
79
+ "name": "value",
80
+ "type": "uint256"
81
+ }
82
+ ],
83
+ "name": "Transfer",
84
+ "type": "event"
85
+ },
86
+ {
87
+ "inputs": [],
88
+ "name": "DOMAIN_SEPARATOR",
89
+ "outputs": [
90
+ {
91
+ "internalType": "bytes32",
92
+ "name": "",
93
+ "type": "bytes32"
94
+ }
95
+ ],
96
+ "stateMutability": "view",
97
+ "type": "function"
98
+ },
99
+ {
100
+ "inputs": [],
101
+ "name": "PERMIT_TYPEHASH",
102
+ "outputs": [
103
+ {
104
+ "internalType": "bytes32",
105
+ "name": "",
106
+ "type": "bytes32"
107
+ }
108
+ ],
109
+ "stateMutability": "pure",
110
+ "type": "function"
111
+ },
112
+ {
113
+ "inputs": [
114
+ {
115
+ "internalType": "address",
116
+ "name": "owner",
117
+ "type": "address"
118
+ },
119
+ {
120
+ "internalType": "address",
121
+ "name": "spender",
122
+ "type": "address"
123
+ }
124
+ ],
125
+ "name": "allowance",
126
+ "outputs": [
127
+ {
128
+ "internalType": "uint256",
129
+ "name": "",
130
+ "type": "uint256"
131
+ }
132
+ ],
133
+ "stateMutability": "view",
134
+ "type": "function"
135
+ },
136
+ {
137
+ "inputs": [
138
+ {
139
+ "internalType": "address",
140
+ "name": "spender",
141
+ "type": "address"
142
+ },
143
+ {
144
+ "internalType": "uint256",
145
+ "name": "value",
146
+ "type": "uint256"
147
+ }
148
+ ],
149
+ "name": "approve",
150
+ "outputs": [
151
+ {
152
+ "internalType": "bool",
153
+ "name": "",
154
+ "type": "bool"
155
+ }
156
+ ],
157
+ "stateMutability": "nonpayable",
158
+ "type": "function"
159
+ },
160
+ {
161
+ "inputs": [
162
+ {
163
+ "internalType": "address",
164
+ "name": "account",
165
+ "type": "address"
166
+ }
167
+ ],
168
+ "name": "balanceOf",
169
+ "outputs": [
170
+ {
171
+ "internalType": "uint256",
172
+ "name": "",
173
+ "type": "uint256"
174
+ }
175
+ ],
176
+ "stateMutability": "view",
177
+ "type": "function"
178
+ },
179
+ {
180
+ "inputs": [],
181
+ "name": "decimals",
182
+ "outputs": [
183
+ {
184
+ "internalType": "uint8",
185
+ "name": "",
186
+ "type": "uint8"
187
+ }
188
+ ],
189
+ "stateMutability": "view",
190
+ "type": "function"
191
+ },
192
+ {
193
+ "inputs": [],
194
+ "name": "getMinter",
195
+ "outputs": [
196
+ {
197
+ "internalType": "address",
198
+ "name": "",
199
+ "type": "address"
200
+ }
201
+ ],
202
+ "stateMutability": "view",
203
+ "type": "function"
204
+ },
205
+ {
206
+ "inputs": [
207
+ {
208
+ "internalType": "address",
209
+ "name": "to",
210
+ "type": "address"
211
+ },
212
+ {
213
+ "internalType": "uint256",
214
+ "name": "amount",
215
+ "type": "uint256"
216
+ }
217
+ ],
218
+ "name": "mint",
219
+ "outputs": [
220
+ {
221
+ "internalType": "bool",
222
+ "name": "",
223
+ "type": "bool"
224
+ }
225
+ ],
226
+ "stateMutability": "nonpayable",
227
+ "type": "function"
228
+ },
229
+ {
230
+ "inputs": [],
231
+ "name": "name",
232
+ "outputs": [
233
+ {
234
+ "internalType": "string",
235
+ "name": "",
236
+ "type": "string"
237
+ }
238
+ ],
239
+ "stateMutability": "view",
240
+ "type": "function"
241
+ },
242
+ {
243
+ "inputs": [
244
+ {
245
+ "internalType": "address",
246
+ "name": "owner",
247
+ "type": "address"
248
+ }
249
+ ],
250
+ "name": "nonce",
251
+ "outputs": [
252
+ {
253
+ "internalType": "uint256",
254
+ "name": "",
255
+ "type": "uint256"
256
+ }
257
+ ],
258
+ "stateMutability": "view",
259
+ "type": "function"
260
+ },
261
+ {
262
+ "inputs": [
263
+ {
264
+ "internalType": "address",
265
+ "name": "owner",
266
+ "type": "address"
267
+ }
268
+ ],
269
+ "name": "nonces",
270
+ "outputs": [
271
+ {
272
+ "internalType": "uint256",
273
+ "name": "",
274
+ "type": "uint256"
275
+ }
276
+ ],
277
+ "stateMutability": "view",
278
+ "type": "function"
279
+ },
280
+ {
281
+ "inputs": [
282
+ {
283
+ "internalType": "address",
284
+ "name": "owner",
285
+ "type": "address"
286
+ },
287
+ {
288
+ "internalType": "address",
289
+ "name": "spender",
290
+ "type": "address"
291
+ },
292
+ {
293
+ "internalType": "uint256",
294
+ "name": "amount",
295
+ "type": "uint256"
296
+ },
297
+ {
298
+ "internalType": "uint256",
299
+ "name": "deadline",
300
+ "type": "uint256"
301
+ },
302
+ {
303
+ "internalType": "uint8",
304
+ "name": "v",
305
+ "type": "uint8"
306
+ },
307
+ {
308
+ "internalType": "bytes32",
309
+ "name": "r",
310
+ "type": "bytes32"
311
+ },
312
+ {
313
+ "internalType": "bytes32",
314
+ "name": "s",
315
+ "type": "bytes32"
316
+ }
317
+ ],
318
+ "name": "permit",
319
+ "outputs": [
320
+ {
321
+ "internalType": "bool",
322
+ "name": "",
323
+ "type": "bool"
324
+ }
325
+ ],
326
+ "stateMutability": "nonpayable",
327
+ "type": "function"
328
+ },
329
+ {
330
+ "inputs": [
331
+ {
332
+ "internalType": "address",
333
+ "name": "minter",
334
+ "type": "address"
335
+ }
336
+ ],
337
+ "name": "setMinter",
338
+ "outputs": [
339
+ {
340
+ "internalType": "bool",
341
+ "name": "",
342
+ "type": "bool"
343
+ }
344
+ ],
345
+ "stateMutability": "nonpayable",
346
+ "type": "function"
347
+ },
348
+ {
349
+ "inputs": [],
350
+ "name": "symbol",
351
+ "outputs": [
352
+ {
353
+ "internalType": "string",
354
+ "name": "",
355
+ "type": "string"
356
+ }
357
+ ],
358
+ "stateMutability": "view",
359
+ "type": "function"
360
+ },
361
+ {
362
+ "inputs": [],
363
+ "name": "totalSupply",
364
+ "outputs": [
365
+ {
366
+ "internalType": "uint256",
367
+ "name": "",
368
+ "type": "uint256"
369
+ }
370
+ ],
371
+ "stateMutability": "view",
372
+ "type": "function"
373
+ },
374
+ {
375
+ "inputs": [
376
+ {
377
+ "internalType": "address",
378
+ "name": "to",
379
+ "type": "address"
380
+ },
381
+ {
382
+ "internalType": "uint256",
383
+ "name": "value",
384
+ "type": "uint256"
385
+ }
386
+ ],
387
+ "name": "transfer",
388
+ "outputs": [
389
+ {
390
+ "internalType": "bool",
391
+ "name": "",
392
+ "type": "bool"
393
+ }
394
+ ],
395
+ "stateMutability": "nonpayable",
396
+ "type": "function"
397
+ },
398
+ {
399
+ "inputs": [
400
+ {
401
+ "internalType": "address",
402
+ "name": "from",
403
+ "type": "address"
404
+ },
405
+ {
406
+ "internalType": "address",
407
+ "name": "to",
408
+ "type": "address"
409
+ },
410
+ {
411
+ "internalType": "uint256",
412
+ "name": "value",
413
+ "type": "uint256"
414
+ }
415
+ ],
416
+ "name": "transferFrom",
417
+ "outputs": [
418
+ {
419
+ "internalType": "bool",
420
+ "name": "",
421
+ "type": "bool"
422
+ }
423
+ ],
424
+ "stateMutability": "nonpayable",
425
+ "type": "function"
426
+ }
427
+ ]
428
+ }
@@ -1,5 +1,5 @@
1
1
  import { Abi, Address } from "viem";
2
- export type MezoChainToken = "mcbBTC" | "mDAI" | "mFBTC" | "mSolvBTC" | "mswBTC" | "mT" | "mUSDC" | "mUSDe" | "mUSDT" | "mxSolvBTC" | "MUSD";
2
+ export type MezoChainToken = "mcbBTC" | "mDAI" | "mFBTC" | "mSolvBTC" | "mswBTC" | "mT" | "mUSDC" | "mUSDe" | "mUSDT" | "mxSolvBTC" | "MUSD" | "MEZO";
3
3
  export type MezoBorrowContract = "TroveManager" | "BorrowerOperations" | "PriceFeed";
4
4
  type ContractsMap<K extends string> = Record<K, {
5
5
  address: Address;
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/lib/contracts/index.ts"],"names":[],"mappings":"AA8BA,OAAO,EAAE,GAAG,EAAE,OAAO,EAAE,MAAM,MAAM,CAAA;AAEnC,MAAM,MAAM,cAAc,GACtB,QAAQ,GACR,MAAM,GACN,OAAO,GACP,UAAU,GACV,QAAQ,GACR,IAAI,GACJ,OAAO,GACP,OAAO,GACP,OAAO,GACP,WAAW,GACX,MAAM,CAAA;AAEV,MAAM,MAAM,kBAAkB,GAC1B,cAAc,GACd,oBAAoB,GACpB,WAAW,CAAA;AAEf,KAAK,YAAY,CAAC,CAAC,SAAS,MAAM,IAAI,MAAM,CAC1C,CAAC,EACD;IACE,OAAO,EAAE,OAAO,CAAA;IAChB,GAAG,EAAE,GAAG,CAAA;CACT,CACF,CAAA;AAED,eAAO,MAAM,qBAAqB,EAYlB,YAAY,CAAC,cAAc,CAAC,CAAA;AAE5C,eAAO,MAAM,qBAAqB,EAYlB,YAAY,CAAC,cAAc,CAAC,CAAA;AAE5C,eAAO,MAAM,sBAAsB,EAInB,YAAY,CAAC,kBAAkB,CAAC,CAAA;AAEhD,eAAO,MAAM,sBAAsB,EAInB,YAAY,CAAC,kBAAkB,CAAC,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/lib/contracts/index.ts"],"names":[],"mappings":"AA8BA,OAAO,EAAE,GAAG,EAAE,OAAO,EAAE,MAAM,MAAM,CAAA;AAGnC,MAAM,MAAM,cAAc,GACtB,QAAQ,GACR,MAAM,GACN,OAAO,GACP,UAAU,GACV,QAAQ,GACR,IAAI,GACJ,OAAO,GACP,OAAO,GACP,OAAO,GACP,WAAW,GACX,MAAM,GACN,MAAM,CAAA;AAEV,MAAM,MAAM,kBAAkB,GAC1B,cAAc,GACd,oBAAoB,GACpB,WAAW,CAAA;AAEf,KAAK,YAAY,CAAC,CAAC,SAAS,MAAM,IAAI,MAAM,CAC1C,CAAC,EACD;IACE,OAAO,EAAE,OAAO,CAAA;IAChB,GAAG,EAAE,GAAG,CAAA;CACT,CACF,CAAA;AAED,eAAO,MAAM,qBAAqB,EAalB,YAAY,CAAC,cAAc,CAAC,CAAA;AAE5C,eAAO,MAAM,qBAAqB,EAalB,YAAY,CAAC,cAAc,CAAC,CAAA;AAE5C,eAAO,MAAM,sBAAsB,EAInB,YAAY,CAAC,kBAAkB,CAAC,CAAA;AAEhD,eAAO,MAAM,sBAAsB,EAInB,YAAY,CAAC,kBAAkB,CAAC,CAAA"}
@@ -26,6 +26,7 @@ import troveManagerTestnet from "@mezo-org/musd-contracts/deployments/matsnet/Tr
26
26
  import borrowerOperationsTestnet from "@mezo-org/musd-contracts/deployments/matsnet/BorrowerOperations.json";
27
27
  import priceFeed from "@mezo-org/musd-contracts/deployments/mainnet/PriceFeed.json";
28
28
  import priceFeedTestnet from "@mezo-org/musd-contracts/deployments/matsnet/PriceFeed.json";
29
+ import mezoArtifact from "./artifacts/MEZO.json";
29
30
  export const testnetTokenContracts = {
30
31
  mcbBTC: cbbtcTestnet,
31
32
  mDAI: daiTestnet,
@@ -38,6 +39,7 @@ export const testnetTokenContracts = {
38
39
  mUSDT: usdtTestnet,
39
40
  mxSolvBTC: xsolvbtcTestnet,
40
41
  MUSD: musdTestnet,
42
+ MEZO: mezoArtifact,
41
43
  };
42
44
  export const mainnetTokenContracts = {
43
45
  mcbBTC: cbbtcMainnet,
@@ -51,6 +53,7 @@ export const mainnetTokenContracts = {
51
53
  mUSDT: usdtMainnet,
52
54
  mxSolvBTC: xsolvbtcMainnet,
53
55
  MUSD: musdMainnet,
56
+ MEZO: mezoArtifact,
54
57
  };
55
58
  export const mainnetBorrowContracts = {
56
59
  TroveManager: troveManagerMainnet,
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/lib/contracts/index.ts"],"names":[],"mappings":"AAAA,OAAO,YAAY,MAAM,2DAA2D,CAAA;AACpF,OAAO,UAAU,MAAM,yDAAyD,CAAA;AAChF,OAAO,WAAW,MAAM,0DAA0D,CAAA;AAClF,OAAO,cAAc,MAAM,6DAA6D,CAAA;AACxF,OAAO,YAAY,MAAM,2DAA2D,CAAA;AACpF,OAAO,QAAQ,MAAM,uDAAuD,CAAA;AAC5E,OAAO,WAAW,MAAM,0DAA0D,CAAA;AAClF,OAAO,WAAW,MAAM,0DAA0D,CAAA;AAClF,OAAO,WAAW,MAAM,0DAA0D,CAAA;AAClF,OAAO,eAAe,MAAM,8DAA8D,CAAA;AAC1F,OAAO,WAAW,MAAM,wDAAwD,CAAA;AAChF,OAAO,mBAAmB,MAAM,gEAAgE,CAAA;AAChG,OAAO,yBAAyB,MAAM,sEAAsE,CAAA;AAE5G,OAAO,YAAY,MAAM,2DAA2D,CAAA;AACpF,OAAO,UAAU,MAAM,yDAAyD,CAAA;AAChF,OAAO,WAAW,MAAM,0DAA0D,CAAA;AAClF,OAAO,cAAc,MAAM,6DAA6D,CAAA;AACxF,OAAO,YAAY,MAAM,2DAA2D,CAAA;AACpF,OAAO,QAAQ,MAAM,uDAAuD,CAAA;AAC5E,OAAO,WAAW,MAAM,0DAA0D,CA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C,MAAM,qBAAqB,GAAG;IACnC,MAAM,EAAE,YAAY;IACpB,IAAI,EAAE,UAAU;IAChB,KAAK,EAAE,WAAW;IAClB,QAAQ,EAAE,cAAc;IACxB,MAAM,EAAE,YAAY;IACpB,EAAE,EAAE,QAAQ;IACZ,KAAK,EAAE,WAAW;IAClB,KAAK,EAAE,WAAW;IAClB,KAAK,EAAE,WAAW;IAClB,SAAS,EAAE,eAAe;IAC1B,IAAI,EAAE,WAAW;IACjB,IAAI,EAAE,YAAY;CACwB,CAAA;AAE5C,MAAM,CAAC,MAAM,qBAAqB,GAAG;IACnC,MAAM,EAAE,YAAY;IACpB,IAAI,EAAE,UAAU;IAChB,KAAK,EAAE,WAAW;IAClB,QAAQ,EAAE,cAAc;IACxB,MAAM,EAAE,YAAY;IACpB,EAAE,EAAE,QAAQ;IACZ,KAAK,EAAE,WAAW;IAClB,KAAK,EAAE,WAAW;IAClB,KAAK,EAAE,WAAW;IAClB,SAAS,EAAE,eAAe;IAC1B,IAAI,EAAE,WAAW;IACjB,IAAI,EAAE,YAAY;CACwB,CAAA;AAE5C,MAAM,CAAC,MAAM,sBAAsB,GAAG;IACpC,YAAY,EAAE,mBAAmB;IACjC,kBAAkB,EAAE,yBAAyB;IAC7C,SAAS,EAAE,SAAS;CAC0B,CAAA;AAEhD,MAAM,CAAC,MAAM,sBAAsB,GAAG;IACpC,YAAY,EAAE,mBAAmB;IACjC,kBAAkB,EAAE,yBAAyB;IAC7C,SAAS,EAAE,gBAAgB;CACmB,CAAA"}
@@ -64,6 +64,11 @@ declare const ASSETS: {
64
64
  symbol: string;
65
65
  decimals: number;
66
66
  };
67
+ MEZO: {
68
+ name: string;
69
+ symbol: string;
70
+ decimals: number;
71
+ };
67
72
  };
68
73
  /**
69
74
  * Gets details of given crypto asset
@@ -122,6 +127,10 @@ export declare function getAsset(key: keyof typeof ASSETS): {
122
127
  name: string;
123
128
  symbol: string;
124
129
  decimals: number;
130
+ } | {
131
+ name: string;
132
+ symbol: string;
133
+ decimals: number;
125
134
  };
126
135
  /**
127
136
  * Checks if given crypto asset is Bitcoin-like
@@ -141,5 +150,11 @@ export declare function isUsdLikeCryptoAsset(key: string): boolean;
141
150
  * @returns True if crypto asset is T token
142
151
  */
143
152
  export declare function isTTokenCryptoAsset(key: string): boolean;
153
+ /**
154
+ * Checks if given crypto asset is MEZO token
155
+ * @param key The key of crypto asset
156
+ * @returns True if crypto asset is MEZO token
157
+ */
158
+ export declare function isMezoCryptoAsset(key: string): boolean;
144
159
  export {};
145
160
  //# sourceMappingURL=assets.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"assets.d.ts","sourceRoot":"","sources":["../../../src/utils/assets.ts"],"names":[],"mappings":"AAAA,QAAA,MAAM,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAkEX,CAAA;AAED;;;;GAIG;AACH,wBAAgB,QAAQ,CAAC,GAAG,EAAE,MAAM,OAAO,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAEhD;AAED;;;;GAIG;AACH,wBAAgB,wBAAwB,CAAC,GAAG,EAAE,MAAM,WAEnD;AAED;;;;GAIG;AACH,wBAAgB,oBAAoB,CAAC,GAAG,EAAE,MAAM,WAE/C;AAED;;;;GAIG;AACH,wBAAgB,mBAAmB,CAAC,GAAG,EAAE,MAAM,WAE9C"}
1
+ {"version":3,"file":"assets.d.ts","sourceRoot":"","sources":["../../../src/utils/assets.ts"],"names":[],"mappings":"AAAA,QAAA,MAAM,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAuEX,CAAA;AAED;;;;GAIG;AACH,wBAAgB,QAAQ,CAAC,GAAG,EAAE,MAAM,OAAO,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAEhD;AAED;;;;GAIG;AACH,wBAAgB,wBAAwB,CAAC,GAAG,EAAE,MAAM,WAEnD;AAED;;;;GAIG;AACH,wBAAgB,oBAAoB,CAAC,GAAG,EAAE,MAAM,WAE/C;AAED;;;;GAIG;AACH,wBAAgB,mBAAmB,CAAC,GAAG,EAAE,MAAM,WAE9C;AAED;;;;GAIG;AACH,wBAAgB,iBAAiB,CAAC,GAAG,EAAE,MAAM,WAE5C"}
@@ -64,6 +64,11 @@ const ASSETS = {
64
64
  symbol: "mxSolvBTC",
65
65
  decimals: 18,
66
66
  },
67
+ MEZO: {
68
+ name: "MEZO",
69
+ symbol: "MEZO",
70
+ decimals: 18,
71
+ },
67
72
  };
68
73
  /**
69
74
  * Gets details of given crypto asset
@@ -97,4 +102,12 @@ export function isUsdLikeCryptoAsset(key) {
97
102
  export function isTTokenCryptoAsset(key) {
98
103
  return /^(mt|t)$/i.test(key);
99
104
  }
105
+ /**
106
+ * Checks if given crypto asset is MEZO token
107
+ * @param key The key of crypto asset
108
+ * @returns True if crypto asset is MEZO token
109
+ */
110
+ export function isMezoCryptoAsset(key) {
111
+ return /^mezo$/i.test(key);
112
+ }
100
113
  //# sourceMappingURL=assets.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"assets.js","sourceRoot":"","sources":["../../../src/utils/assets.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,GAAG;IACb,GAAG,EAAE;QACH,IAAI,EAAE,SAAS;QACf,MAAM,EAAE,KAAK;QACb,QAAQ,EAAE,EAAE;KACb;IACD,GAAG,EAAE;QACH,IAAI,EAAE,UAAU;QAChB,MAAM,EAAE,KAAK;QACb,QAAQ,EAAE,EAAE;KACb;IACD,IAAI,EAAE;QACJ,IAAI,EAAE,MAAM;QACZ,MAAM,EAAE,MAAM;QACd,QAAQ,EAAE,EAAE;KACb;IACD,IAAI,EAAE;QACJ,IAAI,EAAE,qBAAqB;QAC3B,MAAM,EAAE,MAAM;QACd,QAAQ,EAAE,EAAE;KACb;IAC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AQ,EAAE,EAAE;KACb;IACD,KAAK,EAAE;QACL,IAAI,EAAE,kBAAkB;QACxB,MAAM,EAAE,OAAO;QACf,QAAQ,EAAE,CAAC;KACZ;IACD,SAAS,EAAE;QACT,IAAI,EAAE,eAAe;QACrB,MAAM,EAAE,WAAW;QACnB,QAAQ,EAAE,EAAE;KACb;IACD,IAAI,EAAE;QACJ,IAAI,EAAE,MAAM;QACZ,MAAM,EAAE,MAAM;QACd,QAAQ,EAAE,EAAE;KACb;CACF,CAAA;AAED;;;;GAIG;AACH,MAAM,UAAU,QAAQ,CAAC,GAAwB;IAC/C,OAAO,MAAM,CAAC,GAAG,CAAC,CAAA;AACpB,CAAC;AAED;;;;GAIG;AACH,MAAM,UAAU,wBAAwB,CAAC,GAAW;IAClD,OAAO,QAAQ,CAAC,IAAI,CAAC,GAAG,CAAC,CAAA;AAC3B,CAAC;AAED;;;;GAIG;AACH,MAAM,UAAU,oBAAoB,CAAC,GAAW;IAC9C,OAAO,YAAY,CAAC,IAAI,CAAC,GAAG,CAAC,CAAA;AAC/B,CAAC;AAED;;;;GAIG;AACH,MAAM,UAAU,mBAAmB,CAAC,GAAW;IAC7C,OAAO,WAAW,CAAC,IAAI,CAAC,GAAG,CAAC,CAAA;AAC9B,CAAC;AAED;;;;GAIG;AACH,MAAM,UAAU,iBAAiB,CAAC,GAAW;IAC3C,OAAO,SAAS,CAAC,IAAI,CAAC,GAAG,CAAC,CAAA;AAC5B,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mezo-org/passport",
3
- "version": "0.15.1-dev.6",
3
+ "version": "0.16.0-dev.0",
4
4
  "main": "dist/src/index.js",
5
5
  "license": "GPL-3.0-only",
6
6
  "scripts": {
@@ -40,7 +40,7 @@
40
40
  "@mezo-org/mezo-clay": "0.1.0-dev.37",
41
41
  "@mezo-org/mezod-contracts": "^1.0.0",
42
42
  "@mezo-org/musd-contracts": "^1.0.1",
43
- "@mezo-org/orangekit": "1.0.0-beta.40-dev.28",
43
+ "@mezo-org/orangekit": "1.0.0-beta.40-dev.19",
44
44
  "@mezo-org/sign-in-with-wallet": "1.0.0-beta.8",
45
45
  "qrcode.react": "^4.2.0",
46
46
  "styletron-engine-monolithic": "^1.0.0",
@@ -49,10 +49,10 @@
49
49
  "zustand": "^5.0.3"
50
50
  },
51
51
  "peerDependencies": {
52
- "@rainbow-me/rainbowkit": "^2.0.2",
52
+ "@rainbow-me/rainbowkit": "2.0.2",
53
53
  "@tanstack/react-query": "^5.28.4",
54
- "react": ">=18",
55
- "viem": "2.x",
56
- "wagmi": "2.x"
54
+ "react": "^18.2.0",
55
+ "viem": "2.22.8",
56
+ "wagmi": "2.5.12"
57
57
  }
58
- }
58
+ }
@@ -10,7 +10,7 @@ import DefaultAvatar from "../../assets/DefaultAvatar"
10
10
  import ConnectedTrigger from "./ConnectedTrigger"
11
11
  import Content from "./Content"
12
12
  import DisconnectedTrigger from "./DisconnectedTrigger"
13
- import { useWalletAccount } from "../../hooks/useWalletAccount"
13
+ import useWalletAccount from "../../hooks/useWalletAccount"
14
14
  import { useWatchTransferEventsForAllTokens } from "../../hooks/useWatchTransferEvents"
15
15
 
16
16
  export type DropdownProps = {
@@ -13,7 +13,7 @@ import { QRCodeSVG } from "qrcode.react"
13
13
  import NestedViewLayout from "../NestedViewLayout"
14
14
  import { getAddressExplorerUrl } from "../../../utils/address"
15
15
  import { usePassportContext } from "../../../hooks/usePassportContext"
16
- import { useWalletAccount } from "../../../hooks/useWalletAccount"
16
+ import useWalletAccount from "../../../hooks/useWalletAccount"
17
17
 
18
18
  function Receive() {
19
19
  const { environment } = usePassportContext()
@@ -11,7 +11,7 @@ import React from "react"
11
11
  import { usePassportContext } from "../../../hooks/usePassportContext"
12
12
  import { getAddressExplorerUrl } from "../../../utils/address"
13
13
  import useDropdownStore, { DropdownView } from "../../../stores/dropdownStore"
14
- import { useWalletAccount } from "../../../hooks/useWalletAccount"
14
+ import useWalletAccount from "../../../hooks/useWalletAccount"
15
15
 
16
16
  const buttonStartEnhancerSize = 12
17
17
 
@@ -13,7 +13,7 @@ import React, { useState } from "react"
13
13
  import { useCopyToClipboard } from "usehooks-ts"
14
14
  import { usePassportContext } from "../../../hooks/usePassportContext"
15
15
  import { getAddressExplorerUrl, trimAddress } from "../../../utils/address"
16
- import { useWalletAccount } from "../../../hooks/useWalletAccount"
16
+ import useWalletAccount from "../../../hooks/useWalletAccount"
17
17
 
18
18
  export default function WalletAddress(props: BlockProps) {
19
19
  const { overrides, ...restProps } = props
package/src/config.ts CHANGED
@@ -12,7 +12,7 @@ import { getOKXWallet, getUnisatWallet, getXverseWallet } from "./wallet"
12
12
 
13
13
  type WagmiConfigParameters = Omit<
14
14
  CreateConfigParameters,
15
- "client" | "connectors" | "chains" | "transports"
15
+ "client" | "connectors" | "chains" | "wallets" | "transports"
16
16
  >
17
17
  type GetDefaultConfigParameters = WagmiConfigParameters & {
18
18
  appName: string
@@ -20,7 +20,7 @@ type GetDefaultConfigParameters = WagmiConfigParameters & {
20
20
  appDescription?: string
21
21
  appUrl?: string
22
22
  appIcon?: string
23
- wallets?: WalletList
23
+ bitcoinWallets?: WalletList
24
24
  walletConnectProjectId?: string
25
25
  chains?: [Chain, ...Chain[]]
26
26
  transports?: Pick<CreateConfigParameters, "transports">
@@ -116,7 +116,7 @@ export function getConfig(config: GetDefaultConfigParameters): Config {
116
116
  ...restParameters
117
117
  } = config
118
118
 
119
- const wallets = config.wallets ?? [...getDefaultWallets(mezoNetwork)]
119
+ const wallets = config.bitcoinWallets ?? [...getDefaultWallets(mezoNetwork)]
120
120
 
121
121
  return getDefaultConfig({
122
122
  ...defaultConfig,
@@ -27,4 +27,3 @@ export {
27
27
  export * from "./useUpdateMezoId"
28
28
  export * from "./useValidateMezoId"
29
29
  export * from "./useRewardsApiClient"
30
- export * from "./useWalletAccount"
@@ -13,7 +13,7 @@ import {
13
13
  } from "../utils/siww"
14
14
  import { useGetAccountByAddress } from "./useGetAccountByAddress"
15
15
  import type { Session } from "../api"
16
- import { useWalletAccount } from "./useWalletAccount"
16
+ import useWalletAccount from "./useWalletAccount"
17
17
 
18
18
  function useAuthenticateWithWallet(
19
19
  shouldCreateAccount = false,