@open-captable-protocol/canton 0.0.37 → 0.0.38
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/functions/issuer/updateIssuerData.d.ts +28 -1
- package/dist/functions/issuer/updateIssuerData.d.ts.map +1 -1
- package/dist/functions/issuer/updateIssuerData.js +33 -1
- package/dist/functions/issuer/updateIssuerData.js.map +1 -1
- package/dist/functions/stockClass/createStockClass.d.ts +15 -1
- package/dist/functions/stockClass/createStockClass.d.ts.map +1 -1
- package/dist/functions/stockClass/createStockClass.js +20 -1
- package/dist/functions/stockClass/createStockClass.js.map +1 -1
- package/dist/functions/stockClass/updateStockClass.d.ts +15 -2
- package/dist/functions/stockClass/updateStockClass.d.ts.map +1 -1
- package/dist/functions/stockClass/updateStockClass.js +20 -2
- package/dist/functions/stockClass/updateStockClass.js.map +1 -1
- package/package.json +1 -1
|
@@ -1,7 +1,10 @@
|
|
|
1
1
|
import { LedgerJsonApiClient } from '@fairmint/canton-node-sdk';
|
|
2
|
+
import { ContractDetails } from '../../types/contractDetails';
|
|
2
3
|
import { OcfIssuerData } from '../../types/native';
|
|
3
4
|
export interface UpdateIssuerDataParams {
|
|
4
5
|
issuerContractId: string;
|
|
6
|
+
/** Details of the FeaturedAppRight contract for disclosed contracts */
|
|
7
|
+
featuredAppRightContractDetails: ContractDetails;
|
|
5
8
|
newIssuerData: OcfIssuerData;
|
|
6
9
|
}
|
|
7
10
|
export interface UpdateIssuerDataResult {
|
|
@@ -10,8 +13,32 @@ export interface UpdateIssuerDataResult {
|
|
|
10
13
|
}
|
|
11
14
|
/**
|
|
12
15
|
* Update issuer data by exercising the UpdateIssuerData choice on an Issuer contract
|
|
16
|
+
*
|
|
17
|
+
* This function requires the FeaturedAppRight contract details to be provided for disclosed contracts,
|
|
18
|
+
* which is necessary for cross-domain contract interactions in Canton.
|
|
19
|
+
*
|
|
20
|
+
* @example
|
|
21
|
+
* ```typescript
|
|
22
|
+
* const featuredAppRightContractDetails = {
|
|
23
|
+
* contractId: "abcdef1234567890",
|
|
24
|
+
* createdEventBlob: "serialized_featured_app_right_blob_here",
|
|
25
|
+
* synchronizerId: "featured_sync_id_here",
|
|
26
|
+
* templateId: "FeaturedAppRight:template:id:here"
|
|
27
|
+
* };
|
|
28
|
+
*
|
|
29
|
+
* const result = await updateIssuerData(client, {
|
|
30
|
+
* issuerContractId: "1234567890abcdef",
|
|
31
|
+
* featuredAppRightContractDetails,
|
|
32
|
+
* newIssuerData: {
|
|
33
|
+
* legal_name: "Updated Company Inc.",
|
|
34
|
+
* country_of_formation: "US",
|
|
35
|
+
* // ... other updated issuer data
|
|
36
|
+
* }
|
|
37
|
+
* });
|
|
38
|
+
* ```
|
|
39
|
+
*
|
|
13
40
|
* @param client - The ledger JSON API client
|
|
14
|
-
* @param params - Parameters for updating issuer data
|
|
41
|
+
* @param params - Parameters for updating issuer data, including the contract details for disclosed contracts
|
|
15
42
|
* @returns Promise resolving to the result of the issuer data update
|
|
16
43
|
*/
|
|
17
44
|
export declare function updateIssuerData(client: LedgerJsonApiClient, params: UpdateIssuerDataParams): Promise<UpdateIssuerDataResult>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"updateIssuerData.d.ts","sourceRoot":"","sources":["../../../src/functions/issuer/updateIssuerData.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,mBAAmB,EAAE,MAAM,2BAA2B,CAAC;AAEhE,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AAGnD,MAAM,WAAW,sBAAsB;IACrC,gBAAgB,EAAE,MAAM,CAAC;IACzB,aAAa,EAAE,aAAa,CAAC;CAC9B;AAED,MAAM,WAAW,sBAAsB;IACrC,UAAU,EAAE,MAAM,CAAC;IACnB,QAAQ,EAAE,MAAM,CAAC;CAClB;AAUD
|
|
1
|
+
{"version":3,"file":"updateIssuerData.d.ts","sourceRoot":"","sources":["../../../src/functions/issuer/updateIssuerData.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,mBAAmB,EAAE,MAAM,2BAA2B,CAAC;AAEhE,OAAO,EAAE,eAAe,EAAE,MAAM,6BAA6B,CAAC;AAC9D,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AAGnD,MAAM,WAAW,sBAAsB;IACrC,gBAAgB,EAAE,MAAM,CAAC;IACzB,uEAAuE;IACvE,+BAA+B,EAAE,eAAe,CAAC;IACjD,aAAa,EAAE,aAAa,CAAC;CAC9B;AAED,MAAM,WAAW,sBAAsB;IACrC,UAAU,EAAE,MAAM,CAAC;IACnB,QAAQ,EAAE,MAAM,CAAC;CAClB;AAUD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AACH,wBAAsB,gBAAgB,CACpC,MAAM,EAAE,mBAAmB,EAC3B,MAAM,EAAE,sBAAsB,GAC7B,OAAO,CAAC,sBAAsB,CAAC,CAqDjC"}
|
|
@@ -8,8 +8,32 @@ function hasIssuer(arg) {
|
|
|
8
8
|
}
|
|
9
9
|
/**
|
|
10
10
|
* Update issuer data by exercising the UpdateIssuerData choice on an Issuer contract
|
|
11
|
+
*
|
|
12
|
+
* This function requires the FeaturedAppRight contract details to be provided for disclosed contracts,
|
|
13
|
+
* which is necessary for cross-domain contract interactions in Canton.
|
|
14
|
+
*
|
|
15
|
+
* @example
|
|
16
|
+
* ```typescript
|
|
17
|
+
* const featuredAppRightContractDetails = {
|
|
18
|
+
* contractId: "abcdef1234567890",
|
|
19
|
+
* createdEventBlob: "serialized_featured_app_right_blob_here",
|
|
20
|
+
* synchronizerId: "featured_sync_id_here",
|
|
21
|
+
* templateId: "FeaturedAppRight:template:id:here"
|
|
22
|
+
* };
|
|
23
|
+
*
|
|
24
|
+
* const result = await updateIssuerData(client, {
|
|
25
|
+
* issuerContractId: "1234567890abcdef",
|
|
26
|
+
* featuredAppRightContractDetails,
|
|
27
|
+
* newIssuerData: {
|
|
28
|
+
* legal_name: "Updated Company Inc.",
|
|
29
|
+
* country_of_formation: "US",
|
|
30
|
+
* // ... other updated issuer data
|
|
31
|
+
* }
|
|
32
|
+
* });
|
|
33
|
+
* ```
|
|
34
|
+
*
|
|
11
35
|
* @param client - The ledger JSON API client
|
|
12
|
-
* @param params - Parameters for updating issuer data
|
|
36
|
+
* @param params - Parameters for updating issuer data, including the contract details for disclosed contracts
|
|
13
37
|
* @returns Promise resolving to the result of the issuer data update
|
|
14
38
|
*/
|
|
15
39
|
async function updateIssuerData(client, params) {
|
|
@@ -41,6 +65,14 @@ async function updateIssuerData(client, params) {
|
|
|
41
65
|
choiceArgument: choiceArguments
|
|
42
66
|
}
|
|
43
67
|
}
|
|
68
|
+
],
|
|
69
|
+
disclosedContracts: [
|
|
70
|
+
{
|
|
71
|
+
templateId: params.featuredAppRightContractDetails.templateId,
|
|
72
|
+
contractId: params.featuredAppRightContractDetails.contractId,
|
|
73
|
+
createdEventBlob: params.featuredAppRightContractDetails.createdEventBlob,
|
|
74
|
+
synchronizerId: params.featuredAppRightContractDetails.synchronizerId
|
|
75
|
+
}
|
|
44
76
|
]
|
|
45
77
|
});
|
|
46
78
|
const event = response.transactionTree.eventsById[1];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"updateIssuerData.js","sourceRoot":"","sources":["../../../src/functions/issuer/updateIssuerData.ts"],"names":[],"mappings":";;
|
|
1
|
+
{"version":3,"file":"updateIssuerData.js","sourceRoot":"","sources":["../../../src/functions/issuer/updateIssuerData.ts"],"names":[],"mappings":";;AAyDA,4CAwDC;AAjHD,6FAAoE;AAKpE,iEAA+D;AAkB/D,SAAS,SAAS,CAAC,GAAY;IAC7B,OAAO,CAAC,CAAC,GAAG,IAAI,OAAO,GAAG,KAAK,QAAQ,IAAI,OAAQ,GAAiC,CAAC,MAAM,KAAK,QAAQ,CAAC;AAC3G,CAAC;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AACI,KAAK,UAAU,gBAAgB,CACpC,MAA2B,EAC3B,MAA8B;IAE9B,qE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,GAAG,QAAQ,CAAC,eAAe,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC;IACrD,IAAI,kBAAkB,IAAI,KAAK,EAAE,CAAC;QAChC,OAAO;YACL,UAAU,EAAE,KAAK,CAAC,gBAAgB,CAAC,KAAK,CAAC,UAAU;YACnD,QAAQ,EAAE,QAAQ,CAAC,eAAe,CAAC,QAAQ;SAC5C,CAAC;IACJ,CAAC;SAAM,CAAC;QACN,MAAM,IAAI,KAAK,CAAC,qCAAqC,CAAC,CAAC;IACzD,CAAC;AACH,CAAC"}
|
|
@@ -1,8 +1,11 @@
|
|
|
1
1
|
import { LedgerJsonApiClient } from '@fairmint/canton-node-sdk';
|
|
2
|
+
import { ContractDetails } from '../../types/contractDetails';
|
|
2
3
|
import { OcfStockClassData } from '../../types/native';
|
|
3
4
|
export interface CreateStockClassParams {
|
|
4
5
|
/** Contract ID of the Issuer contract */
|
|
5
6
|
issuerContractId: string;
|
|
7
|
+
/** Details of the FeaturedAppRight contract for disclosed contracts */
|
|
8
|
+
featuredAppRightContractDetails: ContractDetails;
|
|
6
9
|
/** The party that will act as the issuer */
|
|
7
10
|
issuerParty: string;
|
|
8
11
|
/** Stock class data to create */
|
|
@@ -15,10 +18,21 @@ export interface CreateStockClassResult {
|
|
|
15
18
|
/**
|
|
16
19
|
* Create a stock class by exercising the CreateStockClass choice on an Issuer contract
|
|
17
20
|
*
|
|
21
|
+
* This function requires the FeaturedAppRight contract details to be provided for disclosed contracts,
|
|
22
|
+
* which is necessary for cross-domain contract interactions in Canton.
|
|
23
|
+
*
|
|
18
24
|
* @example
|
|
19
25
|
* ```typescript
|
|
26
|
+
* const featuredAppRightContractDetails = {
|
|
27
|
+
* contractId: "abcdef1234567890",
|
|
28
|
+
* createdEventBlob: "serialized_featured_app_right_blob_here",
|
|
29
|
+
* synchronizerId: "featured_sync_id_here",
|
|
30
|
+
* templateId: "FeaturedAppRight:template:id:here"
|
|
31
|
+
* };
|
|
32
|
+
*
|
|
20
33
|
* const result = await createStockClass(client, {
|
|
21
34
|
* issuerContractId: "1234567890abcdef",
|
|
35
|
+
* featuredAppRightContractDetails,
|
|
22
36
|
* issuerParty: "issuer_party_id",
|
|
23
37
|
* stockClassData: {
|
|
24
38
|
* name: "Series A Preferred",
|
|
@@ -33,7 +47,7 @@ export interface CreateStockClassResult {
|
|
|
33
47
|
* ```
|
|
34
48
|
*
|
|
35
49
|
* @param client - The ledger JSON API client
|
|
36
|
-
* @param params - Parameters for creating a stock class
|
|
50
|
+
* @param params - Parameters for creating a stock class, including the contract details for disclosed contracts
|
|
37
51
|
* @returns Promise resolving to the result of the stock class creation
|
|
38
52
|
*/
|
|
39
53
|
export declare function createStockClass(client: LedgerJsonApiClient, params: CreateStockClassParams): Promise<CreateStockClassResult>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"createStockClass.d.ts","sourceRoot":"","sources":["../../../src/functions/stockClass/createStockClass.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,mBAAmB,EAAE,MAAM,2BAA2B,CAAC;AAGhE,OAAO,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAC;AAGvD,MAAM,WAAW,sBAAsB;IACrC,yCAAyC;IACzC,gBAAgB,EAAE,MAAM,CAAC;IACzB,4CAA4C;IAC5C,WAAW,EAAE,MAAM,CAAC;IACpB,iCAAiC;IACjC,cAAc,EAAE,iBAAiB,CAAC;CACnC;AAED,MAAM,WAAW,sBAAsB;IACrC,UAAU,EAAE,MAAM,CAAC;IACnB,QAAQ,EAAE,MAAM,CAAC;CAClB;AAED
|
|
1
|
+
{"version":3,"file":"createStockClass.d.ts","sourceRoot":"","sources":["../../../src/functions/stockClass/createStockClass.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,mBAAmB,EAAE,MAAM,2BAA2B,CAAC;AAGhE,OAAO,EAAE,eAAe,EAAE,MAAM,6BAA6B,CAAC;AAC9D,OAAO,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAC;AAGvD,MAAM,WAAW,sBAAsB;IACrC,yCAAyC;IACzC,gBAAgB,EAAE,MAAM,CAAC;IACzB,uEAAuE;IACvE,+BAA+B,EAAE,eAAe,CAAC;IACjD,4CAA4C;IAC5C,WAAW,EAAE,MAAM,CAAC;IACpB,iCAAiC;IACjC,cAAc,EAAE,iBAAiB,CAAC;CACnC;AAED,MAAM,WAAW,sBAAsB;IACrC,UAAU,EAAE,MAAM,CAAC;IACnB,QAAQ,EAAE,MAAM,CAAC;CAClB;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkCG;AACH,wBAAsB,gBAAgB,CACpC,MAAM,EAAE,mBAAmB,EAC3B,MAAM,EAAE,sBAAsB,GAC7B,OAAO,CAAC,sBAAsB,CAAC,CA2CjC"}
|
|
@@ -7,10 +7,21 @@ const typeConversions_1 = require("../../utils/typeConversions");
|
|
|
7
7
|
/**
|
|
8
8
|
* Create a stock class by exercising the CreateStockClass choice on an Issuer contract
|
|
9
9
|
*
|
|
10
|
+
* This function requires the FeaturedAppRight contract details to be provided for disclosed contracts,
|
|
11
|
+
* which is necessary for cross-domain contract interactions in Canton.
|
|
12
|
+
*
|
|
10
13
|
* @example
|
|
11
14
|
* ```typescript
|
|
15
|
+
* const featuredAppRightContractDetails = {
|
|
16
|
+
* contractId: "abcdef1234567890",
|
|
17
|
+
* createdEventBlob: "serialized_featured_app_right_blob_here",
|
|
18
|
+
* synchronizerId: "featured_sync_id_here",
|
|
19
|
+
* templateId: "FeaturedAppRight:template:id:here"
|
|
20
|
+
* };
|
|
21
|
+
*
|
|
12
22
|
* const result = await createStockClass(client, {
|
|
13
23
|
* issuerContractId: "1234567890abcdef",
|
|
24
|
+
* featuredAppRightContractDetails,
|
|
14
25
|
* issuerParty: "issuer_party_id",
|
|
15
26
|
* stockClassData: {
|
|
16
27
|
* name: "Series A Preferred",
|
|
@@ -25,7 +36,7 @@ const typeConversions_1 = require("../../utils/typeConversions");
|
|
|
25
36
|
* ```
|
|
26
37
|
*
|
|
27
38
|
* @param client - The ledger JSON API client
|
|
28
|
-
* @param params - Parameters for creating a stock class
|
|
39
|
+
* @param params - Parameters for creating a stock class, including the contract details for disclosed contracts
|
|
29
40
|
* @returns Promise resolving to the result of the stock class creation
|
|
30
41
|
*/
|
|
31
42
|
async function createStockClass(client, params) {
|
|
@@ -45,6 +56,14 @@ async function createStockClass(client, params) {
|
|
|
45
56
|
choiceArgument: choiceArguments
|
|
46
57
|
}
|
|
47
58
|
}
|
|
59
|
+
],
|
|
60
|
+
disclosedContracts: [
|
|
61
|
+
{
|
|
62
|
+
templateId: params.featuredAppRightContractDetails.templateId,
|
|
63
|
+
contractId: params.featuredAppRightContractDetails.contractId,
|
|
64
|
+
createdEventBlob: params.featuredAppRightContractDetails.createdEventBlob,
|
|
65
|
+
synchronizerId: params.featuredAppRightContractDetails.synchronizerId
|
|
66
|
+
}
|
|
48
67
|
]
|
|
49
68
|
});
|
|
50
69
|
const created = (0, findCreatedEvent_1.findCreatedEventByTemplateId)(response, open_captable_protocol_daml_js_1.Fairmint.OpenCapTable.StockClass.StockClass.templateId);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"createStockClass.js","sourceRoot":"","sources":["../../../src/functions/stockClass/createStockClass.ts"],"names":[],"mappings":";;
|
|
1
|
+
{"version":3,"file":"createStockClass.js","sourceRoot":"","sources":["../../../src/functions/stockClass/createStockClass.ts"],"names":[],"mappings":";;AA2DA,4CA8CC;AAzGD,6FAAoE;AAGpE,mEAA4E;AAG5E,iEAAmE;AAkBnE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkCG;AACI,KAAK,UAAU,gBAAgB,CACpC,MAA2B,EAC3B,MAA8B;IAE9B,mDAAmD;IACnD,MAAM,eAAe,GAAkD;QACrE,gBAAgB,EAAE,IAAA,sCAAoB,EAAC,MAAM,CAAC,cAAc,CAAC;KAC9D,CAAC;IAEF,2CAA2C;IAC3C,MAAM,QAAQ,GAAG,MAAM,MAAM,CAAC,+BAA+B,CAAC;QAC5D,KAAK,EAAE,CAAC,MAAM,CAAC,WAAW,CAAC;QAC3B,QAAQ,EAAE;YACR;gBACE,eAAe,EAAE;oBACf,UAAU,EAAE,yCAAQ,CAAC,YAAY,CAAC,MAAM,CAAC,MAAM,CAAC,UAAU;oBAC1D,UAAU,EAAE,MAAM,CAAC,gBAAgB;oBACnC,MAAM,EAAE,kBAAkB;oBAC1B,cAAc,EAAE,eAAe;iBAChC;aACF;SACF;QACD,kBAAkB,EAAE;YAClB;gBACE,UAAU,EAAE,MAAM,CAAC,+BAA+B,CAAC,UAAU;gBAC7D,UAAU,EAAE,MAAM,CAAC,+BAA+B,CAAC,UAAU;gBAC7D,gBAAgB,EAAE,MAAM,CAAC,+BAA+B,CAAC,gBAAgB;gBACzE,cAAc,EAAE,MAAM,CAAC,+BAA+B,CAAC,cAAc;aACtE;SACF;KACF,CAA4C,CAAC;IAE9C,MAAM,OAAO,GAAG,IAAA,+CAA4B,EAC1C,QAAQ,EACR,yCAAQ,CAAC,YAAY,CAAC,UAAU,CAAC,UAAU,CAAC,UAAU,CACvD,CAAC;IACF,IAAI,CAAC,OAAO,EAAE,CAAC;QACb,MAAM,IAAI,KAAK,CAAC,qCAAqC,CAAC,CAAC;IACzD,CAAC;IAED,MAAM,oBAAoB,GAAG,OAAO,CAAC,gBAAgB,CAAC,KAAK,CAAC,UAAU,CAAC;IAEvE,OAAO;QACL,UAAU,EAAE,oBAAoB;QAChC,QAAQ,EAAE,QAAQ,CAAC,eAAe,CAAC,QAAQ;KAC5C,CAAC;AACJ,CAAC"}
|
|
@@ -1,7 +1,10 @@
|
|
|
1
1
|
import { LedgerJsonApiClient } from '@fairmint/canton-node-sdk';
|
|
2
|
+
import { ContractDetails } from '../../types/contractDetails';
|
|
2
3
|
import { OcfStockClassData } from '../../types/native';
|
|
3
4
|
export interface UpdateStockClassParams {
|
|
4
5
|
stockClassContractId: string;
|
|
6
|
+
/** Details of the FeaturedAppRight contract for disclosed contracts */
|
|
7
|
+
featuredAppRightContractDetails: ContractDetails;
|
|
5
8
|
newStockClassData: OcfStockClassData;
|
|
6
9
|
}
|
|
7
10
|
export interface UpdateStockClassResult {
|
|
@@ -12,12 +15,22 @@ export interface UpdateStockClassResult {
|
|
|
12
15
|
* Update stock class data by exercising the UpdateStockClassData choice on a StockClass contract
|
|
13
16
|
*
|
|
14
17
|
* This function retrieves the issuer party from the stock class contract and then updates
|
|
15
|
-
* the stock class data with the provided new data.
|
|
18
|
+
* the stock class data with the provided new data. It requires the FeaturedAppRight contract
|
|
19
|
+
* details to be provided for disclosed contracts, which is necessary for cross-domain contract
|
|
20
|
+
* interactions in Canton.
|
|
16
21
|
*
|
|
17
22
|
* @example
|
|
18
23
|
* ```typescript
|
|
24
|
+
* const featuredAppRightContractDetails = {
|
|
25
|
+
* contractId: "abcdef1234567890",
|
|
26
|
+
* createdEventBlob: "serialized_featured_app_right_blob_here",
|
|
27
|
+
* synchronizerId: "featured_sync_id_here",
|
|
28
|
+
* templateId: "FeaturedAppRight:template:id:here"
|
|
29
|
+
* };
|
|
30
|
+
*
|
|
19
31
|
* const result = await updateStockClass(client, {
|
|
20
32
|
* stockClassContractId: "1234567890abcdef",
|
|
33
|
+
* featuredAppRightContractDetails,
|
|
21
34
|
* newStockClassData: {
|
|
22
35
|
* name: "Series A Preferred (Updated)",
|
|
23
36
|
* class_type: "PREFERRED",
|
|
@@ -31,7 +44,7 @@ export interface UpdateStockClassResult {
|
|
|
31
44
|
* ```
|
|
32
45
|
*
|
|
33
46
|
* @param client - The ledger JSON API client
|
|
34
|
-
* @param params - Parameters for updating stock class data
|
|
47
|
+
* @param params - Parameters for updating stock class data, including the contract details for disclosed contracts
|
|
35
48
|
* @returns Promise resolving to the result of the stock class data update
|
|
36
49
|
*/
|
|
37
50
|
export declare function updateStockClass(client: LedgerJsonApiClient, params: UpdateStockClassParams): Promise<UpdateStockClassResult>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"updateStockClass.d.ts","sourceRoot":"","sources":["../../../src/functions/stockClass/updateStockClass.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,mBAAmB,EAAE,MAAM,2BAA2B,CAAC;AAEhE,OAAO,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAC;AAGvD,MAAM,WAAW,sBAAsB;IACrC,oBAAoB,EAAE,MAAM,CAAC;IAC7B,iBAAiB,EAAE,iBAAiB,CAAC;CACtC;AAED,MAAM,WAAW,sBAAsB;IACrC,UAAU,EAAE,MAAM,CAAC;IACnB,QAAQ,EAAE,MAAM,CAAC;CAClB;AAUD
|
|
1
|
+
{"version":3,"file":"updateStockClass.d.ts","sourceRoot":"","sources":["../../../src/functions/stockClass/updateStockClass.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,mBAAmB,EAAE,MAAM,2BAA2B,CAAC;AAEhE,OAAO,EAAE,eAAe,EAAE,MAAM,6BAA6B,CAAC;AAC9D,OAAO,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAC;AAGvD,MAAM,WAAW,sBAAsB;IACrC,oBAAoB,EAAE,MAAM,CAAC;IAC7B,uEAAuE;IACvE,+BAA+B,EAAE,eAAe,CAAC;IACjD,iBAAiB,EAAE,iBAAiB,CAAC;CACtC;AAED,MAAM,WAAW,sBAAsB;IACrC,UAAU,EAAE,MAAM,CAAC;IACnB,QAAQ,EAAE,MAAM,CAAC;CAClB;AAUD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmCG;AACH,wBAAsB,gBAAgB,CACpC,MAAM,EAAE,mBAAmB,EAC3B,MAAM,EAAE,sBAAsB,GAC7B,OAAO,CAAC,sBAAsB,CAAC,CAqDjC"}
|
|
@@ -10,12 +10,22 @@ function hasIssuer(arg) {
|
|
|
10
10
|
* Update stock class data by exercising the UpdateStockClassData choice on a StockClass contract
|
|
11
11
|
*
|
|
12
12
|
* This function retrieves the issuer party from the stock class contract and then updates
|
|
13
|
-
* the stock class data with the provided new data.
|
|
13
|
+
* the stock class data with the provided new data. It requires the FeaturedAppRight contract
|
|
14
|
+
* details to be provided for disclosed contracts, which is necessary for cross-domain contract
|
|
15
|
+
* interactions in Canton.
|
|
14
16
|
*
|
|
15
17
|
* @example
|
|
16
18
|
* ```typescript
|
|
19
|
+
* const featuredAppRightContractDetails = {
|
|
20
|
+
* contractId: "abcdef1234567890",
|
|
21
|
+
* createdEventBlob: "serialized_featured_app_right_blob_here",
|
|
22
|
+
* synchronizerId: "featured_sync_id_here",
|
|
23
|
+
* templateId: "FeaturedAppRight:template:id:here"
|
|
24
|
+
* };
|
|
25
|
+
*
|
|
17
26
|
* const result = await updateStockClass(client, {
|
|
18
27
|
* stockClassContractId: "1234567890abcdef",
|
|
28
|
+
* featuredAppRightContractDetails,
|
|
19
29
|
* newStockClassData: {
|
|
20
30
|
* name: "Series A Preferred (Updated)",
|
|
21
31
|
* class_type: "PREFERRED",
|
|
@@ -29,7 +39,7 @@ function hasIssuer(arg) {
|
|
|
29
39
|
* ```
|
|
30
40
|
*
|
|
31
41
|
* @param client - The ledger JSON API client
|
|
32
|
-
* @param params - Parameters for updating stock class data
|
|
42
|
+
* @param params - Parameters for updating stock class data, including the contract details for disclosed contracts
|
|
33
43
|
* @returns Promise resolving to the result of the stock class data update
|
|
34
44
|
*/
|
|
35
45
|
async function updateStockClass(client, params) {
|
|
@@ -61,6 +71,14 @@ async function updateStockClass(client, params) {
|
|
|
61
71
|
choiceArgument: choiceArguments
|
|
62
72
|
}
|
|
63
73
|
}
|
|
74
|
+
],
|
|
75
|
+
disclosedContracts: [
|
|
76
|
+
{
|
|
77
|
+
templateId: params.featuredAppRightContractDetails.templateId,
|
|
78
|
+
contractId: params.featuredAppRightContractDetails.contractId,
|
|
79
|
+
createdEventBlob: params.featuredAppRightContractDetails.createdEventBlob,
|
|
80
|
+
synchronizerId: params.featuredAppRightContractDetails.synchronizerId
|
|
81
|
+
}
|
|
64
82
|
]
|
|
65
83
|
});
|
|
66
84
|
const event = response.transactionTree.eventsById[1];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"updateStockClass.js","sourceRoot":"","sources":["../../../src/functions/stockClass/updateStockClass.ts"],"names":[],"mappings":";;
|
|
1
|
+
{"version":3,"file":"updateStockClass.js","sourceRoot":"","sources":["../../../src/functions/stockClass/updateStockClass.ts"],"names":[],"mappings":";;AA+DA,4CAwDC;AAvHD,6FAAoE;AAKpE,iEAAmE;AAkBnE,SAAS,SAAS,CAAC,GAAY;IAC7B,OAAO,CAAC,CAAC,GAAG,IAAI,OAAO,GAAG,KAAK,QAAQ,IAAI,OAAQ,GAAqC,CAAC,MAAM,KAAK,QAAQ,CAAC;AAC/G,CAAC;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmCG;AACI,KAAK,UAAU,gBAAgB,CACpC,MAA2B,EAC3B,MAA8B;IAE9B,yEAAyE;IACzE,MAAM,cAAc,GAAG,MAAM,MAAM,CAAC,qBAAqB,CAAC;QACxD,UAAU,EAAE,MAAM,CAAC,oBAAoB;KACxC,CAAC,CAAC;IAEH,IAAI,CAAC,cAAc,CAAC,OAAO,EAAE,YAAY,EAAE,cAAc,EAAE,CAAC;QAC1D,MAAM,IAAI,KAAK,CAAC,4EAA4E,CAAC,CAAC;IAChG,CAAC;IAED,MAAM,cAAc,GAAG,cAAc,CAAC,OAAO,CAAC,YAAY,CAAC,cAAc,CAAC;IAC1E,IAAI,CAAC,SAAS,CAAC,cAAc,CAAC,EAAE,CAAC;QAC/B,MAAM,IAAI,KAAK,CAAC,oDAAoD,CAAC,CAAC;IACxE,CAAC;IACD,MAAM,WAAW,GAAG,cAAc,CAAC,MAAM,CAAC;IAE1C,uDAAuD;IACvD,MAAM,eAAe,GAA0D;QAC7E,oBAAoB,EAAE,IAAA,sCAAoB,EAAC,MAAM,CAAC,iBAAiB,CAAC;KACrE,CAAC;IAEF,+CAA+C;IAC/C,MAAM,QAAQ,GAAG,MAAM,MAAM,CAAC,+BAA+B,CAAC;QAC5D,KAAK,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