@polyester/sdk 0.30.1 → 0.30.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/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # @polyester/sdk
2
2
 
3
+ ## 0.30.2
4
+
5
+ ### Patch Changes
6
+
7
+ - `patchZipperCatalogSupply` caches the snapshot it returns as already validated, so passing it to `catalog.setSnapshot` no longer re-validates the whole catalog on every supply update. ([#191](https://github.com/Fabric-Labs/polyester-sdk-typescript/pull/191))
8
+
3
9
  ## 0.30.1
4
10
 
5
11
  ### Patch Changes
@@ -124,6 +124,11 @@ function parseCatalogSnapshot(value) {
124
124
  parsedSnapshots.set(snapshot, snapshot);
125
125
  return snapshot;
126
126
  }
127
+ /** Caches a snapshot built only from already-parsed parts so later parses skip validation. */
128
+ function markCatalogSnapshotParsed(snapshot) {
129
+ parsedSnapshots.set(snapshot, snapshot);
130
+ return snapshot;
131
+ }
127
132
  /** Parses supply updates before they can advance a snapshot's version or timestamp. */
128
133
  function parseZippedAssetSupplyCatalogUpdates(value) {
129
134
  const result = v.safeParse(ZippedAssetSupplyCatalogUpdatesSchema, value);
@@ -131,6 +136,6 @@ function parseZippedAssetSupplyCatalogUpdates(value) {
131
136
  return result.output;
132
137
  }
133
138
  //#endregion
134
- export { CatalogSnapshotShapeSchema, parseCatalogSnapshot, parseZippedAssetSupplyCatalogUpdates };
139
+ export { CatalogSnapshotShapeSchema, markCatalogSnapshotParsed, parseCatalogSnapshot, parseZippedAssetSupplyCatalogUpdates };
135
140
 
136
141
  //# sourceMappingURL=snapshot-validation.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"snapshot-validation.js","names":[],"sources":["../../src/catalogs/snapshot-validation.ts"],"sourcesContent":["import * as v from \"valibot\";\nimport { ValidationError } from \"../shared/errors.js\";\nimport { PAIR_STATUSES } from \"../shared/catalog-config.js\";\nimport type { CatalogSnapshot } from \"./types.js\";\nimport type { ZippedAssetSupplyCatalogUpdate } from \"./zipper-supply.js\";\n\nconst FiniteNumberSchema = v.pipe(v.number(), v.finite());\nconst IntegerSchema = v.pipe(FiniteNumberSchema, v.safeInteger());\n\nconst AssetConfigSchema = v.object({\n symbol: v.string(),\n ledgerId: IntegerSchema,\n name: v.string(),\n quantityDisplayDecimals: IntegerSchema,\n quantityScale: IntegerSchema,\n marketDataVolumeScale: v.optional(IntegerSchema),\n});\n\nconst PairMarketDataConfigSchema = v.object({\n orderbookPriceBuckets: v.array(FiniteNumberSchema),\n});\n\nconst EnrichedPairConfigSchema = v.object({\n symbolId: IntegerSchema,\n symbol: v.string(),\n baseAsset: AssetConfigSchema,\n quoteAsset: AssetConfigSchema,\n tickSize: v.string(),\n stepSize: v.string(),\n minNotionalQuote: v.string(),\n minQtyBase: v.string(),\n allowBuyFeeFromBase: v.boolean(),\n defaultMarketSlippagePctBuy: FiniteNumberSchema,\n defaultMarketSlippagePctSell: FiniteNumberSchema,\n maxClientRefDriftPct: FiniteNumberSchema,\n baseQuantityScale: v.optional(IntegerSchema),\n quoteQuantityScale: v.optional(IntegerSchema),\n referencePriceScale: v.optional(IntegerSchema),\n marketdata: v.optional(PairMarketDataConfigSchema),\n listingAt: v.nullable(FiniteNumberSchema),\n delistingAt: v.nullable(FiniteNumberSchema),\n status: v.picklist([...PAIR_STATUSES, \"unknown\"]),\n});\n\nconst ZipperChainConfigSchema = v.object({\n chainId: IntegerSchema,\n code: v.string(),\n name: v.string(),\n nativeChainId: v.string(),\n nativeCurrencySymbol: v.string(),\n explorerUrl: v.string(),\n icon: v.string(),\n requiredConfirmations: IntegerSchema,\n confirmationTimeSeconds: IntegerSchema,\n isCaseSensitive: v.boolean(),\n minAddressLength: IntegerSchema,\n maxAddressLength: IntegerSchema,\n});\n\nconst ZipperTokenConfigSchema = v.object({\n address: v.string(),\n decimals: IntegerSchema,\n});\n\nconst ZipperEnrichedAssetChainSchema = v.object({\n ...ZipperChainConfigSchema.entries,\n zippedAssetId: IntegerSchema,\n isNativeAsset: v.boolean(),\n networkFee: v.optional(v.string()),\n networkFeeTsSec: v.optional(FiniteNumberSchema),\n depositMinAmount: v.optional(v.string()),\n withdrawMinAmount: v.optional(v.string()),\n supply: v.optional(v.string()),\n sourceToken: ZipperTokenConfigSchema,\n zToken: ZipperTokenConfigSchema,\n});\n\nconst ZipperEnrichedAssetConfigSchema = v.object({\n asset: v.string(),\n ledgerId: IntegerSchema,\n name: v.string(),\n icon: v.string(),\n quantityScale: IntegerSchema,\n quantityDisplayDecimals: IntegerSchema,\n uAssetId: v.string(),\n chains: v.array(ZipperEnrichedAssetChainSchema),\n});\n\nconst ZipperChainContractConfigSchema = v.object({\n name: v.string(),\n address: v.string(),\n type: v.string(),\n description: v.string(),\n version: IntegerSchema,\n});\n\nexport const CatalogSnapshotShapeSchema = v.object({\n source: v.picklist([\"api\", \"snapshot\"]),\n tsMs: FiniteNumberSchema,\n version: IntegerSchema,\n market: v.object({\n assets: v.array(AssetConfigSchema),\n pairs: v.array(EnrichedPairConfigSchema),\n tsSec: v.optional(FiniteNumberSchema),\n }),\n zipper: v.object({\n chains: v.array(ZipperChainConfigSchema),\n assets: v.array(ZipperEnrichedAssetConfigSchema),\n contracts: v.array(ZipperChainContractConfigSchema),\n tsMs: v.optional(FiniteNumberSchema),\n }),\n});\n\nconst ZippedAssetSupplyCatalogUpdatesSchema = v.array(\n v.object({\n zippedAssetId: IntegerSchema,\n supply: v.string(),\n }),\n);\n\nconst parsedSnapshots = new WeakMap<object, CatalogSnapshot>();\n\nfunction hasValidRelationships(\n snapshot: v.InferOutput<typeof CatalogSnapshotShapeSchema>,\n): boolean {\n const assetSymbols = new Set(snapshot.market.assets.map((asset) => asset.symbol));\n if (\n snapshot.market.pairs.some(\n (pair) =>\n !assetSymbols.has(pair.baseAsset.symbol) ||\n !assetSymbols.has(pair.quoteAsset.symbol),\n )\n ) {\n return false;\n }\n\n const chainIds = new Set(snapshot.zipper.chains.map((chain) => chain.chainId));\n return snapshot.zipper.assets.every((asset) =>\n asset.chains.every((chain) => chainIds.has(chain.chainId)),\n );\n}\n\nconst CatalogSnapshotSchema = v.custom<CatalogSnapshot>((value) => {\n const result = v.safeParse(CatalogSnapshotShapeSchema, value);\n return result.success && hasValidRelationships(result.output);\n});\n\n/** Parses and caches untrusted SSR or JavaScript input as a catalog snapshot. */\nexport function parseCatalogSnapshot(value: unknown): CatalogSnapshot {\n if (typeof value !== \"object\" || value === null) {\n throw new ValidationError(\"Catalog snapshot is malformed.\");\n }\n\n const cached = parsedSnapshots.get(value);\n if (cached) return cached;\n\n const result = v.safeParse(CatalogSnapshotSchema, value);\n if (!result.success) {\n throw new ValidationError(\"Catalog snapshot is malformed.\");\n }\n\n const snapshot: CatalogSnapshot = result.output;\n parsedSnapshots.set(value, snapshot);\n parsedSnapshots.set(snapshot, snapshot);\n return snapshot;\n}\n\n/** Parses supply updates before they can advance a snapshot's version or timestamp. */\nexport function parseZippedAssetSupplyCatalogUpdates(\n value: unknown,\n): readonly ZippedAssetSupplyCatalogUpdate[] {\n const result = v.safeParse(ZippedAssetSupplyCatalogUpdatesSchema, value);\n if (!result.success) {\n throw new ValidationError(\"Zipper catalog supply updates are malformed.\");\n }\n return result.output;\n}\n"],"mappings":";;;;AAMA,MAAM,qBAAqB,EAAE,KAAK,EAAE,OAAO,GAAG,EAAE,OAAO,CAAC;AACxD,MAAM,gBAAgB,EAAE,KAAK,oBAAoB,EAAE,YAAY,CAAC;AAEhE,MAAM,oBAAoB,EAAE,OAAO;CAC/B,QAAQ,EAAE,OAAO;CACjB,UAAU;CACV,MAAM,EAAE,OAAO;CACf,yBAAyB;CACzB,eAAe;CACf,uBAAuB,EAAE,SAAS,aAAa;AACnD,CAAC;AAED,MAAM,6BAA6B,EAAE,OAAO,EACxC,uBAAuB,EAAE,MAAM,kBAAkB,EACrD,CAAC;AAED,MAAM,2BAA2B,EAAE,OAAO;CACtC,UAAU;CACV,QAAQ,EAAE,OAAO;CACjB,WAAW;CACX,YAAY;C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D;AACJ;AAEA,MAAM,wBAAwB,EAAE,QAAyB,UAAU;CAC/D,MAAM,SAAS,EAAE,UAAU,4BAA4B,KAAK;CAC5D,OAAO,OAAO,WAAW,sBAAsB,OAAO,MAAM;AAChE,CAAC;;AAGD,SAAgB,qBAAqB,OAAiC;CAClE,IAAI,OAAO,UAAU,YAAY,UAAU,MACvC,MAAM,IAAI,gBAAgB,gCAAgC;CAG9D,MAAM,SAAS,gBAAgB,IAAI,KAAK;CACxC,IAAI,QAAQ,OAAO;CAEnB,MAAM,SAAS,EAAE,UAAU,uBAAuB,KAAK;CACvD,IAAI,CAAC,OAAO,SACR,MAAM,IAAI,gBAAgB,gCAAgC;CAG9D,MAAM,WAA4B,OAAO;CACzC,gBAAgB,IAAI,OAAO,QAAQ;CACnC,gBAAgB,IAAI,UAAU,QAAQ;CACtC,OAAO;AACX;;AAGA,SAAgB,qCACZ,OACyC;CACzC,MAAM,SAAS,EAAE,UAAU,uCAAuC,KAAK;CACvE,IAAI,CAAC,OAAO,SACR,MAAM,IAAI,gBAAgB,8CAA8C;CAE5E,OAAO,OAAO;AAClB"}
1
+ {"version":3,"file":"snapshot-validation.js","names":[],"sources":["../../src/catalogs/snapshot-validation.ts"],"sourcesContent":["import * as v from \"valibot\";\nimport { ValidationError } from \"../shared/errors.js\";\nimport { PAIR_STATUSES } from \"../shared/catalog-config.js\";\nimport type { CatalogSnapshot } from \"./types.js\";\nimport type { ZippedAssetSupplyCatalogUpdate } from \"./zipper-supply.js\";\n\nconst FiniteNumberSchema = v.pipe(v.number(), v.finite());\nconst IntegerSchema = v.pipe(FiniteNumberSchema, v.safeInteger());\n\nconst AssetConfigSchema = v.object({\n symbol: v.string(),\n ledgerId: IntegerSchema,\n name: v.string(),\n quantityDisplayDecimals: IntegerSchema,\n quantityScale: IntegerSchema,\n marketDataVolumeScale: v.optional(IntegerSchema),\n});\n\nconst PairMarketDataConfigSchema = v.object({\n orderbookPriceBuckets: v.array(FiniteNumberSchema),\n});\n\nconst EnrichedPairConfigSchema = v.object({\n symbolId: IntegerSchema,\n symbol: v.string(),\n baseAsset: AssetConfigSchema,\n quoteAsset: AssetConfigSchema,\n tickSize: v.string(),\n stepSize: v.string(),\n minNotionalQuote: v.string(),\n minQtyBase: v.string(),\n allowBuyFeeFromBase: v.boolean(),\n defaultMarketSlippagePctBuy: FiniteNumberSchema,\n defaultMarketSlippagePctSell: FiniteNumberSchema,\n maxClientRefDriftPct: FiniteNumberSchema,\n baseQuantityScale: v.optional(IntegerSchema),\n quoteQuantityScale: v.optional(IntegerSchema),\n referencePriceScale: v.optional(IntegerSchema),\n marketdata: v.optional(PairMarketDataConfigSchema),\n listingAt: v.nullable(FiniteNumberSchema),\n delistingAt: v.nullable(FiniteNumberSchema),\n status: v.picklist([...PAIR_STATUSES, \"unknown\"]),\n});\n\nconst ZipperChainConfigSchema = v.object({\n chainId: IntegerSchema,\n code: v.string(),\n name: v.string(),\n nativeChainId: v.string(),\n nativeCurrencySymbol: v.string(),\n explorerUrl: v.string(),\n icon: v.string(),\n requiredConfirmations: IntegerSchema,\n confirmationTimeSeconds: IntegerSchema,\n isCaseSensitive: v.boolean(),\n minAddressLength: IntegerSchema,\n maxAddressLength: IntegerSchema,\n});\n\nconst ZipperTokenConfigSchema = v.object({\n address: v.string(),\n decimals: IntegerSchema,\n});\n\nconst ZipperEnrichedAssetChainSchema = v.object({\n ...ZipperChainConfigSchema.entries,\n zippedAssetId: IntegerSchema,\n isNativeAsset: v.boolean(),\n networkFee: v.optional(v.string()),\n networkFeeTsSec: v.optional(FiniteNumberSchema),\n depositMinAmount: v.optional(v.string()),\n withdrawMinAmount: v.optional(v.string()),\n supply: v.optional(v.string()),\n sourceToken: ZipperTokenConfigSchema,\n zToken: ZipperTokenConfigSchema,\n});\n\nconst ZipperEnrichedAssetConfigSchema = v.object({\n asset: v.string(),\n ledgerId: IntegerSchema,\n name: v.string(),\n icon: v.string(),\n quantityScale: IntegerSchema,\n quantityDisplayDecimals: IntegerSchema,\n uAssetId: v.string(),\n chains: v.array(ZipperEnrichedAssetChainSchema),\n});\n\nconst ZipperChainContractConfigSchema = v.object({\n name: v.string(),\n address: v.string(),\n type: v.string(),\n description: v.string(),\n version: IntegerSchema,\n});\n\nexport const CatalogSnapshotShapeSchema = v.object({\n source: v.picklist([\"api\", \"snapshot\"]),\n tsMs: FiniteNumberSchema,\n version: IntegerSchema,\n market: v.object({\n assets: v.array(AssetConfigSchema),\n pairs: v.array(EnrichedPairConfigSchema),\n tsSec: v.optional(FiniteNumberSchema),\n }),\n zipper: v.object({\n chains: v.array(ZipperChainConfigSchema),\n assets: v.array(ZipperEnrichedAssetConfigSchema),\n contracts: v.array(ZipperChainContractConfigSchema),\n tsMs: v.optional(FiniteNumberSchema),\n }),\n});\n\nconst ZippedAssetSupplyCatalogUpdatesSchema = v.array(\n v.object({\n zippedAssetId: IntegerSchema,\n supply: v.string(),\n }),\n);\n\nconst parsedSnapshots = new WeakMap<object, CatalogSnapshot>();\n\nfunction hasValidRelationships(\n snapshot: v.InferOutput<typeof CatalogSnapshotShapeSchema>,\n): boolean {\n const assetSymbols = new Set(snapshot.market.assets.map((asset) => asset.symbol));\n if (\n snapshot.market.pairs.some(\n (pair) =>\n !assetSymbols.has(pair.baseAsset.symbol) ||\n !assetSymbols.has(pair.quoteAsset.symbol),\n )\n ) {\n return false;\n }\n\n const chainIds = new Set(snapshot.zipper.chains.map((chain) => chain.chainId));\n return snapshot.zipper.assets.every((asset) =>\n asset.chains.every((chain) => chainIds.has(chain.chainId)),\n );\n}\n\nconst CatalogSnapshotSchema = v.custom<CatalogSnapshot>((value) => {\n const result = v.safeParse(CatalogSnapshotShapeSchema, value);\n return result.success && hasValidRelationships(result.output);\n});\n\n/** Parses and caches untrusted SSR or JavaScript input as a catalog snapshot. */\nexport function parseCatalogSnapshot(value: unknown): CatalogSnapshot {\n if (typeof value !== \"object\" || value === null) {\n throw new ValidationError(\"Catalog snapshot is malformed.\");\n }\n\n const cached = parsedSnapshots.get(value);\n if (cached) return cached;\n\n const result = v.safeParse(CatalogSnapshotSchema, value);\n if (!result.success) {\n throw new ValidationError(\"Catalog snapshot is malformed.\");\n }\n\n const snapshot: CatalogSnapshot = result.output;\n parsedSnapshots.set(value, snapshot);\n parsedSnapshots.set(snapshot, snapshot);\n return snapshot;\n}\n\n/** Caches a snapshot built only from already-parsed parts so later parses skip validation. */\nexport function markCatalogSnapshotParsed(snapshot: CatalogSnapshot): CatalogSnapshot {\n parsedSnapshots.set(snapshot, snapshot);\n return snapshot;\n}\n\n/** Parses supply updates before they can advance a snapshot's version or timestamp. */\nexport function parseZippedAssetSupplyCatalogUpdates(\n value: unknown,\n): readonly ZippedAssetSupplyCatalogUpdate[] {\n const result = v.safeParse(ZippedAssetSupplyCatalogUpdatesSchema, value);\n if (!result.success) {\n throw new ValidationError(\"Zipper catalog supply updates are malformed.\");\n }\n return result.output;\n}\n"],"mappings":";;;;AAMA,MAAM,qBAAqB,EAAE,KAAK,EAAE,OAAO,GAAG,EAAE,OAAO,CAAC;AACxD,MAAM,gBAAgB,EAAE,KAAK,oBAAoB,EAAE,YAAY,CAAC;AAEhE,MAAM,oBAAoB,EAAE,OAAO;CAC/B,QAAQ,EAAE,OAAO;CACjB,UAAU;CACV,MAAM,EAAE,OAAO;CACf,yBAAyB;CACzB,eAAe;CACf,uBAAuB,EAAE,SAAS,aAAa;AACnD,CAAC;AAED,MAAM,6BAA6B,EAAE,OAAO,EACxC,uBAAuB,EAAE,MAAM,kBAAkB,EACrD,CAAC;AAED,MAAM,2BAA2B,EAAE,OAAO;CACtC,UAAU;CACV,QAAQ,EAAE,OAAO;CACjB,WAAW;CACX,YAAY;CACZ,UAAU,EAAE,OAAO;CACnB,UAAU,EAAE,OAAO;CACnB,kBAAkB,EAAE,OAAO;CAC3B,YAAY,EAAE,OAAO;CACrB,qBAAqB,EAAE,QAAQ;CAC/B,6BAA6B;CAC7B,8BAA8B;CAC9B,sBAAsB;CACtB,mBAAmB,EAAE,SAAS,aAAa;C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AAY,UAAU,MACvC,MAAM,IAAI,gBAAgB,gCAAgC;CAG9D,MAAM,SAAS,gBAAgB,IAAI,KAAK;CACxC,IAAI,QAAQ,OAAO;CAEnB,MAAM,SAAS,EAAE,UAAU,uBAAuB,KAAK;CACvD,IAAI,CAAC,OAAO,SACR,MAAM,IAAI,gBAAgB,gCAAgC;CAG9D,MAAM,WAA4B,OAAO;CACzC,gBAAgB,IAAI,OAAO,QAAQ;CACnC,gBAAgB,IAAI,UAAU,QAAQ;CACtC,OAAO;AACX;;AAGA,SAAgB,0BAA0B,UAA4C;CAClF,gBAAgB,IAAI,UAAU,QAAQ;CACtC,OAAO;AACX;;AAGA,SAAgB,qCACZ,OACyC;CACzC,MAAM,SAAS,EAAE,UAAU,uCAAuC,KAAK;CACvE,IAAI,CAAC,OAAO,SACR,MAAM,IAAI,gBAAgB,8CAA8C;CAE5E,OAAO,OAAO;AAClB"}
@@ -1 +1 @@
1
- {"version":3,"file":"zipper-supply.d.ts","names":[],"sources":["../../src/catalogs/zipper-supply.ts"],"mappings":";;KAMY;EACR;EACA;;iBAGY,yBACZ,UAAU,iBACV,kBAAkB,mCACnB"}
1
+ {"version":3,"file":"zipper-supply.d.ts","names":[],"sources":["../../src/catalogs/zipper-supply.ts"],"mappings":";;KAOY;EACR;EACA;;iBAGY,yBACZ,UAAU,iBACV,kBAAkB,mCACnB"}
@@ -1,4 +1,4 @@
1
- import { parseCatalogSnapshot, parseZippedAssetSupplyCatalogUpdates } from "./snapshot-validation.js";
1
+ import { markCatalogSnapshotParsed, parseCatalogSnapshot, parseZippedAssetSupplyCatalogUpdates } from "./snapshot-validation.js";
2
2
  //#region src/catalogs/zipper-supply.ts
3
3
  function patchZipperCatalogSupply(snapshot, updates) {
4
4
  const parsedSnapshot = parseCatalogSnapshot(snapshot);
@@ -26,7 +26,7 @@ function patchZipperCatalogSupply(snapshot, updates) {
26
26
  });
27
27
  if (!changed) return parsedSnapshot;
28
28
  const nowMs = Date.now();
29
- return {
29
+ return markCatalogSnapshotParsed({
30
30
  ...parsedSnapshot,
31
31
  tsMs: nowMs,
32
32
  version: parsedSnapshot.version + 1,
@@ -35,7 +35,7 @@ function patchZipperCatalogSupply(snapshot, updates) {
35
35
  tsMs: nowMs,
36
36
  assets
37
37
  }
38
- };
38
+ });
39
39
  }
40
40
  //#endregion
41
41
  export { patchZipperCatalogSupply };
@@ -1 +1 @@
1
- {"version":3,"file":"zipper-supply.js","names":[],"sources":["../../src/catalogs/zipper-supply.ts"],"sourcesContent":["import type { CatalogSnapshot } from \"./types.js\";\nimport {\n parseCatalogSnapshot,\n parseZippedAssetSupplyCatalogUpdates,\n} from \"./snapshot-validation.js\";\n\nexport type ZippedAssetSupplyCatalogUpdate = {\n zippedAssetId: number;\n supply: string;\n};\n\nexport function patchZipperCatalogSupply(\n snapshot: CatalogSnapshot,\n updates: readonly ZippedAssetSupplyCatalogUpdate[],\n): CatalogSnapshot {\n const parsedSnapshot = parseCatalogSnapshot(snapshot);\n const parsedUpdates = parseZippedAssetSupplyCatalogUpdates(updates);\n if (parsedUpdates.length === 0) return parsedSnapshot;\n\n const supplyByZippedAssetId = new Map<number, string>();\n for (const update of parsedUpdates) {\n supplyByZippedAssetId.set(update.zippedAssetId, update.supply);\n }\n\n let changed = false;\n const assets = parsedSnapshot.zipper.assets.map((asset) => {\n let assetChanged = false;\n const chains = asset.chains.map((chain) => {\n const supply = supplyByZippedAssetId.get(chain.zippedAssetId);\n if (supply === undefined || supply === chain.supply) return chain;\n assetChanged = true;\n changed = true;\n return { ...chain, supply };\n });\n\n return assetChanged ? { ...asset, chains } : asset;\n });\n\n if (!changed) return parsedSnapshot;\n const nowMs = Date.now();\n\n return {\n ...parsedSnapshot,\n tsMs: nowMs,\n version: parsedSnapshot.version + 1,\n zipper: {\n ...parsedSnapshot.zipper,\n tsMs: nowMs,\n assets,\n },\n };\n}\n"],"mappings":";;AAWA,SAAgB,yBACZ,UACA,SACe;CACf,MAAM,iBAAiB,qBAAqB,QAAQ;CACpD,MAAM,gBAAgB,qCAAqC,OAAO;CAClE,IAAI,cAAc,WAAW,GAAG,OAAO;CAEvC,MAAM,wCAAwB,IAAI,IAAoB;CACtD,KAAK,MAAM,UAAU,eACjB,sBAAsB,IAAI,OAAO,eAAe,OAAO,MAAM;CAGjE,IAAI,UAAU;CACd,MAAM,SAAS,eAAe,OAAO,OAAO,KAAK,UAAU;EACvD,IAAI,eAAe;EACnB,MAAM,SAAS,MAAM,OAAO,KAAK,UAAU;GACvC,MAAM,SAAS,sBAAsB,IAAI,MAAM,aAAa;GAC5D,IAAI,WAAW,KAAA,KAAa,WAAW,MAAM,QAAQ,OAAO;GAC5D,eAAe;GACf,UAAU;GACV,OAAO;IAAE,GAAG;IAAO;GAAO;EAC9B,CAAC;EAED,OAAO,eAAe;GAAE,GAAG;GAAO;EAAO,IAAI;CACjD,CAAC;CAED,IAAI,CAAC,SAAS,OAAO;CACrB,MAAM,QAAQ,KAAK,IAAI;CAEvB,OAAO;EACH,GAAG;EACH,MAAM;EACN,SAAS,eAAe,UAAU;EAClC,QAAQ;GACJ,GAAG,eAAe;GAClB,MAAM;GACN;EACJ;CACJ;AACJ"}
1
+ {"version":3,"file":"zipper-supply.js","names":[],"sources":["../../src/catalogs/zipper-supply.ts"],"sourcesContent":["import type { CatalogSnapshot } from \"./types.js\";\nimport {\n markCatalogSnapshotParsed,\n parseCatalogSnapshot,\n parseZippedAssetSupplyCatalogUpdates,\n} from \"./snapshot-validation.js\";\n\nexport type ZippedAssetSupplyCatalogUpdate = {\n zippedAssetId: number;\n supply: string;\n};\n\nexport function patchZipperCatalogSupply(\n snapshot: CatalogSnapshot,\n updates: readonly ZippedAssetSupplyCatalogUpdate[],\n): CatalogSnapshot {\n const parsedSnapshot = parseCatalogSnapshot(snapshot);\n const parsedUpdates = parseZippedAssetSupplyCatalogUpdates(updates);\n if (parsedUpdates.length === 0) return parsedSnapshot;\n\n const supplyByZippedAssetId = new Map<number, string>();\n for (const update of parsedUpdates) {\n supplyByZippedAssetId.set(update.zippedAssetId, update.supply);\n }\n\n let changed = false;\n const assets = parsedSnapshot.zipper.assets.map((asset) => {\n let assetChanged = false;\n const chains = asset.chains.map((chain) => {\n const supply = supplyByZippedAssetId.get(chain.zippedAssetId);\n if (supply === undefined || supply === chain.supply) return chain;\n assetChanged = true;\n changed = true;\n return { ...chain, supply };\n });\n\n return assetChanged ? { ...asset, chains } : asset;\n });\n\n if (!changed) return parsedSnapshot;\n const nowMs = Date.now();\n\n return markCatalogSnapshotParsed({\n ...parsedSnapshot,\n tsMs: nowMs,\n version: parsedSnapshot.version + 1,\n zipper: {\n ...parsedSnapshot.zipper,\n tsMs: nowMs,\n assets,\n },\n });\n}\n"],"mappings":";;AAYA,SAAgB,yBACZ,UACA,SACe;CACf,MAAM,iBAAiB,qBAAqB,QAAQ;CACpD,MAAM,gBAAgB,qCAAqC,OAAO;CAClE,IAAI,cAAc,WAAW,GAAG,OAAO;CAEvC,MAAM,wCAAwB,IAAI,IAAoB;CACtD,KAAK,MAAM,UAAU,eACjB,sBAAsB,IAAI,OAAO,eAAe,OAAO,MAAM;CAGjE,IAAI,UAAU;CACd,MAAM,SAAS,eAAe,OAAO,OAAO,KAAK,UAAU;EACvD,IAAI,eAAe;EACnB,MAAM,SAAS,MAAM,OAAO,KAAK,UAAU;GACvC,MAAM,SAAS,sBAAsB,IAAI,MAAM,aAAa;GAC5D,IAAI,WAAW,KAAA,KAAa,WAAW,MAAM,QAAQ,OAAO;GAC5D,eAAe;GACf,UAAU;GACV,OAAO;IAAE,GAAG;IAAO;GAAO;EAC9B,CAAC;EAED,OAAO,eAAe;GAAE,GAAG;GAAO;EAAO,IAAI;CACjD,CAAC;CAED,IAAI,CAAC,SAAS,OAAO;CACrB,MAAM,QAAQ,KAAK,IAAI;CAEvB,OAAO,0BAA0B;EAC7B,GAAG;EACH,MAAM;EACN,SAAS,eAAe,UAAU;EAClC,QAAQ;GACJ,GAAG,eAAe;GAClB,MAAM;GACN;EACJ;CACJ,CAAC;AACL"}
@@ -11,7 +11,7 @@ type TimestampInit = {
11
11
  };
12
12
  declare function createCandleRowSchema(scales: SdkScales): v.SchemaWithPipe<readonly [v.ObjectSchema<{
13
13
  readonly symbolId: v.NumberSchema<undefined>;
14
- readonly timeframe: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, DecodedEnum<"1d" | "1s" | "1m" | "5m" | "1h" | "1w" | "15m" | "30m" | "4h" | "12h" | "1mo">>]>;
14
+ readonly timeframe: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, DecodedEnum<"1d" | "1s" | "1m" | "5m" | "1h" | "15m" | "30m" | "4h" | "12h" | "1w" | "1mo">>]>;
15
15
  readonly tsSec: v.BigintSchema<undefined>;
16
16
  readonly open: v.BigintSchema<undefined>;
17
17
  readonly high: v.BigintSchema<undefined>;
@@ -22,7 +22,7 @@ declare function createCandleRowSchema(scales: SdkScales): v.SchemaWithPipe<read
22
22
  readonly isClosed: v.OptionalSchema<v.BooleanSchema<undefined>, false>;
23
23
  }, undefined>, v.TransformAction<{
24
24
  symbolId: number;
25
- timeframe: DecodedEnum<"1d" | "1s" | "1m" | "5m" | "1h" | "1w" | "15m" | "30m" | "4h" | "12h" | "1mo">;
25
+ timeframe: DecodedEnum<"1d" | "1s" | "1m" | "5m" | "1h" | "15m" | "30m" | "4h" | "12h" | "1w" | "1mo">;
26
26
  tsSec: bigint;
27
27
  open: bigint;
28
28
  high: bigint;
@@ -33,7 +33,7 @@ declare function createCandleRowSchema(scales: SdkScales): v.SchemaWithPipe<read
33
33
  isClosed: boolean;
34
34
  }, {
35
35
  symbolId: number;
36
- timeframe: DecodedEnum<"1d" | "1s" | "1m" | "5m" | "1h" | "1w" | "15m" | "30m" | "4h" | "12h" | "1mo">;
36
+ timeframe: DecodedEnum<"1d" | "1s" | "1m" | "5m" | "1h" | "15m" | "30m" | "4h" | "12h" | "1w" | "1mo">;
37
37
  time: number;
38
38
  open: string;
39
39
  high: string;
@@ -46,7 +46,7 @@ declare function createCandleRowSchema(scales: SdkScales): v.SchemaWithPipe<read
46
46
  declare const createCandleRowIntSchema: typeof createCandleRowSchema;
47
47
  declare function createCandleColumnarSchema(scales: SdkScales): v.SchemaWithPipe<readonly [v.ObjectSchema<{
48
48
  readonly symbolId: v.NumberSchema<undefined>;
49
- readonly timeframe: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, DecodedEnum<"1d" | "1s" | "1m" | "5m" | "1h" | "1w" | "15m" | "30m" | "4h" | "12h" | "1mo">>]>;
49
+ readonly timeframe: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, DecodedEnum<"1d" | "1s" | "1m" | "5m" | "1h" | "15m" | "30m" | "4h" | "12h" | "1w" | "1mo">>]>;
50
50
  readonly tsSec: v.ArraySchema<v.BigintSchema<undefined>, undefined>;
51
51
  readonly open: v.ArraySchema<v.BigintSchema<undefined>, undefined>;
52
52
  readonly high: v.ArraySchema<v.BigintSchema<undefined>, undefined>;
@@ -63,7 +63,7 @@ declare function createCandleColumnarSchema(scales: SdkScales): v.SchemaWithPipe
63
63
  readonly nextPageToken: v.OptionalSchema<v.StringSchema<undefined>, "">;
64
64
  }, undefined>, v.TransformAction<{
65
65
  symbolId: number;
66
- timeframe: DecodedEnum<"1d" | "1s" | "1m" | "5m" | "1h" | "1w" | "15m" | "30m" | "4h" | "12h" | "1mo">;
66
+ timeframe: DecodedEnum<"1d" | "1s" | "1m" | "5m" | "1h" | "15m" | "30m" | "4h" | "12h" | "1w" | "1mo">;
67
67
  tsSec: bigint[];
68
68
  open: bigint[];
69
69
  high: bigint[];
@@ -80,7 +80,7 @@ declare function createCandleColumnarSchema(scales: SdkScales): v.SchemaWithPipe
80
80
  nextPageToken: string;
81
81
  }, {
82
82
  symbolId: number;
83
- timeframe: DecodedEnum<"1d" | "1s" | "1m" | "5m" | "1h" | "1w" | "15m" | "30m" | "4h" | "12h" | "1mo">;
83
+ timeframe: DecodedEnum<"1d" | "1s" | "1m" | "5m" | "1h" | "15m" | "30m" | "4h" | "12h" | "1w" | "1mo">;
84
84
  time: number[];
85
85
  open: string[];
86
86
  high: string[];
@@ -100,7 +100,7 @@ declare function createCandleColumnarSchema(scales: SdkScales): v.SchemaWithPipe
100
100
  }>]>;
