1
API discussion / How to handle "public key announcement" correctly?
« on: January 22, 2015, 10:25:03 am »
Hi!
i would like to request a comment on the subject - How to handle "public key announcement" correctly?
I'm not new to NXT in general, but now slowly think about coding a bit which rises some questions. I would like to understand the handling around the public key announcement a bit better. I know why it is important to announce the public key to the network. Beside i think that this is an entry barrier for new users (but i don't want to start another discussion about this again) i would like to implement it as hassle free as possible for new accounts.
I have seen many web pages with just displaying a phrase like "if you have a new account enter your public key here" which will give the users 3 possibilities that i would like to handle from a coding point of view:
1. The easy one: a new user enters address and public key, tx goes trough, everybody happy! No question.
2. User does not enter the public key for a new account into the textbox. What will happen? Can the tx still go trough (as in the older days) with the account beeing less secured? Or is this tx not accepted by the network anymore?
I would do an API "getAccountPublicKey" query and only ask the user for a pubkey if not announced yet, is this the corrent procedure?
3. The user wants to be double sure and always enters the address & pubkey combination into the textbox, even if the pubkey has been anounced already. What will happen? Could it be just announced twice if the pubkey is the same? I think i would be better to query before annoucing it twice, right?
It seems as if it doesn't matter for the API if "RS-Addresses" or "old style account ID's" are used because of the flexible Account ID's support in the API. Are there plans to discontinue the "old style" support in the future?
I would like to follow a design guide to be future ready and within the standards. Hopefully you can help me a bit, especially for points 2. and 3.
Cheers!
i would like to request a comment on the subject - How to handle "public key announcement" correctly?
I'm not new to NXT in general, but now slowly think about coding a bit which rises some questions. I would like to understand the handling around the public key announcement a bit better. I know why it is important to announce the public key to the network. Beside i think that this is an entry barrier for new users (but i don't want to start another discussion about this again) i would like to implement it as hassle free as possible for new accounts.
I have seen many web pages with just displaying a phrase like "if you have a new account enter your public key here" which will give the users 3 possibilities that i would like to handle from a coding point of view:
1. The easy one: a new user enters address and public key, tx goes trough, everybody happy! No question.
2. User does not enter the public key for a new account into the textbox. What will happen? Can the tx still go trough (as in the older days) with the account beeing less secured? Or is this tx not accepted by the network anymore?
I would do an API "getAccountPublicKey" query and only ask the user for a pubkey if not announced yet, is this the corrent procedure?
3. The user wants to be double sure and always enters the address & pubkey combination into the textbox, even if the pubkey has been anounced already. What will happen? Could it be just announced twice if the pubkey is the same? I think i would be better to query before annoucing it twice, right?
It seems as if it doesn't matter for the API if "RS-Addresses" or "old style account ID's" are used because of the flexible Account ID's support in the API. Are there plans to discontinue the "old style" support in the future?
I would like to follow a design guide to be future ready and within the standards. Hopefully you can help me a bit, especially for points 2. and 3.
Cheers!