@canton-network/core-token-standard 0.10.0 → 0.11.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 +93033 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.ts +1640 -4
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +92943 -4
- package/dist/index.js.map +1 -0
- package/dist/token-standard-client.d.ts +3 -2
- package/dist/token-standard-client.d.ts.map +1 -1
- package/dist/types.d.ts +15 -83
- package/dist/types.d.ts.map +1 -1
- package/package.json +24 -10
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Logger } from '@canton-network/core-types';
|
|
1
|
+
import { AccessTokenProvider, Logger } from '@canton-network/core-types';
|
|
2
2
|
import { paths as allocationPaths } from './generated-clients/splice-api-token-allocation-v1/allocation-v1.js';
|
|
3
3
|
import { paths as allocationInstructionPaths } from './generated-clients/splice-api-token-allocation-instruction-v1/allocation-instruction-v1.js';
|
|
4
4
|
import { paths as metadataPaths } from './generated-clients/splice-api-token-metadata-v1/token-metadata-v1.js';
|
|
@@ -52,7 +52,8 @@ export type GetResponse<Path extends GetEndpoint> = paths[Path] extends {
|
|
|
52
52
|
export declare class TokenStandardClient {
|
|
53
53
|
private readonly client;
|
|
54
54
|
private readonly logger;
|
|
55
|
-
|
|
55
|
+
private accessTokenProvider;
|
|
56
|
+
constructor(baseUrl: string, logger: Logger, isAdmin: boolean, accessToken?: string, accessTokenProvider?: AccessTokenProvider);
|
|
56
57
|
post<Path extends PostEndpoint>(path: Path, body: PostRequest<Path>, params?: {
|
|
57
58
|
path?: Record<string, string>;
|
|
58
59
|
query?: Record<string, string>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"token-standard-client.d.ts","sourceRoot":"","sources":["../src/token-standard-client.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,MAAM,EAAE,MAAM,4BAA4B,CAAA;
|
|
1
|
+
{"version":3,"file":"token-standard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CAAC,YAAY,CAAC,IAAI,CAAC,CAAC;IASjB,GAAG,CAAC,IAAI,SAAS,WAAW,EACrC,IAAI,EAAE,IAAI,EACV,MAAM,CAAC,EAAE;QACL,IAAI,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;QAC7B,KAAK,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;KACjC,GACF,OAAO,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC;YAYf,YAAY;CAU7B"}
|
package/dist/types.d.ts
CHANGED
|
@@ -1,87 +1,19 @@
|
|
|
1
|
+
import { Splice } from '@daml.js/token-standard-models-1.0.0';
|
|
1
2
|
import { PartyId } from '@canton-network/core-types';
|
|
2
|
-
export
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
export
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
};
|
|
11
|
-
export type
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
meta: Metadata;
|
|
17
|
-
};
|
|
18
|
-
export type AllocationRequestView = {
|
|
19
|
-
settlement: SettlementInfo;
|
|
20
|
-
transferLegs: {
|
|
21
|
-
[key: string]: TransferLeg;
|
|
22
|
-
};
|
|
23
|
-
meta: Metadata;
|
|
24
|
-
};
|
|
25
|
-
export type TransferLeg = {
|
|
26
|
-
sender: string;
|
|
27
|
-
receiver: string;
|
|
28
|
-
amount: string;
|
|
29
|
-
instrumentId: InstrumentId;
|
|
30
|
-
meta: Metadata;
|
|
31
|
-
};
|
|
32
|
-
export interface Reference {
|
|
33
|
-
id: string;
|
|
34
|
-
cid?: string;
|
|
35
|
-
}
|
|
36
|
-
export interface SettlementInfo {
|
|
37
|
-
executor: string;
|
|
38
|
-
settlementRef: Reference;
|
|
39
|
-
requestedAt: string;
|
|
40
|
-
allocateBefore: string;
|
|
41
|
-
settleBefore: string;
|
|
42
|
-
meta: Metadata;
|
|
43
|
-
}
|
|
44
|
-
export interface AllocationSpecification {
|
|
45
|
-
settlement: SettlementInfo;
|
|
46
|
-
transferLegId: string;
|
|
47
|
-
transferLeg: TransferLeg;
|
|
48
|
-
}
|
|
49
|
-
export interface ExtraArgs {
|
|
50
|
-
context: {
|
|
51
|
-
values: Record<string, unknown>;
|
|
52
|
-
};
|
|
53
|
-
meta: Metadata;
|
|
54
|
-
}
|
|
55
|
-
export interface AllocationFactory_Allocate {
|
|
56
|
-
expectedAdmin: string;
|
|
57
|
-
allocation: AllocationSpecification;
|
|
58
|
-
requestedAt: string;
|
|
59
|
-
inputHoldingCids: string[];
|
|
60
|
-
extraArgs: ExtraArgs;
|
|
61
|
-
}
|
|
62
|
-
export type AllocationInstructionView = {
|
|
63
|
-
originalInstructionCid: string | null;
|
|
64
|
-
allocation: AllocationSpecification;
|
|
65
|
-
pendingActions: Record<string, string>;
|
|
66
|
-
requestedAt: string;
|
|
67
|
-
inputHoldingCids: string[];
|
|
68
|
-
meta: Metadata;
|
|
69
|
-
};
|
|
70
|
-
export type AllocationView = {
|
|
71
|
-
allocation: AllocationSpecification;
|
|
72
|
-
holdingCids: string[];
|
|
73
|
-
meta: Metadata;
|
|
74
|
-
};
|
|
75
|
-
export type Transfer = {
|
|
76
|
-
sender: string;
|
|
77
|
-
receiver: string;
|
|
78
|
-
amount: string;
|
|
79
|
-
instrumentId: InstrumentId;
|
|
80
|
-
requestedAt: string;
|
|
81
|
-
executeBefore: string;
|
|
82
|
-
inputHoldingCids: string[];
|
|
83
|
-
meta: Metadata;
|
|
84
|
-
};
|
|
3
|
+
export * from './interface-ids.const.js';
|
|
4
|
+
export declare const TransferInstructionV1: typeof Splice.Api.Token.TransferInstructionV1;
|
|
5
|
+
export declare const AllocationInstructionV1: typeof Splice.Api.Token.AllocationInstructionV1;
|
|
6
|
+
export declare const AllocationRequestV1: typeof Splice.Api.Token.AllocationRequestV1;
|
|
7
|
+
export declare const AllocationV1: typeof Splice.Api.Token.AllocationV1;
|
|
8
|
+
export declare const HoldingV1: typeof Splice.Api.Token.HoldingV1;
|
|
9
|
+
export declare const MetadataV1: typeof Splice.Api.Token.MetadataV1;
|
|
10
|
+
export type { Holding, HoldingView, Lock, InstrumentId, HoldingInterface, } from '@daml.js/token-standard-models-1.0.0/lib/Splice/Api/Token/HoldingV1/module.js';
|
|
11
|
+
export type { Transfer, TransferInstruction, TransferInstructionView, TransferInstruction_Accept, TransferInstruction_Reject, TransferInstruction_Withdraw, TransferInstruction_Update, TransferFactory, TransferFactoryView, TransferFactory_PublicFetch, TransferFactory_Transfer, TransferInstructionResult, TransferInstructionResult_Output, TransferInstructionStatus, TransferFactoryInterface, TransferInstructionInterface, } from '@daml.js/token-standard-models-1.0.0/lib/Splice/Api/Token/TransferInstructionV1/module.js';
|
|
12
|
+
export type { AllocationFactory_Allocate, AllocationFactoryView, AllocationFactory_PublicFetch, AllocationInstruction_Update, AllocationInstruction_Withdraw, AllocationInstructionView, AllocationInstructionResult, AllocationInstructionResult_Output, AllocationFactory, AllocationFactoryInterface, AllocationInstruction, AllocationInstructionInterface, } from '@daml.js/token-standard-models-1.0.0/lib/Splice/Api/Token/AllocationInstructionV1/module.js';
|
|
13
|
+
export type { AllocationRequest, AllocationRequestView, AllocationRequest_Reject, AllocationRequest_Withdraw, AllocationRequestInterface, } from '@daml.js/token-standard-models-1.0.0/lib/Splice/Api/Token/AllocationRequestV1/module.js';
|
|
14
|
+
export type { AllocationSpecification, TransferLeg, SettlementInfo, Reference, AllocationView, Allocation, AllocationInterface, Allocation_Withdraw, Allocation_Cancel, Allocation_ExecuteTransfer, Allocation_WithdrawResult, Allocation_CancelResult, Allocation_ExecuteTransferResult, } from '@daml.js/token-standard-models-1.0.0/lib/Splice/Api/Token/AllocationV1/module.js';
|
|
15
|
+
export type { ExtraArgs, Metadata, ChoiceExecutionMetadata, AnyContract, AnyContractInterface, AnyContractView, ChoiceContext, AnyValue, } from '@daml.js/token-standard-models-1.0.0/lib/Splice/Api/Token/MetadataV1/module.js';
|
|
16
|
+
export type { ContractId, Party, Time, Date, Numeric, Int, Map, Optional, Serializable, } from '@daml/types';
|
|
85
17
|
export type Beneficiaries = {
|
|
86
18
|
beneficiary: PartyId;
|
|
87
19
|
weight: number;
|
package/dist/types.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,MAAM,EAAE,MAAM,sCAAsC,CAAA;AAC7D,OAAO,EAAE,OAAO,EAAE,MAAM,4BAA4B,CAAA;AAEpD,cAAc,0BAA0B,CAAA;AAExC,eAAO,MAAM,qBAAqB,+CAAyC,CAAA;AAC3E,eAAO,MAAM,uBAAuB,iDAA2C,CAAA;AAC/E,eAAO,MAAM,mBAAmB,6CAAuC,CAAA;AACvE,eAAO,MAAM,YAAY,sCAAgC,CAAA;AACzD,eAAO,MAAM,SAAS,mCAA6B,CAAA;AACnD,eAAO,MAAM,UAAU,oCAA8B,CAAA;AAErD,YAAY,EACR,OAAO,EACP,WAAW,EACX,IAAI,EACJ,YAAY,EACZ,gBAAgB,GACnB,MAAM,+EAA+E,CAAA;AAEtF,YAAY,EACR,QAAQ,EACR,mBAAmB,EACnB,uBAAuB,EACvB,0BAA0B,EAC1B,0BAA0B,EAC1B,4BAA4B,EAC5B,0BAA0B,EAC1B,eAAe,EACf,mBAAmB,EACnB,2BAA2B,EAC3B,wBAAwB,EACxB,yBAAyB,EACzB,gCAAgC,EAChC,yBAAyB,EACzB,wBAAwB,EACxB,4BAA4B,GAC/B,MAAM,2FAA2F,CAAA;AAElG,YAAY,EACR,0BAA0B,EAC1B,qBAAqB,EACrB,6BAA6B,EAC7B,4BAA4B,EAC5B,8BAA8B,EAC9B,yBAAyB,EACzB,2BAA2B,EAC3B,kCAAkC,EAClC,iBAAiB,EACjB,0BAA0B,EAC1B,qBAAqB,EACrB,8BAA8B,GACjC,MAAM,6FAA6F,CAAA;AAEpG,YAAY,EACR,iBAAiB,EACjB,qBAAqB,EACrB,wBAAwB,EACxB,0BAA0B,EAC1B,0BAA0B,GAC7B,MAAM,yFAAyF,CAAA;AAEhG,YAAY,EACR,uBAAuB,EACvB,WAAW,EACX,cAAc,EACd,SAAS,EACT,cAAc,EACd,UAAU,EACV,mBAAmB,EACnB,mBAAmB,EACnB,iBAAiB,EACjB,0BAA0B,EAC1B,yBAAyB,EACzB,uBAAuB,EACvB,gCAAgC,GACnC,MAAM,kFAAkF,CAAA;AAEzF,YAAY,EACR,SAAS,EACT,QAAQ,EACR,uBAAuB,EACvB,WAAW,EACX,oBAAoB,EACpB,eAAe,EACf,aAAa,EACb,QAAQ,GACX,MAAM,gFAAgF,CAAA;AAEvF,YAAY,EACR,UAAU,EACV,KAAK,EACL,IAAI,EACJ,IAAI,EACJ,OAAO,EACP,GAAG,EACH,GAAG,EACH,QAAQ,EACR,YAAY,GACf,MAAM,aAAa,CAAA;AAEpB,MAAM,MAAM,aAAa,GAAG;IACxB,WAAW,EAAE,OAAO,CAAA;IACpB,MAAM,EAAE,MAAM,CAAA;CACjB,CAAA"}
|
package/package.json
CHANGED
|
@@ -1,34 +1,48 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@canton-network/core-token-standard",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.11.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "daml codegen js for core token standard",
|
|
6
6
|
"repository": "github:hyperledger-labs/splice-wallet-kernel",
|
|
7
7
|
"license": "Apache-2.0",
|
|
8
|
-
"main": "dist/index.js",
|
|
9
|
-
"types": "dist/index.d.ts",
|
|
10
8
|
"packageManager": "yarn@4.9.4",
|
|
9
|
+
"main": "dist/index.cjs",
|
|
10
|
+
"module": "dist/index.js",
|
|
11
|
+
"types": "dist/index.d.ts",
|
|
12
|
+
"exports": {
|
|
13
|
+
".": {
|
|
14
|
+
"types": "./dist/index.d.ts",
|
|
15
|
+
"import": "./dist/index.js",
|
|
16
|
+
"require": "./dist/index.cjs",
|
|
17
|
+
"default": "./dist/index.js"
|
|
18
|
+
}
|
|
19
|
+
},
|
|
11
20
|
"scripts": {
|
|
12
|
-
"build": "rollup -c",
|
|
13
|
-
"dev": "
|
|
21
|
+
"build": "yarn clean && rollup -c && yarn clean:types-tmp",
|
|
22
|
+
"dev": "rollup -c -w",
|
|
23
|
+
"clean:types-tmp": "rm -rf dist/types",
|
|
14
24
|
"flatpack": "yarn pack --out \"$FLATPACK_OUTDIR\"",
|
|
15
|
-
"clean": "
|
|
25
|
+
"clean": "rm -rf dist"
|
|
16
26
|
},
|
|
17
27
|
"dependencies": {
|
|
18
|
-
"@canton-network/core-types": "^0.
|
|
19
|
-
"@daml/ledger": "3.4.0-snapshot.20250616.13911.0.v482d9ec0",
|
|
20
|
-
"@daml/types": "3.4.0-snapshot.20250616.13911.0.v482d9ec0",
|
|
28
|
+
"@canton-network/core-types": "^0.10.0",
|
|
21
29
|
"lodash": "^4.17.21",
|
|
22
30
|
"openapi-fetch": "^0.14.0",
|
|
23
31
|
"uuid": "^11.1.0",
|
|
24
32
|
"zod": "^3.25.67"
|
|
25
33
|
},
|
|
26
34
|
"devDependencies": {
|
|
35
|
+
"@daml.js/daml-stdlib-DA-Time-Types-1.0.0": "^3.3.0-snapshot.20250603.0",
|
|
36
|
+
"@daml.js/ghc-stdlib-DA-Internal-Template-1.0.0": "^3.3.0-snapshot.20250603.0",
|
|
27
37
|
"@daml.js/token-standard-models-1.0.0": "^3.3.0-snapshot.20250603.0",
|
|
38
|
+
"@daml/ledger": "3.3.0-snapshot.20250528.13806.0.v3cd439fb",
|
|
39
|
+
"@daml/types": "3.3.0-snapshot.20250528.13806.0.v3cd439fb",
|
|
28
40
|
"@rollup/plugin-commonjs": "^28.0.6",
|
|
41
|
+
"@rollup/plugin-json": "^6.1.0",
|
|
29
42
|
"@rollup/plugin-node-resolve": "^16.0.1",
|
|
30
43
|
"@rollup/plugin-typescript": "^12.1.4",
|
|
31
|
-
"rollup": "^4.
|
|
44
|
+
"rollup": "^4.52.5",
|
|
45
|
+
"rollup-plugin-dts": "^6.2.3",
|
|
32
46
|
"tslib": "^2.8.1",
|
|
33
47
|
"typescript": "^5.8.3"
|
|
34
48
|
},
|