Skip to main content
If you are coming from near-api-js, you will find near-kit to be more concise and less prone to “unit arithmetic” errors.

Core Philosophy Shifts

No Account Object

Use the central Near instance and pass signer IDs as arguments

Strings, not BigInts

No more utils.format or counting zeros

Fluent Builder

Chain readable methods instead of config objects

Side-by-Side Comparisons

1. Connecting & Keys

You have to manually assemble the Account, JsonRpcProvider, and KeyPairSigner.

2. Handling Units

Requires manual conversion, often leading to BN (BigNumber) headaches.

3. Calling Contracts

Arguments are passed inside a configuration object.

4. Error Handling

Often throws raw RPC errors or generic “TypedErrors” that are hard to parse.

5. Access Keys