101
101
  declare function createCandleColumnarIntSchema(scales: SdkScales): v.SchemaWithPipe<readonly [v.ObjectSchema<{
102
102
  readonly symbolId: v.NumberSchema<undefined>;
103
- readonly timeframe: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, DecodedEnum<"1d" | "1s" | "1m" | "5m" | "1h" | "1w" | "15m" | "30m" | "4h" | "12h" | "1mo">>]>;
103
+ readonly timeframe: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, DecodedEnum<"1d" | "1s" | "1m" | "5m" | "1h" | "15m" | "30m" | "4h" | "12h" | "1w" | "1mo">>]>;
104
104
  readonly tsSec: v.ArraySchema<v.BigintSchema<undefined>, undefined>;
105
105
  readonly open: v.ArraySchema<v.BigintSchema<undefined>, undefined>;
106
106
  readonly high: v.ArraySchema<v.BigintSchema<undefined>, undefined>;
@@ -117,7 +117,7 @@ declare function createCandleColumnarIntSchema(scales: SdkScales): v.SchemaWithP
117
117
  readonly nextPageToken: v.OptionalSchema<v.StringSchema<undefined>, "">;
118
118
  }, undefined>, v.TransformAction<{
119
119
  symbolId: number;
120
- timeframe: DecodedEnum<"1d" | "1s" | "1m" | "5m" | "1h" | "1w" | "15m" | "30m" | "4h" | "12h" | "1mo">;
120
+ timeframe: DecodedEnum<"1d" | "1s" | "1m" | "5m" | "1h" | "15m" | "30m" | "4h" | "12h" | "1w" | "1mo">;
121
121
  tsSec: bigint[];
122
122
  open: bigint[];
123
123
  high: bigint[];
@@ -134,7 +134,7 @@ declare function createCandleColumnarIntSchema(scales: SdkScales): v.SchemaWithP
134
134
  nextPageToken: string;
135
135
  }, {
136
136
  symbolId: number;
137
- timeframe: DecodedEnum<"1d" | "1s" | "1m" | "5m" | "1h" | "1w" | "15m" | "30m" | "4h" | "12h" | "1mo">;
137
+ timeframe: DecodedEnum<"1d" | "1s" | "1m" | "5m" | "1h" | "15m" | "30m" | "4h" | "12h" | "1w" | "1mo">;
138
138
  tsSec: number[];
139
139
  open: string[];
140
140
  high: string[];
@@ -158,7 +158,7 @@ type CandleColumnar = v.InferOutput<ReturnType<typeof createCandleColumnarSchema
158
158
  type CandleColumnarInt = v.InferOutput<ReturnType<typeof createCandleColumnarIntSchema>>;
159
159
  declare function createListCandlesInputSchema(): v.SchemaWithPipe<readonly [v.ObjectSchema<{
160
160
  readonly symbolId: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.GtValueAction<number, 0, undefined>, v.MaxValueAction<number, 4294967295, undefined>]>;
161
- readonly timeframe: v.SchemaWithPipe<readonly [v.PicklistSchema<readonly ["1s", "1m", "5m", "15m", "30m", "1h", "4h", "12h", "1d", "1w", "1mo"], undefined>, v.TransformAction<"1d" | "1s" | "1m" | "5m" | "1h" | "1w" | "15m" | "30m" | "4h" | "12h" | "1mo", Timeframe$1.SEC_1 | Timeframe$1.MIN_1 | Timeframe$1.MIN_5 | Timeframe$1.MIN_15 | Timeframe$1.MIN_30 | Timeframe$1.HOUR_1 | Timeframe$1.HOUR_4 | Timeframe$1.DAY_1 | Timeframe$1.HOUR_12 | Timeframe$1.WEEK_1 | Timeframe$1.MONTH_1>]>;
161
+ readonly timeframe: v.SchemaWithPipe<readonly [v.PicklistSchema<readonly ["1s", "1m", "5m", "15m", "30m", "1h", "4h", "12h", "1d", "1w", "1mo"], undefined>, v.TransformAction<"1d" | "1s" | "1m" | "5m" | "1h" | "15m" | "30m" | "4h" | "12h" | "1w" | "1mo", Timeframe$1.SEC_1 | Timeframe$1.MIN_1 | Timeframe$1.MIN_5 | Timeframe$1.MIN_15 | Timeframe$1.MIN_30 | Timeframe$1.HOUR_1 | Timeframe$1.HOUR_4 | Timeframe$1.DAY_1 | Timeframe$1.HOUR_12 | Timeframe$1.WEEK_1 | Timeframe$1.MONTH_1>]>;
162
162
  readonly limit: v.OptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.GtValueAction<number, 0, undefined>, v.MaxValueAction<number, 10000, undefined>]>, undefined>;
163
163
  readonly includeIncomplete: v.OptionalSchema<v.BooleanSchema<undefined>, false>;
164
164
  readonly includeReference: v.OptionalSchema<v.BooleanSchema<undefined>, false>;
@@ -14,7 +14,7 @@ type TimestampInit = {
14
14
  declare const GetOrderbookHeatmapInputSchema: v.SchemaWithPipe<readonly [v.ObjectSchema<{
15
15
  readonly symbolId: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.GtValueAction<number, 0, undefined>, v.MaxValueAction<number, 4294967295, undefined>]>;
16
16
  readonly interval: v.SchemaWithPipe<readonly [v.OptionalSchema<v.PicklistSchema<readonly ["1s", "1m", "5m", "1h"], undefined>, "1s">, v.TransformAction<"1s" | "1m" | "5m" | "1h", HeatmapInterval>]>;
17
- readonly depth: v.SchemaWithPipe<readonly [v.OptionalSchema<v.PicklistSchema<readonly [1, 5, 10, 20, 50, 100, 200, 500, 1000], undefined>, 50>, v.TransformAction<1 | 5 | 10 | 20 | 100 | 200 | 500 | 1000 | 50, HeatmapDepth>]>;
17
+ readonly depth: v.SchemaWithPipe<readonly [v.OptionalSchema<v.PicklistSchema<readonly [1, 5, 10, 20, 50, 100, 200, 500, 1000], undefined>, 50>, v.TransformAction<1 | 5 | 10 | 20 | 200 | 500 | 100 | 50 | 1000, HeatmapDepth>]>;
18
18
  readonly quantityMode: v.SchemaWithPipe<readonly [v.OptionalSchema<v.PicklistSchema<readonly ["close", "peak"], undefined>, "close">, v.TransformAction<"close" | "peak", HeatmapQuantityMode>]>;
19
19
  readonly limit: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.GtValueAction<number, 0, undefined>, v.MaxValueAction<number, 20000, undefined>]>;
20
20
  readonly startTsSec: v.OptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>, v.MaxValueAction<number, number, undefined>, v.TransformAction<number, bigint>]>, undefined>;
@@ -227,7 +227,7 @@ type OrderbookHeatmapDeltaChain = ReturnType<typeof convertHeatmapDeltaChain>;
227
227
  declare function createOrderbookHeatmapResponseSchema(scales: SdkScales): v.SchemaWithPipe<readonly [v.ObjectSchema<{
228
228
  readonly symbolId: v.NumberSchema<undefined>;
229
229
  readonly interval: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, DecodedEnum<"1s" | "1m" | "5m" | "1h">>]>;
230
- readonly depth: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, 1 | "unspecified" | 5 | 10 | 20 | 100 | 200 | 500 | 1000 | 50>]>;
230
+ readonly depth: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, 1 | "unspecified" | 5 | 10 | 20 | 200 | 500 | 100 | 50 | 1000>]>;
231
231
  readonly chain: v.OptionalSchema<v.ObjectSchema<{
232
232
  readonly baseKeyframe: v.OptionalSchema<v.ObjectSchema<{
233
233
  readonly tsSec: v.SchemaWithPipe<readonly [v.BigintSchema<undefined>, v.TransformAction<bigint, number>]>;
@@ -287,7 +287,7 @@ declare function createOrderbookHeatmapResponseSchema(scales: SdkScales): v.Sche
287
287
  }, undefined>, v.TransformAction<{
288
288
  symbolId: number;
289
289
  interval: DecodedEnum<"1s" | "1m" | "5m" | "1h">;
290
- depth: 1 | "unspecified" | 5 | 10 | 20 | 100 | 200 | 500 | 1000 | 50;
290
+ depth: 1 | "unspecified" | 5 | 10 | 20 | 200 | 500 | 100 | 50 | 1000;
291
291
  chain?: {
292
292
  baseKeyframe?: {
293
293
  tsSec: number;
@@ -347,7 +347,7 @@ declare function createOrderbookHeatmapResponseSchema(scales: SdkScales): v.Sche
347
347
  }, {
348
348
  symbolId: number;
349
349
  interval: DecodedEnum<"1s" | "1m" | "5m" | "1h">;
350
- depth: 1 | "unspecified" | 5 | 10 | 20 | 100 | 200 | 500 | 1000 | 50;
350
+ depth: 1 | "unspecified" | 5 | 10 | 20 | 200 | 500 | 100 | 50 | 1000;
351
351
  chain: {
352
352
  baseKeyframe: {
353
353
  tsSec: number;
@@ -30,7 +30,7 @@ declare function createMarketOverviewSchema(scales: SdkScales): v.SchemaWithPipe
30
30
  readonly bestAskTicks: v.BigintSchema<undefined>;
31
31
  readonly bestAskQtyScaled: v.BigintSchema<undefined>;
32
32
  readonly sparklines: v.OptionalSchema<v.ArraySchema<v.ObjectSchema<{
33
- readonly interval: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "unspecified" | "1m" | "1h" | "24h" | "1w">]>;
33
+ readonly interval: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "unspecified" | "1m" | "1h" | "1w" | "24h">]>;
34
34
  readonly closeTicks: v.ArraySchema<v.BigintSchema<undefined>, undefined>;
35
35
  }, undefined>, undefined>, readonly []>;
36
36
  readonly indexPriceTicks: v.BigintSchema<undefined>;
@@ -50,7 +50,7 @@ declare function createMarketOverviewSchema(scales: SdkScales): v.SchemaWithPipe
50
50
  bestAskTicks: bigint;
51
51
  bestAskQtyScaled: bigint;
52
52
  sparklines: {
53
- interval: "unspecified" | "1m" | "1h" | "24h" | "1w";
53
+ interval: "unspecified" | "1m" | "1h" | "1w" | "24h";
54
54
  closeTicks: bigint[];
55
55
  }[];
56
56
  indexPriceTicks: bigint;
@@ -80,7 +80,7 @@ declare const ListMarketOverviewInputSchema: v.SchemaWithPipe<readonly [v.Strict
80
80
  readonly orderBy: v.SchemaWithPipe<readonly [v.OptionalSchema<v.PicklistSchema<readonly ["change_24h_bps", "volume_24h_usd", "last_price", "date_added"], undefined>, "volume_24h_usd">, v.TransformAction<"change_24h_bps" | "volume_24h_usd" | "last_price" | "date_added", MarketOrderBy.ORDER_BY_CHANGE_24H_BPS | MarketOrderBy.ORDER_BY_VOLUME_24H_USD | MarketOrderBy.ORDER_BY_LAST_PRICE | MarketOrderBy.ORDER_BY_DATE_ADDED>]>;
81
81
  readonly sort: v.SchemaWithPipe<readonly [v.OptionalSchema<v.PicklistSchema<readonly ["asc", "desc"], undefined>, "desc">, v.TransformAction<"asc" | "desc", SortDirection.SORT_ASC | SortDirection.SORT_DESC>]>;
82
82
  readonly includeSparklines: v.OptionalSchema<v.BooleanSchema<undefined>, true>;
83
- readonly sparklineIntervals: v.SchemaWithPipe<readonly [v.OptionalSchema<v.ArraySchema<v.PicklistSchema<readonly ["1h", "24h", "1w", "1m"], undefined>, undefined>, readonly ["24h"]>, v.TransformAction<("1m" | "1h" | "24h" | "1w")[], (SparklineInterval.SPARKLINE_1H | SparklineInterval.SPARKLINE_24H | SparklineInterval.SPARKLINE_1W | SparklineInterval.SPARKLINE_1M)[]>]>;
83
+ readonly sparklineIntervals: v.SchemaWithPipe<readonly [v.OptionalSchema<v.ArraySchema<v.PicklistSchema<readonly ["1h", "24h", "1w", "1m"], undefined>, undefined>, readonly ["24h"]>, v.TransformAction<("1m" | "1h" | "1w" | "24h")[], (SparklineInterval.SPARKLINE_1H | SparklineInterval.SPARKLINE_24H | SparklineInterval.SPARKLINE_1W | SparklineInterval.SPARKLINE_1M)[]>]>;
84
84
  }, undefined>, v.TransformAction<{
85
85
  symbolIds: number[];
86
86
  limit: number;
@@ -10,7 +10,7 @@ declare const GetOrderbookInputSchema: v.SchemaWithPipe<readonly [v.ObjectSchema
10
10
  depth: number;
11
11
  }, {
12
12
  symbolId: number;
13
- depth: 1 | 5 | 10 | 20 | 100 | 200 | 500 | 1000 | 50;
13
+ depth: 1 | 5 | 10 | 20 | 200 | 500 | 100 | 50 | 1000;
14
14
  protoDepth: Depth;
15
15
  }>]>;
16
16
  type GetOrderbookInput = v.InferInput<typeof GetOrderbookInputSchema>;
@@ -260,7 +260,7 @@ declare function createOrderSchema(scales: SdkScales): v.SchemaWithPipe<readonly
260
260
  attachedRisk: {
261
261
  takeProfit: {
262
262
  state: {
263
- status: "unspecified" | "failed" | "canceled" | "completed" | "created" | "not_configured" | "armed" | "running" | "paused";
263
+ status: "unspecified" | "failed" | "canceled" | "created" | "completed" | "not_configured" | "armed" | "running" | "paused";
264
264
  armedTs: number | undefined;
265
265
  armedTsNs: string | undefined;
266
266
  terminalTs: number | undefined;
@@ -279,7 +279,7 @@ declare function createOrderSchema(scales: SdkScales): v.SchemaWithPipe<readonly
279
279
  } | undefined;
280
280
  stopLoss: {
281
281
  state: {
282
- status: "unspecified" | "failed" | "canceled" | "completed" | "created" | "not_configured" | "armed" | "running" | "paused";
282
+ status: "unspecified" | "failed" | "canceled" | "created" | "completed" | "not_configured" | "armed" | "running" | "paused";
283
283
  armedTs: number | undefined;
284
284
  armedTsNs: string | undefined;
285
285
  terminalTs: number | undefined;
@@ -298,7 +298,7 @@ declare function createOrderSchema(scales: SdkScales): v.SchemaWithPipe<readonly
298
298
  } | undefined;
299
299
  trailingStop: {
300
300
  state: {
301
- status: "unspecified" | "failed" | "canceled" | "completed" | "created" | "not_configured" | "armed" | "running" | "paused";
301
+ status: "unspecified" | "failed" | "canceled" | "created" | "completed" | "not_configured" | "armed" | "running" | "paused";
302
302
  armedTs: number | undefined;
303
303
  armedTsNs: string | undefined;
304
304
  terminalTs: number | undefined;
@@ -631,7 +631,7 @@ declare function createOrderDetailsSchema(scales: SdkScales): v.ObjectSchema<{
631
631
  attachedRisk: {
632
632
  takeProfit: {
633
633
  state: {
634
- status: "unspecified" | "failed" | "canceled" | "completed" | "created" | "not_configured" | "armed" | "running" | "paused";
634
+ status: "unspecified" | "failed" | "canceled" | "created" | "completed" | "not_configured" | "armed" | "running" | "paused";
635
635
  armedTs: number | undefined;
636
636
  armedTsNs: string | undefined;
637
637
  terminalTs: number | undefined;
@@ -650,7 +650,7 @@ declare function createOrderDetailsSchema(scales: SdkScales): v.ObjectSchema<{
650
650
  } | undefined;
651
651
  stopLoss: {
652
652
  state: {
653
- status: "unspecified" | "failed" | "canceled" | "completed" | "created" | "not_configured" | "armed" | "running" | "paused";
653
+ status: "unspecified" | "failed" | "canceled" | "created" | "completed" | "not_configured" | "armed" | "running" | "paused";
654
654
  armedTs: number | undefined;
655
655
  armedTsNs: string | undefined;
656
656
  terminalTs: number | undefined;
@@ -669,7 +669,7 @@ declare function createOrderDetailsSchema(scales: SdkScales): v.ObjectSchema<{
669
669
  } | undefined;
670
670
  trailingStop: {
671
671
  state: {
672
- status: "unspecified" | "failed" | "canceled" | "completed" | "created" | "not_configured" | "armed" | "running" | "paused";
672
+ status: "unspecified" | "failed" | "canceled" | "created" | "completed" | "not_configured" | "armed" | "running" | "paused";
673
673
  armedTs: number | undefined;
674
674
  armedTsNs: string | undefined;
675
675
  terminalTs: number | undefined;
@@ -295,7 +295,7 @@ declare const SubaccountActivityEventSchema: v.ObjectSchema<{
295
295
  seconds: bigint;
296
296
  nanos: number;
297
297
  } | undefined, number | undefined>]>;
298
- readonly entityKind: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "unspecified" | "subaccount" | "api_key" | "account" | "destination" | "session" | "member" | "policy" | "invite" | "security">]>;
298
+ readonly entityKind: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "unspecified" | "subaccount" | "api_key" | "account" | "session" | "destination" | "member" | "policy" | "invite" | "security">]>;
299
299
  readonly eventAction: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "unspecified" | "disabled" | "revoked" | "failed" | "enabled" | "created" | "updated" | "deleted" | "removed" | "role_set" | "received" | "replied" | "blocked" | "hold_placed" | "hold_released">]>;
300
300
  readonly source: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "unspecified" | "web" | "mobile" | "api">]>;
301
301
  readonly ip: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
@@ -168,7 +168,7 @@ declare const GetUserTradesInputSchema: v.SchemaWithPipe<readonly [v.UnionSchema
168
168
  readonly orderId: v.OptionalSchema<v.NeverSchema<undefined>, undefined>;
169
169
  readonly lineageId: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.TransformAction<string, bigint>]>, v.CheckAction<bigint, `${string} must be greater than zero`>]>;
170
170
  readonly throughGeneration: v.OptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 1, undefined>, v.MaxValueAction<number, 4294967295, undefined>]>, undefined>;
171
- }, undefined>], undefined>], ({ input }: v.UnionIssue<v.NumberIssue | v.StringIssue | v.BooleanIssue | v.IntegerIssue<number> | v.MinValueIssue<number, 1> | v.MaxValueIssue<number, 4294967295> | v.StrictObjectIssue | v.PicklistIssue | v.MinLengthIssue<string, 1> | v.UnionIssue<v.StringIssue | v.StrictObjectIssue | v.PicklistIssue | v.MinLengthIssue<string, 1>> | v.CheckIssue<bigint> | v.MaxValueIssue<number, 1000> | v.NeverIssue | v.UnionIssue<v.NumberIssue | v.StringIssue | v.BooleanIssue | v.IntegerIssue<number> | v.MinValueIssue<number, 1> | v.MaxValueIssue<number, 4294967295> | v.StrictObjectIssue | v.PicklistIssue | v.MinLengthIssue<string, 1> | v.UnionIssue<v.StringIssue | v.StrictObjectIssue | v.PicklistIssue | v.MinLengthIssue<string, 1>> | v.CheckIssue<bigint> | v.MaxValueIssue<number, 1000> | v.NeverIssue> | v.CheckIssue<number> | v.UnionIssue<v.NumberIssue | v.StringIssue | v.BooleanIssue | v.IntegerIssue<number> | v.MinValueIssue<number, 1> | v.MaxValueIssue<number, 4294967295> | v.StrictObjectIssue | v.PicklistIssue | v.MinLengthIssue<string, 1> | v.UnionIssue<v.StringIssue | v.StrictObjectIssue | v.PicklistIssue | v.MinLengthIssue<string, 1>> | v.CheckIssue<bigint> | v.MaxValueIssue<number, 1000> | v.NeverIssue | v.CheckIssue<number>>>) => "symbolId is required when afterMatchId is set" | "Provide at most one of orderId or lineageId" | "throughGeneration requires lineageId">, v.TransformAction<{
171
+ }, undefined>], undefined>], ({ input }: v.UnionIssue<v.NumberIssue | v.StringIssue | v.BooleanIssue | v.IntegerIssue<number> | v.MinValueIssue<number, 1> | v.MaxValueIssue<number, 4294967295> | v.PicklistIssue | v.MinLengthIssue<string, 1> | v.StrictObjectIssue | v.UnionIssue<v.StringIssue | v.PicklistIssue | v.MinLengthIssue<string, 1> | v.StrictObjectIssue> | v.CheckIssue<bigint> | v.NeverIssue | v.MaxValueIssue<number, 1000> | v.UnionIssue<v.NumberIssue | v.StringIssue | v.BooleanIssue | v.IntegerIssue<number> | v.MinValueIssue<number, 1> | v.MaxValueIssue<number, 4294967295> | v.PicklistIssue | v.MinLengthIssue<string, 1> | v.StrictObjectIssue | v.UnionIssue<v.StringIssue | v.PicklistIssue | v.MinLengthIssue<string, 1> | v.StrictObjectIssue> | v.CheckIssue<bigint> | v.NeverIssue | v.MaxValueIssue<number, 1000>> | v.CheckIssue<number> | v.UnionIssue<v.NumberIssue | v.StringIssue | v.BooleanIssue | v.IntegerIssue<number> | v.MinValueIssue<number, 1> | v.MaxValueIssue<number, 4294967295> | v.PicklistIssue | v.MinLengthIssue<string, 1> | v.StrictObjectIssue | v.UnionIssue<v.StringIssue | v.PicklistIssue | v.MinLengthIssue<string, 1> | v.StrictObjectIssue> | v.CheckIssue<bigint> | v.NeverIssue | v.MaxValueIssue<number, 1000> | v.CheckIssue<number>>>) => "symbolId is required when afterMatchId is set" | "Provide at most one of orderId or lineageId" | "throughGeneration requires lineageId">, v.TransformAction<{
172
172
  symbolId?: number | undefined;
173
173
  afterMatchId?: undefined;
174
174
  side?: Side.BUY | Side.SELL | undefined;
@@ -845,7 +845,7 @@ type CreateTriggerInput = v.InferInput<ReturnType<typeof createCreateTriggerInpu
845
845
  declare const ListTriggersInputSchema: v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
846
846
  readonly parentOrderId: v.SchemaWithPipe<readonly [v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction]>, undefined>, v.TransformAction<string | undefined, bigint | undefined>]>;
847
847
  readonly symbolId: v.OptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.GtValueAction<number, 0, undefined>, v.MaxValueAction<number, 4294967295, undefined>]>, undefined>;
848
- readonly status: v.SchemaWithPipe<readonly [v.OptionalSchema<v.ArraySchema<v.PicklistSchema<readonly ["created", "armed", "running", "completed", "cancelled", "failed", "paused"], undefined>, undefined>, undefined>, v.TransformAction<("failed" | "cancelled" | "completed" | "created" | "armed" | "running" | "paused")[] | undefined, (TriggerStatus.STATUS_CREATED | TriggerStatus.STATUS_ARMED | TriggerStatus.STATUS_RUNNING | TriggerStatus.STATUS_COMPLETED | TriggerStatus.STATUS_CANCELED | TriggerStatus.STATUS_FAILED | TriggerStatus.STATUS_PAUSED)[]>]>;
848
+ readonly status: v.SchemaWithPipe<readonly [v.OptionalSchema<v.ArraySchema<v.PicklistSchema<readonly ["created", "armed", "running", "completed", "cancelled", "failed", "paused"], undefined>, undefined>, undefined>, v.TransformAction<("failed" | "cancelled" | "created" | "completed" | "armed" | "running" | "paused")[] | undefined, (TriggerStatus.STATUS_CREATED | TriggerStatus.STATUS_ARMED | TriggerStatus.STATUS_RUNNING | TriggerStatus.STATUS_COMPLETED | TriggerStatus.STATUS_CANCELED | TriggerStatus.STATUS_FAILED | TriggerStatus.STATUS_PAUSED)[]>]>;
849
849
  readonly triggerType: v.SchemaWithPipe<readonly [v.OptionalSchema<v.PicklistSchema<readonly ["stop_loss", "take_profit", "trailing_stop", "twap", "ladder"], undefined>, undefined>, v.TransformAction<"stop_loss" | "take_profit" | "trailing_stop" | "twap" | "ladder" | undefined, TriggerType>]>;
850
850
  readonly limit: v.OptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.GtValueAction<number, 0, undefined>, v.MaxValueAction<number, 1000, undefined>]>, 50>;
851
851
  readonly pageToken: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction]>, "">;
@@ -29,62 +29,62 @@ declare const CreateTriggerResultSchema: v.SchemaWithPipe<readonly [v.ObjectSche
29
29
  type CreateTriggerResult = v.InferOutput<typeof CreateTriggerResultSchema>;
30
30
  declare const CancelTriggerResultSchema: v.SchemaWithPipe<readonly [v.ObjectSchema<{
31
31
  readonly triggerId: v.SchemaWithPipe<readonly [v.BigintSchema<undefined>, v.TransformAction<bigint, string>]>;
32
- readonly status: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "unspecified" | "failed" | "cancelled" | "completed" | "created" | "armed" | "running" | "paused">]>;
32
+ readonly status: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "unspecified" | "failed" | "cancelled" | "created" | "completed" | "armed" | "running" | "paused">]>;
33
33
  readonly tsNs: v.BigintSchema<undefined>;
34
34
  }, undefined>, v.TransformAction<{
35
35
  triggerId: string;
36
- status: "unspecified" | "failed" | "cancelled" | "completed" | "created" | "armed" | "running" | "paused";
36
+ status: "unspecified" | "failed" | "cancelled" | "created" | "completed" | "armed" | "running" | "paused";
37
37
  tsNs: bigint;
38
38
  }, {
39
39
  ts: number;
40
40
  tsNs: string;
41
41
  triggerId: string;
42
- status: "unspecified" | "failed" | "cancelled" | "completed" | "created" | "armed" | "running" | "paused";
42
+ status: "unspecified" | "failed" | "cancelled" | "created" | "completed" | "armed" | "running" | "paused";
43
43
  }>]>;
44
44
  type CancelTriggerResult = v.InferOutput<typeof CancelTriggerResultSchema>;
45
45
  declare const ModifyTriggerResultSchema: v.SchemaWithPipe<readonly [v.ObjectSchema<{
46
46
  readonly triggerId: v.SchemaWithPipe<readonly [v.BigintSchema<undefined>, v.TransformAction<bigint, string>]>;
47
- readonly status: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "unspecified" | "failed" | "cancelled" | "completed" | "created" | "armed" | "running" | "paused">]>;
47
+ readonly status: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "unspecified" | "failed" | "cancelled" | "created" | "completed" | "armed" | "running" | "paused">]>;
48
48
  readonly tsNs: v.BigintSchema<undefined>;
49
49
  }, undefined>, v.TransformAction<{
50
50
  triggerId: string;
51
- status: "unspecified" | "failed" | "cancelled" | "completed" | "created" | "armed" | "running" | "paused";
51
+ status: "unspecified" | "failed" | "cancelled" | "created" | "completed" | "armed" | "running" | "paused";
52
52
  tsNs: bigint;
53
53
  }, {
54
54
  ts: number;
55
55
  tsNs: string;
56
56
  triggerId: string;
57
- status: "unspecified" | "failed" | "cancelled" | "completed" | "created" | "armed" | "running" | "paused";
57
+ status: "unspecified" | "failed" | "cancelled" | "created" | "completed" | "armed" | "running" | "paused";
58
58
  }>]>;
