Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Typescript API #9

Open
alecchendev opened this issue Mar 7, 2022 · 0 comments
Open

Typescript API #9

alecchendev opened this issue Mar 7, 2022 · 0 comments
Labels
broad Higher level objective, should be split into atomic tasks

Comments

@alecchendev
Copy link
Member

alecchendev commented Mar 7, 2022

  • Expose an interface to make it easier for people to build on top of this
  • This would include...
    • Classes for accounts and deserialization methods
    • Instruction wrappers
    • Other helper functions
  • Would involve publishing an npm package

Basically this file but on steroids - also some of the following are already implemented in the previously mentioned file, just need to separate, add types, comments/documentation, and figure out file structure for npm package

Outline

  • Constants: BUOYANT_PROGRAM_ID, FEE, FEE_DECIMALS etc.
  • Subscription class
    • Metadata fields
    • Deserialization through constructor - given account data bytes (Uint8Array), or normal necessary fields
  • Instruction wrappers
    • Initialize
    • Withdraw
    • Renew
    • [Registry instr]
  • Other helper functions
    • getSubscriptionPDA(payee, amount, duration, count)
    • helpers to retrieve certain accounts needed for instructions when you only have certain data
@alecchendev alecchendev added the broad Higher level objective, should be split into atomic tasks label Mar 24, 2022
@alecchendev alecchendev changed the title Type/Javascript API Typescript API Mar 24, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
broad Higher level objective, should be split into atomic tasks
Projects
None yet
Development

No branches or pull requests

1 participant