-
Notifications
You must be signed in to change notification settings - Fork 38
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
API Reference, seid reference, transactions page addition #90
Conversation
- Added dynamic routes for the API from the openapi spec generated by the "sei-chain" repo - Added code highlight component - Added seid reference and script to generate seid docs - Moved EVM endpoints - Added transaction structure - Added ts-node to dev dependencies
Added most up to date guide for getting started with The Graph
{`import { getQueryClient } from '@sei-js/cosmjs'; | ||
|
||
const queryClient = await getQueryClient("YOUR_RPC_URL"); | ||
const { ${routeNames.functionName} } = queryClient.${parts[0]}.${parts[1]}.${parts[2]}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is there a more programatic way to do this? i.e. what if there's only 2 parts or there's more than 3?
also, can we have some sort of mapping of function name to parts instead of parsing the actual endpoint to get the query client function?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Any route I've seen has at least three parts. I can look into optimizations, but this works and doesn't require a mapping registry.
|
||
Transactions are fundamental operations on the Sei blockchain and are required for any state updates on chain such as token transfers, account creation, and smart contract execution. Transactions are cryptographically signed by the sender’s private key to ensure authenticity and ownership. For more information on private keys, refer to the advanced section on [HD Paths and Coin Types](/dev-advanced-concepts/hd-path-coin-types) | ||
|
||
## Transaction Types |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
might be useful to show how an evm tx looks on the cosmos side?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe this can be broken down a bit and show just the good bits
${restAddress}/cosmos/tx/v1beta1/txs/${txHash}
{
"tx": {
"body": {
"messages": [
{
"@type": "string",
"data": {
"@type": "string",
"chain_id": "string",
"nonce": "string",
"gas_tip_cap": "string",
"gas_fee_cap": "string",
"gas_limit": "string",
"to": "string",
"value": "string",
"data": "string|null",
"accesses": "array",
"v": "string|null",
"r": "string",
"s": "string"
},
"derived": "string|null"
}
],
"memo": "string",
"timeout_height": "string",
"extension_options": "array",
"non_critical_extension_options": "array"
},
"auth_info": {
"signer_infos": "array",
"fee": {
"amount": "array",
"gas_limit": "string",
"payer": "string",
"granter": "string"
}
},
"signatures": "array"
},
"tx_response": {
"height": "string",
"txhash": "string",
"codespace": "string",
"code": "integer",
"data": "string",
"raw_log": "string",
"logs": [
{
"msg_index": "integer",
"log": "string",
"events": [
{
"type": "string",
"attributes": [
{
"key": "string",
"value": "string"
},
{
"key": "string",
"value": "string"
}
]
}
]
}
],
"info": "string",
"gas_wanted": "string",
"gas_used": "string",
"tx": {
"@type": "string",
"body": {
"messages": [
{
"@type": "string",
"data": {
"@type": "string",
"chain_id": "string",
"nonce": "string",
"gas_tip_cap": "string",
"gas_fee_cap": "string",
"gas_limit": "string",
"to": "string",
"value": "string",
"data": "string|null",
"accesses": "array",
"v": "string|null",
"r": "string",
"s": "string"
},
"derived": "string|null"
}
],
"memo": "string",
"timeout_height": "string",
"extension_options": "array",
"non_critical_extension_options": "array"
},
"auth_info": {
"signer_infos": "array",
"fee": {
"amount": "array",
"gas_limit": "string",
"payer": "string",
"granter": "string"
}
},
"signatures": "array"
},
"timestamp": "string",
"events": [
{
"type": "string",
"attributes": [
{
"key": "string",
"value": "string",
"index": "boolean"
},
{
"key": "string",
"value": "string",
"index": "boolean"
}
]
},
{
"type": "string",
"attributes": [
{
"key": "string",
"value": "string",
"index": "boolean"
},
{
"key": "string",
"value": "string",
"index": "boolean"
}
]
}
]
}
}
yarn-error.log
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
probably should gitigore this?
- Added dynamic routes for the API from the openapi spec generated by the "sei-chain" repo - Added code highlight component - Added seid reference and script to generate seid docs - Moved EVM endpoints - Added transaction structure - Added ts-node to dev dependencies
-gitignored yarn error.log - Slight improvement to endpoint page to be more clear
… feature/seid-api-reference
Looks good to me after local build + testing |
This PR adds an API reference section and a seid reference section as well as makes some small content tweaks and adds a new transactions page to show the strucuture of TX's.