igneous-labs / stake-pool-sdk

Socean Stake Pool Typescript SDK
stake-pool-sdk.vercel.app
MIT License
7 stars 3 forks source link

meta: design API #2

Open f8122dac91 opened 2 years ago

f8122dac91 commented 2 years ago
f8122dac91 commented 2 years ago

The only export from the main library is Socean class that self-contains all the necessary info for communicating with Socean stake pool. The class has following public methods: getStakePoolAccount (TBD), depositSol, depositStake, withdraw.

f8122dac91 commented 2 years ago

The SDK should also provide cli executable. It should provide a way to print txs and check the status of the stake pool.

f8122dac91 commented 2 years ago

TODO: need to decide if we want to support instant and delayed withdrawal, or just instant withdrawal through swap.

billythedummy commented 2 years ago

The SDK should also provide cli executable. It should provide a way to print txs and check the status of the stake pool.

we've decided that cli will be the last priority. We will probably provide helpful info such as how to use the functions with spl-governance in an examples folder

billythedummy commented 2 years ago

regarding Update before sending Deposit and Withdraw transactions if the stake pool has not been updated this epoch, we've decided to have the check and appending of update transactions to be part of the exported deposit() and withdrawStake() methods instead of being separate exported methods