near-api-js 2.0.0
#1006 8ee564c0 Thanks @morgsmccauley! - Make Account.signAndSendTransaction public so transactions can be sent directly from Account instances; #1014 8feb1997 Thanks @esaminu! - Make appKeyPrefix a required arg to…
- A pre-release, not marked stable on GitHub.
- The newest stable release in the 2.0 line: near-api-js 2.0.4
- Newest near-api-js: near-api-js 7.4.0
Major Changes
#1006
8ee564c0Thanks @morgsmccauley! - MakeAccount.signAndSendTransactionpublicso transactions can be sent directly fromAccountinstances#1014
8feb1997Thanks @esaminu! - MakeappKeyPrefixa required arg toWalletConnectionconstructorUsers that were doing
new WalletConnection(near);will now have to do
new WalletConnection(near, "undefined");If they want to access the keys they had potentially accumulated
#935
c740afc8Thanks @hcho112! -account.viewFunctionnow takes a single object argument rather than individual args. Callsites will now need to be updated like so:-await account.viewFunction( - 'wrap.near', - 'storage_balance_of', - { account_id: 'example.near' } -); +await account.viewFunction({ + contractId: 'wrap.near', + methodName: 'storage_balance_of', + args: { account_id: 'example.near' }, +});#1056
b823ada7Thanks @andy-haynes! - Major functionality in near-api-js has now been broken up into packages under @near-jsBreaking changes:
KeyPairEd25519no longer supports thefromStringstatic method. This method is now only available on theKeyPairclass.
Minor Changes
Patch Changes
#1003
726b7953Thanks @marcinbodnar! - Fix error types. WIth this changes bothJsonRpcProvider.queryandJsonRpcProvider.sendJsonRpcmethods will return proper error type for these errors:AccountDoesNotExist,AccessKeyDoesNotExist,CodeDoesNotExist,InvalidNonce.An additional fix to
getErrorTypeFromErrorMessagefunction. NowgetErrorTypeFromErrorMessagewill not change error type if it already exists.