diff --git a/web3.js/src/publickey.ts b/web3.js/src/publickey.ts index 38d72bbc1d..3f1b1857e0 100644 --- a/web3.js/src/publickey.ts +++ b/web3.js/src/publickey.ts @@ -111,6 +111,8 @@ export class PublicKey extends Struct { /** * Derive a public key from another key, a seed, and a program ID. + * The program ID will also serve as the owner of the public key, giving + * it permission to write data to the account. */ static async createWithSeed( fromPublicKey: PublicKey, diff --git a/web3.js/src/system-program.ts b/web3.js/src/system-program.ts index 391e3205bc..e1bf34a151 100644 --- a/web3.js/src/system-program.ts +++ b/web3.js/src/system-program.ts @@ -52,11 +52,11 @@ export type AssignParams = { export type CreateAccountWithSeedParams = { /** The account that will transfer lamports to the created account */ fromPubkey: PublicKey; - /** Public key of the created account */ + /** Public key of the created account. Must be pre-calculated with PublicKey.createWithSeed() */ newAccountPubkey: PublicKey; - /** Base public key to use to derive the address of the created account */ + /** Base public key to use to derive the address of the created account. Must be the same as the base key used to create `newAccountPubkey` */ basePubkey: PublicKey; - /** Seed to use to derive the address of the created account */ + /** Seed to use to derive the address of the created account. Must be the same as the seed used to create `newAccountPubkey` */ seed: string; /** Amount of lamports to transfer to the created account */ lamports: number;