Giter Club home page Giter Club logo

hsnice16 / frontend-sdk Goto Github PK

View Code? Open in Web Editor NEW

This project forked from symm-io/frontend-sdk

0.0 1.0 0.0 3.1 MB

The SYMMIO SDK offers tools to interact with SYMMIO contracts for seamless decentralized app integration. It provides transaction encoding, error handling, and state management, using modern technologies. Tailored for the SYMMIO platform, it ensures top compatibility and performance.

Home Page: https://frontend-sdk-stella-demo.vercel.app/trade/BTCUSDT

Shell 0.02% JavaScript 0.33% TypeScript 99.65%

frontend-sdk's Introduction

@symmio/frontend-sdk

An SDK to interact with SYMMIO contracts, hedgers and peripherals.

setup:

  • First Execute the following command:

    yarn install
    
  • Navigate to one of our apps folders. For example:

    cd apps/alpha/
    
  • Obtain the .env file from the Frontend Developer.

  • Execute the following command:

    yarn dev
    
  • If you need to change the SDK file, you can find it in the packages/core/ path

More Info:

  • To enable path completion suggestions in VSCode, first build the project by running yarn build. Then, in the VSCode settings, ensure that "TypeScript > Tsc: Auto Detect" is set to 'on'.

  • Be sure not to use the publicProvider from Wagmi, as it causes some errors in the SDK. Wagmi Website:

    Note: In a production app, it is not recommended to only pass publicProvider to configureChains as you will probably face rate-limiting on the public provider endpoints. It is recommended to also pass an alchemyProvider or infuraProvider as well.

  • The package.json file defines a build-and-integrate command that automates the testing and building of the SDK and Client. This command involves the following steps:

    • Pre-build Script: The node ./useful_script/pre_build.js script removes the following configuration from the apps/nextjs/tsconfig.json file:

      "@symmio/frontend-sdk/_": [
      "../../packages/core/src/_"
      ]
      

      This is necessary because the Client code uses compiled JavaScript files for imported statements.

    • Build and Publish SDK: The yalc publish command builds the SDK project and publishes it to the local repository located at ~/.yalc/. Yalc only moves the package files (dist and package.json) to the local repository.

    • Install SDK in Client: The yalc add @symmio/frontend-sdk command adds the SDK package file to the node_modules directory of the apps/nextjs project. This allows the Client to import the SDK's functionality.

    • Post-build Script: The node ./useful_script/post_build.js script adds the following configuration to the apps/nextjs/tsconfig.json file:

        "@symmio/frontend-sdk/*": [
          "../../packages/core/src/*"
        ]
      
    • This configuration ensures that the Client can correctly resolve and import the SDK's modules, even after it has been published locally and installed using the yalc add command

frontend-sdk's People

Contributors

alitdev avatar ehsan1814 avatar mahdi-hf avatar maliabr avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.