# Documentation of Payloads in RPC API

**URL:** https://forum.duniter.org/t/documentation-of-payloads-in-rpc-api/10548
**Category:** RPC
**Tags:** payload, api, rpc
**Created:** [12 February 2023 11:22 UTC](https://forum.duniter.org/t/documentation-of-payloads-in-rpc-api/10548 "2023-02-12T11:22:39Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![vit](https://forum.duniter.org/user_avatar/forum.duniter.org/vit/32/2775_2.png) [@vit](https://forum.duniter.org/u/vit)
#### Post date: [12 February 2023 11:22 UTC](https://forum.duniter.org/t/documentation-of-payloads-in-rpc-api/10548/1 "2023-02-12T11:22:39Z")

</div>

Documentation about Payloads (`NewOwnerKeyPayload`, `RevocationPayload`) is hard to find (mainly the forum, and finally, the Rust code…).

They should be documented in the extrinsic online documentation requiring them.

If Bytes type is involved, we should also specify the Endian (Big or Little Byte Order).

Maybe an easy issue for a new Rust dev ? 😉

---

<div class="post-metadata">

### Author: ![tuxmain](https://forum.duniter.org/user_avatar/forum.duniter.org/tuxmain/32/6423_2.png) [@tuxmain](https://forum.duniter.org/u/tuxmain)
#### Post date: [12 February 2023 17:57 UTC](https://forum.duniter.org/t/documentation-of-payloads-in-rpc-api/10548/2 "2023-02-12T17:57:16Z")

</div>

I intended to document this kind of things in `docs/api/manual.md` but it’s not up-to-date (revocation is outdated and change owner key is missing).

> **[Document NewOwnerKeyPayload, RevocationPayload (#101) · Issues · nodes / rust...](https://git.duniter.org/nodes/rust/duniter-v2s/-/issues/101)**
>
> NewOwnerKeyPayload and RevocationPayload have to be SCALE-encoded by-hand by non-Rust wallet developers, hence complete encoding documentation is needed. docs/api/manual.md should be updated. Gcli can...

---

<div class="post-metadata">

### Author: ![HugoTrentesaux](https://forum.duniter.org/user_avatar/forum.duniter.org/hugotrentesaux/32/6396_2.png) [@HugoTrentesaux](https://forum.duniter.org/u/HugoTrentesaux)
#### Post date: [19 February 2023 19:26 UTC](https://forum.duniter.org/t/documentation-of-payloads-in-rpc-api/10548/3 "2023-02-19T19:26:56Z")

</div>

> [@vit](#):
>
> extrinsic online documentation

You mean [Duniter | Runtime calls](https://duniter.org/wiki/duniter-v2/runtime-calls/)?

I did not get the goal of [`docs/api/manual.md`](https://git.duniter.org/nodes/rust/duniter-v2s/-/blob/master/docs/api/manual.md), but now that you write it down, it’s clear that these kind of things should be documented somewhere.

MR [!133](https://git.duniter.org/nodes/rust/duniter-v2s/-/merge_requests/133) comes with a lot of added documentation, maybe I could fit [#101](https://git.duniter.org/nodes/rust/duniter-v2s/-/issues/101) in it.

---

<div class="post-metadata">

### Author: ![tuxmain](https://forum.duniter.org/user_avatar/forum.duniter.org/tuxmain/32/6423_2.png) [@tuxmain](https://forum.duniter.org/u/tuxmain)
#### Post date: [19 February 2023 21:01 UTC](https://forum.duniter.org/t/documentation-of-payloads-in-rpc-api/10548/4 "2023-02-19T21:01:50Z")

</div>

> [@HugoTrentesaux](#):
>
> I did not get the goal of [`docs/api/manual.md`](https://git.duniter.org/nodes/rust/duniter-v2s/-/blob/master/docs/api/manual.md)

It’s for documenting general things that would not fit in an automated item-wise documentation, more like an FAQ for wallet developers. There are some processes like revocation or everything related to membership, that require a precise order and you can’t guess it from the extrinsic documentation alone.

But maybe it’s useless or redundant, I don’t know.

---

<div class="post-metadata">

### Author: ![vit](https://forum.duniter.org/user_avatar/forum.duniter.org/vit/32/2775_2.png) [@vit](https://forum.duniter.org/u/vit)
#### Post date: [20 February 2023 10:15 UTC](https://forum.duniter.org/t/documentation-of-payloads-in-rpc-api/10548/5 "2023-02-20T10:15:07Z")

</div>

I mean extrinsic as well. Look here on technicalComittee there is some online doc :

 ![Capture du 2023-02-20 11-11-39](https://forum.duniter.org/uploads/default/original/2X/a/a0e8c5b43a5586eda1847341c240c2f86179e74e.png)

SmithMembership extrinsics, for example, lack these kind of documentation available directly in the API.

---

<div class="post-metadata">

### Author: ![HugoTrentesaux](https://forum.duniter.org/user_avatar/forum.duniter.org/hugotrentesaux/32/6396_2.png) [@HugoTrentesaux](https://forum.duniter.org/u/HugoTrentesaux)
#### Post date: [20 February 2023 10:17 UTC](https://forum.duniter.org/t/documentation-of-payloads-in-rpc-api/10548/6 "2023-02-20T10:17:25Z")

</div>

That’s the purpose of MR [!133](https://git.duniter.org/nodes/rust/duniter-v2s/-/merge_requests/133), it adds documentation to most extrinsics and storage items.
