@ottochain/sdk 2.2.1 → 2.2.3

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 (28) hide show
  1. package/dist/cjs/apps/contracts/state-machines/index.js +8 -1016
  2. package/dist/cjs/apps/corporate/state-machines/index.js +7 -17
  3. package/dist/cjs/apps/governance/state-machines/index.js +11 -12
  4. package/dist/cjs/apps/identity/state-machines/index.js +3 -10
  5. package/dist/cjs/apps/markets/state-machines/index.js +7 -8
  6. package/dist/cjs/index.js +2 -1
  7. package/dist/cjs/ottochain/normalize.js +17 -1
  8. package/dist/cjs/schema/fiber-app.js +4 -3
  9. package/dist/esm/apps/contracts/state-machines/index.js +5 -1016
  10. package/dist/esm/apps/corporate/state-machines/index.js +6 -16
  11. package/dist/esm/apps/governance/state-machines/index.js +8 -9
  12. package/dist/esm/apps/identity/state-machines/index.js +5 -12
  13. package/dist/esm/apps/markets/state-machines/index.js +7 -8
  14. package/dist/esm/index.js +1 -1
  15. package/dist/esm/ottochain/normalize.js +17 -1
  16. package/dist/esm/schema/fiber-app.js +4 -3
  17. package/dist/types/apps/contracts/index.d.ts +1058 -743
  18. package/dist/types/apps/contracts/state-machines/index.d.ts +5 -799
  19. package/dist/types/apps/corporate/index.d.ts +5 -6
  20. package/dist/types/apps/corporate/state-machines/index.d.ts +6 -5447
  21. package/dist/types/apps/governance/index.d.ts +30 -36
  22. package/dist/types/apps/governance/state-machines/index.d.ts +8 -9
  23. package/dist/types/apps/identity/index.d.ts +3 -1
  24. package/dist/types/apps/identity/state-machines/index.d.ts +5 -1096
  25. package/dist/types/apps/markets/index.d.ts +8 -6
  26. package/dist/types/apps/markets/state-machines/index.d.ts +7 -8
  27. package/dist/types/index.d.ts +1 -1
  28. package/package.json +1 -1
@@ -21,6 +21,7 @@
21
21
  */
22
22
  export { MarketType, MarketState, Commitment, Resolution, Market, CreateMarketRequest, CommitToMarketRequest, SubmitResolutionRequest, CancelMarketRequest, MarketDefinition, marketTypeFromJSON, marketTypeToJSON, marketStateFromJSON, marketStateToJSON, } from "../../generated/ottochain/apps/markets/v1/market.js";
23
23
  import { marketUniversalDef, marketPredictionDef, marketAuctionDef, marketCrowdfundDef, marketGroupBuyDef } from "./state-machines/index.js";
24
+ import type { FiberAppDefinition } from "../../schema/fiber-app.js";
24
25
  export { marketUniversalDef, marketPredictionDef, marketAuctionDef, marketCrowdfundDef, marketGroupBuyDef, };
25
26
  /** All market state machine definitions */
26
27
  export declare const MARKETS_DEFINITIONS: {
@@ -938,14 +939,15 @@ export declare const MARKETS_DEFINITIONS: {
938
939
  readonly computed: true;
939
940
  };
940
941
  };
941
- }; /**
942
- * Get a market state machine definition by type.
943
- * @param type - 'universal' | 'prediction' | 'auction' | 'crowdfund' | 'groupBuy' (default: 'universal')
944
- */
942
+ };
945
943
  readonly eventSchemas: {
946
944
  readonly open: {
947
945
  readonly description: "Open the auction";
948
946
  };
947
+ /**
948
+ * Get a market state machine definition by type.
949
+ * @param type - 'universal' | 'prediction' | 'auction' | 'crowdfund' | 'groupBuy' (default: 'universal')
950
+ */
949
951
  readonly cancel: {
950
952
  readonly description: "Cancel the auction";
951
953
  };
@@ -1741,7 +1743,7 @@ export declare const MARKETS_DEFINITIONS: {
1741
1743
  readonly stateSchema: {
1742
1744
  readonly properties: {
1743
1745
  readonly status: {
1744
- readonly type: "string";
1746
+ readonly type: "string"; /** All market state machine definitions */
1745
1747
  readonly computed: true;
1746
1748
  };
1747
1749
  readonly organizer: {
@@ -2234,4 +2236,4 @@ export type MarketDefType = keyof typeof MARKETS_DEFINITIONS;
2234
2236
  * Get a market state machine definition by type.
2235
2237
  * @param type - 'universal' | 'prediction' | 'auction' | 'crowdfund' | 'groupBuy' (default: 'universal')
2236
2238
  */
2237
- export declare function getMarketDefinition(type?: MarketDefType): unknown;
2239
+ export declare function getMarketDefinition(type?: MarketDefType): FiberAppDefinition;
@@ -1,10 +1,9 @@
1
1
  /**
2
- * Markets State Machine Definitions
3
- *
4
- * TypeScript-first definitions using defineFiberApp() - no JSON, no code generation.
2
+ * Markets state machine definitions.
3
+ * Re-exports from TypeScript definition files.
5
4
  */
6
- export { marketUniversalDef } from "./market-universal.js";
7
- export { marketPredictionDef } from "./market-prediction.js";
8
- export { marketAuctionDef } from "./market-auction.js";
9
- export { marketCrowdfundDef } from "./market-crowdfund.js";
10
- export { marketGroupBuyDef } from "./market-group-buy.js";
5
+ export { marketAuctionDef } from './market-auction.js';
6
+ export { marketCrowdfundDef } from './market-crowdfund.js';
7
+ export { marketGroupBuyDef } from './market-group-buy.js';
8
+ export { marketPredictionDef } from './market-prediction.js';
9
+ export { marketUniversalDef } from './market-universal.js';
@@ -29,4 +29,4 @@ export { OttoChainError, NetworkError, ValidationError, SigningError, Transactio
29
29
  export { DagAddressSchema, PrivateKeySchema, PublicKeySchema, KeyPairSchema, SignatureProofSchema, SignedSchema, TransactionReferenceSchema, CurrencyTransactionValueSchema, CurrencyTransactionSchema, TransferParamsSchema, AgentIdentityRegistrationSchema, PlatformLinkSchema, ContractTermsSchema, ProposeContractRequestSchema, AcceptContractRequestSchema, CompleteContractRequestSchema, validate, validatePrivateKey, validatePublicKey, validateAddress, validateKeyPair, safeParse, assert, type ValidatedKeyPair, type ValidatedSignatureProof, type ValidatedCurrencyTransaction, type ValidatedTransferParams, type ValidatedAgentIdentityRegistration, type ValidatedPlatformLink, type ValidatedProposeContractRequest, type ValidatedAcceptContractRequest, type ValidatedCompleteContractRequest, } from './validation.js';
30
30
  export { MetagraphClient as OttoMetagraphClient } from './ottochain/metagraph-client.js';
31
31
  export type { MetagraphClientConfig, Checkpoint, SubscribeOptions, FiberStateCallback, Unsubscribe, } from './ottochain/metagraph-client.js';
32
- export { toProtoDefinition, type ProtoStateMachineDefinition } from './schema/fiber-app.js';
32
+ export { toProtoDefinition, defineFiberApp, type ProtoStateMachineDefinition, type FiberAppDefinition, type FiberAppMetadata, type StateDefinition, type Transition, } from './schema/fiber-app.js';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ottochain/sdk",
3
- "version": "2.2.1",
3
+ "version": "2.2.3",
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",