@inodra/sui 0.1.0
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/LICENSE +202 -0
- package/README.md +237 -0
- package/bin/inodra-sui.mjs +2 -0
- package/dist/chunk-3CBLVI6J.js +426 -0
- package/dist/chunk-3CBLVI6J.js.map +1 -0
- package/dist/chunk-4HKKW5QN.js +80 -0
- package/dist/chunk-4HKKW5QN.js.map +1 -0
- package/dist/chunk-74XGJJJI.js +33 -0
- package/dist/chunk-74XGJJJI.js.map +1 -0
- package/dist/chunk-D6FZYWG7.js +99 -0
- package/dist/chunk-D6FZYWG7.js.map +1 -0
- package/dist/chunk-LZZMTSLH.js +31 -0
- package/dist/chunk-LZZMTSLH.js.map +1 -0
- package/dist/chunk-M3M2L6BW.js +29 -0
- package/dist/chunk-M3M2L6BW.js.map +1 -0
- package/dist/chunk-NSXRC5XW.js +298 -0
- package/dist/chunk-NSXRC5XW.js.map +1 -0
- package/dist/chunk-OGMBYWTG.js +537 -0
- package/dist/chunk-OGMBYWTG.js.map +1 -0
- package/dist/chunk-U6D5LGNF.js +111 -0
- package/dist/chunk-U6D5LGNF.js.map +1 -0
- package/dist/chunk-ZSW3EWGF.js +539 -0
- package/dist/chunk-ZSW3EWGF.js.map +1 -0
- package/dist/cli.js +665 -0
- package/dist/cli.js.map +1 -0
- package/dist/events.cjs +3273 -0
- package/dist/events.cjs.map +1 -0
- package/dist/events.d.cts +47 -0
- package/dist/events.d.ts +47 -0
- package/dist/events.js +2578 -0
- package/dist/events.js.map +1 -0
- package/dist/graphql.cjs +129 -0
- package/dist/graphql.cjs.map +1 -0
- package/dist/graphql.d.cts +36 -0
- package/dist/graphql.d.ts +36 -0
- package/dist/graphql.js +10 -0
- package/dist/graphql.js.map +1 -0
- package/dist/grpc-web.cjs +129 -0
- package/dist/grpc-web.cjs.map +1 -0
- package/dist/grpc-web.d.cts +31 -0
- package/dist/grpc-web.d.ts +31 -0
- package/dist/grpc-web.js +10 -0
- package/dist/grpc-web.js.map +1 -0
- package/dist/grpc.cjs +131 -0
- package/dist/grpc.cjs.map +1 -0
- package/dist/grpc.d.cts +34 -0
- package/dist/grpc.d.ts +34 -0
- package/dist/grpc.js +10 -0
- package/dist/grpc.js.map +1 -0
- package/dist/index-CGBN_EI5.d.ts +4800 -0
- package/dist/index-CVO2Kj8a.d.cts +4800 -0
- package/dist/index.cjs +4723 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.cts +504 -0
- package/dist/index.d.ts +504 -0
- package/dist/index.js +59 -0
- package/dist/index.js.map +1 -0
- package/dist/manage.cjs +376 -0
- package/dist/manage.cjs.map +1 -0
- package/dist/manage.d.cts +2 -0
- package/dist/manage.d.ts +2 -0
- package/dist/manage.js +8 -0
- package/dist/manage.js.map +1 -0
- package/dist/network-CEg2MJY3.d.cts +60 -0
- package/dist/network-CEg2MJY3.d.ts +60 -0
- package/dist/node.cjs +4759 -0
- package/dist/node.cjs.map +1 -0
- package/dist/node.d.cts +28 -0
- package/dist/node.d.ts +28 -0
- package/dist/node.js +73 -0
- package/dist/node.js.map +1 -0
- package/dist/reflection-Bx44-Fs1.d.ts +4639 -0
- package/dist/reflection-Cf7WFH6H.d.cts +4639 -0
- package/dist/reflection-FEGYA7DU.js +9 -0
- package/dist/reflection-FEGYA7DU.js.map +1 -0
- package/dist/runtime-OWKF3LZ7.js +37 -0
- package/dist/runtime-OWKF3LZ7.js.map +1 -0
- package/dist/warp.cjs +633 -0
- package/dist/warp.cjs.map +1 -0
- package/dist/warp.d.cts +195 -0
- package/dist/warp.d.ts +195 -0
- package/dist/warp.js +12 -0
- package/dist/warp.js.map +1 -0
- package/dist/webhooks.cjs +104 -0
- package/dist/webhooks.cjs.map +1 -0
- package/dist/webhooks.d.cts +35 -0
- package/dist/webhooks.d.ts +35 -0
- package/dist/webhooks.js +7 -0
- package/dist/webhooks.js.map +1 -0
- package/llms.txt +189 -0
- package/package.json +119 -0
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Verification for Inodra webhook signatures.
|
|
3
|
+
*
|
|
4
|
+
* Inodra signs webhook deliveries with HMAC-SHA256 when the webhook has a
|
|
5
|
+
* secret configured. The signature arrives in the `X-Inodra-Signature`
|
|
6
|
+
* header as `t=<unix-seconds>,v1=<hex-hmac>` where the HMAC is computed
|
|
7
|
+
* over `<timestamp>.<raw-body>`.
|
|
8
|
+
*/
|
|
9
|
+
interface VerifyWebhookSignatureOptions {
|
|
10
|
+
/** Raw request body, exactly as received (before any JSON parsing). */
|
|
11
|
+
payload: string;
|
|
12
|
+
/** Value of the X-Inodra-Signature header. */
|
|
13
|
+
signature: string;
|
|
14
|
+
/** The webhook's secret. */
|
|
15
|
+
secret: string;
|
|
16
|
+
/** Max allowed age of the signature. Defaults to 300 seconds. */
|
|
17
|
+
toleranceSeconds?: number;
|
|
18
|
+
/** Current unix time in seconds (for testing). */
|
|
19
|
+
now?: number;
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* Verify a webhook delivery. Returns false for malformed, mismatched, or
|
|
23
|
+
* expired signatures — never throws on bad input.
|
|
24
|
+
*
|
|
25
|
+
* ```ts
|
|
26
|
+
* const valid = await verifyWebhookSignature({
|
|
27
|
+
* payload: rawBody,
|
|
28
|
+
* signature: req.headers["x-inodra-signature"],
|
|
29
|
+
* secret: process.env.INODRA_WEBHOOK_SECRET,
|
|
30
|
+
* });
|
|
31
|
+
* ```
|
|
32
|
+
*/
|
|
33
|
+
declare function verifyWebhookSignature(options: VerifyWebhookSignatureOptions): Promise<boolean>;
|
|
34
|
+
|
|
35
|
+
export { type VerifyWebhookSignatureOptions, verifyWebhookSignature };
|
package/dist/webhooks.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|
package/llms.txt
ADDED
|
@@ -0,0 +1,189 @@
|
|
|
1
|
+
# @inodra/sui — TypeScript SDK for the Inodra Sui platform
|
|
2
|
+
|
|
3
|
+
> Complete, copy-paste-accurate reference for LLMs and coding agents.
|
|
4
|
+
> Humans: prefer README.md. Everything below is verified against the live API.
|
|
5
|
+
|
|
6
|
+
## Install
|
|
7
|
+
|
|
8
|
+
npm install @inodra/sui
|
|
9
|
+
# for grpc/graphql namespaces (wrapped from the official Sui SDK):
|
|
10
|
+
npm install @mysten/sui @protobuf-ts/grpcweb-transport
|
|
11
|
+
# only for native HTTP/2 gRPC on Node (@inodra/sui/node):
|
|
12
|
+
npm install @protobuf-ts/grpc-transport @grpc/grpc-js
|
|
13
|
+
|
|
14
|
+
Lean zero-dependency subpaths (no @mysten/sui needed): @inodra/sui/warp,
|
|
15
|
+
@inodra/sui/manage, @inodra/sui/webhooks, @inodra/sui/events (needs only zod,
|
|
16
|
+
installed automatically).
|
|
17
|
+
|
|
18
|
+
## Client construction
|
|
19
|
+
|
|
20
|
+
import { Inodra } from "@inodra/sui"; // universal (browser/edge/Node)
|
|
21
|
+
import { Inodra } from "@inodra/sui/node"; // Node: native HTTP/2 gRPC
|
|
22
|
+
|
|
23
|
+
const inodra = new Inodra({
|
|
24
|
+
network: "mainnet", // "mainnet" | "testnet" (default mainnet)
|
|
25
|
+
auth: { apiKey: process.env.INODRA_API_KEY }, // or auth: "<key>" shorthand
|
|
26
|
+
// auth: { sessionToken }, // Authorization: Bearer
|
|
27
|
+
// auth: { getCredentials: async () => ({ headers: {...} }) }, // custom provider
|
|
28
|
+
// endpoints: { rest, graphql, grpc, grpcWeb, warpWs }, // local-dev overrides
|
|
29
|
+
// timeoutMs: 30000, maxRetries: 2, fetch, onResponseMeta,
|
|
30
|
+
});
|
|
31
|
+
|
|
32
|
+
Facts:
|
|
33
|
+
- API keys look like indr_pat_... and are sent as x-api-key (or Bearer).
|
|
34
|
+
- Retry policy: GET/PUT/DELETE retry on 429+5xx; POST/PATCH retry ONLY on 429
|
|
35
|
+
unless the per-request option { idempotent: true } is passed.
|
|
36
|
+
- inodra.lastResponseMeta = { rateLimit: {limit, remaining, reset, throttled},
|
|
37
|
+
credits: {remaining, limit, replenishDate, degraded}, requestId } from the
|
|
38
|
+
most recent REST response.
|
|
39
|
+
- Errors: InodraError (has .status, .code, .requestId, .body),
|
|
40
|
+
InodraAuthenticationError (401/403), InodraRateLimitError (429, has
|
|
41
|
+
.retryAfterSeconds), InodraTimeoutError, InodraWebhookSignatureError.
|
|
42
|
+
- Data endpoints are mainnet-only (403 on testnet keys).
|
|
43
|
+
|
|
44
|
+
## Namespaces (all lazy)
|
|
45
|
+
|
|
46
|
+
inodra.grpc → SuiGrpcClient from @mysten/sui over Inodra's gateway.
|
|
47
|
+
Methods: getObject, getObjects, getTransaction (pass
|
|
48
|
+
include: {effects: true} for useful output), getBalance,
|
|
49
|
+
listBalances, listCoins, listOwnedObjects, listDynamicFields,
|
|
50
|
+
getDynamicField, getCoinMetadata, getMoveFunction,
|
|
51
|
+
getReferenceGasPrice, executeTransaction,
|
|
52
|
+
signAndExecuteTransaction, simulateTransaction,
|
|
53
|
+
waitForTransaction, verifyZkLoginSignature, plus .core.*
|
|
54
|
+
(e.g. core.getBalance({owner, coinType})).
|
|
55
|
+
NOTE: no checkpoint read methods on this client.
|
|
56
|
+
inodra.graphql → SuiGraphQLClient from @mysten/sui.
|
|
57
|
+
await inodra.graphql.query({ query, variables })
|
|
58
|
+
inodra.warp → Warp real-time streams (see below)
|
|
59
|
+
inodra.webhooks → webhook CRUD + receiver verification (see below)
|
|
60
|
+
inodra.data → indexer REST (see below)
|
|
61
|
+
inodra.catalog → protocols() / events({network?, protocol?, category?, q?, includeUnverified?})
|
|
62
|
+
inodra.account → me() (key/org/project/network/tier), usage() (CU + latency stats)
|
|
63
|
+
|
|
64
|
+
REST responses that create/read a resource are wrapped: { data: {...} } — e.g.
|
|
65
|
+
(await inodra.warp.createEventStream({eventType})).data.id.
|
|
66
|
+
|
|
67
|
+
## Warp real-time streams
|
|
68
|
+
|
|
69
|
+
CRUD (subscription types: event, address, coin, object):
|
|
70
|
+
warp.createEventStream({ eventType, sender?, eventFieldFilters? }) // max 10 filters
|
|
71
|
+
eventFieldFilters: [{ field, moveType, operator: "eq"|"neq"|"gt"|"gte"|"lt"|"lte"|"contains", value }]
|
|
72
|
+
warp.createAddressStream({ address })
|
|
73
|
+
warp.createCoinStream({ address, coinType })
|
|
74
|
+
warp.createObjectStream({ objectId })
|
|
75
|
+
warp.list() / get(id) / update(id, {active}) / delete(id)
|
|
76
|
+
|
|
77
|
+
Connect (one live connection per subscription):
|
|
78
|
+
const stream = inodra.warp.connect(subId, { mode?: "live"|"resume", lastEventId? }); // SSE, at-least-once
|
|
79
|
+
const stream = inodra.warp.connectWebSocket(subId, { autoAck?: boolean }); // WS, exactly-once via acks
|
|
80
|
+
stream.on("message", (e) => ...); // e = { type, id, data }; e.data = { activityType,
|
|
81
|
+
// txDigest, eventSequence, checkpoint, timestamp,
|
|
82
|
+
// type: <Move event type>, sender, data: <decoded payload> }
|
|
83
|
+
stream.on("connected"|"error"|"reconnecting"|"quota_exceeded"|"close", ...)
|
|
84
|
+
for await (const e of stream) {...} // ends on close(); breaking the loop closes the stream
|
|
85
|
+
stream.close(); stream.ack(id); // ack only needed with autoAck: false
|
|
86
|
+
|
|
87
|
+
One-call typed stream (recommended):
|
|
88
|
+
const swaps = await inodra.warp.streamCatalogEvent("cetus.swap", {
|
|
89
|
+
ephemeral: true, // delete the subscription when the stream closes
|
|
90
|
+
transport: "sse"|"ws", // default sse
|
|
91
|
+
sender?, eventFieldFilters?,
|
|
92
|
+
});
|
|
93
|
+
for await (const { payload, envelope } of swaps) { ... } // payload is typed + validated
|
|
94
|
+
|
|
95
|
+
Semantics: first connect is LIVE (backlog dropped) unless mode:"resume" or
|
|
96
|
+
lastEventId is given. Reconnects always resume from the last delivered id.
|
|
97
|
+
Resume replay is at-least-once, NOT exact-cursor: expect duplicates around the
|
|
98
|
+
cursor's checkpoint and out-of-order interleaving after reconnects — dedupe by
|
|
99
|
+
event id (format "<checkpoint>_<txIdx>_<evtIdx>") if you need idempotency.
|
|
100
|
+
Billing: ~12 CU/min connection time + 2 credits per delivered event.
|
|
101
|
+
|
|
102
|
+
## Typed catalog events (@inodra/sui/events)
|
|
103
|
+
|
|
104
|
+
import { catalogEvents, parseCatalogEvent, matchCatalogEvent, resolveCatalogEvent } from "@inodra/sui/events";
|
|
105
|
+
|
|
106
|
+
- catalogEvents: map keyed by id → { id, protocolId, label, category, description,
|
|
107
|
+
generic, schema (zod), deployments: [{network, eventType, primary?}] }.
|
|
108
|
+
- matchCatalogEvent(msg, id) → wire-typed payload | undefined (no validation).
|
|
109
|
+
- parseCatalogEvent(msg, id) → validated+normalized payload | undefined; THROWS
|
|
110
|
+
if the event matches but fails its schema. Normalization: u64/u128/u256 →
|
|
111
|
+
decimal string, TypeName → string, Option<T> → T|null, Balance<T> → value string.
|
|
112
|
+
- Both accept a Warp stream message, a bare event payload, or a parsed webhook body.
|
|
113
|
+
- resolveCatalogEvent(rawMoveEventType, {network?}) → catalog entry | undefined.
|
|
114
|
+
- Schemas are loose: unknown fields pass through (protocol upgrades don't break you).
|
|
115
|
+
|
|
116
|
+
All 121 catalog event ids:
|
|
117
|
+
7k.confirm-swap, 7k.swap, aftermath.deposit, aftermath.perp-funding, aftermath.perp-liquidated, aftermath.swap, alphafi.liquidity-change, alphafi.reward, bluefin.fee-collected, bluefin.liquidity-provided, bluefin.liquidity-removed, bluefin.pool-created, bluefin.position-closed, bluefin.position-opened, bluefin.reward-collected, bluefin.swap, bucket.borrow, bucket.deposit-collateral, bucket.position-updated, bucket.redeem, bucket.repay, bucket.sbuck-deposit, bucket.sbuck-rewards, bucket.withdraw-collateral, cetus.add-liquidity, cetus.close-position, cetus.collect-fee, cetus.create-pool, cetus.open-position, cetus.remove-liquidity, cetus.swap, current.borrow, current.deposit, current.liquidate, current.repay, current.withdraw, deepbook.balance, deepbook.flash-loan, deepbook.order-canceled, deepbook.order-filled, deepbook.order-info, deepbook.order-placed, ember.deposit, ember.rate-updated, ember.redeem-processed, ember.redeem-request, flowx.amm-pair-created, flowx.amm-swap, flowx.clmm-pool-created, flowx.clmm-swap, haedal.instant-unstaked, haedal.staked, haedal.unstaked, kai.add-liquidity, kai.deleverage, kai.liquidation, kai.position-open, kai.reduce, kai.supply, kai.supply-withdraw, kriya.add-liquidity, kriya.swap, magma.add-liquidity, magma.collect-fee, magma.collect-reward, magma.create-pool, magma.remove-liquidity, magma.swap, mole.add-debt, mole.deposit, mole.harvest, mole.kill, mole.withdraw, mole.work, momentum.add-liquidity, momentum.collect-fee, momentum.collect-reward, momentum.pool-created, momentum.remove-liquidity, momentum.repay-flash-swap, momentum.swap, navi.borrow, navi.deposit, navi.liquidation, navi.repay, navi.withdraw, pyth.price-feed-update, scallop.borrow, scallop.collateral-deposit, scallop.collateral-withdraw, scallop.liquidation, scallop.repay, springsui.epoch-changed, springsui.stake, springsui.unstake, steamm.bank-deposit, steamm.bank-withdraw, suilend.borrow, suilend.claim-reward, suilend.deposit, suilend.liquidate, suilend.repay, suilend.withdraw, supra.price-update, turbos.add-liquidity, turbos.pool-created, turbos.remove-liquidity, turbos.swap, typus.dov-auction, typus.dov-bid, typus.dov-settle, typus.perp-funding, typus.perp-liquidate, typus.perp-lp-burn, typus.perp-lp-mint, typus.perp-order, volo.staked, volo.unstaked, walrus.blob-certified, walrus.blob-deleted, walrus.blob-registered
|
|
118
|
+
|
|
119
|
+
## Arbitrary (uncataloged) event types — reflection + codegen
|
|
120
|
+
|
|
121
|
+
Runtime (schema built from on-chain struct layout, cached per type):
|
|
122
|
+
const schema = await inodra.events.schemaFor("0xpkg::vault::Deposit<0x2::sui::SUI>");
|
|
123
|
+
const payload = await inodra.events.parseEvent(msg, "0xpkg::vault::Deposit");
|
|
124
|
+
// parseEvent: base type (no <...>) matches every instantiation, each typed
|
|
125
|
+
// concretely; returns undefined for other events; throws on schema mismatch.
|
|
126
|
+
Standalone (no facade): new EventSchemaReflector({apiKey?, network?, url?}) from
|
|
127
|
+
@inodra/sui/events — url may be a public Sui GraphQL endpoint (keyless).
|
|
128
|
+
Encoding rules identical to catalog schemas (u64→string, TypeName→string,
|
|
129
|
+
Option→null, Balance→value string, nested structs recursed, loose objects;
|
|
130
|
+
cycles/depth>6 fall back to unknown).
|
|
131
|
+
|
|
132
|
+
Build-time static types (CLI, ships with the package):
|
|
133
|
+
INODRA_API_KEY=... npx inodra-sui codegen-events "<type...>" -o out.gen.ts \
|
|
134
|
+
[--network mainnet|testnet] [--url <graphql>] [--import-from <spec>]
|
|
135
|
+
# without INODRA_API_KEY it uses the public Sui GraphQL for the network
|
|
136
|
+
Emitted file: zod schemas + z.infer types per event + reflectedEventSchemas map
|
|
137
|
+
keyed by canonical type; imports only zod and @inodra/sui/events.
|
|
138
|
+
|
|
139
|
+
## Webhooks
|
|
140
|
+
|
|
141
|
+
Create (same 4 types as Warp; all take webhookUrl):
|
|
142
|
+
webhooks.createEvent({ eventType, webhookUrl, sender?, eventFieldFilters? })
|
|
143
|
+
webhooks.createAddress({ address, webhookUrl })
|
|
144
|
+
webhooks.createCoin({ address, coinType, webhookUrl })
|
|
145
|
+
webhooks.createObject({ objectId, webhookUrl })
|
|
146
|
+
webhooks.list() / get(id) / update(id, {...}) / delete(id)
|
|
147
|
+
Create response .data includes webhookSecret — store it for verification.
|
|
148
|
+
|
|
149
|
+
Receiver (use the EXACT raw body string, before any JSON.parse):
|
|
150
|
+
const body = await inodra.webhooks.constructEvent({
|
|
151
|
+
payload: rawBody,
|
|
152
|
+
signature: req.headers["x-inodra-signature"], // format t=<unix>,v1=<hmac-sha256-hex>
|
|
153
|
+
secret: webhookSecret,
|
|
154
|
+
}); // throws InodraWebhookSignatureError on bad/expired signature (300s tolerance)
|
|
155
|
+
// body = { payloadVersion: 1, payload: { webhookId, activityType, txDigest,
|
|
156
|
+
// eventSequence, checkpoint, timestamp, type, sender, data } }
|
|
157
|
+
const swap = parseCatalogEvent(body, "cetus.swap"); // typed narrowing
|
|
158
|
+
Standalone: verifyWebhookSignature({payload, signature, secret, toleranceSeconds?}) → boolean.
|
|
159
|
+
|
|
160
|
+
## Data API (mainnet only)
|
|
161
|
+
|
|
162
|
+
inodra.data.accounts: get(addr), balance(addr), delegations(addr),
|
|
163
|
+
objects(addr, {limit?, cursor?}), iterateObjects(addr) → AsyncGenerator,
|
|
164
|
+
transactions(addr, {limit?, cursor?, format?: "raw"|"activity", includeReceived?}),
|
|
165
|
+
iterateTransactions(addr) → AsyncGenerator
|
|
166
|
+
inodra.data.coins: get(coinType) [denomination], metadata(coinType) [name/symbol/links]
|
|
167
|
+
inodra.data.objects: metadata({ objectId }) [SINGULAR], transactions(objectId, {limit?, cursor?}),
|
|
168
|
+
iterateTransactions(objectId)
|
|
169
|
+
inodra.data.packages: get(packageId)
|
|
170
|
+
inodra.data.chain: info(), staking(), stats()
|
|
171
|
+
inodra.data.validators: list(), apy(), commission(), get(validatorAddress)
|
|
172
|
+
inodra.data.suins: resolve(name), reverse(address) [404 if no name],
|
|
173
|
+
resolveBatch({names}), availability(name)
|
|
174
|
+
Paginated responses: { data: [...], pagination: { limit, cursor?, hasNext } }.
|
|
175
|
+
List query params limit/cursor are STRINGS (e.g. { limit: "50" }).
|
|
176
|
+
|
|
177
|
+
## Endpoints
|
|
178
|
+
|
|
179
|
+
mainnet: https://mainnet-api.inodra.com/v1 (REST/GraphQL/SSE),
|
|
180
|
+
mainnet-grpc.inodra.com:443 (gRPC), wss://mainnet-api.inodra.com/v1 (WS)
|
|
181
|
+
testnet: same shape with testnet- prefix.
|
|
182
|
+
Public OpenAPI spec: https://api.inodra.com/openapi.json
|
|
183
|
+
|
|
184
|
+
## Regeneration (maintainers)
|
|
185
|
+
|
|
186
|
+
bun run generate # OpenAPI types + event schemas from the live API
|
|
187
|
+
bun run verify:events # validate every generated schema vs live chain events
|
|
188
|
+
bun run e2e # extensive live e2e (INODRA_API_KEY required)
|
|
189
|
+
node scripts/webhook-live.mjs # real inbound webhook delivery via tunnel
|
package/package.json
ADDED
|
@@ -0,0 +1,119 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@inodra/sui",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "TypeScript SDK for the Inodra Sui platform — gRPC, GraphQL, Warp real-time streams, webhooks, typed protocol events",
|
|
5
|
+
"license": "Apache-2.0",
|
|
6
|
+
"repository": {
|
|
7
|
+
"type": "git",
|
|
8
|
+
"url": "git+https://github.com/inodrahq/sdk-ts.git"
|
|
9
|
+
},
|
|
10
|
+
"homepage": "https://inodra.com",
|
|
11
|
+
"bugs": {
|
|
12
|
+
"url": "https://github.com/inodrahq/sdk-ts/issues"
|
|
13
|
+
},
|
|
14
|
+
"keywords": ["sui", "blockchain", "sdk", "inodra", "grpc", "graphql", "webhooks", "streaming", "web3"],
|
|
15
|
+
"type": "module",
|
|
16
|
+
"main": "./dist/index.cjs",
|
|
17
|
+
"module": "./dist/index.js",
|
|
18
|
+
"types": "./dist/index.d.ts",
|
|
19
|
+
"exports": {
|
|
20
|
+
".": {
|
|
21
|
+
"types": "./dist/index.d.ts",
|
|
22
|
+
"import": "./dist/index.js",
|
|
23
|
+
"require": "./dist/index.cjs"
|
|
24
|
+
},
|
|
25
|
+
"./node": {
|
|
26
|
+
"types": "./dist/node.d.ts",
|
|
27
|
+
"import": "./dist/node.js",
|
|
28
|
+
"require": "./dist/node.cjs"
|
|
29
|
+
},
|
|
30
|
+
"./grpc": {
|
|
31
|
+
"types": "./dist/grpc.d.ts",
|
|
32
|
+
"import": "./dist/grpc.js",
|
|
33
|
+
"require": "./dist/grpc.cjs"
|
|
34
|
+
},
|
|
35
|
+
"./grpc-web": {
|
|
36
|
+
"types": "./dist/grpc-web.d.ts",
|
|
37
|
+
"import": "./dist/grpc-web.js",
|
|
38
|
+
"require": "./dist/grpc-web.cjs"
|
|
39
|
+
},
|
|
40
|
+
"./graphql": {
|
|
41
|
+
"types": "./dist/graphql.d.ts",
|
|
42
|
+
"import": "./dist/graphql.js",
|
|
43
|
+
"require": "./dist/graphql.cjs"
|
|
44
|
+
},
|
|
45
|
+
"./events": {
|
|
46
|
+
"types": "./dist/events.d.ts",
|
|
47
|
+
"import": "./dist/events.js",
|
|
48
|
+
"require": "./dist/events.cjs"
|
|
49
|
+
},
|
|
50
|
+
"./warp": {
|
|
51
|
+
"types": "./dist/warp.d.ts",
|
|
52
|
+
"import": "./dist/warp.js",
|
|
53
|
+
"require": "./dist/warp.cjs"
|
|
54
|
+
},
|
|
55
|
+
"./manage": {
|
|
56
|
+
"types": "./dist/manage.d.ts",
|
|
57
|
+
"import": "./dist/manage.js",
|
|
58
|
+
"require": "./dist/manage.cjs"
|
|
59
|
+
},
|
|
60
|
+
"./webhooks": {
|
|
61
|
+
"types": "./dist/webhooks.d.ts",
|
|
62
|
+
"import": "./dist/webhooks.js",
|
|
63
|
+
"require": "./dist/webhooks.cjs"
|
|
64
|
+
}
|
|
65
|
+
},
|
|
66
|
+
"bin": {
|
|
67
|
+
"inodra-sui": "bin/inodra-sui.mjs"
|
|
68
|
+
},
|
|
69
|
+
"files": ["dist", "bin", "llms.txt"],
|
|
70
|
+
"sideEffects": false,
|
|
71
|
+
"scripts": {
|
|
72
|
+
"build": "tsup",
|
|
73
|
+
"check-types": "tsc --noEmit",
|
|
74
|
+
"generate": "bun run generate:api && bun run generate:events",
|
|
75
|
+
"generate:api": "openapi-typescript \"${INODRA_SPEC_URL:-https://api.inodra.com/openapi.json}\" -o src/generated/api.ts",
|
|
76
|
+
"generate:events": "bun scripts/generate-events.ts",
|
|
77
|
+
"verify:events": "bun scripts/verify-events.ts",
|
|
78
|
+
"test": "vitest",
|
|
79
|
+
"test:run": "vitest run",
|
|
80
|
+
"e2e": "node scripts/e2e.mjs",
|
|
81
|
+
"smoke": "node examples/smoke.mjs"
|
|
82
|
+
},
|
|
83
|
+
"engines": {
|
|
84
|
+
"node": ">=18"
|
|
85
|
+
},
|
|
86
|
+
"peerDependencies": {
|
|
87
|
+
"@grpc/grpc-js": "^1.13.0",
|
|
88
|
+
"@mysten/sui": "^2.0.0",
|
|
89
|
+
"@protobuf-ts/grpc-transport": "^2.11.0",
|
|
90
|
+
"@protobuf-ts/grpcweb-transport": "^2.11.0"
|
|
91
|
+
},
|
|
92
|
+
"peerDependenciesMeta": {
|
|
93
|
+
"@grpc/grpc-js": {
|
|
94
|
+
"optional": true
|
|
95
|
+
},
|
|
96
|
+
"@mysten/sui": {
|
|
97
|
+
"optional": true
|
|
98
|
+
},
|
|
99
|
+
"@protobuf-ts/grpc-transport": {
|
|
100
|
+
"optional": true
|
|
101
|
+
},
|
|
102
|
+
"@protobuf-ts/grpcweb-transport": {
|
|
103
|
+
"optional": true
|
|
104
|
+
}
|
|
105
|
+
},
|
|
106
|
+
"devDependencies": {
|
|
107
|
+
"@grpc/grpc-js": "^1.14.4",
|
|
108
|
+
"@mysten/sui": "^2.17.0",
|
|
109
|
+
"@protobuf-ts/grpc-transport": "^2.11.1",
|
|
110
|
+
"@protobuf-ts/grpcweb-transport": "^2.11.1",
|
|
111
|
+
"openapi-typescript": "^7.6.0",
|
|
112
|
+
"tsup": "^8.3.0",
|
|
113
|
+
"typescript": "^5.8.2",
|
|
114
|
+
"vitest": "^3.2.4"
|
|
115
|
+
},
|
|
116
|
+
"dependencies": {
|
|
117
|
+
"zod": "^4.4.3"
|
|
118
|
+
}
|
|
119
|
+
}
|