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 capsule to aa-signers #305

Merged
merged 9 commits into from
Dec 12, 2023

Conversation

avasisht23
Copy link
Contributor

@avasisht23 avasisht23 commented Dec 5, 2023

Pull Request Checklist


PR-Codex overview

This PR adds the CapsuleSigner to the aa-signers package. Notable changes include:

  • Exporting CapsuleSigner and related types from packages/signers/src/capsule/index.ts
  • Adding documentation for the getAddress, signMessage, getAuthDetails, and authenticate methods of CapsuleSigner
  • Updating the createCapsuleSigner function in site/snippets/capsule.ts to include authentication

The following files were skipped due to too many changes: site/packages/aa-signers/capsule/signTypedData.md, packages/signers/src/capsule/signer.ts, site/packages/aa-signers/capsule/introduction.md, packages/signers/src/capsule/__tests__/signer.test.ts, site/packages/aa-signers/capsule/constructor.md, yarn.lock

✨ Ask PR-Codex anything about this PR by commenting with /codex {your question}

@avasisht23
Copy link
Contributor Author

@avasisht23 avasisht23 force-pushed the 12-04-feat_add_capsule_to_aa-signers branch from 5215c45 to 805c410 Compare December 5, 2023 06:02
import type { Environment } from "@usecapsule/web-sdk";
import type { WalletClientConfig } from "viem";

// copied since Capsule doesn't export this type
Copy link
Contributor Author

Choose a reason for hiding this comment

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

@nityas is there a way for Capsule to export these types from the capsule sdk so we don't have to re-write them here?

Copy link
Collaborator

Choose a reason for hiding this comment

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

you could do something like Params<typeof Capsule.prototype.constructor> or w/e class you need the constructor params of

Choose a reason for hiding this comment

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

I'll export these types in the new version as well

moldy530
moldy530 previously approved these changes Dec 5, 2023
Copy link
Collaborator

@moldy530 moldy530 left a comment

Choose a reason for hiding this comment

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

LGTM weird about those type issues though :/

@avasisht23 avasisht23 force-pushed the 12-04-feat_add_particle_to_aa-signers branch from a540b82 to cb6ddd1 Compare December 7, 2023 22:18
@avasisht23 avasisht23 force-pushed the 12-04-feat_add_capsule_to_aa-signers branch from 805c410 to 42bbb8d Compare December 7, 2023 22:18
@avasisht23 avasisht23 force-pushed the 12-04-feat_add_particle_to_aa-signers branch from cb6ddd1 to d6c462d Compare December 11, 2023 18:31
@avasisht23 avasisht23 force-pushed the 12-04-feat_add_capsule_to_aa-signers branch from 42bbb8d to fa6d3f6 Compare December 11, 2023 18:31
import type { Environment } from "@usecapsule/web-sdk";
import type { WalletClientConfig } from "viem";

// copied since Capsule doesn't export this type

Choose a reason for hiding this comment

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

I'll export these types in the new version as well

site/packages/aa-signers/capsule/constructor.md Outdated Show resolved Hide resolved
site/packages/aa-signers/capsule/introduction.md Outdated Show resolved Hide resolved
@avasisht23 avasisht23 force-pushed the 12-04-feat_add_particle_to_aa-signers branch from d6c462d to cc37ab8 Compare December 11, 2023 19:54
@avasisht23 avasisht23 force-pushed the 12-04-feat_add_capsule_to_aa-signers branch from fa6d3f6 to c0a9808 Compare December 11, 2023 19:54
@avasisht23 avasisht23 force-pushed the 12-04-feat_add_particle_to_aa-signers branch from cc37ab8 to 194682e Compare December 11, 2023 20:05
@avasisht23 avasisht23 force-pushed the 12-04-feat_add_capsule_to_aa-signers branch 2 times, most recently from 3697353 to a0a3668 Compare December 11, 2023 20:13
Base automatically changed from 12-04-feat_add_particle_to_aa-signers to main December 11, 2023 20:35
@avasisht23 avasisht23 dismissed moldy530’s stale review December 11, 2023 20:35

The base branch was changed.

@avasisht23 avasisht23 force-pushed the 12-04-feat_add_capsule_to_aa-signers branch from a0a3668 to f53c7f2 Compare December 11, 2023 20:38
Copy link

@nsquare3 nsquare3 left a comment

Choose a reason for hiding this comment

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

Just 2 comments. The main one is about authenticating a user

packages/signers/src/capsule/signer.ts Show resolved Hide resolved
site/snippets/capsule.ts Outdated Show resolved Hide resolved
@avasisht23 avasisht23 force-pushed the 12-04-feat_add_capsule_to_aa-signers branch from 0e7efcc to 33b1cb5 Compare December 12, 2023 00:58
Copy link

@nsquare3 nsquare3 left a comment

Choose a reason for hiding this comment

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

approved

@avasisht23 avasisht23 merged commit 9d89e99 into main Dec 12, 2023
2 checks passed
@avasisht23 avasisht23 deleted the 12-04-feat_add_capsule_to_aa-signers branch December 12, 2023 17:15
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