Questions tagged [polkadot-js]

Questions about the Polkadot-JS API used to interact with Substrate-based chains using JavaScript.

Filter by
Sorted by
Tagged with
0 votes
0 answers
8 views

Wallet Selector for Polkadot.js Apps UI

Are the maintainers of Polkadot.js Apps UI receptive to integrating with a wallet selector? Is there a reason why Polkadot.js Apps UI is not integrated with the Talisman Connect wallet selector?
Dan Forbes's user avatar
0 votes
0 answers
13 views

I gave an unnecessary approval, how to withdraw it using polkadot.js?

Good afternoon! Faced with the problem that I'm being stealing monthly deployments of MANTA tokens on the manta Atlantic network, I think that somewhere I gave an unnecessary approval, how to withdraw ...
Halo's user avatar
  • 1
0 votes
0 answers
22 views

How to create a same polkadot wallet from mnemonic like trustwallet using @polkadot/keyring?

I have to create a wallet of polkadot like trustwallet. I tried to create a wallet with "type: ed25519" but it also return different address. Here is the trust wallet configuration { &...
Divyang Khatri's user avatar
1 vote
0 answers
8 views

GOV1 referendum voting giving error on 0.1x voting balance

I was making a small service for calling the aye and nye and it is not working for 0.1x voting balance but working fine for every other option it is giving error propsExtrinsic.signAndSend is not a ...
Shubham Gupta's user avatar
0 votes
2 answers
19 views

Unable to connect to polkadot node running on wsl to polkadot js app

I am running polkadot-sdk on wsl I start the node: ./target/release/polkadot --dev and then when I try connecting it to polkadotjs app on browser in windows it doesn't connect It just says - "...
Rishi's user avatar
  • 1
0 votes
0 answers
10 views

How to transfer assets from parachain to relay chain

As I'm new to substrate and polkadot I don't know how to transfer assets from parachain to relay chain using xcm can anyone please help me to do this.
Preethi M's user avatar
0 votes
1 answer
28 views

How to create custom URL for my RPC node?

When I run node then I can access chain from polkadotjs/apps using 127.0.0.1:8845 (ws://127.0.0.1:8845 ) endpoints. But I want something like wss://paseo.api.integritee.network to be my endpoints. Can ...
Ganesh11's user avatar
  • 1,241
0 votes
0 answers
14 views

SCALE Encode Tx Bytes using Polkadt.js SDK

I'm using Polkadot.js API and I have some bytes that represent a call (similar to what you get from tx.method.toHex(), that don't have the encoding details embedded into it: 0x00071054657374 I found a ...
AlbertoV19's user avatar
0 votes
1 answer
31 views

I want to Send data to relaychain from parachain?

I want to send JSON or normal String Message from Parachain to relay chain but i new in the substrate and I am finding it difficult. I am using the Polkadot-sdk template for relaychain and substrate-...
manish singh's user avatar
0 votes
0 answers
26 views

Rpc methods not decorated

Goal I'm trying to decorate the rpc methods to be able to interact with api.tx. If anyone has faced this issue, what has helped you out? Issue I'm not able to access tx method inside of api, which I ...
Peter Kim's user avatar
0 votes
0 answers
31 views

Polkadot.js extension detected but "no accounts has been injected" message

I am using chrome browser (ver. 122.0.6261.129) with polkadot.js extension. Been able to access my account without issues for over 2.5 years to view my daily increases from staking polkadot. For ...
user5236's user avatar
0 votes
0 answers
15 views

Get lock details from convictionVoting (even after deleting votes)

How can we see the lock duration for Referenda (convictionVoting) if the votes are deleted? On Polkadot and Kusama, if you delete your Referenda Votes it's not possible to see the details of the ...
DerekC's user avatar
  • 1
0 votes
0 answers
9 views

Checking 'PermissionlessAll' Settings

How to check if a stash account set the claim permissions to PermissionlessAll?
coderdraw's user avatar
1 vote
0 answers
28 views

Facing problem in fetching all Preimages using rpc

At certain time, it shows this error.
Shiv Kumar ATR646's user avatar
0 votes
1 answer
38 views

i need to find a faster way to load/show all my assets on Polakdot testnet Westend

I use Polakdot.js library to show all of my assets on the Westend testnet in my dapp. It takes around 5 seconds to load/show all my assets. For now it seems to me that this library doesn't have the ...
Nikola Grujičić's user avatar
2 votes
1 answer
94 views

Facing issue in connecting polkadot UI with nodes running on gcp [updated]

I'm running 3 validator nodes on different vm instances on gcp but I'm not able to connect these node with the polkadot UI. Here are the commands which I'm using to run the nodes: ./target/release/...
Deepak Chaudhary's user avatar
0 votes
1 answer
39 views

transaction failed Error: createType(SignerPayload):: Struct: failed on assetId: Option<AssetId>:: Unable to construct number from multi-key object

Does anyone know how to solve this error? I am trying to pay transaction fees with sufficient tokens on Westend Asset Hub by passing an asset MultiLocation to the options in the signAndSend function. ...
jameshih's user avatar
1 vote
0 answers
45 views

How to decode contract storage returned data

How do i decode this Hex string to String. It is storage data returned from a contract, using Polkadot-JS. { Ok: { flags: [], data: '...
Woodfish's user avatar
  • 121
2 votes
1 answer
75 views

How do I get a Used Fee?

I see this answer and recognize that partialFee + tip = Used Fee. Estimated fee and Used fee But actually it is not. When I get the Extrinsic partialFee below, I get the Estimated Fee, not the Used ...
Koichi Tsujino's user avatar
0 votes
1 answer
24 views

move Astr EVM from Metamask to Polkadt.js

I have Astar(Astr) on as an EVM on Metamask and want to eventually take profit on some of it and move that portion to USDT. My plan is to swap it for DOT first on Polkadot.js wallet. The problem is ...
Sal's user avatar
  • 1
1 vote
1 answer
40 views

Property 'isError' does not exist on type 'Codec', when showing sudo events

I try to implement How do I get the Result of a Sudo event? in a function shown below. It's mostly an exact copy from the cookbook with some boilerplate. export const sudo = async ( api: ...
Zabuxx's user avatar
  • 125
1 vote
1 answer
50 views

How can i update polkadot js metadata from inside my app?

i need to check in my dapp when the metadata of my wallet is expired and show a popup telling the user that he needs to update his metadata by clicking an update button on that popup. i need to do ...
Nikola Grujičić's user avatar
2 votes
0 answers
34 views

how can we add external links on the proposal?

I have created a custom chain using Substrate version 0.9.36, and I've been using the governance module. When adding a proposal, there's a default column for external links set to "none." I ...
Gagandeep Dogra ATR594's user avatar
0 votes
1 answer
21 views

how to find bonded and free funds in a nomination pool account using Polkadot JS API?

how to find bonded and free funds in a nomination pool account using Polkadot JS API? from https://staking.polkadot.network/#/pools
muddlebee's user avatar
1 vote
2 answers
62 views

FATAL: Unable to initialize the API: disconnected from wss://1rpc.io/dot: 1006:: Abnormal Closure

I am trying to access my polkadot.js wallet, but keep recieving this messagge:FATAL: Unable to initialize the API: disconnected from wss://1rpc.io/dot: 1006:: Abnormal Closure I cannot connect wallet ...
Miguel's user avatar
  • 11
1 vote
1 answer
58 views

Getting NFT metadata in polkadotjs with typescript

I'm trying to call api.query.nfts.itemMetaDataOf<type>(collection_id, token_id); via typescript and polkadotjs. It's not clear which type I'm supposed to use for the response. At least I can't ...
Arjan van Eersel's user avatar
3 votes
1 answer
38 views

Subsrate Node Build error: cannot find macro `thread_local` in this scope

Whole error: error: cannot find macro `thread_local` in this scope --> /home/hardeep/.cargo/git/checkouts/substrate-7e08433d4c370a21/948fbd2/primitives/externalities/src/scope_limited.rs:22:1 ...
Gurtej Singh's user avatar
2 votes
1 answer
82 views

How to interact with EVM contracts using polkadotJS

Is there a tutorial explaining how to interact with EVM smart contracts using PolkadotJS?.
ChristianArg's user avatar
0 votes
1 answer
37 views

Staking with polkadot js api

I try to make a stake with polkadot js api. Here is my commands: const info = await api.tx.staking .bond(amount, {Controller: receiver}) .paymentInfo(sender); ...
Марина Онищенко's user avatar
1 vote
2 answers
52 views

How to retrieve stash account of a nomination pool creator?

How to retrieve stash account of a nomination pool creator? for e.g. below https://polkadot.subscan.io/nomination_pool/1?tab=member
muddlebee's user avatar
1 vote
2 answers
50 views

how to fetch list of all nomination pools using polkadot js API

fetch list of all nomination pools using polkadot js API. details like poolID, address etc
muddlebee's user avatar
0 votes
0 answers
19 views

setting default endpoint for `polkadot-js/apps` explorer

I'm running a polkadot-js/apps instance here with the following command: docker run -it --name polkadot-ui -e WS_URL=<NODE_URL> -p 80:80 jacogr/polkadot-js-apps:latest The web UI is being ...
steinerkelvin's user avatar
3 votes
0 answers
76 views

Polkadot JS API: Is is possible to define a custom runtime API?

Polkadot JS Api is aware of a lot of common runtime apis in the Substrate ecosystem. The docs contain a complete list of supported runtime apis. One that is missing is the PoW Difficulty API. Because ...
JoshOrndorff's user avatar
  • 1,181
1 vote
1 answer
79 views

How can you use Polkadot JS API to Create an XCM Reserve Transfer Assets? (XCM V2)

I am trying to create a reserve transfer assets call from a relay chain like Kusama to a Parachain. To do this, I need to: connect to the relay chain with Polkadot JS API construct the XCM types ...
Shawn Tabrizi's user avatar
  • 16k
0 votes
0 answers
21 views

Is it secure enough use an Ed25519 expanded secret key which converted from a sr25519 key

I am developing a wallet using Rust and I want it to be compatible with polkadot-js import/export functionality. I know that polkadot-js uses the ed25519 extended mode for sr25519 private keys. So, I ...
Xu Neal's user avatar
0 votes
0 answers
158 views

Getting Mnemonic/Seed Phrase from JSON backups

I have a password-protected digital backup of an account using the JSON file from the Polkadot.JS extension. How do I get the mnemonic/seed phrase from this file so that I can back it up on paper? ...
phillux's user avatar
  • 11
0 votes
1 answer
34 views

What is the signing context chosen by PolkadotJS API?

In the verification of a schnorrkel sr25519 signature, there is a signing context which takes an arbitrary string/bytes. What is the signing context used in the PolkadotJS Extension? Is it something ...
Drew Stone's user avatar
  • 1,194
1 vote
1 answer
95 views

jsonrpc method `payment_queryInfo` is being deprecated

I saw this polkadot API document: https://polkadot.js.org/docs/substrate/rpc/#payment and it mentioned that the payment_queryInfo is deprecated and should use api.call.transactionPaymentApi.queryInfo ...
johnhckuo's user avatar
  • 123
1 vote
0 answers
39 views

How To Find The Slash Index?

My question is: When there is a deferred slash waiting to be applied, how do you find the INDEX for that slash? The council can propose a motion to cancel the deferred slash. That form requires the ...
KathrynColleen's user avatar
0 votes
0 answers
13 views

Kusama 1.2 - How to associate stash accounts with host via RPC/JS/shell

This key previously worked with Kusama until the recent metadata update (with BEEFY key) const keys = await api.query.session.nextKeys(address.address); const keysHex = keys.toHex(); const result = ...
Matthias Hutter's user avatar
0 votes
1 answer
49 views

How to parse a raw signature from PolkadotJS in Substrate runtime

The Polkadot claims pallet verifies and extracts an ethereum address from an EcdsaSignature. Is there a similar implementation for doing this with an Sr25519Signature signed by a wallet using ...
Drew Stone's user avatar
  • 1,194
0 votes
1 answer
45 views

Limit and Offset for for storage entries and keys

Following the docs for polkadot js storage we are getting entries and keys from the chain. Is there a way to use limit and offset to implement paging. Any ideas?
donkeydonkey's user avatar
2 votes
1 answer
59 views

when will `‘Balances::transfer' will be removed` take into effect on main-net?

In this link Balances::transfer will be removed it say 'transfer' is deprecated. I have experienced this change on test-net and fixed my Dapp after got failure report. But when does it take into ...
breeze wang's user avatar
2 votes
1 answer
52 views

How to Calculate the Total Tokens Rewarded to a Nominator?

I'm trying to figure out how to accurately determine the total amount of token rewards received by a nominator in the network. Specifically, I'm interested in the following: The Total Rewards in ...
Pavan Soratur's user avatar
1 vote
1 answer
62 views

Generated Types Not Found

Hi we are following along with the typegen docs on polkadotjs documentation. and the generated code cannot find most the types. an example line: Called: AugmentedEvent<ApiType, [caller: ...
donkeydonkey's user avatar
1 vote
1 answer
19 views

Extrinsic with BalanceOf<T> and UI

Many Substrate pallets extrinsics take a Balance type, for example balances->transfer or bounties->create. The Polkadot/substrate Development UI somehow detects that it is a Token related field ...
rvalle's user avatar
  • 45
1 vote
1 answer
51 views

Decoupled composition, signing, and publishing with @polkadot/api [duplicate]

I'm building an application whose architecture decouples transaction composition, signing, and publishing. These processes literally live in separate components that communicate with each other, but ...
Franco Mangone Sanmartín's user avatar
2 votes
1 answer
56 views

Is `createType` safe to use in polkadot-js/api

In this comment of pjs github, it says that we should never do the following: const something = api.createType('SomeType', { foo: 'bar' }); ... await api.tx.somewhere.something(something); ... and ...
Tarik Gul's user avatar
  • 1,106
1 vote
1 answer
237 views

TypeError: api.tx.balances.transfer is not a function substrate contracts node

api.tx.balances.transfer was working perfectly some time ago. I tried to re-run my testcase today and I'm getting this error. const rawTX = api.tx.balances.transfer(alice.address, 30) ...
Anmol Bansal's user avatar
0 votes
0 answers
27 views

Use Keyring at a custom component

I'm trying to add a custom component to a fork of polkadot apps: https://github.com/polkadot-js/apps The component looks like: import type { KeyringPair } from '@polkadot/keyring/types'; import { ...
Denis Reshetov's user avatar

1
2 3 4 5
12