@rhinestone/shared-configs 1.16.0 → 1.17.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.
@@ -1,6 +1,6 @@
1
1
  import { contractAddresses } from "./generated/contracts";
2
2
  import { contractAddresses as contractAddressesDev } from "./generated/contracts.dev";
3
- import type { ChainEntry, ChainExplorer, ChainItem, ChainList, ChainNetwork, ChainStack, ChainRegistry, ChainRoles, ProviderName, ProviderRegistry, SettlementLayer, SupportedChain, SupportedMainnet, SupportedOPStackMainnet, SupportedOPStackTestnet, SupportedTestnet, SwapQuoter } from "./types";
3
+ import type { CctpChainConfig, ChainEntry, ChainExplorer, ChainItem, ChainList, ChainNetwork, ChainStack, ChainRegistry, ChainRoles, NearChainConfig, OftChainConfig, ProviderName, ProviderRegistry, RhinoChainConfig, SettlementConfig, SettlementLayer, SupportedChain, SupportedMainnet, SupportedOPStackMainnet, SupportedOPStackTestnet, SupportedTestnet, SwapQuoter } from "./types";
4
4
  import { chains, MainnetNetwork, mainnetChains, OPStackChains, TestnetNetwork, testnetChains } from "./types";
5
5
  import type { PegGroup } from "./types";
6
6
  import { getOftConfig, getSupportedOftTokens, hasOftSupport, OFT_REGISTRY } from "./oft";
@@ -16,5 +16,5 @@ declare const mainnetChainList: ChainList;
16
16
  declare const testnetChainList: ChainList;
17
17
  declare function chainHasUnpricedTokens(chainId: number): boolean;
18
18
  export { chainRegistry, providerRegistry, mainnetChainList, testnetChainList, contractAddresses, contractAddressesDev, chains, mainnetChains, testnetChains, MainnetNetwork, OPStackChains, TestnetNetwork, OFT_REGISTRY, getOftConfig, hasOftSupport, getSupportedOftTokens, chainHasUnpricedTokens, HYPERCORE_SPOT_CHAIN_ID, HYPERCORE_PERP_CHAIN_ID, HYPERCORE_ORIGIN_CHAIN_ID, getHyperCoreDestinationDex, HYPERCORE_SETTLEMENT_CHAIN_ID, CORE_WRITER_PRECOMPILE, CORE_DEPOSIT_WALLET, HYPERCORE_SPOT_DEX, HYPERCORE_DEFAULT_PERP_DEX, HYPERCORE_USDC_ACTIVATION_FEE, getApproveCoreDepositWalletCall, getDepositForCall, isHyperCoreChainId, resolveSettlementChainId, canBeOrigin, canBeDestination, isNonEvmChainId, getNonEvmChainIds, getCaip2, chainIdFromCaip2, createChainFactsClient, CHAIN_FACTS_LATEST_URL, CHAIN_FACTS_PUBLIC_KEY, };
19
- export type { ChainEntry, ChainExplorer, ChainItem, ChainList, ChainNetwork, ChainStack, ChainRegistry, ChainRoles, ProviderRegistry, ProviderName, SwapQuoter, SupportedMainnet, SupportedTestnet, SupportedChain, SupportedOPStackMainnet, SupportedOPStackTestnet, SettlementLayer, OftConfig, PegGroup, ChainFactsClient, ChainFactsClientOptions, ChainFactsErrorPhase, ChainFactsPayload, ChainFactsSnapshot, ChainFactsSource, };
19
+ export type { ChainEntry, ChainExplorer, ChainItem, ChainList, ChainNetwork, ChainStack, ChainRegistry, ChainRoles, ProviderRegistry, ProviderName, SwapQuoter, SupportedMainnet, SupportedTestnet, SupportedChain, SupportedOPStackMainnet, SupportedOPStackTestnet, SettlementLayer, SettlementConfig, CctpChainConfig, NearChainConfig, OftChainConfig, RhinoChainConfig, OftConfig, PegGroup, ChainFactsClient, ChainFactsClientOptions, ChainFactsErrorPhase, ChainFactsPayload, ChainFactsSnapshot, ChainFactsSource, };
20
20
  export * from "./abis";
@@ -50,6 +50,28 @@ interface TokenEntry {
50
50
  * this field is a no-op.
51
51
  */
52
52
  settlementLayers?: SettlementLayer[];
53
+ /**
54
+ * The symbol Rhino's bridge API expects for this token, where it differs from
55
+ * ours — `USDT0` is our label for LayerZero-bridged Tether, which Rhino calls
56
+ * `USDT` on the chains where the two are the same contract.
57
+ *
58
+ * Absent means the symbol passes through unchanged, which is the common case.
59
+ * Declared per token rather than globally because on some chains our `USDT0`
60
+ * and Rhino's `USDT` are DIFFERENT contracts, and translating there would
61
+ * route a transfer to a token the user does not hold.
62
+ */
63
+ rhinoSymbol?: string;
64
+ /**
65
+ * This token's NEAR 1Click asset id, for chains where 1Click does not derive
66
+ * it from the on-chain address.
67
+ *
68
+ * EVM tokens follow `nep141:{prefix}-{address}.omft.near` and carry nothing
69
+ * here; 1Click wraps each non-EVM token under its own NEAR-internal id that
70
+ * is not derivable, so those declare it. Absent on a chain whose entry has a
71
+ * `settlementConfig.near` and a non-EVM `vmType` means the token cannot be a
72
+ * NEAR destination at all — the build rejects that, so it should not occur.
73
+ */
74
+ nearAssetId?: string;
53
75
  unpriced?: boolean;
54
76
  }
