@ottochain/sdk 2.2.0 → 2.2.2
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/dist/cjs/apps/contracts/state-machines/index.js +8 -1016
- package/dist/cjs/apps/corporate/state-machines/index.js +7 -17
- package/dist/cjs/apps/governance/state-machines/index.js +11 -12
- package/dist/cjs/apps/identity/state-machines/index.js +3 -10
- package/dist/cjs/apps/markets/state-machines/index.js +7 -8
- package/dist/cjs/index.js +5 -1
- package/dist/cjs/schema/fiber-app.js +4 -3
- package/dist/esm/apps/contracts/state-machines/index.js +5 -1016
- package/dist/esm/apps/corporate/state-machines/index.js +6 -16
- package/dist/esm/apps/governance/state-machines/index.js +8 -9
- package/dist/esm/apps/identity/state-machines/index.js +5 -12
- package/dist/esm/apps/markets/state-machines/index.js +7 -8
- package/dist/esm/index.js +2 -0
- package/dist/esm/schema/fiber-app.js +4 -3
- package/dist/types/apps/contracts/index.d.ts +1058 -743
- package/dist/types/apps/contracts/state-machines/index.d.ts +5 -799
- package/dist/types/apps/corporate/index.d.ts +5 -6
- package/dist/types/apps/corporate/state-machines/index.d.ts +6 -5447
- package/dist/types/apps/governance/index.d.ts +30 -36
- package/dist/types/apps/governance/state-machines/index.d.ts +8 -9
- package/dist/types/apps/identity/index.d.ts +3 -1
- package/dist/types/apps/identity/state-machines/index.d.ts +5 -1096
- package/dist/types/apps/markets/index.d.ts +8 -6
- package/dist/types/apps/markets/state-machines/index.d.ts +7 -8
- package/dist/types/index.d.ts +1 -0
- 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):
|
|
2239
|
+
export declare function getMarketDefinition(type?: MarketDefType): FiberAppDefinition;
|
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Markets
|
|
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 {
|
|
7
|
-
export {
|
|
8
|
-
export {
|
|
9
|
-
export {
|
|
10
|
-
export {
|
|
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';
|
package/dist/types/index.d.ts
CHANGED
|
@@ -29,3 +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, defineFiberApp, type ProtoStateMachineDefinition, type FiberAppDefinition, type FiberAppMetadata, type StateDefinition, type Transition, } from './schema/fiber-app.js';
|
package/package.json
CHANGED