59
59
  type ModifyTriggerResult = v.InferOutput<typeof ModifyTriggerResultSchema>;
60
60
  declare const PauseTriggerResultSchema: v.SchemaWithPipe<readonly [v.ObjectSchema<{
61
61
  readonly triggerId: v.SchemaWithPipe<readonly [v.BigintSchema<undefined>, v.TransformAction<bigint, string>]>;
62
- readonly status: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "unspecified" | "failed" | "cancelled" | "completed" | "created" | "armed" | "running" | "paused">]>;
62
+ readonly status: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "unspecified" | "failed" | "cancelled" | "created" | "completed" | "armed" | "running" | "paused">]>;
63
63
  readonly tsNs: v.BigintSchema<undefined>;
64
64
  }, undefined>, v.TransformAction<{
65
65
  triggerId: string;
66
- status: "unspecified" | "failed" | "cancelled" | "completed" | "created" | "armed" | "running" | "paused";
66
+ status: "unspecified" | "failed" | "cancelled" | "created" | "completed" | "armed" | "running" | "paused";
67
67
  tsNs: bigint;
68
68
  }, {
69
69
  ts: number;
70
70
  tsNs: string;
71
71
  triggerId: string;
72
- status: "unspecified" | "failed" | "cancelled" | "completed" | "created" | "armed" | "running" | "paused";
72
+ status: "unspecified" | "failed" | "cancelled" | "created" | "completed" | "armed" | "running" | "paused";
73
73
  }>]>;
