@matchain/matchid-sdk-react 0.1.26-alpha.1 → 0.1.26-alpha.3

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/dist/index.js CHANGED
@@ -1581,8 +1581,6 @@ function RecoveryModal({
1581
1581
  // src/components/EVMModal/index.tsx
1582
1582
  var import_rainbowkit = require("@rainbow-me/rainbowkit");
1583
1583
  var import_wagmi2 = require("wagmi");
1584
- var import_wallets = require("@rainbow-me/rainbowkit/wallets");
1585
- var import_chains = require("wagmi/chains");
1586
1584
 
1587
1585
  // src/hooks/useEthersSigner.ts
1588
1586
  var React = __toESM(require("react"));
@@ -2728,23 +2726,6 @@ function SOLModal({
2728
2726
  // src/components/EVMModal/index.tsx
2729
2727
  var import_styles2 = require("@rainbow-me/rainbowkit/styles.css");
2730
2728
  var import_jsx_runtime46 = require("react/jsx-runtime");
2731
- var wagmiConfig = (0, import_rainbowkit.getDefaultConfig)({
2732
- appName: "MatchID",
2733
- projectId: "9ac6ea7e07860f04616fb311b447dee9",
2734
- wallets: [
2735
- {
2736
- groupName: "Recommended",
2737
- wallets: [
2738
- import_wallets.metaMaskWallet,
2739
- import_wallets.walletConnectWallet,
2740
- import_wallets.okxWallet,
2741
- import_wallets.bitgetWallet,
2742
- import_wallets.injectedWallet
2743
- ]
2744
- }
2745
- ],
2746
- chains: [import_chains.mainnet, import_chains.base, import_chains.optimism, import_chains.bsc]
2747
- });
2748
2729
  function WalletContent2({
2749
2730
  onSuccess,
2750
2731
  type
@@ -2923,7 +2904,7 @@ function EVMModal({
2923
2904
  onSuccess,
2924
2905
  ...props
2925
2906
  }) {
2926
- return /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(ModalWithHeader, { ...props, title: props.title || firstUpperCase(type + " EVM Wallet"), children: /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(import_wagmi2.WagmiProvider, { config: wagmiConfig, children: /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(import_rainbowkit.RainbowKitProvider, { children: /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(WalletContent2, { onSuccess, type }) }) }) });
2907
+ return /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(ModalWithHeader, { ...props, title: props.title || firstUpperCase(type + " EVM Wallet"), children: /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(WalletContent2, { onSuccess, type }) });
2927
2908
  }
2928
2909
 
2929
2910
  // src/context/BusinessProvider.tsx
@@ -3219,6 +3200,322 @@ function useInit({
3219
3200
 
3220
3201
  // src/MatchContext.tsx
3221
3202
  var import_react_query = require("@tanstack/react-query");
3203
+ var import_wagmi4 = require("wagmi");
3204
+
3205
+ // src/config/chains/AllChains.ts
3206
+ var import_chains = require("wagmi/chains");
3207
+
3208
+ // src/config/chains/MatchTest.ts
3209
+ var import_viem3 = require("viem");
3210
+ var matchTest = /* @__PURE__ */ (0, import_viem3.defineChain)({
3211
+ //定义matchTest链
3212
+ id: 699,
3213
+ name: "MatchTest",
3214
+ nativeCurrency: { name: "Match Coin", symbol: "BNB", decimals: 18 },
3215
+ rpcUrls: {
3216
+ default: {
3217
+ http: ["https://testnet-rpc.matchain.io"]
3218
+ }
3219
+ },
3220
+ blockExplorers: {
3221
+ default: {
3222
+ name: "Matchscan",
3223
+ url: "https://testnet.matchscan.io/",
3224
+ apiUrl: "https://testnet.matchscan.io/api"
3225
+ }
3226
+ },
3227
+ iconUrl: "https://testnet.matchscan.io/static/identicon_logos/blockies.png",
3228
+ contracts: {
3229
+ multicall3: {
3230
+ address: "0xca11bde05977b3631167028862be2a173976ca11",
3231
+ blockCreated: 751532
3232
+ },
3233
+ ensRegistry: { address: "0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e" },
3234
+ ensUniversalResolver: {
3235
+ address: "0xc8Af999e38273D658BE1b921b88A9Ddf005769cC",
3236
+ blockCreated: 5317080
3237
+ }
3238
+ }
3239
+ // testnet: true,
3240
+ });
3241
+
3242
+ // src/config/chains/MatchMain.ts
3243
+ var import_viem4 = require("viem");
3244
+ var matchMain = /* @__PURE__ */ (0, import_viem4.defineChain)({
3245
+ //定义match链
3246
+ id: 698,
3247
+ name: "Matchain",
3248
+ nativeCurrency: { name: "Match Coin", symbol: "BNB", decimals: 18 },
3249
+ rpcUrls: {
3250
+ default: {
3251
+ http: ["https://rpc.matchain.io"]
3252
+ }
3253
+ },
3254
+ blockExplorers: {
3255
+ default: {
3256
+ name: "Matchscan",
3257
+ url: "https://matchscan.io/",
3258
+ apiUrl: "https://matchscan.io/api"
3259
+ }
3260
+ },
3261
+ iconUrl: "https://matchscan.io/static/identicon_logos/blockies.png",
3262
+ contracts: {
3263
+ multicall3: {
3264
+ address: "0xca11bde05977b3631167028862be2a173976ca11"
3265
+ }
3266
+ }
3267
+ // testnet: true,
3268
+ });
3269
+
3270
+ // src/config/chains/AllChains.ts
3271
+ var AllChains = [
3272
+ matchTest,
3273
+ matchMain,
3274
+ import_chains.acala,
3275
+ import_chains.ancient8,
3276
+ import_chains.ancient8Sepolia,
3277
+ import_chains.anvil,
3278
+ import_chains.apexTestnet,
3279
+ import_chains.arbitrum,
3280
+ import_chains.arbitrumGoerli,
3281
+ import_chains.arbitrumNova,
3282
+ import_chains.astar,
3283
+ import_chains.arbitrumSepolia,
3284
+ import_chains.aurora,
3285
+ import_chains.auroraTestnet,
3286
+ import_chains.auroria,
3287
+ import_chains.avalanche,
3288
+ import_chains.avalancheFuji,
3289
+ import_chains.bahamut,
3290
+ import_chains.base,
3291
+ import_chains.baseGoerli,
3292
+ import_chains.baseSepolia,
3293
+ import_chains.bearNetworkChainMainnet,
3294
+ import_chains.bearNetworkChainTestnet,
3295
+ import_chains.berachainTestnet,
3296
+ import_chains.bitTorrent,
3297
+ import_chains.bitTorrentTestnet,
3298
+ import_chains.blast,
3299
+ import_chains.blastSepolia,
3300
+ import_chains.boba,
3301
+ import_chains.bronos,
3302
+ import_chains.bronosTestnet,
3303
+ import_chains.bsc,
3304
+ import_chains.bscTestnet,
3305
+ import_chains.bscGreenfield,
3306
+ import_chains.bxn,
3307
+ import_chains.bxnTestnet,
3308
+ import_chains.canto,
3309
+ import_chains.celo,
3310
+ import_chains.celoAlfajores,
3311
+ import_chains.chiliz,
3312
+ import_chains.classic,
3313
+ import_chains.confluxESpace,
3314
+ import_chains.confluxESpaceTestnet,
3315
+ import_chains.coreDao,
3316
+ import_chains.cronos,
3317
+ import_chains.cronosTestnet,
3318
+ import_chains.crossbell,
3319
+ import_chains.defichainEvm,
3320
+ import_chains.defichainEvmTestnet,
3321
+ import_chains.dfk,
3322
+ import_chains.dogechain,
3323
+ import_chains.edgeware,
3324
+ import_chains.edgewareTestnet,
3325
+ import_chains.eos,
3326
+ import_chains.eosTestnet,
3327
+ import_chains.etherlinkTestnet,
3328
+ import_chains.evmos,
3329
+ import_chains.evmosTestnet,
3330
+ import_chains.ekta,
3331
+ import_chains.ektaTestnet,
3332
+ import_chains.fantom,
3333
+ import_chains.fantomSonicTestnet,
3334
+ import_chains.fantomTestnet,
3335
+ import_chains.fibo,
3336
+ import_chains.filecoin,
3337
+ import_chains.filecoinCalibration,
3338
+ import_chains.filecoinHyperspace,
3339
+ import_chains.flare,
3340
+ import_chains.flareTestnet,
3341
+ import_chains.foundry,
3342
+ import_chains.fraxtal,
3343
+ import_chains.fraxtalTestnet,
3344
+ import_chains.fuse,
3345
+ import_chains.fuseSparknet,
3346
+ import_chains.iotex,
3347
+ import_chains.iotexTestnet,
3348
+ import_chains.jbc,
3349
+ import_chains.karura,
3350
+ import_chains.gobi,
3351
+ import_chains.goerli,
3352
+ import_chains.gnosis,
3353
+ import_chains.gnosisChiado,
3354
+ import_chains.hardhat,
3355
+ import_chains.harmonyOne,
3356
+ import_chains.haqqMainnet,
3357
+ import_chains.haqqTestedge2,
3358
+ import_chains.hedera,
3359
+ import_chains.hederaTestnet,
3360
+ import_chains.hederaPreviewnet,
3361
+ import_chains.holesky,
3362
+ import_chains.kakarotSepolia,
3363
+ import_chains.kava,
3364
+ import_chains.kavaTestnet,
3365
+ import_chains.kcc,
3366
+ import_chains.klaytn,
3367
+ import_chains.klaytnBaobab,
3368
+ import_chains.kroma,
3369
+ import_chains.kromaSepolia,
3370
+ import_chains.lightlinkPegasus,
3371
+ import_chains.lightlinkPhoenix,
3372
+ import_chains.linea,
3373
+ import_chains.lineaTestnet,
3374
+ import_chains.liskSepolia,
3375
+ import_chains.localhost,
3376
+ import_chains.lukso,
3377
+ import_chains.mainnet,
3378
+ import_chains.mandala,
3379
+ import_chains.manta,
3380
+ import_chains.mantaTestnet,
3381
+ import_chains.mantle,
3382
+ import_chains.mantleTestnet,
3383
+ import_chains.merlin,
3384
+ import_chains.metachain,
3385
+ import_chains.metachainIstanbul,
3386
+ import_chains.meter,
3387
+ import_chains.meterTestnet,
3388
+ import_chains.metis,
3389
+ import_chains.metisGoerli,
3390
+ import_chains.mev,
3391
+ import_chains.mevTestnet,
3392
+ import_chains.mode,
3393
+ import_chains.modeTestnet,
3394
+ import_chains.moonbaseAlpha,
3395
+ import_chains.moonbeam,
3396
+ import_chains.moonbeamDev,
3397
+ import_chains.moonriver,
3398
+ import_chains.neonDevnet,
3399
+ import_chains.neonMainnet,
3400
+ import_chains.nexi,
3401
+ import_chains.nexilix,
3402
+ import_chains.oasys,
3403
+ import_chains.oasisTestnet,
3404
+ import_chains.okc,
3405
+ import_chains.optimism,
3406
+ import_chains.optimismGoerli,
3407
+ import_chains.optimismSepolia,
3408
+ import_chains.opBNB,
3409
+ import_chains.opBNBTestnet,
3410
+ import_chains.oortMainnetDev,
3411
+ import_chains.palm,
3412
+ import_chains.palmTestnet,
3413
+ import_chains.pgn,
3414
+ import_chains.pgnTestnet,
3415
+ import_chains.phoenix,
3416
+ import_chains.plinga,
3417
+ import_chains.polygon,
3418
+ import_chains.polygonAmoy,
3419
+ import_chains.polygonMumbai,
3420
+ import_chains.polygonZkEvmTestnet,
3421
+ import_chains.polygonZkEvm,
3422
+ import_chains.pulsechain,
3423
+ import_chains.pulsechainV4,
3424
+ import_chains.qMainnet,
3425
+ import_chains.qTestnet,
3426
+ import_chains.rollux,
3427
+ import_chains.rolluxTestnet,
3428
+ import_chains.ronin,
3429
+ import_chains.rootstock,
3430
+ import_chains.saigon,
3431
+ import_chains.sapphire,
3432
+ import_chains.sapphireTestnet,
3433
+ import_chains.scroll,
3434
+ import_chains.scrollSepolia,
3435
+ import_chains.sepolia,
3436
+ import_chains.shimmer,
3437
+ import_chains.shimmerTestnet,
3438
+ import_chains.skaleBlockBrawlers,
3439
+ import_chains.skaleCalypso,
3440
+ import_chains.skaleCalypsoTestnet,
3441
+ import_chains.skaleCryptoBlades,
3442
+ import_chains.skaleCryptoColosseum,
3443
+ import_chains.skaleEuropa,
3444
+ import_chains.skaleEuropaTestnet,
3445
+ import_chains.skaleExorde,
3446
+ import_chains.skaleHumanProtocol,
3447
+ import_chains.skaleNebula,
3448
+ import_chains.skaleNebulaTestnet,
3449
+ import_chains.skaleRazor,
3450
+ import_chains.skaleTitan,
3451
+ import_chains.skaleTitanTestnet,
3452
+ import_chains.songbird,
3453
+ import_chains.songbirdTestnet,
3454
+ import_chains.spicy,
3455
+ import_chains.shardeumSphinx,
3456
+ import_chains.shibarium,
3457
+ import_chains.syscoin,
3458
+ import_chains.syscoinTestnet,
3459
+ import_chains.taraxa,
3460
+ import_chains.taikoJolnir,
3461
+ import_chains.taikoKatla,
3462
+ import_chains.taikoTestnetSepolia,
3463
+ import_chains.taraxaTestnet,
3464
+ import_chains.telos,
3465
+ import_chains.telosTestnet,
3466
+ import_chains.tenet,
3467
+ import_chains.thunderTestnet,
3468
+ import_chains.vechain,
3469
+ import_chains.wanchain,
3470
+ import_chains.wanchainTestnet,
3471
+ import_chains.wemix,
3472
+ import_chains.wemixTestnet,
3473
+ import_chains.x1Testnet,
3474
+ import_chains.xdc,
3475
+ import_chains.xdcTestnet,
3476
+ import_chains.zhejiang,
3477
+ import_chains.zkFair,
3478
+ import_chains.zkFairTestnet,
3479
+ import_chains.zkSync,
3480
+ import_chains.zkSyncSepoliaTestnet,
3481
+ import_chains.zetachain,
3482
+ import_chains.zetachainAthensTestnet,
3483
+ import_chains.zilliqa,
3484
+ import_chains.zilliqaTestnet,
3485
+ import_chains.zora,
3486
+ import_chains.zoraSepolia,
3487
+ import_chains.zoraTestnet
3488
+ ];
3489
+ var AllChains_default = AllChains;
3490
+
3491
+ // src/config/wagmi.ts
3492
+ var import_wagmi3 = require("wagmi");
3493
+ var import_rainbowkit2 = require("@rainbow-me/rainbowkit");
3494
+ var import_wallets = require("@rainbow-me/rainbowkit/wallets");
3495
+ var transports = {};
3496
+ AllChains_default.forEach((chain) => {
3497
+ transports[chain.id] = (0, import_wagmi3.http)();
3498
+ });
3499
+ var wagmiConfig = (0, import_rainbowkit2.getDefaultConfig)({
3500
+ appName: "MatchID",
3501
+ projectId: "9ac6ea7e07860f04616fb311b447dee9",
3502
+ wallets: [
3503
+ {
3504
+ groupName: "Recommended",
3505
+ wallets: [
3506
+ import_wallets.metaMaskWallet,
3507
+ import_wallets.walletConnectWallet,
3508
+ import_wallets.okxWallet,
3509
+ import_wallets.bitgetWallet,
3510
+ import_wallets.injectedWallet
3511
+ ]
3512
+ }
3513
+ ],
3514
+ chains: AllChains_default
3515
+ });
3516
+
3517
+ // src/MatchContext.tsx
3518
+ var import_rainbowkit3 = require("@rainbow-me/rainbowkit");
3222
3519
  var import_jsx_runtime49 = require("react/jsx-runtime");
3223
3520
  var queryClient = new import_react_query.QueryClient();
3224
3521
  var MatchContext = (0, import_react19.createContext)(void 0);
@@ -3232,7 +3529,7 @@ var MatchProvider = ({ children, appid, events, theme = "light", endpoints }) =>
3232
3529
  useWalletInit({
3233
3530
  refreshOverview: loadOverview
3234
3531
  });
3235
- return /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(import_react_query.QueryClientProvider, { client: queryClient, children: /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
3532
+ return /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(import_wagmi4.WagmiProvider, { config: wagmiConfig, children: /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(import_react_query.QueryClientProvider, { client: queryClient, children: /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(import_rainbowkit3.RainbowKitProvider, { children: /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
3236
3533
  MatchContext.Provider,
3237
3534
  {
3238
3535
  value: {
@@ -3244,7 +3541,7 @@ var MatchProvider = ({ children, appid, events, theme = "light", endpoints }) =>
3244
3541
  },
3245
3542
  children: /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(context_default, { children })
3246
3543
  }
3247
- ) });
3544
+ ) }) }) });
3248
3545
  };
3249
3546
  var useMatch = () => {
3250
3547
  const context = (0, import_react19.useContext)(MatchContext);
@@ -3330,68 +3627,6 @@ __export(chains_exports, {
3330
3627
  MatchMain: () => matchMain,
3331
3628
  MatchTest: () => matchTest
3332
3629
  });
3333
-
3334
- // src/config/chains/MatchMain.ts
3335
- var import_viem3 = require("viem");
3336
- var matchMain = /* @__PURE__ */ (0, import_viem3.defineChain)({
3337
- //定义match链
3338
- id: 698,
3339
- name: "Matchain",
3340
- nativeCurrency: { name: "Match Coin", symbol: "BNB", decimals: 18 },
3341
- rpcUrls: {
3342
- default: {
3343
- http: ["https://rpc.matchain.io"]
3344
- }
3345
- },
3346
- blockExplorers: {
3347
- default: {
3348
- name: "Matchscan",
3349
- url: "https://matchscan.io/",
3350
- apiUrl: "https://matchscan.io/api"
3351
- }
3352
- },
3353
- iconUrl: "https://matchscan.io/static/identicon_logos/blockies.png",
3354
- contracts: {
3355
- multicall3: {
3356
- address: "0xca11bde05977b3631167028862be2a173976ca11"
3357
- }
3358
- }
3359
- // testnet: true,
3360
- });
3361
-
3362
- // src/config/chains/MatchTest.ts
3363
- var import_viem4 = require("viem");
3364
- var matchTest = /* @__PURE__ */ (0, import_viem4.defineChain)({
3365
- //定义matchTest链
3366
- id: 699,
3367
- name: "MatchTest",
3368
- nativeCurrency: { name: "Match Coin", symbol: "BNB", decimals: 18 },
3369
- rpcUrls: {
3370
- default: {
3371
- http: ["https://testnet-rpc.matchain.io"]
3372
- }
3373
- },
3374
- blockExplorers: {
3375
- default: {
3376
- name: "Matchscan",
3377
- url: "https://testnet.matchscan.io/",
3378
- apiUrl: "https://testnet.matchscan.io/api"
3379
- }
3380
- },
3381
- iconUrl: "https://testnet.matchscan.io/static/identicon_logos/blockies.png",
3382
- contracts: {
3383
- multicall3: {
3384
- address: "0xca11bde05977b3631167028862be2a173976ca11",
3385
- blockCreated: 751532
3386
- },
3387
- ensRegistry: { address: "0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e" },
3388
- ensUniversalResolver: {
3389
- address: "0xc8Af999e38273D658BE1b921b88A9Ddf005769cC",
3390
- blockCreated: 5317080
3391
- }
3392
- }
3393
- // testnet: true,
3394
- });
3395
3630
  // Annotate the CommonJS export names for ESM import in node:
3396
3631
  0 && (module.exports = {
3397
3632
  Api,