dsov-utils
v0.0.7-rc43
Published
[](https://sdx-utils.netlify.app/) [](https://badge.fury.io/js/dsov-utils) ,
euroPrimitiveProgramId: new PublicKey(...),
wallet: new anchor.Wallet(...),
idl: programTypes.IDL,
});
// Add Asset Details
const btcAssetDetails = {...};
sdxClient.addAsset(client.AssetType.BTC, btcAssetDetails);
// Deposit as Liquidity Provider
await sdxClient.depositToVault(
client.AssetType.BTC,
new BN(...),
new BN(...)
);Documentation
We use TypeDoc for generating API documentation. To generate docs, follow these steps:
- Install the project dependencies:
yarn install- Generate the docs:
yarn build:docsThe documentation will be generated in the docs directory in the project root.
- Deploying the docs:
Our docs are hosted with Netlify as Github Pages doesn't work with private repos. You can use Netlify's Command Line Interface (CLI) to deploy the documentation site. Here's how to do it:
npm install netlify-cli -g # install Netlify CLI
netlify deploy # create a draft deployment
netlify deploy --prod # create a production deploymentThe netlify deploy command will prompt you to provide a publish directory. This should be the docs directory where your built documentation resides.
The first netlify deploy command creates a draft version of your site and provides a draft URL for you to check. If everything looks good on your draft URL, deploy it to your main site URL with the --prod flag using netlify deploy --prod.
Steps to Test Locally on the frontend app
- Upgrade the version in package.json
- Run
yarn install - Run
yarn packin dsov-utils folder - The above command creates a package like this "/Users/harsh/dsov/packages/dsov-utils/dsov-utils-v0.0.6-rc58.tgz"
- Copy the absolute path and run in your frontend app like this -
yarn add /Users/harsh/dsov/packages/dsov-utils/dsov-utils-v0.0.6-rc58.tgz - Once testing is complete. Change the version in package.json to +1 of where you started to increment for testing i.e Your initial version before testing locally was 0.0.1 and after testing is 0.0.9. Once testing complete you should use 0.0.2
Publishing
To build and publish the package, run:
yarn publish
Contributing
We welcome contributions! Please see our Contributing Guide for more details.
