You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
However, I'm struggeling how to get it to work if I want to work with multiple chains in a single project. So I want to have apiChainA and apiChainB properly typed augmented. If I generate both into different folders and import them I get a mixture of both maybe even breaking the api?
Bug report
Feature request
Support request
Other
What is the current behavior and expected behavior?
Using polkadot-types-from-defs & polkadot-types-from-chain to generate type augmentations with metadata for ChainA and ChainB.
ChainA only has a Balances Pallet, ChainB only has a Identity pallet.
import"./interfaces/chainA/augment-api.ts"import"./interfaces/chainA/augment-types.ts"import"./interfaces/chainB/augment-api.ts"import"./interfaces/chainB/augment-types.ts"constapiChainA=newApiPromise({provider:newWsProvider("wss://chainA")})constapiChainB=newApiPromise({provider:newWsProvider("wss://chainB")})// apiChainA and apiChainB both would have `api.tx.balances` and `api.tx.identity`
Please tell us about your environment:
Version: 10.11.2
Node.js
Browser
Other (limited support for other environments)
Language:
JavaScript
TypeScript (include tsc --version)
Other
The text was updated successfully, but these errors were encountered:
TarikGul
added
the
Support
Tracks issues or requests related to troubleshooting, answering questions, and user assistance.
label
Mar 4, 2024
I was able to augment my API following the docs here and using the new input from this PR polkadot-js/docs#445.
However, I'm struggeling how to get it to work if I want to work with multiple chains in a single project. So I want to have
apiChainA
andapiChainB
properly typed augmented. If I generate both into different folders and import them I get a mixture of both maybe even breaking the api?Using
polkadot-types-from-defs
&polkadot-types-from-chain
to generate type augmentations with metadata forChainA
andChainB
.ChainA only has a
Balances
Pallet,ChainB
only has aIdentity
pallet.Version: 10.11.2
Language:
The text was updated successfully, but these errors were encountered: