ArkProjectNFTs / ark-project

ArkProject is a liquidity layer for digital assets, uniting markets, empowering creators, and bridging the gap to mass adoption. Built on top of Starknet, ArkProject is designed to provide a fully decentralized and trustless orderbook on-chain.
https://arkproject.dev
Apache License 2.0
25 stars 10 forks source link

Implement Dynamic core SDK Provider Packaging for Multiple Ark Project RPC #247

Closed kwiss closed 7 months ago

kwiss commented 7 months ago

Is this feature related to a problem? Please describe.

Currently using our SDK is challenging in selecting and configuring the appropriate network, particularly for Solis and its RPC addresses. This lack of a straightforward method to choose and connect to different Ark project networks leads to unnecessary complexities and inefficiencies in the development process.

Describe the solution you'd like

I propose a solution where the SDK provider is built and packaged using environment variables during the CI process. This approach will embed network configurations, such as RPC addresses for different Ark project networks, directly into the SDK as constants. Developers will be provided with a pre-configured SDK, allowing them to select the desired network (e.g., Solis) through an easy-to-use interface or configuration setting, without the need to manually input network details. This build process ensures that the network configurations are fixed at the time of SDK creation, eliminating runtime dependencies on environment variables. The end state would be a flexible, user-friendly SDK with network-specific configurations seamlessly integrated, offering a more streamlined development experience.

Alternative solutions

Allow people to use a RPC url directly, but it will be maybe more prone to errors

Additional Context

Implementing this feature requires careful consideration of how to modularize the SDK to accommodate different networks without bloating the package. We must ensure compatibility across different network protocols and maintain a balance between flexibility and ease of use. We should also be aware of the potential complexities in updating the SDK to support new networks or changes in existing ones.