Commit Graph

25 Commits

Author SHA1 Message Date
dependabot[bot] b0a58d2ad8
build(deps-dev): bump @rollup/plugin-json from 4.1.0 to 6.0.0 in /stake-pool/js (#4220)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-05-09 13:54:29 +00:00
dependabot[bot] b513f371d8
build(deps-dev): bump eslint-plugin-prettier from 4.0.0 to 4.2.1 in /stake-pool/js (#4219)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-05-09 13:54:28 +00:00
dependabot[bot] e1dc335ef5
build(deps-dev): bump @rollup/plugin-typescript from 8.3.0 to 11.1.0 in /stake-pool/js (#4218)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-05-09 13:53:59 +00:00
dependabot[bot] ca0f3377ad
build(deps-dev): bump @rollup/plugin-alias from 3.1.9 to 5.0.0 in /stake-pool/js (#4200)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-05-08 15:50:24 +00:00
dependabot[bot] 2931db72c6
build(deps-dev): bump rollup-plugin-dts from 4.1.0 to 4.2.3 in /stake-pool/js (#4199)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-05-08 15:05:20 +00:00
dependabot[bot] dce34d6f23
build(deps): bump @solana/buffer-layout from 4.0.0 to 4.0.1 in /stake-pool/js (#4198)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-05-08 15:04:55 +00:00
dependabot[bot] f4cc2844a0
build(deps-dev): bump eslint from 8.8.0 to 8.40.0 in /stake-pool/js (#4188)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-05-05 22:30:35 +00:00
dependabot[bot] ef4ba61da4
build(deps-dev): bump @rollup/plugin-node-resolve from 13.1.3 to 15.0.2 in /stake-pool/js (#4175)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-05-05 20:46:20 +00:00
dependabot[bot] 6075365a4e
build(deps-dev): bump prettier from 2.5.1 to 2.8.8 in /stake-pool/js (#4172)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-05-05 20:45:12 +00:00
dependabot[bot] a602303275
build(deps): bump terser from 5.10.0 to 5.17.1 in /stake-pool/js (#4153)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-05-03 12:05:48 +00:00
joeaba 891b4bdad8
chore: update maintainer references (#4008) 2023-01-31 08:06:36 -05:00
Alexander Ray 6ab15b340e
stake-pool: add redelegate js bindings (#3960)
* - add ts/js binding for redelegate functionality

* - add redelegate instructions

* - refactor

* - force rebuild

* - refactor

* - force rebuild

* - force rebuild
2023-01-12 19:56:06 +01:00
dependabot[bot] 3f6b5e4836
build(deps): bump json5 from 2.2.0 to 2.2.3 in /stake-pool/js (#3952)
Bumps [json5](https://github.com/json5/json5) from 2.2.0 to 2.2.3.
- [Release notes](https://github.com/json5/json5/releases)
- [Changelog](https://github.com/json5/json5/blob/main/CHANGELOG.md)
- [Commits](https://github.com/json5/json5/compare/v2.2.0...v2.2.3)

---
updated-dependencies:
- dependency-name: json5
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-01-04 00:11:27 +01:00
Jordan Sexton 1f58b759d8
fix: stake-pool-js: add browser CJS build (#3910)
* fix: stake-pool-js: add browser CJS build

* update package-lock.json

* run prettier

* only emit ts declaration files
2022-12-14 19:25:46 -06:00
Athar Mohammad 2198ee068b
Extends withdraw functionality in stake pool (#3445)
* extends withdraw to merge if stake account is provided

* check if account is stake account and delegated to same validator

* fixing tests and defining withdraw accounts for delegated stake reciever

* implementation improvements in cli

* fix js tests

* added test for uninitialized stake account
2022-08-22 23:36:13 +02:00
Edgar 83b5dabf02
stake-pool: fix docstring typos (#3495)
fix typos
2022-08-19 18:57:32 +02:00
Jon Cinque 79d2c606b8
CI: Add `--max-warnings 0` to eslint to abort on errors (#3254)
* CI: Add `--max-warnings 0` to eslint to abort on errors

* Fix lint issue
2022-06-16 09:39:55 -04:00
Jon Cinque c324f6c431
stake-pool: Handle force destaked accounts (#3152) 2022-05-19 19:08:50 +02:00
Jon Cinque a1c827d674
stake-pool: Update program to work with minimum delegation (#3127)
* stake-pool: Update program to work with minimum delegation

* Update minimum reserve lamports in the CLI

* Cargo fmt

* Add another test for hijacked account

* Fix python and JS constants
2022-05-02 22:45:25 +02:00
Alexander Ray 27a58282d3
stake-pool: add bindings to js (#2806)
* stake-pool:
add new bindings
  | 'IncreaseValidatorStake'
  | 'DecreaseValidatorStake'
  | 'UpdateValidatorListBalance'
  | 'UpdateStakePoolBalance'
  | 'CleanupRemovedValidatorEntries'

* stake-pool:
add new bindings
  | 'IncreaseValidatorStake'
  | 'DecreaseValidatorStake'
  | 'UpdateValidatorListBalance'
  | 'UpdateStakePoolBalance'
  | 'CleanupRemovedValidatorEntries'

* - merge upstream with local changes

* - merge package.json

* - update package.json

* - fix lint issues

* - fix lint issues

* - another lint fix

* - fix & try

* - force rebuild

* - merge from upstream

* fix lint issues

* - update package.json

* - add debug info to prettier

* - update prettier settings

* cleanup package json

* - refactor according PR suggestions

* - refactor

* - refactor

* - force pr action

* - fix withdraw stake issue

* - fix issue
2022-02-22 22:41:18 -05:00
Jon Cinque 32e77fb390
stake-pool-js: Bump version for release (#2832) 2022-01-29 00:39:28 +01:00
Kabir R b63d368b79
Add stake-pool browser build commands and documentation (#2804)
* Add browser build commands and documentation

* Improve rollup configuration

* Remove unused external import from rollup configuration

* Move from Babel to Typescript plugin

Co-authored-by: Jon Cinque <jon.cinque@gmail.com>
2022-01-28 19:15:51 +01:00
Jon Cinque f5f062e1b0
stake-pool-js: Prepare package for release (#2681)
* stake-pool-js: Prepare package for release

* Upgrade node version for new npm

* Regenerate package-lock.json

* Update README, fix build to remove test files
2021-12-30 12:55:09 -05:00
Alexander Ray cd8d79a2b4
[stake-pool] js: web3 stake pool bindings (#2604)
* - add stake-pool-web3-bindings (preview)

* - update readme

* - add tests

* - remove package-lock from foreign project

* - revert changes from foreign project

* - review improvenments

* - refactor regarding review suggestions

* - fix test
- fix readme

* Update stake-pool/js/src/instructions.ts

Co-authored-by: Jon Cinque <jon.cinque@gmail.com>

* - add withdraw authority as optional parameter

Co-authored-by: Jon Cinque <jon.cinque@gmail.com>
2021-12-23 13:34:02 -05:00
Lieu Zheng Hong 346075743e
stake-pool: Stake pool deserializer (#1656)
* first commit

* add schema for stakepool accounts

* got imports working

* add typescript support

* fix schema

* Change to use PublicKey type

* change to camelCase instead

* add type annotations to typescript classes

* add readme

* Add prettier linting

* add instructions to run

* add test section

* prettier clean up schema.ts

* convert index.js to index.ts

* actually use decode method available in Assignable

* rename stakepoolaccount so i can have a wrapper class

* add new class StakePool and change return type of getStakePoolAccounts

* remove extraneous .js files

* update schema to incorporate jon's comments

* remove unnecessary comments

* add helper functions to get individual accounts; cleaned up code

* add Fee, change denominator/numerator to BN

* Add enums so we can check what type an accountType is

* Remove name and ticker in StakePool class

* fix borshjs import

* change outdir to dist/ folder

* Edit package.json

* add toBuffer for schema.PublicKey

* add exports and default exports to index.ts

* fix trailing comma on tsconfig.json

* get mocha test harness working with ts-node, ts-mocha, esm

* fix borsh import

* clean up imports

* add working test script

* remove unneeded borshjs import

* add unit tests for both decodes (WIP)

* no need to console.log in testOnDevnet since we now have a test suite

* Add tests for ValidatorListAccount.decode

* add schema.decode.StakePoolAccount test

* Finish up

* reduce dependencies in package.json

* Add lint command to package.json

* Lint with prettier

* Update README.md with new commands

* Write explanatory comments in index.js

* Small linting change

* feat: introduce new borshjs deserializeUnchecked import

* lint: npm lint

* refactor: upgrade web3js version

* refactor: refactor type names

* refactor: npm run lint

* refactor: improve tsconfig.json

* feat: add declaration and declarationMap to tsconfig.json

* feat: allow getStakePoolAccounts to more robustly handle errors

* Update stake-pool/js/.gitignore

Co-authored-by: Jon Cinque <jon.cinque@gmail.com>

* Update stake-pool/js/package.json

Co-authored-by: Jon Cinque <jon.cinque@gmail.com>

* Update stake-pool/js/package.json

Co-authored-by: Jon Cinque <jon.cinque@gmail.com>

* Update stake-pool/js/package.json

Co-authored-by: Jon Cinque <jon.cinque@gmail.com>

* Update stake-pool/js/package.json

Co-authored-by: Jon Cinque <jon.cinque@gmail.com>

* refactor: modify `constructStakePoolSchema` to mutate in place

* lint: remove webpack.config.js

* lint: npm run lint

* lint: add comments above index.ts

* lint: lowercase schema

* feat: add full deserialization test

* Update stake-pool/js/package.json

Co-authored-by: Jon Cinque <jon.cinque@gmail.com>

* refactor: remove try-catch block in getStakePoolAccounts

* lint: lint

* refactor: use web3js pubkey

* refactor: move integration tests to separate file

* refactor: change test.js to do encode-decode loop

Co-authored-by: Jon Cinque <jon.cinque@gmail.com>
2021-06-23 14:18:45 +02:00