@open-captable-protocol/canton 0.0.10 → 0.0.12
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/OcpClient.d.ts +24 -0
- package/dist/OcpClient.d.ts.map +1 -0
- package/dist/OcpClient.js +29 -0
- package/dist/OcpClient.js.map +1 -0
- package/dist/OcpFactoryClient.d.ts +24 -0
- package/dist/OcpFactoryClient.d.ts.map +1 -1
- package/dist/OcpFactoryClient.js +28 -0
- package/dist/OcpFactoryClient.js.map +1 -1
- package/dist/functions/addObserversToCompanyValuationReport.d.ts +14 -0
- package/dist/functions/addObserversToCompanyValuationReport.d.ts.map +1 -0
- package/dist/functions/addObserversToCompanyValuationReport.js +35 -0
- package/dist/functions/addObserversToCompanyValuationReport.js.map +1 -0
- package/dist/functions/companyValuationReport/addObserversToCompanyValuationReport.d.ts +14 -0
- package/dist/functions/companyValuationReport/addObserversToCompanyValuationReport.d.ts.map +1 -0
- package/dist/functions/companyValuationReport/addObserversToCompanyValuationReport.js +41 -0
- package/dist/functions/companyValuationReport/addObserversToCompanyValuationReport.js.map +1 -0
- package/dist/functions/companyValuationReport/confirmCurrentCompanyValuationReport.d.ts +13 -0
- package/dist/functions/companyValuationReport/confirmCurrentCompanyValuationReport.d.ts.map +1 -0
- package/dist/functions/companyValuationReport/confirmCurrentCompanyValuationReport.js +39 -0
- package/dist/functions/companyValuationReport/confirmCurrentCompanyValuationReport.js.map +1 -0
- package/dist/functions/companyValuationReport/createCompanyValuationReport.d.ts +16 -0
- package/dist/functions/companyValuationReport/createCompanyValuationReport.d.ts.map +1 -0
- package/dist/functions/companyValuationReport/createCompanyValuationReport.js +48 -0
- package/dist/functions/companyValuationReport/createCompanyValuationReport.js.map +1 -0
- package/dist/functions/companyValuationReport/updateCompanyValuation.d.ts +14 -0
- package/dist/functions/companyValuationReport/updateCompanyValuation.d.ts.map +1 -0
- package/dist/functions/companyValuationReport/updateCompanyValuation.js +43 -0
- package/dist/functions/companyValuationReport/updateCompanyValuation.js.map +1 -0
- package/dist/functions/confirmCurrentCompanyValuationReport.d.ts +13 -0
- package/dist/functions/confirmCurrentCompanyValuationReport.d.ts.map +1 -0
- package/dist/functions/confirmCurrentCompanyValuationReport.js +33 -0
- package/dist/functions/confirmCurrentCompanyValuationReport.js.map +1 -0
- package/dist/functions/createCompanyValuationReport.d.ts +16 -0
- package/dist/functions/createCompanyValuationReport.d.ts.map +1 -0
- package/dist/functions/createCompanyValuationReport.js +43 -0
- package/dist/functions/createCompanyValuationReport.js.map +1 -0
- package/dist/functions/createIssuer.js.map +1 -1
- package/dist/functions/index.d.ts +7 -3
- package/dist/functions/index.d.ts.map +1 -1
- package/dist/functions/index.js +7 -3
- package/dist/functions/index.js.map +1 -1
- package/dist/functions/issuer/authorizeIssuer.d.ts +19 -0
- package/dist/functions/issuer/authorizeIssuer.d.ts.map +1 -0
- package/dist/functions/issuer/authorizeIssuer.js +55 -0
- package/dist/functions/issuer/authorizeIssuer.js.map +1 -0
- package/dist/functions/issuer/createIssuer.d.ts +58 -0
- package/dist/functions/issuer/createIssuer.d.ts.map +1 -0
- package/dist/functions/issuer/createIssuer.js +71 -0
- package/dist/functions/issuer/createIssuer.js.map +1 -0
- package/dist/functions/issuer/updateIssuerData.d.ts +18 -0
- package/dist/functions/issuer/updateIssuerData.d.ts.map +1 -0
- package/dist/functions/issuer/updateIssuerData.js +46 -0
- package/dist/functions/issuer/updateIssuerData.js.map +1 -0
- package/dist/functions/updateCompanyValuation.d.ts +14 -0
- package/dist/functions/updateCompanyValuation.d.ts.map +1 -0
- package/dist/functions/updateCompanyValuation.js +37 -0
- package/dist/functions/updateCompanyValuation.js.map +1 -0
- package/dist/functions/updateIssuerData.js.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/package.json +3 -3
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { ClientConfig } from '@fairmint/canton-node-sdk';
|
|
2
|
+
import { AuthorizeIssuerParams, AuthorizeIssuerResult } from './functions/issuer/authorizeIssuer';
|
|
3
|
+
import { CreateIssuerParams, CreateIssuerResult } from './functions/issuer/createIssuer';
|
|
4
|
+
import { UpdateIssuerDataParams, UpdateIssuerDataResult } from './functions/issuer/updateIssuerData';
|
|
5
|
+
import { CreateCompanyValuationReportParams, CreateCompanyValuationReportResult } from './functions/companyValuationReport/createCompanyValuationReport';
|
|
6
|
+
import { UpdateCompanyValuationParams, UpdateCompanyValuationResult } from './functions/companyValuationReport/updateCompanyValuation';
|
|
7
|
+
import { ConfirmCurrentCompanyValuationReportParams, ConfirmCurrentCompanyValuationReportResult } from './functions/companyValuationReport/confirmCurrentCompanyValuationReport';
|
|
8
|
+
import { AddObserversToCompanyValuationReportParams, AddObserversToCompanyValuationReportResult } from './functions/companyValuationReport/addObserversToCompanyValuationReport';
|
|
9
|
+
export declare class OcpClient {
|
|
10
|
+
private client;
|
|
11
|
+
issuer: {
|
|
12
|
+
authorizeIssuer: (params: AuthorizeIssuerParams) => Promise<AuthorizeIssuerResult>;
|
|
13
|
+
createIssuer: (params: CreateIssuerParams) => Promise<CreateIssuerResult>;
|
|
14
|
+
updateIssuerData: (params: UpdateIssuerDataParams) => Promise<UpdateIssuerDataResult>;
|
|
15
|
+
};
|
|
16
|
+
companyValuationReport: {
|
|
17
|
+
createCompanyValuationReport: (params: CreateCompanyValuationReportParams) => Promise<CreateCompanyValuationReportResult>;
|
|
18
|
+
updateCompanyValuation: (params: UpdateCompanyValuationParams) => Promise<UpdateCompanyValuationResult>;
|
|
19
|
+
confirmCurrentCompanyValuationReport: (params: ConfirmCurrentCompanyValuationReportParams) => Promise<ConfirmCurrentCompanyValuationReportResult>;
|
|
20
|
+
addObserversToCompanyValuationReport: (params: AddObserversToCompanyValuationReportParams) => Promise<AddObserversToCompanyValuationReportResult>;
|
|
21
|
+
};
|
|
22
|
+
constructor(config?: ClientConfig);
|
|
23
|
+
}
|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pC,MAAM,EAAE,0CAA0C,KAC/C,OAAO,CAAC,0CAA0C,CAAC,CAAC;QACzD,oCAAoC,EAAE,CACpC,MAAM,EAAE,0CAA0C,KAC/C,OAAO,CAAC,0CAA0C,CAAC,CAAC;KAC1D,CAAC;gBAEU,MAAM,CAAC,EAAE,YAAY;CAsBlC"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.OcpClient = void 0;
|
|
4
|
+
const canton_node_sdk_1 = require("@fairmint/canton-node-sdk");
|
|
5
|
+
const authorizeIssuer_1 = require("./functions/issuer/authorizeIssuer");
|
|
6
|
+
const createIssuer_1 = require("./functions/issuer/createIssuer");
|
|
7
|
+
const updateIssuerData_1 = require("./functions/issuer/updateIssuerData");
|
|
8
|
+
const createCompanyValuationReport_1 = require("./functions/companyValuationReport/createCompanyValuationReport");
|
|
9
|
+
const updateCompanyValuation_1 = require("./functions/companyValuationReport/updateCompanyValuation");
|
|
10
|
+
const confirmCurrentCompanyValuationReport_1 = require("./functions/companyValuationReport/confirmCurrentCompanyValuationReport");
|
|
11
|
+
const addObserversToCompanyValuationReport_1 = require("./functions/companyValuationReport/addObserversToCompanyValuationReport");
|
|
12
|
+
class OcpClient {
|
|
13
|
+
constructor(config) {
|
|
14
|
+
this.client = new canton_node_sdk_1.LedgerJsonApiClient(config);
|
|
15
|
+
this.issuer = {
|
|
16
|
+
authorizeIssuer: (params) => (0, authorizeIssuer_1.authorizeIssuer)(this.client, params),
|
|
17
|
+
createIssuer: (params) => (0, createIssuer_1.createIssuer)(this.client, params),
|
|
18
|
+
updateIssuerData: (params) => (0, updateIssuerData_1.updateIssuerData)(this.client, params)
|
|
19
|
+
};
|
|
20
|
+
this.companyValuationReport = {
|
|
21
|
+
createCompanyValuationReport: (params) => (0, createCompanyValuationReport_1.createCompanyValuationReport)(this.client, params),
|
|
22
|
+
updateCompanyValuation: (params) => (0, updateCompanyValuation_1.updateCompanyValuation)(this.client, params),
|
|
23
|
+
confirmCurrentCompanyValuationReport: (params) => (0, confirmCurrentCompanyValuationReport_1.confirmCurrentCompanyValuationReport)(this.client, params),
|
|
24
|
+
addObserversToCompanyValuationReport: (params) => (0, addObserversToCompanyValuationReport_1.addObserversToCompanyValuationReport)(this.client, params)
|
|
25
|
+
};
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
exports.OcpClient = OcpClient;
|
|
29
|
+
//# sourceMappingURL=OcpClient.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"OcpClient.js","sourceRoot":"","sources":["../src/OcpClient.ts"],"names":[],"mappings":";;;AAAA,+DAA8E;AAC9E,wEAAmH;AACnH,kEAAuG;AACvG,0EAAuH;AACvH,kHAAuL;AACvL,sGAA+J;AAC/J,kIAAuN;AACvN,kIAAuN;AAEvN,MAAa,SAAS;IAwBpB,YAAY,MAAqB;QAC/B,IAAI,CAAC,MAAM,GAAG,IAAI,qCAAmB,CAAC,MAAM,CAAC,CAAC;QAE9C,IAAI,CAAC,MAAM,GAAG;YACZ,eAAe,EAAE,CAAC,MAA6B,EAAE,EAAE,CAAC,IAAA,iCAAe,EAAC,IAAI,CAAC,MAAM,EAAE,MAAM,CAAC;YACxF,YAAY,EAAE,CAAC,MAA0B,EAAE,EAAE,CAAC,IAAA,2BAAY,EAAC,IAAI,CAAC,MAAM,EAAE,MAAM,CAAC;YAC/E,gBAAgB,EAAE,CAAC,MAA8B,EAAE,EAAE,CAAC,IAAA,mCAAgB,EAAC,IAAI,CAAC,MAAM,EAAE,MAAM,CAAC;SAC5F,CAAC;QAEF,IAAI,CAAC,sBAAsB,GAAG;YAC5B,4BAA4B,EAAE,CAAC,MAA0C,EAAE,EAAE,CAC3E,IAAA,2DAA4B,EAAC,IAAI,CAAC,MAAM,EAAE,MAAM,CAAC;YACnD,sBAAsB,EAAE,CAAC,MAAoC,EAAE,EAAE,CAC/D,IAAA,+CAAsB,EAAC,IAAI,CAAC,MAAM,EAAE,MAAM,CAAC;YAC7C,oCAAoC,EAAE,CACpC,MAAkD,EAClD,EAAE,CAAC,IAAA,2EAAoC,EAAC,IAAI,CAAC,MAAM,EAAE,MAAM,CAAC;YAC9D,oCAAoC,EAAE,CACpC,MAAkD,EAClD,EAAE,CAAC,IAAA,2EAAoC,EAAC,IAAI,CAAC,MAAM,EAAE,MAAM,CAAC;SAC/D,CAAC;IACJ,CAAC;CACF;AA9CD,8BA8CC"}
|
|
@@ -1,8 +1,16 @@
|
|
|
1
1
|
import { ClientConfig } from '@fairmint/canton-node-sdk';
|
|
2
2
|
import { AuthorizeIssuerParams, AuthorizeIssuerResult } from './functions/authorizeIssuer';
|
|
3
3
|
import { CreateIssuerParams, CreateIssuerResult } from './functions/createIssuer';
|
|
4
|
+
import { CreateCompanyValuationReportParams, CreateCompanyValuationReportResult } from './functions/createCompanyValuationReport';
|
|
5
|
+
import { UpdateCompanyValuationParams, UpdateCompanyValuationResult } from './functions/updateCompanyValuation';
|
|
6
|
+
import { ConfirmCurrentCompanyValuationReportParams, ConfirmCurrentCompanyValuationReportResult } from './functions/confirmCurrentCompanyValuationReport';
|
|
7
|
+
import { AddObserversToCompanyValuationReportParams, AddObserversToCompanyValuationReportResult } from './functions/addObserversToCompanyValuationReport';
|
|
4
8
|
export { AuthorizeIssuerParams, AuthorizeIssuerResult } from './functions/authorizeIssuer';
|
|
5
9
|
export { CreateIssuerParams, CreateIssuerResult, IssuerAuthorizationContractDetails } from './functions/createIssuer';
|
|
10
|
+
export { CreateCompanyValuationReportParams, CreateCompanyValuationReportResult } from './functions/createCompanyValuationReport';
|
|
11
|
+
export { UpdateCompanyValuationParams, UpdateCompanyValuationResult } from './functions/updateCompanyValuation';
|
|
12
|
+
export { ConfirmCurrentCompanyValuationReportParams, ConfirmCurrentCompanyValuationReportResult } from './functions/confirmCurrentCompanyValuationReport';
|
|
13
|
+
export { AddObserversToCompanyValuationReportParams, AddObserversToCompanyValuationReportResult } from './functions/addObserversToCompanyValuationReport';
|
|
6
14
|
export declare class OcpFactoryClient {
|
|
7
15
|
private client;
|
|
8
16
|
constructor(config?: ClientConfig);
|
|
@@ -18,5 +26,21 @@ export declare class OcpFactoryClient {
|
|
|
18
26
|
* @returns Promise resolving to the result of the issuer creation
|
|
19
27
|
*/
|
|
20
28
|
createIssuer(params: CreateIssuerParams): Promise<CreateIssuerResult>;
|
|
29
|
+
/**
|
|
30
|
+
* Create a CompanyValuationReport via OCP Factory
|
|
31
|
+
*/
|
|
32
|
+
createCompanyValuationReport(params: CreateCompanyValuationReportParams): Promise<CreateCompanyValuationReportResult>;
|
|
33
|
+
/**
|
|
34
|
+
* Update the company valuation on a CompanyValuationReport
|
|
35
|
+
*/
|
|
36
|
+
updateCompanyValuation(params: UpdateCompanyValuationParams): Promise<UpdateCompanyValuationResult>;
|
|
37
|
+
/**
|
|
38
|
+
* Confirm the current company valuation on a CompanyValuationReport
|
|
39
|
+
*/
|
|
40
|
+
confirmCurrentCompanyValuationReport(params: ConfirmCurrentCompanyValuationReportParams): Promise<ConfirmCurrentCompanyValuationReportResult>;
|
|
41
|
+
/**
|
|
42
|
+
* Add observers to a CompanyValuationReport
|
|
43
|
+
*/
|
|
44
|
+
addObserversToCompanyValuationReport(params: AddObserversToCompanyValuationReportParams): Promise<AddObserversToCompanyValuationReportResult>;
|
|
21
45
|
}
|
|
22
46
|
//# sourceMappingURL=OcpFactoryClient.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"OcpFactoryClient.d.ts","sourceRoot":"","sources":["../src/OcpFactoryClient.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAuB,MAAM,2BAA2B,CAAC;AAC9E,OAAO,EAAmB,qBAAqB,EAAE,qBAAqB,EAAE,MAAM,6BAA6B,CAAC;AAC5G,OAAO,EAAgB,kBAAkB,EAAE,kBAAkB,EAAsC,MAAM,0BAA0B,CAAC;
|
|
1
|
+
{"version":3,"file":"OcpF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BAA4B,CAChC,MAAM,EAAE,kCAAkC,GACzC,OAAO,CAAC,kCAAkC,CAAC;IAI9C;;OAEG;IACG,sBAAsB,CAC1B,MAAM,EAAE,4BAA4B,GACnC,OAAO,CAAC,4BAA4B,CAAC;IAIxC;;OAEG;IACG,oCAAoC,CACxC,MAAM,EAAE,0CAA0C,GACjD,OAAO,CAAC,0CAA0C,CAAC;IAItD;;OAEG;IACG,oCAAoC,CACxC,MAAM,EAAE,0CAA0C,GACjD,OAAO,CAAC,0CAA0C,CAAC;CAGvD"}
|
package/dist/OcpFactoryClient.js
CHANGED
|
@@ -4,6 +4,10 @@ exports.OcpFactoryClient = void 0;
|
|
|
4
4
|
const canton_node_sdk_1 = require("@fairmint/canton-node-sdk");
|
|
5
5
|
const authorizeIssuer_1 = require("./functions/authorizeIssuer");
|
|
6
6
|
const createIssuer_1 = require("./functions/createIssuer");
|
|
7
|
+
const createCompanyValuationReport_1 = require("./functions/createCompanyValuationReport");
|
|
8
|
+
const updateCompanyValuation_1 = require("./functions/updateCompanyValuation");
|
|
9
|
+
const confirmCurrentCompanyValuationReport_1 = require("./functions/confirmCurrentCompanyValuationReport");
|
|
10
|
+
const addObserversToCompanyValuationReport_1 = require("./functions/addObserversToCompanyValuationReport");
|
|
7
11
|
class OcpFactoryClient {
|
|
8
12
|
constructor(config) {
|
|
9
13
|
this.client = new canton_node_sdk_1.LedgerJsonApiClient(config);
|
|
@@ -24,6 +28,30 @@ class OcpFactoryClient {
|
|
|
24
28
|
async createIssuer(params) {
|
|
25
29
|
return (0, createIssuer_1.createIssuer)(this.client, params);
|
|
26
30
|
}
|
|
31
|
+
/**
|
|
32
|
+
* Create a CompanyValuationReport via OCP Factory
|
|
33
|
+
*/
|
|
34
|
+
async createCompanyValuationReport(params) {
|
|
35
|
+
return (0, createCompanyValuationReport_1.createCompanyValuationReport)(this.client, params);
|
|
36
|
+
}
|
|
37
|
+
/**
|
|
38
|
+
* Update the company valuation on a CompanyValuationReport
|
|
39
|
+
*/
|
|
40
|
+
async updateCompanyValuation(params) {
|
|
41
|
+
return (0, updateCompanyValuation_1.updateCompanyValuation)(this.client, params);
|
|
42
|
+
}
|
|
43
|
+
/**
|
|
44
|
+
* Confirm the current company valuation on a CompanyValuationReport
|
|
45
|
+
*/
|
|
46
|
+
async confirmCurrentCompanyValuationReport(params) {
|
|
47
|
+
return (0, confirmCurrentCompanyValuationReport_1.confirmCurrentCompanyValuationReport)(this.client, params);
|
|
48
|
+
}
|
|
49
|
+
/**
|
|
50
|
+
* Add observers to a CompanyValuationReport
|
|
51
|
+
*/
|
|
52
|
+
async addObserversToCompanyValuationReport(params) {
|
|
53
|
+
return (0, addObserversToCompanyValuationReport_1.addObserversToCompanyValuationReport)(this.client, params);
|
|
54
|
+
}
|
|
27
55
|
}
|
|
28
56
|
exports.OcpFactoryClient = OcpFactoryClient;
|
|
29
57
|
//# sourceMappingURL=OcpFactoryClient.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"OcpFactoryClient.js","sourceRoot":"","sources":["../src/OcpFactoryClient.ts"],"names":[],"mappings":";;;AAAA,+DAA8E;AAC9E,iEAA4G;AAC5G,2DAAoI;
|
|
1
|
+
{"version":3,"file":"OcpFactoryClient.js","sourceRoot":"","sources":["../src/OcpFactoryClient.ts"],"names":[],"mappings":";;;AAAA,+DAA8E;AAC9E,iEAA4G;AAC5G,2DAAoI;AACpI,2FAAgK;AAChK,+EAAwI;AACxI,2GAAgM;AAChM,2GAAgM;AAShM,MAAa,gBAAgB;IAG3B,YAAY,MAAqB;QAC/B,IAAI,CAAC,MAAM,GAAG,IAAI,qCAAmB,CAAC,MAAM,CAAC,CAAC;IAChD,CAAC;IAED;;;;OAIG;IACH,KAAK,CAAC,eAAe,CAAC,MAA6B;QACjD,OAAO,IAAA,iCAAe,EAAC,IAAI,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAC9C,CAAC;IAED;;;;OAIG;IACH,KAAK,CAAC,YAAY,CAAC,MAA0B;QAC3C,OAAO,IAAA,2BAAY,EAAC,IAAI,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAC3C,CAAC;IAED;;OAEG;IACH,KAAK,CAAC,4BAA4B,CAChC,MAA0C;QAE1C,OAAO,IAAA,2DAA4B,EAAC,IAAI,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAC3D,CAAC;IAED;;OAEG;IACH,KAAK,CAAC,sBAAsB,CAC1B,MAAoC;QAEpC,OAAO,IAAA,+CAAsB,EAAC,IAAI,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACrD,CAAC;IAED;;OAEG;IACH,KAAK,CAAC,oCAAoC,CACxC,MAAkD;QAElD,OAAO,IAAA,2EAAoC,EAAC,IAAI,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACnE,CAAC;IAED;;OAEG;IACH,KAAK,CAAC,oCAAoC,CACxC,MAAkD;QAElD,OAAO,IAAA,2EAAoC,EAAC,IAAI,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACnE,CAAC;CACF;AA5DD,4CA4DC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { LedgerJsonApiClient } from '@fairmint/canton-node-sdk';
|
|
2
|
+
export interface AddObserversToCompanyValuationReportParams {
|
|
3
|
+
companyValuationReportContractId: string;
|
|
4
|
+
added: string[];
|
|
5
|
+
}
|
|
6
|
+
export interface AddObserversToCompanyValuationReportResult {
|
|
7
|
+
contractId: string;
|
|
8
|
+
updateId: string;
|
|
9
|
+
}
|
|
10
|
+
/**
|
|
11
|
+
* Add observers to a CompanyValuationReport by exercising AddObservers.
|
|
12
|
+
*/
|
|
13
|
+
export declare function addObserversToCompanyValuationReport(client: LedgerJsonApiClient, params: AddObserversToCompanyValuationReportParams): Promise<AddObserversToCompanyValuationReportResult>;
|
|
14
|
+
//# sourceMappingURL=addObserversToCompanyValuationReport.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"addObserversToCompanyValuationReport.d.ts","sourceRoot":"","sources":["../../src/functions/addObserversToCompanyValuationReport.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,mBAAmB,EAAE,MAAM,2BAA2B,CAAC;AAGhE,MAAM,WAAW,0CAA0C;IACzD,gCAAgC,EAAE,MAAM,CAAC;IACzC,KAAK,EAAE,MAAM,EAAE,CAAC;CACjB;AAED,MAAM,WAAW,0CAA0C;IACzD,UAAU,EAAE,MAAM,CAAC;IACnB,QAAQ,EAAE,MAAM,CAAC;CAClB;AAED;;GAEG;AACH,wBAAsB,oCAAoC,CACxD,MAAM,EAAE,mBAAmB,EAC3B,MAAM,EAAE,0CAA0C,GACjD,OAAO,CAAC,0CAA0C,CAAC,CA6BrD"}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.addObserversToCompanyValuationReport = addObserversToCompanyValuationReport;
|
|
4
|
+
const open_captable_protocol_daml_js_1 = require("@fairmint/open-captable-protocol-daml-js");
|
|
5
|
+
/**
|
|
6
|
+
* Add observers to a CompanyValuationReport by exercising AddObservers.
|
|
7
|
+
*/
|
|
8
|
+
async function addObserversToCompanyValuationReport(client, params) {
|
|
9
|
+
// Determine the acting party (system_operator) from the created event
|
|
10
|
+
const eventsResponse = await client.getEventsByContractId({
|
|
11
|
+
contractId: params.companyValuationReportContractId
|
|
12
|
+
});
|
|
13
|
+
const systemOperator = eventsResponse.created.createdEvent.createArgument.system_operator;
|
|
14
|
+
const choiceArguments = {
|
|
15
|
+
added: params.added
|
|
16
|
+
};
|
|
17
|
+
const response = await client.submitAndWaitForTransactionTree({
|
|
18
|
+
actAs: [systemOperator],
|
|
19
|
+
commands: [
|
|
20
|
+
{
|
|
21
|
+
ExerciseCommand: {
|
|
22
|
+
templateId: open_captable_protocol_daml_js_1.Fairmint.OpenCapTable.CompanyValuationReport.CompanyValuationReport.templateId,
|
|
23
|
+
contractId: params.companyValuationReportContractId,
|
|
24
|
+
choice: 'AddObservers',
|
|
25
|
+
choiceArgument: choiceArguments
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
]
|
|
29
|
+
});
|
|
30
|
+
return {
|
|
31
|
+
contractId: response.transactionTree.eventsById[1].CreatedTreeEvent.value.contractId,
|
|
32
|
+
updateId: response.transactionTree.updateId
|
|
33
|
+
};
|
|
34
|
+
}
|
|
35
|
+
//# sourceMappingURL=addObserversToCompanyValuationReport.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"addObserversToCompanyValuationReport.js","sourceRoot":"","sources":["../../src/functions/addObserversToCompanyValuationReport.ts"],"names":[],"mappings":";;AAiBA,oFAgCC;AAjDD,6FAAoE;AAcpE;;GAEG;AACI,KAAK,UAAU,oCAAoC,CACxD,MAA2B,EAC3B,MAAkD;IAElD,sEAAsE;IACtE,MAAM,cAAc,GAAG,MAAM,MAAM,CAAC,qBAAqB,CAAC;QACxD,UAAU,EAAE,MAAM,CAAC,gCAAgC;KACpD,CAAC,CAAC;IACH,MAAM,cAAc,GAAG,cAAc,CAAC,OAAO,CAAC,YAAY,CAAC,cAAc,CAAC,eAAe,CAAC;IAE1F,MAAM,eAAe,GAA8D;QACjF,KAAK,EAAE,MAAM,CAAC,KAAK;KACpB,CAAC;IAEF,MAAM,QAAQ,GAAG,MAAM,MAAM,CAAC,+BAA+B,CAAC;QAC5D,KAAK,EAAE,CAAC,cAAc,CAAC;QACvB,QAAQ,EAAE;YACR;gBACE,eAAe,EAAE;oBACf,UAAU,EAAE,yCAAQ,CAAC,YAAY,CAAC,sBAAsB,CAAC,sBAAsB,CAAC,UAAU;oBAC1F,UAAU,EAAE,MAAM,CAAC,gCAAgC;oBACnD,MAAM,EAAE,cAAc;oBACtB,cAAc,EAAE,eAAe;iBAChC;aACF;SACF;KACF,CAA4C,CAAC;IAE9C,OAAO;QACL,UAAU,EAAE,QAAQ,CAAC,eAAe,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,gBAAgB,CAAC,KAAK,CAAC,UAAU;QACpF,QAAQ,EAAE,QAAQ,CAAC,eAAe,CAAC,QAAQ;KAC5C,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { LedgerJsonApiClient } from '@fairmint/canton-node-sdk';
|
|
2
|
+
export interface AddObserversToCompanyValuationReportParams {
|
|
3
|
+
companyValuationReportContractId: string;
|
|
4
|
+
added: string[];
|
|
5
|
+
}
|
|
6
|
+
export interface AddObserversToCompanyValuationReportResult {
|
|
7
|
+
contractId: string;
|
|
8
|
+
updateId: string;
|
|
9
|
+
}
|
|
10
|
+
/**
|
|
11
|
+
* Add observers to a CompanyValuationReport by exercising AddObservers.
|
|
12
|
+
*/
|
|
13
|
+
export declare function addObserversToCompanyValuationReport(client: LedgerJsonApiClient, params: AddObserversToCompanyValuationReportParams): Promise<AddObserversToCompanyValuationReportResult>;
|
|
14
|
+
//# sourceMappingURL=addObserversToCompanyValuationReport.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"addObserversToCompanyValuationReport.d.ts","sourceRoot":"","sources":["../../../src/functions/companyValuationReport/addObserversToCompanyValuationReport.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,mBAAmB,EAAE,MAAM,2BAA2B,CAAC;AAGhE,MAAM,WAAW,0CAA0C;IACzD,gCAAgC,EAAE,MAAM,CAAC;IACzC,KAAK,EAAE,MAAM,EAAE,CAAC;CACjB;AAED,MAAM,WAAW,0CAA0C;IACzD,UAAU,EAAE,MAAM,CAAC;IACnB,QAAQ,EAAE,MAAM,CAAC;CAClB;AAED;;GAEG;AACH,wBAAsB,oCAAoC,CACxD,MAAM,EAAE,mBAAmB,EAC3B,MAAM,EAAE,0CAA0C,GACjD,OAAO,CAAC,0CAA0C,CAAC,CAkCrD"}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.addObserversToCompanyValuationReport = addObserversToCompanyValuationReport;
|
|
4
|
+
const open_captable_protocol_daml_js_1 = require("@fairmint/open-captable-protocol-daml-js");
|
|
5
|
+
/**
|
|
6
|
+
* Add observers to a CompanyValuationReport by exercising AddObservers.
|
|
7
|
+
*/
|
|
8
|
+
async function addObserversToCompanyValuationReport(client, params) {
|
|
9
|
+
// Determine the acting party (system_operator) from the created event
|
|
10
|
+
const eventsResponse = await client.getEventsByContractId({
|
|
11
|
+
contractId: params.companyValuationReportContractId
|
|
12
|
+
});
|
|
13
|
+
const systemOperator = eventsResponse.created.createdEvent.createArgument.system_operator;
|
|
14
|
+
const choiceArguments = {
|
|
15
|
+
added: params.added
|
|
16
|
+
};
|
|
17
|
+
const response = await client.submitAndWaitForTransactionTree({
|
|
18
|
+
actAs: [systemOperator],
|
|
19
|
+
commands: [
|
|
20
|
+
{
|
|
21
|
+
ExerciseCommand: {
|
|
22
|
+
templateId: open_captable_protocol_daml_js_1.Fairmint.OpenCapTable.CompanyValuationReport.CompanyValuationReport.templateId,
|
|
23
|
+
contractId: params.companyValuationReportContractId,
|
|
24
|
+
choice: 'AddObservers',
|
|
25
|
+
choiceArgument: choiceArguments
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
]
|
|
29
|
+
});
|
|
30
|
+
const event = response.transactionTree.eventsById[1];
|
|
31
|
+
if ('CreatedTreeEvent' in event) {
|
|
32
|
+
return {
|
|
33
|
+
contractId: event.CreatedTreeEvent.value.contractId,
|
|
34
|
+
updateId: response.transactionTree.updateId
|
|
35
|
+
};
|
|
36
|
+
}
|
|
37
|
+
else {
|
|
38
|
+
throw new Error('Expected CreatedTreeEvent not found');
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
//# sourceMappingURL=addObserversToCompanyValuationReport.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"addObserversToCompanyValuationReport.js","sourceRoot":"","sources":["../../../src/functions/companyValuationReport/addObserversToCompanyValuationReport.ts"],"names":[],"mappings":";;AAiBA,oFAqCC;AAtDD,6FAAoE;AAcpE;;GAEG;AACI,KAAK,UAAU,oCAAoC,CACxD,MAA2B,EAC3B,MAAkD;IAElD,sEAAsE;IACtE,MAAM,cAAc,GAAG,MAAM,MAAM,CAAC,qBAAqB,CAAC;QACxD,UAAU,EAAE,MAAM,CAAC,gCAAgC;KACpD,CAAC,CAAC;IACH,MAAM,cAAc,GAAG,cAAc,CAAC,OAAO,CAAC,YAAY,CAAC,cAAc,CAAC,eAAe,CAAC;IAE1F,MAAM,eAAe,GAA8D;QACjF,KAAK,EAAE,MAAM,CAAC,KAAK;KACpB,CAAC;IAEF,MAAM,QAAQ,GAAG,MAAM,MAAM,CAAC,+BAA+B,CAAC;QAC5D,KAAK,EAAE,CAAC,cAAc,CAAC;QACvB,QAAQ,EAAE;YACR;gBACE,eAAe,EAAE;oBACf,UAAU,EAAE,yCAAQ,CAAC,YAAY,CAAC,sBAAsB,CAAC,sBAAsB,CAAC,UAAU;oBAC1F,UAAU,EAAE,MAAM,CAAC,gCAAgC;oBACnD,MAAM,EAAE,cAAc;oBACtB,cAAc,EAAE,eAAe;iBAChC;aACF;SACF;KACF,CAA4C,CAAC;IAE9C,MAAM,KAAK,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"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { LedgerJsonApiClient } from '@fairmint/canton-node-sdk';
|
|
2
|
+
export interface ConfirmCurrentCompanyValuationReportParams {
|
|
3
|
+
companyValuationReportContractId: string;
|
|
4
|
+
}
|
|
5
|
+
export interface ConfirmCurrentCompanyValuationReportResult {
|
|
6
|
+
contractId: string;
|
|
7
|
+
updateId: string;
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* Confirm the current company valuation on a CompanyValuationReport by exercising ConfirmCurrent.
|
|
11
|
+
*/
|
|
12
|
+
export declare function confirmCurrentCompanyValuationReport(client: LedgerJsonApiClient, params: ConfirmCurrentCompanyValuationReportParams): Promise<ConfirmCurrentCompanyValuationReportResult>;
|
|
13
|
+
//# sourceMappingURL=confirmCurrentCompanyValuationReport.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"confirmCurrentCompanyValuationReport.d.ts","sourceRoot":"","sources":["../../../src/functions/companyValuationReport/confirmCurrentCompanyValuationReport.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,mBAAmB,EAAE,MAAM,2BAA2B,CAAC;AAGhE,MAAM,WAAW,0CAA0C;IACzD,gCAAgC,EAAE,MAAM,CAAC;CAC1C;AAED,MAAM,WAAW,0CAA0C;IACzD,UAAU,EAAE,MAAM,CAAC;IACnB,QAAQ,EAAE,MAAM,CAAC;CAClB;AAED;;GAEG;AACH,wBAAsB,oCAAoC,CACxD,MAAM,EAAE,mBAAmB,EAC3B,MAAM,EAAE,0CAA0C,GACjD,OAAO,CAAC,0CAA0C,CAAC,CAgCrD"}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.confirmCurrentCompanyValuationReport = confirmCurrentCompanyValuationReport;
|
|
4
|
+
const open_captable_protocol_daml_js_1 = require("@fairmint/open-captable-protocol-daml-js");
|
|
5
|
+
/**
|
|
6
|
+
* Confirm the current company valuation on a CompanyValuationReport by exercising ConfirmCurrent.
|
|
7
|
+
*/
|
|
8
|
+
async function confirmCurrentCompanyValuationReport(client, params) {
|
|
9
|
+
// Determine the acting party (system_operator) from the created event
|
|
10
|
+
const eventsResponse = await client.getEventsByContractId({
|
|
11
|
+
contractId: params.companyValuationReportContractId
|
|
12
|
+
});
|
|
13
|
+
const systemOperator = eventsResponse.created.createdEvent.createArgument.system_operator;
|
|
14
|
+
const choiceArguments = {};
|
|
15
|
+
const response = await client.submitAndWaitForTransactionTree({
|
|
16
|
+
actAs: [systemOperator],
|
|
17
|
+
commands: [
|
|
18
|
+
{
|
|
19
|
+
ExerciseCommand: {
|
|
20
|
+
templateId: open_captable_protocol_daml_js_1.Fairmint.OpenCapTable.CompanyValuationReport.CompanyValuationReport.templateId,
|
|
21
|
+
contractId: params.companyValuationReportContractId,
|
|
22
|
+
choice: 'ConfirmCurrent',
|
|
23
|
+
choiceArgument: choiceArguments
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
]
|
|
27
|
+
});
|
|
28
|
+
const event = response.transactionTree.eventsById[1];
|
|
29
|
+
if ('CreatedTreeEvent' in event) {
|
|
30
|
+
return {
|
|
31
|
+
contractId: event.CreatedTreeEvent.value.contractId,
|
|
32
|
+
updateId: response.transactionTree.updateId
|
|
33
|
+
};
|
|
34
|
+
}
|
|
35
|
+
else {
|
|
36
|
+
throw new Error('Expected CreatedTreeEvent not found');
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
//# sourceMappingURL=confirmCurrentCompanyValuationReport.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"confirmCurrentCompanyValuationReport.js","sourceRoot":"","sources":["../../../src/functions/companyValuationReport/confirmCurrentCompanyValuationReport.ts"],"names":[],"mappings":";;AAgBA,oFAmCC;AAnDD,6FAAoE;AAapE;;GAEG;AACI,KAAK,UAAU,oCAAoC,CACxD,MAA2B,EAC3B,MAAkD;IAElD,sEAAsE;IACtE,MAAM,cAAc,GAAG,MAAM,MAAM,CAAC,qBAAqB,CAAC;QACxD,UAAU,EAAE,MAAM,CAAC,gCAAgC;KACpD,CAAC,CAAC;IACH,MAAM,cAAc,GAAG,cAAc,CAAC,OAAO,CAAC,YAAY,CAAC,cAAc,CAAC,eAAe,CAAC;IAE1F,MAAM,eAAe,GAAgE,EAAE,CAAC;IAExF,MAAM,QAAQ,GAAG,MAAM,MAAM,CAAC,+BAA+B,CAAC;QAC5D,KAAK,EAAE,CAAC,cAAc,CAAC;QACvB,QAAQ,EAAE;YACR;gBACE,eAAe,EAAE;oBACf,UAAU,EAAE,yCAAQ,CAAC,YAAY,CAAC,sBAAsB,CAAC,sBAAsB,CAAC,UAAU;oBAC1F,UAAU,EAAE,MAAM,CAAC,gCAAgC;oBACnD,MAAM,EAAE,gBAAgB;oBACxB,cAAc,EAAE,eAAe;iBAChC;aACF;SACF;KACF,CAA4C,CAAC;IAE9C,MAAM,KAAK,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"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { LedgerJsonApiClient } from '@fairmint/canton-node-sdk';
|
|
2
|
+
export interface CreateCompanyValuationReportParams {
|
|
3
|
+
companyId: string;
|
|
4
|
+
companyValuation: string | number;
|
|
5
|
+
observers?: string[];
|
|
6
|
+
}
|
|
7
|
+
export interface CreateCompanyValuationReportResult {
|
|
8
|
+
contractId: string;
|
|
9
|
+
updateId: string;
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* Create a CompanyValuationReport by exercising the CreateCompanyValuationReport choice
|
|
13
|
+
* on the OCP Factory contract.
|
|
14
|
+
*/
|
|
15
|
+
export declare function createCompanyValuationReport(client: LedgerJsonApiClient, params: CreateCompanyValuationReportParams): Promise<CreateCompanyValuationReportResult>;
|
|
16
|
+
//# sourceMappingURL=createCompanyValuationReport.d.ts.map
|
|
@@ -0,0 +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;AAIhE,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;CAClB;AAED;;;GAGG;AACH,wBAAsB,4BAA4B,CAChD,MAAM,EAAE,mBAAmB,EAC3B,MAAM,EAAE,kCAAkC,GACzC,OAAO,CAAC,kCAAkC,CAAC,CAqC7C"}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.createCompanyValuationReport = createCompanyValuationReport;
|
|
7
|
+
const ocp_factory_contract_id_json_1 = __importDefault(require("@fairmint/open-captable-protocol-daml-js/ocp-factory-contract-id.json"));
|
|
8
|
+
/**
|
|
9
|
+
* Create a CompanyValuationReport by exercising the CreateCompanyValuationReport choice
|
|
10
|
+
* on the OCP Factory contract.
|
|
11
|
+
*/
|
|
12
|
+
async function createCompanyValuationReport(client, params) {
|
|
13
|
+
const network = client.getNetwork();
|
|
14
|
+
const networkData = ocp_factory_contract_id_json_1.default[network];
|
|
15
|
+
if (!networkData) {
|
|
16
|
+
throw new Error(`Unsupported network: ${network}`);
|
|
17
|
+
}
|
|
18
|
+
const choiceArguments = {
|
|
19
|
+
company_id: params.companyId,
|
|
20
|
+
company_valuation: typeof params.companyValuation === 'number'
|
|
21
|
+
? params.companyValuation.toString()
|
|
22
|
+
: params.companyValuation,
|
|
23
|
+
observers: params.observers ?? []
|
|
24
|
+
};
|
|
25
|
+
const response = await client.submitAndWaitForTransactionTree({
|
|
26
|
+
commands: [
|
|
27
|
+
{
|
|
28
|
+
ExerciseCommand: {
|
|
29
|
+
templateId: networkData.templateId,
|
|
30
|
+
contractId: networkData.ocpFactoryContractId,
|
|
31
|
+
choice: 'CreateCompanyValuationReport',
|
|
32
|
+
choiceArgument: choiceArguments
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
]
|
|
36
|
+
});
|
|
37
|
+
const event = response.transactionTree.eventsById[1];
|
|
38
|
+
if ('CreatedTreeEvent' in event) {
|
|
39
|
+
return {
|
|
40
|
+
contractId: event.CreatedTreeEvent.value.contractId,
|
|
41
|
+
updateId: response.transactionTree.updateId
|
|
42
|
+
};
|
|
43
|
+
}
|
|
44
|
+
else {
|
|
45
|
+
throw new Error('Expected CreatedTreeEvent not found');
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
//# sourceMappingURL=createCompanyValuationReport.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"createCompanyValuationReport.js","sourceRoot":"","sources":["../../../src/functions/companyValuationReport/createCompanyValuationReport.ts"],"names":[],"mappings":";;;;;AAoBA,oEAwCC;AA1DD,yIAA0G;AAc1G;;;GAGG;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,KAAK,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"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { LedgerJsonApiClient } from '@fairmint/canton-node-sdk';
|
|
2
|
+
export interface UpdateCompanyValuationParams {
|
|
3
|
+
companyValuationReportContractId: string;
|
|
4
|
+
newCompanyValuation: string | number;
|
|
5
|
+
}
|
|
6
|
+
export interface UpdateCompanyValuationResult {
|
|
7
|
+
contractId: string;
|
|
8
|
+
updateId: string;
|
|
9
|
+
}
|
|
10
|
+
/**
|
|
11
|
+
* Update the company valuation on a CompanyValuationReport by exercising SetCompanyValuation.
|
|
12
|
+
*/
|
|
13
|
+
export declare function updateCompanyValuation(client: LedgerJsonApiClient, params: UpdateCompanyValuationParams): Promise<UpdateCompanyValuationResult>;
|
|
14
|
+
//# sourceMappingURL=updateCompanyValuation.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"updateCompanyValuation.d.ts","sourceRoot":"","sources":["../../../src/functions/companyValuationReport/updateCompanyValuation.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,mBAAmB,EAAE,MAAM,2BAA2B,CAAC;AAGhE,MAAM,WAAW,4BAA4B;IAC3C,gCAAgC,EAAE,MAAM,CAAC;IACzC,mBAAmB,EAAE,MAAM,GAAG,MAAM,CAAC;CACtC;AAED,MAAM,WAAW,4BAA4B;IAC3C,UAAU,EAAE,MAAM,CAAC;IACnB,QAAQ,EAAE,MAAM,CAAC;CAClB;AAED;;GAEG;AACH,wBAAsB,sBAAsB,CAC1C,MAAM,EAAE,mBAAmB,EAC3B,MAAM,EAAE,4BAA4B,GACnC,OAAO,CAAC,4BAA4B,CAAC,CAoCvC"}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.updateCompanyValuation = updateCompanyValuation;
|
|
4
|
+
const open_captable_protocol_daml_js_1 = require("@fairmint/open-captable-protocol-daml-js");
|
|
5
|
+
/**
|
|
6
|
+
* Update the company valuation on a CompanyValuationReport by exercising SetCompanyValuation.
|
|
7
|
+
*/
|
|
8
|
+
async function updateCompanyValuation(client, params) {
|
|
9
|
+
// Determine the acting party (system_operator) from the created event
|
|
10
|
+
const eventsResponse = await client.getEventsByContractId({
|
|
11
|
+
contractId: params.companyValuationReportContractId
|
|
12
|
+
});
|
|
13
|
+
const systemOperator = eventsResponse.created.createdEvent.createArgument.system_operator;
|
|
14
|
+
const choiceArguments = {
|
|
15
|
+
new_company_valuation: typeof params.newCompanyValuation === 'number'
|
|
16
|
+
? params.newCompanyValuation.toString()
|
|
17
|
+
: params.newCompanyValuation
|
|
18
|
+
};
|
|
19
|
+
const response = await client.submitAndWaitForTransactionTree({
|
|
20
|
+
actAs: [systemOperator],
|
|
21
|
+
commands: [
|
|
22
|
+
{
|
|
23
|
+
ExerciseCommand: {
|
|
24
|
+
templateId: open_captable_protocol_daml_js_1.Fairmint.OpenCapTable.CompanyValuationReport.CompanyValuationReport.templateId,
|
|
25
|
+
contractId: params.companyValuationReportContractId,
|
|
26
|
+
choice: 'SetCompanyValuation',
|
|
27
|
+
choiceArgument: choiceArguments
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
]
|
|
31
|
+
});
|
|
32
|
+
const event = response.transactionTree.eventsById[1];
|
|
33
|
+
if ('CreatedTreeEvent' in event) {
|
|
34
|
+
return {
|
|
35
|
+
contractId: event.CreatedTreeEvent.value.contractId,
|
|
36
|
+
updateId: response.transactionTree.updateId
|
|
37
|
+
};
|
|
38
|
+
}
|
|
39
|
+
else {
|
|
40
|
+
throw new Error('Expected CreatedTreeEvent not found');
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
//# sourceMappingURL=updateCompanyValuation.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"updateCompanyValuation.js","sourceRoot":"","sources":["../../../src/functions/companyValuationReport/updateCompanyValuation.ts"],"names":[],"mappings":";;AAiBA,wDAuCC;AAxDD,6FAAoE;AAcpE;;GAEG;AACI,KAAK,UAAU,sBAAsB,CAC1C,MAA2B,EAC3B,MAAoC;IAEpC,sEAAsE;IACtE,MAAM,cAAc,GAAG,MAAM,MAAM,CAAC,qBAAqB,CAAC;QACxD,UAAU,EAAE,MAAM,CAAC,gCAAgC;KACpD,CAAC,CAAC;IACH,MAAM,cAAc,GAAG,cAAc,CAAC,OAAO,CAAC,YAAY,CAAC,cAAc,CAAC,eAAe,CAAC;IAE1F,MAAM,eAAe,GAAqE;QACxF,qBAAqB,EAAE,OAAO,MAAM,CAAC,mBAAmB,KAAK,QAAQ;YACnE,CAAC,CAAC,MAAM,CAAC,mBAAmB,CAAC,QAAQ,EAAE;YACvC,CAAC,CAAC,MAAM,CAAC,mBAAmB;KAC/B,CAAC;IAEF,MAAM,QAAQ,GAAG,MAAM,MAAM,CAAC,+BAA+B,CAAC;QAC5D,KAAK,EAAE,CAAC,cAAc,CAAC;QACvB,QAAQ,EAAE;YACR;gBACE,eAAe,EAAE;oBACf,UAAU,EAAE,yCAAQ,CAAC,YAAY,CAAC,sBAAsB,CAAC,sBAAsB,CAAC,UAAU;oBAC1F,UAAU,EAAE,MAAM,CAAC,gCAAgC;oBACnD,MAAM,EAAE,qBAAqB;oBAC7B,cAAc,EAAE,eAAe;iBAChC;aACF;SACF;KACF,CAA4C,CAAC;IAE9C,MAAM,KAAK,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"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { LedgerJsonApiClient } from '@fairmint/canton-node-sdk';
|
|
2
|
+
export interface ConfirmCurrentCompanyValuationReportParams {
|
|
3
|
+
companyValuationReportContractId: string;
|
|
4
|
+
}
|
|
5
|
+
export interface ConfirmCurrentCompanyValuationReportResult {
|
|
6
|
+
contractId: string;
|
|
7
|
+
updateId: string;
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* Confirm the current company valuation on a CompanyValuationReport by exercising ConfirmCurrent.
|
|
11
|
+
*/
|
|
12
|
+
export declare function confirmCurrentCompanyValuationReport(client: LedgerJsonApiClient, params: ConfirmCurrentCompanyValuationReportParams): Promise<ConfirmCurrentCompanyValuationReportResult>;
|
|
13
|
+
//# sourceMappingURL=confirmCurrentCompanyValuationReport.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"confirmCurrentCompanyValuationReport.d.ts","sourceRoot":"","sources":["../../src/functions/confirmCurrentCompanyValuationReport.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,mBAAmB,EAAE,MAAM,2BAA2B,CAAC;AAGhE,MAAM,WAAW,0CAA0C;IACzD,gCAAgC,EAAE,MAAM,CAAC;CAC1C;AAED,MAAM,WAAW,0CAA0C;IACzD,UAAU,EAAE,MAAM,CAAC;IACnB,QAAQ,EAAE,MAAM,CAAC;CAClB;AAED;;GAEG;AACH,wBAAsB,oCAAoC,CACxD,MAAM,EAAE,mBAAmB,EAC3B,MAAM,EAAE,0CAA0C,GACjD,OAAO,CAAC,0CAA0C,CAAC,CA2BrD"}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.confirmCurrentCompanyValuationReport = confirmCurrentCompanyValuationReport;
|
|
4
|
+
const open_captable_protocol_daml_js_1 = require("@fairmint/open-captable-protocol-daml-js");
|
|
5
|
+
/**
|
|
6
|
+
* Confirm the current company valuation on a CompanyValuationReport by exercising ConfirmCurrent.
|
|
7
|
+
*/
|
|
8
|
+
async function confirmCurrentCompanyValuationReport(client, params) {
|
|
9
|
+
// Determine the acting party (system_operator) from the created event
|
|
10
|
+
const eventsResponse = await client.getEventsByContractId({
|
|
11
|
+
contractId: params.companyValuationReportContractId
|
|
12
|
+
});
|
|
13
|
+
const systemOperator = eventsResponse.created.createdEvent.createArgument.system_operator;
|
|
14
|
+
const choiceArguments = {};
|
|
15
|
+
const response = await client.submitAndWaitForTransactionTree({
|
|
16
|
+
actAs: [systemOperator],
|
|
17
|
+
commands: [
|
|
18
|
+
{
|
|
19
|
+
ExerciseCommand: {
|
|
20
|
+
templateId: open_captable_protocol_daml_js_1.Fairmint.OpenCapTable.CompanyValuationReport.CompanyValuationReport.templateId,
|
|
21
|
+
contractId: params.companyValuationReportContractId,
|
|
22
|
+
choice: 'ConfirmCurrent',
|
|
23
|
+
choiceArgument: choiceArguments
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
]
|
|
27
|
+
});
|
|
28
|
+
return {
|
|
29
|
+
contractId: response.transactionTree.eventsById[1].CreatedTreeEvent.value.contractId,
|
|
30
|
+
updateId: response.transactionTree.updateId
|
|
31
|
+
};
|
|
32
|
+
}
|
|
33
|
+
//# sourceMappingURL=confirmCurrentCompanyValuationReport.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"confirmCurrentCompanyValuationReport.js","sourceRoot":"","sources":["../../src/functions/confirmCurrentCompanyValuationReport.ts"],"names":[],"mappings":";;AAgBA,oFA8BC;AA9CD,6FAAoE;AAapE;;GAEG;AACI,KAAK,UAAU,oCAAoC,CACxD,MAA2B,EAC3B,MAAkD;IAElD,sEAAsE;IACtE,MAAM,cAAc,GAAG,MAAM,MAAM,CAAC,qBAAqB,CAAC;QACxD,UAAU,EAAE,MAAM,CAAC,gCAAgC;KACpD,CAAC,CAAC;IACH,MAAM,cAAc,GAAG,cAAc,CAAC,OAAO,CAAC,YAAY,CAAC,cAAc,CAAC,eAAe,CAAC;IAE1F,MAAM,eAAe,GAAgE,EAAE,CAAC;IAExF,MAAM,QAAQ,GAAG,MAAM,MAAM,CAAC,+BAA+B,CAAC;QAC5D,KAAK,EAAE,CAAC,cAAc,CAAC;QACvB,QAAQ,EAAE;YACR;gBACE,eAAe,EAAE;oBACf,UAAU,EAAE,yCAAQ,CAAC,YAAY,CAAC,sBAAsB,CAAC,sBAAsB,CAAC,UAAU;oBAC1F,UAAU,EAAE,MAAM,CAAC,gCAAgC;oBACnD,MAAM,EAAE,gBAAgB;oBACxB,cAAc,EAAE,eAAe;iBAChC;aACF;SACF;KACF,CAA4C,CAAC;IAE9C,OAAO;QACL,UAAU,EAAE,QAAQ,CAAC,eAAe,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,gBAAgB,CAAC,KAAK,CAAC,UAAU;QACpF,QAAQ,EAAE,QAAQ,CAAC,eAAe,CAAC,QAAQ;KAC5C,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { LedgerJsonApiClient } from '@fairmint/canton-node-sdk';
|
|
2
|
+
export interface CreateCompanyValuationReportParams {
|
|
3
|
+
companyId: string;
|
|
4
|
+
companyValuation: string | number;
|
|
5
|
+
observers?: string[];
|
|
6
|
+
}
|
|
7
|
+
export interface CreateCompanyValuationReportResult {
|
|
8
|
+
contractId: string;
|
|
9
|
+
updateId: string;
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* Create a CompanyValuationReport by exercising the CreateCompanyValuationReport choice
|
|
13
|
+
* on the OCP Factory contract.
|
|
14
|
+
*/
|
|
15
|
+
export declare function createCompanyValuationReport(client: LedgerJsonApiClient, params: CreateCompanyValuationReportParams): Promise<CreateCompanyValuationReportResult>;
|
|
16
|
+
//# sourceMappingURL=createCompanyValuationReport.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"createCompanyValuationReport.d.ts","sourceRoot":"","sources":["../../src/functions/createCompanyValuationReport.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,mBAAmB,EAAE,MAAM,2BAA2B,CAAC;AAIhE,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;CAClB;AAED;;;GAGG;AACH,wBAAsB,4BAA4B,CAChD,MAAM,EAAE,mBAAmB,EAC3B,MAAM,EAAE,kCAAkC,GACzC,OAAO,CAAC,kCAAkC,CAAC,CAgC7C"}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.createCompanyValuationReport = createCompanyValuationReport;
|
|
7
|
+
const open_captable_protocol_daml_js_1 = require("@fairmint/open-captable-protocol-daml-js");
|
|
8
|
+
const ocp_factory_contract_id_json_1 = __importDefault(require("@fairmint/open-captable-protocol-daml-js/ocp-factory-contract-id.json"));
|
|
9
|
+
/**
|
|
10
|
+
* Create a CompanyValuationReport by exercising the CreateCompanyValuationReport choice
|
|
11
|
+
* on the OCP Factory contract.
|
|
12
|
+
*/
|
|
13
|
+
async function createCompanyValuationReport(client, params) {
|
|
14
|
+
const network = client.getNetwork();
|
|
15
|
+
const networkData = ocp_factory_contract_id_json_1.default[network];
|
|
16
|
+
if (!networkData) {
|
|
17
|
+
throw new Error(`Unsupported network: ${network}`);
|
|
18
|
+
}
|
|
19
|
+
const choiceArguments = {
|
|
20
|
+
company_id: params.companyId,
|
|
21
|
+
company_valuation: typeof params.companyValuation === 'number'
|
|
22
|
+
? params.companyValuation.toString()
|
|
23
|
+
: params.companyValuation,
|
|
24
|
+
observers: params.observers ?? []
|
|
25
|
+
};
|
|
26
|
+
const response = await client.submitAndWaitForTransactionTree({
|
|
27
|
+
commands: [
|
|
28
|
+
{
|
|
29
|
+
ExerciseCommand: {
|
|
30
|
+
templateId: open_captable_protocol_daml_js_1.Fairmint.OpenCapTable.OcpFactory.OcpFactory.templateId,
|
|
31
|
+
contractId: networkData.ocpFactoryContractId,
|
|
32
|
+
choice: 'CreateCompanyValuationReport',
|
|
33
|
+
choiceArgument: choiceArguments
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
]
|
|
37
|
+
});
|
|
38
|
+
return {
|
|
39
|
+
contractId: response.transactionTree.eventsById[1].CreatedTreeEvent.value.contractId,
|
|
40
|
+
updateId: response.transactionTree.updateId
|
|
41
|
+
};
|
|
42
|
+
}
|
|
43
|
+
//# sourceMappingURL=createCompanyValuationReport.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"createCompanyValuationReport.js","sourceRoot":"","sources":["../../src/functions/createCompanyValuationReport.ts"],"names":[],"mappings":";;;;;AAoBA,oEAmCC;AAvDD,6FAAoE;AAEpE,yIAA0G;AAc1G;;;GAGG;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,yCAAQ,CAAC,YAAY,CAAC,UAAU,CAAC,UAAU,CAAC,UAAU;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,kCAAkC,CAAC,cAAc;aACzE;SACF;KACF,
|
|
1
|
+
{"version":3,"file":"createIssuer.js","sourceRoot":"","sources":["../../src/functions/createIssuer.ts"],"names":[],"mappings":";;AA6DA,oCAoCC;AAjGD,6FAAoE;AAiCpE;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AACI,KAAK,UAAU,YAAY,CAChC,MAA2B,EAC3B,MAA0B;IAE1B,+CAA+C;IAC/C,MAAM,eAAe,GAA2D;QAC9E,WAAW,EAAE,MAAM,CAAC,UAAU;KAC/B,CAAC;IAEF,wDAAwD;IACxD,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,mBAAmB,CAAC,mBAAmB,CAAC,UAAU;oBACpF,UAAU,EAAE,MAAM,CAAC,kCAAkC,CAAC,UAAU;oBAChE,MAAM,EAAE,cAAc;oBACtB,cAAc,EAAE,eAAe;iBAChC;aACF;SACF;QACD,kBAAkB,EAAE;YAClB;gBACE,UAAU,EAAE,MAAM,CAAC,kCAAkC,CAAC,UAAU;gBAChE,UAAU,EAAE,MAAM,CAAC,kCAAkC,CAAC,UAAU;gBAChE,gBAAgB,EAAE,MAAM,CAAC,kCAAkC,CAAC,gBAAgB;gBAC5E,cAAc,EAAE,MAAM,CAAC,kCAAkC,CAAC,cAAc;aACzE;SACF;KACF,CAA4C,CAAC;IAE9C,OAAO;QACL,UAAU,EAAE,QAAQ,CAAC,eAAe,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,gBAAgB,CAAC,KAAK,CAAC,UAAU;QACpF,QAAQ,EAAE,QAAQ,CAAC,eAAe,CAAC,QAAQ;KAC5C,CAAC;AACJ,CAAC"}
|
|
@@ -1,4 +1,8 @@
|
|
|
1
|
-
export * from './authorizeIssuer';
|
|
2
|
-
export * from './createIssuer';
|
|
3
|
-
export * from './updateIssuerData';
|
|
1
|
+
export * from './issuer/authorizeIssuer';
|
|
2
|
+
export * from './issuer/createIssuer';
|
|
3
|
+
export * from './issuer/updateIssuerData';
|
|
4
|
+
export * from './companyValuationReport/createCompanyValuationReport';
|
|
5
|
+
export * from './companyValuationReport/updateCompanyValuation';
|
|
6
|
+
export * from './companyValuationReport/confirmCurrentCompanyValuationReport';
|
|
7
|
+
export * from './companyValuationReport/addObserversToCompanyValuationReport';
|
|
4
8
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/functions/index.ts"],"names":[],"mappings":"AAAA,cAAc,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/functions/index.ts"],"names":[],"mappings":"AAAA,cAAc,0BAA0B,CAAC;AACzC,cAAc,uBAAuB,CAAC;AACtC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,uDAAuD,CAAC;AACtE,cAAc,iDAAiD,CAAC;AAChE,cAAc,+DAA+D,CAAC;AAC9E,cAAc,+DAA+D,CAAC"}
|
package/dist/functions/index.js
CHANGED
|
@@ -14,7 +14,11 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
14
14
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
__exportStar(require("./authorizeIssuer"), exports);
|
|
18
|
-
__exportStar(require("./createIssuer"), exports);
|
|
19
|
-
__exportStar(require("./updateIssuerData"), exports);
|
|
17
|
+
__exportStar(require("./issuer/authorizeIssuer"), exports);
|
|
18
|
+
__exportStar(require("./issuer/createIssuer"), exports);
|
|
19
|
+
__exportStar(require("./issuer/updateIssuerData"), exports);
|
|
20
|
+
__exportStar(require("./companyValuationReport/createCompanyValuationReport"), exports);
|
|
21
|
+
__exportStar(require("./companyValuationReport/updateCompanyValuation"), exports);
|
|
22
|
+
__exportStar(require("./companyValuationReport/confirmCurrentCompanyValuationReport"), exports);
|
|
23
|
+
__exportStar(require("./companyValuationReport/addObserversToCompanyValuationReport"), exports);
|
|
20
24
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/functions/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/functions/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,2DAAyC;AACzC,wDAAsC;AACtC,4DAA0C;AAC1C,wFAAsE;AACtE,kFAAgE;AAChE,gGAA8E;AAC9E,gGAA8E"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { LedgerJsonApiClient } from '@fairmint/canton-node-sdk';
|
|
2
|
+
export interface AuthorizeIssuerParams {
|
|
3
|
+
issuer: string;
|
|
4
|
+
}
|
|
5
|
+
export interface AuthorizeIssuerResult {
|
|
6
|
+
contractId: string;
|
|
7
|
+
updateId: string;
|
|
8
|
+
createdEventBlob: string;
|
|
9
|
+
synchronizerId: string;
|
|
10
|
+
templateId: string;
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* Authorize an issuer using the OCP Factory contract
|
|
14
|
+
* @param client - The ledger JSON API client
|
|
15
|
+
* @param params - Parameters for authorizing an issuer
|
|
16
|
+
* @returns Promise resolving to the result of the authorization
|
|
17
|
+
*/
|
|
18
|
+
export declare function authorizeIssuer(client: LedgerJsonApiClient, params: AuthorizeIssuerParams): Promise<AuthorizeIssuerResult>;
|
|
19
|
+
//# sourceMappingURL=authorizeIssuer.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"authorizeIssuer.d.ts","sourceRoot":"","sources":["../../../src/functions/issuer/authorizeIssuer.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,mBAAmB,EAAE,MAAM,2BAA2B,CAAC;AAIhE,MAAM,WAAW,qBAAqB;IACpC,MAAM,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,WAAW,qBAAqB;IACpC,UAAU,EAAE,MAAM,CAAC;IACnB,QAAQ,EAAE,MAAM,CAAC;IACjB,gBAAgB,EAAE,MAAM,CAAC;IACzB,cAAc,EAAE,MAAM,CAAC;IACvB,UAAU,EAAE,MAAM,CAAC;CACpB;AAED;;;;;GAKG;AACH,wBAAsB,eAAe,CACnC,MAAM,EAAE,mBAAmB,EAC3B,MAAM,EAAE,qBAAqB,GAC5B,OAAO,CAAC,qBAAqB,CAAC,CA8ChC"}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.authorizeIssuer = authorizeIssuer;
|
|
7
|
+
const ocp_factory_contract_id_json_1 = __importDefault(require("@fairmint/open-captable-protocol-daml-js/ocp-factory-contract-id.json"));
|
|
8
|
+
/**
|
|
9
|
+
* Authorize an issuer using the OCP Factory contract
|
|
10
|
+
* @param client - The ledger JSON API client
|
|
11
|
+
* @param params - Parameters for authorizing an issuer
|
|
12
|
+
* @returns Promise resolving to the result of the authorization
|
|
13
|
+
*/
|
|
14
|
+
async function authorizeIssuer(client, params) {
|
|
15
|
+
// Get the current network from the client
|
|
16
|
+
const network = client.getNetwork();
|
|
17
|
+
// Select the appropriate contract ID based on the network
|
|
18
|
+
const networkData = ocp_factory_contract_id_json_1.default[network];
|
|
19
|
+
if (!networkData) {
|
|
20
|
+
throw new Error(`Unsupported network: ${network}`);
|
|
21
|
+
}
|
|
22
|
+
// Create the choice arguments for AuthorizeIssuer
|
|
23
|
+
const choiceArguments = {
|
|
24
|
+
issuer: params.issuer
|
|
25
|
+
};
|
|
26
|
+
// Submit the choice to the factory contract
|
|
27
|
+
const response = await client.submitAndWaitForTransactionTree({
|
|
28
|
+
commands: [
|
|
29
|
+
{
|
|
30
|
+
ExerciseCommand: {
|
|
31
|
+
templateId: networkData.templateId,
|
|
32
|
+
contractId: networkData.ocpFactoryContractId,
|
|
33
|
+
choice: 'AuthorizeIssuer',
|
|
34
|
+
choiceArgument: choiceArguments
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
]
|
|
38
|
+
});
|
|
39
|
+
const event = response.transactionTree.eventsById[1];
|
|
40
|
+
if (!('CreatedTreeEvent' in event)) {
|
|
41
|
+
throw new Error('Expected CreatedTreeEvent not found');
|
|
42
|
+
}
|
|
43
|
+
const issuerContractId = event.CreatedTreeEvent.value.contractId;
|
|
44
|
+
const issuerContractEvents = await client.getEventsByContractId({
|
|
45
|
+
contractId: issuerContractId
|
|
46
|
+
});
|
|
47
|
+
return {
|
|
48
|
+
contractId: issuerContractId,
|
|
49
|
+
updateId: response.transactionTree.updateId,
|
|
50
|
+
createdEventBlob: issuerContractEvents.created.createdEvent.createdEventBlob,
|
|
51
|
+
synchronizerId: response.transactionTree.synchronizerId,
|
|
52
|
+
templateId: event.CreatedTreeEvent.value.templateId
|
|
53
|
+
};
|
|
54
|
+
}
|
|
55
|
+
//# sourceMappingURL=authorizeIssuer.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"authorizeIssuer.js","sourceRoot":"","sources":["../../../src/functions/issuer/authorizeIssuer.ts"],"names":[],"mappings":";;;;;AAuBA,0CAiDC;AAtED,yIAA0G;AAe1G;;;;;GAKG;AACI,KAAK,UAAU,eAAe,CACnC,MAA2B,EAC3B,MAA6B;IAE7B,0CAA0C;IAC1C,MAAM,OAAO,GAAG,MAAM,CAAC,UAAU,EAAE,CAAC;IAEpC,0DAA0D;IAC1D,MAAM,WAAW,GAAG,sCAAqB,CAAC,OAA6C,CAAC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captable-protocol-daml-js';
|
|
2
|
+
import { LedgerJsonApiClient } from '@fairmint/canton-node-sdk';
|
|
3
|
+
/**
|
|
4
|
+
* Details about the IssuerAuthorization contract that need to be disclosed
|
|
5
|
+
* when exercising the CreateIssuer choice. This is required for cross-domain
|
|
6
|
+
* contract interactions in Canton.
|
|
7
|
+
*/
|
|
8
|
+
export interface IssuerAuthorizationContractDetails {
|
|
9
|
+
/** The contract ID of the IssuerAuthorization 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
|
+
export interface CreateIssuerParams {
|
|
19
|
+
/** Details of the IssuerAuthorization contract for disclosed contracts */
|
|
20
|
+
issuerAuthorizationContractDetails: IssuerAuthorizationContractDetails;
|
|
21
|
+
issuerParty: string;
|
|
22
|
+
/** Issuer data to create */
|
|
23
|
+
issuerData: Fairmint.OpenCapTable.OcfObjects.OcfIssuerData;
|
|
24
|
+
}
|
|
25
|
+
export interface CreateIssuerResult {
|
|
26
|
+
contractId: string;
|
|
27
|
+
updateId: string;
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* Create an issuer by exercising the CreateIssuer choice on an IssuerAuthorization contract
|
|
31
|
+
*
|
|
32
|
+
* This function requires the IssuerAuthorization contract details to be provided for disclosed contracts,
|
|
33
|
+
* which is necessary for cross-domain contract interactions in Canton.
|
|
34
|
+
*
|
|
35
|
+
* @example
|
|
36
|
+
* ```typescript
|
|
37
|
+
* const issuerAuthorizationContractDetails = {
|
|
38
|
+
* contractId: "1234567890abcdef",
|
|
39
|
+
* createdEventBlob: "serialized_contract_blob_here",
|
|
40
|
+
* synchronizerId: "sync_id_here"
|
|
41
|
+
* };
|
|
42
|
+
*
|
|
43
|
+
* const result = await createIssuer(client, {
|
|
44
|
+
* issuerAuthorizationContractDetails,
|
|
45
|
+
* issuerData: {
|
|
46
|
+
* legal_name: "My Company Inc.",
|
|
47
|
+
* country_of_formation: "US",
|
|
48
|
+
* // ... other issuer data
|
|
49
|
+
* }
|
|
50
|
+
* });
|
|
51
|
+
* ```
|
|
52
|
+
*
|
|
53
|
+
* @param client - The ledger JSON API client
|
|
54
|
+
* @param params - Parameters for creating an issuer, including the IssuerAuthorization contract details
|
|
55
|
+
* @returns Promise resolving to the result of the issuer creation
|
|
56
|
+
*/
|
|
57
|
+
export declare function createIssuer(client: LedgerJsonApiClient, params: CreateIssuerParams): Promise<CreateIssuerResult>;
|
|
58
|
+
//# sourceMappingURL=createIssuer.d.ts.map
|
|
@@ -0,0 +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;AAGhE;;;;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,UAAU,CAAC,aAAa,CAAC;CAC5D;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,CAsC7B"}
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.createIssuer = createIssuer;
|
|
4
|
+
const open_captable_protocol_daml_js_1 = require("@fairmint/open-captable-protocol-daml-js");
|
|
5
|
+
/**
|
|
6
|
+
* Create an issuer by exercising the CreateIssuer choice on an IssuerAuthorization contract
|
|
7
|
+
*
|
|
8
|
+
* This function requires the IssuerAuthorization contract details to be provided for disclosed contracts,
|
|
9
|
+
* which is necessary for cross-domain contract interactions in Canton.
|
|
10
|
+
*
|
|
11
|
+
* @example
|
|
12
|
+
* ```typescript
|
|
13
|
+
* const issuerAuthorizationContractDetails = {
|
|
14
|
+
* contractId: "1234567890abcdef",
|
|
15
|
+
* createdEventBlob: "serialized_contract_blob_here",
|
|
16
|
+
* synchronizerId: "sync_id_here"
|
|
17
|
+
* };
|
|
18
|
+
*
|
|
19
|
+
* const result = await createIssuer(client, {
|
|
20
|
+
* issuerAuthorizationContractDetails,
|
|
21
|
+
* issuerData: {
|
|
22
|
+
* legal_name: "My Company Inc.",
|
|
23
|
+
* country_of_formation: "US",
|
|
24
|
+
* // ... other issuer data
|
|
25
|
+
* }
|
|
26
|
+
* });
|
|
27
|
+
* ```
|
|
28
|
+
*
|
|
29
|
+
* @param client - The ledger JSON API client
|
|
30
|
+
* @param params - Parameters for creating an issuer, including the IssuerAuthorization contract details
|
|
31
|
+
* @returns Promise resolving to the result of the issuer creation
|
|
32
|
+
*/
|
|
33
|
+
async function createIssuer(client, params) {
|
|
34
|
+
// Create the choice arguments for CreateIssuer
|
|
35
|
+
const choiceArguments = {
|
|
36
|
+
issuer_data: params.issuerData
|
|
37
|
+
};
|
|
38
|
+
// Submit the choice to the IssuerAuthorization contract
|
|
39
|
+
const response = await client.submitAndWaitForTransactionTree({
|
|
40
|
+
actAs: [params.issuerParty],
|
|
41
|
+
commands: [
|
|
42
|
+
{
|
|
43
|
+
ExerciseCommand: {
|
|
44
|
+
templateId: open_captable_protocol_daml_js_1.Fairmint.OpenCapTable.IssuerAuthorization.IssuerAuthorization.templateId,
|
|
45
|
+
contractId: params.issuerAuthorizationContractDetails.contractId,
|
|
46
|
+
choice: 'CreateIssuer',
|
|
47
|
+
choiceArgument: choiceArguments
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
],
|
|
51
|
+
disclosedContracts: [
|
|
52
|
+
{
|
|
53
|
+
templateId: params.issuerAuthorizationContractDetails.templateId,
|
|
54
|
+
contractId: params.issuerAuthorizationContractDetails.contractId,
|
|
55
|
+
createdEventBlob: params.issuerAuthorizationContractDetails.createdEventBlob,
|
|
56
|
+
synchronizerId: params.issuerAuthorizationContractDetails.synchronizerId
|
|
57
|
+
}
|
|
58
|
+
]
|
|
59
|
+
});
|
|
60
|
+
const event = response.transactionTree.eventsById[1];
|
|
61
|
+
if ('CreatedTreeEvent' in event) {
|
|
62
|
+
return {
|
|
63
|
+
contractId: event.CreatedTreeEvent.value.contractId,
|
|
64
|
+
updateId: response.transactionTree.updateId
|
|
65
|
+
};
|
|
66
|
+
}
|
|
67
|
+
else {
|
|
68
|
+
throw new Error('Expected CreatedTreeEvent not found');
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
//# sourceMappingURL=createIssuer.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"createIssuer.js","sourceRoot":"","sources":["../../../src/functions/issuer/createIssuer.ts"],"names":[],"mappings":";;AA6DA,oCAyCC;AAtGD,6FAAoE;AAiCpE;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AACI,KAAK,UAAU,YAAY,CAChC,MAA2B,EAC3B,MAA0B;IAE1B,+CAA+C;IAC/C,MAAM,eAAe,GAA2D;QAC9E,WAAW,EAAE,MAAM,CAAC,UAAU;KAC/B,CAAC;IAEF,wDAAwD;IACxD,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,mBAAmB,CAAC,mBAAmB,CAAC,UAAU;oBACpF,UAAU,EAAE,MAAM,CAAC,kCAAkC,CAAC,UAAU;oBAChE,MAAM,EAAE,cAAc;oBACtB,cAAc,EAAE,eAAe;iBAChC;aACF;SACF;QACD,kBAAkB,EAAE;YAClB;gBACE,UAAU,EAAE,MAAM,CAAC,kCAAkC,CAAC,UAAU;gBAChE,UAAU,EAAE,MAAM,CAAC,kCAAkC,CAAC,UAAU;gBAChE,gBAAgB,EAAE,MAAM,CAAC,kCAAkC,CAAC,gBAAgB;gBAC5E,cAAc,EAAE,MAAM,CAAC,kCAAkC,CAAC,cAAc;aACzE;SACF;KACF,CAA4C,CAAC;IAE9C,MAAM,KAAK,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"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { Fairmint } from '@fairmint/open-captable-protocol-daml-js';
|
|
2
|
+
import { LedgerJsonApiClient } from '@fairmint/canton-node-sdk';
|
|
3
|
+
export interface UpdateIssuerDataParams {
|
|
4
|
+
issuerContractId: string;
|
|
5
|
+
newIssuerData: Fairmint.OpenCapTable.OcfObjects.OcfIssuerData;
|
|
6
|
+
}
|
|
7
|
+
export interface UpdateIssuerDataResult {
|
|
8
|
+
contractId: string;
|
|
9
|
+
updateId: string;
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* Update issuer data by exercising the UpdateIssuerData choice on an Issuer contract
|
|
13
|
+
* @param client - The ledger JSON API client
|
|
14
|
+
* @param params - Parameters for updating issuer data
|
|
15
|
+
* @returns Promise resolving to the result of the issuer data update
|
|
16
|
+
*/
|
|
17
|
+
export declare function updateIssuerData(client: LedgerJsonApiClient, params: UpdateIssuerDataParams): Promise<UpdateIssuerDataResult>;
|
|
18
|
+
//# sourceMappingURL=updateIssuerData.d.ts.map
|
|
@@ -0,0 +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,UAAU,CAAC,aAAa,CAAC;CAC/D;AAED,MAAM,WAAW,sBAAsB;IACrC,UAAU,EAAE,MAAM,CAAC;IACnB,QAAQ,EAAE,MAAM,CAAC;CAClB;AAED;;;;;GAKG;AACH,wBAAsB,gBAAgB,CACpC,MAAM,EAAE,mBAAmB,EAC3B,MAAM,EAAE,sBAAsB,GAC7B,OAAO,CAAC,sBAAsB,CAAC,CAqCjC"}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.updateIssuerData = updateIssuerData;
|
|
4
|
+
const open_captable_protocol_daml_js_1 = require("@fairmint/open-captable-protocol-daml-js");
|
|
5
|
+
/**
|
|
6
|
+
* Update issuer data by exercising the UpdateIssuerData choice on an Issuer contract
|
|
7
|
+
* @param client - The ledger JSON API client
|
|
8
|
+
* @param params - Parameters for updating issuer data
|
|
9
|
+
* @returns Promise resolving to the result of the issuer data update
|
|
10
|
+
*/
|
|
11
|
+
async function updateIssuerData(client, params) {
|
|
12
|
+
// Get the events for the Issuer contract to extract the issuer party
|
|
13
|
+
const eventsResponse = await client.getEventsByContractId({
|
|
14
|
+
contractId: params.issuerContractId
|
|
15
|
+
});
|
|
16
|
+
const issuerParty = eventsResponse.created.createdEvent.createArgument.issuer;
|
|
17
|
+
// Create the choice arguments for UpdateIssuerData
|
|
18
|
+
const choiceArguments = {
|
|
19
|
+
new_issuer_data: params.newIssuerData
|
|
20
|
+
};
|
|
21
|
+
// Submit the choice to the Issuer contract
|
|
22
|
+
const response = await client.submitAndWaitForTransactionTree({
|
|
23
|
+
actAs: [issuerParty],
|
|
24
|
+
commands: [
|
|
25
|
+
{
|
|
26
|
+
ExerciseCommand: {
|
|
27
|
+
templateId: open_captable_protocol_daml_js_1.Fairmint.OpenCapTable.Issuer.Issuer.templateId,
|
|
28
|
+
contractId: params.issuerContractId,
|
|
29
|
+
choice: 'UpdateIssuerData',
|
|
30
|
+
choiceArgument: choiceArguments
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
]
|
|
34
|
+
});
|
|
35
|
+
const event = response.transactionTree.eventsById[1];
|
|
36
|
+
if ('CreatedTreeEvent' in event) {
|
|
37
|
+
return {
|
|
38
|
+
contractId: event.CreatedTreeEvent.value.contractId,
|
|
39
|
+
updateId: response.transactionTree.updateId
|
|
40
|
+
};
|
|
41
|
+
}
|
|
42
|
+
else {
|
|
43
|
+
throw new Error('Expected CreatedTreeEvent not found');
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
//# sourceMappingURL=updateIssuerData.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"updateIssuerData.js","sourceRoot":"","sources":["../../../src/functions/issuer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
|
2
|
+
export interface UpdateCompanyValuationParams {
|
|
3
|
+
companyValuationReportContractId: string;
|
|
4
|
+
newCompanyValuation: string | number;
|
|
5
|
+
}
|
|
6
|
+
export interface UpdateCompanyValuationResult {
|
|
7
|
+
contractId: string;
|
|
8
|
+
updateId: string;
|
|
9
|
+
}
|
|
10
|
+
/**
|
|
11
|
+
* Update the company valuation on a CompanyValuationReport by exercising SetCompanyValuation.
|
|
12
|
+
*/
|
|
13
|
+
export declare function updateCompanyValuation(client: LedgerJsonApiClient, params: UpdateCompanyValuationParams): Promise<UpdateCompanyValuationResult>;
|
|
14
|
+
//# sourceMappingURL=updateCompanyValuation.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"updateCompanyValuation.d.ts","sourceRoot":"","sources":["../../src/functions/updateCompanyValuation.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,mBAAmB,EAAE,MAAM,2BAA2B,CAAC;AAGhE,MAAM,WAAW,4BAA4B;IAC3C,gCAAgC,EAAE,MAAM,CAAC;IACzC,mBAAmB,EAAE,MAAM,GAAG,MAAM,CAAC;CACtC;AAED,MAAM,WAAW,4BAA4B;IAC3C,UAAU,EAAE,MAAM,CAAC;IACnB,QAAQ,EAAE,MAAM,CAAC;CAClB;AAED;;GAEG;AACH,wBAAsB,sBAAsB,CAC1C,MAAM,EAAE,mBAAmB,EAC3B,MAAM,EAAE,4BAA4B,GACnC,OAAO,CAAC,4BAA4B,CAAC,CA+BvC"}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.updateCompanyValuation = updateCompanyValuation;
|
|
4
|
+
const open_captable_protocol_daml_js_1 = require("@fairmint/open-captable-protocol-daml-js");
|
|
5
|
+
/**
|
|
6
|
+
* Update the company valuation on a CompanyValuationReport by exercising SetCompanyValuation.
|
|
7
|
+
*/
|
|
8
|
+
async function updateCompanyValuation(client, params) {
|
|
9
|
+
// Determine the acting party (system_operator) from the created event
|
|
10
|
+
const eventsResponse = await client.getEventsByContractId({
|
|
11
|
+
contractId: params.companyValuationReportContractId
|
|
12
|
+
});
|
|
13
|
+
const systemOperator = eventsResponse.created.createdEvent.createArgument.system_operator;
|
|
14
|
+
const choiceArguments = {
|
|
15
|
+
new_company_valuation: typeof params.newCompanyValuation === 'number'
|
|
16
|
+
? params.newCompanyValuation.toString()
|
|
17
|
+
: params.newCompanyValuation
|
|
18
|
+
};
|
|
19
|
+
const response = await client.submitAndWaitForTransactionTree({
|
|
20
|
+
actAs: [systemOperator],
|
|
21
|
+
commands: [
|
|
22
|
+
{
|
|
23
|
+
ExerciseCommand: {
|
|
24
|
+
templateId: open_captable_protocol_daml_js_1.Fairmint.OpenCapTable.CompanyValuationReport.CompanyValuationReport.templateId,
|
|
25
|
+
contractId: params.companyValuationReportContractId,
|
|
26
|
+
choice: 'SetCompanyValuation',
|
|
27
|
+
choiceArgument: choiceArguments
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
]
|
|
31
|
+
});
|
|
32
|
+
return {
|
|
33
|
+
contractId: response.transactionTree.eventsById[1].CreatedTreeEvent.value.contractId,
|
|
34
|
+
updateId: response.transactionTree.updateId
|
|
35
|
+
};
|
|
36
|
+
}
|
|
37
|
+
//# sourceMappingURL=updateCompanyValuation.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"updateCompanyValuation.js","sourceRoot":"","sources":["../../src/functions/updateCompanyValuation.ts"],"names":[],"mappings":";;AAiBA,wDAkCC;AAnDD,6FAAoE;AAcpE;;GAEG;AACI,KAAK,UAAU,sBAAsB,CAC1C,MAA2B,EAC3B,MAAoC;IAEpC,sEAAsE;IACtE,MAAM,cAAc,GAAG,MAAM,MAAM,CAAC,qBAAqB,CAAC;QACxD,UAAU,EAAE,MAAM,CAAC,gCAAgC;KACpD,CAAC,CAAC;IACH,MAAM,cAAc,GAAG,cAAc,CAAC,OAAO,CAA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F;SACF;KACF,CAA4C,CAAC;IAE9C,OAAO;QACL,UAAU,EAAE,QAAQ,CAAC,eAAe,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,gBAAgB,CAAC,KAAK,CAAC,UAAU;QACpF,QAAQ,EAAE,QAAQ,CAAC,eAAe,CAAC,QAAQ;KAC5C,CAAC;AACJ,CAAC"}
|
package/dist/index.d.ts
CHANGED
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAC;AAC5B,cAAc,aAAa,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -14,6 +14,6 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
14
14
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
__exportStar(require("./
|
|
17
|
+
__exportStar(require("./OcpClient"), exports);
|
|
18
18
|
__exportStar(require("./functions"), exports);
|
|
19
19
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,8CAA4B;AAC5B,8CAA4B"}
|
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.12",
|
|
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",
|
|
@@ -18,8 +18,8 @@
|
|
|
18
18
|
"dependencies": {
|
|
19
19
|
"@daml/ledger": "^2.10.2",
|
|
20
20
|
"@daml/types": "^2.10.2",
|
|
21
|
-
"@fairmint/canton-node-sdk": "^0.0.
|
|
22
|
-
"@fairmint/open-captable-protocol-daml-js": "^0.0.
|
|
21
|
+
"@fairmint/canton-node-sdk": "^0.0.79",
|
|
22
|
+
"@fairmint/open-captable-protocol-daml-js": "^0.0.20"
|
|
23
23
|
},
|
|
24
24
|
"devDependencies": {
|
|
25
25
|
"@types/node": "^24.2.0",
|