ChainSafe / metamask-snap-polkadot

Metamask plugin for interacting with Polkadot dapps and other Substrate based chains.
Apache License 2.0
84 stars 61 forks source link

Working with substrate nodes #224

Open aditya9729 opened 8 months ago

aditya9729 commented 8 months ago

I wanted to understand if you support substrate nodes. Is it that I have to provide ws rpc url in snapconfig, in that case what would be the snap network here? Any help there?

The snippet below is from: https://github.com/chainsafe/metamask-snap-polkadot/tree/master/packages/adapter

Enabling API you folks have: function enablePolkadotSnap( config?: SnapConfig, snapOrigin?: string, snapInstallationParams?: Record<SnapInstallationParamNames, unknown> = {} ): Promise

Configuration document:

SnapConfig { networkName: SnapNetworks; wsRpcUrl?: string; addressPrefix?: number; unit?: UnitConfiguration; }

SnapNetworks = "polkadot" | "kusama" | "westend";

UnitConfiguration { symbol: string; decimals: number; image?: string; customViewUrl?: string; }

irubido commented 6 months ago

Hi @aditya9729

with new version you can now override with custom configuration. https://github.com/ChainSafe/metamask-snap-polkadot/issues/230#issuecomment-2082696506