mschneider / solcpp

A fast Solana and Mango Markets C++ SDK
Other
40 stars 13 forks source link

Add option to specify dataSlice in getAccountInfo #17

Closed bdhobare closed 2 years ago

bdhobare commented 2 years ago

User can specify dataSlice options:

const json req = connection.getAccountInfoRequest(pubkey, 10, 100); // offset, length
{"id":1,"jsonrpc":"2.0","method":"getAccountInfo","params":["98pjRuQjK3qA6gXts96PqZT4Ze5QmnCmt3QYjhbUSPue",{"dataSlice":{"length":10,"offset":10},"encoding":"base64"}]}