@privy-io/chains 0.1.1 → 0.1.2-beta-20260225204743
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.
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";let r=["privyWalletOverride","privyInternal","privy","default"];function t(r,t,e){let i=r.rpcUrls[e]?.http[0];if(i){if("privy"===e){let r=new URL(i);return r.searchParams.set("privyAppId",t),r.toString()}return i}}exports.getRpcEndpointFromChain=function(e,i,n){if(n)return t(e,i,n);for(let n of r){let r=t(e,i,n);if(r)return r}};
|
package/dist/cjs/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var e=require("./ethereum/add-privy-rpc-to-chain.js"),i=require("./ethereum/add-chain-to-default-chains.js"),r=require("./ethereum/default-supported-chains.js"),t=require("./ethereum/add-rpc-url-override-to-chain.js"),s=require("./ethereum/dedupe-supported-chains.js"),n=require("./ethereum/get-supported-chain-by-id.js"),
|
|
1
|
+
"use strict";var e=require("./ethereum/add-privy-rpc-to-chain.js"),i=require("./ethereum/add-chain-to-default-chains.js"),r=require("./ethereum/default-supported-chains.js"),t=require("./ethereum/add-rpc-url-override-to-chain.js"),s=require("./ethereum/dedupe-supported-chains.js"),n=require("./ethereum/get-rpc-endpoint-from-chain.js"),o=require("./ethereum/get-supported-chain-by-id.js"),a=require("./ethereum/definitions/abstract.js"),u=require("./ethereum/definitions/abstractTestnet.js"),p=require("./ethereum/definitions/apeChain.js"),m=require("./ethereum/definitions/arbitrum.js"),h=require("./ethereum/definitions/arbitrumSepolia.js"),d=require("./ethereum/definitions/avalanche.js"),l=require("./ethereum/definitions/avalancheFuji.js"),f=require("./ethereum/definitions/b3.js"),j=require("./ethereum/definitions/b3Sepolia.js"),q=require("./ethereum/definitions/base.js"),c=require("./ethereum/definitions/baseSepolia.js"),x=require("./ethereum/definitions/celo.js"),b=require("./ethereum/definitions/curtis.js"),T=require("./ethereum/definitions/fluentTestnet.js"),S=require("./ethereum/definitions/linea.js"),y=require("./ethereum/definitions/mainnet.js"),C=require("./ethereum/definitions/neuraTestnet.js"),g=require("./ethereum/definitions/optimism.js"),E=require("./ethereum/definitions/optimismSepolia.js"),v=require("./ethereum/definitions/polygon.js"),A=require("./ethereum/definitions/polygonAmoy.js"),z=require("./ethereum/definitions/ronin.js"),D=require("./ethereum/definitions/saigon.js"),R=require("./ethereum/definitions/sepolia.js"),P=require("./ethereum/definitions/shape.js"),U=require("./ethereum/definitions/somnia.js"),_=require("./ethereum/definitions/somniaTestnet.js"),F=require("./ethereum/definitions/zora.js"),I=require("./ethereum/definitions/zoraSepolia.js"),M=require("./ethereum/definitions/zoraTestnet.js"),O=require("./ethereum/definitions/bsc.js"),k=require("./ethereum/definitions/gunz.js"),H=require("./ethereum/definitions/hyperEVMMainnet.js"),N=require("./ethereum/definitions/monadMainnet.js"),L=require("./ethereum/definitions/immutableZkEvm.js"),V=require("./ethereum/definitions/soneium.js"),Z=require("./ethereum/definitions/unichain.js");require("./ethereum/definitions/berachainArtio.js"),require("./ethereum/definitions/celoAlfajores.js"),require("./ethereum/definitions/filecoin.js"),require("./ethereum/definitions/filecoinCalibration.js"),require("./ethereum/definitions/garnetHolesky.js"),require("./ethereum/definitions/holesky.js"),require("./ethereum/definitions/lineaTestnet.js"),require("./ethereum/definitions/lukso.js"),require("./ethereum/definitions/redstone.js");exports.addPrivyRpcToChain=e.addPrivyRpcToChain,exports.addToDefaultChains=i.addToDefaultChains,exports.DEFAULT_SUPPORTED_CHAINS=r.DEFAULT_SUPPORTED_CHAINS,exports.DEFAULT_SUPPORTED_CHAIN_IDS=r.DEFAULT_SUPPORTED_CHAIN_IDS,exports.addRpcUrlOverrideToChain=t.addRpcUrlOverrideToChain,exports.dedupeSupportedChains=s.dedupeSupportedChains,exports.getRpcEndpointFromChain=n.getRpcEndpointFromChain,exports.getSupportedChainById=o.getSupportedChainById,exports.abstract=a.abstract,exports.abstractTestnet=u.abstractTestnet,exports.apeChain=p.apeChain,exports.arbitrum=m.arbitrum,exports.arbitrumSepolia=h.arbitrumSepolia,exports.avalanche=d.avalanche,exports.avalancheFuji=l.avalancheFuji,exports.b3=f.b3,exports.b3Sepolia=j.b3Sepolia,exports.base=q.base,exports.baseSepolia=c.baseSepolia,exports.celo=x.celo,exports.curtis=b.curtis,exports.fluentTestnet=T.fluentTestnet,exports.linea=S.linea,exports.mainnet=y.mainnet,exports.neuraTestnet=C.neuraTestnet,exports.optimism=g.optimism,exports.optimismSepolia=E.optimismSepolia,exports.polygon=v.polygon,exports.polygonAmoy=A.polygonAmoy,exports.ronin=z.ronin,exports.saigon=D.saigon,exports.sepolia=R.sepolia,exports.shape=P.shape,exports.somnia=U.somnia,exports.somniaTestnet=_.somniaTestnet,exports.zora=F.zora,exports.zoraSepolia=I.zoraSepolia,exports.zoraTestnet=M.zoraTestnet,exports.bsc=O.bsc,exports.gunz=k.gunz,exports.hyperEVMMainnet=H.hyperEVMMainnet,exports.monadMainnet=N.monadMainnet,exports.immutableZkEvm=L.immutableZkEvm,exports.soneium=V.soneium,exports.unichain=Z.unichain,exports.VERSION="0.1.2-beta-20260225204743";
|
package/dist/dts/index.d.mts
CHANGED
|
@@ -146,6 +146,36 @@ declare function addRpcUrlOverrideToChain(chain: Chain, rpcUrl: string): Chain;
|
|
|
146
146
|
|
|
147
147
|
declare const dedupeSupportedChains: (chains: Chain[]) => Chain[];
|
|
148
148
|
|
|
149
|
+
/**
|
|
150
|
+
* Known RPC URL source keys on a {@link Chain}'s `rpcUrls` map.
|
|
151
|
+
*
|
|
152
|
+
* - `privyWalletOverride` – user-supplied RPC URL override, returned as-is.
|
|
153
|
+
* - `privyInternal` – direct Privy/provider endpoint that bypasses the RPC
|
|
154
|
+
* proxy, returned as-is.
|
|
155
|
+
* - `privy` – Privy RPC proxy; `appId` is appended as a query param.
|
|
156
|
+
* - `default` – public fallback, returned as-is.
|
|
157
|
+
*/
|
|
158
|
+
type RpcUrlSource = 'privyWalletOverride' | 'privyInternal' | 'privy' | 'default';
|
|
159
|
+
/**
|
|
160
|
+
* Resolves the best available RPC endpoint for a chain.
|
|
161
|
+
*
|
|
162
|
+
* When `source` is omitted the full priority chain is walked:
|
|
163
|
+
* privyWalletOverride → privyInternal → privy → default.
|
|
164
|
+
*
|
|
165
|
+
* When `source` is provided only that specific key is checked.
|
|
166
|
+
*
|
|
167
|
+
* The `privy` source is the only one that appends the `appId` as a
|
|
168
|
+
* `privyAppId` query param for proxy authentication. All other sources
|
|
169
|
+
* are returned as-is.
|
|
170
|
+
*
|
|
171
|
+
* @param chain The chain to get the RPC endpoint for.
|
|
172
|
+
* @param appId The Privy app ID to include in requests to the Privy RPC proxy.
|
|
173
|
+
* @param source Optional specific RPC source to resolve. When omitted the full
|
|
174
|
+
* priority chain is used.
|
|
175
|
+
* @returns The resolved RPC URL, or undefined if no URL is available.
|
|
176
|
+
*/
|
|
177
|
+
declare function getRpcEndpointFromChain(chain: Chain, appId: string, source?: RpcUrlSource): string | undefined;
|
|
178
|
+
|
|
149
179
|
declare const getSupportedChainById: (id: number) => Chain | undefined;
|
|
150
180
|
|
|
151
181
|
declare const abstract: Chain;
|
|
@@ -233,4 +263,4 @@ declare const unichain: Chain;
|
|
|
233
263
|
|
|
234
264
|
declare const VERSION = "__VERSION__";
|
|
235
265
|
|
|
236
|
-
export { type Chain, type ChainLikeWithId, DEFAULT_SUPPORTED_CHAINS, DEFAULT_SUPPORTED_CHAIN_IDS, type RpcConfig, type Unit, VERSION, abstract, abstractTestnet, addPrivyRpcToChain, addRpcUrlOverrideToChain, addToDefaultChains, apeChain, arbitrum, arbitrumSepolia, avalanche, avalancheFuji, b3, b3Sepolia, base, baseSepolia, bsc, celo, curtis, dedupeSupportedChains, fluentTestnet, getSupportedChainById, gunz, hyperEVMMainnet, immutableZkEvm, linea, mainnet, monadMainnet, neuraTestnet, optimism, optimismSepolia, polygon, polygonAmoy, ronin, saigon, sepolia, shape, somnia, somniaTestnet, soneium, unichain, zora, zoraSepolia, zoraTestnet };
|
|
266
|
+
export { type Chain, type ChainLikeWithId, DEFAULT_SUPPORTED_CHAINS, DEFAULT_SUPPORTED_CHAIN_IDS, type RpcConfig, type RpcUrlSource, type Unit, VERSION, abstract, abstractTestnet, addPrivyRpcToChain, addRpcUrlOverrideToChain, addToDefaultChains, apeChain, arbitrum, arbitrumSepolia, avalanche, avalancheFuji, b3, b3Sepolia, base, baseSepolia, bsc, celo, curtis, dedupeSupportedChains, fluentTestnet, getRpcEndpointFromChain, getSupportedChainById, gunz, hyperEVMMainnet, immutableZkEvm, linea, mainnet, monadMainnet, neuraTestnet, optimism, optimismSepolia, polygon, polygonAmoy, ronin, saigon, sepolia, shape, somnia, somniaTestnet, soneium, unichain, zora, zoraSepolia, zoraTestnet };
|
package/dist/dts/index.d.ts
CHANGED
|
@@ -146,6 +146,36 @@ declare function addRpcUrlOverrideToChain(chain: Chain, rpcUrl: string): Chain;
|
|
|
146
146
|
|
|
147
147
|
declare const dedupeSupportedChains: (chains: Chain[]) => Chain[];
|
|
148
148
|
|
|
149
|
+
/**
|
|
150
|
+
* Known RPC URL source keys on a {@link Chain}'s `rpcUrls` map.
|
|
151
|
+
*
|
|
152
|
+
* - `privyWalletOverride` – user-supplied RPC URL override, returned as-is.
|
|
153
|
+
* - `privyInternal` – direct Privy/provider endpoint that bypasses the RPC
|
|
154
|
+
* proxy, returned as-is.
|
|
155
|
+
* - `privy` – Privy RPC proxy; `appId` is appended as a query param.
|
|
156
|
+
* - `default` – public fallback, returned as-is.
|
|
157
|
+
*/
|
|
158
|
+
type RpcUrlSource = 'privyWalletOverride' | 'privyInternal' | 'privy' | 'default';
|
|
159
|
+
/**
|
|
160
|
+
* Resolves the best available RPC endpoint for a chain.
|
|
161
|
+
*
|
|
162
|
+
* When `source` is omitted the full priority chain is walked:
|
|
163
|
+
* privyWalletOverride → privyInternal → privy → default.
|
|
164
|
+
*
|
|
165
|
+
* When `source` is provided only that specific key is checked.
|
|
166
|
+
*
|
|
167
|
+
* The `privy` source is the only one that appends the `appId` as a
|
|
168
|
+
* `privyAppId` query param for proxy authentication. All other sources
|
|
169
|
+
* are returned as-is.
|
|
170
|
+
*
|
|
171
|
+
* @param chain The chain to get the RPC endpoint for.
|
|
172
|
+
* @param appId The Privy app ID to include in requests to the Privy RPC proxy.
|
|
173
|
+
* @param source Optional specific RPC source to resolve. When omitted the full
|
|
174
|
+
* priority chain is used.
|
|
175
|
+
* @returns The resolved RPC URL, or undefined if no URL is available.
|
|
176
|
+
*/
|
|
177
|
+
declare function getRpcEndpointFromChain(chain: Chain, appId: string, source?: RpcUrlSource): string | undefined;
|
|
178
|
+
|
|
149
179
|
declare const getSupportedChainById: (id: number) => Chain | undefined;
|
|
150
180
|
|
|
151
181
|
declare const abstract: Chain;
|
|
@@ -233,4 +263,4 @@ declare const unichain: Chain;
|
|
|
233
263
|
|
|
234
264
|
declare const VERSION = "__VERSION__";
|
|
235
265
|
|
|
236
|
-
export { type Chain, type ChainLikeWithId, DEFAULT_SUPPORTED_CHAINS, DEFAULT_SUPPORTED_CHAIN_IDS, type RpcConfig, type Unit, VERSION, abstract, abstractTestnet, addPrivyRpcToChain, addRpcUrlOverrideToChain, addToDefaultChains, apeChain, arbitrum, arbitrumSepolia, avalanche, avalancheFuji, b3, b3Sepolia, base, baseSepolia, bsc, celo, curtis, dedupeSupportedChains, fluentTestnet, getSupportedChainById, gunz, hyperEVMMainnet, immutableZkEvm, linea, mainnet, monadMainnet, neuraTestnet, optimism, optimismSepolia, polygon, polygonAmoy, ronin, saigon, sepolia, shape, somnia, somniaTestnet, soneium, unichain, zora, zoraSepolia, zoraTestnet };
|
|
266
|
+
export { type Chain, type ChainLikeWithId, DEFAULT_SUPPORTED_CHAINS, DEFAULT_SUPPORTED_CHAIN_IDS, type RpcConfig, type RpcUrlSource, type Unit, VERSION, abstract, abstractTestnet, addPrivyRpcToChain, addRpcUrlOverrideToChain, addToDefaultChains, apeChain, arbitrum, arbitrumSepolia, avalanche, avalancheFuji, b3, b3Sepolia, base, baseSepolia, bsc, celo, curtis, dedupeSupportedChains, fluentTestnet, getRpcEndpointFromChain, getSupportedChainById, gunz, hyperEVMMainnet, immutableZkEvm, linea, mainnet, monadMainnet, neuraTestnet, optimism, optimismSepolia, polygon, polygonAmoy, ronin, saigon, sepolia, shape, somnia, somniaTestnet, soneium, unichain, zora, zoraSepolia, zoraTestnet };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
let r=["privyWalletOverride","privyInternal","privy","default"];function t(r,t,e){let i=r.rpcUrls[e]?.http[0];if(i){if("privy"===e){let r=new URL(i);return r.searchParams.set("privyAppId",t),r.toString()}return i}}function e(e,i,n){if(n)return t(e,i,n);for(let n of r){let r=t(e,i,n);if(r)return r}}export{e as getRpcEndpointFromChain};
|
package/dist/esm/index.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export{addPrivyRpcToChain}from"./ethereum/add-privy-rpc-to-chain.mjs";export{addToDefaultChains}from"./ethereum/add-chain-to-default-chains.mjs";export{DEFAULT_SUPPORTED_CHAINS,DEFAULT_SUPPORTED_CHAIN_IDS}from"./ethereum/default-supported-chains.mjs";export{addRpcUrlOverrideToChain}from"./ethereum/add-rpc-url-override-to-chain.mjs";export{dedupeSupportedChains}from"./ethereum/dedupe-supported-chains.mjs";export{getSupportedChainById}from"./ethereum/get-supported-chain-by-id.mjs";export{abstract}from"./ethereum/definitions/abstract.mjs";export{abstractTestnet}from"./ethereum/definitions/abstractTestnet.mjs";export{apeChain}from"./ethereum/definitions/apeChain.mjs";export{arbitrum}from"./ethereum/definitions/arbitrum.mjs";export{arbitrumSepolia}from"./ethereum/definitions/arbitrumSepolia.mjs";export{avalanche}from"./ethereum/definitions/avalanche.mjs";export{avalancheFuji}from"./ethereum/definitions/avalancheFuji.mjs";export{b3}from"./ethereum/definitions/b3.mjs";export{b3Sepolia}from"./ethereum/definitions/b3Sepolia.mjs";export{base}from"./ethereum/definitions/base.mjs";export{baseSepolia}from"./ethereum/definitions/baseSepolia.mjs";export{celo}from"./ethereum/definitions/celo.mjs";export{curtis}from"./ethereum/definitions/curtis.mjs";export{fluentTestnet}from"./ethereum/definitions/fluentTestnet.mjs";export{linea}from"./ethereum/definitions/linea.mjs";export{mainnet}from"./ethereum/definitions/mainnet.mjs";export{neuraTestnet}from"./ethereum/definitions/neuraTestnet.mjs";export{optimism}from"./ethereum/definitions/optimism.mjs";export{optimismSepolia}from"./ethereum/definitions/optimismSepolia.mjs";export{polygon}from"./ethereum/definitions/polygon.mjs";export{polygonAmoy}from"./ethereum/definitions/polygonAmoy.mjs";export{ronin}from"./ethereum/definitions/ronin.mjs";export{saigon}from"./ethereum/definitions/saigon.mjs";export{sepolia}from"./ethereum/definitions/sepolia.mjs";export{shape}from"./ethereum/definitions/shape.mjs";export{somnia}from"./ethereum/definitions/somnia.mjs";export{somniaTestnet}from"./ethereum/definitions/somniaTestnet.mjs";export{zora}from"./ethereum/definitions/zora.mjs";export{zoraSepolia}from"./ethereum/definitions/zoraSepolia.mjs";export{zoraTestnet}from"./ethereum/definitions/zoraTestnet.mjs";export{bsc}from"./ethereum/definitions/bsc.mjs";export{gunz}from"./ethereum/definitions/gunz.mjs";export{hyperEVMMainnet}from"./ethereum/definitions/hyperEVMMainnet.mjs";export{monadMainnet}from"./ethereum/definitions/monadMainnet.mjs";export{immutableZkEvm}from"./ethereum/definitions/immutableZkEvm.mjs";export{soneium}from"./ethereum/definitions/soneium.mjs";export{unichain}from"./ethereum/definitions/unichain.mjs";import"./ethereum/definitions/berachainArtio.mjs";import"./ethereum/definitions/celoAlfajores.mjs";import"./ethereum/definitions/filecoin.mjs";import"./ethereum/definitions/filecoinCalibration.mjs";import"./ethereum/definitions/garnetHolesky.mjs";import"./ethereum/definitions/holesky.mjs";import"./ethereum/definitions/lineaTestnet.mjs";import"./ethereum/definitions/lukso.mjs";import"./ethereum/definitions/redstone.mjs";const e="0.1.
|
|
1
|
+
export{addPrivyRpcToChain}from"./ethereum/add-privy-rpc-to-chain.mjs";export{addToDefaultChains}from"./ethereum/add-chain-to-default-chains.mjs";export{DEFAULT_SUPPORTED_CHAINS,DEFAULT_SUPPORTED_CHAIN_IDS}from"./ethereum/default-supported-chains.mjs";export{addRpcUrlOverrideToChain}from"./ethereum/add-rpc-url-override-to-chain.mjs";export{dedupeSupportedChains}from"./ethereum/dedupe-supported-chains.mjs";export{getRpcEndpointFromChain}from"./ethereum/get-rpc-endpoint-from-chain.mjs";export{getSupportedChainById}from"./ethereum/get-supported-chain-by-id.mjs";export{abstract}from"./ethereum/definitions/abstract.mjs";export{abstractTestnet}from"./ethereum/definitions/abstractTestnet.mjs";export{apeChain}from"./ethereum/definitions/apeChain.mjs";export{arbitrum}from"./ethereum/definitions/arbitrum.mjs";export{arbitrumSepolia}from"./ethereum/definitions/arbitrumSepolia.mjs";export{avalanche}from"./ethereum/definitions/avalanche.mjs";export{avalancheFuji}from"./ethereum/definitions/avalancheFuji.mjs";export{b3}from"./ethereum/definitions/b3.mjs";export{b3Sepolia}from"./ethereum/definitions/b3Sepolia.mjs";export{base}from"./ethereum/definitions/base.mjs";export{baseSepolia}from"./ethereum/definitions/baseSepolia.mjs";export{celo}from"./ethereum/definitions/celo.mjs";export{curtis}from"./ethereum/definitions/curtis.mjs";export{fluentTestnet}from"./ethereum/definitions/fluentTestnet.mjs";export{linea}from"./ethereum/definitions/linea.mjs";export{mainnet}from"./ethereum/definitions/mainnet.mjs";export{neuraTestnet}from"./ethereum/definitions/neuraTestnet.mjs";export{optimism}from"./ethereum/definitions/optimism.mjs";export{optimismSepolia}from"./ethereum/definitions/optimismSepolia.mjs";export{polygon}from"./ethereum/definitions/polygon.mjs";export{polygonAmoy}from"./ethereum/definitions/polygonAmoy.mjs";export{ronin}from"./ethereum/definitions/ronin.mjs";export{saigon}from"./ethereum/definitions/saigon.mjs";export{sepolia}from"./ethereum/definitions/sepolia.mjs";export{shape}from"./ethereum/definitions/shape.mjs";export{somnia}from"./ethereum/definitions/somnia.mjs";export{somniaTestnet}from"./ethereum/definitions/somniaTestnet.mjs";export{zora}from"./ethereum/definitions/zora.mjs";export{zoraSepolia}from"./ethereum/definitions/zoraSepolia.mjs";export{zoraTestnet}from"./ethereum/definitions/zoraTestnet.mjs";export{bsc}from"./ethereum/definitions/bsc.mjs";export{gunz}from"./ethereum/definitions/gunz.mjs";export{hyperEVMMainnet}from"./ethereum/definitions/hyperEVMMainnet.mjs";export{monadMainnet}from"./ethereum/definitions/monadMainnet.mjs";export{immutableZkEvm}from"./ethereum/definitions/immutableZkEvm.mjs";export{soneium}from"./ethereum/definitions/soneium.mjs";export{unichain}from"./ethereum/definitions/unichain.mjs";import"./ethereum/definitions/berachainArtio.mjs";import"./ethereum/definitions/celoAlfajores.mjs";import"./ethereum/definitions/filecoin.mjs";import"./ethereum/definitions/filecoinCalibration.mjs";import"./ethereum/definitions/garnetHolesky.mjs";import"./ethereum/definitions/holesky.mjs";import"./ethereum/definitions/lineaTestnet.mjs";import"./ethereum/definitions/lukso.mjs";import"./ethereum/definitions/redstone.mjs";const e="0.1.2-beta-20260225204743";export{e as VERSION};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@privy-io/chains",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.2-beta-20260225204743",
|
|
4
4
|
"description": "Network configurations for Privy SDKs",
|
|
5
5
|
"keywords": [],
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -49,8 +49,8 @@
|
|
|
49
49
|
"rollup-plugin-dts": "^6.1.1",
|
|
50
50
|
"typescript": "~5.5.3",
|
|
51
51
|
"@privy-io/build-config": "1.0.0",
|
|
52
|
-
"@privy-io/
|
|
53
|
-
"@privy-io/
|
|
52
|
+
"@privy-io/tsconfig": "0.0.0",
|
|
53
|
+
"@privy-io/eslint-config-custom": "0.0.0"
|
|
54
54
|
},
|
|
55
55
|
"peerDependencies": {},
|
|
56
56
|
"peerDependenciesMeta": {},
|