Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[feat] Add simulation for zkid public key #269

Merged
merged 1 commit into from
Jan 26, 2024

Conversation

GhostWalker562
Copy link
Contributor

Description

Transaction simulations would fail whenever used with the zkid public key. It defaults to AccountAuthenticatorEd25519 when it should be defaulting to AccountAuthenticatorSingleKey

Test Plan

Tested in the example, zkid.ts

const alice = await aptos.deriveAccountFromJWTAndEphemAccount({
    jwt: jwtToken,
    ephemeralAccount: aliceEphem,
    pepper,
  });

 const txn = await aptos.transaction.build.simple({
    sender: alice.accountAddress,
    data: {
      function: "0x1::coin::transfer",
      typeArguments: [APTOS_COIN],
      functionArguments: [bob.accountAddress, TRANSFER_AMOUNT],
    },
  });

  aptos.transaction.simulate.simple({
    signerPublicKey: alice.publicKey,
    transaction: txn
  })

Related Links

@heliuchuan heliuchuan merged commit 5a4a26d into fix-broken-tests Jan 26, 2024
3 of 5 checks passed
@heliuchuan heliuchuan deleted the philip/add-zkid-to-simulation branch January 26, 2024 10:30
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.

3 participants