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

@near-js/client package #1351

Closed
wants to merge 3 commits into from
Closed

@near-js/client package #1351

wants to merge 3 commits into from

Conversation

andy-haynes
Copy link
Collaborator

@andy-haynes andy-haynes commented Jun 5, 2024

readme

This PR contains an outline for a proposed implementation for an API providing high-level methods for interacting with NAJ objects. The ultimate goal is to provide simple methods which map directly to clear behavior (examples). These methods in turn can be easily wrapped by frontend libraries to tie the behavior to application lifecycle.

The implementation is backed primarily by a NearClient class to reduce the number of required dependencies and provide an intuitive API for common operations. Client instances are easily configured for viewing and/or signing and provide helpful methods with clear, succinct parameters. This would also be exported from the package to aid in more complex use cases.

This is very much a WIP and contains some duplicated code (in particular some tightly coupled logic in accounts and transactions), but is still useful as a proof of concept for a simple composition layer over @near-js packages. It can easily be supplemented with a caching strategy and extended for use in frontend frameworks (i.e. hooks).

cc @mpeterdev @thisisjoshford

Copy link

changeset-bot bot commented Jun 5, 2024

⚠️ No Changeset found

Latest commit: 1c296d1

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

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