@koralabs/kora-labs-common 6.4.5 → 6.4.6

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/handles/UTxO.d.ts CHANGED
@@ -2,6 +2,8 @@ export declare class UTxO {
2
2
  id: string;
3
3
  tx_id: string;
4
4
  index: number;
5
+ blockHash: string;
6
+ blockNum: number;
5
7
  slot: number;
6
8
  address: string;
7
9
  lovelace: number;
package/handles/UTxO.js CHANGED
@@ -4,6 +4,8 @@ exports.UTxO = void 0;
4
4
  class UTxO {
5
5
  constructor(utxo) {
6
6
  this.id = utxo.id;
7
+ this.blockHash = utxo.blockHash;
8
+ this.blockNum = utxo.blockNum;
7
9
  this.tx_id = utxo.tx_id;
8
10
  this.index = utxo.index;
9
11
  this.slot = utxo.slot;
@@ -12,12 +12,22 @@ export interface SortAndLimitOptions {
12
12
  orderBy?: Sort;
13
13
  isAlpha?: boolean;
14
14
  }
15
+ export declare enum UTxOFunctionName {
16
+ ADD_UTXO = "addUtxo",
17
+ UPDATE_HOLDER_INDEX = "updateHolderIndex",
18
+ UPDATE_HANDLE_INDEXES = "updateHandleIndexes"
19
+ }
20
+ export type UTxOFunctions = {
21
+ [UTxOFunctionName.ADD_UTXO]: (utxo: UTxOWithTxInfo) => void;
22
+ [UTxOFunctionName.UPDATE_HOLDER_INDEX]: (utxo: UTxOWithTxInfo, mintingData?: Map<string, MintingData[]>, holders?: Map<string, Holder>) => void;
23
+ [UTxOFunctionName.UPDATE_HANDLE_INDEXES]: (utxo: UTxOWithTxInfo, mintingData?: Map<string, MintingData[]>, handles?: Map<string, StoredHandle>) => void;
24
+ };
15
25
  export interface IApiStore {
16
26
  initialize: () => Promise<IApiStore>;
17
27
  destroy: () => void;
18
28
  rollBackToGenesis: () => void;
19
29
  pipeline: (commands: CallableFunction) => ApiIndexType | ApiIndexType[] | void;
20
- getStartingPoint: (updateHandleIndexes: ((utxo: UTxOWithTxInfo) => void)[], failed: boolean) => Promise<{
30
+ getStartingPoint: (utxoFunctions: UTxOFunctions, failed: boolean) => Promise<{
21
31
  slot: number;
22
32
  id: string;
23
33
  } | null>;
@@ -88,6 +98,8 @@ export interface IApiMetrics {
88
98
  utxoSchemaVersion?: number;
89
99
  indexSchemaVersion?: number;
90
100
  startTimestamp?: number;
101
+ lockLambdas?: boolean;
102
+ lastMaxRollbackCheck?: number;
91
103
  }
92
104
  export interface DefaultHandleInfo {
93
105
  name: string;
@@ -1,6 +1,12 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.IndexNames = void 0;
3
+ exports.IndexNames = exports.UTxOFunctionName = void 0;
4
+ var UTxOFunctionName;
5
+ (function (UTxOFunctionName) {
6
+ UTxOFunctionName["ADD_UTXO"] = "addUtxo";
7
+ UTxOFunctionName["UPDATE_HOLDER_INDEX"] = "updateHolderIndex";
8
+ UTxOFunctionName["UPDATE_HANDLE_INDEXES"] = "updateHandleIndexes";
9
+ })(UTxOFunctionName = exports.UTxOFunctionName || (exports.UTxOFunctionName = {}));
4
10
  var IndexNames;
5
11
  (function (IndexNames) {
6
12
  IndexNames["ADDRESS"] = "address";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@koralabs/kora-labs-common",
3
- "version": "6.4.5",
3
+ "version": "6.4.6",
4
4
  "description": "Kora Labs Common Utilities",
5
5
  "main": "index.js",
6
6
  "types": "index.d.ts",