@canton-network/core-token-standard 0.1.0 → 0.1.1

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.
@@ -0,0 +1,132 @@
1
+ /**
2
+ * This file was auto-generated by openapi-typescript.
3
+ * Do not make direct changes to the file.
4
+ */
5
+ export interface paths {
6
+ '/registry/allocation-instruction/v1/allocation-factory': {
7
+ /** @description Get the factory and choice context for creating allocations using the `AllocationFactory_Allocate` choice. */
8
+ post: operations['getAllocationFactory'];
9
+ };
10
+ }
11
+ export type webhooks = Record<string, never>;
12
+ export interface components {
13
+ schemas: {
14
+ GetFactoryRequest: {
15
+ /**
16
+ * @description The arguments that are intended to be passed to the choice provided by the factory.
17
+ * To avoid repeating the Daml type definitions, they are specified as JSON objects.
18
+ * However the concrete format is given by how the choice arguments are encoded using the Daml JSON API
19
+ * (with the `extraArgs.context` and `extraArgs.meta` fields set to the empty object).
20
+ *
21
+ * The choice arguments are provided so that the registry can also provide choice-argument
22
+ * specific contracts, e.g., the configuration for a specific instrument-id.
23
+ */
24
+ choiceArguments: Record<string, never>;
25
+ /**
26
+ * @description If set to true, the response will not include debug fields.
27
+ * @default false
28
+ */
29
+ excludeDebugFields?: boolean;
30
+ };
31
+ /**
32
+ * @description A factory contract together with the choice context required to exercise the choice
33
+ * provided by the factory. Typically used to implement the generic initiation of on-ledger workflows
34
+ * via a Daml interface.
35
+ *
36
+ * Clients SHOULD avoid reusing the same `FactoryWithChoiceContext` for exercising multiple choices,
37
+ * as the choice context MAY be specific to the choice being exercised.
38
+ */
39
+ FactoryWithChoiceContext: {
40
+ /** @description The contract ID of the contract implementing the factory interface. */
41
+ factoryId: string;
42
+ choiceContext: components['schemas']['ChoiceContext'];
43
+ };
44
+ /**
45
+ * @description The context required to exercise a choice on a contract via an interface.
46
+ * Used to retrieve additional reference date that is passed in via disclosed contracts,
47
+ * which are in turn referred to via their contract ID in the `choiceContextData`.
48
+ */
49
+ ChoiceContext: {
50
+ /** @description The additional data to use when exercising the choice. */
51
+ choiceContextData: Record<string, never>;
52
+ /**
53
+ * @description The contracts that are required to be disclosed to the participant node for exercising
54
+ * the choice.
55
+ */
56
+ disclosedContracts: components['schemas']['DisclosedContract'][];
57
+ };
58
+ DisclosedContract: {
59
+ templateId: string;
60
+ contractId: string;
61
+ createdEventBlob: string;
62
+ /**
63
+ * @description The synchronizer to which the contract is currently assigned.
64
+ * If the contract is in the process of being reassigned, then a "409" response is returned.
65
+ */
66
+ synchronizerId: string;
67
+ /**
68
+ * @description The name of the Daml package that was used to create the contract.
69
+ * Use this data only if you trust the provider, as it might not match the data in the
70
+ * `createdEventBlob`.
71
+ */
72
+ debugPackageName?: string;
73
+ /**
74
+ * @description The contract arguments that were used to create the contract.
75
+ * Use this data only if you trust the provider, as it might not match the data in the
76
+ * `createdEventBlob`.
77
+ */
78
+ debugPayload?: Record<string, never>;
79
+ /**
80
+ * Format: date-time
81
+ * @description The ledger effective time at which the contract was created.
82
+ * Use this data only if you trust the provider, as it might not match the data in the
83
+ * `createdEventBlob`.
84
+ */
85
+ debugCreatedAt?: string;
86
+ };
87
+ ErrorResponse: {
88
+ error: string;
89
+ };
90
+ };
91
+ responses: {
92
+ /** @description bad request */
93
+ 400: {
94
+ content: {
95
+ 'application/json': components['schemas']['ErrorResponse'];
96
+ };
97
+ };
98
+ /** @description not found */
99
+ 404: {
100
+ content: {
101
+ 'application/json': components['schemas']['ErrorResponse'];
102
+ };
103
+ };
104
+ };
105
+ parameters: never;
106
+ requestBodies: never;
107
+ headers: never;
108
+ pathItems: never;
109
+ }
110
+ export type $defs = Record<string, never>;
111
+ export type external = Record<string, never>;
112
+ export interface operations {
113
+ /** @description Get the factory and choice context for creating allocations using the `AllocationFactory_Allocate` choice. */
114
+ getAllocationFactory: {
115
+ requestBody: {
116
+ content: {
117
+ 'application/json': components['schemas']['GetFactoryRequest'];
118
+ };
119
+ };
120
+ responses: {
121
+ /** @description ok */
122
+ 200: {
123
+ content: {
124
+ 'application/json': components['schemas']['FactoryWithChoiceContext'];
125
+ };
126
+ };
127
+ 400: components['responses']['400'];
128
+ 404: components['responses']['404'];
129
+ };
130
+ };
131
+ }
132
+ //# sourceMappingURL=allocation-instruction-v1.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"allocation-instruction-v1.d.ts","sourceRoot":"","sources":["../../../src/generated-clients/splice-api-token-allocation-instruction-v1/allocation-instruction-v1.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,MAAM,WAAW,KAAK;IAClB,wDAAwD,EAAE;QACtD,8HAA8H;QAC9H,IAAI,EAAE,UAAU,CAAC,sBAAsB,CAAC,CAAA;KAC3C,CAAA;CACJ;AAED,MAAM,MAAM,QAAQ,GAAG,MAAM,CAAC,MAAM,EAAE,KAAK,CAAC,CAAA;AAE5C,MAAM,WAAW,UAAU;IACvB,OAAO,EAAE;QACL,iBAAiB,EAAE;YACf;;;;;;;;eAQG;YACH,eAAe,EAAE,MAAM,CAAC,MAAM,EAAE,KAAK,CAAC,CAAA;YACtC;;;eAGG;YACH,kBAAkB,CAAC,EAAE,OAAO,CAAA;SAC/B,CAAA;QACD;;;;;;;WAOG;QACH,wBAAwB,EAAE;YACtB,uFAAuF;YACvF,SAAS,EAAE,MAAM,CAAA;YACjB,aAAa,EAAE,UAAU,CAAC,SAAS,CAAC,CAAC,eAAe,CAAC,CAAA;SACxD,CAAA;QACD;;;;WAIG;QACH,aAAa,EAAE;YACX,0EAA0E;YAC1E,iBAAiB,EAAE,MAAM,CAAC,MAAM,EAAE,KAAK,CAAC,CAAA;YACxC;;;eAGG;YACH,kBAAkB,EAAE,UAAU,CAAC,SAAS,CAAC,CAAC,mBAAmB,CAAC,EAAE,CAAA;SACnE,CAAA;QACD,iBAAiB,EAAE;YACf,UAAU,EAAE,MAAM,CAAA;YAClB,UAAU,EAAE,MAAM,CAAA;YAClB,gBAAgB,EAAE,MAAM,CAAA;YACxB;;;eAGG;YACH,cAAc,EAAE,MAAM,CAAA;YAC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,WAAW,CAAC,CAAC,KAAK,CAAC,CAAA;YACnC,GAAG,EAAE,UAAU,CAAC,WAAW,CAAC,CAAC,KAAK,CAAC,CAAA;SACtC,CAAA;KACJ,CAAA;CACJ"}
@@ -0,0 +1,5 @@
1
+ /**
2
+ * This file was auto-generated by openapi-typescript.
3
+ * Do not make direct changes to the file.
4
+ */
5
+ export {};
@@ -0,0 +1,174 @@
1
+ /**
2
+ * This file was auto-generated by openapi-typescript.
3
+ * Do not make direct changes to the file.
4
+ */
5
+ export interface paths {
6
+ '/registry/allocations/v1/{allocationId}/choice-contexts/execute-transfer': {
7
+ /** @description Get the choice context to execute a transfer on an allocation. */
8
+ post: operations['getAllocationTransferContext'];
9
+ };
10
+ '/registry/allocations/v1/{allocationId}/choice-contexts/withdraw': {
11
+ /** @description Get the choice context to withdraw an allocation. */
12
+ post: operations['getAllocationWithdrawContext'];
13
+ };
14
+ '/registry/allocations/v1/{allocationId}/choice-contexts/cancel': {
15
+ /** @description Get the choice context to cancel an allocation. */
16
+ post: operations['getAllocationCancelContext'];
17
+ };
18
+ }
19
+ export type webhooks = Record<string, never>;
20
+ export interface components {
21
+ schemas: {
22
+ /** @description A request to get the context for executing a choice on a contract. */
23
+ GetChoiceContextRequest: {
24
+ /**
25
+ * @description Metadata that will be passed to the choice, and should be incorporated
26
+ * into the choice context. Provided for extensibility.
27
+ */
28
+ meta?: {
29
+ [key: string]: string;
30
+ };
31
+ };
32
+ /**
33
+ * @description The context required to exercise a choice on a contract via an interface.
34
+ * Used to retrieve additional reference date that is passed in via disclosed contracts,
35
+ * which are in turn referred to via their contract ID in the `choiceContextData`.
36
+ */
37
+ ChoiceContext: {
38
+ /** @description The additional data to use when exercising the choice. */
39
+ choiceContextData: Record<string, never>;
40
+ /**
41
+ * @description The contracts that are required to be disclosed to the participant node for exercising
42
+ * the choice.
43
+ */
44
+ disclosedContracts: components['schemas']['DisclosedContract'][];
45
+ };
46
+ DisclosedContract: {
47
+ templateId: string;
48
+ contractId: string;
49
+ createdEventBlob: string;
50
+ /**
51
+ * @description The synchronizer to which the contract is currently assigned.
52
+ * If the contract is in the process of being reassigned, then a "409" response is returned.
53
+ */
54
+ synchronizerId: string;
55
+ /**
56
+ * @description The name of the Daml package that was used to create the contract.
57
+ * Use this data only if you trust the provider, as it might not match the data in the
58
+ * `createdEventBlob`.
59
+ */
60
+ debugPackageName?: string;
61
+ /**
62
+ * @description The contract arguments that were used to create the contract.
63
+ * Use this data only if you trust the provider, as it might not match the data in the
64
+ * `createdEventBlob`.
65
+ */
66
+ debugPayload?: Record<string, never>;
67
+ /**
68
+ * Format: date-time
69
+ * @description The ledger effective time at which the contract was created.
70
+ * Use this data only if you trust the provider, as it might not match the data in the
71
+ * `createdEventBlob`.
72
+ */
73
+ debugCreatedAt?: string;
74
+ };
75
+ ErrorResponse: {
76
+ error: string;
77
+ };
78
+ };
79
+ responses: {
80
+ /** @description bad request */
81
+ 400: {
82
+ content: {
83
+ 'application/json': components['schemas']['ErrorResponse'];
84
+ };
85
+ };
86
+ /** @description not found */
87
+ 404: {
88
+ content: {
89
+ 'application/json': components['schemas']['ErrorResponse'];
90
+ };
91
+ };
92
+ };
93
+ parameters: never;
94
+ requestBodies: never;
95
+ headers: never;
96
+ pathItems: never;
97
+ }
98
+ export type $defs = Record<string, never>;
99
+ export type external = Record<string, never>;
100
+ export interface operations {
101
+ /** @description Get the choice context to execute a transfer on an allocation. */
102
+ getAllocationTransferContext: {
103
+ parameters: {
104
+ path: {
105
+ /** @description The contract ID of the allocation whose transfer the caller wants to execute. */
106
+ allocationId: string;
107
+ };
108
+ };
109
+ requestBody: {
110
+ content: {
111
+ 'application/json': components['schemas']['GetChoiceContextRequest'];
112
+ };
113
+ };
114
+ responses: {
115
+ /** @description ok */
116
+ 200: {
117
+ content: {
118
+ 'application/json': components['schemas']['ChoiceContext'];
119
+ };
120
+ };
121
+ 400: components['responses']['400'];
122
+ 404: components['responses']['404'];
123
+ };
124
+ };
125
+ /** @description Get the choice context to withdraw an allocation. */
126
+ getAllocationWithdrawContext: {
127
+ parameters: {
128
+ path: {
129
+ /** @description The contract ID of the allocation to withdraw. */
130
+ allocationId: string;
131
+ };
132
+ };
133
+ requestBody: {
134
+ content: {
135
+ 'application/json': components['schemas']['GetChoiceContextRequest'];
136
+ };
137
+ };
138
+ responses: {
139
+ /** @description ok */
140
+ 200: {
141
+ content: {
142
+ 'application/json': components['schemas']['ChoiceContext'];
143
+ };
144
+ };
145
+ 400: components['responses']['400'];
146
+ 404: components['responses']['404'];
147
+ };
148
+ };
149
+ /** @description Get the choice context to cancel an allocation. */
150
+ getAllocationCancelContext: {
151
+ parameters: {
152
+ path: {
153
+ /** @description The contract ID of the allocation to cancel. */
154
+ allocationId: string;
155
+ };
156
+ };
157
+ requestBody: {
158
+ content: {
159
+ 'application/json': components['schemas']['GetChoiceContextRequest'];
160
+ };
161
+ };
162
+ responses: {
163
+ /** @description ok */
164
+ 200: {
165
+ content: {
166
+ 'application/json': components['schemas']['ChoiceContext'];
167
+ };
168
+ };
169
+ 400: components['responses']['400'];
170
+ 404: components['responses']['404'];
171
+ };
172
+ };
173
+ }
174
+ //# sourceMappingURL=allocation-v1.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"allocation-v1.d.ts","sourceRoot":"","sources":["../../../src/generated-clients/splice-api-token-allocation-v1/allocation-v1.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,MAAM,WAAW,KAAK;IAClB,0EAA0E,EAAE;QACxE,kFAAkF;QAClF,IAAI,EAAE,UAAU,CAAC,8BAA8B,CAAC,CAAA;KACnD,CAAA;IACD,kEAAkE,EAAE;QAChE,qEAAqE;QACrE,IAAI,EAAE,UAAU,CAAC,8BAA8B,CAAC,CAAA;KACnD,CAAA;IACD,gEAAgE,EAAE;QAC9D,mEAAmE;QACnE,IAAI,EAAE,UAAU,CAAC,4BAA4B,CAAC,CAAA;KACjD,CAAA;CACJ;AAED,MAAM,MAAM,QAAQ,GAAG,MAAM,CAAC,MA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,CAAA;YACD,GAAG,EAAE,UAAU,CAAC,WAAW,CAAC,CAAC,KAAK,CAAC,CAAA;YACnC,GAAG,EAAE,UAAU,CAAC,WAAW,CAAC,CAAC,KAAK,CAAC,CAAA;SACtC,CAAA;KACJ,CAAA;IACD,mEAAmE;IACnE,0BAA0B,EAAE;QACxB,UAAU,EAAE;YACR,IAAI,EAAE;gBACF,gEAAgE;gBAChE,YAAY,EAAE,MAAM,CAAA;aACvB,CAAA;SACJ,CAAA;QACD,WAAW,EAAE;YACT,OAAO,EAAE;gBACL,kBAAkB,EAAE,UAAU,CAAC,SAAS,CAAC,CAAC,yBAAyB,CAAC,CAAA;aACvE,CAAA;SACJ,CAAA;QACD,SAAS,EAAE;YACP,sBAAsB;YACtB,GAAG,EAAE;gBACD,OAAO,EAAE;oBACL,kBAAkB,EAAE,UAAU,CAAC,SAAS,CAAC,CAAC,eAAe,CAAC,CAAA;iBAC7D,CAAA;aACJ,CAAA;YACD,GAAG,EAAE,UAAU,CAAC,WAAW,CAAC,CAAC,KAAK,CAAC,CAAA;YACnC,GAAG,EAAE,UAAU,CAAC,WAAW,CAAC,CAAC,KAAK,CAAC,CAAA;SACtC,CAAA;KACJ,CAAA;CACJ"}
@@ -0,0 +1,5 @@
1
+ /**
2
+ * This file was auto-generated by openapi-typescript.
3
+ * Do not make direct changes to the file.
4
+ */
5
+ export {};
@@ -0,0 +1,167 @@
1
+ /**
2
+ * This file was auto-generated by openapi-typescript.
3
+ * Do not make direct changes to the file.
4
+ */
5
+ export interface paths {
6
+ '/registry/metadata/v1/info': {
7
+ /**
8
+ * @description Get information about the registry.
9
+ * The response includes the standards supported by the registry.
10
+ */
11
+ get: operations['getRegistryInfo'];
12
+ };
13
+ '/registry/metadata/v1/instruments': {
14
+ /** @description List all instruments managed by this instrument admin. */
15
+ get: operations['listInstruments'];
16
+ };
17
+ '/registry/metadata/v1/instruments/{instrumentId}': {
18
+ /** @description Retrieve an instrument's metadata. */
19
+ get: operations['getInstrument'];
20
+ };
21
+ }
22
+ export type webhooks = Record<string, never>;
23
+ export interface components {
24
+ schemas: {
25
+ GetRegistryInfoResponse: {
26
+ /** @description The Daml party representing the registry app */
27
+ adminId: string;
28
+ /** @description The token standard APIs supported by the registry. Note that this only includes the registry-wide APIs. Use the instrument lookup endpoints to see which APIs are supported for a given instrument */
29
+ supportedApis: components['schemas']['SupportedApis'];
30
+ };
31
+ Instrument: {
32
+ /** @description The unique identifier assigned by the admin to the instrument. */
33
+ id: string;
34
+ /** @description The display name for the instrument recommended by the instrument admin. This is not necessarily unique. */
35
+ name: string;
36
+ /** @description The symbol for the instrument recommended by the instrument admin. This is not necessarily unique. */
37
+ symbol: string;
38
+ /** @description Decimal encoded current total supply of the instrument. */
39
+ totalSupply?: string;
40
+ /**
41
+ * Format: date-time
42
+ * @description The timestamp when the total supply was last computed.
43
+ */
44
+ totalSupplyAsOf?: string;
45
+ /**
46
+ * Format: int8
47
+ * @description The number of decimal places used by the instrument.
48
+ *
49
+ * Must be a number between 0 and 10, as the Daml interfaces represent holding amounts as
50
+ * `Decimal` values, which use 10 decimal places and are precise for 38 digits.
51
+ * Setting this to 0 means that the instrument can only be held in whole units.
52
+ *
53
+ * This number SHOULD be used for display purposes in a wallet to decide how many
54
+ * decimal places to show and accept when displaying or entering amounts.
55
+ *
56
+ * @default 10
57
+ */
58
+ decimals: number;
59
+ supportedApis: components['schemas']['SupportedApis'];
60
+ };
61
+ ListInstrumentsResponse: {
62
+ instruments: components['schemas']['Instrument'][];
63
+ /** @description The token for the next page of results, to be used as the lastInstrumentId for the next page. */
64
+ nextPageToken?: string;
65
+ };
66
+ ErrorResponse: {
67
+ error: string;
68
+ };
69
+ /**
70
+ * @description Map from token standard API name to the minor version of the API supported, e.g.,
71
+ * splice-api-token-metadata-v1 -> 1 where the `1` corresponds to the minor version.
72
+ */
73
+ SupportedApis: {
74
+ [key: string]: number;
75
+ };
76
+ };
77
+ responses: {
78
+ /** @description bad request */
79
+ 400: {
80
+ content: {
81
+ 'application/json': components['schemas']['ErrorResponse'];
82
+ };
83
+ };
84
+ /** @description not found */
85
+ 404: {
86
+ content: {
87
+ 'application/json': components['schemas']['ErrorResponse'];
88
+ };
89
+ };
90
+ /** @description conflict */
91
+ 409: {
92
+ content: {
93
+ 'application/json': components['schemas']['ErrorResponse'];
94
+ };
95
+ };
96
+ /** @description Internal server error */
97
+ 500: {
98
+ content: {
99
+ 'application/json': components['schemas']['ErrorResponse'];
100
+ };
101
+ };
102
+ };
103
+ parameters: never;
104
+ requestBodies: never;
105
+ headers: never;
106
+ pathItems: never;
107
+ }
108
+ export type $defs = Record<string, never>;
109
+ export type external = Record<string, never>;
110
+ export interface operations {
111
+ /**
112
+ * @description Get information about the registry.
113
+ * The response includes the standards supported by the registry.
114
+ */
115
+ getRegistryInfo: {
116
+ responses: {
117
+ /** @description ok */
118
+ 200: {
119
+ content: {
120
+ 'application/json': components['schemas']['GetRegistryInfoResponse'];
121
+ };
122
+ };
123
+ 404: components['responses']['404'];
124
+ 500: components['responses']['500'];
125
+ };
126
+ };
127
+ /** @description List all instruments managed by this instrument admin. */
128
+ listInstruments: {
129
+ parameters: {
130
+ query?: {
131
+ /** @description Number of instruments per page. */
132
+ pageSize?: number;
133
+ /** @description The `nextPageToken` received from the response for the previous page. */
134
+ pageToken?: string;
135
+ };
136
+ };
137
+ responses: {
138
+ /** @description ok */
139
+ 200: {
140
+ content: {
141
+ 'application/json': components['schemas']['ListInstrumentsResponse'];
142
+ };
143
+ };
144
+ 404: components['responses']['404'];
145
+ 500: components['responses']['500'];
146
+ };
147
+ };
148
+ /** @description Retrieve an instrument's metadata. */
149
+ getInstrument: {
150
+ parameters: {
151
+ path: {
152
+ instrumentId: string;
153
+ };
154
+ };
155
+ responses: {
156
+ /** @description ok */
157
+ 200: {
158
+ content: {
159
+ 'application/json': components['schemas']['Instrument'];
160
+ };
161
+ };
162
+ 404: components['responses']['404'];
163
+ 500: components['responses']['500'];
164
+ };
165
+ };
166
+ }
167
+ //# sourceMappingURL=token-metadata-v1.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"token-metadata-v1.d.ts","sourceRoot":"","sources":["../../../src/generated-clients/splice-api-token-metadata-v1/token-metadata-v1.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,MAAM,WAAW,KAAK;IAClB,4BAA4B,EAAE;QAC1B;;;WAGG;QACH,GAAG,EAAE,UAAU,CAAC,iBAAiB,CAAC,CAAA;KACrC,CAAA;IACD,mCAAmC,EAAE;QACjC,0EAA0E;QAC1E,GAAG,EAAE,UAAU,CAAC,iBAAiB,CAAC,CAAA;KACrC,CAAA;IACD,kDAAkD,EAAE;QAChD,sDAAsD;QACtD,GAAG,EAAE,UAAU,CAAC,eAAe,CAAC,CAAA;KACnC,CAAA;CACJ;AAED,MAAM,MAAM,QAAQ,GAAG,MAAM,CAAC,MAAM,EAAE,KAAK,CAAC,CAAA;AAE5C,MAAM,WAAW,UAAU;IACvB,OAAO,EAAE;QACL,uBAAuB,EAAE;YACrB,gEAAgE;YAChE,OAAO,EAAE,MAAM,CAAA;YACf,sNAAsN;YACtN,aAAa,EAAE,UAAU,CAAC,SAAS,CAAC,CAAC,eAAe,CAAC,CAAA;SACxD,CAAA;QACD,UAAU,EAAE;YACR,kFAAkF;YAClF,EAAE,EAAE,MAAM,CAAA;YACV,4HAA4H;YAC5H,IAAI,EAAE,MAAM,CAAA;YACZ,sHAAsH;YACtH,MAAM,EAAE,MAAM,CAAA;YACd,2EAA2E;YAC3E,WAAW,CAAC,EAAE,MAAM,CAAA;YACpB;;;eAGG;YACH,eAAe,CAAC,EAAE,MAAM,CAAA;YACxB;;;;;;;;;;;;eAYG;YACH,QAAQ,EAAE,MAAM,CAAA;YAChB,aAAa,EAAE,UAAU,CAAC,SAAS,CAAC,CAAC,eAAe,CAAC,CAAA;SACxD,CAAA;QACD,uBAAuB,EAAE;YACrB,WAAW,EAAE,UAAU,CAAC,SAAS,CAAC,CAAC,YAAY,CAAC,EAAE,CAAA;YA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was auto-generated by openapi-typescript.
3
+ * Do not make direct changes to the file.
4
+ */
5
+ export {};
@@ -0,0 +1,237 @@
1
+ /**
2
+ * This file was auto-generated by openapi-typescript.
3
+ * Do not make direct changes to the file.
4
+ */
5
+ export interface paths {
6
+ '/registry/transfer-instruction/v1/transfer-factory': {
7
+ /** @description Get the factory and choice context for executing a direct transfer. */
8
+ post: operations['getTransferFactory'];
9
+ };
10
+ '/registry/transfer-instruction/v1/{transferInstructionId}/choice-contexts/accept': {
11
+ /** @description Get the choice context to accept a transfer instruction. */
12
+ post: operations['getTransferInstructionAcceptContext'];
13
+ };
14
+ '/registry/transfer-instruction/v1/{transferInstructionId}/choice-contexts/reject': {
15
+ /** @description Get the choice context to reject a transfer instruction. */
16
+ post: operations['getTransferInstructionRejectContext'];
17
+ };
18
+ '/registry/transfer-instruction/v1/{transferInstructionId}/choice-contexts/withdraw': {
19
+ /** @description Get the choice context to withdraw a transfer instruction. */
20
+ post: operations['getTransferInstructionWithdrawContext'];
21
+ };
22
+ }
23
+ export type webhooks = Record<string, never>;
24
+ export interface components {
25
+ schemas: {
26
+ GetFactoryRequest: {
27
+ /**
28
+ * @description The arguments that are intended to be passed to the choice provided by the factory.
29
+ * To avoid repeating the Daml type definitions, they are specified as JSON objects.
30
+ * However the concrete format is given by how the choice arguments are encoded using the Daml JSON API
31
+ * (with the `extraArgs.context` and `extraArgs.meta` fields set to the empty object).
32
+ *
33
+ * The choice arguments are provided so that the registry can also provide choice-argument
34
+ * specific contracts, e.g., the configuration for a specific instrument-id.
35
+ */
36
+ choiceArguments: Record<string, never>;
37
+ /**
38
+ * @description If set to true, the response will not include debug fields.
39
+ * @default false
40
+ */
41
+ excludeDebugFields?: boolean;
42
+ };
43
+ /** @description A request to get the context for executing a choice on a contract. */
44
+ GetChoiceContextRequest: {
45
+ /**
46
+ * @description Metadata that will be passed to the choice, and should be incorporated
47
+ * into the choice context. Provided for extensibility.
48
+ */
49
+ meta?: {
50
+ [key: string]: string;
51
+ };
52
+ };
53
+ /**
54
+ * @description The transfer factory contract together with the choice context required to exercise the choice
55
+ * provided by the factory. Typically used to implement the generic initiation of on-ledger workflows
56
+ * via a Daml interface.
57
+ *
58
+ * Clients SHOULD avoid reusing the same `FactoryWithChoiceContext` for exercising multiple choices,
59
+ * as the choice context MAY be specific to the choice being exercised.
60
+ */
61
+ TransferFactoryWithChoiceContext: {
62
+ /** @description The contract ID of the contract implementing the factory interface. */
63
+ factoryId: string;
64
+ /**
65
+ * @description The kind of transfer workflow that will be used:
66
+ * * `offer`: offer a transfer to the receiver and only transfer if they accept
67
+ * * `direct`: transfer directly to the receiver without asking them for approval.
68
+ * Only chosen if the receiver has pre-approved direct transfers.
69
+ * * `self`: a self-transfer where the sender and receiver are the same party.
70
+ * No approval is required, and the transfer is typically immediate.
71
+ *
72
+ * @enum {string}
73
+ */
74
+ transferKind: 'self' | 'direct' | 'offer';
75
+ choiceContext: components['schemas']['ChoiceContext'];
76
+ };
77
+ /**
78
+ * @description The context required to exercise a choice on a contract via an interface.
79
+ * Used to retrieve additional reference data that is passed in via disclosed contracts,
80
+ * which are in turn referred to via their contract ID in the `choiceContextData`.
81
+ */
82
+ ChoiceContext: {
83
+ /** @description The additional data to use when exercising the choice. */
84
+ choiceContextData: Record<string, never>;
85
+ /**
86
+ * @description The contracts that are required to be disclosed to the participant node for exercising
87
+ * the choice.
88
+ */
89
+ disclosedContracts: components['schemas']['DisclosedContract'][];
90
+ };
91
+ DisclosedContract: {
92
+ templateId: string;
93
+ contractId: string;
94
+ createdEventBlob: string;
95
+ /**
96
+ * @description The synchronizer to which the contract is currently assigned.
97
+ * If the contract is in the process of being reassigned, then a "409" response is returned.
98
+ */
99
+ synchronizerId: string;
100
+ /**
101
+ * @description The name of the Daml package that was used to create the contract.
102
+ * Use this data only if you trust the provider, as it might not match the data in the
103
+ * `createdEventBlob`.
104
+ */
105
+ debugPackageName?: string;
106
+ /**
107
+ * @description The contract arguments that were used to create the contract.
108
+ * Use this data only if you trust the provider, as it might not match the data in the
109
+ * `createdEventBlob`.
110
+ */
111
+ debugPayload?: Record<string, never>;
112
+ /**
113
+ * Format: date-time
114
+ * @description The ledger effective time at which the contract was created.
115
+ * Use this data only if you trust the provider, as it might not match the data in the
116
+ * `createdEventBlob`.
117
+ */
118
+ debugCreatedAt?: string;
119
+ };
120
+ ErrorResponse: {
121
+ error: string;
122
+ };
123
+ };
124
+ responses: {
125
+ /** @description bad request */
126
+ 400: {
127
+ content: {
128
+ 'application/json': components['schemas']['ErrorResponse'];
129
+ };
130
+ };
131
+ /** @description not found */
132
+ 404: {
133
+ content: {
134
+ 'application/json': components['schemas']['ErrorResponse'];
135
+ };
136
+ };
137
+ };
138
+ parameters: never;
139
+ requestBodies: never;
140
+ headers: never;
141
+ pathItems: never;
142
+ }
143
+ export type $defs = Record<string, never>;
144
+ export type external = Record<string, never>;
145
+ export interface operations {
146
+ /** @description Get the factory and choice context for executing a direct transfer. */
147
+ getTransferFactory: {
148
+ requestBody: {
149
+ content: {
150
+ 'application/json': components['schemas']['GetFactoryRequest'];
151
+ };
152
+ };
153
+ responses: {
154
+ /** @description ok */
155
+ 200: {
156
+ content: {
157
+ 'application/json': components['schemas']['TransferFactoryWithChoiceContext'];
158
+ };
159
+ };
160
+ 400: components['responses']['400'];
161
+ 404: components['responses']['404'];
162
+ };
163
+ };
164
+ /** @description Get the choice context to accept a transfer instruction. */
165
+ getTransferInstructionAcceptContext: {
166
+ parameters: {
167
+ path: {
168
+ /** @description The contract ID of the transfer instruction to accept. */
169
+ transferInstructionId: string;
170
+ };
171
+ };
172
+ requestBody: {
173
+ content: {
174
+ 'application/json': components['schemas']['GetChoiceContextRequest'];
175
+ };
176
+ };
177
+ responses: {
178
+ /** @description ok */
179
+ 200: {
180
+ content: {
181
+ 'application/json': components['schemas']['ChoiceContext'];
182
+ };
183
+ };
184
+ 400: components['responses']['400'];
185
+ 404: components['responses']['404'];
186
+ };
187
+ };
188
+ /** @description Get the choice context to reject a transfer instruction. */
189
+ getTransferInstructionRejectContext: {
190
+ parameters: {
191
+ path: {
192
+ /** @description The contract ID of the transfer instruction to reject. */
193
+ transferInstructionId: string;
194
+ };
195
+ };
196
+ requestBody: {
197
+ content: {
198
+ 'application/json': components['schemas']['GetChoiceContextRequest'];
199
+ };
200
+ };
201
+ responses: {
202
+ /** @description ok */
203
+ 200: {
204
+ content: {
205
+ 'application/json': components['schemas']['ChoiceContext'];
206
+ };
207
+ };
208
+ 400: components['responses']['400'];
209
+ 404: components['responses']['404'];
210
+ };
211
+ };
212
+ /** @description Get the choice context to withdraw a transfer instruction. */
213
+ getTransferInstructionWithdrawContext: {
214
+ parameters: {
215
+ path: {
216
+ /** @description The contract ID of the transfer instruction to withdraw. */
217
+ transferInstructionId: string;
218
+ };
219
+ };
220
+ requestBody: {
221
+ content: {
222
+ 'application/json': components['schemas']['GetChoiceContextRequest'];
223
+ };
224
+ };
225
+ responses: {
226
+ /** @description ok */
227
+ 200: {
228
+ content: {
229
+ 'application/json': components['schemas']['ChoiceContext'];
230
+ };
231
+ };
232
+ 400: components['responses']['400'];
233
+ 404: components['responses']['404'];
234
+ };
235
+ };
236
+ }
237
+ //# sourceMappingURL=transfer-instruction-v1.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"transfer-instruction-v1.d.ts","sourceRoot":"","sources":["../../../src/generated-clients/splice-api-token-transfer-instruction-v1/transfer-instruction-v1.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,MAAM,WAAW,KAAK;IAClB,oDAAoD,EAAE;QAClD,uFAAuF;QACvF,IAAI,EAAE,UAAU,CAAC,oBAAoB,CAAC,CAAA;KACzC,CAAA;IACD,kFAAkF,EAAE;QAChF,4EAA4E;QAC5E,IAAI,EAAE,UAAU,CAAC,qCAAqC,CAAC,CAAA;KAC1D,CAAA;IACD,kFAAkF,EAAE;QAChF,4EAA4E;QAC5E,IAAI,EAAE,UAAU,CAAC,qCAAqC,CAAC,CAAA;KAC1D,CAAA;IACD,oFAAoF,EAA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AE;YACR,IAAI,EAAE;gBACF,4EAA4E;gBAC5E,qBAAqB,EAAE,MAAM,CAAA;aAChC,CAAA;SACJ,CAAA;QACD,WAAW,EAAE;YACT,OAAO,EAAE;gBACL,kBAAkB,EAAE,UAAU,CAAC,SAAS,CAAC,CAAC,yBAAyB,CAAC,CAAA;aACvE,CAAA;SACJ,CAAA;QACD,SAAS,EAAE;YACP,sBAAsB;YACtB,GAAG,EAAE;gBACD,OAAO,EAAE;oBACL,kBAAkB,EAAE,UAAU,CAAC,SAAS,CAAC,CAAC,eAAe,CAAC,CAAA;iBAC7D,CAAA;aACJ,CAAA;YACD,GAAG,EAAE,UAAU,CAAC,WAAW,CAAC,CAAC,KAAK,CAAC,CAAA;YACnC,GAAG,EAAE,UAAU,CAAC,WAAW,CAAC,CAAC,KAAK,CAAC,CAAA;SACtC,CAAA;KACJ,CAAA;CACJ"}
@@ -0,0 +1,5 @@
1
+ /**
2
+ * This file was auto-generated by openapi-typescript.
3
+ * Do not make direct changes to the file.
4
+ */
5
+ export {};
package/dist/index.d.ts CHANGED
@@ -1 +1,3 @@
1
+ export * from './token-standard-client.js';
2
+ export type { AllocationInstructionV1, AllocationRequestV1, AllocationV1, HoldingV1, MetadataV1, TransferInstructionV1, } from './token-standard-models-1.0.0/lib/Splice/Api/Token/index.js';
1
3
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":""}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,4BAA4B,CAAA;AAC1C,YAAY,EACR,uBAAuB,EACvB,mBAAmB,EACnB,YAAY,EACZ,SAAS,EACT,UAAU,EACV,qBAAqB,GACxB,MAAM,6DAA6D,CAAA"}
package/dist/index.js CHANGED
@@ -1 +1 @@
1
- "use strict";
1
+ export * from './token-standard-client.js';
@@ -0,0 +1,63 @@
1
+ import { paths as allocation } from './generated-clients/splice-api-token-allocation-v1/allocation-v1';
2
+ import { paths as metadata } from './generated-clients/splice-api-token-metadata-v1/token-metadata-v1';
3
+ import { paths as transferInstruction } from './generated-clients/splice-api-token-transfer-instruction-v1/transfer-instruction-v1';
4
+ import { paths as allocationInstruction } from './generated-clients/splice-api-token-allocation-instruction-v1/allocation-instruction-v1';
5
+ import { Logger } from '@canton-network/core-types';
6
+ type paths = allocation & metadata & transferInstruction & allocationInstruction;
7
+ type PostEndpoint = {
8
+ [Pathname in keyof paths]: paths[Pathname] extends {
9
+ post: unknown;
10
+ } ? Pathname : never;
11
+ }[keyof paths];
12
+ export type PostRequest<Path extends PostEndpoint> = paths[Path] extends {
13
+ post: {
14
+ requestBody: {
15
+ content: {
16
+ 'application/json': infer Req;
17
+ };
18
+ };
19
+ };
20
+ } ? Req : never;
21
+ export type PostResponse<Path extends PostEndpoint> = paths[Path] extends {
22
+ post: {
23
+ responses: {
24
+ 200: {
25
+ content: {
26
+ 'application/json': infer Res;
27
+ };
28
+ };
29
+ };
30
+ };
31
+ } ? Res : never;
32
+ type GetEndpoint = {
33
+ [Pathname in keyof paths]: paths[Pathname] extends {
34
+ get: unknown;
35
+ } ? Pathname : never;
36
+ }[keyof paths];
37
+ export type GetResponse<Path extends GetEndpoint> = paths[Path] extends {
38
+ get: {
39
+ responses: {
40
+ 200: {
41
+ content: {
42
+ 'application/json': infer Res;
43
+ };
44
+ };
45
+ };
46
+ };
47
+ } ? Res : never;
48
+ export declare class TokenStandardClient {
49
+ private readonly client;
50
+ private readonly logger;
51
+ constructor(baseUrl: string, logger: Logger, token?: string);
52
+ post<Path extends PostEndpoint>(path: Path, body: PostRequest<Path>, params?: {
53
+ path?: Record<string, string>;
54
+ query?: Record<string, string>;
55
+ }): Promise<PostResponse<Path>>;
56
+ get<Path extends GetEndpoint>(path: Path, params?: {
57
+ path?: Record<string, string>;
58
+ query?: Record<string, string>;
59
+ }): Promise<GetResponse<Path>>;
60
+ private valueOrError;
61
+ }
62
+ export {};
63
+ //# sourceMappingURL=token-standard-client.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"token-standard-client.d.ts","sourceRoot":"","sources":["../src/token-standard-client.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,IAAI,UAAU,EAAE,MAAM,kEAAkE,CAAA;AACtG,OAAO,EAAE,KAAK,IAAI,QAAQ,EAAE,MAAM,oEAAoE,CAAA;AACtG,OAAO,EAAE,KAAK,IAAI,mBAAmB,EAAE,MAAM,sFAAsF,CAAA;AACnI,OAAO,EAAE,KAAK,IAAI,qBAAqB,EAAE,MAAM,0FAA0F,CAAA;AAEzI,OAAO,EAAE,MAAM,EAAE,MAAM,4BAA4B,CAAA;AAEnD,KAAK,KAAK,GAAG,UAAU,GAAG,QAAQ,GAAG,mBAAmB,GAAG,qBAAqB,CAAA;AAIhF,KAAK,YAAY,GAAG;KACf,QAAQ,IAAI,MAAM,KAAK,GAAG,KAAK,CAAC,QAAQ,CAAC,SAAS;QAC/C,IAAI,EAAE,OAAO,CAAA;KAChB,GACK,QAAQ,GACR,KAAK;CACd,CAAC,MAAM,KAAK,CAAC,CAAA;AAGd,MAAM,MAAM,WAAW,CAAC,IAAI,SAAS,YAAY,IAAI,KAAK,CAAC,IAAI,CAAC,SAAS;IACrE,IAAI,EAAE;QAAE,WAAW,EAAE;YAAE,OAAO,EAAE;gBAAE,kBAAkB,EAAE,MAAM,GAAG,CAAA;aAAE,CAAA;SAAE,CAAA;KAAE,CAAA;CACxE,GACK,GAAG,GACH,KAAK,CAAA;AAGX,MAAM,MAAM,YAAY,CAAC,IAAI,SAAS,YAAY,IAAI,KAAK,CAAC,IAAI,CAAC,SAAS;IACtE,IAAI,EAAE;QAAE,SAAS,EAAE;YAAE,GAAG,EAAE;gBAAE,OAAO,EAAE;oBAAE,kBAAkB,EAAE,MAAM,GAAG,CAAA;iBAAE,CAAA;aAAE,CAAA;SAAE,CAAA;KAAE,CAAA;CAC/E,GACK,GAAG,GACH,KA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AAI,CAAC,CAAC;YAYf,YAAY;CAU7B"}
@@ -0,0 +1,45 @@
1
+ import createClient from 'openapi-fetch';
2
+ export class TokenStandardClient {
3
+ client;
4
+ logger;
5
+ constructor(baseUrl, logger, token) {
6
+ this.logger = logger;
7
+ this.logger.debug({ baseUrl, token }, 'TokenStandardClient initialized');
8
+ this.client = createClient({
9
+ baseUrl,
10
+ fetch: async (url, options = {}) => {
11
+ return fetch(url, {
12
+ ...options,
13
+ headers: {
14
+ ...(options.headers || {}),
15
+ ...(token ? { Authorization: `Bearer ${token}` } : {}),
16
+ 'Content-Type': 'application/json',
17
+ },
18
+ });
19
+ },
20
+ });
21
+ }
22
+ async post(path, body, params) {
23
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any -- (cant align this with openapi-fetch generics :shrug:)
24
+ const options = { body, params };
25
+ this.logger.debug({ requestBody: body }, `POST ${path}`);
26
+ const resp = await this.client.POST(path, options);
27
+ this.logger.debug({ requestBody: body, response: resp }, `POST ${path}`);
28
+ return this.valueOrError(resp);
29
+ }
30
+ async get(path, params) {
31
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any -- (cant align this with openapi-fetch generics :shrug:)
32
+ const options = { params };
33
+ const resp = await this.client.GET(path, options);
34
+ this.logger.debug({ path: path, params: params, response: resp }, `GET ${path}`);
35
+ return this.valueOrError(resp);
36
+ }
37
+ async valueOrError(response) {
38
+ if (response.data === undefined) {
39
+ return Promise.reject(response.error);
40
+ }
41
+ else {
42
+ return Promise.resolve(response.data);
43
+ }
44
+ }
45
+ }
package/package.json CHANGED
@@ -1,27 +1,32 @@
1
1
  {
2
- "name": "@canton-network/core-token-standard",
3
- "version": "0.1.0",
4
- "description": "daml codegen js for core token standard",
5
- "type": "module",
6
- "main": "dist/index.js",
7
- "types": "dist/index.d.ts",
8
- "packageManager": "yarn@4.9.2",
9
- "scripts": {
10
- "build": "tsc -b",
11
- "dev": "tsc -b --watch",
12
- "clean": "tsc -b --clean; rm -rf dist"
13
- },
14
- "dependencies": {
15
- "uuid": "^11.1.0",
16
- "zod": "^3.25.67"
17
- },
18
- "devDependencies": {
19
- "typescript": "^5.8.3"
20
- },
21
- "files": [
22
- "dist/*"
23
- ],
24
- "publishConfig": {
25
- "access": "public"
26
- }
27
- }
2
+ "name": "@canton-network/core-token-standard",
3
+ "version": "0.1.1",
4
+ "type": "module",
5
+ "description": "daml codegen js for core token standard",
6
+ "repository": "github:hyperledger-labs/splice-wallet-kernel",
7
+ "license": "Apache-2.0",
8
+ "main": "dist/index.js",
9
+ "types": "dist/index.d.ts",
10
+ "packageManager": "yarn@4.9.4",
11
+ "scripts": {
12
+ "build": "tsc -b",
13
+ "dev": "tsc -b --watch",
14
+ "clean": "tsc -b --clean; rm -rf dist"
15
+ },
16
+ "dependencies": {
17
+ "@canton-network/core-types": "^0.1.1",
18
+ "openapi-fetch": "^0.14.0",
19
+ "uuid": "^11.1.0",
20
+ "zod": "^3.25.67"
21
+ },
22
+ "devDependencies": {
23
+ "@daml/types": "3.4.0-snapshot.20250616.13911.0.v482d9ec0",
24
+ "typescript": "^5.8.3"
25
+ },
26
+ "files": [
27
+ "dist/**"
28
+ ],
29
+ "publishConfig": {
30
+ "access": "public"
31
+ }
32
+ }