near-api-ts 0.2.0 → 0.2.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -1,12 +1,14 @@
1
1
  ## NEAR API TS
2
2
  Typescript library for interactions with Near Protocol in the browser or Node.js
3
3
 
4
+ [GitHub Repository](https://github.com/eclipseeer/near-api-ts/tree/main)
5
+
4
6
  **Installation**
5
7
  ```text
6
- pnpm add @eclipseeer/near-api-ts
8
+ pnpm add near-api-ts
7
9
  ```
8
10
 
9
- **Node.js (esm) / Browser**
11
+ **Node.js (esm, 22+) / Browser**
10
12
 
11
13
  ```ts
12
14
  import {
@@ -15,10 +17,19 @@ import {
15
17
  createMemorySigner,
16
18
  testnet,
17
19
  transfer,
18
- } from '@eclipseeer/near-api-ts';
20
+ } from 'near-api-ts';
19
21
 
22
+ // Create a near client
20
23
  const client = createClient({ network: testnet });
21
24
 
25
+
26
+ // Read some data from the chain
27
+ await client.getAccountState({
28
+ accountId: 'testnet',
29
+ atMomentOf: 'LatestFinalBlock',
30
+ })
31
+
32
+ // Send some transaction
22
33
  const keyService = await createMemoryKeyService({
23
34
  keySource: { privateKey: 'ed25519:your-private-key' } ,
24
35
  });
@@ -35,4 +46,5 @@ await signer.executeTransaction({
35
46
  });
36
47
  ```
37
48
 
38
- You may found more examples in the `examples/nodejs/ts-esm` folder
49
+ You may found more examples in the [examples/nodejs/ts-esm](https://github.com/eclipseeer/near-api-ts/tree/main/examples/nodejs/ts-esm)
50
+ folder