Commit Graph

23 Commits

Author SHA1 Message Date
Trent Nelson bb144bf758 account-decoder: Add string format helpers to UiTokenAmount 2020-09-24 21:50:06 -06:00
Tyera Eulberg e1a212fb79
Bump spl-token (#12395) 2020-09-22 17:08:54 -06:00
Tyera Eulberg 2eff9a19c3
Update to token pack/unpack changes (#11900) 2020-08-28 22:06:30 -06:00
Tyera Eulberg 76be36c9ce
Update spl-token to v2.0 (#11884)
* Update account-decoder to spl-token v2.0

* Update transaction-status to spl-token v2.0

* Update rpc to spl-token v2.0

* Update getTokenSupply to pull from Mint directly

* Fixup to spl-token v2.0.1
2020-08-28 15:54:57 -06:00
Michael Vines adc984a225 Rename Binary64 to Base64. Establish Base58 encoding 2020-08-17 17:26:29 -07:00
Michael Vines 757e147b3b Rework UiAccountData encode/decode such that it works from Rust 2020-08-17 17:26:29 -07:00
Michael Vines 17645ee20c
Adapt RpcClient to recent token method changes (#11519)
* Avoid skip_serializing_if since that breaks deserialization

* Adapt RpcClient to recent token method changes
2020-08-11 10:14:17 -06:00
Tyera Eulberg 88ca04dbdb
Add config param to specify offset/length for single and program account info (#11515)
* Add config param to specify dataSlice for account info and program accounts

* Use match instead of if
2020-08-10 22:35:29 +00:00
Tyera Eulberg 1925b0bd0b
Return account data size with parsed accounts (#11506) 2020-08-10 19:02:11 +00:00
Michael Vines a4f5f3e978 account subcommand now requests binary64 2020-08-09 21:10:49 +00:00
Justin Starry ebc45bd73f
Fallback to base64 account encoding if json parse fails (#11483)
* Fallback to base64 account encoding if json parse fails

* Remove default binary conversion
2020-08-09 18:28:25 +08:00
Tyera Eulberg a9f76862fb
Decode native-program and sysvar accounts (#11463)
* Pass pubkey in to account-decoder for sysvars

* Decode sysvar accounts

* Decode config accounts; move validator-info lower

* Decode stake accounts

* Review comments

* Stringify any account lamports and epochs that can be set to u64::MAX
2020-08-09 07:50:45 +00:00
sakridge 068d23f298
Add Binary64 option for account data (#11474)
* Add Binary64 option for account data

* Decode into binary64

* Reword docs
2020-08-08 22:40:13 -07:00
Tyera Eulberg 88d8d3d02a
Return delegated amount as UiTokenAmount (#11475)
* Return delegated amount as UiTokenAmount

* Omit delegate and delegatedAmount when none
2020-08-08 19:12:09 +00:00
Tyera Eulberg b7c2681903
Token Accounts: return ui_amount, decimals with decoded account (#11407)
* Return ui_amount, decimals from token client methods

* Return ui_amount, decimals in RPC jsonParsed token accounts

* Fixup docs

* Return ui_amount, decimals in pubsub jsonParsed token accounts

* Remove unnecessary duplicate struct

* StringAmount rename
2020-08-07 11:37:39 -06:00
Tyera Eulberg 308186da79
Rework parsed account format (#11372)
* Rework parsed account format

* Serialize as type
2020-08-05 00:59:10 -06:00
Tyera Eulberg 86e3f96f16
Return token amounts as floats (#11370)
* Return token amounts as floats

* Floating-point equality

* Return float and raw token amounts

* Fix decimals and token rpcs for native-mint tokens

* Fixup docs and review comments
2020-08-05 06:48:09 +00:00
Michael Vines ffbd859c42 Update spl-token and spl-memo 2020-08-02 07:53:42 -07:00
Tyera Eulberg 0f551d4f75
Decode token instructions (#11281)
* Token->SplToken

* Add spl_token instruction parsing

* Rebase on master

* Gracefully fail key len mismatches
2020-07-31 13:26:09 -06:00
Michael Vines c78e12a262 Avoid spl-sdk dependency, which inhibits crate publishing 2020-07-30 23:47:26 +00:00
Tyera Eulberg b45ac5d4db
Add SPL Token-specific rpc endpoints (#11231)
* Simplify account-decoder program ids + spl_token helper

* Spl program namespace version

* Add getTokenAccountBalance endpoint

* Remove token program id from getTokenAccountBalance request

* Add getTokenSupply endpoint

* Remove token program id from getTokenSupply request

* Add getTokenAccountsByOwner/Delegate endpoints

* Remove token program id from getTokenAccountsByOwner/Delegate requests

* Named parameter
2020-07-28 23:00:48 -06:00
Tyera Eulberg 32fea0496e
Add token account decoding (#11136)
* Add token decoding

* Bump versions
2020-07-24 17:45:21 -06:00
Tyera Eulberg d97850f1d9
Add account-decoder utilities (#10846)
* Fix comment and make less pub

* Add account-decoder crate and use to decode vote and system (nonce) accounts

* Update docs

* Rename RpcAccount struct

* s/Rpc/Display

* Call it jsonParsed and update docs

* Revert "s/Rpc/Display"

This reverts commit 6e7149f503f560f1e9237981058ff05642bb7db5.

* s/Rpc/Ui

* Add tests

* Ui more things

* Comments
2020-07-01 04:55:11 +00:00