@burningflames/inj-exchange-sdk 0.1.0 → 0.1.1

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.
Files changed (2) hide show
  1. package/README.md +34 -4
  2. package/package.json +4 -3
package/README.md CHANGED
@@ -53,12 +53,41 @@ declarations for each.
53
53
  ## Install
54
54
 
55
55
  ```sh
56
- bun add @burningflames/inj-exchange-sdk # or: npm i @burningflames/inj-exchange-sdk
56
+ bun add @burningflames/inj-exchange-sdk
57
+ # or: npm i @burningflames/inj-exchange-sdk
58
+ # or: pnpm add / yarn add @burningflames/inj-exchange-sdk
57
59
  ```
58
60
 
59
- From a checkout instead: `bun pm pack` builds and packs the tarball —
60
- `dist/`, `package.json`, `README.md`, `LICENSE` and `NOTICE` — which installs
61
- with `bun add ./burningflames-inj-exchange-sdk-0.1.0.tgz`.
61
+ Everything it needs installs with it — `@grpc/grpc-js`, `@bufbuild/protobuf`,
62
+ `@scure/base`, `eventemitter3` and `viem` — and there are no peer dependencies to
63
+ add yourself. Type declarations ship in the package, so nothing extra is needed
64
+ for TypeScript.
65
+
66
+ It loads as ESM or as CommonJS, from the package root or any of the six entry
67
+ points:
68
+
69
+ ```ts
70
+ import { MsgDeposit } from "@burningflames/inj-exchange-sdk/msgs";
71
+ import { getEip712TypedDataV2 } from "@burningflames/inj-exchange-sdk/utils";
72
+ ```
73
+
74
+ ```js
75
+ const { MsgDeposit } = require("@burningflames/inj-exchange-sdk/msgs");
76
+ const { getEip712TypedDataV2 } = require("@burningflames/inj-exchange-sdk/utils");
77
+ ```
78
+
79
+ `gen/` is not importable: the proto layer reaches you only through these entry
80
+ points, so `@burningflames/inj-exchange-sdk/gen/...` fails with
81
+ `ERR_PACKAGE_PATH_NOT_EXPORTED` by design.
82
+
83
+ From a checkout instead: `bun pm pack` builds and packs the tarball — `dist/`,
84
+ `package.json`, `README.md`, `LICENSE` and `NOTICE` — which installs with
85
+ `bun add ./burningflames-inj-exchange-sdk-0.1.0.tgz`.
86
+
87
+ Bun blocks one postinstall from a dependency, `protobufjs` arriving through
88
+ `@grpc/grpc-js`. It only prints a version-pinning warning when the consumer pins
89
+ `protobufjs` itself, and nothing is built or fetched, so it is safe to leave
90
+ blocked or to allow with `bun pm trust protobufjs`.
62
91
 
63
92
  ## Sending a transaction
64
93
 
@@ -185,6 +214,7 @@ and need a trigger price.
185
214
  bun run check # oxlint, oxfmt --check, tsc --noEmit, bun test
186
215
  bun test # 59 tests: encodings, EIP-712 payload, decimal scaling, pagination
187
216
  bun run build # tsdown → dist/, ESM and CJS with declarations
217
+ bun run check:pack # the file list a publish would carry; refuses an unexpected one
188
218
  bun pm pack # the publishable tarball
189
219
  ```
190
220
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@burningflames/inj-exchange-sdk",
3
- "version": "0.1.0",
3
+ "version": "0.1.1",
4
4
  "description": "Trading messages, query clients and EIP-712 transaction building for the Injective exchange module",
5
5
  "type": "module",
6
6
  "license": "Apache-2.0",
@@ -79,10 +79,11 @@
79
79
  "typecheck": "tsc --noEmit",
80
80
  "check": "bun run lint && bun run format:check && bun run typecheck && bun test",
81
81
  "build": "tsdown",
82
- "prepublishOnly": "bun run check && bun run build",
82
+ "prepublishOnly": "bun run check && bun run check:pack",
83
83
  "prepack": "bun run build",
84
84
  "test": "bun test",
85
- "record:fixtures": "bun run scripts/record-encoding-fixtures.ts"
85
+ "record:fixtures": "bun run scripts/record-encoding-fixtures.ts",
86
+ "check:pack": "bun run scripts/check-pack.ts"
86
87
  },
87
88
  "dependencies": {
88
89
  "@bufbuild/protobuf": "^2.13.0",