Questions tagged [publickey]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0 votes
1 answer
16 views

AttributeError: 'dict' object has no attribute 'encoding' when trying to pull transfers for a token

I'm working on a Python script to pull successful transfers from the mint address. When I call the script below this is the error: Traceback (most recent call last): File "/home/user/Documents/...
Robert909's user avatar
0 votes
1 answer
24 views

Issue Verifying Off-chain Signatures with ed25519_dalek and salty Libraries in Solana Program

I'm facing an issue when trying to verify off-chain signatures in my Solana program using the ed25519_dalek library. The same problem occurs with the salty library when attempting to convert a ...
Quoc Le's user avatar
  • 31
2 votes
1 answer
44 views

mismatched types solana_sdk::pubkey::Pubkey, found Pubkey

I am having trouble compiling my solana project.. I seem to have a clash of publicKey types which i presume are caused by the solana_program and solana_sdk pubkey. here is the error error[E0308]: ...
MHCH's user avatar
  • 45
0 votes
3 answers
110 views

How to import a wallet keypair generated from CLI into a wallet provider like phantom?

When generating the keypair via CLI I get a .json file in the byte format. I'm aware the first 32 decimal numbers are the private key, and the last 32 are the public key But how do I import this into ...
pxl's user avatar
  • 3
1 vote
0 answers
38 views

cant find address from derived accounts

const bip39 = require("bip39"); const { BIP32Factory } = require("bip32"); const ecc = require("tiny-secp256k1"); const { Keypair } = require("@solana/web3.js");...
pidor ads243's user avatar
0 votes
1 answer
41 views

Assuming confidential transactions, is the use of a different public key for each Solana transaction a reasonable way to achieve anonymity?

In the field of cryptocurrency design, there is a critical question of whether we can build, or have already built, a cryptocurrency that both (1) is highly efficient at scale (i.e., capable of ...
SapereAude's user avatar
1 vote
2 answers
442 views

Get account public key in an Anchor program

I got an Anchor program and there is some functions that I want to restrict their access in order to create some particular privileges in the program, so I want to grab the caller's account/address ...
OrHaifler's user avatar
1 vote
1 answer
64 views

Is there a easy way of deriving the pubkey of an Address Lookup Table?

Usually the flow is createLookupTable Use that lookup table immediately after whilst having access to the pubkey. But what if I want to prepare an ALT from early on and use that in the future? Are ...
Burger Bob's user avatar
  • 1,256
1 vote
1 answer
744 views

How to get public and secret key from keypair Solders

Sorry if this is a really basic question but I am new to this. I am using Solders for python to generate Solana wallets and transactions. https://kevinheavey.github.io/solders/api_reference/keypair....
Ryan Thomas's user avatar
0 votes
1 answer
117 views

How to convert _bn back to PublicKey in JS?

I have this dict in JS, I want to convert it to PublicKey. const account = { "_bn": { "negative": 0, "words": [ 37883239, ...
rudy rhatal's user avatar
6 votes
1 answer
656 views

Solana-keygen grind - public address cannot end with "I" (InvalidCharacter)

I'm using solana-keygen utility to grind for a public key with specific traits. Currently my input was as follows: solana-keygen grind --ends-with I:1 however, I get this error: error: Invalid value &...
Mára Toner's user avatar
4 votes
1 answer
582 views

How do off-curve public keys work?

I'm trying to retrieve an associated token address, and found this random vanity wallet while looking through solscan. From running the code below, here are the results. Expected token address: ...
Lifok's user avatar
  • 43
1 vote
1 answer
89 views

Pubkey of Token account?

Some API end points accept <string> - Pubkey of Token account to query, as base-58 encoded string as an account address. What's "Pubkey of Token account"? And how to get one ...
Kum's user avatar
  • 107
1 vote
1 answer
175 views

How to check for null / default values in Anchor Struct?

I have the following struct in my anchor program. pub struct CustomStruct { pub user: Pubkey, pub number: u64 } How would I go about checking for null values / default values for user and ...
AceGravity's user avatar
1 vote
0 answers
54 views

How to restore Solana public key from seed (Exodus version)?

I'm doing some research about crypto wallets and their methods to restore crypto addresses from seeds. I'm actually interested in Solana and I figured out that Phantom wallet and Exodus wallets ...
Hermes Code's user avatar
1 vote
0 answers
35 views

Deriving the public key

Is there a way to derive the public key from a combination of digital signature and message? So far I haven't seen any answers to this, I have seen solutions for bitcoin and ethereum
user10188255's user avatar
1 vote
0 answers
155 views

How can I convert public/extended public hdkey (hierarchical deterministic) into solana public key

I have a xpubkey (public/extended public key) generate from HD Key (hierarchical deterministic key) and I want to convert this key to Solana Public Key but no luck As my purpose, I want to secure my ...
Doan Thanh Ha's user avatar
1 vote
1 answer
44 views

Why aren't public keys allowed to contain certain alphanumeric characters?

This might seem petty, but I noticed that the following characters do not exist inside of public keys and are not allowed to be used when performing solana-keygen grind. I'm interested in what the ...
OCDev's user avatar
  • 712
2 votes
1 answer
99 views

How to reverse findProgramAddress

Is it possible to reverse PublicKey.findProgramAddress method? I.E. from an address find the seeds and the programId that were used for this address
Olivier.B's user avatar
1 vote
2 answers
98 views

How would one hash two different pubkeys inside an Anchor program?

I am trying to setup an account constraint as such: #[account( init, payer = creator, space = StateObj::space(), seeds = [ b"some-seed", user_partner0.key()....
TovarishFin's user avatar
4 votes
3 answers
102 views

How to get the domain name for a public key?

Using the Bonfida APIs, you can do a reverse lookup as follows: import { performReverseLookup } from "@bonfida/spl-name-service"; // Public key of bonfida.sol const domainKey = new ...
0xMertimus's user avatar