-
Notifications
You must be signed in to change notification settings - Fork 251
Major update for Signer
and Account
APIs
#1513
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
base: master
Are you sure you want to change the base?
Conversation
🦋 Changeset detectedLatest commit: ffddebd The changes in this PR will be included in the next version bump. This PR includes changesets to release 15 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
networkId: string, | ||
provider: Provider, | ||
signer: Signer, | ||
jsvmAccountId: string |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we can remove the jsvmAccountId
from everywhere, as the jsvm
is no longer relevant
const data = fs.readFileSync(HELLO_WASM_PATH); | ||
await nearjs.accountCreator.masterAccount.createAndDeployContract(contractId, newPublicKey, data, HELLO_WASM_BALANCE); | ||
// @ts-expect-error test input | ||
contract = new Contract(nearjs.accountCreator.masterAccount, contractId, { | ||
contract = new Contract(nearjs.connection, contractId, { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why does contract take a nearjs.connection
?
…ys - PublicKey and string
…ead of low-level `query`
Pre-flight checklist
pnpm changeset
to create achangeset
JSON document appropriate for this change.Motivation
This PR brings a major update to the near-api-js library, introducing a more streamlined and developer-friendly interface. The core of this update is a new abstraction of Signer, which has been redesigned to focus solely on signing. It no longer requires knowledge of the broader account or network context, allowing for cleaner separation of concerns and easier integration across different environments.
Key Changes
TBD
Example Usage
I’ve opened a companion PR in the
near-api-examples
repo that demonstrates the new API in actionnear-examples/near-api-examples#6