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

[Substrate.io Migration] Runtime APIs #25

Merged
merged 8 commits into from
Oct 8, 2024
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion develop/parachain-devs/runtime-development/.pages
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,5 @@ title: Runtime Development
nav:
- index.md
- FRAME
- testing
- testing
- runtime-apis.md
25 changes: 25 additions & 0 deletions develop/parachain-devs/runtime-development/runtime-apis.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
---
title: Runtime APIs
description: Highlights the runtime interfaces that enable communication with outer node services. These APIs allow for the outer node to communicate with the WebAssembly runtime of a Polkadot SDK-based node.
---

Nodes consist of outer node services and a runtime. This separation of responsibilities is an important concept for designing Polkadot SDK-based chains and building upgradeable logic.
dawnkelly09 marked this conversation as resolved.
Show resolved Hide resolved

For more information on details of how the meta protocol works, [refer to the Polkadot SDK docs.](https://paritytech.github.io/polkadot-sdk/master/polkadot_sdk_docs/polkadot_sdk/index.html#summary){target=_blank}

However, the outer node services and the runtime must communicate with each other to complete many critical operations, including reading and writing data and performing state transitions.

The outer node services communicate with the runtime by calling runtime application programming interfaces to perform specific tasks.
dawnkelly09 marked this conversation as resolved.
Show resolved Hide resolved

By default, the runtime provides the following traits for outer node services to call. Below is a non-exhaustive list of common runtime APIs:

- [`AccountNonceApi`](https://paritytech.github.io/polkadot-sdk/master/frame_system_rpc_runtime_api/trait.AccountNonceApi.html){target=_blank}
dawnkelly09 marked this conversation as resolved.
Show resolved Hide resolved
- [`AuraApi`](https://paritytech.github.io/polkadot-sdk/master/sp_consensus_aura/trait.AuraApi.html){target=_blank}
- [`Benchmark`](https://paritytech.github.io/polkadot-sdk/master/frame_benchmarking/trait.Benchmark.html){target=_blank}
- [`BlockBuilder`](https://paritytech.github.io/polkadot-sdk/master/sp_block_builder/trait.BlockBuilder.html){target=_blank}
- [`GrandpaApi`](https://paritytech.github.io/polkadot-sdk/master/sp_consensus_grandpa/trait.GrandpaApi.html){target=_blank}
- [`NominationPoolsApi`](https://paritytech.github.io/polkadot-sdk/master/pallet_nomination_pools_runtime_api/trait.NominationPoolsApi.html){target=_blank}
- [`OffchainWorkerApi`](https://paritytech.github.io/polkadot-sdk/master/sp_offchain/trait.OffchainWorkerApi.html){target=_blank}
- [`SessionKeys`](https://paritytech.github.io/polkadot-sdk/master/sp_session/trait.SessionKeys.html)
- [`TaggedTransactionQueue`](https://paritytech.github.io/polkadot-sdk/master/sp_transaction_pool/runtime_api/trait.TaggedTransactionQueue.html){target=_blank}
- [`TransactionPaymentApi`](https://paritytech.github.io/polkadot-sdk/master/pallet_transaction_payment_rpc_runtime_api/trait.TransactionPaymentApi.html){target=_blank}
Loading