Skip to content

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

Open
wants to merge 63 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
63 commits
Select commit Hold shift + click to select a range
bb94ee2
feat!: define completely fresh abstractions of `Signer`, `Account` an…
denbite Mar 23, 2025
6c30b9c
wip: deciding on interface
Mar 25, 2025
7517230
chore: remove of sandbox code
denbite Apr 3, 2025
3af9c18
feat: introduce KeyPairSigner & update `Account` to use Signer directly
denbite Apr 3, 2025
7903ff7
test: update tests to align with changes in Account and Signer
denbite Apr 5, 2025
149c985
fix: update minor things to pass tests
denbite Apr 5, 2025
0263973
chore: update naming of a few Account methods
denbite Apr 5, 2025
7fd68a3
feat: fill in Provider with all RPC methods available out there
denbite Apr 7, 2025
4e36c23
feat: add new method to Account for creating top-level accounts
denbite Apr 7, 2025
be58a5f
fix: update `@near-js/client` and `cookbook` examples to align with r…
denbite Apr 9, 2025
a8e1046
chore: add changeset
denbite Apr 9, 2025
9360fc9
fix: export PublicAccount a part of `near-api-js`
denbite Apr 13, 2025
57d7257
fix: add getBalance to PublicAccount
denbite Apr 13, 2025
c6b8217
fix: for numeric parameters accept BigInt, number and string & for ke…
denbite Apr 13, 2025
609f735
chore: deprecate `Account.functionCall` method
denbite Apr 13, 2025
71bb858
fix: use high-level `Provider` methods inside of `PublicAccount` inst…
denbite Apr 15, 2025
bb32d25
ci: update lock file
denbite Apr 15, 2025
9982061
chore: update tests
denbite Apr 15, 2025
1b17e40
chore: minor update of a test
denbite Apr 15, 2025
ffddebd
feat: implement signNep413Message for KeyPairSigner
denbite Apr 16, 2025
95c3860
fix: update exports in package.json to resolve importing issues
denbite Apr 17, 2025
02d0cfb
fix: add `peerDependencies` to each workspace package
denbite Apr 21, 2025
bad4cf6
fix: update changeset config to have shared version across `@near-js/…
denbite Apr 21, 2025
03f390b
feat: add `getNetworkId` method to Provider
denbite Apr 21, 2025
26cc3ab
fix: update parameters of signNep413Message
denbite Apr 21, 2025
66adead
feat: impl new methods signMetaTransaction and signMessage for Account
denbite Apr 21, 2025
e46c7d4
fix: export SignedMessage from `@near-js/signers`
denbite Apr 21, 2025
978e409
test: add tests for KeyPairSigner
denbite Apr 21, 2025
c12ad01
fix: move back read-only methods from PublicAccount to Account
denbite Apr 22, 2025
63e6a6f
fix: remove deprecated jsvm
denbite Apr 22, 2025
3d836d8
style: fix linting errors
denbite Apr 22, 2025
3130998
Merge branch 'master' into major_api_improvements
denbite Apr 22, 2025
674b558
feat: change account interface and remove unnecesary accounts
Apr 28, 2025
7fbf285
feat: add new package `@near-js/tokens` with pre-defined Native and F…
denbite Apr 28, 2025
3f4f02c
fix: fix minor bugs in Account
denbite Apr 29, 2025
95a7ae9
Merge branch 'major_api_improvements' into proposal-for-v6
denbite Apr 29, 2025
d66f2d5
chore: update lockfile
denbite Apr 30, 2025
96ea10f
feat: implement `Provider.viewAccountBalance` method
denbite Apr 30, 2025
089a050
fix: allow public key to be passed over as string or `PublicKey`
denbite Apr 30, 2025
ee95826
Merge pull request #1524 from near/proposal-for-v6
denbite Apr 30, 2025
0796f9d
fix: remove `transferNEAR` function because `transferToken` serves th…
denbite May 1, 2025
1d74764
fix: make deposit and gas parameters of `Account.callFunction` optional
denbite May 1, 2025
602c882
feat: introduce functions for register/unregister an account in FT an…
denbite May 1, 2025
7b4f5d1
Merge branch 'proposal-for-v6' into major_api_improvements
denbite May 1, 2025
d11bf8c
chore: update workspaces version
May 7, 2025
c5be238
chore: removed unexisting rpc method & rename method on account
May 7, 2025
6d2485f
chore: update pnpm lock
May 7, 2025
ec66397
fix: improved interface for getState
May 7, 2025
5cabd61
feat: add signAndSendTransactions to make interface compatible with WS
May 8, 2025
c3b32df
feat: refactor tokens package
May 8, 2025
af14041
fix: multiple small fixes
May 9, 2025
8bd734a
fix: lint
May 9, 2025
fd16a88
feat: changed provider.functioncall to return value
May 9, 2025
0db0e3d
fix: minor change
May 9, 2025
7d284c4
chore: remove unused native flag
May 13, 2025
289e3dd
Merge branch 'master' into major_api_improvements
gagdiez May 16, 2025
72fc357
fix: specify `optimistic` finality as default for RPC calls in tests …
denbite May 17, 2025
f8a611e
chore: deprecate `Connection`
denbite May 17, 2025
b633368
chore: remove `@near-js/utils` from dependencies of `@near-js/tokens`
denbite May 17, 2025
b91bacf
chore: update lockfile
denbite May 17, 2025
e625bc5
test: impl graceful shutdown for workspaces `Worker`
denbite May 17, 2025
d739c23
Merge branch 'major_api_improvements' of github.com:near/near-api-js …
denbite May 17, 2025
c349775
chore: reomove override from package.json
denbite May 17, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .changeset/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"$schema": "https://unpkg.com/@changesets/[email protected]/schema.json",
"changelog": ["@changesets/changelog-github", { "repo": "near/near-api-js" }],
"commit": false,
"fixed": [],
"fixed": [["@near-js/*"]],
"linked": [],
"access": "public",
"baseBranch": "master",
Expand Down
14 changes: 14 additions & 0 deletions .changeset/rotten-cases-dance.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
---
"@near-js/wallet-account": major
"@near-js/transactions": major
"near-api-js": major
"@near-js/providers": major
"@near-js/accounts": major
"@near-js/cookbook": major
"@near-js/signers": major
"@near-js/client": major
"@near-js/types": major
"@near-js/tokens": major
---

Major update for Signer and Account APIs to streamline development
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,6 @@
},
"resolutions": {
"near-sandbox": "0.0.18",
"near-api-js": "4.0.0"
"near-api-js": "workspace:*"
}
}
23 changes: 18 additions & 5 deletions packages/accounts/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,16 @@
"name": "@near-js/accounts",
"version": "1.4.1",
"description": "Classes encapsulating account-specific functionality",
"main": "lib/esm/index.js",
"type": "module",
"main": "lib/commonjs/index.cjs",
"module": "lib/esm/index.js",
"types": "./lib/esm/index.d.ts",
"scripts": {
"build": "pnpm compile:esm && pnpm compile:cjs",
"compile:esm": "tsc -p tsconfig.json",
"compile:cjs": "tsc -p tsconfig.cjs.json && cjsify ./lib/commonjs",
"lint": "eslint -c ../../.eslintrc.ts.yml src/**/*.ts test/**/*.ts --no-eslintrc",
"lint:fix": "eslint -c ../../.eslintrc.ts.yml src/**/*.ts test/**/*.ts --no-eslintrc --fix",
"test": "jest"
"test": "DEFAULT_FINALITY=optimistic jest"
},
"keywords": [],
"author": "",
Expand All @@ -22,6 +23,7 @@
"@near-js/transactions": "workspace:*",
"@near-js/types": "workspace:*",
"@near-js/utils": "workspace:*",
"@near-js/tokens": "workspace:*",
"@noble/hashes": "1.7.1",
"borsh": "1.0.0",
"depd": "2.0.0",
Expand All @@ -33,22 +35,33 @@
"@jest/globals": "^29.7.0",
"@near-js/keystores": "workspace:*",
"@scure/base": "^1.2.4",
"@types/depd": "^1.1.37",
"@types/json-schema": "^7.0.15",
"@types/node": "20.0.0",
"build": "workspace:*",
"jest": "29.7.0",
"near-hello": "0.5.1",
"near-workspaces": "4.0.0",
"near-workspaces": "5.0.0",
"semver": "7.7.1",
"ts-jest": "29.2.6",
"tsconfig": "workspace:*",
"typescript": "5.4.5"
},
"peerDependencies": {
"@near-js/crypto": "^2.0.0",
"@near-js/providers": "^2.0.0",
"@near-js/signers": "^2.0.0",
"@near-js/transactions": "^2.0.0",
"@near-js/types": "^2.0.0",
"@near-js/utils": "^2.0.0"
},
"files": [
"lib"
],
"exports": {
"require": "./lib/commonjs/index.cjs",
"import": "./lib/esm/index.js"
"import": "./lib/commonjs/index.cjs",
"types": "./lib/esm/index.d.ts",
"default": "./lib/esm/index.js"
}
}
Loading
Loading