@open-captable-protocol/canton 0.2.2 → 0.2.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/functions/index.d.ts.map +1 -1
- package/dist/functions/index.js +0 -3
- package/dist/functions/index.js.map +1 -1
- package/dist/functions/issuer/getIssuerAsOcf.d.ts +1 -1
- package/dist/functions/issuer/getIssuerAsOcf.d.ts.map +1 -1
- package/dist/functions/stakeholder/getStakeholderAsOcf.d.ts +2 -2
- package/dist/functions/stakeholder/getStakeholderAsOcf.d.ts.map +1 -1
- package/dist/functions/stakeholder/index.js +0 -1
- package/dist/functions/stakeholder/index.js.map +1 -1
- package/dist/functions/stockClass/index.d.ts.map +1 -1
- package/dist/functions/stockClass/index.js +0 -1
- package/dist/functions/stockClass/index.js.map +1 -1
- package/dist/functions/stockLegendTemplate/index.js +0 -1
- package/dist/functions/stockLegendTemplate/index.js.map +1 -1
- package/dist/functions/stockPlan/createStockPlan.d.ts +0 -4
- package/dist/functions/stockPlan/createStockPlan.d.ts.map +1 -1
- package/dist/functions/stockPlan/createStockPlan.js +0 -1
- package/dist/functions/stockPlan/createStockPlan.js.map +1 -1
- package/dist/functions/stockPlan/index.d.ts.map +1 -1
- package/dist/functions/stockPlan/index.js +0 -1
- package/dist/functions/stockPlan/index.js.map +1 -1
- package/dist/types/native.d.ts +10 -1
- package/dist/types/native.d.ts.map +1 -1
- package/dist/utils/typeConversions.d.ts.map +1 -1
- package/dist/utils/typeConversions.js +49 -11
- package/dist/utils/typeConversions.js.map +1 -1
- package/package.json +3 -4
- package/dist/functions/companyValuationReport/confirmCurrentCompanyValuationReport.d.ts +0 -13
- package/dist/functions/companyValuationReport/confirmCurrentCompanyValuationReport.d.ts.map +0 -1
- package/dist/functions/companyValuationReport/confirmCurrentCompanyValuationReport.js +0 -38
- package/dist/functions/companyValuationReport/confirmCurrentCompanyValuationReport.js.map +0 -1
- package/dist/functions/convertible/acceptConvertible.d.ts +0 -18
- package/dist/functions/convertible/acceptConvertible.d.ts.map +0 -1
- package/dist/functions/convertible/acceptConvertible.js +0 -31
- package/dist/functions/convertible/acceptConvertible.js.map +0 -1
- package/dist/functions/convertible/cancelConvertible.d.ts +0 -23
- package/dist/functions/convertible/cancelConvertible.d.ts.map +0 -1
- package/dist/functions/convertible/cancelConvertible.js +0 -37
- package/dist/functions/convertible/cancelConvertible.js.map +0 -1
- package/dist/functions/convertible/convertConvertible.d.ts +0 -18
- package/dist/functions/convertible/convertConvertible.d.ts.map +0 -1
- package/dist/functions/convertible/convertConvertible.js +0 -33
- package/dist/functions/convertible/convertConvertible.js.map +0 -1
- package/dist/functions/convertible/getConvertibleAsOcf.d.ts +0 -21
- package/dist/functions/convertible/getConvertibleAsOcf.d.ts.map +0 -1
- package/dist/functions/convertible/getConvertibleAsOcf.js +0 -24
- package/dist/functions/convertible/getConvertibleAsOcf.js.map +0 -1
- package/dist/functions/convertible/getConvertibleConversionEventAsOcf.d.ts +0 -19
- package/dist/functions/convertible/getConvertibleConversionEventAsOcf.d.ts.map +0 -1
- package/dist/functions/convertible/getConvertibleConversionEventAsOcf.js +0 -21
- package/dist/functions/convertible/getConvertibleConversionEventAsOcf.js.map +0 -1
- package/dist/functions/convertible/index.d.ts +0 -9
- package/dist/functions/convertible/index.d.ts.map +0 -1
- package/dist/functions/convertible/index.js +0 -25
- package/dist/functions/convertible/index.js.map +0 -1
- package/dist/functions/convertible/issueConvertible.d.ts +0 -20
- package/dist/functions/convertible/issueConvertible.d.ts.map +0 -1
- package/dist/functions/convertible/issueConvertible.js +0 -46
- package/dist/functions/convertible/issueConvertible.js.map +0 -1
- package/dist/functions/convertible/retractConvertible.d.ts +0 -19
- package/dist/functions/convertible/retractConvertible.d.ts.map +0 -1
- package/dist/functions/convertible/retractConvertible.js +0 -32
- package/dist/functions/convertible/retractConvertible.js.map +0 -1
- package/dist/functions/convertible/transferConvertible.d.ts +0 -25
- package/dist/functions/convertible/transferConvertible.d.ts.map +0 -1
- package/dist/functions/convertible/transferConvertible.js +0 -45
- package/dist/functions/convertible/transferConvertible.js.map +0 -1
- package/dist/functions/issuer/adjustAuthorizedShares.d.ts +0 -20
- package/dist/functions/issuer/adjustAuthorizedShares.d.ts.map +0 -1
- package/dist/functions/issuer/adjustAuthorizedShares.js +0 -33
- package/dist/functions/issuer/adjustAuthorizedShares.js.map +0 -1
- package/dist/functions/issuer/updateIssuerData.d.ts +0 -50
- package/dist/functions/issuer/updateIssuerData.d.ts.map +0 -1
- package/dist/functions/issuer/updateIssuerData.js +0 -89
- package/dist/functions/issuer/updateIssuerData.js.map +0 -1
- package/dist/functions/stakeholder/recordRelationshipChange.d.ts +0 -20
- package/dist/functions/stakeholder/recordRelationshipChange.d.ts.map +0 -1
- package/dist/functions/stakeholder/recordRelationshipChange.js +0 -33
- package/dist/functions/stakeholder/recordRelationshipChange.js.map +0 -1
- package/dist/functions/stakeholder/recordStatusChange.d.ts +0 -19
- package/dist/functions/stakeholder/recordStatusChange.d.ts.map +0 -1
- package/dist/functions/stakeholder/recordStatusChange.js +0 -32
- package/dist/functions/stakeholder/recordStatusChange.js.map +0 -1
- package/dist/functions/stakeholder/updateStakeholderData.d.ts +0 -17
- package/dist/functions/stakeholder/updateStakeholderData.d.ts.map +0 -1
- package/dist/functions/stakeholder/updateStakeholderData.js +0 -59
- package/dist/functions/stakeholder/updateStakeholderData.js.map +0 -1
- package/dist/functions/stockClass/adjustAuthorizedShares.d.ts +0 -20
- package/dist/functions/stockClass/adjustAuthorizedShares.d.ts.map +0 -1
- package/dist/functions/stockClass/adjustAuthorizedShares.js +0 -28
- package/dist/functions/stockClass/adjustAuthorizedShares.js.map +0 -1
- package/dist/functions/stockClass/adjustConversionRatio.d.ts +0 -23
- package/dist/functions/stockClass/adjustConversionRatio.d.ts.map +0 -1
- package/dist/functions/stockClass/adjustConversionRatio.js +0 -39
- package/dist/functions/stockClass/adjustConversionRatio.js.map +0 -1
- package/dist/functions/stockClass/consolidatePositions.d.ts +0 -21
- package/dist/functions/stockClass/consolidatePositions.d.ts.map +0 -1
- package/dist/functions/stockClass/consolidatePositions.js +0 -34
- package/dist/functions/stockClass/consolidatePositions.js.map +0 -1
- package/dist/functions/stockClass/issueStock.d.ts +0 -19
- package/dist/functions/stockClass/issueStock.d.ts.map +0 -1
- package/dist/functions/stockClass/issueStock.js +0 -34
- package/dist/functions/stockClass/issueStock.js.map +0 -1
- package/dist/functions/stockClass/reissueStock.d.ts +0 -18
- package/dist/functions/stockClass/reissueStock.d.ts.map +0 -1
- package/dist/functions/stockClass/reissueStock.js +0 -35
- package/dist/functions/stockClass/reissueStock.js.map +0 -1
- package/dist/functions/stockClass/repurchaseStock.d.ts +0 -20
- package/dist/functions/stockClass/repurchaseStock.d.ts.map +0 -1
- package/dist/functions/stockClass/repurchaseStock.js +0 -33
- package/dist/functions/stockClass/repurchaseStock.js.map +0 -1
- package/dist/functions/stockClass/splitStockClass.d.ts +0 -18
- package/dist/functions/stockClass/splitStockClass.d.ts.map +0 -1
- package/dist/functions/stockClass/splitStockClass.js +0 -33
- package/dist/functions/stockClass/splitStockClass.js.map +0 -1
- package/dist/functions/stockClass/updateStockClass.d.ts +0 -51
- package/dist/functions/stockClass/updateStockClass.d.ts.map +0 -1
- package/dist/functions/stockClass/updateStockClass.js +0 -95
- package/dist/functions/stockClass/updateStockClass.js.map +0 -1
- package/dist/functions/stockLegendTemplate/updateStockLegendTemplate.d.ts +0 -14
- package/dist/functions/stockLegendTemplate/updateStockLegendTemplate.d.ts.map +0 -1
- package/dist/functions/stockLegendTemplate/updateStockLegendTemplate.js +0 -56
- package/dist/functions/stockLegendTemplate/updateStockLegendTemplate.js.map +0 -1
- package/dist/functions/stockPlan/acceptGrant.d.ts +0 -16
- package/dist/functions/stockPlan/acceptGrant.d.ts.map +0 -1
- package/dist/functions/stockPlan/acceptGrant.js +0 -31
- package/dist/functions/stockPlan/acceptGrant.js.map +0 -1
- package/dist/functions/stockPlan/adjustPool.d.ts +0 -20
- package/dist/functions/stockPlan/adjustPool.d.ts.map +0 -1
- package/dist/functions/stockPlan/adjustPool.js +0 -33
- package/dist/functions/stockPlan/adjustPool.js.map +0 -1
- package/dist/functions/stockPlan/cancelGrant.d.ts +0 -16
- package/dist/functions/stockPlan/cancelGrant.d.ts.map +0 -1
- package/dist/functions/stockPlan/cancelGrant.js +0 -31
- package/dist/functions/stockPlan/cancelGrant.js.map +0 -1
- package/dist/functions/stockPlan/exerciseGrant.d.ts +0 -20
- package/dist/functions/stockPlan/exerciseGrant.d.ts.map +0 -1
- package/dist/functions/stockPlan/exerciseGrant.js +0 -33
- package/dist/functions/stockPlan/exerciseGrant.js.map +0 -1
- package/dist/functions/stockPlan/issuePlanSecurity.d.ts +0 -27
- package/dist/functions/stockPlan/issuePlanSecurity.d.ts.map +0 -1
- package/dist/functions/stockPlan/issuePlanSecurity.js +0 -53
- package/dist/functions/stockPlan/issuePlanSecurity.js.map +0 -1
- package/dist/functions/stockPlan/releaseGrant.d.ts +0 -16
- package/dist/functions/stockPlan/releaseGrant.d.ts.map +0 -1
- package/dist/functions/stockPlan/releaseGrant.js +0 -31
- package/dist/functions/stockPlan/releaseGrant.js.map +0 -1
- package/dist/functions/stockPlan/repriceGrant.d.ts +0 -22
- package/dist/functions/stockPlan/repriceGrant.d.ts.map +0 -1
- package/dist/functions/stockPlan/repriceGrant.js +0 -38
- package/dist/functions/stockPlan/repriceGrant.js.map +0 -1
- package/dist/functions/stockPlan/retractGrant.d.ts +0 -16
- package/dist/functions/stockPlan/retractGrant.d.ts.map +0 -1
- package/dist/functions/stockPlan/retractGrant.js +0 -31
- package/dist/functions/stockPlan/retractGrant.js.map +0 -1
- package/dist/functions/stockPlan/startVesting.d.ts +0 -13
- package/dist/functions/stockPlan/startVesting.d.ts.map +0 -1
- package/dist/functions/stockPlan/startVesting.js +0 -28
- package/dist/functions/stockPlan/startVesting.js.map +0 -1
- package/dist/functions/stockPlan/transferGrant.d.ts +0 -21
- package/dist/functions/stockPlan/transferGrant.d.ts.map +0 -1
- package/dist/functions/stockPlan/transferGrant.js +0 -34
- package/dist/functions/stockPlan/transferGrant.js.map +0 -1
- package/dist/functions/stockPlan/updateStockPlan.d.ts +0 -24
- package/dist/functions/stockPlan/updateStockPlan.d.ts.map +0 -1
- package/dist/functions/stockPlan/updateStockPlan.js +0 -62
- package/dist/functions/stockPlan/updateStockPlan.js.map +0 -1
- package/dist/functions/stockPosition/acceptTransfer.d.ts +0 -16
- package/dist/functions/stockPosition/acceptTransfer.d.ts.map +0 -1
- package/dist/functions/stockPosition/acceptTransfer.js +0 -31
- package/dist/functions/stockPosition/acceptTransfer.js.map +0 -1
- package/dist/functions/stockPosition/index.d.ts +0 -1
- package/dist/functions/stockPosition/index.d.ts.map +0 -1
- package/dist/functions/stockPosition/index.js +0 -3
- package/dist/functions/stockPosition/index.js.map +0 -1
- package/dist/functions/stockPosition/proposeTransfer.d.ts +0 -17
- package/dist/functions/stockPosition/proposeTransfer.d.ts.map +0 -1
- package/dist/functions/stockPosition/proposeTransfer.js +0 -34
- package/dist/functions/stockPosition/proposeTransfer.js.map +0 -1
- package/dist/functions/stockPosition/reduceQuantity.d.ts +0 -12
- package/dist/functions/stockPosition/reduceQuantity.d.ts.map +0 -1
- package/dist/functions/stockPosition/reduceQuantity.js +0 -27
- package/dist/functions/stockPosition/reduceQuantity.js.map +0 -1
- package/dist/functions/stockPosition/retractTransfer.d.ts +0 -15
- package/dist/functions/stockPosition/retractTransfer.d.ts.map +0 -1
- package/dist/functions/stockPosition/retractTransfer.js +0 -28
- package/dist/functions/stockPosition/retractTransfer.js.map +0 -1
- package/dist/functions/valuation/updateValuationData.d.ts +0 -18
- package/dist/functions/valuation/updateValuationData.d.ts.map +0 -1
- package/dist/functions/valuation/updateValuationData.js +0 -58
- package/dist/functions/valuation/updateValuationData.js.map +0 -1
- package/dist/functions/vestingTerms/updateVestingTerms.d.ts +0 -18
- package/dist/functions/vestingTerms/updateVestingTerms.d.ts.map +0 -1
- package/dist/functions/vestingTerms/updateVestingTerms.js +0 -58
- package/dist/functions/vestingTerms/updateVestingTerms.js.map +0 -1
- package/dist/functions/warrant/exerciseWarrant.d.ts +0 -17
- package/dist/functions/warrant/exerciseWarrant.d.ts.map +0 -1
- package/dist/functions/warrant/exerciseWarrant.js +0 -32
- package/dist/functions/warrant/exerciseWarrant.js.map +0 -1
- package/dist/functions/warrant/getWarrantAsOcf.d.ts +0 -18
- package/dist/functions/warrant/getWarrantAsOcf.d.ts.map +0 -1
- package/dist/functions/warrant/getWarrantAsOcf.js +0 -21
- package/dist/functions/warrant/getWarrantAsOcf.js.map +0 -1
- package/dist/functions/warrant/getWarrantExerciseEventAsOcf.d.ts +0 -19
- package/dist/functions/warrant/getWarrantExerciseEventAsOcf.d.ts.map +0 -1
- package/dist/functions/warrant/getWarrantExerciseEventAsOcf.js +0 -21
- package/dist/functions/warrant/getWarrantExerciseEventAsOcf.js.map +0 -1
- package/dist/functions/warrant/index.d.ts +0 -8
- package/dist/functions/warrant/index.d.ts.map +0 -1
- package/dist/functions/warrant/index.js +0 -24
- package/dist/functions/warrant/index.js.map +0 -1
- package/dist/functions/warrant/issueWarrant.d.ts +0 -25
- package/dist/functions/warrant/issueWarrant.d.ts.map +0 -1
- package/dist/functions/warrant/issueWarrant.js +0 -49
- package/dist/functions/warrant/issueWarrant.js.map +0 -1
- package/dist/functions/warrant/transferWarrant.d.ts +0 -17
- package/dist/functions/warrant/transferWarrant.d.ts.map +0 -1
- package/dist/functions/warrant/transferWarrant.js +0 -30
- package/dist/functions/warrant/transferWarrant.js.map +0 -1
|
@@ -1,95 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.updateStockClass = updateStockClass;
|
|
4
|
-
const open_captable_protocol_daml_js_1 = require("@fairmint/open-captable-protocol-daml-js");
|
|
5
|
-
const typeConversions_1 = require("../../utils/typeConversions");
|
|
6
|
-
function hasIssuer(arg) {
|
|
7
|
-
return !!arg && typeof arg === 'object' && typeof arg.issuer === 'string';
|
|
8
|
-
}
|
|
9
|
-
/**
|
|
10
|
-
* Update stock class data by exercising the UpdateStockClassData choice on a StockClass contract
|
|
11
|
-
*
|
|
12
|
-
* This function retrieves the issuer party from the stock class contract and then updates
|
|
13
|
-
* the stock class data with the provided new data. It requires the FeaturedAppRight contract
|
|
14
|
-
* details to be provided for disclosed contracts, which is necessary for cross-domain contract
|
|
15
|
-
* interactions in Canton.
|
|
16
|
-
*
|
|
17
|
-
* @example
|
|
18
|
-
* ```typescript
|
|
19
|
-
* const featuredAppRightContractDetails = {
|
|
20
|
-
* contractId: "abcdef1234567890",
|
|
21
|
-
* createdEventBlob: "serialized_featured_app_right_blob_here",
|
|
22
|
-
* synchronizerId: "featured_sync_id_here",
|
|
23
|
-
* templateId: "FeaturedAppRight:template:id:here"
|
|
24
|
-
* };
|
|
25
|
-
*
|
|
26
|
-
* const result = await updateStockClass(client, {
|
|
27
|
-
* stockClassContractId: "1234567890abcdef",
|
|
28
|
-
* featuredAppRightContractDetails,
|
|
29
|
-
* newStockClassData: {
|
|
30
|
-
* name: "Series A Preferred (Updated)",
|
|
31
|
-
* class_type: "PREFERRED",
|
|
32
|
-
* default_id_prefix: "SA-",
|
|
33
|
-
* initial_shares_authorized: "2000000", // Updated from 1000000
|
|
34
|
-
* votes_per_share: "1",
|
|
35
|
-
* seniority: "1",
|
|
36
|
-
* // ... other updated stock class data
|
|
37
|
-
* }
|
|
38
|
-
* });
|
|
39
|
-
* ```
|
|
40
|
-
*
|
|
41
|
-
* @param client - The ledger JSON API client
|
|
42
|
-
* @param params - Parameters for updating stock class data, including the contract details for disclosed contracts
|
|
43
|
-
* @returns Promise resolving to the result of the stock class data update
|
|
44
|
-
*/
|
|
45
|
-
async function updateStockClass(client, params) {
|
|
46
|
-
// Get the events for the StockClass contract to extract the issuer party
|
|
47
|
-
const eventsResponse = await client.getEventsByContractId({
|
|
48
|
-
contractId: params.stockClassContractId
|
|
49
|
-
});
|
|
50
|
-
if (!eventsResponse.created?.createdEvent?.createArgument) {
|
|
51
|
-
throw new Error('Invalid contract events response: missing created event or create argument');
|
|
52
|
-
}
|
|
53
|
-
const createArgument = eventsResponse.created.createdEvent.createArgument;
|
|
54
|
-
if (!hasIssuer(createArgument)) {
|
|
55
|
-
throw new Error('Issuer party not found in contract create argument');
|
|
56
|
-
}
|
|
57
|
-
const issuerParty = createArgument.issuer;
|
|
58
|
-
// Create the choice arguments for UpdateStockClassData
|
|
59
|
-
const choiceArguments = {
|
|
60
|
-
new_stock_class_data: (0, typeConversions_1.stockClassDataToDaml)(params.newStockClassData)
|
|
61
|
-
};
|
|
62
|
-
// Submit the choice to the StockClass contract
|
|
63
|
-
const response = await client.submitAndWaitForTransactionTree({
|
|
64
|
-
actAs: [issuerParty],
|
|
65
|
-
commands: [
|
|
66
|
-
{
|
|
67
|
-
ExerciseCommand: {
|
|
68
|
-
templateId: open_captable_protocol_daml_js_1.Fairmint.OpenCapTable.StockClass.StockClass.templateId,
|
|
69
|
-
contractId: params.stockClassContractId,
|
|
70
|
-
choice: 'UpdateStockClassData',
|
|
71
|
-
choiceArgument: choiceArguments
|
|
72
|
-
}
|
|
73
|
-
}
|
|
74
|
-
],
|
|
75
|
-
disclosedContracts: [
|
|
76
|
-
{
|
|
77
|
-
templateId: params.featuredAppRightContractDetails.templateId,
|
|
78
|
-
contractId: params.featuredAppRightContractDetails.contractId,
|
|
79
|
-
createdEventBlob: params.featuredAppRightContractDetails.createdEventBlob,
|
|
80
|
-
synchronizerId: params.featuredAppRightContractDetails.synchronizerId
|
|
81
|
-
}
|
|
82
|
-
]
|
|
83
|
-
});
|
|
84
|
-
const event = response.transactionTree.eventsById[1];
|
|
85
|
-
if ('CreatedTreeEvent' in event) {
|
|
86
|
-
return {
|
|
87
|
-
contractId: event.CreatedTreeEvent.value.contractId,
|
|
88
|
-
updateId: response.transactionTree.updateId
|
|
89
|
-
};
|
|
90
|
-
}
|
|
91
|
-
else {
|
|
92
|
-
throw new Error('Expected CreatedTreeEvent not found');
|
|
93
|
-
}
|
|
94
|
-
}
|
|
95
|
-
//# sourceMappingURL=updateStockClass.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"updateStockClass.js","sourceRoot":"","sources":["../../../src/functions/stockClass/updateStockClass.ts"],"names":[],"mappings":";;AA+DA,4CAwDC;AAvHD,6FAAoE;AAKpE,iEAAmE;AAkBnE,SAAS,SAAS,CAAC,GAAY;IAC7B,OAAO,CAAC,CAAC,GAAG,IAAI,OAAO,GAAG,KAAK,QAAQ,IAAI,OAAQ,GAAqC,CAAC,MAAM,KAAK,QAAQ,CAAC;AAC/G,CAAC;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmCG;AACI,KAAK,UAAU,gBAAgB,CACpC,MAA2B,EAC3B,MAA8B;IAE9B,yEAAyE;IACzE,MAAM,cAAc,GAAG,MAAM,MAAM,CAAC,qBAAqB,CAAC;QACxD,UAAU,EAAE,MAAM,CAAC,oBAAoB;KACxC,CAAC,CAAC;IAEH,IAAI,CAAC,cAAc,CAAC,OAAO,EAAE,YAAY,EAAE,cAAc,EAAE,CAAC;QAC1D,MAAM,IAAI,KAAK,CAAC,4EAA4E,CAAC,CAAC;IAChG,CAAC;IAED,MAAM,cAAc,GAAG,cAAc,CAAC,OAAO,CAAC,YAAY,CAAC,cAAc,CAAC;IAC1E,IAAI,CAAC,SAAS,CAAC,cAAc,CAAC,EAAE,CAAC;QAC/B,MAAM,IAAI,KAAK,CAAC,oDAAoD,CAAC,CAAC;IACxE,CAAC;IACD,MAAM,WAAW,GAAG,cAAc,CAAC,MAAM,CAAC;IAE1C,uDAAuD;IACvD,MAAM,eAAe,GAA0D;QAC7E,oBAAoB,EAAE,IAAA,sCAAoB,EAAC,MAAM,CAAC,iBAAiB,CAAC;KACrE,CAAC;IAEF,+CAA+C;IAC/C,MAAM,QAAQ,GAAG,MAAM,MAAM,CAAC,+BAA+B,CAAC;QAC5D,KAAK,EAAE,CAAC,WAAW,CAAC;QACpB,QAAQ,EAAE;YACR;gBACE,eAAe,EAAE;oBACf,UAAU,EAAE,yCAAQ,CAAC,YAAY,CAAC,UAAU,CAAC,UAAU,CAAC,UAAU;oBAClE,UAAU,EAAE,MAAM,CAAC,oBAAoB;oBACvC,MAAM,EAAE,sBAAsB;oBAC9B,cAAc,EAAE,eAAe;iBAChC;aACF;SACF;QACD,kBAAkB,EAAE;YAClB;gBACE,UAAU,EAAE,MAAM,CAAC,+BAA+B,CAAC,UAAU;gBAC7D,UAAU,EAAE,MAAM,CAAC,+BAA+B,CAAC,UAAU;gBAC7D,gBAAgB,EAAE,MAAM,CAAC,+BAA+B,CAAC,gBAAgB;gBACzE,cAAc,EAAE,MAAM,CAAC,+BAA+B,CAAC,cAAc;aACtE;SACF;KACF,CAA4C,CAAC;IAE9C,MAAM,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"}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { LedgerJsonApiClient } from '@fairmint/canton-node-sdk';
|
|
2
|
-
import { ContractDetails } from '../../types/contractDetails';
|
|
3
|
-
import { OcfStockLegendTemplateData } from '../../types/native';
|
|
4
|
-
export interface UpdateStockLegendTemplateParams {
|
|
5
|
-
stockLegendTemplateContractId: string;
|
|
6
|
-
featuredAppRightContractDetails: ContractDetails;
|
|
7
|
-
newTemplateData: OcfStockLegendTemplateData;
|
|
8
|
-
}
|
|
9
|
-
export interface UpdateStockLegendTemplateResult {
|
|
10
|
-
contractId: string;
|
|
11
|
-
updateId: string;
|
|
12
|
-
}
|
|
13
|
-
export declare function updateStockLegendTemplate(client: LedgerJsonApiClient, params: UpdateStockLegendTemplateParams): Promise<UpdateStockLegendTemplateResult>;
|
|
14
|
-
//# sourceMappingURL=updateStockLegendTemplate.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"updateStockLegendTemplate.d.ts","sourceRoot":"","sources":["../../../src/functions/stockLegendTemplate/updateStockLegendTemplate.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,mBAAmB,EAAE,MAAM,2BAA2B,CAAC;AAEhE,OAAO,EAAE,eAAe,EAAE,MAAM,6BAA6B,CAAC;AAC9D,OAAO,EAAE,0BAA0B,EAAE,MAAM,oBAAoB,CAAC;AAGhE,MAAM,WAAW,+BAA+B;IAC9C,6BAA6B,EAAE,MAAM,CAAC;IACtC,+BAA+B,EAAE,eAAe,CAAC;IACjD,eAAe,EAAE,0BAA0B,CAAC;CAC7C;AAED,MAAM,WAAW,+BAA+B;IAC9C,UAAU,EAAE,MAAM,CAAC;IACnB,QAAQ,EAAE,MAAM,CAAC;CAClB;AAOD,wBAAsB,yBAAyB,CAC7C,MAAM,EAAE,mBAAmB,EAC3B,MAAM,EAAE,+BAA+B,GACtC,OAAO,CAAC,+BAA+B,CAAC,CAgD1C"}
|
|
@@ -1,56 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.updateStockLegendTemplate = updateStockLegendTemplate;
|
|
4
|
-
const open_captable_protocol_daml_js_1 = require("@fairmint/open-captable-protocol-daml-js");
|
|
5
|
-
const typeConversions_1 = require("../../utils/typeConversions");
|
|
6
|
-
function hasIssuer(arg) {
|
|
7
|
-
return !!arg && typeof arg === 'object' && typeof arg.issuer === 'string';
|
|
8
|
-
}
|
|
9
|
-
async function updateStockLegendTemplate(client, params) {
|
|
10
|
-
const eventsResponse = await client.getEventsByContractId({
|
|
11
|
-
contractId: params.stockLegendTemplateContractId
|
|
12
|
-
});
|
|
13
|
-
if (!eventsResponse.created?.createdEvent?.createArgument) {
|
|
14
|
-
throw new Error('Invalid contract events response: missing created event or create argument');
|
|
15
|
-
}
|
|
16
|
-
const createArgument = eventsResponse.created.createdEvent.createArgument;
|
|
17
|
-
if (!hasIssuer(createArgument)) {
|
|
18
|
-
throw new Error('Issuer party not found in contract create argument');
|
|
19
|
-
}
|
|
20
|
-
const issuerParty = createArgument.issuer;
|
|
21
|
-
const choiceArguments = {
|
|
22
|
-
new_template_data: (0, typeConversions_1.stockLegendTemplateDataToDaml)(params.newTemplateData)
|
|
23
|
-
};
|
|
24
|
-
const response = await client.submitAndWaitForTransactionTree({
|
|
25
|
-
actAs: [issuerParty],
|
|
26
|
-
commands: [
|
|
27
|
-
{
|
|
28
|
-
ExerciseCommand: {
|
|
29
|
-
templateId: open_captable_protocol_daml_js_1.Fairmint.OpenCapTable.StockLegendTemplate.StockLegendTemplate.templateId,
|
|
30
|
-
contractId: params.stockLegendTemplateContractId,
|
|
31
|
-
choice: 'UpdateStockLegendTemplate',
|
|
32
|
-
choiceArgument: choiceArguments
|
|
33
|
-
}
|
|
34
|
-
}
|
|
35
|
-
],
|
|
36
|
-
disclosedContracts: [
|
|
37
|
-
{
|
|
38
|
-
templateId: params.featuredAppRightContractDetails.templateId,
|
|
39
|
-
contractId: params.featuredAppRightContractDetails.contractId,
|
|
40
|
-
createdEventBlob: params.featuredAppRightContractDetails.createdEventBlob,
|
|
41
|
-
synchronizerId: params.featuredAppRightContractDetails.synchronizerId
|
|
42
|
-
}
|
|
43
|
-
]
|
|
44
|
-
});
|
|
45
|
-
const event = response.transactionTree.eventsById[1];
|
|
46
|
-
if ('CreatedTreeEvent' in event) {
|
|
47
|
-
return {
|
|
48
|
-
contractId: event.CreatedTreeEvent.value.contractId,
|
|
49
|
-
updateId: response.transactionTree.updateId
|
|
50
|
-
};
|
|
51
|
-
}
|
|
52
|
-
else {
|
|
53
|
-
throw new Error('Expected CreatedTreeEvent not found');
|
|
54
|
-
}
|
|
55
|
-
}
|
|
56
|
-
//# sourceMappingURL=updateStockLegendTemplate.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"updateStockLegendTemplate.js","sourceRoot":"","sources":["../../../src/functions/stockLegendTemplate/updateStockLegendTemplate.ts"],"names":[],"mappings":";;AAuBA,8DAmDC;AA1ED,6FAAoE;AAKpE,iEAA4E;AAc5E,SAAS,SAAS,CAAC,GAAY;IAC7B,OAAO,CAAC,CAAC,GAAG,IAAI,OAAO,GAAG,KAAK,QAAQ,IAAI,OAAQ,GAAsB,CAAC,MAAM,KAAK,QAAQ,CAAC;AAChG,CAAC;AAEM,KAAK,UAAU,yBAAyB,CAC7C,MAA2B,EAC3B,MAAuC;IAEvC,MAAM,cAAc,GAAG,MAAM,MAAM,CAAC,qBAAqB,CAAC;QACxD,UAAU,EAAE,MAAM,CAAC,6BAA6B;KACjD,CAAC,CAAC;IACH,IAAI,CAAC,cAAc,CAAC,OAAO,EAAE,YAAY,EAAE,cAAc,EAAE,CAAC;QAC1D,MAAM,IAAI,KAAK,CAAC,4EAA4E,CAAC,CAAC;IAChG,CAAC;IACD,MAAM,cAAc,GAAG,cAAc,CAAC,OAAO,CAAC,YAAY,CAAC,cAAc,CAAC;IAC1E,IAAI,CAAC,SAAS,CAAC,cAAc,CAAC,EAAE,CAAC;QAC/B,MAAM,IAAI,KAAK,CAAC,oDAAoD,CAAC,CAAC;IACxE,CAAC;IACD,MAAM,WAAW,GAAG,cAAc,CAAC,MAAM,CAAC;IAE1C,MAAM,eAAe,GAAwE;QAC3F,iBAAiB,EAAE,IAAA,+CAA6B,EAAC,MAAM,CAAC,eAAe,CAAC;KACzE,CAAC;IAEF,MAAM,QAAQ,GAAG,MAAM,MAAM,CAAC,+BAA+B,CAAC;QAC5D,KAAK,EAAE,CAAC,WAAW,CAAC;QACpB,QAAQ,EAAE;YACR;gBACE,eAAe,EAAE;oBACf,UAAU,EAAE,yCAAQ,CAAC,YAAY,CAAC,mBAAmB,CAAC,mBAAmB,CAAC,UAAU;oBACpF,UAAU,EAAE,MAAM,CAAC,6BAA6B;oBAChD,MAAM,EAAE,2BAA2B;oBACnC,cAAc,EAAE,eAAe;iBAChC;aACF;SACF;QACD,kBAAkB,EAAE;YAClB;gBACE,UAAU,EAAE,MAAM,CAAC,+BAA+B,CAAC,UAAU;gBAC7D,UAAU,EAAE,MAAM,CAAC,+BAA+B,CAAC,UAAU;gBAC7D,gBAAgB,EAAE,MAAM,CAAC,+BAA+B,CAAC,gBAAgB;gBACzE,cAAc,EAAE,MAAM,CAAC,+BAA+B,CAAC,cAAc;aACtE;SACF;KACF,CAA4C,CAAC;IAE9C,MAAM,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"}
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { LedgerJsonApiClient } from '@fairmint/canton-node-sdk';
|
|
2
|
-
export interface AcceptGrantParams {
|
|
3
|
-
planSecurityGrantContractId: string;
|
|
4
|
-
stakeholderParty: string;
|
|
5
|
-
date: string;
|
|
6
|
-
}
|
|
7
|
-
export interface AcceptGrantResult {
|
|
8
|
-
updateId: string;
|
|
9
|
-
acceptanceEventContractId: string;
|
|
10
|
-
}
|
|
11
|
-
/**
|
|
12
|
-
* Accept a plan security grant by exercising the AcceptGrant choice on PlanSecurityGrant
|
|
13
|
-
* @see https://schema.opencaptablecoalition.com/v/1.2.0/objects/transactions/acceptance/EquityCompensationAcceptance.schema.json
|
|
14
|
-
*/
|
|
15
|
-
export declare function acceptGrant(client: LedgerJsonApiClient, params: AcceptGrantParams): Promise<AcceptGrantResult>;
|
|
16
|
-
//# sourceMappingURL=acceptGrant.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"acceptGrant.d.ts","sourceRoot":"","sources":["../../../src/functions/stockPlan/acceptGrant.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,mBAAmB,EAAE,MAAM,2BAA2B,CAAC;AAGhE,MAAM,WAAW,iBAAiB;IAChC,2BAA2B,EAAE,MAAM,CAAC;IACpC,gBAAgB,EAAE,MAAM,CAAC;IACzB,IAAI,EAAE,MAAM,CAAC;CACd;AAED,MAAM,WAAW,iBAAiB;IAChC,QAAQ,EAAE,MAAM,CAAC;IACjB,yBAAyB,EAAE,MAAM,CAAC;CACnC;AAED;;;GAGG;AACH,wBAAsB,WAAW,CAC/B,MAAM,EAAE,mBAAmB,EAC3B,MAAM,EAAE,iBAAiB,GACxB,OAAO,CAAC,iBAAiB,CAAC,CA0B5B"}
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.acceptGrant = acceptGrant;
|
|
4
|
-
const open_captable_protocol_daml_js_1 = require("@fairmint/open-captable-protocol-daml-js");
|
|
5
|
-
/**
|
|
6
|
-
* Accept a plan security grant by exercising the AcceptGrant choice on PlanSecurityGrant
|
|
7
|
-
* @see https://schema.opencaptablecoalition.com/v/1.2.0/objects/transactions/acceptance/EquityCompensationAcceptance.schema.json
|
|
8
|
-
*/
|
|
9
|
-
async function acceptGrant(client, params) {
|
|
10
|
-
const choiceArgs = {
|
|
11
|
-
date: `${params.date}T00:00:00.000Z`
|
|
12
|
-
};
|
|
13
|
-
const response = await client.submitAndWaitForTransactionTree({
|
|
14
|
-
actAs: [params.stakeholderParty],
|
|
15
|
-
commands: [
|
|
16
|
-
{
|
|
17
|
-
ExerciseCommand: {
|
|
18
|
-
templateId: open_captable_protocol_daml_js_1.Fairmint.OpenCapTable.StockPlan.PlanSecurityGrant.templateId,
|
|
19
|
-
contractId: params.planSecurityGrantContractId,
|
|
20
|
-
choice: 'AcceptGrant',
|
|
21
|
-
choiceArgument: choiceArgs
|
|
22
|
-
}
|
|
23
|
-
}
|
|
24
|
-
]
|
|
25
|
-
});
|
|
26
|
-
const created = Object.values(response.transactionTree.eventsById).find((e) => 'CreatedTreeEvent' in e && e.CreatedTreeEvent.value.templateId === open_captable_protocol_daml_js_1.Fairmint.OpenCapTable.StockPlan.PlanSecurityAcceptance.templateId);
|
|
27
|
-
if (!created)
|
|
28
|
-
throw new Error('PlanSecurityAcceptance not found');
|
|
29
|
-
return { updateId: response.transactionTree.updateId, acceptanceEventContractId: created.CreatedTreeEvent.value.contractId };
|
|
30
|
-
}
|
|
31
|
-
//# sourceMappingURL=acceptGrant.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"acceptGrant.js","sourceRoot":"","sources":["../../../src/functions/stockPlan/acceptGrant.ts"],"names":[],"mappings":";;AAmBA,kCA6BC;AAhDD,6FAAoE;AAepE;;;GAGG;AACI,KAAK,UAAU,WAAW,CAC/B,MAA2B,EAC3B,MAAyB;IAEzB,MAAM,UAAU,GAAgD;QAC9D,IAAI,EAAE,GAAG,MAAM,CAAC,IAAI,gBAAgB;KACrC,CAAC;IAEF,MAAM,QAAQ,GAAG,MAAM,MAAM,CAAC,+BAA+B,CAAC;QAC5D,KAAK,EAAE,CAAC,MAAM,CAAC,gBAAgB,CAAC;QAChC,QAAQ,EAAE;YACR;gBACE,eAAe,EAAE;oBACf,UAAU,EAAE,yCAAQ,CAAC,YAAY,CAAC,SAAS,CAAC,iBAAiB,CAAC,UAAU;oBACxE,UAAU,EAAE,MAAM,CAAC,2BAA2B;oBAC9C,MAAM,EAAE,aAAa;oBACrB,cAAc,EAAE,UAAU;iBAC3B;aACF;SACF;KACF,CAA4C,CAAC;IAE9C,MAAM,OAAO,GAAG,MAAM,CAAC,MAAM,CAAC,QAAQ,CAAC,eAAe,CAAC,UAAU,CAAC,CAAC,IAAI,CACrE,CAAC,CAAM,EAAE,EAAE,CAAC,kBAAkB,IAAI,CAAC,IAAI,CAAC,CAAC,gBAAgB,CAAC,KAAK,CAAC,UAAU,KAAK,yCAAQ,CAAC,YAAY,CAAC,SAAS,CAAC,sBAAsB,CAAC,UAAU,CAC1I,CAAC;IAET,IAAI,CAAC,OAAO;QAAE,MAAM,IAAI,KAAK,CAAC,kCAAkC,CAAC,CAAC;IAElE,OAAO,EAAE,QAAQ,EAAE,QAAQ,CAAC,eAAe,CAAC,QAAQ,EAAE,yBAAyB,EAAE,OAAO,CAAC,gBAAgB,CAAC,KAAK,CAAC,UAAU,EAAE,CAAC;AAC/H,CAAC"}
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import { Fairmint } from '@fairmint/open-captable-protocol-daml-js';
|
|
2
|
-
import type { ContractId } from '@daml/types';
|
|
3
|
-
import { LedgerJsonApiClient } from '@fairmint/canton-node-sdk';
|
|
4
|
-
export interface AdjustStockPlanPoolParams {
|
|
5
|
-
stockPlanContractId: ContractId<Fairmint.OpenCapTable.StockPlan.StockPlan>;
|
|
6
|
-
issuerParty: string;
|
|
7
|
-
newReservedShares: string | number;
|
|
8
|
-
date: string;
|
|
9
|
-
}
|
|
10
|
-
export interface AdjustStockPlanPoolResult {
|
|
11
|
-
updateId: string;
|
|
12
|
-
}
|
|
13
|
-
/**
|
|
14
|
-
* Adjust a stock plan's reserved share pool size.
|
|
15
|
-
* Schema: https://schema.opencaptablecoalition.com/v/1.2.0/objects/transactions/adjustment/StockPlanPoolAdjustment.schema.json
|
|
16
|
-
* - new_reserved_shares: New total reserved shares in the plan pool
|
|
17
|
-
* - date: Effective date (YYYY-MM-DD)
|
|
18
|
-
*/
|
|
19
|
-
export declare function adjustStockPlanPool(client: LedgerJsonApiClient, params: AdjustStockPlanPoolParams): Promise<AdjustStockPlanPoolResult>;
|
|
20
|
-
//# sourceMappingURL=adjustPool.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"adjustPool.d.ts","sourceRoot":"","sources":["../../../src/functions/stockPlan/adjustPool.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,0CAA0C,CAAC;AACpE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAC9C,OAAO,EAAE,mBAAmB,EAAE,MAAM,2BAA2B,CAAC;AAGhE,MAAM,WAAW,yBAAyB;IACxC,mBAAmB,EAAE,UAAU,CAAC,QAAQ,CAAC,YAAY,CAAC,SAAS,CAAC,SAAS,CAAC,CAAC;IAC3E,WAAW,EAAE,MAAM,CAAC;IACpB,iBAAiB,EAAE,MAAM,GAAG,MAAM,CAAC;IACnC,IAAI,EAAE,MAAM,CAAC;CACd;AAED,MAAM,WAAW,yBAAyB;IACxC,QAAQ,EAAE,MAAM,CAAC;CAClB;AAED;;;;;GAKG;AACH,wBAAsB,mBAAmB,CACvC,MAAM,EAAE,mBAAmB,EAC3B,MAAM,EAAE,yBAAyB,GAChC,OAAO,CAAC,yBAAyB,CAAC,CAwBpC"}
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.adjustStockPlanPool = adjustStockPlanPool;
|
|
4
|
-
const open_captable_protocol_daml_js_1 = require("@fairmint/open-captable-protocol-daml-js");
|
|
5
|
-
/**
|
|
6
|
-
* Adjust a stock plan's reserved share pool size.
|
|
7
|
-
* Schema: https://schema.opencaptablecoalition.com/v/1.2.0/objects/transactions/adjustment/StockPlanPoolAdjustment.schema.json
|
|
8
|
-
* - new_reserved_shares: New total reserved shares in the plan pool
|
|
9
|
-
* - date: Effective date (YYYY-MM-DD)
|
|
10
|
-
*/
|
|
11
|
-
async function adjustStockPlanPool(client, params) {
|
|
12
|
-
const choiceArgs = {
|
|
13
|
-
new_reserved_shares: typeof params.newReservedShares === 'number'
|
|
14
|
-
? params.newReservedShares.toString()
|
|
15
|
-
: params.newReservedShares,
|
|
16
|
-
date: `${params.date}T00:00:00.000Z`,
|
|
17
|
-
};
|
|
18
|
-
const response = (await client.submitAndWaitForTransactionTree({
|
|
19
|
-
actAs: [params.issuerParty],
|
|
20
|
-
commands: [
|
|
21
|
-
{
|
|
22
|
-
ExerciseCommand: {
|
|
23
|
-
templateId: open_captable_protocol_daml_js_1.Fairmint.OpenCapTable.StockPlan.StockPlan.templateId,
|
|
24
|
-
contractId: params.stockPlanContractId,
|
|
25
|
-
choice: 'AdjustPool',
|
|
26
|
-
choiceArgument: choiceArgs,
|
|
27
|
-
},
|
|
28
|
-
},
|
|
29
|
-
],
|
|
30
|
-
}));
|
|
31
|
-
return { updateId: response.transactionTree.updateId };
|
|
32
|
-
}
|
|
33
|
-
//# sourceMappingURL=adjustPool.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"adjustPool.js","sourceRoot":"","sources":["../../../src/functions/stockPlan/adjustPool.ts"],"names":[],"mappings":";;AAsBA,kDA2BC;AAjDD,6FAAoE;AAgBpE;;;;;GAKG;AACI,KAAK,UAAU,mBAAmB,CACvC,MAA2B,EAC3B,MAAiC;IAEjC,MAAM,UAAU,GAA+C;QAC7D,mBAAmB,EACjB,OAAO,MAAM,CAAC,iBAAiB,KAAK,QAAQ;YAC1C,CAAC,CAAC,MAAM,CAAC,iBAAiB,CAAC,QAAQ,EAAE;YACrC,CAAC,CAAC,MAAM,CAAC,iBAAiB;QAC9B,IAAI,EAAE,GAAG,MAAM,CAAC,IAAI,gBAAgB;KAC9B,CAAC;IAET,MAAM,QAAQ,GAAG,CAAC,MAAM,MAAM,CAAC,+BAA+B,CAAC;QAC7D,KAAK,EAAE,CAAC,MAAM,CAAC,WAAW,CAAC;QAC3B,QAAQ,EAAE;YACR;gBACE,eAAe,EAAE;oBACf,UAAU,EAAE,yCAAQ,CAAC,YAAY,CAAC,SAAS,CAAC,SAAS,CAAC,UAAU;oBAChE,UAAU,EAAE,MAAM,CAAC,mBAAmB;oBACtC,MAAM,EAAE,YAAY;oBACpB,cAAc,EAAE,UAAU;iBAC3B;aACF;SACF;KACF,CAAC,CAA4C,CAAC;IAE/C,OAAO,EAAE,QAAQ,EAAE,QAAQ,CAAC,eAAe,CAAC,QAAQ,EAAE,CAAC;AACzD,CAAC"}
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { LedgerJsonApiClient } from '@fairmint/canton-node-sdk';
|
|
2
|
-
export interface CancelGrantParams {
|
|
3
|
-
planSecurityGrantContractId: string;
|
|
4
|
-
issuerParty: string;
|
|
5
|
-
date: string;
|
|
6
|
-
}
|
|
7
|
-
export interface CancelGrantResult {
|
|
8
|
-
updateId: string;
|
|
9
|
-
cancellationEventContractId: string;
|
|
10
|
-
}
|
|
11
|
-
/**
|
|
12
|
-
* Cancel a plan security grant by exercising the CancelGrant choice on PlanSecurityGrant
|
|
13
|
-
* @see https://schema.opencaptablecoalition.com/v/1.2.0/objects/transactions/cancellation/EquityCompensationCancellation.schema.json
|
|
14
|
-
*/
|
|
15
|
-
export declare function cancelGrant(client: LedgerJsonApiClient, params: CancelGrantParams): Promise<CancelGrantResult>;
|
|
16
|
-
//# sourceMappingURL=cancelGrant.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"cancelGrant.d.ts","sourceRoot":"","sources":["../../../src/functions/stockPlan/cancelGrant.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,mBAAmB,EAAE,MAAM,2BAA2B,CAAC;AAGhE,MAAM,WAAW,iBAAiB;IAChC,2BAA2B,EAAE,MAAM,CAAC;IACpC,WAAW,EAAE,MAAM,CAAC;IACpB,IAAI,EAAE,MAAM,CAAC;CACd;AAED,MAAM,WAAW,iBAAiB;IAChC,QAAQ,EAAE,MAAM,CAAC;IACjB,2BAA2B,EAAE,MAAM,CAAC;CACrC;AAED;;;GAGG;AACH,wBAAsB,WAAW,CAC/B,MAAM,EAAE,mBAAmB,EAC3B,MAAM,EAAE,iBAAiB,GACxB,OAAO,CAAC,iBAAiB,CAAC,CA0B5B"}
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.cancelGrant = cancelGrant;
|
|
4
|
-
const open_captable_protocol_daml_js_1 = require("@fairmint/open-captable-protocol-daml-js");
|
|
5
|
-
/**
|
|
6
|
-
* Cancel a plan security grant by exercising the CancelGrant choice on PlanSecurityGrant
|
|
7
|
-
* @see https://schema.opencaptablecoalition.com/v/1.2.0/objects/transactions/cancellation/EquityCompensationCancellation.schema.json
|
|
8
|
-
*/
|
|
9
|
-
async function cancelGrant(client, params) {
|
|
10
|
-
const choiceArgs = {
|
|
11
|
-
date: `${params.date}T00:00:00.000Z`
|
|
12
|
-
};
|
|
13
|
-
const response = await client.submitAndWaitForTransactionTree({
|
|
14
|
-
actAs: [params.issuerParty],
|
|
15
|
-
commands: [
|
|
16
|
-
{
|
|
17
|
-
ExerciseCommand: {
|
|
18
|
-
templateId: open_captable_protocol_daml_js_1.Fairmint.OpenCapTable.StockPlan.PlanSecurityGrant.templateId,
|
|
19
|
-
contractId: params.planSecurityGrantContractId,
|
|
20
|
-
choice: 'CancelGrant',
|
|
21
|
-
choiceArgument: choiceArgs
|
|
22
|
-
}
|
|
23
|
-
}
|
|
24
|
-
]
|
|
25
|
-
});
|
|
26
|
-
const created = Object.values(response.transactionTree.eventsById).find((e) => 'CreatedTreeEvent' in e && e.CreatedTreeEvent.value.templateId === open_captable_protocol_daml_js_1.Fairmint.OpenCapTable.StockPlan.PlanSecurityCancellation.templateId);
|
|
27
|
-
if (!created)
|
|
28
|
-
throw new Error('PlanSecurityCancellation not found');
|
|
29
|
-
return { updateId: response.transactionTree.updateId, cancellationEventContractId: created.CreatedTreeEvent.value.contractId };
|
|
30
|
-
}
|
|
31
|
-
//# sourceMappingURL=cancelGrant.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"cancelGrant.js","sourceRoot":"","sources":["../../../src/functions/stockPlan/cancelGrant.ts"],"names":[],"mappings":";;AAmBA,kCA6BC;AAhDD,6FAAoE;AAepE;;;GAGG;AACI,KAAK,UAAU,WAAW,CAC/B,MAA2B,EAC3B,MAAyB;IAEzB,MAAM,UAAU,GAAgD;QAC9D,IAAI,EAAE,GAAG,MAAM,CAAC,IAAI,gBAAgB;KACrC,CAAC;IAEF,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,SAAS,CAAC,iBAAiB,CAAC,UAAU;oBACxE,UAAU,EAAE,MAAM,CAAC,2BAA2B;oBAC9C,MAAM,EAAE,aAAa;oBACrB,cAAc,EAAE,UAAU;iBAC3B;aACF;SACF;KACF,CAA4C,CAAC;IAE9C,MAAM,OAAO,GAAG,MAAM,CAAC,MAAM,CAAC,QAAQ,CAAC,eAAe,CAAC,UAAU,CAAC,CAAC,IAAI,CACrE,CAAC,CAAM,EAAE,EAAE,CAAC,kBAAkB,IAAI,CAAC,IAAI,CAAC,CAAC,gBAAgB,CAAC,KAAK,CAAC,UAAU,KAAK,yCAAQ,CAAC,YAAY,CAAC,SAAS,CAAC,wBAAwB,CAAC,UAAU,CAC5I,CAAC;IAET,IAAI,CAAC,OAAO;QAAE,MAAM,IAAI,KAAK,CAAC,oCAAoC,CAAC,CAAC;IAEpE,OAAO,EAAE,QAAQ,EAAE,QAAQ,CAAC,eAAe,CAAC,QAAQ,EAAE,2BAA2B,EAAE,OAAO,CAAC,gBAAgB,CAAC,KAAK,CAAC,UAAU,EAAE,CAAC;AACjI,CAAC"}
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import { Fairmint } from '@fairmint/open-captable-protocol-daml-js';
|
|
2
|
-
import { LedgerJsonApiClient } from '@fairmint/canton-node-sdk';
|
|
3
|
-
import type { ContractId } from '@daml/types';
|
|
4
|
-
export interface ExerciseGrantParams {
|
|
5
|
-
planSecurityGrantContractId: string;
|
|
6
|
-
issuerParty: string;
|
|
7
|
-
stockClassContractId: ContractId<Fairmint.OpenCapTable.StockClass.StockClass>;
|
|
8
|
-
quantity: string | number;
|
|
9
|
-
date: string;
|
|
10
|
-
}
|
|
11
|
-
export interface ExerciseGrantResult {
|
|
12
|
-
updateId: string;
|
|
13
|
-
stockPositionContractId: string;
|
|
14
|
-
}
|
|
15
|
-
/**
|
|
16
|
-
* Exercise a plan security grant by exercising the ExerciseGrant choice on PlanSecurityGrant
|
|
17
|
-
* @see https://schema.opencaptablecoalition.com/v/1.2.0/objects/transactions/exercise/PlanSecurityExercise.schema.json
|
|
18
|
-
*/
|
|
19
|
-
export declare function exerciseGrant(client: LedgerJsonApiClient, params: ExerciseGrantParams): Promise<ExerciseGrantResult>;
|
|
20
|
-
//# sourceMappingURL=exerciseGrant.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"exerciseGrant.d.ts","sourceRoot":"","sources":["../../../src/functions/stockPlan/exerciseGrant.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,0CAA0C,CAAC;AACpE,OAAO,EAAE,mBAAmB,EAAE,MAAM,2BAA2B,CAAC;AAEhE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAE9C,MAAM,WAAW,mBAAmB;IAClC,2BAA2B,EAAE,MAAM,CAAC;IACpC,WAAW,EAAE,MAAM,CAAC;IACpB,oBAAoB,EAAE,UAAU,CAAC,QAAQ,CAAC,YAAY,CAAC,UAAU,CAAC,UAAU,CAAC,CAAC;IAC9E,QAAQ,EAAE,MAAM,GAAG,MAAM,CAAC;IAC1B,IAAI,EAAE,MAAM,CAAC;CACd;AAED,MAAM,WAAW,mBAAmB;IAClC,QAAQ,EAAE,MAAM,CAAC;IACjB,uBAAuB,EAAE,MAAM,CAAC;CACjC;AAED;;;GAGG;AACH,wBAAsB,aAAa,CACjC,MAAM,EAAE,mBAAmB,EAC3B,MAAM,EAAE,mBAAmB,GAC1B,OAAO,CAAC,mBAAmB,CAAC,CA4B9B"}
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.exerciseGrant = exerciseGrant;
|
|
4
|
-
const open_captable_protocol_daml_js_1 = require("@fairmint/open-captable-protocol-daml-js");
|
|
5
|
-
/**
|
|
6
|
-
* Exercise a plan security grant by exercising the ExerciseGrant choice on PlanSecurityGrant
|
|
7
|
-
* @see https://schema.opencaptablecoalition.com/v/1.2.0/objects/transactions/exercise/PlanSecurityExercise.schema.json
|
|
8
|
-
*/
|
|
9
|
-
async function exerciseGrant(client, params) {
|
|
10
|
-
const choiceArgs = {
|
|
11
|
-
stock_class: params.stockClassContractId,
|
|
12
|
-
quantity: typeof params.quantity === 'number' ? params.quantity.toString() : params.quantity,
|
|
13
|
-
date: `${params.date}T00:00:00.000Z`
|
|
14
|
-
};
|
|
15
|
-
const response = await client.submitAndWaitForTransactionTree({
|
|
16
|
-
actAs: [params.issuerParty],
|
|
17
|
-
commands: [
|
|
18
|
-
{
|
|
19
|
-
ExerciseCommand: {
|
|
20
|
-
templateId: open_captable_protocol_daml_js_1.Fairmint.OpenCapTable.StockPlan.PlanSecurityGrant.templateId,
|
|
21
|
-
contractId: params.planSecurityGrantContractId,
|
|
22
|
-
choice: 'ExerciseGrant',
|
|
23
|
-
choiceArgument: choiceArgs
|
|
24
|
-
}
|
|
25
|
-
}
|
|
26
|
-
]
|
|
27
|
-
});
|
|
28
|
-
const created = Object.values(response.transactionTree.eventsById).find((e) => 'CreatedTreeEvent' in e && e.CreatedTreeEvent.value.templateId === open_captable_protocol_daml_js_1.Fairmint.OpenCapTable.StockClass.StockPosition.templateId);
|
|
29
|
-
if (!created)
|
|
30
|
-
throw new Error('StockPosition not found');
|
|
31
|
-
return { updateId: response.transactionTree.updateId, stockPositionContractId: created.CreatedTreeEvent.value.contractId };
|
|
32
|
-
}
|
|
33
|
-
//# sourceMappingURL=exerciseGrant.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"exerciseGrant.js","sourceRoot":"","sources":["../../../src/functions/stockPlan/exerciseGrant.ts"],"names":[],"mappings":";;AAsBA,sCA+BC;AArDD,6FAAoE;AAkBpE;;;GAGG;AACI,KAAK,UAAU,aAAa,CACjC,MAA2B,EAC3B,MAA2B;IAE3B,MAAM,UAAU,GAAkD;QAChE,WAAW,EAAE,MAAM,CAAC,oBAAoB;QACxC,QAAQ,EAAE,OAAO,MAAM,CAAC,QAAQ,KAAK,QAAQ,CAAC,CAAC,CAAC,MAAM,CAAC,QAAQ,CAAC,QAAQ,EAAE,CAAC,CAAC,CAAC,MAAM,CAAC,QAAQ;QAC5F,IAAI,EAAE,GAAG,MAAM,CAAC,IAAI,gBAAgB;KACrC,CAAC;IAEF,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,SAAS,CAAC,iBAAiB,CAAC,UAAU;oBACxE,UAAU,EAAE,MAAM,CAAC,2BAA2B;oBAC9C,MAAM,EAAE,eAAe;oBACvB,cAAc,EAAE,UAAU;iBAC3B;aACF;SACF;KACF,CAA4C,CAAC;IAE9C,MAAM,OAAO,GAAG,MAAM,CAAC,MAAM,CAAC,QAAQ,CAAC,eAAe,CAAC,UAAU,CAAC,CAAC,IAAI,CACrE,CAAC,CAAM,EAAE,EAAE,CAAC,kBAAkB,IAAI,CAAC,IAAI,CAAC,CAAC,gBAAgB,CAAC,KAAK,CAAC,UAAU,KAAK,yCAAQ,CAAC,YAAY,CAAC,UAAU,CAAC,aAAa,CAAC,UAAU,CAClI,CAAC;IAET,IAAI,CAAC,OAAO;QAAE,MAAM,IAAI,KAAK,CAAC,yBAAyB,CAAC,CAAC;IAEzD,OAAO,EAAE,QAAQ,EAAE,QAAQ,CAAC,eAAe,CAAC,QAAQ,EAAE,uBAAuB,EAAE,OAAO,CAAC,gBAAgB,CAAC,KAAK,CAAC,UAAU,EAAE,CAAC;AAC7H,CAAC"}
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
import { LedgerJsonApiClient } from '@fairmint/canton-node-sdk';
|
|
2
|
-
import { ContractDetails } from '../../types/contractDetails';
|
|
3
|
-
import { OcfEquityCompensationIssuanceData } from '../../types/native';
|
|
4
|
-
export interface IssuePlanSecurityParams {
|
|
5
|
-
stockPlanContractId: string;
|
|
6
|
-
featuredAppRightContractDetails: ContractDetails;
|
|
7
|
-
issuerParty: string;
|
|
8
|
-
stakeholderParty: string;
|
|
9
|
-
stockClassContractId: string;
|
|
10
|
-
vestingTermsContractId?: string;
|
|
11
|
-
issuanceData: OcfEquityCompensationIssuanceData;
|
|
12
|
-
}
|
|
13
|
-
export interface IssuePlanSecurityResult {
|
|
14
|
-
contractId: string;
|
|
15
|
-
updateId: string;
|
|
16
|
-
}
|
|
17
|
-
/**
|
|
18
|
-
* Issue an equity compensation plan security by exercising the IssuePlanSecurity choice on a StockPlan
|
|
19
|
-
*
|
|
20
|
-
* Schema: https://schema.opencaptablecoalition.com/v/1.2.0/objects/transactions/issuance/EquityCompensationIssuance.schema.json
|
|
21
|
-
* - stockClassContractId: Class the security will ultimately exercise into
|
|
22
|
-
* - vestingTermsContractId (optional): Vesting terms to apply
|
|
23
|
-
* - issuanceData: compensation_type, quantity, optional exercise/base price, early_exercisable, vestings or vesting_terms_id,
|
|
24
|
-
* expiration_date, termination_exercise_windows, comments
|
|
25
|
-
*/
|
|
26
|
-
export declare function issuePlanSecurity(client: LedgerJsonApiClient, params: IssuePlanSecurityParams): Promise<IssuePlanSecurityResult>;
|
|
27
|
-
//# sourceMappingURL=issuePlanSecurity.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"issuePlanSecurity.d.ts","sourceRoot":"","sources":["../../../src/functions/stockPlan/issuePlanSecurity.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,mBAAmB,EAAE,MAAM,2BAA2B,CAAC;AAGhE,OAAO,EAAE,eAAe,EAAE,MAAM,6BAA6B,CAAC;AAC9D,OAAO,EAAE,iCAAiC,EAAE,MAAM,oBAAoB,CAAC;AAGvE,MAAM,WAAW,uBAAuB;IACtC,mBAAmB,EAAE,MAAM,CAAC;IAC5B,+BAA+B,EAAE,eAAe,CAAC;IACjD,WAAW,EAAE,MAAM,CAAC;IACpB,gBAAgB,EAAE,MAAM,CAAC;IACzB,oBAAoB,EAAE,MAAM,CAAC;IAC7B,sBAAsB,CAAC,EAAE,MAAM,CAAC;IAChC,YAAY,EAAE,iCAAiC,CAAC;CACjD;AAED,MAAM,WAAW,uBAAuB;IACtC,UAAU,EAAE,MAAM,CAAC;IACnB,QAAQ,EAAE,MAAM,CAAC;CAClB;AAED;;;;;;;;GAQG;AACH,wBAAsB,iBAAiB,CACrC,MAAM,EAAE,mBAAmB,EAC3B,MAAM,EAAE,uBAAuB,GAC9B,OAAO,CAAC,uBAAuB,CAAC,CA0ClC"}
|
|
@@ -1,53 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.issuePlanSecurity = issuePlanSecurity;
|
|
4
|
-
const open_captable_protocol_daml_js_1 = require("@fairmint/open-captable-protocol-daml-js");
|
|
5
|
-
const findCreatedEvent_1 = require("../../utils/findCreatedEvent");
|
|
6
|
-
const typeConversions_1 = require("../../utils/typeConversions");
|
|
7
|
-
/**
|
|
8
|
-
* Issue an equity compensation plan security by exercising the IssuePlanSecurity choice on a StockPlan
|
|
9
|
-
*
|
|
10
|
-
* Schema: https://schema.opencaptablecoalition.com/v/1.2.0/objects/transactions/issuance/EquityCompensationIssuance.schema.json
|
|
11
|
-
* - stockClassContractId: Class the security will ultimately exercise into
|
|
12
|
-
* - vestingTermsContractId (optional): Vesting terms to apply
|
|
13
|
-
* - issuanceData: compensation_type, quantity, optional exercise/base price, early_exercisable, vestings or vesting_terms_id,
|
|
14
|
-
* expiration_date, termination_exercise_windows, comments
|
|
15
|
-
*/
|
|
16
|
-
async function issuePlanSecurity(client, params) {
|
|
17
|
-
const choiceArguments = {
|
|
18
|
-
stakeholder: params.stakeholderParty,
|
|
19
|
-
issuance_data: (0, typeConversions_1.equityCompIssuanceDataToDaml)(params.issuanceData),
|
|
20
|
-
stock_class: params.stockClassContractId,
|
|
21
|
-
vesting_terms: params.vestingTermsContractId ? { tag: 'Some', value: params.vestingTermsContractId } : null
|
|
22
|
-
};
|
|
23
|
-
const response = await client.submitAndWaitForTransactionTree({
|
|
24
|
-
actAs: [params.issuerParty],
|
|
25
|
-
commands: [
|
|
26
|
-
{
|
|
27
|
-
ExerciseCommand: {
|
|
28
|
-
templateId: open_captable_protocol_daml_js_1.Fairmint.OpenCapTable.StockPlan.StockPlan.templateId,
|
|
29
|
-
contractId: params.stockPlanContractId,
|
|
30
|
-
choice: 'IssuePlanSecurity',
|
|
31
|
-
choiceArgument: choiceArguments
|
|
32
|
-
}
|
|
33
|
-
}
|
|
34
|
-
],
|
|
35
|
-
disclosedContracts: [
|
|
36
|
-
{
|
|
37
|
-
templateId: params.featuredAppRightContractDetails.templateId,
|
|
38
|
-
contractId: params.featuredAppRightContractDetails.contractId,
|
|
39
|
-
createdEventBlob: params.featuredAppRightContractDetails.createdEventBlob,
|
|
40
|
-
synchronizerId: params.featuredAppRightContractDetails.synchronizerId
|
|
41
|
-
}
|
|
42
|
-
]
|
|
43
|
-
});
|
|
44
|
-
const created = (0, findCreatedEvent_1.findCreatedEventByTemplateId)(response, open_captable_protocol_daml_js_1.Fairmint.OpenCapTable.StockPlan.PlanSecurityGrant.templateId);
|
|
45
|
-
if (!created) {
|
|
46
|
-
throw new Error('Expected CreatedTreeEvent not found');
|
|
47
|
-
}
|
|
48
|
-
return {
|
|
49
|
-
contractId: created.CreatedTreeEvent.value.contractId,
|
|
50
|
-
updateId: response.transactionTree.updateId
|
|
51
|
-
};
|
|
52
|
-
}
|
|
53
|
-
//# sourceMappingURL=issuePlanSecurity.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"issuePlanSecurity.js","sourceRoot":"","sources":["../../../src/functions/stockPlan/issuePlanSecurity.ts"],"names":[],"mappings":";;AAgCA,8CA6CC;AA7ED,6FAAoE;AAGpE,mEAA4E;AAG5E,iEAA2E;AAiB3E;;;;;;;;GAQG;AACI,KAAK,UAAU,iBAAiB,CACrC,MAA2B,EAC3B,MAA+B;IAE/B,MAAM,eAAe,GAAsD;QACzE,WAAW,EAAE,MAAM,CAAC,gBAAgB;QACpC,aAAa,EAAE,IAAA,8CAA4B,EAAC,MAAM,CAAC,YAAY,CAAC;QAChE,WAAW,EAAE,MAAM,CAAC,oBAAoB;QACxC,aAAa,EAAE,MAAM,CAAC,sBAAsB,CAAC,CAAC,CAAC,EAAE,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,CAAC,sBAAsB,EAAS,CAAC,CAAC,CAAC,IAAI;KAC5G,CAAC;IAET,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,SAAS,CAAC,SAAS,CAAC,UAAU;oBAChE,UAAU,EAAE,MAAM,CAAC,mBAAmB;oBACtC,MAAM,EAAE,mBAAmB;oBAC3B,cAAc,EAAE,eAAe;iBAChC;aACF;SACF;QACD,kBAAkB,EAAE;YAClB;gBACE,UAAU,EAAE,MAAM,CAAC,+BAA+B,CAAC,UAAU;gBAC7D,UAAU,EAAE,MAAM,CAAC,+BAA+B,CAAC,UAAU;gBAC7D,gBAAgB,EAAE,MAAM,CAAC,+BAA+B,CAAC,gBAAgB;gBACzE,cAAc,EAAE,MAAM,CAAC,+BAA+B,CAAC,cAAc;aACtE;SACF;KACF,CAA4C,CAAC;IAE9C,MAAM,OAAO,GAAG,IAAA,+CAA4B,EAC1C,QAAQ,EACR,yCAAQ,CAAC,YAAY,CAAC,SAAS,CAAC,iBAAiB,CAAC,UAAU,CAC7D,CAAC;IACF,IAAI,CAAC,OAAO,EAAE,CAAC;QACb,MAAM,IAAI,KAAK,CAAC,qCAAqC,CAAC,CAAC;IACzD,CAAC;IAED,OAAO;QACL,UAAU,EAAE,OAAO,CAAC,gBAAgB,CAAC,KAAK,CAAC,UAAU;QACrD,QAAQ,EAAE,QAAQ,CAAC,eAAe,CAAC,QAAQ;KAC5C,CAAC;AACJ,CAAC"}
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { LedgerJsonApiClient } from '@fairmint/canton-node-sdk';
|
|
2
|
-
export interface ReleaseGrantParams {
|
|
3
|
-
planSecurityGrantContractId: string;
|
|
4
|
-
issuerParty: string;
|
|
5
|
-
date: string;
|
|
6
|
-
}
|
|
7
|
-
export interface ReleaseGrantResult {
|
|
8
|
-
updateId: string;
|
|
9
|
-
releaseEventContractId: string;
|
|
10
|
-
}
|
|
11
|
-
/**
|
|
12
|
-
* Release a plan security grant by exercising the ReleaseGrant choice on PlanSecurityGrant
|
|
13
|
-
* @see https://schema.opencaptablecoalition.com/v/1.2.0/objects/transactions/release/EquityCompensationRelease.schema.json
|
|
14
|
-
*/
|
|
15
|
-
export declare function releaseGrant(client: LedgerJsonApiClient, params: ReleaseGrantParams): Promise<ReleaseGrantResult>;
|
|
16
|
-
//# sourceMappingURL=releaseGrant.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"releaseGrant.d.ts","sourceRoot":"","sources":["../../../src/functions/stockPlan/releaseGrant.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,mBAAmB,EAAE,MAAM,2BAA2B,CAAC;AAGhE,MAAM,WAAW,kBAAkB;IACjC,2BAA2B,EAAE,MAAM,CAAC;IACpC,WAAW,EAAE,MAAM,CAAC;IACpB,IAAI,EAAE,MAAM,CAAC;CACd;AAED,MAAM,WAAW,kBAAkB;IACjC,QAAQ,EAAE,MAAM,CAAC;IACjB,sBAAsB,EAAE,MAAM,CAAC;CAChC;AAED;;;GAGG;AACH,wBAAsB,YAAY,CAChC,MAAM,EAAE,mBAAmB,EAC3B,MAAM,EAAE,kBAAkB,GACzB,OAAO,CAAC,kBAAkB,CAAC,CA0B7B"}
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.releaseGrant = releaseGrant;
|
|
4
|
-
const open_captable_protocol_daml_js_1 = require("@fairmint/open-captable-protocol-daml-js");
|
|
5
|
-
/**
|
|
6
|
-
* Release a plan security grant by exercising the ReleaseGrant choice on PlanSecurityGrant
|
|
7
|
-
* @see https://schema.opencaptablecoalition.com/v/1.2.0/objects/transactions/release/EquityCompensationRelease.schema.json
|
|
8
|
-
*/
|
|
9
|
-
async function releaseGrant(client, params) {
|
|
10
|
-
const choiceArgs = {
|
|
11
|
-
date: `${params.date}T00:00:00.000Z`
|
|
12
|
-
};
|
|
13
|
-
const response = await client.submitAndWaitForTransactionTree({
|
|
14
|
-
actAs: [params.issuerParty],
|
|
15
|
-
commands: [
|
|
16
|
-
{
|
|
17
|
-
ExerciseCommand: {
|
|
18
|
-
templateId: open_captable_protocol_daml_js_1.Fairmint.OpenCapTable.StockPlan.PlanSecurityGrant.templateId,
|
|
19
|
-
contractId: params.planSecurityGrantContractId,
|
|
20
|
-
choice: 'ReleaseGrant',
|
|
21
|
-
choiceArgument: choiceArgs
|
|
22
|
-
}
|
|
23
|
-
}
|
|
24
|
-
]
|
|
25
|
-
});
|
|
26
|
-
const created = Object.values(response.transactionTree.eventsById).find((e) => 'CreatedTreeEvent' in e && e.CreatedTreeEvent.value.templateId === open_captable_protocol_daml_js_1.Fairmint.OpenCapTable.StockPlan.PlanSecurityRelease.templateId);
|
|
27
|
-
if (!created)
|
|
28
|
-
throw new Error('PlanSecurityRelease not found');
|
|
29
|
-
return { updateId: response.transactionTree.updateId, releaseEventContractId: created.CreatedTreeEvent.value.contractId };
|
|
30
|
-
}
|
|
31
|
-
//# sourceMappingURL=releaseGrant.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"releaseGrant.js","sourceRoot":"","sources":["../../../src/functions/stockPlan/releaseGrant.ts"],"names":[],"mappings":";;AAmBA,oCA6BC;AAhDD,6FAAoE;AAepE;;;GAGG;AACI,KAAK,UAAU,YAAY,CAChC,MAA2B,EAC3B,MAA0B;IAE1B,MAAM,UAAU,GAAiD;QAC/D,IAAI,EAAE,GAAG,MAAM,CAAC,IAAI,gBAAgB;KACrC,CAAC;IAEF,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,SAAS,CAAC,iBAAiB,CAAC,UAAU;oBACxE,UAAU,EAAE,MAAM,CAAC,2BAA2B;oBAC9C,MAAM,EAAE,cAAc;oBACtB,cAAc,EAAE,UAAU;iBAC3B;aACF;SACF;KACF,CAA4C,CAAC;IAE9C,MAAM,OAAO,GAAG,MAAM,CAAC,MAAM,CAAC,QAAQ,CAAC,eAAe,CAAC,UAAU,CAAC,CAAC,IAAI,CACrE,CAAC,CAAM,EAAE,EAAE,CAAC,kBAAkB,IAAI,CAAC,IAAI,CAAC,CAAC,gBAAgB,CAAC,KAAK,CAAC,UAAU,KAAK,yCAAQ,CAAC,YAAY,CAAC,SAAS,CAAC,mBAAmB,CAAC,UAAU,CACvI,CAAC;IAET,IAAI,CAAC,OAAO;QAAE,MAAM,IAAI,KAAK,CAAC,+BAA+B,CAAC,CAAC;IAE/D,OAAO,EAAE,QAAQ,EAAE,QAAQ,CAAC,eAAe,CAAC,QAAQ,EAAE,sBAAsB,EAAE,OAAO,CAAC,gBAAgB,CAAC,KAAK,CAAC,UAAU,EAAE,CAAC;AAC5H,CAAC"}
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import { Fairmint } from '@fairmint/open-captable-protocol-daml-js';
|
|
2
|
-
import type { ContractId } from '@daml/types';
|
|
3
|
-
import { LedgerJsonApiClient } from '@fairmint/canton-node-sdk';
|
|
4
|
-
export interface RepriceGrantParams {
|
|
5
|
-
planSecurityContractId: ContractId<Fairmint.OpenCapTable.StockPlan.PlanSecurityGrant>;
|
|
6
|
-
issuerParty: string;
|
|
7
|
-
newExercisePrice: {
|
|
8
|
-
amount: string | number;
|
|
9
|
-
currency: string;
|
|
10
|
-
};
|
|
11
|
-
date: string;
|
|
12
|
-
}
|
|
13
|
-
export interface RepriceGrantResult {
|
|
14
|
-
updateId: string;
|
|
15
|
-
repricingEventContractId: string;
|
|
16
|
-
}
|
|
17
|
-
/**
|
|
18
|
-
* Reprice an equity compensation grant by adjusting its exercise price.
|
|
19
|
-
* Schema: https://schema.opencaptablecoalition.com/v/1.2.0/objects/transactions/repricing/EquityCompensationRepricing.schema.json
|
|
20
|
-
*/
|
|
21
|
-
export declare function repriceGrant(client: LedgerJsonApiClient, params: RepriceGrantParams): Promise<RepriceGrantResult>;
|
|
22
|
-
//# sourceMappingURL=repriceGrant.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"repriceGrant.d.ts","sourceRoot":"","sources":["../../../src/functions/stockPlan/repriceGrant.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,0CAA0C,CAAC;AACpE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAC9C,OAAO,EAAE,mBAAmB,EAAE,MAAM,2BAA2B,CAAC;AAGhE,MAAM,WAAW,kBAAkB;IACjC,sBAAsB,EAAE,UAAU,CAAC,QAAQ,CAAC,YAAY,CAAC,SAAS,CAAC,iBAAiB,CAAC,CAAC;IACtF,WAAW,EAAE,MAAM,CAAC;IACpB,gBAAgB,EAAE;QAAE,MAAM,EAAE,MAAM,GAAG,MAAM,CAAC;QAAC,QAAQ,EAAE,MAAM,CAAA;KAAE,CAAC;IAChE,IAAI,EAAE,MAAM,CAAC;CACd;AAED,MAAM,WAAW,kBAAkB;IACjC,QAAQ,EAAE,MAAM,CAAC;IACjB,wBAAwB,EAAE,MAAM,CAAC;CAClC;AAED;;;GAGG;AACH,wBAAsB,YAAY,CAChC,MAAM,EAAE,mBAAmB,EAC3B,MAAM,EAAE,kBAAkB,GACzB,OAAO,CAAC,kBAAkB,CAAC,CAmC7B"}
|