74
74
  type PauseTriggerResult = v.InferOutput<typeof PauseTriggerResultSchema>;
75
75
  declare const ResumeTriggerResultSchema: v.SchemaWithPipe<readonly [v.ObjectSchema<{
76
76
  readonly triggerId: v.SchemaWithPipe<readonly [v.BigintSchema<undefined>, v.TransformAction<bigint, string>]>;
77
- readonly status: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "unspecified" | "failed" | "cancelled" | "completed" | "created" | "armed" | "running" | "paused">]>;
77
+ readonly status: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "unspecified" | "failed" | "cancelled" | "created" | "completed" | "armed" | "running" | "paused">]>;
78
78
  readonly tsNs: v.BigintSchema<undefined>;
79
79
  }, undefined>, v.TransformAction<{
80
80
  triggerId: string;
81
- status: "unspecified" | "failed" | "cancelled" | "completed" | "created" | "armed" | "running" | "paused";
81
+ status: "unspecified" | "failed" | "cancelled" | "created" | "completed" | "armed" | "running" | "paused";
82
82
  tsNs: bigint;
83
83
  }, {
84
84
  ts: number;
85
85
  tsNs: string;
86
86
  triggerId: string;
87
- status: "unspecified" | "failed" | "cancelled" | "completed" | "created" | "armed" | "running" | "paused";
87
+ status: "unspecified" | "failed" | "cancelled" | "created" | "completed" | "armed" | "running" | "paused";
88
88
  }>]>;
