@open-captable-protocol/canton 0.2.19 → 0.2.20
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 +8 -0
- package/dist/OcpClient.d.ts.map +1 -1
- package/dist/OcpClient.js +9 -1
- package/dist/OcpClient.js.map +1 -1
- package/dist/functions/convertibleIssuance/createConvertibleIssuance.d.ts +41 -0
- package/dist/functions/convertibleIssuance/createConvertibleIssuance.d.ts.map +1 -0
- package/dist/functions/convertibleIssuance/createConvertibleIssuance.js +119 -0
- package/dist/functions/convertibleIssuance/createConvertibleIssuance.js.map +1 -0
- package/dist/functions/convertibleIssuance/index.d.ts +1 -0
- package/dist/functions/convertibleIssuance/index.d.ts.map +1 -1
- package/dist/functions/convertibleIssuance/index.js +1 -0
- package/dist/functions/convertibleIssuance/index.js.map +1 -1
- package/dist/functions/issuerAuthorizedSharesAdjustment/createIssuerAuthorizedSharesAdjustment.d.ts +29 -0
- package/dist/functions/issuerAuthorizedSharesAdjustment/createIssuerAuthorizedSharesAdjustment.d.ts.map +1 -0
- package/dist/functions/issuerAuthorizedSharesAdjustment/createIssuerAuthorizedSharesAdjustment.js +49 -0
- package/dist/functions/issuerAuthorizedSharesAdjustment/createIssuerAuthorizedSharesAdjustment.js.map +1 -0
- package/dist/functions/issuerAuthorizedSharesAdjustment/index.d.ts +1 -0
- package/dist/functions/issuerAuthorizedSharesAdjustment/index.d.ts.map +1 -1
- package/dist/functions/issuerAuthorizedSharesAdjustment/index.js +1 -0
- package/dist/functions/issuerAuthorizedSharesAdjustment/index.js.map +1 -1
- package/dist/functions/stockCancellation/createStockCancellation.d.ts +29 -0
- package/dist/functions/stockCancellation/createStockCancellation.d.ts.map +1 -0
- package/dist/functions/stockCancellation/createStockCancellation.js +49 -0
- package/dist/functions/stockCancellation/createStockCancellation.js.map +1 -0
- package/dist/functions/stockCancellation/index.d.ts +1 -0
- package/dist/functions/stockCancellation/index.d.ts.map +1 -1
- package/dist/functions/stockCancellation/index.js +1 -0
- package/dist/functions/stockCancellation/index.js.map +1 -1
- package/dist/functions/stockClassAuthorizedSharesAdjustment/createStockClassAuthorizedSharesAdjustment.d.ts +29 -0
- package/dist/functions/stockClassAuthorizedSharesAdjustment/createStockClassAuthorizedSharesAdjustment.d.ts.map +1 -0
- package/dist/functions/stockClassAuthorizedSharesAdjustment/createStockClassAuthorizedSharesAdjustment.js +49 -0
- package/dist/functions/stockClassAuthorizedSharesAdjustment/createStockClassAuthorizedSharesAdjustment.js.map +1 -0
- package/dist/functions/stockClassAuthorizedSharesAdjustment/index.d.ts +1 -0
- package/dist/functions/stockClassAuthorizedSharesAdjustment/index.d.ts.map +1 -1
- package/dist/functions/stockClassAuthorizedSharesAdjustment/index.js +1 -0
- package/dist/functions/stockClassAuthorizedSharesAdjustment/index.js.map +1 -1
- package/dist/functions/stockPlan/createEquityCompensationExercise.d.ts +29 -0
- package/dist/functions/stockPlan/createEquityCompensationExercise.d.ts.map +1 -0
- package/dist/functions/stockPlan/createEquityCompensationExercise.js +49 -0
- package/dist/functions/stockPlan/createEquityCompensationExercise.js.map +1 -0
- package/dist/functions/stockPlan/createEquityCompensationIssuance.d.ts +30 -0
- package/dist/functions/stockPlan/createEquityCompensationIssuance.d.ts.map +1 -0
- package/dist/functions/stockPlan/createEquityCompensationIssuance.js +59 -0
- package/dist/functions/stockPlan/createEquityCompensationIssuance.js.map +1 -0
- package/dist/functions/stockPlan/index.d.ts +2 -0
- package/dist/functions/stockPlan/index.d.ts.map +1 -1
- package/dist/functions/stockPlan/index.js +2 -0
- package/dist/functions/stockPlan/index.js.map +1 -1
- package/dist/functions/stockPlanPoolAdjustment/createStockPlanPoolAdjustment.d.ts +29 -0
- package/dist/functions/stockPlanPoolAdjustment/createStockPlanPoolAdjustment.d.ts.map +1 -0
- package/dist/functions/stockPlanPoolAdjustment/createStockPlanPoolAdjustment.js +63 -0
- package/dist/functions/stockPlanPoolAdjustment/createStockPlanPoolAdjustment.js.map +1 -0
- package/dist/functions/stockPlanPoolAdjustment/index.d.ts +1 -0
- package/dist/functions/stockPlanPoolAdjustment/index.d.ts.map +1 -1
- package/dist/functions/stockPlanPoolAdjustment/index.js +1 -0
- package/dist/functions/stockPlanPoolAdjustment/index.js.map +1 -1
- package/dist/functions/warrantIssuance/createWarrantIssuance.d.ts +47 -0
- package/dist/functions/warrantIssuance/createWarrantIssuance.d.ts.map +1 -0
- package/dist/functions/warrantIssuance/createWarrantIssuance.js +116 -0
- package/dist/functions/warrantIssuance/createWarrantIssuance.js.map +1 -0
- package/dist/functions/warrantIssuance/index.d.ts +1 -0
- package/dist/functions/warrantIssuance/index.d.ts.map +1 -1
- package/dist/functions/warrantIssuance/index.js +1 -0
- package/dist/functions/warrantIssuance/index.js.map +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { LedgerJsonApiClient } from '@fairmint/canton-node-sdk';
|
|
2
|
+
import { ContractDetails } from '../../types/contractDetails';
|
|
3
|
+
import { Command, DisclosedContract } from '@fairmint/canton-node-sdk/build/src/clients/ledger-json-api/schemas/api/commands';
|
|
4
|
+
export interface CreateStockClassAuthorizedSharesAdjustmentParams {
|
|
5
|
+
issuerContractId: string;
|
|
6
|
+
featuredAppRightContractDetails: ContractDetails;
|
|
7
|
+
issuerParty: string;
|
|
8
|
+
adjustmentData: {
|
|
9
|
+
ocf_id: string;
|
|
10
|
+
date: string;
|
|
11
|
+
stock_class_id: string;
|
|
12
|
+
new_shares_authorized: string | number;
|
|
13
|
+
board_approval_date?: string;
|
|
14
|
+
stockholder_approval_date?: string;
|
|
15
|
+
comments?: string[];
|
|
16
|
+
};
|
|
17
|
+
}
|
|
18
|
+
export interface CreateStockClassAuthorizedSharesAdjustmentResult {
|
|
19
|
+
contractId: string;
|
|
20
|
+
updateId: string;
|
|
21
|
+
}
|
|
22
|
+
export declare function createStockClassAuthorizedSharesAdjustment(client: LedgerJsonApiClient, params: CreateStockClassAuthorizedSharesAdjustmentParams): Promise<CreateStockClassAuthorizedSharesAdjustmentResult>;
|
|
23
|
+
export declare function buildCreateStockClassAuthorizedSharesAdjustmentCommand(params: CreateStockClassAuthorizedSharesAdjustmentParams & {
|
|
24
|
+
systemOperator: string;
|
|
25
|
+
}): {
|
|
26
|
+
command: Command;
|
|
27
|
+
disclosedContracts: DisclosedContract[];
|
|
28
|
+
};
|
|
29
|
+
//# sourceMappingURL=createStockClassAuthorizedSharesAdjustment.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"createStockClassAuthorizedSharesAdjustment.d.ts","sourceRoot":"","sources":["../../../src/functions/stockClassAuthorizedSharesAdjustment/createStockClassAuthorizedSharesAdjustment.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,mBAAmB,EAAE,MAAM,2BAA2B,CAAC;AAEhE,OAAO,EAAE,eAAe,EAAE,MAAM,6BAA6B,CAAC;AAC9D,OAAO,EAAE,OAAO,EAAE,iBAAiB,EAAE,MAAM,kFAAkF,CAAC;AAG9H,MAAM,WAAW,gDAAgD;IAC/D,gBAAgB,EAAE,MAAM,CAAC;IACzB,+BAA+B,EAAE,eAAe,CAAC;IACjD,WAAW,EAAE,MAAM,CAAC;IACpB,cAAc,EAAE;QACd,MAAM,EAAE,MAAM,CAAC;QACf,IAAI,EAAE,MAAM,CAAC;QACb,cAAc,EAAE,MAAM,CAAC;QACvB,qBAAqB,EAAE,MAAM,GAAG,MAAM,CAAC;QACvC,mBAAmB,CAAC,EAAE,MAAM,CAAC;QAC7B,yBAAyB,CAAC,EAAE,MAAM,CAAC;QACnC,QAAQ,CAAC,EAAE,MAAM,EAAE,CAAC;KACrB,CAAC;CACH;AAED,MAAM,WAAW,gDAAgD;IAAG,UAAU,EAAE,MAAM,CAAC;IAAC,QAAQ,EAAE,MAAM,CAAA;CAAE;AAI1G,wBAAsB,0CAA0C,CAC9D,MAAM,EAAE,mBAAmB,EAC3B,MAAM,EAAE,gDAAgD,GACvD,OAAO,CAAC,gDAAgD,CAAC,CA8B3D;AAED,wBAAgB,sDAAsD,CAAC,MAAM,EAAE,gDAAgD,GAAG;IAAE,cAAc,EAAE,MAAM,CAAA;CAAE,GAAG;IAAE,OAAO,EAAE,OAAO,CAAC;IAAC,kBAAkB,EAAE,iBAAiB,EAAE,CAAA;CAAE,CAgB3N"}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.createStockClassAuthorizedSharesAdjustment = createStockClassAuthorizedSharesAdjustment;
|
|
4
|
+
exports.buildCreateStockClassAuthorizedSharesAdjustmentCommand = buildCreateStockClassAuthorizedSharesAdjustmentCommand;
|
|
5
|
+
const open_captable_protocol_daml_js_1 = require("@fairmint/open-captable-protocol-daml-js");
|
|
6
|
+
const typeConversions_1 = require("../../utils/typeConversions");
|
|
7
|
+
async function createStockClassAuthorizedSharesAdjustment(client, params) {
|
|
8
|
+
const issuerEvents = await client.getEventsByContractId({ contractId: params.issuerContractId });
|
|
9
|
+
const systemOperator = issuerEvents.created?.createdEvent?.createArgument?.context?.system_operator;
|
|
10
|
+
if (!systemOperator)
|
|
11
|
+
throw new Error('System operator not found on Issuer create argument');
|
|
12
|
+
const d = params.adjustmentData;
|
|
13
|
+
const adjustment_data = {
|
|
14
|
+
ocf_id: d.ocf_id,
|
|
15
|
+
date: (0, typeConversions_1.dateStringToDAMLTime)(d.date),
|
|
16
|
+
stock_class_id: d.stock_class_id,
|
|
17
|
+
new_shares_authorized: typeof d.new_shares_authorized === 'number' ? d.new_shares_authorized.toString() : d.new_shares_authorized,
|
|
18
|
+
board_approval_date: d.board_approval_date ? (0, typeConversions_1.dateStringToDAMLTime)(d.board_approval_date) : null,
|
|
19
|
+
stockholder_approval_date: d.stockholder_approval_date ? (0, typeConversions_1.dateStringToDAMLTime)(d.stockholder_approval_date) : null,
|
|
20
|
+
comments: d.comments || []
|
|
21
|
+
};
|
|
22
|
+
const createArguments = { context: { issuer: params.issuerParty, system_operator: systemOperator, featured_app_right: params.featuredAppRightContractDetails.contractId }, adjustment_data };
|
|
23
|
+
const response = await client.submitAndWaitForTransactionTree({
|
|
24
|
+
actAs: [params.issuerParty, systemOperator],
|
|
25
|
+
commands: [{ CreateCommand: { templateId: open_captable_protocol_daml_js_1.Fairmint.OpenCapTable.StockClassAuthorizedSharesAdjustment.StockClassAuthorizedSharesAdjustment.templateId, createArguments: createArguments } }],
|
|
26
|
+
disclosedContracts: [{ templateId: params.featuredAppRightContractDetails.templateId, contractId: params.featuredAppRightContractDetails.contractId, createdEventBlob: params.featuredAppRightContractDetails.createdEventBlob, synchronizerId: params.featuredAppRightContractDetails.synchronizerId }]
|
|
27
|
+
});
|
|
28
|
+
const created = Object.values(response.transactionTree.eventsById).find((e) => e.CreatedTreeEvent?.value?.templateId?.endsWith(':Fairmint.OpenCapTable.StockClassAuthorizedSharesAdjustment.StockClassAuthorizedSharesAdjustment'));
|
|
29
|
+
if (!created)
|
|
30
|
+
throw new Error('Expected StockClassAuthorizedSharesAdjustment CreatedTreeEvent not found');
|
|
31
|
+
return { contractId: created.CreatedTreeEvent.value.contractId, updateId: response.transactionTree.updateId };
|
|
32
|
+
}
|
|
33
|
+
function buildCreateStockClassAuthorizedSharesAdjustmentCommand(params) {
|
|
34
|
+
const d = params.adjustmentData;
|
|
35
|
+
const adjustment_data = {
|
|
36
|
+
ocf_id: d.ocf_id,
|
|
37
|
+
date: (0, typeConversions_1.dateStringToDAMLTime)(d.date),
|
|
38
|
+
stock_class_id: d.stock_class_id,
|
|
39
|
+
new_shares_authorized: typeof d.new_shares_authorized === 'number' ? d.new_shares_authorized.toString() : d.new_shares_authorized,
|
|
40
|
+
board_approval_date: d.board_approval_date ? (0, typeConversions_1.dateStringToDAMLTime)(d.board_approval_date) : null,
|
|
41
|
+
stockholder_approval_date: d.stockholder_approval_date ? (0, typeConversions_1.dateStringToDAMLTime)(d.stockholder_approval_date) : null,
|
|
42
|
+
comments: d.comments || []
|
|
43
|
+
};
|
|
44
|
+
const createArguments = { context: { issuer: params.issuerParty, system_operator: params.systemOperator, featured_app_right: params.featuredAppRightContractDetails.contractId }, adjustment_data };
|
|
45
|
+
const command = { CreateCommand: { templateId: open_captable_protocol_daml_js_1.Fairmint.OpenCapTable.StockClassAuthorizedSharesAdjustment.StockClassAuthorizedSharesAdjustment.templateId, createArguments: createArguments } };
|
|
46
|
+
const disclosedContracts = [{ templateId: params.featuredAppRightContractDetails.templateId, contractId: params.featuredAppRightContractDetails.contractId, createdEventBlob: params.featuredAppRightContractDetails.createdEventBlob, synchronizerId: params.featuredAppRightContractDetails.synchronizerId }];
|
|
47
|
+
return { command, disclosedContracts };
|
|
48
|
+
}
|
|
49
|
+
//# sourceMappingURL=createStockClassAuthorizedSharesAdjustment.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"createStockClassAuthorizedSharesAdjustment.js","sourceRoot":"","sources":["../../../src/functions/stockClassAuthorizedSharesAdjustment/createStockClassAuthorizedSharesAdjustment.ts"],"names":[],"mappings":";;AA0BA,gGAiCC;AAED,wHAgBC;AA7ED,6FAAoE;AAKpE,iEAAmE;AAqB5D,KAAK,UAAU,0CAA0C,CAC9D,MAA2B,EAC3B,MAAwD;IAExD,MAAM,YAAY,GAAG,MAAM,MAAM,CAAC,qBAAqB,CAAC,EAAE,UAAU,EAAE,MAAM,CAAC,gBAAgB,EAAE,CAAC,CAAC;IACjG,MAAM,cAAc,GAAI,YAAY,CAAC,OAAO,EAAE,YAAY,EAAE,cAAmD,EAAE,OAAO,EAAE,eAAe,CAAC;IAC1I,IAAI,CAAC,cAAc;QAAE,MAAM,IAAI,KAAK,CAAC,qDAAqD,CAAC,CAAC;IAE5F,MAAM,CAAC,GAAG,MAAM,CAAC,cAAc,CAAC;IAChC,MAAM,eAAe,GAA2G;QAC9H,MAAM,EAAE,CAAC,CAAC,MAAM;QAChB,IAAI,EAAE,IAAA,sCAAoB,EAAC,CAAC,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GAAG,EAAE,OAAO,EAAE,EAAE,MAAM,EAAE,MAAM,CAAC,WAAW,EAAE,eAAe,EAAE,MAAM,CAAC,cAAc,EAAE,kBAAkB,EAAE,MAAM,CAAC,+BAA+B,CAAC,UAAU,EAAE,EAAE,eAAe,EAAE,CAAC;IACpM,MAAM,OAAO,GAAY,EAAE,aAAa,EAAE,EAAE,UAAU,EAAE,yCAAQ,CAAC,YAAY,CAAC,oCAAoC,CAAC,oCAAoC,CAAC,UAAU,EAAE,eAAe,EAAE,eAAsB,EAAE,EAAE,CAAC;IAChN,MAAM,kBAAkB,GAAwB,CAAE,EAAE,UAAU,EAAE,MAAM,CAAC,+BAA+B,CAAC,UAAU,EAAE,UAAU,EAAE,MAAM,CAAC,+BAA+B,CAAC,UAAU,EAAE,gBAAgB,EAAE,MAAM,CAAC,+BAA+B,CAAC,gBAAgB,EAAE,cAAc,EAAE,MAAM,CAAC,+BAA+B,CAAC,cAAc,EAAE,CAAE,CAAC;IACvU,OAAO,EAAE,OAAO,EAAE,kBAAkB,EAAE,CAAC;AACzC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/functions/stockClassAuthorizedSharesAdjustment/index.ts"],"names":[],"mappings":"AAAA,cAAc,qDAAqD,CAAC;AACpE,cAAc,uDAAuD,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/functions/stockClassAuthorizedSharesAdjustment/index.ts"],"names":[],"mappings":"AAAA,cAAc,qDAAqD,CAAC;AACpE,cAAc,uDAAuD,CAAC;AACtE,cAAc,8CAA8C,CAAC"}
|
|
@@ -16,4 +16,5 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
17
|
__exportStar(require("./getStockClassAuthorizedSharesAdjustmentEventAsOcf"), exports);
|
|
18
18
|
__exportStar(require("./archiveStockClassAuthorizedSharesAdjustmentByIssuer"), exports);
|
|
19
|
+
__exportStar(require("./createStockClassAuthorizedSharesAdjustment"), exports);
|
|
19
20
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/functions/stockClassAuthorizedSharesAdjustment/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,sFAAoE;AACpE,wFAAsE"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/functions/stockClassAuthorizedSharesAdjustment/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,sFAAoE;AACpE,wFAAsE;AACtE,+EAA6D"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { LedgerJsonApiClient } from '@fairmint/canton-node-sdk';
|
|
2
|
+
import { ContractDetails } from '../../types/contractDetails';
|
|
3
|
+
import { Command, DisclosedContract } from '@fairmint/canton-node-sdk/build/src/clients/ledger-json-api/schemas/api/commands';
|
|
4
|
+
export interface CreateEquityCompensationExerciseParams {
|
|
5
|
+
issuerContractId: string;
|
|
6
|
+
featuredAppRightContractDetails: ContractDetails;
|
|
7
|
+
issuerParty: string;
|
|
8
|
+
exerciseData: {
|
|
9
|
+
ocf_id: string;
|
|
10
|
+
date: string;
|
|
11
|
+
security_id: string;
|
|
12
|
+
quantity: string | number;
|
|
13
|
+
consideration_text?: string;
|
|
14
|
+
resulting_security_ids: string[];
|
|
15
|
+
comments?: string[];
|
|
16
|
+
};
|
|
17
|
+
}
|
|
18
|
+
export interface CreateEquityCompensationExerciseResult {
|
|
19
|
+
contractId: string;
|
|
20
|
+
updateId: string;
|
|
21
|
+
}
|
|
22
|
+
export declare function createEquityCompensationExercise(client: LedgerJsonApiClient, params: CreateEquityCompensationExerciseParams): Promise<CreateEquityCompensationExerciseResult>;
|
|
23
|
+
export declare function buildCreateEquityCompensationExerciseCommand(params: CreateEquityCompensationExerciseParams & {
|
|
24
|
+
systemOperator: string;
|
|
25
|
+
}): {
|
|
26
|
+
command: Command;
|
|
27
|
+
disclosedContracts: DisclosedContract[];
|
|
28
|
+
};
|
|
29
|
+
//# sourceMappingURL=createEquityCompensationExercise.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"createEquityCompensationExercise.d.ts","sourceRoot":"","sources":["../../../src/functions/stockPlan/createEquityCompensationExercise.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,mBAAmB,EAAE,MAAM,2BAA2B,CAAC;AAEhE,OAAO,EAAE,eAAe,EAAE,MAAM,6BAA6B,CAAC;AAC9D,OAAO,EAAE,OAAO,EAAE,iBAAiB,EAAE,MAAM,kFAAkF,CAAC;AAG9H,MAAM,WAAW,sCAAsC;IACrD,gBAAgB,EAAE,MAAM,CAAC;IACzB,+BAA+B,EAAE,eAAe,CAAC;IACjD,WAAW,EAAE,MAAM,CAAC;IACpB,YAAY,EAAE;QACZ,MAAM,EAAE,MAAM,CAAC;QACf,IAAI,EAAE,MAAM,CAAC;QACb,WAAW,EAAE,MAAM,CAAC;QACpB,QAAQ,EAAE,MAAM,GAAG,MAAM,CAAC;QAC1B,kBAAkB,CAAC,EAAE,MAAM,CAAC;QAC5B,sBAAsB,EAAE,MAAM,EAAE,CAAC;QACjC,QAAQ,CAAC,EAAE,MAAM,EAAE,CAAC;KACrB,CAAC;CACH;AAED,MAAM,WAAW,sCAAsC;IAAG,UAAU,EAAE,MAAM,CAAC;IAAC,QAAQ,EAAE,MAAM,CAAA;CAAE;AAIhG,wBAAsB,gCAAgC,CACpD,MAAM,EAAE,mBAAmB,EAC3B,MAAM,EAAE,sCAAsC,GAC7C,OAAO,CAAC,sCAAsC,CAAC,CA8BjD;AAED,wBAAgB,4CAA4C,CAAC,MAAM,EAAE,sCAAsC,GAAG;IAAE,cAAc,EAAE,MAAM,CAAA;CAAE,GAAG;IAAE,OAAO,EAAE,OAAO,CAAC;IAAC,kBAAkB,EAAE,iBAAiB,EAAE,CAAA;CAAE,CAgBvM"}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.createEquityCompensationExercise = createEquityCompensationExercise;
|
|
4
|
+
exports.buildCreateEquityCompensationExerciseCommand = buildCreateEquityCompensationExerciseCommand;
|
|
5
|
+
const open_captable_protocol_daml_js_1 = require("@fairmint/open-captable-protocol-daml-js");
|
|
6
|
+
const typeConversions_1 = require("../../utils/typeConversions");
|
|
7
|
+
async function createEquityCompensationExercise(client, params) {
|
|
8
|
+
const issuerEvents = await client.getEventsByContractId({ contractId: params.issuerContractId });
|
|
9
|
+
const systemOperator = issuerEvents.created?.createdEvent?.createArgument?.context?.system_operator;
|
|
10
|
+
if (!systemOperator)
|
|
11
|
+
throw new Error('System operator not found on Issuer create argument');
|
|
12
|
+
const d = params.exerciseData;
|
|
13
|
+
const exercise_data = {
|
|
14
|
+
ocf_id: d.ocf_id,
|
|
15
|
+
date: (0, typeConversions_1.dateStringToDAMLTime)(d.date),
|
|
16
|
+
security_id: d.security_id,
|
|
17
|
+
quantity: typeof d.quantity === 'number' ? d.quantity.toString() : d.quantity,
|
|
18
|
+
consideration_text: d.consideration_text ?? null,
|
|
19
|
+
resulting_security_ids: d.resulting_security_ids,
|
|
20
|
+
comments: d.comments || []
|
|
21
|
+
};
|
|
22
|
+
const createArguments = { context: { issuer: params.issuerParty, system_operator: systemOperator, featured_app_right: params.featuredAppRightContractDetails.contractId }, exercise_data };
|
|
23
|
+
const response = await client.submitAndWaitForTransactionTree({
|
|
24
|
+
actAs: [params.issuerParty, systemOperator],
|
|
25
|
+
commands: [{ CreateCommand: { templateId: open_captable_protocol_daml_js_1.Fairmint.OpenCapTable.EquityCompensationExercise.EquityCompensationExercise.templateId, createArguments: createArguments } }],
|
|
26
|
+
disclosedContracts: [{ templateId: params.featuredAppRightContractDetails.templateId, contractId: params.featuredAppRightContractDetails.contractId, createdEventBlob: params.featuredAppRightContractDetails.createdEventBlob, synchronizerId: params.featuredAppRightContractDetails.synchronizerId }]
|
|
27
|
+
});
|
|
28
|
+
const created = Object.values(response.transactionTree.eventsById).find((e) => e.CreatedTreeEvent?.value?.templateId?.endsWith(':Fairmint.OpenCapTable.EquityCompensationExercise.EquityCompensationExercise'));
|
|
29
|
+
if (!created)
|
|
30
|
+
throw new Error('Expected EquityCompensationExercise CreatedTreeEvent not found');
|
|
31
|
+
return { contractId: created.CreatedTreeEvent.value.contractId, updateId: response.transactionTree.updateId };
|
|
32
|
+
}
|
|
33
|
+
function buildCreateEquityCompensationExerciseCommand(params) {
|
|
34
|
+
const d = params.exerciseData;
|
|
35
|
+
const exercise_data = {
|
|
36
|
+
ocf_id: d.ocf_id,
|
|
37
|
+
date: (0, typeConversions_1.dateStringToDAMLTime)(d.date),
|
|
38
|
+
security_id: d.security_id,
|
|
39
|
+
quantity: typeof d.quantity === 'number' ? d.quantity.toString() : d.quantity,
|
|
40
|
+
consideration_text: d.consideration_text ?? null,
|
|
41
|
+
resulting_security_ids: d.resulting_security_ids,
|
|
42
|
+
comments: d.comments || []
|
|
43
|
+
};
|
|
44
|
+
const createArguments = { context: { issuer: params.issuerParty, system_operator: params.systemOperator, featured_app_right: params.featuredAppRightContractDetails.contractId }, exercise_data };
|
|
45
|
+
const command = { CreateCommand: { templateId: open_captable_protocol_daml_js_1.Fairmint.OpenCapTable.EquityCompensationExercise.EquityCompensationExercise.templateId, createArguments: createArguments } };
|
|
46
|
+
const disclosedContracts = [{ templateId: params.featuredAppRightContractDetails.templateId, contractId: params.featuredAppRightContractDetails.contractId, createdEventBlob: params.featuredAppRightContractDetails.createdEventBlob, synchronizerId: params.featuredAppRightContractDetails.synchronizerId }];
|
|
47
|
+
return { command, disclosedContracts };
|
|
48
|
+
}
|
|
49
|
+
//# sourceMappingURL=createEquityCompensationExercise.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"createEquityCompensationExercise.js","sourceRoot":"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QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,QAAQ,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,QAAQ;QAC7E,kBAAkB,EAAE,CAAC,CAAC,kBAAkB,IAAI,IAAI;QAChD,sBAAsB,EAAE,CAAC,CAAC,sBAAsB;QAChD,QAAQ,EAAE,CAAC,CAAC,QAAQ,IAAI,EAAE;KACpB,CAAC;IAET,MAAM,eAAe,GAAG,EAAE,OAAO,EAAE,EAAE,MAAM,EAAE,MAAM,CAAC,WAAW,EAAE,eAAe,EAAE,MAAM,CAAC,cAAc,EAAE,kBAAkB,EAAE,MAAM,CAAC,+BAA+B,CAAC,UAAU,EAAE,EAAE,aAAa,EAAE,CAAC;IAClM,MAAM,OAAO,GAAY,EAAE,aAAa,EAAE,EAAE,UAAU,EAAE,yCAAQ,CAAC,YAAY,CAAC,0BAA0B,CAAC,0BAA0B,CAAC,UAAU,EAAE,eAAe,EAAE,eAAsB,EAAE,EAAE,CAAC;IAC5L,MAAM,kBAAkB,GAAwB,CAAE,EAAE,UAAU,EAAE,MAAM,CAAC,+BAA+B,CAAC,UAAU,EAAE,UAAU,EAAE,MAAM,CAAC,+BAA+B,CAAC,UAAU,EAAE,gBAAgB,EAAE,MAAM,CAAC,+BAA+B,CAAC,gBAAgB,EAAE,cAAc,EAAE,MAAM,CAAC,+BAA+B,CAAC,cAAc,EAAE,CAAE,CAAC;IACvU,OAAO,EAAE,OAAO,EAAE,kBAAkB,EAAE,CAAC;AACzC,CAAC"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { LedgerJsonApiClient } from '@fairmint/canton-node-sdk';
|
|
2
|
+
import { ContractDetails } from '../../types/contractDetails';
|
|
3
|
+
import { Command, DisclosedContract } from '@fairmint/canton-node-sdk/build/src/clients/ledger-json-api/schemas/api/commands';
|
|
4
|
+
import { OcfEquityCompensationIssuanceData } from '../../types/native';
|
|
5
|
+
export interface CreateEquityCompensationIssuanceParams {
|
|
6
|
+
issuerContractId: string;
|
|
7
|
+
featuredAppRightContractDetails: ContractDetails;
|
|
8
|
+
issuerParty: string;
|
|
9
|
+
issuanceData: OcfEquityCompensationIssuanceData & {
|
|
10
|
+
ocf_id: string;
|
|
11
|
+
date: string;
|
|
12
|
+
security_id: string;
|
|
13
|
+
custom_id: string;
|
|
14
|
+
stakeholder_id: string;
|
|
15
|
+
stock_plan_id?: string;
|
|
16
|
+
stock_class_id?: string;
|
|
17
|
+
};
|
|
18
|
+
}
|
|
19
|
+
export interface CreateEquityCompensationIssuanceResult {
|
|
20
|
+
contractId: string;
|
|
21
|
+
updateId: string;
|
|
22
|
+
}
|
|
23
|
+
export declare function createEquityCompensationIssuance(client: LedgerJsonApiClient, params: CreateEquityCompensationIssuanceParams): Promise<CreateEquityCompensationIssuanceResult>;
|
|
24
|
+
export declare function buildCreateEquityCompensationIssuanceCommand(params: CreateEquityCompensationIssuanceParams & {
|
|
25
|
+
systemOperator: string;
|
|
26
|
+
}): {
|
|
27
|
+
command: Command;
|
|
28
|
+
disclosedContracts: DisclosedContract[];
|
|
29
|
+
};
|
|
30
|
+
//# sourceMappingURL=createEquityCompensationIssuance.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"createEquityCompensationIssuance.d.ts","sourceRoot":"","sources":["../../../src/functions/stockPlan/createEquityCompensationIssuance.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,mBAAmB,EAAE,MAAM,2BAA2B,CAAC;AAEhE,OAAO,EAAE,eAAe,EAAE,MAAM,6BAA6B,CAAC;AAC9D,OAAO,EAAE,OAAO,EAAE,iBAAiB,EAAE,MAAM,kFAAkF,CAAC;AAC9H,OAAO,EAAE,iCAAiC,EAAE,MAAM,oBAAoB,CAAC;AAGvE,MAAM,WAAW,sCAAsC;IACrD,gBAAgB,EAAE,MAAM,CAAC;IACzB,+BAA+B,EAAE,eAAe,CAAC;IACjD,WAAW,EAAE,MAAM,CAAC;IACpB,YAAY,EAAE,iCAAiC,GAAG;QAChD,MAAM,EAAE,MAAM,CAAC;QACf,IAAI,EAAE,MAAM,CAAC;QACb,WAAW,EAAE,MAAM,CAAC;QACpB,SAAS,EAAE,MAAM,CAAC;QAClB,cAAc,EAAE,MAAM,CAAC;QACvB,aAAa,CAAC,EAAE,MAAM,CAAC;QACvB,cAAc,CAAC,EAAE,MAAM,CAAC;KACzB,CAAC;CACH;AAED,MAAM,WAAW,sCAAsC;IAAG,UAAU,EAAE,MAAM,CAAC;IAAC,QAAQ,EAAE,MAAM,CAAA;CAAE;AAIhG,wBAAsB,gCAAgC,CACpD,MAAM,EAAE,mBAAmB,EAC3B,MAAM,EAAE,sCAAsC,GAC7C,OAAO,CAAC,sCAAsC,CAAC,CAmCjD;AAED,wBAAgB,4CAA4C,CAAC,MAAM,EAAE,sCAAsC,GAAG;IAAE,cAAc,EAAE,MAAM,CAAA;CAAE,GAAG;IAAE,OAAO,EAAE,OAAO,CAAC;IAAC,kBAAkB,EAAE,iBAAiB,EAAE,CAAA;CAAE,CAqBvM"}
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.createEquityCompensationIssuance = createEquityCompensationIssuance;
|
|
4
|
+
exports.buildCreateEquityCompensationIssuanceCommand = buildCreateEquityCompensationIssuanceCommand;
|
|
5
|
+
const open_captable_protocol_daml_js_1 = require("@fairmint/open-captable-protocol-daml-js");
|
|
6
|
+
const typeConversions_1 = require("../../utils/typeConversions");
|
|
7
|
+
async function createEquityCompensationIssuance(client, params) {
|
|
8
|
+
const issuerEvents = await client.getEventsByContractId({ contractId: params.issuerContractId });
|
|
9
|
+
const systemOperator = issuerEvents.created?.createdEvent?.createArgument?.context?.system_operator;
|
|
10
|
+
if (!systemOperator)
|
|
11
|
+
throw new Error('System operator not found on Issuer create argument');
|
|
12
|
+
const d = params.issuanceData;
|
|
13
|
+
const issuance_data = {
|
|
14
|
+
ocf_id: d.ocf_id,
|
|
15
|
+
date: (0, typeConversions_1.dateStringToDAMLTime)(d.date),
|
|
16
|
+
security_id: d.security_id,
|
|
17
|
+
custom_id: d.custom_id,
|
|
18
|
+
stakeholder_id: d.stakeholder_id,
|
|
19
|
+
board_approval_date: null,
|
|
20
|
+
stockholder_approval_date: null,
|
|
21
|
+
consideration_text: null,
|
|
22
|
+
security_law_exemptions: [],
|
|
23
|
+
stock_plan_id: d.stock_plan_id ?? null,
|
|
24
|
+
stock_class_id: d.stock_class_id ?? null,
|
|
25
|
+
...(0, typeConversions_1.equityCompIssuanceDataToDaml)(d)
|
|
26
|
+
};
|
|
27
|
+
const createArguments = { context: { issuer: params.issuerParty, system_operator: systemOperator, featured_app_right: params.featuredAppRightContractDetails.contractId }, issuance_data };
|
|
28
|
+
const response = await client.submitAndWaitForTransactionTree({
|
|
29
|
+
actAs: [params.issuerParty, systemOperator],
|
|
30
|
+
commands: [{ CreateCommand: { templateId: open_captable_protocol_daml_js_1.Fairmint.OpenCapTable.EquityCompensationIssuance.EquityCompensationIssuance.templateId, createArguments: createArguments } }],
|
|
31
|
+
disclosedContracts: [{ templateId: params.featuredAppRightContractDetails.templateId, contractId: params.featuredAppRightContractDetails.contractId, createdEventBlob: params.featuredAppRightContractDetails.createdEventBlob, synchronizerId: params.featuredAppRightContractDetails.synchronizerId }]
|
|
32
|
+
});
|
|
33
|
+
const created = Object.values(response.transactionTree.eventsById).find((e) => e.CreatedTreeEvent?.value?.templateId?.endsWith(':Fairmint.OpenCapTable.EquityCompensationIssuance.EquityCompensationIssuance'));
|
|
34
|
+
if (!created)
|
|
35
|
+
throw new Error('Expected EquityCompensationIssuance CreatedTreeEvent not found');
|
|
36
|
+
return { contractId: created.CreatedTreeEvent.value.contractId, updateId: response.transactionTree.updateId };
|
|
37
|
+
}
|
|
38
|
+
function buildCreateEquityCompensationIssuanceCommand(params) {
|
|
39
|
+
const d = params.issuanceData;
|
|
40
|
+
const issuance_data = {
|
|
41
|
+
ocf_id: d.ocf_id,
|
|
42
|
+
date: (0, typeConversions_1.dateStringToDAMLTime)(d.date),
|
|
43
|
+
security_id: d.security_id,
|
|
44
|
+
custom_id: d.custom_id,
|
|
45
|
+
stakeholder_id: d.stakeholder_id,
|
|
46
|
+
board_approval_date: null,
|
|
47
|
+
stockholder_approval_date: null,
|
|
48
|
+
consideration_text: null,
|
|
49
|
+
security_law_exemptions: [],
|
|
50
|
+
stock_plan_id: d.stock_plan_id ?? null,
|
|
51
|
+
stock_class_id: d.stock_class_id ?? null,
|
|
52
|
+
...(0, typeConversions_1.equityCompIssuanceDataToDaml)(d)
|
|
53
|
+
};
|
|
54
|
+
const createArguments = { context: { issuer: params.issuerParty, system_operator: params.systemOperator, featured_app_right: params.featuredAppRightContractDetails.contractId }, issuance_data };
|
|
55
|
+
const command = { CreateCommand: { templateId: open_captable_protocol_daml_js_1.Fairmint.OpenCapTable.EquityCompensationIssuance.EquityCompensationIssuance.templateId, createArguments: createArguments } };
|
|
56
|
+
const disclosedContracts = [{ templateId: params.featuredAppRightContractDetails.templateId, contractId: params.featuredAppRightContractDetails.contractId, createdEventBlob: params.featuredAppRightContractDetails.createdEventBlob, synchronizerId: params.featuredAppRightContractDetails.synchronizerId }];
|
|
57
|
+
return { command, disclosedContracts };
|
|
58
|
+
}
|
|
59
|
+
//# sourceMappingURL=createEquityCompensationIssuance.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"createEquityCompensationIssuance.js","sourceRoot":"","sources":["../../../src/functions/stockPlan/createEquityCompensationIssuance.ts"],"names":[],"mappings":";;AA2BA,4EAsCC;AAED,oGAqBC;AAxFD,6FAAoE;AAMpE,iEAAiG;AAqB1F,KAAK,UAAU,gCAAgC,CACpD,MAA2B,EAC3B,MAA8C;IAE9C,MAAM,YAAY,GAAG,MAAM,MAAM,CAAC,qBAAqB,CAAC,EAAE,UAAU,EAAE,MAAM,CAAC,gBAAgB,EAAE,CAAC,CAAC;IACjG,MAAM,cAAc,GAAI,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IAET,MAAM,eAAe,GAAG,EAAE,OAAO,EAAE,EAAE,MAAM,EAAE,MAAM,CAAC,WAAW,EAAE,eAAe,EAAE,MAAM,CAAC,cAAc,EAAE,kBAAkB,EAAE,MAAM,CAAC,+BAA+B,CAAC,UAAU,EAAE,EAAE,aAAa,EAAE,CAAC;IAClM,MAAM,OAAO,GAAY,EAAE,aAAa,EAAE,EAAE,UAAU,EAAE,yCAAQ,CAAC,YAAY,CAAC,0BAA0B,CAAC,0BAA0B,CAAC,UAAU,EAAE,eAAe,EAAE,eAAsB,EAAE,EAAE,CAAC;IAC5L,MAAM,kBAAkB,GAAwB,CAAE,EAAE,UAAU,EAAE,MAAM,CAAC,+BAA+B,CAAC,UAAU,EAAE,UAAU,EAAE,MAAM,CAAC,+BAA+B,CAAC,UAAU,EAAE,gBAAgB,EAAE,MAAM,CAAC,+BAA+B,CAAC,gBAAgB,EAAE,cAAc,EAAE,MAAM,CAAC,+BAA+B,CAAC,cAAc,EAAE,CAAE,CAAC;IACvU,OAAO,EAAE,OAAO,EAAE,kBAAkB,EAAE,CAAC;AACzC,CAAC"}
|
|
@@ -3,4 +3,6 @@ export * from './getStockPlanAsOcf';
|
|
|
3
3
|
export * from './getEquityCompensationExerciseEventAsOcf';
|
|
4
4
|
export * from './archiveStockPlanByIssuer';
|
|
5
5
|
export * from './getEquityCompensationIssuanceEventAsOcf';
|
|
6
|
+
export * from './createEquityCompensationIssuance';
|
|
7
|
+
export * from './createEquityCompensationExercise';
|
|
6
8
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/functions/stockPlan/index.ts"],"names":[],"mappings":"AAAA,cAAc,mBAAmB,CAAC;AAClC,cAAc,qBAAqB,CAAC;AACpC,cAAc,2CAA2C,CAAC;AAC1D,cAAc,4BAA4B,CAAC;AAC3C,cAAc,2CAA2C,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/functions/stockPlan/index.ts"],"names":[],"mappings":"AAAA,cAAc,mBAAmB,CAAC;AAClC,cAAc,qBAAqB,CAAC;AACpC,cAAc,2CAA2C,CAAC;AAC1D,cAAc,4BAA4B,CAAC;AAC3C,cAAc,2CAA2C,CAAC;AAC1D,cAAc,oCAAoC,CAAC;AACnD,cAAc,oCAAoC,CAAC"}
|
|
@@ -19,4 +19,6 @@ __exportStar(require("./getStockPlanAsOcf"), exports);
|
|
|
19
19
|
__exportStar(require("./getEquityCompensationExerciseEventAsOcf"), exports);
|
|
20
20
|
__exportStar(require("./archiveStockPlanByIssuer"), exports);
|
|
21
21
|
__exportStar(require("./getEquityCompensationIssuanceEventAsOcf"), exports);
|
|
22
|
+
__exportStar(require("./createEquityCompensationIssuance"), exports);
|
|
23
|
+
__exportStar(require("./createEquityCompensationExercise"), exports);
|
|
22
24
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/functions/stockPlan/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,oDAAkC;AAClC,sDAAoC;AACpC,4EAA0D;AAC1D,6DAA2C;AAC3C,4EAA0D"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/functions/stockPlan/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,oDAAkC;AAClC,sDAAoC;AACpC,4EAA0D;AAC1D,6DAA2C;AAC3C,4EAA0D;AAC1D,qEAAmD;AACnD,qEAAmD"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { LedgerJsonApiClient } from '@fairmint/canton-node-sdk';
|
|
2
|
+
import { ContractDetails } from '../../types/contractDetails';
|
|
3
|
+
import { Command, DisclosedContract } from '@fairmint/canton-node-sdk/build/src/clients/ledger-json-api/schemas/api/commands';
|
|
4
|
+
export interface CreateStockPlanPoolAdjustmentParams {
|
|
5
|
+
issuerContractId: string;
|
|
6
|
+
featuredAppRightContractDetails: ContractDetails;
|
|
7
|
+
issuerParty: string;
|
|
8
|
+
adjustmentData: {
|
|
9
|
+
ocf_id: string;
|
|
10
|
+
date: string;
|
|
11
|
+
stock_plan_id: string;
|
|
12
|
+
board_approval_date?: string;
|
|
13
|
+
stockholder_approval_date?: string;
|
|
14
|
+
shares_reserved: string | number;
|
|
15
|
+
comments?: string[];
|
|
16
|
+
};
|
|
17
|
+
}
|
|
18
|
+
export interface CreateStockPlanPoolAdjustmentResult {
|
|
19
|
+
contractId: string;
|
|
20
|
+
updateId: string;
|
|
21
|
+
}
|
|
22
|
+
export declare function createStockPlanPoolAdjustment(client: LedgerJsonApiClient, params: CreateStockPlanPoolAdjustmentParams): Promise<CreateStockPlanPoolAdjustmentResult>;
|
|
23
|
+
export declare function buildCreateStockPlanPoolAdjustmentCommand(params: CreateStockPlanPoolAdjustmentParams & {
|
|
24
|
+
systemOperator: string;
|
|
25
|
+
}): {
|
|
26
|
+
command: Command;
|
|
27
|
+
disclosedContracts: DisclosedContract[];
|
|
28
|
+
};
|
|
29
|
+
//# sourceMappingURL=createStockPlanPoolAdjustment.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"createStockPlanPoolAdjustment.d.ts","sourceRoot":"","sources":["../../../src/functions/stockPlanPoolAdjustment/createStockPlanPoolAdjustment.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,mBAAmB,EAAE,MAAM,2BAA2B,CAAC;AAEhE,OAAO,EAAE,eAAe,EAAE,MAAM,6BAA6B,CAAC;AAC9D,OAAO,EAAE,OAAO,EAAE,iBAAiB,EAAE,MAAM,kFAAkF,CAAC;AAG9H,MAAM,WAAW,mCAAmC;IAClD,gBAAgB,EAAE,MAAM,CAAC;IACzB,+BAA+B,EAAE,eAAe,CAAC;IACjD,WAAW,EAAE,MAAM,CAAC;IACpB,cAAc,EAAE;QACd,MAAM,EAAE,MAAM,CAAC;QACf,IAAI,EAAE,MAAM,CAAC;QACb,aAAa,EAAE,MAAM,CAAC;QACtB,mBAAmB,CAAC,EAAE,MAAM,CAAC;QAC7B,yBAAyB,CAAC,EAAE,MAAM,CAAC;QACnC,eAAe,EAAE,MAAM,GAAG,MAAM,CAAC;QACjC,QAAQ,CAAC,EAAE,MAAM,EAAE,CAAC;KACrB,CAAC;CACH;AAED,MAAM,WAAW,mCAAmC;IAAG,UAAU,EAAE,MAAM,CAAC;IAAC,QAAQ,EAAE,MAAM,CAAA;CAAE;AAI7F,wBAAsB,6BAA6B,CACjD,MAAM,EAAE,mBAAmB,EAC3B,MAAM,EAAE,mCAAmC,GAC1C,OAAO,CAAC,mCAAmC,CAAC,CAyC9C;AAED,wBAAgB,yCAAyC,CAAC,MAAM,EAAE,mCAAmC,GAAG;IAAE,cAAc,EAAE,MAAM,CAAA;CAAE,GAAG;IAAE,OAAO,EAAE,OAAO,CAAC;IAAC,kBAAkB,EAAE,iBAAiB,EAAE,CAAA;CAAE,CAoBjM"}
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.createStockPlanPoolAdjustment = createStockPlanPoolAdjustment;
|
|
4
|
+
exports.buildCreateStockPlanPoolAdjustmentCommand = buildCreateStockPlanPoolAdjustmentCommand;
|
|
5
|
+
const open_captable_protocol_daml_js_1 = require("@fairmint/open-captable-protocol-daml-js");
|
|
6
|
+
const typeConversions_1 = require("../../utils/typeConversions");
|
|
7
|
+
async function createStockPlanPoolAdjustment(client, params) {
|
|
8
|
+
const issuerEvents = await client.getEventsByContractId({ contractId: params.issuerContractId });
|
|
9
|
+
const systemOperator = issuerEvents.created?.createdEvent?.createArgument?.context?.system_operator;
|
|
10
|
+
if (!systemOperator)
|
|
11
|
+
throw new Error('System operator not found on Issuer create argument');
|
|
12
|
+
const d = params.adjustmentData;
|
|
13
|
+
const adjustment_data = {
|
|
14
|
+
ocf_id: d.ocf_id,
|
|
15
|
+
date: (0, typeConversions_1.dateStringToDAMLTime)(d.date),
|
|
16
|
+
stock_plan_id: d.stock_plan_id,
|
|
17
|
+
board_approval_date: d.board_approval_date ? (0, typeConversions_1.dateStringToDAMLTime)(d.board_approval_date) : null,
|
|
18
|
+
stockholder_approval_date: d.stockholder_approval_date ? (0, typeConversions_1.dateStringToDAMLTime)(d.stockholder_approval_date) : null,
|
|
19
|
+
shares_reserved: typeof d.shares_reserved === 'number' ? d.shares_reserved.toString() : d.shares_reserved,
|
|
20
|
+
comments: d.comments || []
|
|
21
|
+
};
|
|
22
|
+
const createArguments = {
|
|
23
|
+
context: {
|
|
24
|
+
issuer: params.issuerParty,
|
|
25
|
+
system_operator: systemOperator,
|
|
26
|
+
featured_app_right: params.featuredAppRightContractDetails.contractId
|
|
27
|
+
},
|
|
28
|
+
adjustment_data
|
|
29
|
+
};
|
|
30
|
+
const response = await client.submitAndWaitForTransactionTree({
|
|
31
|
+
actAs: [params.issuerParty, systemOperator],
|
|
32
|
+
commands: [
|
|
33
|
+
{ CreateCommand: { templateId: open_captable_protocol_daml_js_1.Fairmint.OpenCapTable.StockPlanPoolAdjustment.StockPlanPoolAdjustment.templateId, createArguments: createArguments } }
|
|
34
|
+
],
|
|
35
|
+
disclosedContracts: [
|
|
36
|
+
{ templateId: params.featuredAppRightContractDetails.templateId, contractId: params.featuredAppRightContractDetails.contractId, createdEventBlob: params.featuredAppRightContractDetails.createdEventBlob, synchronizerId: params.featuredAppRightContractDetails.synchronizerId }
|
|
37
|
+
]
|
|
38
|
+
});
|
|
39
|
+
const created = Object.values(response.transactionTree.eventsById).find((e) => e.CreatedTreeEvent?.value?.templateId?.endsWith(':Fairmint.OpenCapTable.StockPlanPoolAdjustment.StockPlanPoolAdjustment'));
|
|
40
|
+
if (!created)
|
|
41
|
+
throw new Error('Expected StockPlanPoolAdjustment CreatedTreeEvent not found');
|
|
42
|
+
return { contractId: created.CreatedTreeEvent.value.contractId, updateId: response.transactionTree.updateId };
|
|
43
|
+
}
|
|
44
|
+
function buildCreateStockPlanPoolAdjustmentCommand(params) {
|
|
45
|
+
const d = params.adjustmentData;
|
|
46
|
+
const adjustment_data = {
|
|
47
|
+
ocf_id: d.ocf_id,
|
|
48
|
+
date: (0, typeConversions_1.dateStringToDAMLTime)(d.date),
|
|
49
|
+
stock_plan_id: d.stock_plan_id,
|
|
50
|
+
board_approval_date: d.board_approval_date ? (0, typeConversions_1.dateStringToDAMLTime)(d.board_approval_date) : null,
|
|
51
|
+
stockholder_approval_date: d.stockholder_approval_date ? (0, typeConversions_1.dateStringToDAMLTime)(d.stockholder_approval_date) : null,
|
|
52
|
+
shares_reserved: typeof d.shares_reserved === 'number' ? d.shares_reserved.toString() : d.shares_reserved,
|
|
53
|
+
comments: d.comments || []
|
|
54
|
+
};
|
|
55
|
+
const createArguments = {
|
|
56
|
+
context: { issuer: params.issuerParty, system_operator: params.systemOperator, featured_app_right: params.featuredAppRightContractDetails.contractId },
|
|
57
|
+
adjustment_data
|
|
58
|
+
};
|
|
59
|
+
const command = { CreateCommand: { templateId: open_captable_protocol_daml_js_1.Fairmint.OpenCapTable.StockPlanPoolAdjustment.StockPlanPoolAdjustment.templateId, createArguments: createArguments } };
|
|
60
|
+
const disclosedContracts = [{ templateId: params.featuredAppRightContractDetails.templateId, contractId: params.featuredAppRightContractDetails.contractId, createdEventBlob: params.featuredAppRightContractDetails.createdEventBlob, synchronizerId: params.featuredAppRightContractDetails.synchronizerId }];
|
|
61
|
+
return { command, disclosedContracts };
|
|
62
|
+
}
|
|
63
|
+
//# sourceMappingURL=createStockPlanPoolAdjustment.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"createStockPlanPoolAdjustment.js","sourceRoot":"","sources":["../../../src/functions/stockPlanPoolAdjustment/createStockPlanPoolAdjustment.ts"],"names":[],"mappings":";;AA0BA,sEA4CC;AAED,8FAoBC;AA5FD,6FAAoE;AAKpE,iEAAmE;AAqB5D,KAAK,UAAU,6BAA6B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"AAAA,cAAc,wCAAwC,CAAC;AACvD,cAAc,0CAA0C,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/functions/stockPlanPoolAdjustment/index.ts"],"names":[],"mappings":"AAAA,cAAc,wCAAwC,CAAC;AACvD,cAAc,0CAA0C,CAAC;AACzD,cAAc,iCAAiC,CAAC"}
|
|
@@ -16,4 +16,5 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
17
|
__exportStar(require("./getStockPlanPoolAdjustmentEventAsOcf"), exports);
|
|
18
18
|
__exportStar(require("./archiveStockPlanPoolAdjustmentByIssuer"), exports);
|
|
19
|
+
__exportStar(require("./createStockPlanPoolAdjustment"), exports);
|
|
19
20
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/functions/stockPlanPoolAdjustment/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,yEAAuD;AACvD,2EAAyD"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/functions/stockPlanPoolAdjustment/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,yEAAuD;AACvD,2EAAyD;AACzD,kEAAgD"}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { LedgerJsonApiClient } from '@fairmint/canton-node-sdk';
|
|
2
|
+
import { ContractDetails } from '../../types/contractDetails';
|
|
3
|
+
import { Command, DisclosedContract } from '@fairmint/canton-node-sdk/build/src/clients/ledger-json-api/schemas/api/commands';
|
|
4
|
+
import { Monetary } from '../../types/native';
|
|
5
|
+
export interface SimpleVesting {
|
|
6
|
+
date: string;
|
|
7
|
+
amount: string | number;
|
|
8
|
+
}
|
|
9
|
+
export interface CreateWarrantIssuanceParams {
|
|
10
|
+
issuerContractId: string;
|
|
11
|
+
featuredAppRightContractDetails: ContractDetails;
|
|
12
|
+
issuerParty: string;
|
|
13
|
+
issuanceData: {
|
|
14
|
+
ocf_id: string;
|
|
15
|
+
date: string;
|
|
16
|
+
security_id: string;
|
|
17
|
+
custom_id: string;
|
|
18
|
+
stakeholder_id: string;
|
|
19
|
+
board_approval_date?: string;
|
|
20
|
+
stockholder_approval_date?: string;
|
|
21
|
+
consideration_text?: string;
|
|
22
|
+
security_law_exemptions: Array<{
|
|
23
|
+
description: string;
|
|
24
|
+
jurisdiction: string;
|
|
25
|
+
}>;
|
|
26
|
+
quantity: string | number;
|
|
27
|
+
exercise_price: Monetary;
|
|
28
|
+
purchase_price: Monetary;
|
|
29
|
+
exercise_triggers: Array<'AUTOMATIC' | 'OPTIONAL'>;
|
|
30
|
+
warrant_expiration_date?: string;
|
|
31
|
+
vesting_terms_id?: string;
|
|
32
|
+
vestings?: SimpleVesting[];
|
|
33
|
+
comments?: string[];
|
|
34
|
+
};
|
|
35
|
+
}
|
|
36
|
+
export interface CreateWarrantIssuanceResult {
|
|
37
|
+
contractId: string;
|
|
38
|
+
updateId: string;
|
|
39
|
+
}
|
|
40
|
+
export declare function createWarrantIssuance(client: LedgerJsonApiClient, params: CreateWarrantIssuanceParams): Promise<CreateWarrantIssuanceResult>;
|
|
41
|
+
export declare function buildCreateWarrantIssuanceCommand(params: CreateWarrantIssuanceParams & {
|
|
42
|
+
systemOperator: string;
|
|
43
|
+
}): {
|
|
44
|
+
command: Command;
|
|
45
|
+
disclosedContracts: DisclosedContract[];
|
|
46
|
+
};
|
|
47
|
+
//# sourceMappingURL=createWarrantIssuance.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"createWarrantIssuance.d.ts","sourceRoot":"","sources":["../../../src/functions/warrantIssuance/createWarrantIssuance.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,mBAAmB,EAAE,MAAM,2BAA2B,CAAC;AAEhE,OAAO,EAAE,eAAe,EAAE,MAAM,6BAA6B,CAAC;A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