Skip to content

Conversation

@fedorerd
Copy link
Contributor

Hey, I just thought it makes sense to also provide createWithSeed action in ts client

Usage:

await createRecordWithSeed({
    rpc, payer, dataLength, authority, programId,
    // seed could be either string or readonly uint8array
    seed: "seed",
    // base account is optional signer from which seed is derived (default to payer)
    baseAccount
});

Returns

interface CreateRecordWithSeedResult {
  // address instead of keypair
  recordAccount: Address;
  ixs: Instruction[];
}

I also added 3 tests for that which just check creation happens as expected

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant