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

Relayer: Introduce Relayer.GenerateAAT #98

Merged
merged 1 commit into from
Mar 11, 2024

Conversation

msmania
Copy link
Contributor

@msmania msmania commented Feb 10, 2024

This patch introduces a method to generate an AAT. Here's an example to generate an AAT from the private key of a staked app, which can be passed to Relayer.relay for example.

const AppSigner = await KeyManager.fromPrivateKey(process.env.APP_PRIVATE_KEY);
const ClientSigner = await KeyManager.createRandom();
const AAT = await Relayer.GenerateAAT(AppSigner, ClientSigner.publicKey);

@msmania msmania self-assigned this Feb 12, 2024
@msmania msmania added the enhancement New feature or request label Feb 12, 2024
@msmania msmania requested a review from kutoft February 12, 2024 22:28
Copy link
Contributor

@kutoft kutoft left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code looks good. Your comment seems worth adding to the READ.ME though.

This patch introduces a method to generate an AAT.  Here's an example to
generate an AAT from the private key of a staked app.

```js
const AppSigner = await
KeyManager.fromPrivateKey(process.env.APP_PRIVATE_KEY);
const ClientSigner = await KeyManager.createRandom();
const AAT = await Relayer.GenerateAAT(AppSigner,
ClientSigner.publicKey);
```
@msmania msmania force-pushed the toshi/relayer-generate-aat branch from c27f64a to 0df3620 Compare February 16, 2024 22:02
@msmania msmania requested a review from kutoft February 16, 2024 22:03
@msmania msmania requested review from Olshansk and nodiesBlade and removed request for kutoft March 6, 2024 21:11
@msmania msmania merged commit 742bb0d into pokt-network:main Mar 11, 2024
4 checks passed
@msmania msmania deleted the toshi/relayer-generate-aat branch March 11, 2024 03:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Status: In Progress
Development

Successfully merging this pull request may close these issues.

3 participants