docs icon indicating copy to clipboard operation
docs copied to clipboard

How to decorate API with Typegen

Open decentration opened this issue 3 years ago • 2 comments

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?

decentration avatar Sep 27 '22 15:09 decentration

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...

decentration avatar Sep 30 '22 14:09 decentration

hi @jacogr, just checking to see if you can provide any support here?

decentration avatar Oct 10 '22 12:10 decentration

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.

polkadot-js-bot avatar Oct 31 '22 13:10 polkadot-js-bot

any support or clarity would be super useful

decentration avatar Oct 31 '22 15:10 decentration

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.

polkadot-js-bot avatar Nov 21 '22 19:11 polkadot-js-bot

Any support here?

decentration avatar Nov 21 '22 19:11 decentration

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.

polkadot-js-bot avatar Dec 13 '22 02:12 polkadot-js-bot

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

woss avatar Dec 13 '22 11:12 woss

ahoy @woss! thanks for responding. It would also be great if you could answer the stack exchange issue, with a few steps.

decentration avatar Dec 14 '22 15:12 decentration

@decentration what kind of steps would you require?

woss avatar Dec 14 '22 15:12 woss

@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 avatar Dec 14 '22 17:12 decentration

@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

woss avatar Dec 15 '22 10:12 woss

thanks @woss, that helped add a missing piece.

decentration avatar Dec 15 '22 15:12 decentration

i guess you can close this @decentration if it's answered in the stacexchange

woss avatar Dec 15 '22 15:12 woss

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.

polkadot-js-bot avatar Dec 23 '22 16:12 polkadot-js-bot