@ainize/core 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.
Files changed (75) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +20 -0
  3. package/dist/ain-ledger.d.ts +191 -0
  4. package/dist/ain-ledger.d.ts.map +1 -0
  5. package/dist/ain-ledger.js +714 -0
  6. package/dist/ain-ledger.js.map +1 -0
  7. package/dist/browser.d.ts +15 -0
  8. package/dist/browser.d.ts.map +1 -0
  9. package/dist/browser.js +16 -0
  10. package/dist/browser.js.map +1 -0
  11. package/dist/bytes.d.ts +3 -0
  12. package/dist/bytes.d.ts.map +1 -0
  13. package/dist/bytes.js +14 -0
  14. package/dist/bytes.js.map +1 -0
  15. package/dist/canonical.d.ts +5 -0
  16. package/dist/canonical.d.ts.map +1 -0
  17. package/dist/canonical.js +70 -0
  18. package/dist/canonical.js.map +1 -0
  19. package/dist/catalog.d.ts +181 -0
  20. package/dist/catalog.d.ts.map +1 -0
  21. package/dist/catalog.js +496 -0
  22. package/dist/catalog.js.map +1 -0
  23. package/dist/config-schema.d.ts +222 -0
  24. package/dist/config-schema.d.ts.map +1 -0
  25. package/dist/config-schema.js +302 -0
  26. package/dist/config-schema.js.map +1 -0
  27. package/dist/config.d.ts +128 -0
  28. package/dist/config.d.ts.map +1 -0
  29. package/dist/config.js +330 -0
  30. package/dist/config.js.map +1 -0
  31. package/dist/events.d.ts +14 -0
  32. package/dist/events.d.ts.map +1 -0
  33. package/dist/events.js +20 -0
  34. package/dist/events.js.map +1 -0
  35. package/dist/identity.d.ts +15 -0
  36. package/dist/identity.d.ts.map +1 -0
  37. package/dist/identity.js +59 -0
  38. package/dist/identity.js.map +1 -0
  39. package/dist/index.d.ts +17 -0
  40. package/dist/index.d.ts.map +1 -0
  41. package/dist/index.js +17 -0
  42. package/dist/index.js.map +1 -0
  43. package/dist/ledger.d.ts +134 -0
  44. package/dist/ledger.d.ts.map +1 -0
  45. package/dist/ledger.js +2 -0
  46. package/dist/ledger.js.map +1 -0
  47. package/dist/lineage.d.ts +63 -0
  48. package/dist/lineage.d.ts.map +1 -0
  49. package/dist/lineage.js +156 -0
  50. package/dist/lineage.js.map +1 -0
  51. package/dist/local-ledger.d.ts +74 -0
  52. package/dist/local-ledger.d.ts.map +1 -0
  53. package/dist/local-ledger.js +229 -0
  54. package/dist/local-ledger.js.map +1 -0
  55. package/dist/npz.d.ts +107 -0
  56. package/dist/npz.d.ts.map +1 -0
  57. package/dist/npz.js +502 -0
  58. package/dist/npz.js.map +1 -0
  59. package/dist/ops.d.ts +65 -0
  60. package/dist/ops.d.ts.map +1 -0
  61. package/dist/ops.js +9 -0
  62. package/dist/ops.js.map +1 -0
  63. package/dist/teach-auth.d.ts +19 -0
  64. package/dist/teach-auth.d.ts.map +1 -0
  65. package/dist/teach-auth.js +33 -0
  66. package/dist/teach-auth.js.map +1 -0
  67. package/dist/types.d.ts +1096 -0
  68. package/dist/types.d.ts.map +1 -0
  69. package/dist/types.js +98 -0
  70. package/dist/types.js.map +1 -0
  71. package/dist/x402.d.ts +35 -0
  72. package/dist/x402.d.ts.map +1 -0
  73. package/dist/x402.js +84 -0
  74. package/dist/x402.js.map +1 -0
  75. package/package.json +49 -0
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 AI Network (Common Computer Inc.)
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,20 @@
1
+ # ainize-core — shared ground
2
+
3
+ The types, rules and signatures every other [Ainize](https://github.com/ainblockchain/ainize) package
4
+ agrees on. It depends on nothing in this organisation; everything else depends on it.
5
+
6
+ - **Domain types** — patches, anchors, benchmarks, catalogue entries, billing, subscription terms
7
+ - **Identity and signing** — key handling, `signMessage` / `verifyMessage`, the teaching-key header
8
+ (`teachAuthMessage`, `teachAuthHeaderFor`) that the CLI, the MCP server and the browser all produce
9
+ - **Lineage** — the parent/child rules a derived patch must satisfy, and the pre-state hash the trainer
10
+ and the node compute independently and compare
11
+ - **Ledger** — local and on-chain (AIN) record writers, and the x402 payment envelope
12
+ - **Config** — the node config schema, defaults and env overlay (`AINIZE_*`)
13
+
14
+ ```bash
15
+ npm install && npm run build && npm test
16
+ ```
17
+
18
+ Nothing here opens a socket, a database or a model. If a helper needs a request object or a replay
19
+ cache it belongs in [ainize-node](https://github.com/ainblockchain/ainize-node) instead — that split is
20
+ what lets a CLI talk to a remote node without installing a server.
@@ -0,0 +1,191 @@
1
+ import type { Ledger, LedgerEvents, LedgerInfo, RecordBody, SubscriptionRecord, SupersedeRecord } from './ledger.js';
2
+ import type { Attestation, BranchInfo, Challenge, Dispute, LedgerRecord, PatchAnchor, PeerInfo, RecordKind, Settlement } from './types.js';
3
+ import type { Identity } from './identity.js';
4
+ /** Genesis account of the 1-node local dev chain (blockchain-configs/1-node) — public test key, dev only. */
5
+ export declare const LOCAL_GENESIS: {
6
+ address: string;
7
+ privateKey: string;
8
+ };
9
+ /** Fund an address from the local dev chain's genesis account. Refuses non-local providers. */
10
+ export declare function fundFromGenesis(providerUrl: string, to: string, amount: number): Promise<{
11
+ tx_hash: string;
12
+ balance: number;
13
+ }>;
14
+ /** Quick reachability probe for an AIN node. */
15
+ export declare function ainReachable(providerUrl: string, timeoutMs?: number): Promise<boolean>;
16
+ export interface AinLedgerOptions {
17
+ providerUrl: string;
18
+ eventHandlerUrl?: string | null;
19
+ chainId: number;
20
+ appName?: string;
21
+ gasPrice?: number;
22
+ }
23
+ /**
24
+ * AIN state values cannot hold JS arrays (only objects/primitives) and empty objects are pruned.
25
+ * toAin(): arrays → {"0":…,"1":…}; empty arrays/objects → null (key omitted); undefined → omitted.
26
+ * fromAin(): objects whose keys are exactly 0..n-1 → arrays. Our record schemas never use such keys otherwise.
27
+ */
28
+ export declare function toAin(v: unknown): unknown;
29
+ export declare function fromAin(v: unknown): unknown;
30
+ /**
31
+ * Restore array fields that `toAin()` dropped because they were empty. Every record kind is handled with an explicit
32
+ * per-field line below (a generic field list cannot tell an anchor's `parents` from a branch's `patch_ids`).
33
+ */
34
+ export declare function withEmptyArrays<T>(body: T): T;
35
+ /**
36
+ * Rebuild ledger records from the decoded /apps/knowledge/market subtree (pure; used by refresh() and unit tests).
37
+ * Records are sorted oldest → newest by `ts`. Supersede and subscription values written before `created_at`
38
+ * existed carry no timestamp of their own: a supersede is dated right after the newest attestation (or the
39
+ * anchor) of the *new* patch — it is written the moment that patch reaches quorum — and authored by that
40
+ * patch's author; a subscription is dated right after its branch was created.
41
+ */
42
+ export declare function recordsFromMarketState(market: any): LedgerRecord[];
43
+ export declare class AinLedger implements Ledger {
44
+ private readonly opts;
45
+ private readonly identity;
46
+ private readonly events;
47
+ private readonly pollMs;
48
+ readonly kind: "ain";
49
+ readonly ain: any;
50
+ private cache;
51
+ private lastPoll;
52
+ private pollTimer;
53
+ constructor(opts: AinLedgerOptions, identity: Identity, events?: LedgerEvents, pollMs?: number);
54
+ get address(): string;
55
+ init(): Promise<void>;
56
+ close(): Promise<void>;
57
+ info(): Promise<LedgerInfo>;
58
+ private tx;
59
+ private set;
60
+ /**
61
+ * What this node's chain writes have actually cost (finding 366).
62
+ *
63
+ * The publish form gives no pricing guidance and the default price is 0.1, while the product's own estimate is
64
+ * ~0.19 AIN of gas around a 0.1 AIN purchase at `min_gas_price 500` — so on a real network the default price
65
+ * makes every sale a loss. Nothing here is estimated: `gas_cost_total` comes back on every write this node
66
+ * makes, and this is the average of the ones it has seen. The dev chain sends `gas_price 0`, so it measures 0
67
+ * and the warning correctly says nothing.
68
+ */
69
+ private gas;
70
+ gasStats(): {
71
+ writes: number;
72
+ total: number;
73
+ avg: number;
74
+ } | null;
75
+ private noteGas;
76
+ private static assertOk;
77
+ getValue(ref: string): Promise<any>;
78
+ /** AIN balance; an address the chain has never seen has no account yet (getBalance → null) and counts as 0. */
79
+ balance(address?: string): Promise<number>;
80
+ /**
81
+ * Send AIN. With `key`, the transfer is written at /transfer/$from/$to/$key instead of a random push id, which is
82
+ * how an x402 payment is bound to the quote it answers: the seller recomputes the key from (resource, nonce) and
83
+ * refuses a transfer that carries any other one (finding 344). Without `key` this is ain-js's own push behaviour,
84
+ * used by the royalty payouts, which answer no quote.
85
+ */
86
+ transfer(to: string, value: number, key?: string): Promise<{
87
+ tx_hash: string;
88
+ key: string;
89
+ }>;
90
+ /**
91
+ * Several transfers in ONE transaction (finding 366).
92
+ *
93
+ * A sale with three ancestors wrote three separate transfers, each paying its own gas — the product's own
94
+ * estimate is ~0.19 AIN of gas around a 0.1 AIN purchase at `min_gas_price 500`, so a family of three
95
+ * multiplied the loss by three. One `SET` with an op_list per payee costs one write.
96
+ */
97
+ transferMany(items: {
98
+ to: string;
99
+ value: number;
100
+ key: string;
101
+ }[]): Promise<{
102
+ tx_hash: string;
103
+ }>;
104
+ /** The chain's own minimum gas price, straight from `/blockchain_params` — measured, never assumed (finding 366). */
105
+ minGasPrice(): Promise<number | null>;
106
+ /** Verify an AIN transfer by tx hash: returns {from,to,value} if finalized/executed. */
107
+ verifyTransfer(txHash: string): Promise<{
108
+ from: string;
109
+ to: string;
110
+ value: number;
111
+ key: string;
112
+ } | null>;
113
+ /** Total AIN staked on the knowledge app (state/bandwidth budget is proportional to app stake). */
114
+ appStake(): Promise<number>;
115
+ /** Stake AIN on the knowledge app from this identity (apps on the free tier are capped at ~100 KB of state). */
116
+ stakeApp(amount: number): Promise<string>;
117
+ /**
118
+ * One-time app setup (run by the first node = app admin): ain-js setupApp() + market rules + app stake.
119
+ * Idempotent: if the app exists and we are not admin, only the stake top-up (if we can afford it) is attempted.
120
+ */
121
+ setupApp(opts?: {
122
+ stake?: number;
123
+ }): Promise<{
124
+ created: boolean;
125
+ tx?: string;
126
+ admin?: string;
127
+ staked?: number;
128
+ }>;
129
+ private setMarketRules;
130
+ /** The write rules this build sets, and the ones `verify()` holds the chain to. One table, so they cannot drift. */
131
+ static marketRules(): [string, string][];
132
+ append<T extends RecordBody>(kind: RecordKind, body: T): Promise<LedgerRecord<T>>;
133
+ /** Records are authoritative on-chain; peers don't push them to us. */
134
+ ingest(): Promise<boolean>;
135
+ /** Re-read the market subtree and rebuild the record cache. */
136
+ refresh(): Promise<void>;
137
+ list(opts?: {
138
+ since?: number;
139
+ kind?: RecordKind;
140
+ limit?: number;
141
+ }): Promise<LedgerRecord[]>;
142
+ get(hash: string): Promise<LedgerRecord<unknown> | null>;
143
+ hashes(since?: number): Promise<string[]>;
144
+ private byKind;
145
+ anchors(): Promise<LedgerRecord<PatchAnchor>[]>;
146
+ attestations(patchId?: string): Promise<LedgerRecord<Attestation>[]>;
147
+ settlements(patchId?: string): Promise<LedgerRecord<Settlement>[]>;
148
+ challenges(patchId?: string): Promise<LedgerRecord<Challenge>[]>;
149
+ disputes(patchId?: string): Promise<LedgerRecord<Dispute>[]>;
150
+ branches(): Promise<LedgerRecord<BranchInfo>[]>;
151
+ nodes(): Promise<LedgerRecord<PeerInfo>[]>;
152
+ supersedes(): Promise<LedgerRecord<SupersedeRecord>[]>;
153
+ subscriptions(): Promise<LedgerRecord<SubscriptionRecord>[]>;
154
+ /**
155
+ * What this node can actually check about the chain it trusts.
156
+ *
157
+ * Consensus guarantees that the records are the ones that were written. It guarantees nothing about WHO was
158
+ * allowed to write them: that is the rule engine, and the rules can only be set by the app admin — the address
159
+ * that happened to run `chain setup` first. This used to read one rule and only ask whether it existed, so an
160
+ * admin who relaxed `attestations` to let anyone sign anyone's verdict, or `patches` to let anyone overwrite
161
+ * anyone's anchor, changed the meaning of every record on the chain and no node said a word.
162
+ *
163
+ * So the rules are compared with the ones this build expects, and a difference is an error naming both. It is
164
+ * not a defence — an admin can still change them — but it is the difference between a silent change and a
165
+ * visible one, which is the most a participant can have while one address owns the rule engine.
166
+ */
167
+ verify(): Promise<{
168
+ valid: boolean;
169
+ checked: number;
170
+ errors: string[];
171
+ }>;
172
+ /**
173
+ * Buyer-side access receipt, exactly where ain-js `knowledge.access()` / `hasAccess()` look:
174
+ * /apps/knowledge/access/$buyer/{owner}_{topicKey}_{entryId} (write rule: auth.addr === $buyer).
175
+ */
176
+ recordAccess(anchor: PatchAnchor & {
177
+ entry_id?: string;
178
+ }, amount: string, currency: string, txHash: string): Promise<string | null>;
179
+ /** Has `buyer` an on-chain access receipt for this patch (ain-js hasAccess semantics)? */
180
+ hasAccess(buyer: string, anchor: PatchAnchor & {
181
+ entry_id?: string;
182
+ }): Promise<boolean>;
183
+ /** Knowledge-graph view (nodes/edges) straight from ain-js. */
184
+ graph(): Promise<{
185
+ nodes: Record<string, any>;
186
+ edges: Record<string, Record<string, any>>;
187
+ }>;
188
+ /** Access receipts of a buyer (ain-js). */
189
+ receipts(buyer: string): Promise<Record<string, any> | null>;
190
+ }
191
+ //# sourceMappingURL=ain-ledger.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ain-ledger.d.ts","sourceRoot":"","sources":["../src/ain-ledger.ts"],"names":[],"mappings":"AAuBA,OAAO,KAAK,EAAE,MAA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