@web3marketlabs/sdk

Chain definitions, Viem client factories, ABI parsing utilities, deployment address management, token data fetching, and shared type definitions.

npm install @web3marketlabs/sdk

Reference

Exports

Chain Management

ExportTypeDescription
chainsRecord<string, ChainConfig>Dictionary of all supported chain configurations
getChainfunctionLook up a chain by numeric ID or string key
ChainConfiginterfaceType definition for a chain configuration

Client Factories

ExportTypeDescription
createClientfunctionCreate a Viem PublicClient for reading blockchain state
createWalletClientfunctionCreate a Viem WalletClient for signing transactions
CreateClientOptionsinterfaceOptions for createClient
CreateWalletClientOptionsinterfaceOptions for createWalletClient

ABI Utilities

ExportTypeDescription
categorizeAbifunctionSplit an ABI into reads, writes, events, and errors
getReadFunctionsfunctionExtract view/pure functions from an ABI
getWriteFunctionsfunctionExtract nonpayable/payable functions from an ABI
getEventsfunctionExtract event definitions from an ABI
formatFunctionNamefunctionConvert a Solidity function name to PascalCase
CategorizedAbiinterfaceReturn type of categorizeAbi

Address Management

ExportTypeDescription
getAddressfunctionGet a contract address for a specific chain from a registry
hasAddressfunctionCheck if a registry has an address for a chain
loadDeploymentsfunctionLoad deployment JSON files from a directory
AddressRegistrytypeMaps chain ID to contract address

Token Data

ExportTypeDescription
fetchTokenInfofunctionRead on-chain ERC-20 metadata from a token contract
TokenInfointerfaceReturn type of fetchTokenInfo

Component Types

ExportTypeDescription
KitComponentinterfaceInterface for installable modules
ComponentTiertypeModule tier ("free" or "pro")
ComponentParameterinterfaceParameter definition for module configuration
ComponentFileinterfaceFile definition within a module
DeployHookinterfaceHook for custom deployment logic
CodegenPlugininterfacePlugin interface for the codegen pipeline
KitModuleinterfaceModule definition for multi-variant modules
ModuleVariantinterfaceVariant within a module
DeployStepinterfaceA single step in a deployment sequence
WizardContextinterfaceContext passed to interactive wizards
ModuleFileinterfaceFile definition within a module variant