0.0.54 • Published 3 days ago

@jointlabs/chains-info v0.0.54

Weekly downloads
-
License
MIT
Repository
-
Last release
3 days ago

Chains Info

This repository includes information about the chains and payment methods supported by the Joint Interface, Indexer and other components of the Joint ecosystem. It is meant to be the source of truth for chain metadata.

Usage

import chains,{getChainByName} from '@jointlabs/chains-info'

Usage with NextJS

import chains,{getChainByName} from '@jointlabs/chains-info/next'

Add /next to the import path to use the NextJS version of the library. This version will use process.env to set the chain information but still outputs an ESM module.

Environment Variables

All environment variables allow a prefix (denoted as {PREFIX}) to be set to match the prefix used by the host framework (e.g. NextJS = NEXT_PUBLIC_, Vite = VITE_). If no prefix is set, the environment variable name is used as is.

Chains Information

src/chains.ts contains the relevant information about the supported chains. This includes basic metadata (name, symbol, etc), It also includes fields such as contract address, rpc and indexer url that are set through environment variables. While most fields require a value passed through environment variables, the contract addresses for non-localhost chains have real default values.

Environment Variables

Ethereum
VariableDefault Value
ETHEREUM_API_URL
ETHEREUM_RPC_URL
ETHEREUM_CORE_ADDRESS
ETHEREUM_TOKEN_ADDRESS
ETHEREUM_BADGE_MGR_ADDRESS
ETHEREUM_MARKET_CORE_ADDRESS
ETHEREUM_DISPUTE_MGR_ADDRESS
ETHEREUM_MEDIATOR_MGR_ADDRESS
ETHEREUM_ENERGON_ADDRESS
ETHEREUM_NFT_ADDRESS
Polygon
Polygon
VariableDefault Value
POLYGON_API_URL
POLYGON_RPC_URL
POLYGON_WRAPPED_TOKEN_ADDRESS
Optimism
VariableDefault Value
OPTIMISM_API_URL
OPTIMISM_RPC_URL
OPTIMISM_WRAPPED_TOKEN_ADDRESS
Binance Chain
VariableDefault Value
BINANCE_API_URL
BINANCE_RPC_URL
BINANCE_WRAPPED_TOKEN_ADDRESS
Arbitrum
VariableDefault Value
ARBITRUM_API_URL
ARBITRUM_RPC_URL
ARBITRUM_WRAPPED_TOKEN_ADDRESS
Sepolia
VariableDefault Value
SEPOLIA_API_URL
SEPOLIA_RPC_URL
SEPOLIA_WRAPPED_TOKEN_ADDRESS
SEPOLIA_CORE_ADDRESS0x70b34cae2ba32a4b777e491c717d5e837574bd65
SEPOLIA_TOKEN_ADDRESS0xd0dE9c8983C1e7071dC2cB826eb7b9F6D3ac60d2
SEPOLIA_BADGE_MGR_ADDRESS0x6cF0ec545403eC6792eF4F62cfcE2FE494bF1591
SEPOLIA_MARKET_CORE_ADDRESS0x588Dc811aF25Ea75fd5b7FEEeAB368ca63D6EcBE
SEPOLIA_DISPUTE_MGR_ADDRESS0xe3DC1f3D53c2b821e713073f02A0b358706B69a2
SEPOLIA_MEDIATOR_MGR_ADDRESS0x0056905103f8F18fe18c04Ec9d256bF759C3Dd5D
SEPOLIA_ENERGON_ADDRESS
SEPOLIA_NFT_ADDRESS0x3b457DE90E5145CF4d6a9F2945d56e00A88D5Ab8

Localhost / Hardhat

VariableDefault Value
LOCALHOST_API_URL
LOCALHOST_RPC_URL
LOCALHOST_WRAPPED_TOKEN_ADDRESS
LOCALHOST_CORE_ADDRESS
LOCALHOST_TOKEN_ADDRESS
LOCALHOST_BADGE_MGR_ADDRESS
LOCALHOST_MARKET_CORE_ADDRESS
LOCALHOST_DISPUTE_MGR_ADDRESS
LOCALHOST_MEDIATOR_MGR_ADDRESS
LOCALHOST_ENERGON_ADDRESS
LOCALHOST_NFT_ADDRESS

Tokens Lists

src/token_list.ts includes the token list for each chain. It is used by the indexer to determine which tokens to index. It is also used by the Joint Interface to display the tokens supported by each chain.

Payment Methods

src/payment_methods.ts contains all the payment methods supported. It includes the full badge name, region and logo.

Mediator Pools

src/mediator_pools.ts contains the mediator pools supported by the Joint Interface. It is used to display the pools available for each chain, allowing ticket purchasers to select the pool they want to join after purchasing a ticket.

Badge Manifest

src/badge_manifest.ts contains the information about badges that can be claimed on a Joint Interface.

Environment Variables

VariableDefault Value
LOCALHOST_KYC_BADGE_MANIFEST_CLAIM_PAGE_URLhttp://localhost:3002/claim/kyc
SEPOLIA_KYC_BADGE_MANIFEST_CLAIM_API_URLhttps://kycbadge.joint.exchange/claim/kyc

ABI

src/abi/index.ts contains the ABI for the contracts used by the Joint Interface and services. It is paired with web3 packages viem or ethers.js to facilitate interactions with Joint contracts.

License

MIT

0.0.54

3 days ago

0.0.51

5 days ago

0.0.52

5 days ago

0.0.53

5 days ago

0.0.50

24 days ago

0.0.49

25 days ago

0.0.44

1 month ago

0.0.45

1 month ago

0.0.46

1 month ago

0.0.47

1 month ago

0.0.48

1 month ago

0.0.43

1 month ago

0.0.40

1 month ago

0.0.41

1 month ago

0.0.42

1 month ago

0.0.38

1 month ago

0.0.39

1 month ago

0.0.37

2 months ago

0.0.36

2 months ago

0.0.35

3 months ago

0.0.33

3 months ago

0.0.34

3 months ago

0.0.31

3 months ago

0.0.32

3 months ago

0.0.30

4 months ago

0.0.27

4 months ago

0.0.28

4 months ago

0.0.29

4 months ago

0.0.25

4 months ago

0.0.26

4 months ago

0.0.22

4 months ago

0.0.23

4 months ago

0.0.24

4 months ago

0.0.20

5 months ago

0.0.21

5 months ago

0.0.19

5 months ago

0.0.18

5 months ago

0.0.14

5 months ago

0.0.15

5 months ago

0.0.16

5 months ago

0.0.17

5 months ago

0.0.13

5 months ago

0.0.12

5 months ago

0.0.11

5 months ago

0.0.10

5 months ago

0.0.9

5 months ago

0.0.8

5 months ago

0.0.7

5 months ago

0.0.6

5 months ago

0.0.5

5 months ago

0.0.4

5 months ago

0.0.2

5 months ago

0.0.1

6 months ago