How to use in TypeScript
- Read firstly the docs from How to start section
- See how to connect to the contract/component in the TypeScript layer
- The full source of the package is available here
The info described there is mostly NOT REPEATED below.
Dependencies
- Use the following dependencies to embed RedStone Stellar Connector into TypeScript.
{
dependencies: {
...
"@redstone-finance/stellar-connector": "0.9.0",
...
}
}
Using the PriceAdapter package with @redstone-finance/stellar-connector
Use the .env.example file to create your .env file.
Deploying contracts
yarn sample-deploy
- The contract can be deployed by using the above command, defined here.
- The deployed
redstone_adapter-id.testnetand/orredstone_price_feed-XXX-id.testnetaddresses can be found in thestellardirectory.
Sample run
yarn sample-run
- The sample scenario can be run by using the above command, defined here.
- The script uses
PriceAdapterStellarContractConnector.