@ottochain/sdk 2.2.4 → 2.3.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 (85) hide show
  1. package/dist/cjs/apps/contracts/state-machines/contract-agreement.js +54 -6
  2. package/dist/cjs/apps/contracts/state-machines/contract-escrow.js +72 -8
  3. package/dist/cjs/apps/contracts/state-machines/contract-universal.js +36 -4
  4. package/dist/cjs/apps/governance/state-machines/dao-multisig.js +27 -3
  5. package/dist/cjs/apps/governance/state-machines/dao-reputation.js +27 -3
  6. package/dist/cjs/apps/governance/state-machines/dao-single.js +27 -3
  7. package/dist/cjs/apps/governance/state-machines/dao-token.js +36 -4
  8. package/dist/cjs/apps/governance/state-machines/governance-simple.js +36 -4
  9. package/dist/cjs/apps/governance/state-machines/governance-universal.js +27 -3
  10. package/dist/cjs/apps/identity/state-machines/identity-agent.js +54 -6
  11. package/dist/cjs/apps/identity/state-machines/identity-oracle.js +45 -5
  12. package/dist/cjs/apps/identity/state-machines/identity-universal.js +27 -3
  13. package/dist/cjs/apps/markets/state-machines/market-auction.js +30 -6
  14. package/dist/cjs/apps/markets/state-machines/market-crowdfund.js +25 -5
  15. package/dist/cjs/apps/markets/state-machines/market-group-buy.js +29 -5
  16. package/dist/cjs/apps/markets/state-machines/market-prediction.js +40 -8
  17. package/dist/cjs/apps/markets/state-machines/market-universal.js +45 -5
  18. package/dist/cjs/generated/ottochain/v1/common.js +1722 -1
  19. package/dist/cjs/generated/ottochain/v1/fiber.js +352 -2
  20. package/dist/cjs/generated/ottochain/v1/messages.js +775 -3
  21. package/dist/cjs/generated/ottochain/v1/records.js +350 -3
  22. package/dist/cjs/index.js +5 -1
  23. package/dist/cjs/ottochain/genesis-manifest.js +193 -0
  24. package/dist/cjs/ottochain/index.js +5 -1
  25. package/dist/cjs/ottochain/normalize.js +26 -48
  26. package/dist/cjs/ottochain/types.js +4 -0
  27. package/dist/esm/apps/contracts/state-machines/contract-agreement.js +54 -6
  28. package/dist/esm/apps/contracts/state-machines/contract-escrow.js +72 -8
  29. package/dist/esm/apps/contracts/state-machines/contract-universal.js +36 -4
  30. package/dist/esm/apps/governance/state-machines/dao-multisig.js +27 -3
  31. package/dist/esm/apps/governance/state-machines/dao-reputation.js +27 -3
  32. package/dist/esm/apps/governance/state-machines/dao-single.js +27 -3
  33. package/dist/esm/apps/governance/state-machines/dao-token.js +36 -4
  34. package/dist/esm/apps/governance/state-machines/governance-simple.js +36 -4
  35. package/dist/esm/apps/governance/state-machines/governance-universal.js +27 -3
  36. package/dist/esm/apps/identity/state-machines/identity-agent.js +54 -6
  37. package/dist/esm/apps/identity/state-machines/identity-oracle.js +45 -5
  38. package/dist/esm/apps/identity/state-machines/identity-universal.js +27 -3
  39. package/dist/esm/apps/markets/state-machines/market-auction.js +30 -6
  40. package/dist/esm/apps/markets/state-machines/market-crowdfund.js +25 -5
  41. package/dist/esm/apps/markets/state-machines/market-group-buy.js +29 -5
  42. package/dist/esm/apps/markets/state-machines/market-prediction.js +40 -8
  43. package/dist/esm/apps/markets/state-machines/market-universal.js +45 -5
  44. package/dist/esm/generated/ottochain/v1/common.js +1718 -0
  45. package/dist/esm/generated/ottochain/v1/fiber.js +351 -1
  46. package/dist/esm/generated/ottochain/v1/messages.js +774 -2
  47. package/dist/esm/generated/ottochain/v1/records.js +349 -2
  48. package/dist/esm/index.js +2 -0
  49. package/dist/esm/ottochain/genesis-manifest.js +189 -0
  50. package/dist/esm/ottochain/index.js +2 -0
  51. package/dist/esm/ottochain/normalize.js +26 -48
  52. package/dist/esm/ottochain/types.js +4 -0
  53. package/dist/types/apps/contracts/index.d.ts +90 -18
  54. package/dist/types/apps/contracts/state-machines/contract-agreement.d.ts +30 -6
  55. package/dist/types/apps/contracts/state-machines/contract-escrow.d.ts +40 -8
  56. package/dist/types/apps/contracts/state-machines/contract-universal.d.ts +20 -4
  57. package/dist/types/apps/governance/index.d.ts +114 -33
  58. package/dist/types/apps/governance/state-machines/dao-multisig.d.ts +15 -3
  59. package/dist/types/apps/governance/state-machines/dao-reputation.d.ts +15 -3
  60. package/dist/types/apps/governance/state-machines/dao-single.d.ts +15 -3
  61. package/dist/types/apps/governance/state-machines/dao-token.d.ts +20 -4
  62. package/dist/types/apps/governance/state-machines/governance-simple.d.ts +20 -4
  63. package/dist/types/apps/governance/state-machines/governance-universal.d.ts +15 -3
  64. package/dist/types/apps/identity/index.d.ts +71 -6
  65. package/dist/types/apps/identity/state-machines/identity-agent.d.ts +30 -0
  66. package/dist/types/apps/identity/state-machines/identity-oracle.d.ts +25 -0
  67. package/dist/types/apps/identity/state-machines/identity-universal.d.ts +15 -0
  68. package/dist/types/apps/markets/index.d.ts +80 -5
  69. package/dist/types/apps/markets/state-machines/market-auction.d.ts +12 -0
  70. package/dist/types/apps/markets/state-machines/market-crowdfund.d.ts +10 -0
  71. package/dist/types/apps/markets/state-machines/market-group-buy.d.ts +14 -0
  72. package/dist/types/apps/markets/state-machines/market-prediction.d.ts +16 -0
  73. package/dist/types/apps/markets/state-machines/market-universal.d.ts +25 -5
  74. package/dist/types/generated/ottochain/v1/common.d.ts +228 -0
  75. package/dist/types/generated/ottochain/v1/fiber.d.ts +32 -1
  76. package/dist/types/generated/ottochain/v1/messages.d.ts +84 -0
  77. package/dist/types/generated/ottochain/v1/records.d.ts +34 -0
  78. package/dist/types/index.d.ts +3 -1
  79. package/dist/types/ottochain/genesis-manifest.d.ts +130 -0
  80. package/dist/types/ottochain/index.d.ts +3 -1
  81. package/dist/types/ottochain/normalize.d.ts +17 -25
  82. package/dist/types/ottochain/types.d.ts +288 -2
  83. package/dist/types/schema/fiber-app.d.ts +40 -1
  84. package/dist/types/validation.d.ts +17 -17
  85. package/package.json +30 -27
