@moon-x/core 0.13.0 → 0.14.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.
@@ -420,6 +420,9 @@ function isChainSupported(chains, chainId) {
420
420
  function isEvmEntry(entry) {
421
421
  return "chain" in entry;
422
422
  }
423
+ function isTronEntry(entry) {
424
+ return !isEvmEntry(entry) && entry.id.split(":")[0].toLowerCase() === "tron";
425
+ }
423
426
  function normalizeChainItem(item) {
424
427
  if ("chain" in item) return item;
425
428
  if (typeof item.id === "number") {
@@ -448,8 +451,14 @@ function aliasesFor(entry) {
448
451
  }
449
452
  } else {
450
453
  keys.push(entry.id);
451
- const cluster = entry.id.split(":")[1];
452
- if (cluster) keys.push(`solana:${cluster}`, `sol:${cluster}`, cluster);
454
+ const [ns, cluster] = entry.id.split(":");
455
+ if (cluster) {
456
+ if (ns.toLowerCase() === "tron") {
457
+ keys.push(`tron:${cluster}`, `trx:${cluster}`);
458
+ } else {
459
+ keys.push(`solana:${cluster}`, `sol:${cluster}`, cluster);
460
+ }
461
+ }
453
462
  }
454
463
  return keys;
455
464
  }
@@ -488,10 +497,20 @@ function resolveSolanaChainEntry(chains, selector, defaultSelector) {
488
497
  const asSolana = (k) => {
489
498
  if (k == null) return void 0;
490
499
  const e = index.byAlias.get(normalizeChainKey(k));
491
- return e && !isEvmEntry(e) ? e : void 0;
500
+ return e && !isEvmEntry(e) && !isTronEntry(e) ? e : void 0;
492
501
  };
493
502
  if (selector != null) return asSolana(selector);
494
- return asSolana(defaultSelector) ?? index.entries.find((e) => !isEvmEntry(e));
503
+ return asSolana(defaultSelector) ?? index.entries.find((e) => !isEvmEntry(e) && !isTronEntry(e));
504
+ }
505
+ function resolveTronChainEntry(chains, selector, defaultSelector) {
506
+ const index = buildChainIndex(chains ?? []);
507
+ const asTron = (k) => {
508
+ if (k == null) return void 0;
509
+ const e = index.byAlias.get(normalizeChainKey(k));
510
+ return e && isTronEntry(e) ? e : void 0;
511
+ };
512
+ if (selector != null) return asTron(selector);
513
+ return asTron(defaultSelector) ?? index.entries.find(isTronEntry);
495
514
  }
496
515
  function resolveEvmChainEntry(opts) {
497
516
  const index = buildChainIndex(opts.chains ?? []);
@@ -1427,6 +1446,195 @@ async function getSOLTransfersFromInstructions(base64Transaction, logs, solPrice
1427
1446
  return transfers;
1428
1447
  }
1429
1448
 
1449
+ // src/lib/tron/tron-address.ts
1450
+ import { secp256k1 } from "@noble/curves/secp256k1";
1451
+ import { keccak_256 } from "@noble/hashes/sha3";
1452
+ import { sha256 } from "@noble/hashes/sha256";
1453
+ async function tronAddressFromPublicKey(publicKeyHex) {
1454
+ const { default: bs58 } = await import("bs58");
1455
+ const clean = publicKeyHex.replace(/^0x/, "");
1456
+ const uncompressed = secp256k1.ProjectivePoint.fromHex(clean).toRawBytes(
1457
+ false
1458
+ );
1459
+ const hash = keccak_256(uncompressed.subarray(1));
1460
+ const payload = new Uint8Array(21);
1461
+ payload[0] = 65;
1462
+ payload.set(hash.subarray(12), 1);
1463
+ const checksum = sha256(sha256(payload)).subarray(0, 4);
1464
+ const full = new Uint8Array(25);
1465
+ full.set(payload);
1466
+ full.set(checksum, 21);
1467
+ return bs58.encode(full);
1468
+ }
1469
+
1470
+ // src/lib/tron/decode-raw-data.ts
1471
+ import { sha256 as sha2562 } from "@noble/hashes/sha256";
1472
+ function readVarint(buf, pos) {
1473
+ let result = BigInt(0);
1474
+ let shift = BigInt(0);
1475
+ for (; ; ) {
1476
+ const b = buf[pos++];
1477
+ if (b === void 0) throw new Error("truncated varint");
1478
+ result |= BigInt(b & 127) << shift;
1479
+ if ((b & 128) === 0) return [result, pos];
1480
+ shift += BigInt(7);
1481
+ }
1482
+ }
1483
+ function readFields(buf) {
1484
+ const fields = [];
1485
+ let pos = 0;
1486
+ while (pos < buf.length) {
1487
+ const [tag, p1] = readVarint(buf, pos);
1488
+ const num = Number(tag >> BigInt(3));
1489
+ const wire = Number(tag & BigInt(7));
1490
+ pos = p1;
1491
+ if (wire === 0) {
1492
+ const [v, p2] = readVarint(buf, pos);
1493
+ fields.push({ num, wire, varint: v });
1494
+ pos = p2;
1495
+ } else if (wire === 2) {
1496
+ const [len, p2] = readVarint(buf, pos);
1497
+ const end = p2 + Number(len);
1498
+ if (end > buf.length) throw new Error("truncated field");
1499
+ fields.push({ num, wire, bytes: buf.subarray(p2, end) });
1500
+ pos = end;
1501
+ } else if (wire === 5 || wire === 1) {
1502
+ const n = wire === 5 ? 4 : 8;
1503
+ if (pos + n > buf.length) throw new Error("truncated fixed field");
1504
+ fields.push({ num, wire, bytes: buf.subarray(pos, pos + n) });
1505
+ pos += n;
1506
+ } else {
1507
+ throw new Error(`unsupported wire type ${wire}`);
1508
+ }
1509
+ }
1510
+ return fields;
1511
+ }
1512
+ var toHex = (b) => Array.from(b, (x) => x.toString(16).padStart(2, "0")).join("");
1513
+ async function addressFromBytes(b) {
1514
+ const { default: bs58 } = await import("bs58");
1515
+ const checksum = sha2562(sha2562(b)).subarray(0, 4);
1516
+ const full = new Uint8Array(b.length + 4);
1517
+ full.set(b);
1518
+ full.set(checksum, b.length);
1519
+ return bs58.encode(full);
1520
+ }
1521
+ async function fieldValue(f, addressy) {
1522
+ if (f.wire === 0) return f.varint.toString();
1523
+ const b = f.bytes;
1524
+ if (addressy && b.length === 21 && b[0] === 65) return addressFromBytes(b);
1525
+ return toHex(b);
1526
+ }
1527
+ var CONTRACT_TYPES = {
1528
+ 0: "AccountCreateContract",
1529
+ 1: "TransferContract",
1530
+ 2: "TransferAssetContract",
1531
+ 4: "VoteWitnessContract",
1532
+ 11: "FreezeBalanceContract",
1533
+ 12: "UnfreezeBalanceContract",
1534
+ 13: "WithdrawBalanceContract",
1535
+ 31: "TriggerSmartContract",
1536
+ 54: "FreezeBalanceV2Contract",
1537
+ 55: "UnfreezeBalanceV2Contract",
1538
+ 57: "DelegateResourceContract",
1539
+ 58: "UnDelegateResourceContract"
1540
+ };
1541
+ var CONTRACT_FIELDS = {
1542
+ TransferContract: { 1: "owner_address", 2: "to_address", 3: "amount" },
1543
+ TransferAssetContract: {
1544
+ 1: "asset_name",
1545
+ 2: "owner_address",
1546
+ 3: "to_address",
1547
+ 4: "amount"
1548
+ },
1549
+ TriggerSmartContract: {
1550
+ 1: "owner_address",
1551
+ 2: "contract_address",
1552
+ 3: "call_value",
1553
+ 4: "data",
1554
+ 5: "call_token_value",
1555
+ 6: "token_id"
1556
+ }
1557
+ };
1558
+ async function decodeContract(buf) {
1559
+ const out = {};
1560
+ let typeName = "";
1561
+ let anyValue;
1562
+ for (const f of readFields(buf)) {
1563
+ if (f.num === 1 && f.wire === 0) {
1564
+ const n = Number(f.varint);
1565
+ typeName = CONTRACT_TYPES[n] ?? `ContractType(${n})`;
1566
+ out.type = typeName;
1567
+ } else if (f.num === 2 && f.bytes) {
1568
+ for (const a of readFields(f.bytes)) {
1569
+ if (a.num === 1 && a.bytes) {
1570
+ out.type_url = new TextDecoder().decode(a.bytes);
1571
+ } else if (a.num === 2 && a.bytes) {
1572
+ anyValue = a.bytes;
1573
+ }
1574
+ }
1575
+ } else if (f.num === 5) {
1576
+ out.Permission_id = await fieldValue(f, false);
1577
+ }
1578
+ }
1579
+ if (anyValue) {
1580
+ const names = CONTRACT_FIELDS[typeName];
1581
+ if (names) {
1582
+ const value = {};
1583
+ for (const f of readFields(anyValue)) {
1584
+ const name = names[f.num] ?? `field_${f.num}`;
1585
+ value[name] = await fieldValue(f, name.endsWith("_address"));
1586
+ }
1587
+ out.parameter = value;
1588
+ } else {
1589
+ out.parameter_hex = toHex(anyValue);
1590
+ }
1591
+ }
1592
+ return out;
1593
+ }
1594
+ async function decodeTronRawData(rawDataHex) {
1595
+ const clean = rawDataHex.replace(/^0x/i, "");
1596
+ if (!/^[0-9a-fA-F]*$/.test(clean) || clean.length % 2 !== 0) {
1597
+ throw new Error("raw_data_hex is not valid hex");
1598
+ }
1599
+ const buf = Uint8Array.from(
1600
+ clean.match(/.{2}/g)?.map((h) => parseInt(h, 16)) ?? []
1601
+ );
1602
+ const out = {};
1603
+ const contracts = [];
1604
+ for (const f of readFields(buf)) {
1605
+ switch (f.num) {
1606
+ case 1:
1607
+ out.ref_block_bytes = toHex(f.bytes);
1608
+ break;
1609
+ case 3:
1610
+ out.ref_block_num = f.varint.toString();
1611
+ break;
1612
+ case 4:
1613
+ out.ref_block_hash = toHex(f.bytes);
1614
+ break;
1615
+ case 8:
1616
+ out.expiration = Number(f.varint);
1617
+ break;
1618
+ case 10:
1619
+ out.data = new TextDecoder().decode(f.bytes);
1620
+ break;
1621
+ case 11:
1622
+ contracts.push(await decodeContract(f.bytes));
1623
+ break;
1624
+ case 14:
1625
+ out.timestamp = Number(f.varint);
1626
+ break;
1627
+ case 18:
1628
+ out.fee_limit = f.varint.toString();
1629
+ break;
1630
+ default:
1631
+ out[`field_${f.num}`] = f.wire === 0 ? f.varint.toString() : toHex(f.bytes);
1632
+ }
1633
+ }
1634
+ out.contract = contracts;
1635
+ return out;
1636
+ }
1637
+
1430
1638
  // src/lib/build-url.ts
1431
1639
  var buildUrl = (baseUrl, sdkConfig, enableCaptcha, captchaSitekey) => {
1432
1640
  if (!sdkConfig.publishableKey) {
@@ -1569,11 +1777,40 @@ var broadcastSolanaSigned = async (rpcUrl, signedBase58) => {
1569
1777
  }
1570
1778
  return result.result;
1571
1779
  };
1780
+ var broadcastTronSigned = async (rpcUrl, signedTransaction) => {
1781
+ const response = await fetch(
1782
+ `${rpcUrl.replace(/\/$/, "")}/wallet/broadcasttransaction`,
1783
+ {
1784
+ method: "POST",
1785
+ headers: { "Content-Type": "application/json" },
1786
+ body: JSON.stringify(signedTransaction)
1787
+ }
1788
+ );
1789
+ const result = await response.json();
1790
+ if (!result.result) {
1791
+ let message = result.message ?? "";
1792
+ if (/^[0-9a-fA-F]+$/.test(message) && message.length % 2 === 0) {
1793
+ try {
1794
+ message = new TextDecoder().decode(
1795
+ Uint8Array.from(
1796
+ message.match(/.{2}/g).map((h) => parseInt(h, 16))
1797
+ )
1798
+ );
1799
+ } catch {
1800
+ }
1801
+ }
1802
+ throw new Error(
1803
+ `Tron broadcast failed: ${result.code ?? "UNKNOWN"} ${message}`.trim()
1804
+ );
1805
+ }
1806
+ return result.txid ?? signedTransaction.txID;
1807
+ };
1572
1808
 
1573
1809
  // src/lib/wallet-algorithm.ts
1574
1810
  function canonicalAlgorithmFor(chain) {
1575
1811
  switch (chain) {
1576
1812
  case "ethereum":
1813
+ case "tron":
1577
1814
  return "ecdsa";
1578
1815
  case "solana":
1579
1816
  return "exportable-ed25519";
@@ -1633,12 +1870,14 @@ export {
1633
1870
  getChainById,
1634
1871
  isChainSupported,
1635
1872
  isEvmEntry,
1873
+ isTronEntry,
1636
1874
  normalizeChainItem,
1637
1875
  entryCaip2,
1638
1876
  normalizeChainKey,
1639
1877
  buildChainIndex,
1640
1878
  resolveChainEntry,
1641
1879
  resolveSolanaChainEntry,
1880
+ resolveTronChainEntry,
1642
1881
  resolveEvmChainEntry,
1643
1882
  resolveRpcUrl,
1644
1883
  resolveWsUrl,
@@ -1653,11 +1892,14 @@ export {
1653
1892
  getInstructionsForHTML,
1654
1893
  getTransferInfoFromInstructions,
1655
1894
  getSOLTransfersFromInstructions,
1895
+ tronAddressFromPublicKey,
1896
+ decodeTronRawData,
1656
1897
  buildUrl,
1657
1898
  DEFAULT_AUTH_URL,
1658
1899
  serializeEthereumTransaction,
1659
1900
  broadcastEthereumRaw,
1660
1901
  broadcastSolanaSigned,
1902
+ broadcastTronSigned,
1661
1903
  canonicalAlgorithmFor,
1662
1904
  parseDerivationPath,
1663
1905
  arrayLikeToBytes,
package/dist/index.d.mts CHANGED
@@ -1,3 +1,3 @@
1
- export { AccessTokenClaims, AppConfigRequest, AppConfigResponse, AppearanceBackdrop, AppearanceBorderRadius, AppearanceCard, AppearanceColors, AppearanceComponents, AppearanceLogo, AppearanceModeTokens, AppearanceTypography, AttachOAuthTokenRequest, AttachOAuthTokenResponse, AuthAppearance, AuthFlow, AuthFlowComponent, AuthLoginMethod, AuthProviderConfig, BaseGetBalanceParams, BaseGetBalanceResult, BaseGetTokenAccountsParams, BaseSendTransactionParams, BaseSendTransactionResult, BaseSignMessageParams, BaseSignMessageResult, BaseSignTransactionParams, BaseSignTransactionResult, BaseTokenClaims, BaseUIOptions, BaseWalletHooks, BlockExplorer, Chain, ChainConfigItem, ChainEntry, ChainLikeWithId, ComponentStyle, ContractUIOptions, CreateWalletResponse, DefaultFundingMethod, DeleteSessionRequest, DeleteSessionResponse, DetachOAuthTokenRequest, DeviceFingerprint, DisplayMode, EmailOtpConfig, EmailOtpFlowState, EphemeralSigner, EphemeralSignerChain, EphemeralSignerScheme, EphemeralSignerWallet, EthereumFundingConfig, EthereumGetBalanceParams, EthereumGetBalanceResult, EthereumGetTokenAccountsByOwnerParams, EthereumGetTokenAccountsByOwnerResult, EthereumSendTransactionParams, EthereumSendTransactionRequest, EthereumSendTransactionResult, EthereumSign7702AuthorizationParams, EthereumSign7702AuthorizationResult, EthereumSignHashParams, EthereumSignHashResult, EthereumSignMessageParams, EthereumSignMessageResult, EthereumSignTransactionParams, EthereumSignTransactionResult, EthereumSignTypedDataParams, EthereumSignTypedDataResult, EthereumSwitchChainParams, EvmChainEntry, ExportKeyConfig, Factor, FlexibleTheme, FundWalletConfig, FundingEvents, FundingMethod, FundingUIConfig, GetCurrentSessionRequest, GetCurrentSessionResponse, Hex, IdentityTokenClaims, IdpProvider, IsAuthenticatedRequest, IsAuthenticatedResponse, ListEphemeralSignersResult, LoginTokenBundle, LogoutRequest, LogoutResponse, MessageTypeProperty, MessageTypes, MoonPaySignRequest, MoonPaySignResponse, MpcKeyShares, NativeCurrency, Network, OAuthRequest, OAuthResponse, OnrampFundingSettings, PasskeyEnrollConfig, PasskeySettings, PreferredCardProvider, PrefillConfig, PresenceTokenClaims, ProvisionEphemeralSignerParams, ProvisionEphemeralSignerResult, PublicEthereumWallet, PublicSessionData, PublicWallet, RefreshSessionRequest, RefreshSessionResponse, RetrieveWalletKeyRequest, RetrieveWalletKeyResponse, RevokeEphemeralSignerParams, RpcConfig, RpcUrls, SdkSettings, SendEmailOtpRequest, SendEmailOtpResponse, SendTransactionConfig, SendTransactionRequest, SessionData, SessionWallet, SharesDeviceRequest, SharesDeviceResponse, Sign7702AuthorizationError, Sign7702AuthorizationParams, Sign7702AuthorizationResponse, Sign7702AuthorizationResult, SignMessageConfig, SignTransactionConfig, SignTypedDataError, SignTypedDataParams, SignTypedDataResponse, SignTypedDataResult, SmsSettings, SolanaChain, SolanaChainEntry, SolanaFundingConfig, SolanaGetBalanceParams, SolanaGetBalanceResult, SolanaGetTokenAccountsByOwnerParams, SolanaGetTokenAccountsByOwnerResult, SolanaSendTransactionParams, SolanaSendTransactionResult, SolanaSignMessageParams, SolanaSignMessageResult, SolanaSignTransactionParams, SolanaSignTransactionResult, TransactionCommitment, TransactionEncoding, TransactionUIOptions, TypedMessage, UseFundWalletInterface, UsersMePublicResponse, UsersMeRequest, UsersMeResponse, VerifiedSession, VerifyEmailOtpRequest, VerifyEmailOtpResponse, VerifyEmailOtpUser, VerifyOAuthTokenRequest, VerifyOAuthTokenResponse, VerifySiweWalletRegistrationRequest, WALLET_ERROR_CODES, Wallet, WalletChain, WalletChainType, WalletConnectConfig, WalletCreationError, WalletError, WalletErrorCode, WalletKeyRequest, WalletListEntry, WalletRegistrationNonceRequest, WalletRegistrationNonceResponse, WalletType, WalletVerifyRequest } from './types/index.mjs';
1
+ export { AccessTokenClaims, AppConfigRequest, AppConfigResponse, AppearanceBackdrop, AppearanceBorderRadius, AppearanceCard, AppearanceColors, AppearanceComponents, AppearanceLogo, AppearanceModeTokens, AppearanceTypography, AttachOAuthTokenRequest, AttachOAuthTokenResponse, AuthAppearance, AuthFlow, AuthFlowComponent, AuthLoginMethod, AuthProviderConfig, BaseGetBalanceParams, BaseGetBalanceResult, BaseGetTokenAccountsParams, BaseSendTransactionParams, BaseSendTransactionResult, BaseSignMessageParams, BaseSignMessageResult, BaseSignTransactionParams, BaseSignTransactionResult, BaseTokenClaims, BaseUIOptions, BaseWalletHooks, BlockExplorer, Chain, ChainConfigItem, ChainEntry, ChainLikeWithId, ComponentStyle, ContractUIOptions, CreateWalletResponse, DefaultFundingMethod, DeleteSessionRequest, DeleteSessionResponse, DetachOAuthTokenRequest, DeviceFingerprint, DisplayMode, EmailOtpConfig, EmailOtpFlowState, EphemeralSigner, EphemeralSignerChain, EphemeralSignerScheme, EphemeralSignerWallet, EthereumFundingConfig, EthereumGetBalanceParams, EthereumGetBalanceResult, EthereumGetTokenAccountsByOwnerParams, EthereumGetTokenAccountsByOwnerResult, EthereumSendTransactionParams, EthereumSendTransactionRequest, EthereumSendTransactionResult, EthereumSign7702AuthorizationParams, EthereumSign7702AuthorizationResult, EthereumSignHashParams, EthereumSignHashResult, EthereumSignMessageParams, EthereumSignMessageResult, EthereumSignTransactionParams, EthereumSignTransactionResult, EthereumSignTypedDataParams, EthereumSignTypedDataResult, EthereumSwitchChainParams, EvmChainEntry, ExportKeyConfig, Factor, FlexibleTheme, FundWalletConfig, FundingEvents, FundingMethod, FundingUIConfig, GetCurrentSessionRequest, GetCurrentSessionResponse, Hex, IdentityTokenClaims, IdpProvider, IsAuthenticatedRequest, IsAuthenticatedResponse, ListEphemeralSignersResult, LoginTokenBundle, LogoutRequest, LogoutResponse, MessageTypeProperty, MessageTypes, MoonPaySignRequest, MoonPaySignResponse, MpcKeyShares, NativeCurrency, Network, OAuthRequest, OAuthResponse, OnrampFundingSettings, PasskeyEnrollConfig, PasskeySettings, PreferredCardProvider, PrefillConfig, PresenceTokenClaims, ProvisionEphemeralSignerParams, ProvisionEphemeralSignerResult, PublicEthereumWallet, PublicSessionData, PublicWallet, RefreshSessionRequest, RefreshSessionResponse, RetrieveWalletKeyRequest, RetrieveWalletKeyResponse, RevokeEphemeralSignerParams, RpcConfig, RpcUrls, SdkSettings, SendEmailOtpRequest, SendEmailOtpResponse, SendTransactionConfig, SendTransactionRequest, SessionData, SessionWallet, SharesDeviceRequest, SharesDeviceResponse, Sign7702AuthorizationError, Sign7702AuthorizationParams, Sign7702AuthorizationResponse, Sign7702AuthorizationResult, SignMessageConfig, SignTransactionConfig, SignTypedDataError, SignTypedDataParams, SignTypedDataResponse, SignTypedDataResult, SmsSettings, SolanaChain, SolanaChainEntry, SolanaFundingConfig, SolanaGetBalanceParams, SolanaGetBalanceResult, SolanaGetTokenAccountsByOwnerParams, SolanaGetTokenAccountsByOwnerResult, SolanaSendTransactionParams, SolanaSendTransactionResult, SolanaSignMessageParams, SolanaSignMessageResult, SolanaSignTransactionParams, SolanaSignTransactionResult, TransactionCommitment, TransactionEncoding, TransactionUIOptions, TronChainEntry, TronGetBalanceParams, TronGetBalanceResult, TronSendTransactionParams, TronSendTransactionResult, TronSignMessageParams, TronSignMessageResult, TronSignTransactionParams, TronSignTransactionResult, TronTransactionJson, TypedMessage, UseFundWalletInterface, UsersMePublicResponse, UsersMeRequest, UsersMeResponse, VerifiedSession, VerifyEmailOtpRequest, VerifyEmailOtpResponse, VerifyEmailOtpUser, VerifyOAuthTokenRequest, VerifyOAuthTokenResponse, VerifySiweWalletRegistrationRequest, WALLET_ERROR_CODES, Wallet, WalletChain, WalletChainType, WalletConnectConfig, WalletCreationError, WalletError, WalletErrorCode, WalletKeyRequest, WalletListEntry, WalletRegistrationNonceRequest, WalletRegistrationNonceResponse, WalletType, WalletVerifyRequest } from './types/index.mjs';
2
2
  export { FONT_URLS_KEY, getIframeOrigin, getIframeUrl, getMoonXApiUrl } from './utils/index.mjs';
3
3
  export { F as FORWARDED_ERROR_FIELDS, P as PostMessageClient, a as PostMessageMethod, b as PostMessageServer, c as PostMessageType } from './post-message-BR2NClJ5.mjs';
package/dist/index.d.ts CHANGED
@@ -1,3 +1,3 @@
1
- export { AccessTokenClaims, AppConfigRequest, AppConfigResponse, AppearanceBackdrop, AppearanceBorderRadius, AppearanceCard, AppearanceColors, AppearanceComponents, AppearanceLogo, AppearanceModeTokens, AppearanceTypography, AttachOAuthTokenRequest, AttachOAuthTokenResponse, AuthAppearance, AuthFlow, AuthFlowComponent, AuthLoginMethod, AuthProviderConfig, BaseGetBalanceParams, BaseGetBalanceResult, BaseGetTokenAccountsParams, BaseSendTransactionParams, BaseSendTransactionResult, BaseSignMessageParams, BaseSignMessageResult, BaseSignTransactionParams, BaseSignTransactionResult, BaseTokenClaims, BaseUIOptions, BaseWalletHooks, BlockExplorer, Chain, ChainConfigItem, ChainEntry, ChainLikeWithId, ComponentStyle, ContractUIOptions, CreateWalletResponse, DefaultFundingMethod, DeleteSessionRequest, DeleteSessionResponse, DetachOAuthTokenRequest, DeviceFingerprint, DisplayMode, EmailOtpConfig, EmailOtpFlowState, EphemeralSigner, EphemeralSignerChain, EphemeralSignerScheme, EphemeralSignerWallet, EthereumFundingConfig, EthereumGetBalanceParams, EthereumGetBalanceResult, EthereumGetTokenAccountsByOwnerParams, EthereumGetTokenAccountsByOwnerResult, EthereumSendTransactionParams, EthereumSendTransactionRequest, EthereumSendTransactionResult, EthereumSign7702AuthorizationParams, EthereumSign7702AuthorizationResult, EthereumSignHashParams, EthereumSignHashResult, EthereumSignMessageParams, EthereumSignMessageResult, EthereumSignTransactionParams, EthereumSignTransactionResult, EthereumSignTypedDataParams, EthereumSignTypedDataResult, EthereumSwitchChainParams, EvmChainEntry, ExportKeyConfig, Factor, FlexibleTheme, FundWalletConfig, FundingEvents, FundingMethod, FundingUIConfig, GetCurrentSessionRequest, GetCurrentSessionResponse, Hex, IdentityTokenClaims, IdpProvider, IsAuthenticatedRequest, IsAuthenticatedResponse, ListEphemeralSignersResult, LoginTokenBundle, LogoutRequest, LogoutResponse, MessageTypeProperty, MessageTypes, MoonPaySignRequest, MoonPaySignResponse, MpcKeyShares, NativeCurrency, Network, OAuthRequest, OAuthResponse, OnrampFundingSettings, PasskeyEnrollConfig, PasskeySettings, PreferredCardProvider, PrefillConfig, PresenceTokenClaims, ProvisionEphemeralSignerParams, ProvisionEphemeralSignerResult, PublicEthereumWallet, PublicSessionData, PublicWallet, RefreshSessionRequest, RefreshSessionResponse, RetrieveWalletKeyRequest, RetrieveWalletKeyResponse, RevokeEphemeralSignerParams, RpcConfig, RpcUrls, SdkSettings, SendEmailOtpRequest, SendEmailOtpResponse, SendTransactionConfig, SendTransactionRequest, SessionData, SessionWallet, SharesDeviceRequest, SharesDeviceResponse, Sign7702AuthorizationError, Sign7702AuthorizationParams, Sign7702AuthorizationResponse, Sign7702AuthorizationResult, SignMessageConfig, SignTransactionConfig, SignTypedDataError, SignTypedDataParams, SignTypedDataResponse, SignTypedDataResult, SmsSettings, SolanaChain, SolanaChainEntry, SolanaFundingConfig, SolanaGetBalanceParams, SolanaGetBalanceResult, SolanaGetTokenAccountsByOwnerParams, SolanaGetTokenAccountsByOwnerResult, SolanaSendTransactionParams, SolanaSendTransactionResult, SolanaSignMessageParams, SolanaSignMessageResult, SolanaSignTransactionParams, SolanaSignTransactionResult, TransactionCommitment, TransactionEncoding, TransactionUIOptions, TypedMessage, UseFundWalletInterface, UsersMePublicResponse, UsersMeRequest, UsersMeResponse, VerifiedSession, VerifyEmailOtpRequest, VerifyEmailOtpResponse, VerifyEmailOtpUser, VerifyOAuthTokenRequest, VerifyOAuthTokenResponse, VerifySiweWalletRegistrationRequest, WALLET_ERROR_CODES, Wallet, WalletChain, WalletChainType, WalletConnectConfig, WalletCreationError, WalletError, WalletErrorCode, WalletKeyRequest, WalletListEntry, WalletRegistrationNonceRequest, WalletRegistrationNonceResponse, WalletType, WalletVerifyRequest } from './types/index.js';
1
+ export { AccessTokenClaims, AppConfigRequest, AppConfigResponse, AppearanceBackdrop, AppearanceBorderRadius, AppearanceCard, AppearanceColors, AppearanceComponents, AppearanceLogo, AppearanceModeTokens, AppearanceTypography, AttachOAuthTokenRequest, AttachOAuthTokenResponse, AuthAppearance, AuthFlow, AuthFlowComponent, AuthLoginMethod, AuthProviderConfig, BaseGetBalanceParams, BaseGetBalanceResult, BaseGetTokenAccountsParams, BaseSendTransactionParams, BaseSendTransactionResult, BaseSignMessageParams, BaseSignMessageResult, BaseSignTransactionParams, BaseSignTransactionResult, BaseTokenClaims, BaseUIOptions, BaseWalletHooks, BlockExplorer, Chain, ChainConfigItem, ChainEntry, ChainLikeWithId, ComponentStyle, ContractUIOptions, CreateWalletResponse, DefaultFundingMethod, DeleteSessionRequest, DeleteSessionResponse, DetachOAuthTokenRequest, DeviceFingerprint, DisplayMode, EmailOtpConfig, EmailOtpFlowState, EphemeralSigner, EphemeralSignerChain, EphemeralSignerScheme, EphemeralSignerWallet, EthereumFundingConfig, EthereumGetBalanceParams, EthereumGetBalanceResult, EthereumGetTokenAccountsByOwnerParams, EthereumGetTokenAccountsByOwnerResult, EthereumSendTransactionParams, EthereumSendTransactionRequest, EthereumSendTransactionResult, EthereumSign7702AuthorizationParams, EthereumSign7702AuthorizationResult, EthereumSignHashParams, EthereumSignHashResult, EthereumSignMessageParams, EthereumSignMessageResult, EthereumSignTransactionParams, EthereumSignTransactionResult, EthereumSignTypedDataParams, EthereumSignTypedDataResult, EthereumSwitchChainParams, EvmChainEntry, ExportKeyConfig, Factor, FlexibleTheme, FundWalletConfig, FundingEvents, FundingMethod, FundingUIConfig, GetCurrentSessionRequest, GetCurrentSessionResponse, Hex, IdentityTokenClaims, IdpProvider, IsAuthenticatedRequest, IsAuthenticatedResponse, ListEphemeralSignersResult, LoginTokenBundle, LogoutRequest, LogoutResponse, MessageTypeProperty, MessageTypes, MoonPaySignRequest, MoonPaySignResponse, MpcKeyShares, NativeCurrency, Network, OAuthRequest, OAuthResponse, OnrampFundingSettings, PasskeyEnrollConfig, PasskeySettings, PreferredCardProvider, PrefillConfig, PresenceTokenClaims, ProvisionEphemeralSignerParams, ProvisionEphemeralSignerResult, PublicEthereumWallet, PublicSessionData, PublicWallet, RefreshSessionRequest, RefreshSessionResponse, RetrieveWalletKeyRequest, RetrieveWalletKeyResponse, RevokeEphemeralSignerParams, RpcConfig, RpcUrls, SdkSettings, SendEmailOtpRequest, SendEmailOtpResponse, SendTransactionConfig, SendTransactionRequest, SessionData, SessionWallet, SharesDeviceRequest, SharesDeviceResponse, Sign7702AuthorizationError, Sign7702AuthorizationParams, Sign7702AuthorizationResponse, Sign7702AuthorizationResult, SignMessageConfig, SignTransactionConfig, SignTypedDataError, SignTypedDataParams, SignTypedDataResponse, SignTypedDataResult, SmsSettings, SolanaChain, SolanaChainEntry, SolanaFundingConfig, SolanaGetBalanceParams, SolanaGetBalanceResult, SolanaGetTokenAccountsByOwnerParams, SolanaGetTokenAccountsByOwnerResult, SolanaSendTransactionParams, SolanaSendTransactionResult, SolanaSignMessageParams, SolanaSignMessageResult, SolanaSignTransactionParams, SolanaSignTransactionResult, TransactionCommitment, TransactionEncoding, TransactionUIOptions, TronChainEntry, TronGetBalanceParams, TronGetBalanceResult, TronSendTransactionParams, TronSendTransactionResult, TronSignMessageParams, TronSignMessageResult, TronSignTransactionParams, TronSignTransactionResult, TronTransactionJson, TypedMessage, UseFundWalletInterface, UsersMePublicResponse, UsersMeRequest, UsersMeResponse, VerifiedSession, VerifyEmailOtpRequest, VerifyEmailOtpResponse, VerifyEmailOtpUser, VerifyOAuthTokenRequest, VerifyOAuthTokenResponse, VerifySiweWalletRegistrationRequest, WALLET_ERROR_CODES, Wallet, WalletChain, WalletChainType, WalletConnectConfig, WalletCreationError, WalletError, WalletErrorCode, WalletKeyRequest, WalletListEntry, WalletRegistrationNonceRequest, WalletRegistrationNonceResponse, WalletType, WalletVerifyRequest } from './types/index.js';
2
2
  export { FONT_URLS_KEY, getIframeOrigin, getIframeUrl, getMoonXApiUrl } from './utils/index.js';
3
3
  export { F as FORWARDED_ERROR_FIELDS, P as PostMessageClient, a as PostMessageMethod, b as PostMessageServer, c as PostMessageType } from './post-message-BR2NClJ5.js';
package/dist/index.mjs CHANGED
@@ -2,7 +2,7 @@ import {
2
2
  Network,
3
3
  WALLET_ERROR_CODES,
4
4
  WalletCreationError
5
- } from "./chunk-IMLBIIJ4.mjs";
5
+ } from "./chunk-CEL3U6EI.mjs";
6
6
  import {
7
7
  FONT_URLS_KEY
8
8
  } from "./chunk-527SU2F6.mjs";
@@ -1,6 +1,6 @@
1
1
  export { C as CachedAssertion, g as generatePasskeyUserId } from '../passkey-cache-WnDFQ-v4.mjs';
2
2
  export { a as PasskeyFormFactor, P as PasskeyMetadata, b as PasskeyMetadataInput, f as formatPasskeyLabel, r as resolvePasskeyMetadata } from '../passkey-metadata-QqFF2SWQ.mjs';
3
- import { ChainEntry, ChainConfigItem, Chain, EvmChainEntry, SolanaChainEntry, WalletChain } from '../types/index.mjs';
3
+ import { ChainEntry, ChainConfigItem, Chain, EvmChainEntry, TronChainEntry, SolanaChainEntry, WalletChain } from '../types/index.mjs';
4
4
  import { SiweMessage } from 'siwe';
5
5
  import { Connection, PublicKey } from '@solana/web3.js';
6
6
 
@@ -131,6 +131,8 @@ declare function getChainById(chains: ChainConfigItem[], chainId: number): Chain
131
131
  declare function isChainSupported(chains: ChainConfigItem[], chainId: number): boolean;
132
132
  /** Type guard: is this normalized entry an EVM entry (carries a viem Chain)? */
133
133
  declare function isEvmEntry(entry: ChainEntry): entry is EvmChainEntry;
134
+ /** Type guard: a string-id entry in the "tron" namespace (e.g. "tron:mainnet"). */
135
+ declare function isTronEntry(entry: ChainEntry): entry is TronChainEntry;
134
136
  /**
135
137
  * Coerce a `ChainConfigItem` to its normalized form. A bare viem `Chain`
136
138
  * (numeric `id`) becomes an `EvmChainEntry`; `{ chain, … }` is already one;
@@ -176,6 +178,12 @@ declare function resolveChainEntry(chains: ChainConfigItem[] | undefined, select
176
178
  * hooks throw a clear "no RPC URL" error.
177
179
  */
178
180
  declare function resolveSolanaChainEntry(chains: ChainConfigItem[] | undefined, selector?: string | number, defaultSelector?: string | number): SolanaChainEntry | undefined;
181
+ /**
182
+ * Resolve a TRON entry, mirroring `resolveSolanaChainEntry`'s precedence and
183
+ * fail-closed semantics: an explicit selector that doesn't name a configured
184
+ * tron entry returns undefined rather than falling through to another chain.
185
+ */
186
+ declare function resolveTronChainEntry(chains: ChainConfigItem[] | undefined, selector?: string | number, defaultSelector?: string | number): TronChainEntry | undefined;
179
187
  /**
180
188
  * Resolve the EVM entry to use, honoring (highest priority first):
181
189
  * per-call `selector` → tx `requestedChainId` → `walletChainId` →
@@ -455,6 +463,24 @@ declare function getSOLTransfersFromInstructions(base64Transaction: string, logs
455
463
  usdValue?: string;
456
464
  }>>;
457
465
 
466
+ /**
467
+ * Derive the base58check Tron address from a secp256k1 public key
468
+ * (compressed or uncompressed hex, with or without 0x):
469
+ * keccak256(uncompressed pubkey body)[12:] prefixed with 0x41, then
470
+ * base58check (double-sha256 checksum).
471
+ *
472
+ * Async because `bs58` is an optional ESM-only peer of `@moon-x/core`
473
+ * and is lazy-imported, same as `bs58ToBytes` in wire-codec.ts.
474
+ */
475
+ declare function tronAddressFromPublicKey(publicKeyHex: string): Promise<string>;
476
+
477
+ /**
478
+ * Decode raw_data_hex (the signed bytes) into a labeled preview object.
479
+ * Throws on malformed input - callers fall back to showing the raw
480
+ * payload rather than a possibly-wrong decode.
481
+ */
482
+ declare function decodeTronRawData(rawDataHex: string): Promise<Record<string, unknown>>;
483
+
458
484
  interface BuildUrlConfig {
459
485
  publishableKey: string;
460
486
  config?: {
@@ -470,6 +496,15 @@ declare const DEFAULT_AUTH_URL = "https://iframe.moonx-dev.com";
470
496
  declare const serializeEthereumTransaction: (transaction: any) => Promise<string>;
471
497
  declare const broadcastEthereumRaw: (rpcUrl: string, signedSerialized: string) => Promise<string>;
472
498
  declare const broadcastSolanaSigned: (rpcUrl: string, signedBase58: string) => Promise<string>;
499
+ /**
500
+ * Broadcast a signed Tron transaction (TronWeb JSON shape, signature
501
+ * attached) to a fullnode. Returns the txid. Tron reports failures as
502
+ * `{ result: false, code, message }` with `message` hex-encoded ASCII;
503
+ * decode it so callers see "Contract validate error: ..." instead of hex.
504
+ */
505
+ declare const broadcastTronSigned: (rpcUrl: string, signedTransaction: {
506
+ txID: string;
507
+ } & Record<string, unknown>) => Promise<string>;
473
508
 
474
509
  /**
475
510
  * Canonical algorithm name written to `app_user_wallet_keyshares.algorithm`.
@@ -477,6 +512,7 @@ declare const broadcastSolanaSigned: (rpcUrl: string, signedBase58: string) => P
477
512
  * Matches Sodot's Vertex API path segment exactly:
478
513
  *
479
514
  * ethereum → "ecdsa"
515
+ * tron → "ecdsa"
480
516
  * solana → "exportable-ed25519"
481
517
  *
482
518
  * `Algorithm.name.toLowerCase()` from the Sodot SDK would give
@@ -519,4 +555,4 @@ declare const arrayLikeToBytes: (value: unknown) => Uint8Array;
519
555
  */
520
556
  declare const bs58ToBytes: (value: unknown) => Promise<Uint8Array>;
521
557
 
522
- export { type BuildUrlConfig, type ChainIndex, DEFAULT_AUTH_URL, EthereumSiweMessage, type EthereumSiweMessageProps, type EvmTransactionInput, type EvmTxPrepWallet, type ManualSiweMessageProps, SiwsMessage, SolanaTransactionParser, type VerifyIdTokenResponse, arrayLikeToBytes, authState, broadcastEthereumRaw, broadcastSolanaSigned, bs58ToBytes, buildChainIndex, buildUrl, canonicalAlgorithmFor, createManualSiweMessage, entryCaip2, estimateEvmGas, estimateEvmGasReserve, fromB64url, getChainById, getEvmGasPrice, getEvmMaxPriorityFeePerGas, getEvmNonce, getInstructionsForHTML, getRpcUrl, getSOLTransfersFromInstructions, getTransferInfoFromInstructions, isChainSupported, isEvmEntry, normalizeChainItem, normalizeChainKey, parseDerivationPath, prepareEvmSendTransaction, prepareEvmSignTransaction, resolveChainEntry, resolveEvmChain, resolveEvmChainEntry, resolveRpcUrl, resolveSolanaChainEntry, resolveWsUrl, sanitizeUserData, serializeEthereumTransaction, toB64url, validateChainConfig, verifyIdToken };
558
+ export { type BuildUrlConfig, type ChainIndex, DEFAULT_AUTH_URL, EthereumSiweMessage, type EthereumSiweMessageProps, type EvmTransactionInput, type EvmTxPrepWallet, type ManualSiweMessageProps, SiwsMessage, SolanaTransactionParser, type VerifyIdTokenResponse, arrayLikeToBytes, authState, broadcastEthereumRaw, broadcastSolanaSigned, broadcastTronSigned, bs58ToBytes, buildChainIndex, buildUrl, canonicalAlgorithmFor, createManualSiweMessage, decodeTronRawData, entryCaip2, estimateEvmGas, estimateEvmGasReserve, fromB64url, getChainById, getEvmGasPrice, getEvmMaxPriorityFeePerGas, getEvmNonce, getInstructionsForHTML, getRpcUrl, getSOLTransfersFromInstructions, getTransferInfoFromInstructions, isChainSupported, isEvmEntry, isTronEntry, normalizeChainItem, normalizeChainKey, parseDerivationPath, prepareEvmSendTransaction, prepareEvmSignTransaction, resolveChainEntry, resolveEvmChain, resolveEvmChainEntry, resolveRpcUrl, resolveSolanaChainEntry, resolveTronChainEntry, resolveWsUrl, sanitizeUserData, serializeEthereumTransaction, toB64url, tronAddressFromPublicKey, validateChainConfig, verifyIdToken };
@@ -1,6 +1,6 @@
1
1
  export { C as CachedAssertion, g as generatePasskeyUserId } from '../passkey-cache-WnDFQ-v4.js';
2
2
  export { a as PasskeyFormFactor, P as PasskeyMetadata, b as PasskeyMetadataInput, f as formatPasskeyLabel, r as resolvePasskeyMetadata } from '../passkey-metadata-QqFF2SWQ.js';
3
- import { ChainEntry, ChainConfigItem, Chain, EvmChainEntry, SolanaChainEntry, WalletChain } from '../types/index.js';
3
+ import { ChainEntry, ChainConfigItem, Chain, EvmChainEntry, TronChainEntry, SolanaChainEntry, WalletChain } from '../types/index.js';
4
4
  import { SiweMessage } from 'siwe';
5
5
  import { Connection, PublicKey } from '@solana/web3.js';
6
6
 
@@ -131,6 +131,8 @@ declare function getChainById(chains: ChainConfigItem[], chainId: number): Chain
131
131
  declare function isChainSupported(chains: ChainConfigItem[], chainId: number): boolean;
132
132
  /** Type guard: is this normalized entry an EVM entry (carries a viem Chain)? */
133
133
  declare function isEvmEntry(entry: ChainEntry): entry is EvmChainEntry;
134
+ /** Type guard: a string-id entry in the "tron" namespace (e.g. "tron:mainnet"). */
135
+ declare function isTronEntry(entry: ChainEntry): entry is TronChainEntry;
134
136
  /**
135
137
  * Coerce a `ChainConfigItem` to its normalized form. A bare viem `Chain`
136
138
  * (numeric `id`) becomes an `EvmChainEntry`; `{ chain, … }` is already one;
@@ -176,6 +178,12 @@ declare function resolveChainEntry(chains: ChainConfigItem[] | undefined, select
176
178
  * hooks throw a clear "no RPC URL" error.
177
179
  */
178
180
  declare function resolveSolanaChainEntry(chains: ChainConfigItem[] | undefined, selector?: string | number, defaultSelector?: string | number): SolanaChainEntry | undefined;
181
+ /**
182
+ * Resolve a TRON entry, mirroring `resolveSolanaChainEntry`'s precedence and
183
+ * fail-closed semantics: an explicit selector that doesn't name a configured
184
+ * tron entry returns undefined rather than falling through to another chain.
185
+ */
186
+ declare function resolveTronChainEntry(chains: ChainConfigItem[] | undefined, selector?: string | number, defaultSelector?: string | number): TronChainEntry | undefined;
179
187
  /**
180
188
  * Resolve the EVM entry to use, honoring (highest priority first):
181
189
  * per-call `selector` → tx `requestedChainId` → `walletChainId` →
@@ -455,6 +463,24 @@ declare function getSOLTransfersFromInstructions(base64Transaction: string, logs
455
463
  usdValue?: string;
456
464
  }>>;
457
465
 
466
+ /**
467
+ * Derive the base58check Tron address from a secp256k1 public key
468
+ * (compressed or uncompressed hex, with or without 0x):
469
+ * keccak256(uncompressed pubkey body)[12:] prefixed with 0x41, then
470
+ * base58check (double-sha256 checksum).
471
+ *
472
+ * Async because `bs58` is an optional ESM-only peer of `@moon-x/core`
473
+ * and is lazy-imported, same as `bs58ToBytes` in wire-codec.ts.
474
+ */
475
+ declare function tronAddressFromPublicKey(publicKeyHex: string): Promise<string>;
476
+
477
+ /**
478
+ * Decode raw_data_hex (the signed bytes) into a labeled preview object.
479
+ * Throws on malformed input - callers fall back to showing the raw
480
+ * payload rather than a possibly-wrong decode.
481
+ */
482
+ declare function decodeTronRawData(rawDataHex: string): Promise<Record<string, unknown>>;
483
+
458
484
  interface BuildUrlConfig {
459
485
  publishableKey: string;
460
486
  config?: {
@@ -470,6 +496,15 @@ declare const DEFAULT_AUTH_URL = "https://iframe.moonx-dev.com";
470
496
  declare const serializeEthereumTransaction: (transaction: any) => Promise<string>;
471
497
  declare const broadcastEthereumRaw: (rpcUrl: string, signedSerialized: string) => Promise<string>;
472
498
  declare const broadcastSolanaSigned: (rpcUrl: string, signedBase58: string) => Promise<string>;
499
+ /**
500
+ * Broadcast a signed Tron transaction (TronWeb JSON shape, signature
501
+ * attached) to a fullnode. Returns the txid. Tron reports failures as
502
+ * `{ result: false, code, message }` with `message` hex-encoded ASCII;
503
+ * decode it so callers see "Contract validate error: ..." instead of hex.
504
+ */
505
+ declare const broadcastTronSigned: (rpcUrl: string, signedTransaction: {
506
+ txID: string;
507
+ } & Record<string, unknown>) => Promise<string>;
473
508
 
474
509
  /**
475
510
  * Canonical algorithm name written to `app_user_wallet_keyshares.algorithm`.
@@ -477,6 +512,7 @@ declare const broadcastSolanaSigned: (rpcUrl: string, signedBase58: string) => P
477
512
  * Matches Sodot's Vertex API path segment exactly:
478
513
  *
479
514
  * ethereum → "ecdsa"
515
+ * tron → "ecdsa"
480
516
  * solana → "exportable-ed25519"
481
517
  *
482
518
  * `Algorithm.name.toLowerCase()` from the Sodot SDK would give
@@ -519,4 +555,4 @@ declare const arrayLikeToBytes: (value: unknown) => Uint8Array;
519
555
  */
520
556
  declare const bs58ToBytes: (value: unknown) => Promise<Uint8Array>;
521
557
 
522
- export { type BuildUrlConfig, type ChainIndex, DEFAULT_AUTH_URL, EthereumSiweMessage, type EthereumSiweMessageProps, type EvmTransactionInput, type EvmTxPrepWallet, type ManualSiweMessageProps, SiwsMessage, SolanaTransactionParser, type VerifyIdTokenResponse, arrayLikeToBytes, authState, broadcastEthereumRaw, broadcastSolanaSigned, bs58ToBytes, buildChainIndex, buildUrl, canonicalAlgorithmFor, createManualSiweMessage, entryCaip2, estimateEvmGas, estimateEvmGasReserve, fromB64url, getChainById, getEvmGasPrice, getEvmMaxPriorityFeePerGas, getEvmNonce, getInstructionsForHTML, getRpcUrl, getSOLTransfersFromInstructions, getTransferInfoFromInstructions, isChainSupported, isEvmEntry, normalizeChainItem, normalizeChainKey, parseDerivationPath, prepareEvmSendTransaction, prepareEvmSignTransaction, resolveChainEntry, resolveEvmChain, resolveEvmChainEntry, resolveRpcUrl, resolveSolanaChainEntry, resolveWsUrl, sanitizeUserData, serializeEthereumTransaction, toB64url, validateChainConfig, verifyIdToken };
558
+ export { type BuildUrlConfig, type ChainIndex, DEFAULT_AUTH_URL, EthereumSiweMessage, type EthereumSiweMessageProps, type EvmTransactionInput, type EvmTxPrepWallet, type ManualSiweMessageProps, SiwsMessage, SolanaTransactionParser, type VerifyIdTokenResponse, arrayLikeToBytes, authState, broadcastEthereumRaw, broadcastSolanaSigned, broadcastTronSigned, bs58ToBytes, buildChainIndex, buildUrl, canonicalAlgorithmFor, createManualSiweMessage, decodeTronRawData, entryCaip2, estimateEvmGas, estimateEvmGasReserve, fromB64url, getChainById, getEvmGasPrice, getEvmMaxPriorityFeePerGas, getEvmNonce, getInstructionsForHTML, getRpcUrl, getSOLTransfersFromInstructions, getTransferInfoFromInstructions, isChainSupported, isEvmEntry, isTronEntry, normalizeChainItem, normalizeChainKey, parseDerivationPath, prepareEvmSendTransaction, prepareEvmSignTransaction, resolveChainEntry, resolveEvmChain, resolveEvmChainEntry, resolveRpcUrl, resolveSolanaChainEntry, resolveTronChainEntry, resolveWsUrl, sanitizeUserData, serializeEthereumTransaction, toB64url, tronAddressFromPublicKey, validateChainConfig, verifyIdToken };