Code Monkey home page Code Monkey logo

Comments (8)

dr497 avatar dr497 commented on August 23, 2024

Thanks for opening this issue. I think there is an error with the parameters you give to transferNameOwnership. Here is the definition of the function:

/**
 * Change the owner of a given name account.
 *
 * @param connection The solana connection object to the RPC node
 * @param name The name of the name account
 * @param newOwner The new owner to be set
 * @param curentNameOwner the current name Owner
 * @param nameClass The class of this name, if it exsists
 * @param nameParent The parent name of this name, if it exists
 * @param parentOwner Parent name owner
 * @returns
 */
export declare function transferNameOwnership(connection: Connection, name: string, newOwner: PublicKey, nameClass?: PublicKey, nameParent?: PublicKey, parentOwner?: PublicKey): Promise<TransactionInstruction>;

wallet.publicKey is not the nameClass of the domain

from sns-sdk.

cryptoguy55 avatar cryptoguy55 commented on August 23, 2024

I set the wallet.publickey as curentNameOwner
I set the registry.class as nameClass

from sns-sdk.

dr497 avatar dr497 commented on August 23, 2024

There was an issue in the typedoc of the function, I think this is where the confusion was coming from 86243f4. Thanks for pointing this out!

In your code it should:

const ix = await transferNameOwnership(
  connection,
  domain_sol,
  newOwner,
  registry.class,
  registry.parentName
);

from sns-sdk.

cryptoguy55 avatar cryptoguy55 commented on August 23, 2024

Thank you. But I have same issue yet
image

from sns-sdk.

dr497 avatar dr497 commented on August 23, 2024

Is the domain you are trying to transfer a valid .sol domain name? Or is it a subdomain?

If it's a .sol try this:

const ix = await transferNameOwnership(
  connection,
  domain_sol,
  newOwner,
  undefined,
  ROOT_DOMAIN_ACCOUNT
);

If it's a subdomain a and wallet.publicKey owns the subdomain

const ix = await transferNameOwnership(
  connection,
  domain_sol,
  newOwner,
  undefined,
  parentKey
);

If it's a subdomain a and wallet.publicKey owns the parent but not the subdomain

const ix = await transferNameOwnership(
  connection,
  domain_sol,
  newOwner,
  undefined,
  parentKey,
  wallet.publicKey
);

The class is undefined for .sol domain so it should not be passed

from sns-sdk.

cryptoguy55 avatar cryptoguy55 commented on August 23, 2024

Hello.
I have the issue yet.
https://github.com/cryptoguy55/sns-registration/blob/master/index.js
It is my code.
below is issue I have now
Transaction {
signatures: [],
feePayer: PublicKey [PublicKey(FuG7ErYz8p6xKWbHepEy9t2bNK5J1u5Qe4EJDVhAJkF1)] {
_bn:
},
instructions: [
TransactionInstruction {
keys: [Array],
programId: [PublicKey [PublicKey(namesLPneVptA9Z5rqUDD9tMTWEJwofgaYwp8cawRkX)]],
data:
}
],
recentBlockhash: undefined,
lastValidBlockHeight: undefined,
nonceInfo: undefined,
minNonceContextSlot: undefined,
_message: undefined,
_json: undefined
}
Error: Signature verification failed
at Transaction.serialize (/home/centos/API-SOL/node_modules/@solana/web3.js/lib/index.cjs.js:1730:13)
at Connection.sendTransaction (/home/centos/API-SOL/node_modules/@solana/web3.js/lib/index.cjs.js:9101:41)
at processTicksAndRejections (node:internal/process/task_queues:96:5)
at async sendAndConfirmTransaction (/home/centos/API-SOL/node_modules/@solana/web3.js/lib/index.cjs.js:2042:21)
at async transferSOLDomain (/home/centos/API-SOL/index.js:106:20)
Please help me
Thank you

from sns-sdk.

dr497 avatar dr497 commented on August 23, 2024

If you look at the definition of the transfer instruction https://github.com/Bonfida/sns-sdk/blob/main/js/src/instructions.ts#L141 the only account that must be signing in your case is the owner of the domain. According to the error its signature is missing. So there is a mismatch between the domain you are passing, its owner and the signer of the transaction

from sns-sdk.

cryptoguy55 avatar cryptoguy55 commented on August 23, 2024

I solved the issues.
Thank you for your help

from sns-sdk.

Related Issues (13)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.