diff --git a/README.md b/README.md index 4cbcbd41..0ff12216 100644 --- a/README.md +++ b/README.md @@ -157,10 +157,11 @@ Use the following steps to determine the fee and pass it to the signed call. \RegisterFioAddress -# FIO Private/Public Keys? -The SDK provides calls to generate FIO Private/Public Key pairs. +# FIO Public Keys +The SDK provides calls to generate FIO Public Key. ## Generating FIO Keys +Private key generation in the SDK is available for testing purposes only. Do not generate private keys for production application using these methods. Instead pass securely generated private keys or seed phrase to the SDK constructor. The user's FIO private/public key can be generated by calling these methods on the sdk: createPrivateKeyMnemonic OR createPrivateKey @@ -188,6 +189,7 @@ The user's FIO private/public key can be generated by calling these methods on t console.log(mnemonic) console.log("") + // Private key generation in the SDK is available for testing purposes only. Do not generate private keys for production application using these methods. Instead pass securely generated private keys or seed phrase to the SDK constructor. const privateKeyRes = await fio.FIOSDK.createPrivateKeyMnemonic(mnemonic) console.log("private key generated:") console.log((privateKeyRes.fioKey)) diff --git a/examples/GenerateFioKeys/index.js b/examples/GenerateFioKeys/index.js index 55bf526f..1aef380b 100644 --- a/examples/GenerateFioKeys/index.js +++ b/examples/GenerateFioKeys/index.js @@ -8,6 +8,7 @@ async function genKeysFromMnemonic () { console.log(mnemonic) console.log("") + // Private key generation in the SDK is available for testing purposes only. Do not generate private keys for production application using these methods. Instead pass securely generated private keys or seed phrase to the SDK constructor. const privateKeyRes = await fio.FIOSDK.createPrivateKeyMnemonic(mnemonic) console.log("Private key generated:") console.log((privateKeyRes.fioKey)) diff --git a/src/FIOSDK.ts b/src/FIOSDK.ts index fb306cf9..8ceb56fa 100644 --- a/src/FIOSDK.ts +++ b/src/FIOSDK.ts @@ -146,6 +146,10 @@ export class FIOSDK { public static SUFUnit: number = 1000000000 /** + * Private key generation in the SDK is available for testing purposes only. + * Do not generate private keys for production application using this method. + * Instead pass securely generated private keys or seed phrase to the SDK constructor. + * * @ignore */ public static async createPrivateKey(entropy: Buffer): Promise { @@ -156,6 +160,9 @@ export class FIOSDK { /** * Create a FIO private key. + * Private key generation in the SDK is available for testing purposes only. + * Do not generate private keys for production application using this method. + * Instead pass securely generated private keys or seed phrase to the SDK constructor. * * @param mnemonic mnemonic used to generate a random unique private key. * @example real flame win provide layer trigger soda erode upset rate beef wrist fame design merit