@open-captable-protocol/canton 0.0.22 → 0.0.23
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/companyValuationReport/createCompanyValuationReport.d.ts +0 -17
- package/dist/functions/companyValuationReport/createCompanyValuationReport.d.ts.map +1 -1
- package/dist/functions/companyValuationReport/createCompanyValuationReport.js +1 -10
- package/dist/functions/companyValuationReport/createCompanyValuationReport.js.map +1 -1
- package/dist/functions/issuer/createIssuer.d.ts +1 -1
- package/dist/functions/issuer/createIssuer.d.ts.map +1 -1
- package/dist/functions/issuer/updateIssuerData.d.ts +1 -1
- package/dist/functions/issuer/updateIssuerData.d.ts.map +1 -1
- package/package.json +2 -2
|
@@ -1,26 +1,9 @@
|
|
|
1
1
|
import { LedgerJsonApiClient } from '@fairmint/canton-node-sdk';
|
|
2
2
|
import { SubmitAndWaitForTransactionTreeResponse } from '@fairmint/canton-node-sdk/build/src/clients/ledger-json-api/operations';
|
|
3
|
-
/**
|
|
4
|
-
* Details about the FeaturedAppRight contract that need to be disclosed
|
|
5
|
-
* when exercising the CreateCompanyValuationReport choice. This is required for cross-domain
|
|
6
|
-
* contract interactions in Canton.
|
|
7
|
-
*/
|
|
8
|
-
export interface FeaturedAppRightContractDetails {
|
|
9
|
-
/** The contract ID of the FeaturedAppRight contract */
|
|
10
|
-
contractId: string;
|
|
11
|
-
/** The serialized created event blob of the contract */
|
|
12
|
-
createdEventBlob: string;
|
|
13
|
-
/** The synchronizer ID associated with the contract */
|
|
14
|
-
synchronizerId: string;
|
|
15
|
-
/** The template ID of the contract */
|
|
16
|
-
templateId: string;
|
|
17
|
-
}
|
|
18
3
|
export interface CreateCompanyValuationReportParams {
|
|
19
4
|
companyId: string;
|
|
20
5
|
companyValuation: string | number;
|
|
21
6
|
observers?: string[];
|
|
22
|
-
/** Details of the FeaturedAppRight contract for disclosed contracts */
|
|
23
|
-
featuredAppRightContractDetails: FeaturedAppRightContractDetails;
|
|
24
7
|
}
|
|
25
8
|
export interface CreateCompanyValuationReportResult {
|
|
26
9
|
contractId: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"createCompanyValuationReport.d.ts","sourceRoot":"","sources":["../../../src/functions/companyValuationReport/createCompanyValuationReport.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,mBAAmB,EAAE,MAAM,2BAA2B,CAAC;AAChE,OAAO,EAAE,uCAAuC,EAAE,MAAM,wEAAwE,CAAC;AAKjI
|
|
1
|
+
{"version":3,"file":"createCompanyValuationReport.d.ts","sourceRoot":"","sources":["../../../src/functions/companyValuationReport/createCompanyValuationReport.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,mBAAmB,EAAE,MAAM,2BAA2B,CAAC;AAChE,OAAO,EAAE,uCAAuC,EAAE,MAAM,wEAAwE,CAAC;AAKjI,MAAM,WAAW,kCAAkC;IACjD,SAAS,EAAE,MAAM,CAAC;IAClB,gBAAgB,EAAE,MAAM,GAAG,MAAM,CAAC;IAClC,SAAS,CAAC,EAAE,MAAM,EAAE,CAAC;CACtB;AAED,MAAM,WAAW,kCAAkC;IACjD,UAAU,EAAE,MAAM,CAAC;IACnB,QAAQ,EAAE,MAAM,CAAC;IACjB,eAAe,EAAE,uCAAuC,CAAC;CAC1D;AAED;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,wBAAsB,4BAA4B,CAChD,MAAM,EAAE,mBAAmB,EAC3B,MAAM,EAAE,kCAAkC,GACzC,OAAO,CAAC,kCAAkC,CAAC,CAyC7C"}
|
|
@@ -42,8 +42,7 @@ async function createCompanyValuationReport(client, params) {
|
|
|
42
42
|
company_valuation: typeof params.companyValuation === 'number'
|
|
43
43
|
? params.companyValuation.toString()
|
|
44
44
|
: params.companyValuation,
|
|
45
|
-
observers: params.observers ?? []
|
|
46
|
-
featured_app_right: params.featuredAppRightContractDetails.contractId
|
|
45
|
+
observers: params.observers ?? []
|
|
47
46
|
};
|
|
48
47
|
const response = await client.submitAndWaitForTransactionTree({
|
|
49
48
|
commands: [
|
|
@@ -56,14 +55,6 @@ async function createCompanyValuationReport(client, params) {
|
|
|
56
55
|
}
|
|
57
56
|
}
|
|
58
57
|
],
|
|
59
|
-
disclosedContracts: [
|
|
60
|
-
{
|
|
61
|
-
templateId: params.featuredAppRightContractDetails.templateId,
|
|
62
|
-
contractId: params.featuredAppRightContractDetails.contractId,
|
|
63
|
-
createdEventBlob: params.featuredAppRightContractDetails.createdEventBlob,
|
|
64
|
-
synchronizerId: params.featuredAppRightContractDetails.synchronizerId
|
|
65
|
-
}
|
|
66
|
-
]
|
|
67
58
|
});
|
|
68
59
|
const created = (0, findCreatedEvent_1.findCreatedEventByTemplateId)(response, lib_1.Fairmint.OpenCapTable.CompanyValuationReport.CompanyValuationReport.templateId);
|
|
69
60
|
if (!created) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"createCompanyValuationReport.js","sourceRoot":"","sources":["../../../src/functions/companyValuationReport/createCompanyValuationReport.ts"],"names":[],"mappings":";;;;;
|
|
1
|
+
{"version":3,"file":"createCompanyValuationReport.js","sourceRoot":"","sources":["../../../src/functions/companyValuationReport/createCompanyValuationReport.ts"],"names":[],"mappings":";;;;;AA2CA,oEA4CC;AAvFD,sEAAwE;AAIxE,yIAA0G;AAC1G,mEAA4E;AAc5E;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACI,KAAK,UAAU,4BAA4B,CAChD,MAA2B,EAC3B,MAA0C;IAE1C,MAAM,OAAO,GAAG,MAAM,CAAC,UAAU,EAAE,CAAC;IACpC,MAAM,WAAW,GAAG,sCAAqB,CAAC,OAA6C,CAAC,CAAC;IACzF,IAAI,CAAC,WAAW,EAAE,CAAC;QACjB,MAAM,IAAI,KAAK,CAAC,wBAAwB,OAAO,EAAE,CAAC,CAAC;IACrD,CAAC;IAED,MAAM,eAAe,GAAkE;QACrF,UAAU,EAAE,MAAM,CAAC,SAAS;QAC5B,iBAAiB,EAAE,OAAO,MAAM,CAAC,gBAAgB,KAAK,QAAQ;YAC5D,CAAC,CAAC,MAAM,CAAC,gBAAgB,CAAC,QAAQ,EAAE;YACpC,CAAC,CAAC,MAAM,CAAC,gBAAgB;QAC3B,SAAS,EAAE,MAAM,CAAC,SAAS,IAAI,EAAE;KAClC,CAAC;IAEF,MAAM,QAAQ,GAAG,MAAM,MAAM,CAAC,+BAA+B,CAAC;QAC5D,QAAQ,EAAE;YACR;gBACE,eAAe,EAAE;oBACf,UAAU,EAAE,WAAW,CAAC,UAAU;oBAClC,UAAU,EAAE,WAAW,CAAC,oBAAoB;oBAC5C,MAAM,EAAE,8BAA8B;oBACtC,cAAc,EAAE,eAAe;iBAChC;aACF;SACF;KACF,CAA4C,CAAC;IAE9C,MAAM,OAAO,GAAG,IAAA,+CAA4B,EAC1C,QAAQ,EACR,cAAQ,CAAC,YAAY,CAAC,sBAAsB,CAAC,sBAAsB,CAAC,UAAU,CAC/E,CAAC;IACF,IAAI,CAAC,OAAO,EAAE,CAAC;QACb,MAAM,IAAI,KAAK,CAAC,qCAAqC,CAAC,CAAC;IACzD,CAAC;IAED,OAAO;QACL,UAAU,EAAE,OAAO,CAAC,gBAAgB,CAAC,KAAK,CAAC,UAAU;QACrD,QAAQ,EAAE,QAAQ,CAAC,eAAe,CAAC,QAAQ;QAC3C,eAAe,EAAE,QAAQ;KAC1B,CAAC;AACJ,CAAC"}
|
|
@@ -20,7 +20,7 @@ export interface CreateIssuerParams {
|
|
|
20
20
|
issuerAuthorizationContractDetails: IssuerAuthorizationContractDetails;
|
|
21
21
|
issuerParty: string;
|
|
22
22
|
/** Issuer data to create */
|
|
23
|
-
issuerData: Fairmint.OpenCapTable.
|
|
23
|
+
issuerData: Fairmint.OpenCapTable.Types.OcfIssuerData;
|
|
24
24
|
}
|
|
25
25
|
export interface CreateIssuerResult {
|
|
26
26
|
contractId: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"createIssuer.d.ts","sourceRoot":"","sources":["../../../src/functions/issuer/createIssuer.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,0CAA0C,CAAC;AACpE,OAAO,EAAE,mBAAmB,EAAE,MAAM,2BAA2B,CAAC;AAIhE;;;;GAIG;AACH,MAAM,WAAW,kCAAkC;IACjD,0DAA0D;IAC1D,UAAU,EAAE,MAAM,CAAC;IACnB,wDAAwD;IACxD,gBAAgB,EAAE,MAAM,CAAC;IACzB,uDAAuD;IACvD,cAAc,EAAE,MAAM,CAAC;IACvB,sCAAsC;IACtC,UAAU,EAAE,MAAM,CAAC;CACpB;AAED,MAAM,WAAW,kBAAkB;IACjC,0EAA0E;IAC1E,kCAAkC,EAAE,kCAAkC,CAAC;IACvE,WAAW,EAAE,MAAM,CAAC;IACpB,4BAA4B;IAC5B,UAAU,EAAE,QAAQ,CAAC,YAAY,CAAC,
|
|
1
|
+
{"version":3,"file":"createIssuer.d.ts","sourceRoot":"","sources":["../../../src/functions/issuer/createIssuer.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,0CAA0C,CAAC;AACpE,OAAO,EAAE,mBAAmB,EAAE,MAAM,2BAA2B,CAAC;AAIhE;;;;GAIG;AACH,MAAM,WAAW,kCAAkC;IACjD,0DAA0D;IAC1D,UAAU,EAAE,MAAM,CAAC;IACnB,wDAAwD;IACxD,gBAAgB,EAAE,MAAM,CAAC;IACzB,uDAAuD;IACvD,cAAc,EAAE,MAAM,CAAC;IACvB,sCAAsC;IACtC,UAAU,EAAE,MAAM,CAAC;CACpB;AAED,MAAM,WAAW,kBAAkB;IACjC,0EAA0E;IAC1E,kCAAkC,EAAE,kCAAkC,CAAC;IACvE,WAAW,EAAE,MAAM,CAAC;IACpB,4BAA4B;IAC5B,UAAU,EAAE,QAAQ,CAAC,YAAY,CAAC,KAAK,CAAC,aAAa,CAAC;CACvD;AAED,MAAM,WAAW,kBAAkB;IACjC,UAAU,EAAE,MAAM,CAAC;IACnB,QAAQ,EAAE,MAAM,CAAC;CAClB;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AACH,wBAAsB,YAAY,CAChC,MAAM,EAAE,mBAAmB,EAC3B,MAAM,EAAE,kBAAkB,GACzB,OAAO,CAAC,kBAAkB,CAAC,CA8C7B"}
|
|
@@ -2,7 +2,7 @@ import { Fairmint } from '@fairmint/open-captable-protocol-daml-js';
|
|
|
2
2
|
import { LedgerJsonApiClient } from '@fairmint/canton-node-sdk';
|
|
3
3
|
export interface UpdateIssuerDataParams {
|
|
4
4
|
issuerContractId: string;
|
|
5
|
-
newIssuerData: Fairmint.OpenCapTable.
|
|
5
|
+
newIssuerData: Fairmint.OpenCapTable.Types.OcfIssuerData;
|
|
6
6
|
}
|
|
7
7
|
export interface UpdateIssuerDataResult {
|
|
8
8
|
contractId: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"updateIssuerData.d.ts","sourceRoot":"","sources":["../../../src/functions/issuer/updateIssuerData.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,0CAA0C,CAAC;AACpE,OAAO,EAAE,mBAAmB,EAAE,MAAM,2BAA2B,CAAC;AAGhE,MAAM,WAAW,sBAAsB;IACrC,gBAAgB,EAAE,MAAM,CAAC;IACzB,aAAa,EAAE,QAAQ,CAAC,YAAY,CAAC,
|
|
1
|
+
{"version":3,"file":"updateIssuerData.d.ts","sourceRoot":"","sources":["../../../src/functions/issuer/updateIssuerData.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,0CAA0C,CAAC;AACpE,OAAO,EAAE,mBAAmB,EAAE,MAAM,2BAA2B,CAAC;AAGhE,MAAM,WAAW,sBAAsB;IACrC,gBAAgB,EAAE,MAAM,CAAC;IACzB,aAAa,EAAE,QAAQ,CAAC,YAAY,CAAC,KAAK,CAAC,aAAa,CAAC;CAC1D;AAED,MAAM,WAAW,sBAAsB;IACrC,UAAU,EAAE,MAAM,CAAC;IACnB,QAAQ,EAAE,MAAM,CAAC;CAClB;AAUD;;;;;GAKG;AACH,wBAAsB,gBAAgB,CACpC,MAAM,EAAE,mBAAmB,EAC3B,MAAM,EAAE,sBAAsB,GAC7B,OAAO,CAAC,sBAAsB,CAAC,CA6CjC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@open-captable-protocol/canton",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.23",
|
|
4
4
|
"description": "A TypeScript SDK for interacting with the Open CapTable Protocol (OCP) Factory contract on Canton blockchain",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
"@daml/ledger": "^2.10.2",
|
|
20
20
|
"@daml/types": "^2.10.2",
|
|
21
21
|
"@fairmint/canton-node-sdk": "^0.0.82",
|
|
22
|
-
"@fairmint/open-captable-protocol-daml-js": "^0.0.
|
|
22
|
+
"@fairmint/open-captable-protocol-daml-js": "^0.0.30"
|
|
23
23
|
},
|
|
24
24
|
|
|
25
25
|
"devDependencies": {
|