
Product
Introducing Socket Firewall Enterprise: Flexible, Configurable Protection for Modern Package Ecosystems
Socket Firewall Enterprise is now available with flexible deployment, configurable policies, and expanded language support.
@genesis-xyz/caips
Advanced tools
@genesis-xyz/caips is a powerful and user-friendly CAIPs (Chain Agnostic Improvement Proposals) library for JavaScript and TypeScript applications. This library provides a clean and intuitive API, with excellent support for applications utilizing zod for
@genesis-xyz/caips is a powerful and user-friendly CAIPs (Chain Agnostic Improvement Proposals) library for JavaScript and TypeScript applications. This library provides a clean and intuitive API, with excellent support for applications utilizing zod for validation and parsing.
toString() method for seamless string interpolationnpm install @genesis-xyz/caips
import { CAIP2, CAIP10, CAIP19 } from '@genesis-xyz/caips';
// ChainID examples
const chainIDFromString = new CAIP2.ChainID('eip155:1');
const chainIDFromObject = new CAIP2.ChainID({ namespace: 'eip155', reference: '1' });
// AccountID examples
const accountIDFromString = new CAIP10.AccountID('eip155:1:0xab16a96d359ec26a11e2c2b3d8f8b8942d5bfcdb');
const accountIDFromObject = new CAIP10.AccountID({
chainId: 'eip155:1',
address: '0xab16a96d359ec26a11e2c2b3d8f8b8942d5bfcdb',
});
// AssetID and AssetType examples
const assetIDFromString = new CAIP19.AssetID('eip155:1/erc721:0x123456789abcdef0123456789abcdef01234567/1');
const assetIDFromObject = new CAIP19.AssetID({
chainId: 'eip155:1',
assetName: 'erc721:0x123456789abcdef0123456789abcdef01234567',
tokenId: '1',
});
const assetTypeFromString = new CAIP19.AssetType('eip155:1/erc721:0x123456789abcdef0123456789abcdef01234567');
const assetTypeFromObject = new CAIP19.AssetType({
chainId: 'eip155:1',
assetName: 'erc721:0x123456789abcdef0123456789abcdef01234567',
});
const chainID = new CAIP2.ChainID('eip155:1');
console.log(`ChainID: ${chainID}`); // ChainID: eip155:1
import { CAIP2, CAIP10, CAIP19 } from '@genesis-xyz/caips';
import { z } from 'zod';
CAIP2.ChainIDStringSchema.parse('eip155:1');
CAIP2.ChainIDObjectSchema.parse({
namespace: 'eip155',
reference: '1',
});
FAQs
@genesis-xyz/caips is a powerful and user-friendly CAIPs (Chain Agnostic Improvement Proposals) library for JavaScript and TypeScript applications. This library provides a clean and intuitive API, with excellent support for applications utilizing zod for
We found that @genesis-xyz/caips demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Product
Socket Firewall Enterprise is now available with flexible deployment, configurable policies, and expanded language support.

Security News
Open source dashboard CNAPulse tracks CVE Numbering Authorities’ publishing activity, highlighting trends and transparency across the CVE ecosystem.

Product
Detect malware, unsafe data flows, and license issues in GitHub Actions with Socket’s new workflow scanning support.