@@ -142,11 +142,11 @@ export declare const TransactionReferenceSchema: z.ZodObject<{
142
142
  ordinal: z.ZodNumber;
143
143
  hash: z.ZodString;
144
144
  }, "strip", z.ZodTypeAny, {
145
- ordinal: number;
146
145
  hash: string;
147
- }, {
148
146
  ordinal: number;
147
+ }, {
149
148
  hash: string;
149
+ ordinal: number;
150
150
  }>;
151
151
  /**
152
152
  * Schema for CurrencyTransactionValue
@@ -157,13 +157,13 @@ export declare const CurrencyTransactionValueSchema: z.ZodObject<{
157
157
  amount: z.ZodNumber;
158
158
  fee: z.ZodDefault<z.ZodNumber>;
159
159
  }, "strip", z.ZodTypeAny, {
160
- destination: string;
161
160
  amount: number;
161
+ destination: string;
162
162
  source: string;
163
163
  fee: number;
164
164
  }, {
165
- destination: string;
166
165
  amount: number;
166
+ destination: string;
167
167
  source: string;
168
168
  fee?: number | undefined;
169
169
  }>;
@@ -177,13 +177,13 @@ export declare const CurrencyTransactionSchema: z.ZodObject<{
177
177
  amount: z.ZodNumber;
178
178
  fee: z.ZodDefault<z.ZodNumber>;
179
179
  }, "strip", z.ZodTypeAny, {
180
- destination: string;
181
180
  amount: number;
181
+ destination: string;
182
182
  source: string;
183
183
  fee: number;
184
184
  }, {
185
- destination: string;
186
185
  amount: number;
186
+ destination: string;
187
187
  source: string;
188
188
  fee?: number | undefined;
189
189
  }>;
@@ -191,33 +191,33 @@ export declare const CurrencyTransactionSchema: z.ZodObject<{
191
191
  ordinal: z.ZodNumber;
192
192
  hash: z.ZodString;
193
193
  }, "strip", z.ZodTypeAny, {
194
- ordinal: number;
195
194
  hash: string;
196
- }, {
197
195
  ordinal: number;
196
+ }, {
198
197
  hash: string;
198
+ ordinal: number;
199
199
  }>;
200
200
  }, "strip", z.ZodTypeAny, {
201
201
  value: {
202
- destination: string;
203
202
  amount: number;
203
+ destination: string;
204
204
  source: string;
205
205
  fee: number;
206
206
  };
207
207
  parent: {
208
- ordinal: number;
209
208
  hash: string;
209
+ ordinal: number;
210
210
  };
211
211
  }, {
212
212
  value: {
213
- destination: string;
214
213
  amount: number;
214
+ destination: string;
215
215
  source: string;
216
216
  fee?: number | undefined;
217
217
  };
218
218
  parent: {
219
- ordinal: number;
220
219
  hash: string;
220
+ ordinal: number;
221
221
  };
222
222
  }>;
223
223
  /**
@@ -258,9 +258,9 @@ export declare const AgentIdentityRegistrationSchema: z.ZodObject<{
258
258
  /** Initial reputation (default: 10) */