55
77
  /**
@@ -77,6 +99,54 @@ interface ChainRoles {
77
99
  origin: boolean;
78
100
  destination: boolean;
79
101
  }
102
+ /** How Rhino's bridge API names and reaches this chain. */
103
+ interface RhinoChainConfig {
104
+ /** Rhino's own chain identifier, as its quote API expects it (`ETHEREUM`). */
105
+ chainName: string;
106
+ /**
107
+ * The DVFDepositContract `depositWithId` is called on. Absent for a
108
+ * destination-only chain (Solana, Tron), which nothing originates from — not
109
+ * a gap to fall back from.
110
+ */
111
+ bridgeContract?: string;
112
+ }
113
+ /** Circle CCTP's domain id for this chain. `0` is Ethereum, not "unset". */
114
+ interface CctpChainConfig {
115
+ domain: number;
116
+ }
117
+ /** NEAR 1Click's per-chain asset prefix (`eth`, `arb`, `sol`). */
118
+ interface NearChainConfig {
119
+ prefix: string;
120
+ }
121
+ /** The LayerZero OFT deployment this chain settles over. */
122
+ interface OftChainConfig {
123
+ /** OFT / OFT Adapter contract — third-party, not one of ours. */
124
+ adapter: string;
125
+ layerZeroEid: number;
126
+ }
127
+ /**
128
+ * Per-vendor addressing for the settlement layers this chain has enabled, one
129
+ * key per layer in `settlementLayers` that needs it.
130
+ *
131
+ * These are the identifiers a consumer cannot derive from anything else in the
132
+ * entry — a bridge's own name for the chain, a domain id, an asset prefix — and
133
+ * which every consumer previously kept as a hand-maintained table that drifted
134
+ * from this registry silently.
135
+ *
136
+ * Deliberately separate from the contracts block: consumers read every address
137
+ * there as Rhinestone-deployed and back an is-this-our-contract check with it,
138
+ * which these third-party addresses would corrupt.
139
+ *
140
+ * Absent, or a layer's key absent, means that layer needs no addressing here —
141
+ * `across`/`eco`/`relay` never appear. A key present for a layer NOT in
142
+ * `settlementLayers` should not occur; consumers gate on `settlementLayers`.
143
+ */
144
+ interface SettlementConfig {
145
+ rhino?: RhinoChainConfig;
146
+ cctp?: CctpChainConfig;
147
+ near?: NearChainConfig;
148
+ oft?: OftChainConfig;
149
+ }
80
150
  interface ChainEntry {
81
151
  name: string;
82
152
  vmType: VmType;
@@ -202,6 +272,7 @@ interface ChainEntry {
202
272
  wrappedNativeToken: NativeTokenEntry;
203
273
  tokens: TokenEntry[];
204
274
  settlementLayers: SettlementLayer[];
275
+ settlementConfig?: SettlementConfig;
205
276
  swapQuoters: SwapQuoter[];
206
277
  swapQuoterConfig?: Partial<Record<SwapQuoter, SwapQuoterConfig>>;
207
278
  }
@@ -249,4 +320,4 @@ interface ErpcConfig {
249
320
  providerIdPrefix: Record<string, string>;
250
321
  }
251
322
  export { OPStackChains, MainnetNetwork, TestnetNetwork, mainnetChains, testnetChains, chains, PEG_GROUPS };
252
- export type { ChainItem, ChainEntry, ChainExplorer, ChainNetwork, ChainRegistry, ChainRoles, ChainStack, ChainList, ContractAddresses, ProviderRegistry, ProviderName, SettlementLayer, SupportedTestnet, SupportedMainnet, SupportedOPStackMainnet, SupportedOPStackTestnet, SupportedChain, SwapQuoter, SwapQuoterConfig, PegGroup, VmType, ErpcFailsafe, ErpcChainOverride, ErpcConfig, };
323
+ export type { CctpChainConfig, ChainItem, ChainEntry, ChainExplorer, ChainNetwork, ChainRegistry, ChainRoles, ChainStack, ChainList, ContractAddresses, NearChainConfig, OftChainConfig, ProviderRegistry, ProviderName, RhinoChainConfig, SettlementConfig, SettlementLayer, SupportedTestnet, SupportedMainnet, SupportedOPStackMainnet, SupportedOPStackTestnet, SupportedChain, SwapQuoter, SwapQuoterConfig, PegGroup, VmType, ErpcFailsafe, ErpcChainOverride, ErpcConfig, };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rhinestone/shared-configs",
3
- "version": "1.16.0",
3
+ "version": "1.17.0",
4
4
  "description": "Reusable configuration files for Rhinestone services",
5
5
  "author": {
6
6
  "name": "Rhinestone",