89
89
  type ResumeTriggerResult = v.InferOutput<typeof ResumeTriggerResultSchema>;
90
90
  type StopDetailsOutput = {
@@ -560,7 +560,7 @@ declare function createTriggerSchema(scales: SdkScales): v.SchemaWithPipe<readon
560
560
  triggerId: string;
561
561
  subaccountId: string;
562
562
  symbolId: number;
563
- status: "unspecified" | "failed" | "cancelled" | "completed" | "created" | "armed" | "running" | "paused";
563
+ status: "unspecified" | "failed" | "cancelled" | "created" | "completed" | "armed" | "running" | "paused";
564
564
  parentOrderId: string | undefined;
565
565
  qty: string;
566
566
  feeAsset: "unspecified" | "quote" | "base";
@@ -716,7 +716,7 @@ declare function createTriggerSchema(scales: SdkScales): v.SchemaWithPipe<readon
716
716
  triggerId: string;
717
717
  subaccountId: string;
718
718
  symbolId: number;
719
- status: "unspecified" | "failed" | "cancelled" | "completed" | "created" | "armed" | "running" | "paused";
719
+ status: "unspecified" | "failed" | "cancelled" | "created" | "completed" | "armed" | "running" | "paused";
720
720
  parentOrderId: string | undefined;
721
721
  qty: string;
722
722
  feeAsset: "unspecified" | "quote" | "base";
@@ -872,7 +872,7 @@ declare function createTriggerSchema(scales: SdkScales): v.SchemaWithPipe<readon
872
872
  triggerId: string;
873
873
  subaccountId: string;
874
874
  symbolId: number;
875
- status: "unspecified" | "failed" | "cancelled" | "completed" | "created" | "armed" | "running" | "paused";
875
+ status: "unspecified" | "failed" | "cancelled" | "created" | "completed" | "armed" | "running" | "paused";
876
876
  parentOrderId: string | undefined;
877
877
  qty: string;
878
878
  feeAsset: "unspecified" | "quote" | "base";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@polyester/sdk",
3
- "version": "0.30.1",
3
+ "version": "0.30.2",
4
4
  "private": false,
5
5
  "description": "TypeScript SDK providing access to APIs on Polyester Exchange.",
6
6
  "homepage": "https://github.com/Fabric-Labs/polyester-sdk-typescript#readme",