@sign-global/tokentable-core 1.14.0 → 1.14.2

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/CHANGELOG.md CHANGED
@@ -1,5 +1,17 @@
1
1
  # @sign-global/tokentable-core
2
2
 
3
+ ## 1.14.2
4
+
5
+ ### Patch Changes
6
+
7
+ - Sui: honor the `chainRpc` option instead of always using the public fullnode
8
+
9
+ ## 1.14.1
10
+
11
+ ### Patch Changes
12
+
13
+ - feat: add MegaETH chain support
14
+
3
15
  ## 1.14.0
4
16
 
5
17
  ### Minor Changes
package/dist/index.d.mts CHANGED
@@ -624,6 +624,41 @@ declare const SupportedChains: readonly [{
624
624
  fees?: viem.ChainFees<undefined> | undefined;
625
625
  formatters?: undefined;
626
626
  serializers?: viem.ChainSerializers<undefined, viem.TransactionSerializable> | undefined;
627
+ }, {
628
+ blockExplorers: {
629
+ readonly default: {
630
+ readonly name: "Blockscout";
631
+ readonly url: "https://megaeth.blockscout.com";
632
+ readonly apiUrl: "https://megaeth.blockscout.com/api";
633
+ };
634
+ };
635
+ blockTime: 1000;
636
+ contracts: {
637
+ readonly multicall3: {
638
+ readonly address: "0xcA11bde05977b3631167028862bE2a173976CA11";
639
+ };
640
+ };
641
+ ensTlds?: readonly string[] | undefined;
642
+ id: 4326;
643
+ name: "MegaETH";
644
+ nativeCurrency: {
645
+ readonly name: "Ether";
646
+ readonly symbol: "ETH";
647
+ readonly decimals: 18;
648
+ };
649
+ experimental_preconfirmationTime?: number | undefined | undefined;
650
+ rpcUrls: {
651
+ readonly default: {
652
+ readonly http: readonly ["https://mainnet.megaeth.com/rpc"];
653
+ readonly webSocket: readonly ["wss://mainnet.megaeth.com/ws"];
654
+ };
655
+ };
656
+ sourceId?: number | undefined | undefined;
657
+ testnet?: boolean | undefined | undefined;
658
+ custom?: Record<string, unknown> | undefined;
659
+ fees?: viem.ChainFees<undefined> | undefined;
660
+ formatters?: undefined;
661
+ serializers?: viem.ChainSerializers<undefined, viem.TransactionSerializable> | undefined;
627
662
  }, {
628
663
  id: CHAIN;
629
664
  name: string;
@@ -1712,6 +1747,42 @@ declare const hyperEVM: {
1712
1747
  formatters?: undefined;
1713
1748
  serializers?: viem.ChainSerializers<undefined, viem.TransactionSerializable> | undefined;
1714
1749
  };
1750
+ declare const megaeth: {
1751
+ blockExplorers: {
1752
+ readonly default: {
1753
+ readonly name: "Blockscout";
1754
+ readonly url: "https://megaeth.blockscout.com";
1755
+ readonly apiUrl: "https://megaeth.blockscout.com/api";
1756
+ };
1757
+ };
1758
+ blockTime: 1000;
1759
+ contracts: {
1760
+ readonly multicall3: {
1761
+ readonly address: "0xcA11bde05977b3631167028862bE2a173976CA11";
1762
+ };
1763
+ };
1764
+ ensTlds?: readonly string[] | undefined;
1765
+ id: 4326;
1766
+ name: "MegaETH";
1767
+ nativeCurrency: {
1768
+ readonly name: "Ether";
1769
+ readonly symbol: "ETH";
1770
+ readonly decimals: 18;
1771
+ };
1772
+ experimental_preconfirmationTime?: number | undefined | undefined;
1773
+ rpcUrls: {
1774
+ readonly default: {
1775
+ readonly http: readonly ["https://mainnet.megaeth.com/rpc"];
1776
+ readonly webSocket: readonly ["wss://mainnet.megaeth.com/ws"];
1777
+ };
1778
+ };
1779
+ sourceId?: number | undefined | undefined;
1780
+ testnet?: boolean | undefined | undefined;
1781
+ custom?: Record<string, unknown> | undefined;
1782
+ fees?: viem.ChainFees<undefined> | undefined;
1783
+ formatters?: undefined;
1784
+ serializers?: viem.ChainSerializers<undefined, viem.TransactionSerializable> | undefined;
1785
+ };
1715
1786
 
1716
1787
  declare const ZERO_ADDRESS = "0x0000000000000000000000000000000000000000";
1717
1788
  declare const CONST: {
@@ -2539,4 +2610,4 @@ declare const getAvailableClaimAmountForSignature: ({ contractAddress, chainId,
2539
2610
  }[];
2540
2611
  }) => Promise<string | 0>;
2541
2612
 
2542
- export { AirdropSigIdentityTypeEnum, ApiClient, type ApiClientOptions, type ApiRequestOptions, AirdropService as AptosAirdropService, type AptosWalletClient, CONST, ChainConfig, type ChainId, ChainType, ETokenType, ErrorCode, AirdropService$3 as EvmAirdropService, EvmAirdropVersionEnum, type EvmContractClientOption, SignatureAirdropService$2 as EvmSignatureAirdropService, type FetchTokenMetadataOptions, type FetchTokenVersionOptions, type IAirdropClaim, type IAirdropClaimData, type IAirdropData, type IAirdropOptions, type IAirdropService, type IAirdropSignatureClaim, type IAirdropSignatureData, type IAirdropSignatureIdentity, type IClaimSignature, type IContractConfig, type IExtraData, type IProject, type IProjectExtra, type ISignatureClaimData, type IWalletClient, type Identity, AirdropService$2 as SolanaAirdropService, SignatureAirdropService$1 as SolanaSignatureAirdropService, SplTokenVersion, SignatureAirdropService as SuiSignatureAirdropService, type SupportedChainIds, type SupportedChainType, SupportedChains, type ThemeConfig, AirdropService$1 as TonAirdropService, TonAirdropVersionEnum, TonWalletService, ZERO_ADDRESS, apiClient, aptosTestNet, batchCheckClaimedForSignature, bindWallet, checkEligibility, checkGetSignatures, cleanUrlParams, clusterApiUrl, connectDiscordApi, connectGoogleApi, connectTwitter, delay, disconnectRecipient, fetchTokenVersion, flipAddressType, getAirdropContractConfig, getAirdropPro, getAirdropProject, getAirdropProjectId, getAirdropQuery, getAvailableClaimAmountForSignature, getChainById, getChainConfig, getChainRpc, getCustomNaNoId, getJettonInfo, getOrCreateAssociatedTokenAccount, getTonProjectIdByAddress, hexStrToU8Array, hyperEVM, isBeforeByUnix, isGreaterThan, isMobile, mevmDevNet, retry, safeParseJSON, safePlus, signBrBTestnet, solanaDevNet, solanaMainNet, suiMainNet, suiTestNet, tonMainNet, tonTestNet };
2613
+ export { AirdropSigIdentityTypeEnum, ApiClient, type ApiClientOptions, type ApiRequestOptions, AirdropService as AptosAirdropService, type AptosWalletClient, CONST, ChainConfig, type ChainId, ChainType, ETokenType, ErrorCode, AirdropService$3 as EvmAirdropService, EvmAirdropVersionEnum, type EvmContractClientOption, SignatureAirdropService$2 as EvmSignatureAirdropService, type FetchTokenMetadataOptions, type FetchTokenVersionOptions, type IAirdropClaim, type IAirdropClaimData, type IAirdropData, type IAirdropOptions, type IAirdropService, type IAirdropSignatureClaim, type IAirdropSignatureData, type IAirdropSignatureIdentity, type IClaimSignature, type IContractConfig, type IExtraData, type IProject, type IProjectExtra, type ISignatureClaimData, type IWalletClient, type Identity, AirdropService$2 as SolanaAirdropService, SignatureAirdropService$1 as SolanaSignatureAirdropService, SplTokenVersion, SignatureAirdropService as SuiSignatureAirdropService, type SupportedChainIds, type SupportedChainType, SupportedChains, type ThemeConfig, AirdropService$1 as TonAirdropService, TonAirdropVersionEnum, TonWalletService, ZERO_ADDRESS, apiClient, aptosTestNet, batchCheckClaimedForSignature, bindWallet, checkEligibility, checkGetSignatures, cleanUrlParams, clusterApiUrl, connectDiscordApi, connectGoogleApi, connectTwitter, delay, disconnectRecipient, fetchTokenVersion, flipAddressType, getAirdropContractConfig, getAirdropPro, getAirdropProject, getAirdropProjectId, getAirdropQuery, getAvailableClaimAmountForSignature, getChainById, getChainConfig, getChainRpc, getCustomNaNoId, getJettonInfo, getOrCreateAssociatedTokenAccount, getTonProjectIdByAddress, hexStrToU8Array, hyperEVM, isBeforeByUnix, isGreaterThan, isMobile, megaeth, mevmDevNet, retry, safeParseJSON, safePlus, signBrBTestnet, solanaDevNet, solanaMainNet, suiMainNet, suiTestNet, tonMainNet, tonTestNet };
package/dist/index.d.ts CHANGED
@@ -624,6 +624,41 @@ declare const SupportedChains: readonly [{
624
624
  fees?: viem.ChainFees<undefined> | undefined;
625
625
  formatters?: undefined;
626
626
  serializers?: viem.ChainSerializers<undefined, viem.TransactionSerializable> | undefined;
627
+ }, {
628
+ blockExplorers: {
629
+ readonly default: {
630
+ readonly name: "Blockscout";
631
+ readonly url: "https://megaeth.blockscout.com";
632
+ readonly apiUrl: "https://megaeth.blockscout.com/api";
633
+ };
634
+ };
635
+ blockTime: 1000;
636
+ contracts: {
637
+ readonly multicall3: {
638
+ readonly address: "0xcA11bde05977b3631167028862bE2a173976CA11";
639
+ };
640
+ };
641
+ ensTlds?: readonly string[] | undefined;
642
+ id: 4326;
643
+ name: "MegaETH";
644
+ nativeCurrency: {
645
+ readonly name: "Ether";
646
+ readonly symbol: "ETH";
647
+ readonly decimals: 18;
648
+ };
649
+ experimental_preconfirmationTime?: number | undefined | undefined;
650
+ rpcUrls: {
651
+ readonly default: {
652
+ readonly http: readonly ["https://mainnet.megaeth.com/rpc"];
653
+ readonly webSocket: readonly ["wss://mainnet.megaeth.com/ws"];
654
+ };
655
+ };
656
+ sourceId?: number | undefined | undefined;
657
+ testnet?: boolean | undefined | undefined;
658
+ custom?: Record<string, unknown> | undefined;
659
+ fees?: viem.ChainFees<undefined> | undefined;
660
+ formatters?: undefined;
661
+ serializers?: viem.ChainSerializers<undefined, viem.TransactionSerializable> | undefined;
627
662
  }, {
628
663
  id: CHAIN;
629
664
  name: string;
@@ -1712,6 +1747,42 @@ declare const hyperEVM: {
1712
1747
  formatters?: undefined;
1713
1748
  serializers?: viem.ChainSerializers<undefined, viem.TransactionSerializable> | undefined;
1714
1749
  };
1750
+ declare const megaeth: {
1751
+ blockExplorers: {
1752
+ readonly default: {
1753
+ readonly name: "Blockscout";
1754
+ readonly url: "https://megaeth.blockscout.com";
1755
+ readonly apiUrl: "https://megaeth.blockscout.com/api";
1756
+ };
1757
+ };
1758
+ blockTime: 1000;
1759
+ contracts: {
1760
+ readonly multicall3: {
1761
+ readonly address: "0xcA11bde05977b3631167028862bE2a173976CA11";
1762
+ };
1763
+ };
1764
+ ensTlds?: readonly string[] | undefined;
1765
+ id: 4326;
1766
+ name: "MegaETH";
1767
+ nativeCurrency: {
1768
+ readonly name: "Ether";
1769
+ readonly symbol: "ETH";
1770
+ readonly decimals: 18;
1771
+ };
1772
+ experimental_preconfirmationTime?: number | undefined | undefined;
1773
+ rpcUrls: {
1774
+ readonly default: {
1775
+ readonly http: readonly ["https://mainnet.megaeth.com/rpc"];
1776
+ readonly webSocket: readonly ["wss://mainnet.megaeth.com/ws"];
1777
+ };
1778
+ };
1779
+ sourceId?: number | undefined | undefined;
1780
+ testnet?: boolean | undefined | undefined;
1781
+ custom?: Record<string, unknown> | undefined;
1782
+ fees?: viem.ChainFees<undefined> | undefined;
1783
+ formatters?: undefined;
1784
+ serializers?: viem.ChainSerializers<undefined, viem.TransactionSerializable> | undefined;
1785
+ };
1715
1786
 
1716
1787
  declare const ZERO_ADDRESS = "0x0000000000000000000000000000000000000000";
1717
1788
  declare const CONST: {
@@ -2539,4 +2610,4 @@ declare const getAvailableClaimAmountForSignature: ({ contractAddress, chainId,
2539
2610
  }[];
2540
2611
  }) => Promise<string | 0>;
2541
2612
 
2542
- export { AirdropSigIdentityTypeEnum, ApiClient, type ApiClientOptions, type ApiRequestOptions, AirdropService as AptosAirdropService, type AptosWalletClient, CONST, ChainConfig, type ChainId, ChainType, ETokenType, ErrorCode, AirdropService$3 as EvmAirdropService, EvmAirdropVersionEnum, type EvmContractClientOption, SignatureAirdropService$2 as EvmSignatureAirdropService, type FetchTokenMetadataOptions, type FetchTokenVersionOptions, type IAirdropClaim, type IAirdropClaimData, type IAirdropData, type IAirdropOptions, type IAirdropService, type IAirdropSignatureClaim, type IAirdropSignatureData, type IAirdropSignatureIdentity, type IClaimSignature, type IContractConfig, type IExtraData, type IProject, type IProjectExtra, type ISignatureClaimData, type IWalletClient, type Identity, AirdropService$2 as SolanaAirdropService, SignatureAirdropService$1 as SolanaSignatureAirdropService, SplTokenVersion, SignatureAirdropService as SuiSignatureAirdropService, type SupportedChainIds, type SupportedChainType, SupportedChains, type ThemeConfig, AirdropService$1 as TonAirdropService, TonAirdropVersionEnum, TonWalletService, ZERO_ADDRESS, apiClient, aptosTestNet, batchCheckClaimedForSignature, bindWallet, checkEligibility, checkGetSignatures, cleanUrlParams, clusterApiUrl, connectDiscordApi, connectGoogleApi, connectTwitter, delay, disconnectRecipient, fetchTokenVersion, flipAddressType, getAirdropContractConfig, getAirdropPro, getAirdropProject, getAirdropProjectId, getAirdropQuery, getAvailableClaimAmountForSignature, getChainById, getChainConfig, getChainRpc, getCustomNaNoId, getJettonInfo, getOrCreateAssociatedTokenAccount, getTonProjectIdByAddress, hexStrToU8Array, hyperEVM, isBeforeByUnix, isGreaterThan, isMobile, mevmDevNet, retry, safeParseJSON, safePlus, signBrBTestnet, solanaDevNet, solanaMainNet, suiMainNet, suiTestNet, tonMainNet, tonTestNet };
2613
+ export { AirdropSigIdentityTypeEnum, ApiClient, type ApiClientOptions, type ApiRequestOptions, AirdropService as AptosAirdropService, type AptosWalletClient, CONST, ChainConfig, type ChainId, ChainType, ETokenType, ErrorCode, AirdropService$3 as EvmAirdropService, EvmAirdropVersionEnum, type EvmContractClientOption, SignatureAirdropService$2 as EvmSignatureAirdropService, type FetchTokenMetadataOptions, type FetchTokenVersionOptions, type IAirdropClaim, type IAirdropClaimData, type IAirdropData, type IAirdropOptions, type IAirdropService, type IAirdropSignatureClaim, type IAirdropSignatureData, type IAirdropSignatureIdentity, type IClaimSignature, type IContractConfig, type IExtraData, type IProject, type IProjectExtra, type ISignatureClaimData, type IWalletClient, type Identity, AirdropService$2 as SolanaAirdropService, SignatureAirdropService$1 as SolanaSignatureAirdropService, SplTokenVersion, SignatureAirdropService as SuiSignatureAirdropService, type SupportedChainIds, type SupportedChainType, SupportedChains, type ThemeConfig, AirdropService$1 as TonAirdropService, TonAirdropVersionEnum, TonWalletService, ZERO_ADDRESS, apiClient, aptosTestNet, batchCheckClaimedForSignature, bindWallet, checkEligibility, checkGetSignatures, cleanUrlParams, clusterApiUrl, connectDiscordApi, connectGoogleApi, connectTwitter, delay, disconnectRecipient, fetchTokenVersion, flipAddressType, getAirdropContractConfig, getAirdropPro, getAirdropProject, getAirdropProjectId, getAirdropQuery, getAvailableClaimAmountForSignature, getChainById, getChainConfig, getChainRpc, getCustomNaNoId, getJettonInfo, getOrCreateAssociatedTokenAccount, getTonProjectIdByAddress, hexStrToU8Array, hyperEVM, isBeforeByUnix, isGreaterThan, isMobile, megaeth, mevmDevNet, retry, safeParseJSON, safePlus, signBrBTestnet, solanaDevNet, solanaMainNet, suiMainNet, suiTestNet, tonMainNet, tonTestNet };
package/dist/index.js CHANGED
@@ -83,6 +83,7 @@ __export(index_exports, {
83
83
  isBeforeByUnix: () => isBeforeByUnix,
84
84
  isGreaterThan: () => isGreaterThan,
85
85
  isMobile: () => isMobile,
86
+ megaeth: () => megaeth,
86
87
  mevmDevNet: () => mevmDevNet,
87
88
  retry: () => retry,
88
89
  safeParseJSON: () => safeParseJSON,
@@ -347,6 +348,34 @@ var hyperEVM = (0, import_viem.defineChain)({
347
348
  }
348
349
  }
349
350
  });
351
+ var megaeth = /* @__PURE__ */ (0, import_viem.defineChain)({
352
+ id: 4326,
353
+ blockTime: 1e3,
354
+ name: "MegaETH",
355
+ nativeCurrency: {
356
+ name: "Ether",
357
+ symbol: "ETH",
358
+ decimals: 18
359
+ },
360
+ rpcUrls: {
361
+ default: {
362
+ http: ["https://mainnet.megaeth.com/rpc"],
363
+ webSocket: ["wss://mainnet.megaeth.com/ws"]
364
+ }
365
+ },
366
+ blockExplorers: {
367
+ default: {
368
+ name: "Blockscout",
369
+ url: "https://megaeth.blockscout.com",
370
+ apiUrl: "https://megaeth.blockscout.com/api"
371
+ }
372
+ },
373
+ contracts: {
374
+ multicall3: {
375
+ address: "0xcA11bde05977b3631167028862bE2a173976CA11"
376
+ }
377
+ }
378
+ });
350
379
 
351
380
  // src/constants/chain-config.ts
352
381
  var import_sdk2 = require("@tonconnect/sdk");
@@ -360,6 +389,7 @@ var SupportedChains = [
360
389
  import_chains.monad,
361
390
  import_chains.cronos,
362
391
  import_chains.memecore,
392
+ megaeth,
363
393
  tonTestNet,
364
394
  tonMainNet,
365
395
  signBrBTestnet,
@@ -401,6 +431,10 @@ var ChainConfig = {
401
431
  contractAddress: "0xa6A2d42E16a690E03bDe181319fDD085880F2605",
402
432
  rpcUrl: import_chains.memecore.rpcUrls.default.http[0]
403
433
  },
434
+ [megaeth.id]: {
435
+ contractAddress: "0xa6A2d42E16a690E03bDe181319fDD085880F2605",
436
+ rpcUrl: megaeth.rpcUrls.default.http[0]
437
+ },
404
438
  [import_chains.cyber.id]: {
405
439
  contractAddress: "0x7915dA247674E430b2a4Dcf01e4471f709428Bc0",
406
440
  rpcUrl: import_chains.cyber.rpcUrls.default.http[0]
@@ -12457,7 +12491,7 @@ var SuiContractClientBase = class {
12457
12491
  this.moduleName = contractInfo.moduleName;
12458
12492
  this.distributorId = contractInfo.distributorId;
12459
12493
  this.wallet = contractInfo.walletClient;
12460
- this.client = new import_client2.SuiClient({ network: this.chainId, url: (0, import_client2.getFullnodeUrl)(this.chainId) });
12494
+ this.client = new import_client2.SuiClient({ network: this.chainId, url: contractInfo.chainRpc || (0, import_client2.getFullnodeUrl)(this.chainId) });
12461
12495
  }
12462
12496
  async signAndExecute(tx) {
12463
12497
  if (!this.wallet) {
@@ -13105,6 +13139,7 @@ var AirdropService4 = class {
13105
13139
  isBeforeByUnix,
13106
13140
  isGreaterThan,
13107
13141
  isMobile,
13142
+ megaeth,
13108
13143
  mevmDevNet,
13109
13144
  retry,
13110
13145
  safeParseJSON,