@fastnear/api 0.9.3 → 0.9.4

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 ADDED
@@ -0,0 +1,34 @@
1
+ # near api
2
+
3
+ ## general
4
+
5
+ This is a workspace package from the [@fastnear/js-monorepo](https://github.com/fastnear/js-monorepo) that has the primary responsibility. It's what creates the global `near` object.
6
+
7
+ ## technical
8
+
9
+ ### Node.js decoupling
10
+
11
+ This library surgically removed ties to Node.js, replacing them with CommonJS and/or modern APIs available in browsers.
12
+
13
+ For instance `Buffer.from()` is an example of a Node.js feature that is commonly used in libraries doing binary encoding, cryptographic operations, and so on. There exists alternative with `Uint8Array` and `TextEncoder` to fill in pieces. This subject could be quite lengthy, and I mention a couple examples just to set the scene.
14
+
15
+ So it *is* possible to have a web3 library that's decoupled from Node.js
16
+
17
+ ### what this means
18
+
19
+ Some emergent behavior comes as a result of this.
20
+
21
+ - ability to run code in browser's dev console
22
+ - ability to create web3 projects entirely with static html
23
+
24
+ ### `near` global
25
+
26
+ In `tsup.config.ts`, you find TypeScript compilations targets. We feel preferential towards the IIFE version. ([MDN docs on IIFE](https://developer.mozilla.org/en-US/docs/Glossary/IIFE)) That file utilizes `esbuild`'s `banner` and `footer` to inject JavaScript that utilizes `Object.defineProperty` in a way to make it "not [configurable](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/defineProperty#configurable)."
27
+
28
+ If you look in the `dist` directory under `umd` (Universal Module Definition, but it seems IIFE fits better as a term) there is one file. At the bottom of the file you'll see how the global `near` object can undergo some modifications, potentially hardening it further as this library develops.
29
+
30
+ ## alpha version
31
+
32
+ The focus thus far has been of a highly technical nature, and after releasing this alpha version the devs will let their minds gestate. then this file will fill out with more meaningful info and snippets. 🙏🏼
33
+
34
+ Make sure to visit the [project-level README](https://github.com/fastnear/js-monorepo#global-near-js)
@@ -1,5 +1,5 @@
1
- /* ⋈ 🏃🏻💨 FastNEAR API - CJS (@fastnear/api version 0.9.3) */
2
- /* https://www.npmjs.com/package/@fastnear/api/v/0.9.3 */
1
+ /* ⋈ 🏃🏻💨 FastNEAR API - CJS (@fastnear/api version 0.9.4) */
2
+ /* https://www.npmjs.com/package/@fastnear/api/v/0.9.4 */
3
3
  "use strict";
4
4
  var __defProp = Object.defineProperty;
5
5
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
package/dist/cjs/near.cjs CHANGED
@@ -1,5 +1,5 @@
1
- /* ⋈ 🏃🏻💨 FastNEAR API - CJS (@fastnear/api version 0.9.3) */
2
- /* https://www.npmjs.com/package/@fastnear/api/v/0.9.3 */
1
+ /* ⋈ 🏃🏻💨 FastNEAR API - CJS (@fastnear/api version 0.9.4) */
2
+ /* https://www.npmjs.com/package/@fastnear/api/v/0.9.4 */
3
3
  "use strict";
4
4
  var __create = Object.create;
5
5
  var __defProp = Object.defineProperty;
@@ -1,5 +1,5 @@
1
- /* ⋈ 🏃🏻💨 FastNEAR API - CJS (@fastnear/api version 0.9.3) */
2
- /* https://www.npmjs.com/package/@fastnear/api/v/0.9.3 */
1
+ /* ⋈ 🏃🏻💨 FastNEAR API - CJS (@fastnear/api version 0.9.4) */
2
+ /* https://www.npmjs.com/package/@fastnear/api/v/0.9.4 */
3
3
  "use strict";
4
4
  var __defProp = Object.defineProperty;
5
5
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
package/dist/esm/index.js CHANGED
@@ -1,4 +1,4 @@
1
- /* ⋈ 🏃🏻💨 FastNEAR API - ESM (@fastnear/api version 0.9.3) */
2
- /* https://www.npmjs.com/package/@fastnear/api/v/0.9.3 */
1
+ /* ⋈ 🏃🏻💨 FastNEAR API - ESM (@fastnear/api version 0.9.4) */
2
+ /* https://www.npmjs.com/package/@fastnear/api/v/0.9.4 */
3
3
  export * from "./near.js";
4
4
  //# sourceMappingURL=index.js.map
package/dist/esm/near.js CHANGED
@@ -1,5 +1,5 @@
1
- /* ⋈ 🏃🏻💨 FastNEAR API - ESM (@fastnear/api version 0.9.3) */
2
- /* https://www.npmjs.com/package/@fastnear/api/v/0.9.3 */
1
+ /* ⋈ 🏃🏻💨 FastNEAR API - ESM (@fastnear/api version 0.9.4) */
2
+ /* https://www.npmjs.com/package/@fastnear/api/v/0.9.4 */
3
3
  var __defProp = Object.defineProperty;
4
4
  var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
5
5
  import Big from "big.js";
package/dist/esm/state.js CHANGED
@@ -1,5 +1,5 @@
1
- /* ⋈ 🏃🏻💨 FastNEAR API - ESM (@fastnear/api version 0.9.3) */
2
- /* https://www.npmjs.com/package/@fastnear/api/v/0.9.3 */
1
+ /* ⋈ 🏃🏻💨 FastNEAR API - ESM (@fastnear/api version 0.9.4) */
2
+ /* https://www.npmjs.com/package/@fastnear/api/v/0.9.4 */
3
3
  var __defProp = Object.defineProperty;
4
4
  var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
5
5
  import {
@@ -1,5 +1,5 @@
1
- /* ⋈ 🏃🏻💨 FastNEAR API - IIFE/UMD (@fastnear/api version 0.9.3) */
2
- /* https://www.npmjs.com/package/@fastnear/api/v/0.9.3 */
1
+ /* ⋈ 🏃🏻💨 FastNEAR API - IIFE/UMD (@fastnear/api version 0.9.4) */
2
+ /* https://www.npmjs.com/package/@fastnear/api/v/0.9.4 */
3
3
  "use strict";
4
4
  var near = (() => {
5
5
  var __defProp = Object.defineProperty;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fastnear/api",
3
- "version": "0.9.3",
3
+ "version": "0.9.4",
4
4
  "description": "Interact with NEAR Protocol blockchain including transaction signing, utilities, and more.",
5
5
  "type": "module",
6
6
  "types": "./dist/esm/index.d.ts",
@@ -14,10 +14,17 @@
14
14
  "type-check": "tsc --noEmit"
15
15
  },
16
16
  "author": "FastNEAR",
17
+ "homepage": "https://js.fastnear.com",
18
+ "repository": {
19
+ "type": "git",
20
+ "url": "git+https://github.com/fastnear/js-monorepo.git"
21
+ },
17
22
  "keywords": [
18
23
  "near-protocol",
24
+ "web3",
19
25
  "blockchain",
20
- "fastnear"
26
+ "fastnear",
27
+ "nearjs"
21
28
  ],
22
29
  "files": [
23
30
  "dist"
@@ -29,8 +36,8 @@
29
36
  }
30
37
  },
31
38
  "dependencies": {
32
- "@fastnear/utils": "0.9.3",
33
- "@fastnear/wallet-adapter": "0.9.3",
39
+ "@fastnear/utils": "0.9.4",
40
+ "@fastnear/wallet-adapter": "0.9.4",
34
41
  "@noble/curves": "*",
35
42
  "@noble/hashes": "*",
36
43
  "base58-js": "*",