Initialization
Installation
npm install @yelay-lite/sdkRequired 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/driftFor Viem:
npm install @gud/drift-viemFor Ethers v6:
npm install @gud/drift-ethersFor Ethers v5:
npm install @gud/drift-ethers-v5Caching 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