docs
docs copied to clipboard
How to decorate API with Typegen
Hi there i left a question on substrate stackechange related to Typegen.
Link to question: https://substrate.stackexchange.com/questions/5024/how-to-use-polkadot-js-typesript-typegen-to-decorate-api-for-runtime
The questions are:
- is typegen still up to date and something that can be used to decorate APIs?
- has endpoint been removed as an argument?
- am i going about thing the correct way to decorate the api?
Hey @jacogr, i know you are busy, can you point me in the right direction in regard to this. I am getting an issue with the endpoint method...
hi @jacogr, just checking to see if you can provide any support here?
This issue has been open for 21 days with no activity and is not labelled as an enhancement. It will be closed in 7 days.
any support or clarity would be super useful
This issue has been open for 21 days with no activity and is not labelled as an enhancement. It will be closed in 7 days.
Any support here?
This issue has been open for 21 days with no activity and is not labelled as an enhancement. It will be closed in 7 days.
ahoy @decentration,
hope this will help you https://github.com/anagolay/anagolay-js-sdk/blob/main/libraries/types/package.json#L43 we are using it like this
ahoy @woss! thanks for responding. It would also be great if you could answer the stack exchange issue, with a few steps.
@decentration what kind of steps would you require?
@decentration what kind of steps would you require?
Like for example, I added some rpc methods to my runtime related to a new pallet. But the methods are not decorated.
API/INIT: RPC methods not decorated:
superSig_getProposalState,
superSig_getUserSupersigs,
superSig_listMembers,
superSig_listProposals
So i am just looking where to add the new rpc types, i show here: https://substrate.stackexchange.com/questions/5024/how-to-use-polkadot-js-typesript-typegen-to-decorate-api-for-runtime
As you can see above, i added the rpc methods but unsure where to add those types.
@decentration https://substrate.stackexchange.com/questions/5024/how-to-use-polkadot-js-typescript-typegen-to-decorate-api-for-runtime/6359#6359 here you have it
thanks @woss, that helped add a missing piece.
i guess you can close this @decentration if it's answered in the stacexchange
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue if you think you have a related problem or query.