How to create a wallet address using the node sdk

Hi concordium team
I am exploring the concordium docs and didn’t find any function to create the wallet address.
I am running a concordium mainent node in the hetzner server

https://dashboard.mainnet.concordium.software/node/50340b1d52c05c10

https://github1s.com/Concordium/concordium-node-sdk-js/blob/main/examples/client/getNodeInfo.ts

I need to add the CCD in my Exchange
please help me on this ?

Hello Swatantra15

You need to create an ID and an account with our mobile wallet or browser wallet. Once you’ve done that, you can export your keys and proceed with the Node SDK.

How to export an account key:
https://developer.concordium.software/en/mainnet/net/guides/export-key.html

Then, how can create an “AccountSigner” to sign transactions:

Let me know if that helps.

Regards,
Concordium Tech Support

Hi Zoltan
Thanks for your response
I had done the steps like creating and exporting the wallet file from the concordium mobile wallet.
and also the function is the signMessage function is running giving this output

{
  '0': {
    '0': 'e92782b4824f7edc235ff154c52d7b0beffca7cfeb28c89631b431c183bef2f642fe28195b6b484c595ca78f572448c680780f857990af757d1e28d0d9430e02'
  }
}

but I am not getting how the exactly wallet is creating ??
can you give me the highlight on this?

Thanks & Regards
Swatantra

Hello,

Thank you for your response. It seems there might have been some confusion in my previous message. If you’ve already created a wallet and an account in the mobile app, there’s no need to create another one.

Did you mean something else?

Best regards, Zoltán

Yeah that’s correct
but I need to create a user account from the Concordium node SDK for my exchange.
I need to create the Concordium wallet using the Corcordium nodejs SDK not from the already build Concordium wallet.

I am trying this document but it is requiring the a lot of thing

I am not sure where I can get all these things
like ```

identityObject
seedAsHex
ipInfo
const inputs = {
            ipInfo,
            globalContext: cryptographicParameters,
            arsInfos,
            idObject: identityObject,
            revealedAttributes,
            seedAsHex,
            net,
            identityIndex,
            credNumber,
    }

I need to do the wallet operations like
such as sending CCD (Concordium’s native cryptocurrency), checking balances, and managing keys.
Transaction Handling:
Create, sign, and send transactions to the Concordium blockchain using the SDK. Ensure proper error handling and transaction broadcasting.

Hi @Zoltan
can you give the highlight on this?

Thanks & regards
Swatantra

Do you have a company identity?

The identity object is something you get from the identity provider. Currently the only practical way to get that in the format required is to do company identity issuance.

thanks @abizjak
No, I don’t have any company identity, I don’t know where I can create that.
I had only created the concordium mobile wallet and then verified my identity as a user.

Thanks & regards
Swatantra

You can only create accounts from identities.

If you have created the identity in your wallet you can export individual keys from it and use those.

In contrast to many other chains on Concordium you cannot freely create addresses. Each account has to be derived from an identity.

However Concordium does support the notion of account aliases. These are simply different addresses for the same account. Each account can have 2^24 aliases.

maybe if you explain your use-case we can provide better assistance.

okh,
I am using this code to generate the private and public key but i am not getting the address.

const createWallet = async () => {
    try {
        const prv = ed25519.utils.randomPrivateKey();
        const privateKey = Buffer.from(prv).toString('hex')
        const publicKey = Buffer.from(await ed25519.getPublicKey(prv)).toString('hex');
        
        console.log(publicKey)
        const res = new AccountAddress(publicKey);
        console.log('res=>',res)
    } catch (error) {
        console.log(error.message);
    }
}

this code is giving me this error
394ed483c967b5841f987e1be75d1768eafcf635eb908a5b655a6effd5411db1
The provided address 394ed483c967b5841f987e1be75d1768eafcf635eb908a5b655a6effd5411db1 is invalid as its length was not 50

Hello Swanti

You can request a Testnet company ID for test purposes. You can find a procedure in our documentation:

https://developer.concordium.software/en/mainnet/net/guides/company-identities.html?highlight=company%20testnet