259
259
  reputation: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
260
260
  }, "strip", z.ZodTypeAny, {
261
+ reputation: number;
261
262
  publicKey: string;
262
263
  displayName: string;
263
- reputation: number;
264
264
  }, {
265
265
  publicKey: string;
266
266
  displayName: string;
@@ -310,15 +310,15 @@ export declare const ProposeContractRequestSchema: z.ZodObject<{
310
310
  /** Human-readable description */
311
311
  description: z.ZodString;
312
312
  }, "strip", z.ZodTypeAny, {
313
+ description: string;
313
314
  proposer: string;
314
- counterparty: string;
315
315
  terms: Record<string, unknown>;
316
- description: string;
316
+ counterparty: string;
317
317
  }, {
318
+ description: string;
318
319
  proposer: string;
319
- counterparty: string;
320
320
  terms: Record<string, unknown>;
321
- description: string;
321
+ counterparty: string;
322
322
  }>;
323
323
  /**
324
324
  * Type for validated ProposeContractRequest
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ottochain/sdk",
3
- "version": "2.2.4",
3
+ "version": "2.3.0",
4
4
  "description": "TypeScript SDK for ottochain metagraph operations - signing, encoding, and network interactions",
5
5
  "main": "dist/cjs/index.js",
6
6
  "module": "dist/esm/index.js",
@@ -66,6 +66,24 @@
66
66
  "dist",
67
67
  "README.md"
68
68
  ],
69
+ "scripts": {
70
+ "build": "npm run prebuild && npm run build:cjs && npm run build:esm && npm run build:types && npm run build:fixup",
71
+ "build:fixup": "echo '{\"type\":\"module\"}' > dist/esm/package.json && echo '{\"type\":\"commonjs\"}' > dist/cjs/package.json",
72
+ "build:cjs": "tsc -p tsconfig.cjs.json",
73
+ "build:esm": "tsc -p tsconfig.esm.json",
74
+ "build:types": "tsc -p tsconfig.types.json",
75
+ "test": "jest",
76
+ "test:coverage": "jest --coverage",
77
+ "lint": "eslint src tests",
78
+ "format": "prettier --write src tests",
79
+ "generate": "buf generate",
80
+ "lint:proto": "buf lint",
81
+ "docs": "typedoc",
82
+ "docs:watch": "typedoc --watch",
83
+ "genesis:manifest": "npm run build && node scripts/emit-genesis-manifest.mjs genesis/std-manifest.json",
84
+ "prepare": "npm run build",
85
+ "prebuild": "node scripts/inline-json.mjs"
86
+ },
69
87
  "keywords": [
70
88
  "ottochain",
71
89
  "constellation",
@@ -88,31 +106,31 @@
88
106
  "url": "https://github.com/ottobot-ai/ottochain-sdk/issues"
89
107
  },
90
108
  "dependencies": {
91
- "@bufbuild/protobuf": "^2.11.0",
109
+ "@bufbuild/protobuf": "^2.12.0",
92
110
  "@constellation-network/metagraph-sdk": "^0.2.0",
93
111
  "@stardust-collective/dag4": "^2.6.0",
94
112
  "@stardust-collective/dag4-keystore": "^2.6.0",
95
- "canonicalize": "^2.1.0",
113
+ "canonicalize": "^3.0.0",
96
114
  "js-sha256": "^0.11.1",
97
115
  "js-sha512": "^0.9.0",
98
116
  "zod": "^3.22.0"
99
117
  },
100
118
  "devDependencies": {
101
119
  "@babel/preset-env": "^7.29.0",
102
- "@commitlint/cli": "^20.4.4",
120
+ "@commitlint/cli": "^20.5.2",
103
121
  "@commitlint/config-conventional": "^20.5.0",
104
122
  "@eslint/js": "^9.39.4",
105
123
  "@jest/globals": "^30.3.0",
106
124
  "@types/jest": "^30.0.0",
107
- "@types/node": "^25.5.0",
125
+ "@types/node": "^25.6.0",
108
126
  "@typescript-eslint/eslint-plugin": "^8.56.1",
109
- "@typescript-eslint/parser": "^8.57.1",
127
+ "@typescript-eslint/parser": "^8.59.0",
110
128
  "eslint": "^9.39.3",
111
129
  "jest": "^30.3.0",
112
- "prettier": "^3.0.0",
113
- "ts-jest": "^29.0.0",
114
- "ts-proto": "^2.11.5",
115
- "typedoc": "^0.28.17",
130
+ "prettier": "^3.8.3",
131
+ "ts-jest": "29.4.9",
132
+ "ts-proto": "^2.11.6",
133
+ "typedoc": "^0.28.19",
116
134
  "typescript": "^5.0.0"
117
135
  },
118
136
  "peerDependencies": {
@@ -124,20 +142,5 @@
124
142
  "publishConfig": {
125
143
  "registry": "https://registry.npmjs.org"
126
144
  },
127
- "scripts": {
128
- "build": "npm run prebuild && npm run build:cjs && npm run build:esm && npm run build:types && npm run build:fixup",
129
- "build:fixup": "echo '{\"type\":\"module\"}' > dist/esm/package.json && echo '{\"type\":\"commonjs\"}' > dist/cjs/package.json",
130
- "build:cjs": "tsc -p tsconfig.cjs.json",
131
- "build:esm": "tsc -p tsconfig.esm.json",
132
- "build:types": "tsc -p tsconfig.types.json",
133
- "test": "jest",
134
- "test:coverage": "jest --coverage",
135
- "lint": "eslint src tests",
136
- "format": "prettier --write src tests",
137
- "generate": "buf generate",
138
- "lint:proto": "buf lint",
139
- "docs": "typedoc",
140
- "docs:watch": "typedoc --watch",
141
- "prebuild": "node scripts/inline-json.mjs"
142
- }
143
- }
145
+ "packageManager": "pnpm@10.30.0"
146
+ }