For the complete documentation index, see llms.txt. This page is also available as Markdown.

Initialization

Installation

npm install @yelay-lite/sdk

Required Dependencies

The Yelay Lite SDK requires a drift web3 adapter and the drift core library. Install both the core drift library and choose one adapter based on your web3 library:

Core dependency (required for all setups):

npm install @gud/drift

For Viem:

npm install @gud/drift-viem

For Ethers v6:

npm install @gud/drift-ethers

For Ethers v5:

npm install @gud/drift-ethers-v5

Caching Configuration

The Yelay Lite SDK automatically disables drift's internal caching to ensure fresh data on every request.

When you call sdk.init(drift), the SDK automatically replaces drift's default LRU cache with a no-op implementation, ensuring all contract calls fetch fresh data from the blockchain. The SDK will throw an error if you try to use custom caching.

Initialization

The SDK uses a drift adapter pattern that works with any web3 library. The init() method is mandatory and must be called before using any SDK features.

With Viem

With Ethers v6

With Ethers v5

Last updated