Closed buffalojoec closed 4 months ago
Hey, I set up query to fetch a transaction. How do I get a list of all signatures in the wallet to display list of transactions present in wallet?
Hey, I set up query to fetch a transaction. How do I get a list of all signatures in the wallet to display list of transactions present in wallet?
You can use the RPC's getSignaturesForAddress
method, but we'll need to populate a few mock transactions for now using that script I've initialized. Maybe some simple transfers or token creations via CLI.
Hey, I set up query to fetch a transaction. How do I get a list of all signatures in the wallet to display list of transactions present in wallet?
You can use the RPC's
getSignaturesForAddress
method, but we'll need to populate a few mock transactions for now using that script I've initialized. Maybe some simple transfers or token creations via CLI.
I'll create a rest api and pass address to server, the server queries and returns the signatures to react application. Should I use the addresses in Account.tsx
file to create transactions?
I'll create a rest api and pass address, the server queries and returns the signatures to react application.
I've got a server going already in server.ts
so you can add the endpoint there.
Should I use the addresses in
Account.tsx
file to create simple transfers?
We can probably just generate one or two keypairs with the CLI and send transfers to them. For now, I think we can use the local keypair (fee payer) as the wallet address, and later we can figure out how to add a user's actual address.
Creating tokens and token accounts will create the accounts on-chain automatically.
This can all be scripted into scripts/generate-transactions.sh
.
0] SolanaError: Solana error #-32602; Decode this error by running `npx @solana/errors decode -- -32602 'X19zZXJ2ZXJNZXNzYWdlPUludmFsaWQlMjBwYXJhbSUzQSUyMEludmFsaWQ='`
[0] at Object.send (/Users/pc/my/code/openSource/graphql-wallet/node_modules/@solana/rpc-spec/src/rpc.ts:79:13)
[0] at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
[0] at loadTransaction (/Users/pc/my/code/openSource/graphql-wallet/node_modules/@solana/rpc-graphql/src/loaders/program-accounts.ts:98:1)
[0] at <anonymous> (/Users/pc/my/code/openSource/graphql-wallet/node_modules/@solana/rpc-graphql/src/loaders/transaction.ts:56:14) {
[0] context: { __code: -32602, __serverMessage: 'Invalid param: Invalid' }
I fetched signatures for corresponding account. However while querying the corresponding transaction, I get the above error.
I'd like for there to be three pages to this app:
Accounts
: A list of all accounts that belong to some wallet.program
).Transactions
: A list of all transactions done by the wallet.Explorer
: A very small and lightweight block explorer. Given an address, signature, or slot, allow users to query on-chain data.