@canton-network/core-tx-parser 1.14.0 → 1.16.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.
- package/dist/index.cjs +306 -58
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +305 -56
- package/dist/index.js.map +1 -1
- package/dist/instrumentmap.d.ts.map +1 -1
- package/dist/parser.d.ts +4 -0
- package/dist/parser.d.ts.map +1 -1
- package/dist/types.d.ts +23 -1
- package/dist/types.d.ts.map +1 -1
- package/dist/utils.d.ts.map +1 -1
- package/dist/v2-events.d.ts +33 -0
- package/dist/v2-events.d.ts.map +1 -0
- package/package.json +17 -23
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import type { LedgerCommonSchemas } from '@canton-network/core-ledger-client-types';
|
|
2
|
+
import { type EventLog_HoldingsChange, type Account, type TransferLegSide, type HoldingView as HoldingViewV2 } from '@canton-network/core-token-standard-v2';
|
|
3
|
+
import type { Holding, Label, TokenStandardChoice } from './types.js';
|
|
4
|
+
export declare const MINT_ACCOUNT_ID = "cip-112/mint";
|
|
5
|
+
export declare const BURN_ACCOUNT_ID = "cip-112/burn";
|
|
6
|
+
type CreatedEvent = LedgerCommonSchemas['CreatedEvent'];
|
|
7
|
+
type ExercisedEvent = LedgerCommonSchemas['ExercisedEvent'];
|
|
8
|
+
export interface V2LabelDetails {
|
|
9
|
+
admin: string;
|
|
10
|
+
account: Account;
|
|
11
|
+
transferLegSides: TransferLegSide[];
|
|
12
|
+
parentChoice: string;
|
|
13
|
+
}
|
|
14
|
+
export declare function extractHoldingsChange(exercised: ExercisedEvent): EventLog_HoldingsChange | null;
|
|
15
|
+
export declare function getHoldingViewV2(createdEvent: CreatedEvent): HoldingViewV2 | null;
|
|
16
|
+
export declare function sameAccount(a: Account, b: Account): boolean;
|
|
17
|
+
export declare function netChangeCids(change: EventLog_HoldingsChange): {
|
|
18
|
+
inputs: string[];
|
|
19
|
+
outputs: string[];
|
|
20
|
+
};
|
|
21
|
+
/**
|
|
22
|
+
* Holding cids an EventLog_HoldingsChange refers to
|
|
23
|
+
*/
|
|
24
|
+
export declare function holdingCidsOf(change: EventLog_HoldingsChange): string[];
|
|
25
|
+
export declare function toHolding(cid: string, view: HoldingViewV2): Holding;
|
|
26
|
+
export declare function deriveV2Label(opts: {
|
|
27
|
+
change: EventLog_HoldingsChange;
|
|
28
|
+
parentChoice: string;
|
|
29
|
+
tokenStandardChoice: TokenStandardChoice;
|
|
30
|
+
onlyUnlocks: boolean;
|
|
31
|
+
}): Label;
|
|
32
|
+
export {};
|
|
33
|
+
//# sourceMappingURL=v2-events.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"v2-events.d.ts","sourceRoot":"","sources":["../src/v2-events.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,0CAA0C,CAAA;AACnF,OAAO,EAEH,KAAK,uBAAuB,EAC5B,KAAK,OAAO,EACZ,KAAK,eAAe,EACpB,KAAK,WAAW,IAAI,aAAa,EAEpC,MAAM,wCAAwC,CAAA;AAE/C,OAAO,KAAK,EAAE,OAAO,EAAE,KAAK,EAAE,mBAAmB,EAAE,MAAM,YAAY,CAAA;AAKrE,eAAO,MAAM,eAAe,iBAAiB,CAAA;AAC7C,eAAO,MAAM,eAAe,iBAAiB,CAAA;AAE7C,KAAK,YAAY,GAAG,mBAAmB,CAAC,cAAc,CAAC,CAAA;AACvD,KAAK,cAAc,GAAG,mBAAmB,CAAC,gBAAgB,CAAC,CAAA;AAG3D,MAAM,WAAW,cAAc;IAC3B,KAAK,EAAE,MAAM,CAAA;IACb,OAAO,EAAE,OAAO,CAAA;IAChB,gBAAgB,EAAE,eAAe,EAAE,CAAA;IACnC,YAAY,EAAE,MAAM,CAAA;CACvB;AAED,wBAAgB,qBAAqB,CACjC,SAAS,EAAE,cAAc,GAC1B,uBAAuB,GAAG,IAAI,CAUhC;AAED,wBAAgB,gBAAgB,CAC5B,YAAY,EAAE,YAAY,GAC3B,aAAa,GAAG,IAAI,CAQtB;AAED,wBAAgB,WAAW,CAAC,CAAC,EAAE,OAAO,EAAE,CAAC,EAAE,OAAO,GAAG,OAAO,CAM3D;AAED,wBAAgB,aAAa,CAAC,MAAM,EAAE,uBAAuB;IAKrD,MAAM;IACN,OAAO;EAEd;AACD;;GAEG;AACH,wBAAgB,aAAa,CAAC,MAAM,EAAE,uBAAuB,GAAG,MAAM,EAAE,CAKvE;AAED,wBAAgB,SAAS,CAAC,GAAG,EAAE,MAAM,EAAE,IAAI,EAAE,aAAa,GAAG,OAAO,CAUnE;AAQD,wBAAgB,aAAa,CAAC,IAAI,EAAE;IAChC,MAAM,EAAE,uBAAuB,CAAA;IAC/B,YAAY,EAAE,MAAM,CAAA;IACpB,mBAAmB,EAAE,mBAAmB,CAAA;IACxC,WAAW,EAAE,OAAO,CAAA;CACvB,GAAG,KAAK,CA0HR"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@canton-network/core-tx-parser",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.16.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Transaction parsing utilities for Canton Network transactions, including parsing of transaction trees and extraction of relevant information from transaction events.",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -18,27 +18,21 @@
|
|
|
18
18
|
}
|
|
19
19
|
},
|
|
20
20
|
"devDependencies": {
|
|
21
|
-
"@types/node": "^25.9.
|
|
22
|
-
"@vitest/browser-playwright": "^5.0.
|
|
23
|
-
"@vitest/coverage-v8": "^5.0.
|
|
24
|
-
"
|
|
25
|
-
"
|
|
26
|
-
"
|
|
27
|
-
"
|
|
28
|
-
"vitest": "^5.0.1"
|
|
21
|
+
"@types/node": "^25.9.9",
|
|
22
|
+
"@vitest/browser-playwright": "^5.0.5",
|
|
23
|
+
"@vitest/coverage-v8": "^5.0.5",
|
|
24
|
+
"playwright": "^1.64.1",
|
|
25
|
+
"tsdown": "^0.23.2",
|
|
26
|
+
"typescript": "npm:@typescript/typescript6@^6.0.2",
|
|
27
|
+
"vitest": "^5.0.5"
|
|
29
28
|
},
|
|
30
29
|
"dependencies": {
|
|
31
|
-
"@canton-network/core-ledger-client-types": "
|
|
32
|
-
"@canton-network/core-ledger
|
|
33
|
-
"@canton-network/core-
|
|
34
|
-
"@canton-network/core-
|
|
35
|
-
"@canton-network/core-
|
|
36
|
-
"
|
|
37
|
-
"@canton-network/core-wallet-auth": "1.14.0",
|
|
38
|
-
"bignumber.js": "^10.0.2",
|
|
39
|
-
"dayjs": "^1.11.21",
|
|
40
|
-
"openapi-fetch": "^0.17.0",
|
|
41
|
-
"pino": "^10.3.1"
|
|
30
|
+
"@canton-network/core-ledger-client-types": "2.2.0",
|
|
31
|
+
"@canton-network/core-provider-ledger": "1.16.0",
|
|
32
|
+
"@canton-network/core-token-standard": "1.16.0",
|
|
33
|
+
"@canton-network/core-token-standard-v2": "1.4.0",
|
|
34
|
+
"@canton-network/core-types": "2.2.0",
|
|
35
|
+
"bignumber.js": "^11.1.5"
|
|
42
36
|
},
|
|
43
37
|
"files": [
|
|
44
38
|
"dist/**"
|
|
@@ -56,9 +50,9 @@
|
|
|
56
50
|
"url": "https://github.com/canton-network/wallet/issues"
|
|
57
51
|
},
|
|
58
52
|
"scripts": {
|
|
59
|
-
"build": "tsdown --onSuccess \"tsc\"",
|
|
60
|
-
"dev": "tsdown --watch --onSuccess \"tsc\"",
|
|
53
|
+
"build": "tsdown --onSuccess \"tsc -p tsconfig.lib.json\"",
|
|
54
|
+
"dev": "tsdown --watch --onSuccess \"tsc -p tsconfig.lib.json\"",
|
|
61
55
|
"flatpack": "pnpm pack --pack-destination \"$FLATPACK_OUTDIR\"",
|
|
62
|
-
"clean": "
|
|
56
|
+
"clean": "rm -rf dist"
|
|
63
57
|
}
|
|
64
58
|
}
|