@open-captable-protocol/canton 0.0.40 → 0.1.1
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 +53 -0
- package/dist/OcpClient.d.ts.map +1 -1
- package/dist/OcpClient.js +89 -0
- package/dist/OcpClient.js.map +1 -1
- package/dist/functions/convertible/acceptConvertible.d.ts +18 -0
- package/dist/functions/convertible/acceptConvertible.d.ts.map +1 -0
- package/dist/functions/convertible/acceptConvertible.js +31 -0
- package/dist/functions/convertible/acceptConvertible.js.map +1 -0
- package/dist/functions/convertible/cancelConvertible.d.ts +23 -0
- package/dist/functions/convertible/cancelConvertible.d.ts.map +1 -0
- package/dist/functions/convertible/cancelConvertible.js +37 -0
- package/dist/functions/convertible/cancelConvertible.js.map +1 -0
- package/dist/functions/convertible/convertConvertible.d.ts +18 -0
- package/dist/functions/convertible/convertConvertible.d.ts.map +1 -0
- package/dist/functions/convertible/convertConvertible.js +33 -0
- package/dist/functions/convertible/convertConvertible.js.map +1 -0
- package/dist/functions/convertible/getConvertibleAsOcf.d.ts +21 -0
- package/dist/functions/convertible/getConvertibleAsOcf.d.ts.map +1 -0
- package/dist/functions/convertible/getConvertibleAsOcf.js +24 -0
- package/dist/functions/convertible/getConvertibleAsOcf.js.map +1 -0
- package/dist/functions/convertible/getConvertibleConversionEventAsOcf.d.ts +19 -0
- package/dist/functions/convertible/getConvertibleConversionEventAsOcf.d.ts.map +1 -0
- package/dist/functions/convertible/getConvertibleConversionEventAsOcf.js +21 -0
- package/dist/functions/convertible/getConvertibleConversionEventAsOcf.js.map +1 -0
- package/dist/functions/convertible/index.d.ts +9 -0
- package/dist/functions/convertible/index.d.ts.map +1 -0
- package/dist/functions/convertible/index.js +25 -0
- package/dist/functions/convertible/index.js.map +1 -0
- package/dist/functions/convertible/issueConvertible.d.ts +20 -0
- package/dist/functions/convertible/issueConvertible.d.ts.map +1 -0
- package/dist/functions/convertible/issueConvertible.js +46 -0
- package/dist/functions/convertible/issueConvertible.js.map +1 -0
- package/dist/functions/convertible/retractConvertible.d.ts +19 -0
- package/dist/functions/convertible/retractConvertible.d.ts.map +1 -0
- package/dist/functions/convertible/retractConvertible.js +32 -0
- package/dist/functions/convertible/retractConvertible.js.map +1 -0
- package/dist/functions/convertible/transferConvertible.d.ts +25 -0
- package/dist/functions/convertible/transferConvertible.d.ts.map +1 -0
- package/dist/functions/convertible/transferConvertible.js +45 -0
- package/dist/functions/convertible/transferConvertible.js.map +1 -0
- package/dist/functions/index.d.ts +9 -0
- package/dist/functions/index.d.ts.map +1 -1
- package/dist/functions/index.js +9 -0
- package/dist/functions/index.js.map +1 -1
- package/dist/functions/issuer/adjustAuthorizedShares.d.ts +20 -0
- package/dist/functions/issuer/adjustAuthorizedShares.d.ts.map +1 -0
- package/dist/functions/issuer/adjustAuthorizedShares.js +33 -0
- package/dist/functions/issuer/adjustAuthorizedShares.js.map +1 -0
- package/dist/functions/issuer/createIssuer.d.ts +17 -1
- package/dist/functions/issuer/createIssuer.d.ts.map +1 -1
- package/dist/functions/issuer/createIssuer.js.map +1 -1
- package/dist/functions/issuer/createValuation.d.ts +30 -0
- package/dist/functions/issuer/createValuation.d.ts.map +1 -0
- package/dist/functions/issuer/createValuation.js +54 -0
- package/dist/functions/issuer/createValuation.js.map +1 -0
- package/dist/functions/issuer/getIssuerAsOcf.d.ts +7 -57
- package/dist/functions/issuer/getIssuerAsOcf.d.ts.map +1 -1
- package/dist/functions/issuer/getIssuerAsOcf.js +22 -100
- package/dist/functions/issuer/getIssuerAsOcf.js.map +1 -1
- package/dist/functions/issuer/index.d.ts +2 -0
- package/dist/functions/issuer/index.d.ts.map +1 -1
- package/dist/functions/issuer/index.js +2 -0
- package/dist/functions/issuer/index.js.map +1 -1
- package/dist/functions/issuer/updateIssuerData.d.ts +5 -0
- package/dist/functions/issuer/updateIssuerData.d.ts.map +1 -1
- package/dist/functions/issuer/updateIssuerData.js.map +1 -1
- package/dist/functions/issuerAuthorization/index.d.ts +2 -0
- package/dist/functions/issuerAuthorization/index.d.ts.map +1 -0
- package/dist/functions/issuerAuthorization/index.js +18 -0
- package/dist/functions/issuerAuthorization/index.js.map +1 -0
- package/dist/functions/issuerAuthorization/withdrawAuthorization.d.ts +10 -0
- package/dist/functions/issuerAuthorization/withdrawAuthorization.d.ts.map +1 -0
- package/dist/functions/issuerAuthorization/withdrawAuthorization.js +21 -0
- package/dist/functions/issuerAuthorization/withdrawAuthorization.js.map +1 -0
- package/dist/functions/stakeholder/createStakeholder.d.ts +19 -0
- package/dist/functions/stakeholder/createStakeholder.d.ts.map +1 -0
- package/dist/functions/stakeholder/createStakeholder.js +45 -0
- package/dist/functions/stakeholder/createStakeholder.js.map +1 -0
- package/dist/functions/stakeholder/getStakeholderAsOcf.d.ts +65 -0
- package/dist/functions/stakeholder/getStakeholderAsOcf.d.ts.map +1 -0
- package/dist/functions/stakeholder/getStakeholderAsOcf.js +38 -0
- package/dist/functions/stakeholder/getStakeholderAsOcf.js.map +1 -0
- package/dist/functions/stakeholder/index.d.ts +8 -0
- package/dist/functions/stakeholder/index.d.ts.map +1 -0
- package/dist/functions/stakeholder/index.js +24 -0
- package/dist/functions/stakeholder/index.js.map +1 -0
- package/dist/functions/stakeholder/recordRelationshipChange.d.ts +20 -0
- package/dist/functions/stakeholder/recordRelationshipChange.d.ts.map +1 -0
- package/dist/functions/stakeholder/recordRelationshipChange.js +33 -0
- package/dist/functions/stakeholder/recordRelationshipChange.js.map +1 -0
- package/dist/functions/stakeholder/recordStatusChange.d.ts +19 -0
- package/dist/functions/stakeholder/recordStatusChange.d.ts.map +1 -0
- package/dist/functions/stakeholder/recordStatusChange.js +32 -0
- package/dist/functions/stakeholder/recordStatusChange.js.map +1 -0
- package/dist/functions/stakeholder/updateStakeholderData.d.ts +17 -0
- package/dist/functions/stakeholder/updateStakeholderData.d.ts.map +1 -0
- package/dist/functions/stakeholder/updateStakeholderData.js +59 -0
- package/dist/functions/stakeholder/updateStakeholderData.js.map +1 -0
- package/dist/functions/stockClass/adjustAuthorizedShares.d.ts +20 -0
- package/dist/functions/stockClass/adjustAuthorizedShares.d.ts.map +1 -0
- package/dist/functions/stockClass/adjustAuthorizedShares.js +28 -0
- package/dist/functions/stockClass/adjustAuthorizedShares.js.map +1 -0
- package/dist/functions/stockClass/adjustConversionRatio.d.ts +23 -0
- package/dist/functions/stockClass/adjustConversionRatio.d.ts.map +1 -0
- package/dist/functions/stockClass/adjustConversionRatio.js +39 -0
- package/dist/functions/stockClass/adjustConversionRatio.js.map +1 -0
- package/dist/functions/stockClass/consolidatePositions.d.ts +21 -0
- package/dist/functions/stockClass/consolidatePositions.d.ts.map +1 -0
- package/dist/functions/stockClass/consolidatePositions.js +34 -0
- package/dist/functions/stockClass/consolidatePositions.js.map +1 -0
- package/dist/functions/stockClass/createStockClass.d.ts +19 -1
- package/dist/functions/stockClass/createStockClass.d.ts.map +1 -1
- package/dist/functions/stockClass/createStockClass.js.map +1 -1
- package/dist/functions/stockClass/getStockIssuanceEventAsOcf.d.ts +22 -0
- package/dist/functions/stockClass/getStockIssuanceEventAsOcf.d.ts.map +1 -0
- package/dist/functions/stockClass/getStockIssuanceEventAsOcf.js +23 -0
- package/dist/functions/stockClass/getStockIssuanceEventAsOcf.js.map +1 -0
- package/dist/functions/stockClass/getStockRepurchaseEventAsOcf.d.ts +22 -0
- package/dist/functions/stockClass/getStockRepurchaseEventAsOcf.d.ts.map +1 -0
- package/dist/functions/stockClass/getStockRepurchaseEventAsOcf.js +23 -0
- package/dist/functions/stockClass/getStockRepurchaseEventAsOcf.js.map +1 -0
- package/dist/functions/stockClass/getStockTransferEventAsOcf.d.ts +23 -0
- package/dist/functions/stockClass/getStockTransferEventAsOcf.d.ts.map +1 -0
- package/dist/functions/stockClass/getStockTransferEventAsOcf.js +24 -0
- package/dist/functions/stockClass/getStockTransferEventAsOcf.js.map +1 -0
- package/dist/functions/stockClass/index.d.ts +5 -0
- package/dist/functions/stockClass/index.d.ts.map +1 -1
- package/dist/functions/stockClass/index.js +5 -0
- package/dist/functions/stockClass/index.js.map +1 -1
- package/dist/functions/stockClass/issueStock.d.ts +19 -0
- package/dist/functions/stockClass/issueStock.d.ts.map +1 -0
- package/dist/functions/stockClass/issueStock.js +34 -0
- package/dist/functions/stockClass/issueStock.js.map +1 -0
- package/dist/functions/stockClass/reissueStock.d.ts +18 -0
- package/dist/functions/stockClass/reissueStock.d.ts.map +1 -0
- package/dist/functions/stockClass/reissueStock.js +35 -0
- package/dist/functions/stockClass/reissueStock.js.map +1 -0
- package/dist/functions/stockClass/repurchaseStock.d.ts +20 -0
- package/dist/functions/stockClass/repurchaseStock.d.ts.map +1 -0
- package/dist/functions/stockClass/repurchaseStock.js +33 -0
- package/dist/functions/stockClass/repurchaseStock.js.map +1 -0
- package/dist/functions/stockClass/splitStockClass.d.ts +18 -0
- package/dist/functions/stockClass/splitStockClass.d.ts.map +1 -0
- package/dist/functions/stockClass/splitStockClass.js +33 -0
- package/dist/functions/stockClass/splitStockClass.js.map +1 -0
- package/dist/functions/stockLegendTemplate/createStockLegendTemplate.d.ts +15 -0
- package/dist/functions/stockLegendTemplate/createStockLegendTemplate.d.ts.map +1 -0
- package/dist/functions/stockLegendTemplate/createStockLegendTemplate.js +41 -0
- package/dist/functions/stockLegendTemplate/createStockLegendTemplate.js.map +1 -0
- package/dist/functions/stockLegendTemplate/getStockLegendTemplateAsOcf.d.ts +17 -0
- package/dist/functions/stockLegendTemplate/getStockLegendTemplateAsOcf.d.ts.map +1 -0
- package/dist/functions/stockLegendTemplate/getStockLegendTemplateAsOcf.js +25 -0
- package/dist/functions/stockLegendTemplate/getStockLegendTemplateAsOcf.js.map +1 -0
- package/dist/functions/stockLegendTemplate/index.d.ts +4 -0
- package/dist/functions/stockLegendTemplate/index.d.ts.map +1 -0
- package/dist/functions/stockLegendTemplate/index.js +20 -0
- package/dist/functions/stockLegendTemplate/index.js.map +1 -0
- package/dist/functions/stockLegendTemplate/updateStockLegendTemplate.d.ts +14 -0
- package/dist/functions/stockLegendTemplate/updateStockLegendTemplate.d.ts.map +1 -0
- package/dist/functions/stockLegendTemplate/updateStockLegendTemplate.js +56 -0
- package/dist/functions/stockLegendTemplate/updateStockLegendTemplate.js.map +1 -0
- package/dist/functions/stockPlan/acceptGrant.d.ts +16 -0
- package/dist/functions/stockPlan/acceptGrant.d.ts.map +1 -0
- package/dist/functions/stockPlan/acceptGrant.js +31 -0
- package/dist/functions/stockPlan/acceptGrant.js.map +1 -0
- package/dist/functions/stockPlan/adjustPool.d.ts +20 -0
- package/dist/functions/stockPlan/adjustPool.d.ts.map +1 -0
- package/dist/functions/stockPlan/adjustPool.js +33 -0
- package/dist/functions/stockPlan/adjustPool.js.map +1 -0
- package/dist/functions/stockPlan/cancelGrant.d.ts +16 -0
- package/dist/functions/stockPlan/cancelGrant.d.ts.map +1 -0
- package/dist/functions/stockPlan/cancelGrant.js +31 -0
- package/dist/functions/stockPlan/cancelGrant.js.map +1 -0
- package/dist/functions/stockPlan/createStockPlan.d.ts +29 -0
- package/dist/functions/stockPlan/createStockPlan.d.ts.map +1 -0
- package/dist/functions/stockPlan/createStockPlan.js +53 -0
- package/dist/functions/stockPlan/createStockPlan.js.map +1 -0
- package/dist/functions/stockPlan/exerciseGrant.d.ts +20 -0
- package/dist/functions/stockPlan/exerciseGrant.d.ts.map +1 -0
- package/dist/functions/stockPlan/exerciseGrant.js +33 -0
- package/dist/functions/stockPlan/exerciseGrant.js.map +1 -0
- package/dist/functions/stockPlan/getEquityCompensationExerciseEventAsOcf.d.ts +24 -0
- package/dist/functions/stockPlan/getEquityCompensationExerciseEventAsOcf.d.ts.map +1 -0
- package/dist/functions/stockPlan/getEquityCompensationExerciseEventAsOcf.js +26 -0
- package/dist/functions/stockPlan/getEquityCompensationExerciseEventAsOcf.js.map +1 -0
- package/dist/functions/stockPlan/getStockPlanAsOcf.d.ts +25 -0
- package/dist/functions/stockPlan/getStockPlanAsOcf.d.ts.map +1 -0
- package/dist/functions/stockPlan/getStockPlanAsOcf.js +27 -0
- package/dist/functions/stockPlan/getStockPlanAsOcf.js.map +1 -0
- package/dist/functions/stockPlan/index.d.ts +15 -0
- package/dist/functions/stockPlan/index.d.ts.map +1 -0
- package/dist/functions/stockPlan/index.js +31 -0
- package/dist/functions/stockPlan/index.js.map +1 -0
- package/dist/functions/stockPlan/issuePlanSecurity.d.ts +27 -0
- package/dist/functions/stockPlan/issuePlanSecurity.d.ts.map +1 -0
- package/dist/functions/stockPlan/issuePlanSecurity.js +53 -0
- package/dist/functions/stockPlan/issuePlanSecurity.js.map +1 -0
- package/dist/functions/stockPlan/releaseGrant.d.ts +16 -0
- package/dist/functions/stockPlan/releaseGrant.d.ts.map +1 -0
- package/dist/functions/stockPlan/releaseGrant.js +31 -0
- package/dist/functions/stockPlan/releaseGrant.js.map +1 -0
- package/dist/functions/stockPlan/repriceGrant.d.ts +22 -0
- package/dist/functions/stockPlan/repriceGrant.d.ts.map +1 -0
- package/dist/functions/stockPlan/repriceGrant.js +38 -0
- package/dist/functions/stockPlan/repriceGrant.js.map +1 -0
- package/dist/functions/stockPlan/retractGrant.d.ts +16 -0
- package/dist/functions/stockPlan/retractGrant.d.ts.map +1 -0
- package/dist/functions/stockPlan/retractGrant.js +31 -0
- package/dist/functions/stockPlan/retractGrant.js.map +1 -0
- package/dist/functions/stockPlan/startVesting.d.ts +13 -0
- package/dist/functions/stockPlan/startVesting.d.ts.map +1 -0
- package/dist/functions/stockPlan/startVesting.js +28 -0
- package/dist/functions/stockPlan/startVesting.js.map +1 -0
- package/dist/functions/stockPlan/transferGrant.d.ts +21 -0
- package/dist/functions/stockPlan/transferGrant.d.ts.map +1 -0
- package/dist/functions/stockPlan/transferGrant.js +34 -0
- package/dist/functions/stockPlan/transferGrant.js.map +1 -0
- package/dist/functions/stockPlan/updateStockPlan.d.ts +24 -0
- package/dist/functions/stockPlan/updateStockPlan.d.ts.map +1 -0
- package/dist/functions/stockPlan/updateStockPlan.js +62 -0
- package/dist/functions/stockPlan/updateStockPlan.js.map +1 -0
- package/dist/functions/stockPosition/acceptTransfer.d.ts +16 -0
- package/dist/functions/stockPosition/acceptTransfer.d.ts.map +1 -0
- package/dist/functions/stockPosition/acceptTransfer.js +31 -0
- package/dist/functions/stockPosition/acceptTransfer.js.map +1 -0
- package/dist/functions/stockPosition/index.d.ts +5 -0
- package/dist/functions/stockPosition/index.d.ts.map +1 -0
- package/dist/functions/stockPosition/index.js +21 -0
- package/dist/functions/stockPosition/index.js.map +1 -0
- package/dist/functions/stockPosition/proposeTransfer.d.ts +17 -0
- package/dist/functions/stockPosition/proposeTransfer.d.ts.map +1 -0
- package/dist/functions/stockPosition/proposeTransfer.js +34 -0
- package/dist/functions/stockPosition/proposeTransfer.js.map +1 -0
- package/dist/functions/stockPosition/reduceQuantity.d.ts +12 -0
- package/dist/functions/stockPosition/reduceQuantity.d.ts.map +1 -0
- package/dist/functions/stockPosition/reduceQuantity.js +27 -0
- package/dist/functions/stockPosition/reduceQuantity.js.map +1 -0
- package/dist/functions/stockPosition/retractTransfer.d.ts +15 -0
- package/dist/functions/stockPosition/retractTransfer.d.ts.map +1 -0
- package/dist/functions/stockPosition/retractTransfer.js +28 -0
- package/dist/functions/stockPosition/retractTransfer.js.map +1 -0
- package/dist/functions/valuation/getValuationAsOcf.d.ts +28 -0
- package/dist/functions/valuation/getValuationAsOcf.d.ts.map +1 -0
- package/dist/functions/valuation/getValuationAsOcf.js +33 -0
- package/dist/functions/valuation/getValuationAsOcf.js.map +1 -0
- package/dist/functions/valuation/index.d.ts +4 -0
- package/dist/functions/valuation/index.d.ts.map +1 -0
- package/dist/functions/valuation/index.js +20 -0
- package/dist/functions/valuation/index.js.map +1 -0
- package/dist/functions/valuation/updateValuationData.d.ts +18 -0
- package/dist/functions/valuation/updateValuationData.d.ts.map +1 -0
- package/dist/functions/valuation/updateValuationData.js +58 -0
- package/dist/functions/valuation/updateValuationData.js.map +1 -0
- package/dist/functions/vestingTerms/createVestingTerms.d.ts +19 -0
- package/dist/functions/vestingTerms/createVestingTerms.d.ts.map +1 -0
- package/dist/functions/vestingTerms/createVestingTerms.js +45 -0
- package/dist/functions/vestingTerms/createVestingTerms.js.map +1 -0
- package/dist/functions/vestingTerms/getVestingTermsAsOcf.d.ts +23 -0
- package/dist/functions/vestingTerms/getVestingTermsAsOcf.d.ts.map +1 -0
- package/dist/functions/vestingTerms/getVestingTermsAsOcf.js +29 -0
- package/dist/functions/vestingTerms/getVestingTermsAsOcf.js.map +1 -0
- package/dist/functions/vestingTerms/index.d.ts +4 -0
- package/dist/functions/vestingTerms/index.d.ts.map +1 -0
- package/dist/functions/vestingTerms/index.js +20 -0
- package/dist/functions/vestingTerms/index.js.map +1 -0
- package/dist/functions/vestingTerms/updateVestingTerms.d.ts +18 -0
- package/dist/functions/vestingTerms/updateVestingTerms.d.ts.map +1 -0
- package/dist/functions/vestingTerms/updateVestingTerms.js +58 -0
- package/dist/functions/vestingTerms/updateVestingTerms.js.map +1 -0
- package/dist/functions/warrant/exerciseWarrant.d.ts +17 -0
- package/dist/functions/warrant/exerciseWarrant.d.ts.map +1 -0
- package/dist/functions/warrant/exerciseWarrant.js +32 -0
- package/dist/functions/warrant/exerciseWarrant.js.map +1 -0
- package/dist/functions/warrant/getWarrantAsOcf.d.ts +18 -0
- package/dist/functions/warrant/getWarrantAsOcf.d.ts.map +1 -0
- package/dist/functions/warrant/getWarrantAsOcf.js +21 -0
- package/dist/functions/warrant/getWarrantAsOcf.js.map +1 -0
- package/dist/functions/warrant/getWarrantExerciseEventAsOcf.d.ts +19 -0
- package/dist/functions/warrant/getWarrantExerciseEventAsOcf.d.ts.map +1 -0
- package/dist/functions/warrant/getWarrantExerciseEventAsOcf.js +21 -0
- package/dist/functions/warrant/getWarrantExerciseEventAsOcf.js.map +1 -0
- package/dist/functions/warrant/index.d.ts +8 -0
- package/dist/functions/warrant/index.d.ts.map +1 -0
- package/dist/functions/warrant/index.js +24 -0
- package/dist/functions/warrant/index.js.map +1 -0
- package/dist/functions/warrant/issueWarrant.d.ts +25 -0
- package/dist/functions/warrant/issueWarrant.d.ts.map +1 -0
- package/dist/functions/warrant/issueWarrant.js +49 -0
- package/dist/functions/warrant/issueWarrant.js.map +1 -0
- package/dist/functions/warrant/transferWarrant.d.ts +17 -0
- package/dist/functions/warrant/transferWarrant.d.ts.map +1 -0
- package/dist/functions/warrant/transferWarrant.js +30 -0
- package/dist/functions/warrant/transferWarrant.js.map +1 -0
- package/dist/types/native.d.ts +174 -10
- package/dist/types/native.d.ts.map +1 -1
- package/dist/utils/typeConversions.d.ts +30 -1
- package/dist/utils/typeConversions.d.ts.map +1 -1
- package/dist/utils/typeConversions.js +643 -36
- package/dist/utils/typeConversions.js.map +1 -1
- package/package.json +3 -3
- 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
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.issueConvertible = issueConvertible;
|
|
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 a convertible by exercising the IssueConvertible choice on an Issuer contract
|
|
9
|
+
* @see https://schema.opencaptablecoalition.com/v/1.2.0/objects/transactions/issuance/ConvertibleIssuance.schema.json
|
|
10
|
+
*/
|
|
11
|
+
async function issueConvertible(client, params) {
|
|
12
|
+
const choiceArguments = {
|
|
13
|
+
stakeholder: params.stakeholderParty,
|
|
14
|
+
issuance_data: (0, typeConversions_1.convertibleIssuanceToDaml)(params.issuanceData)
|
|
15
|
+
};
|
|
16
|
+
const response = await client.submitAndWaitForTransactionTree({
|
|
17
|
+
actAs: [params.issuerParty],
|
|
18
|
+
commands: [
|
|
19
|
+
{
|
|
20
|
+
ExerciseCommand: {
|
|
21
|
+
templateId: open_captable_protocol_daml_js_1.Fairmint.OpenCapTable.Issuer.Issuer.templateId,
|
|
22
|
+
contractId: params.issuerContractId,
|
|
23
|
+
choice: 'IssueConvertible',
|
|
24
|
+
choiceArgument: choiceArguments
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
],
|
|
28
|
+
disclosedContracts: [
|
|
29
|
+
{
|
|
30
|
+
templateId: params.featuredAppRightContractDetails.templateId,
|
|
31
|
+
contractId: params.featuredAppRightContractDetails.contractId,
|
|
32
|
+
createdEventBlob: params.featuredAppRightContractDetails.createdEventBlob,
|
|
33
|
+
synchronizerId: params.featuredAppRightContractDetails.synchronizerId
|
|
34
|
+
}
|
|
35
|
+
]
|
|
36
|
+
});
|
|
37
|
+
const created = (0, findCreatedEvent_1.findCreatedEventByTemplateId)(response, open_captable_protocol_daml_js_1.Fairmint.OpenCapTable.Issuer.Convertible.templateId);
|
|
38
|
+
if (!created) {
|
|
39
|
+
throw new Error('Expected CreatedTreeEvent not found');
|
|
40
|
+
}
|
|
41
|
+
return {
|
|
42
|
+
contractId: created.CreatedTreeEvent.value.contractId,
|
|
43
|
+
updateId: response.transactionTree.updateId
|
|
44
|
+
};
|
|
45
|
+
}
|
|
46
|
+
//# sourceMappingURL=issueConvertible.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"issueConvertible.js","sourceRoot":"","sources":["../../../src/functions/convertible/issueConvertible.ts"],"names":[],"mappings":";;AAyBA,4CA2CC;AApED,6FAAoE;AAGpE,mEAA4E;AAG5E,iEAAwE;AAexE;;;GAGG;AACI,KAAK,UAAU,gBAAgB,CACpC,MAA2B,EAC3B,MAA8B;IAE9B,MAAM,eAAe,GAAkD;QACrE,WAAW,EAAE,MAAM,CAAC,gBAAgB;QACpC,aAAa,EAAE,IAAA,2CAAyB,EAAC,MAAM,CAAC,YAAY,CAAC;KAC9D,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,MAAM,CAAC,MAAM,CAAC,UAAU;oBAC1D,UAAU,EAAE,MAAM,CAAC,gBAAgB;oBACnC,MAAM,EAAE,kBAAkB;oBAC1B,cAAc,EAAE,eAAe;iBAChC;aACF;SACF;QACD,kBAAkB,EAAE;YAClB;gBACE,UAAU,EAAE,MAAM,CAAC,+BAA+B,CAAC,UAAU;gBAC7D,UAAU,EAAE,MAAM,CAAC,+BAA+B,CAAC,UAAU;gBAC7D,gBAAgB,EAAE,MAAM,CAAC,+BAA+B,CAAC,gBAAgB;gBACzE,cAAc,EAAE,MAAM,CAAC,+BAA+B,CAAC,cAAc;aACtE;SACF;KACF,CAA4C,CAAC;IAE9C,MAAM,OAAO,GAAG,IAAA,+CAA4B,EAC1C,QAAQ,EACR,yCAAQ,CAAC,YAAY,CAAC,MAAM,CAAC,WAAW,CAAC,UAAU,CACpD,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"}
|
|
@@ -0,0 +1,19 @@
|
|
|
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 RetractConvertibleParams {
|
|
5
|
+
convertibleContractId: ContractId<Fairmint.OpenCapTable.Issuer.Convertible>;
|
|
6
|
+
stakeholderParty: string;
|
|
7
|
+
date: string;
|
|
8
|
+
reasonText?: string;
|
|
9
|
+
}
|
|
10
|
+
export interface RetractConvertibleResult {
|
|
11
|
+
updateId: string;
|
|
12
|
+
retractionEventContractId: string;
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* Retract a convertible (holder-driven).
|
|
16
|
+
* Schema: https://schema.opencaptablecoalition.com/v/1.2.0/objects/transactions/retraction/ConvertibleRetraction.schema.json
|
|
17
|
+
*/
|
|
18
|
+
export declare function retractConvertible(client: LedgerJsonApiClient, params: RetractConvertibleParams): Promise<RetractConvertibleResult>;
|
|
19
|
+
//# sourceMappingURL=retractConvertible.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"retractConvertible.d.ts","sourceRoot":"","sources":["../../../src/functions/convertible/retractConvertible.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,wBAAwB;IACvC,qBAAqB,EAAE,UAAU,CAAC,QAAQ,CAAC,YAAY,CAAC,MAAM,CAAC,WAAW,CAAC,CAAC;IAC5E,gBAAgB,EAAE,MAAM,CAAC;IACzB,IAAI,EAAE,MAAM,CAAC;IACb,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAED,MAAM,WAAW,wBAAwB;IACvC,QAAQ,EAAE,MAAM,CAAC;IACjB,yBAAyB,EAAE,MAAM,CAAC;CACnC;AAED;;;GAGG;AACH,wBAAsB,kBAAkB,CACtC,MAAM,EAAE,mBAAmB,EAC3B,MAAM,EAAE,wBAAwB,GAC/B,OAAO,CAAC,wBAAwB,CAAC,CA2BnC"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.retractConvertible = retractConvertible;
|
|
4
|
+
const open_captable_protocol_daml_js_1 = require("@fairmint/open-captable-protocol-daml-js");
|
|
5
|
+
/**
|
|
6
|
+
* Retract a convertible (holder-driven).
|
|
7
|
+
* Schema: https://schema.opencaptablecoalition.com/v/1.2.0/objects/transactions/retraction/ConvertibleRetraction.schema.json
|
|
8
|
+
*/
|
|
9
|
+
async function retractConvertible(client, params) {
|
|
10
|
+
const choiceArgs = {
|
|
11
|
+
date: `${params.date}T00:00:00.000Z`,
|
|
12
|
+
reason_text: params.reasonText ? { tag: 'Some', value: params.reasonText } : null,
|
|
13
|
+
};
|
|
14
|
+
const response = (await client.submitAndWaitForTransactionTree({
|
|
15
|
+
actAs: [params.stakeholderParty],
|
|
16
|
+
commands: [
|
|
17
|
+
{
|
|
18
|
+
ExerciseCommand: {
|
|
19
|
+
templateId: open_captable_protocol_daml_js_1.Fairmint.OpenCapTable.Issuer.Convertible.templateId,
|
|
20
|
+
contractId: params.convertibleContractId,
|
|
21
|
+
choice: 'Retract',
|
|
22
|
+
choiceArgument: choiceArgs,
|
|
23
|
+
},
|
|
24
|
+
},
|
|
25
|
+
],
|
|
26
|
+
}));
|
|
27
|
+
const created = Object.values(response.transactionTree.eventsById).find((e) => 'CreatedTreeEvent' in e && e.CreatedTreeEvent.value.templateId === open_captable_protocol_daml_js_1.Fairmint.OpenCapTable.Issuer.ConvertibleRetraction.templateId);
|
|
28
|
+
if (!created)
|
|
29
|
+
throw new Error('ConvertibleRetraction not found');
|
|
30
|
+
return { updateId: response.transactionTree.updateId, retractionEventContractId: created.CreatedTreeEvent.value.contractId };
|
|
31
|
+
}
|
|
32
|
+
//# sourceMappingURL=retractConvertible.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ret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AC,KAAK,CAAC,UAAU,EAAE,CAAC;AAC/H,CAAC"}
|
|
@@ -0,0 +1,25 @@
|
|
|
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 TransferConvertibleParams {
|
|
5
|
+
convertibleContractId: ContractId<Fairmint.OpenCapTable.Issuer.Convertible>;
|
|
6
|
+
issuerParty: string;
|
|
7
|
+
toOwner: string;
|
|
8
|
+
amount: {
|
|
9
|
+
amount: string | number;
|
|
10
|
+
currency: string;
|
|
11
|
+
};
|
|
12
|
+
date: string;
|
|
13
|
+
considerationText?: string;
|
|
14
|
+
}
|
|
15
|
+
export interface TransferConvertibleResult {
|
|
16
|
+
updateId: string;
|
|
17
|
+
newConvertibleContractId: string;
|
|
18
|
+
transferEventContractId: string;
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* Transfer a convertible to a new stakeholder (records transfer event and creates a new convertible contract).
|
|
22
|
+
* Schema: https://schema.opencaptablecoalition.com/v/1.2.0/objects/transactions/transfer/ConvertibleTransfer.schema.json
|
|
23
|
+
*/
|
|
24
|
+
export declare function transferConvertible(client: LedgerJsonApiClient, params: TransferConvertibleParams): Promise<TransferConvertibleResult>;
|
|
25
|
+
//# sourceMappingURL=transferConvertible.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"transferConvertible.d.ts","sourceRoot":"","sources":["../../../src/functions/convertible/transferConvertible.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,qBAAqB,EAAE,UAAU,CAAC,QAAQ,CAAC,YAAY,CAAC,MAAM,CAAC,WAAW,CAAC,CAAC;IAC5E,WAAW,EAAE,MAAM,CAAC;IACpB,OAAO,EAAE,MAAM,CAAC;IAChB,MAAM,EAAE;QAAE,MAAM,EAAE,MAAM,GAAG,MAAM,CAAC;QAAC,QAAQ,EAAE,MAAM,CAAA;KAAE,CAAC;IACtD,IAAI,EAAE,MAAM,CAAC;IACb,iBAAiB,CAAC,EAAE,MAAM,CAAC;CAC5B;AAED,MAAM,WAAW,yBAAyB;IACxC,QAAQ,EAAE,MAAM,CAAC;IACjB,wBAAwB,EAAE,MAAM,CAAC;IACjC,uBAAuB,EAAE,MAAM,CAAC;CACjC;AAED;;;GAGG;AACH,wBAAsB,mBAAmB,CACvC,MAAM,EAAE,mBAAmB,EAC3B,MAAM,EAAE,yBAAyB,GAChC,OAAO,CAAC,yBAAyB,CAAC,CA2CpC"}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.transferConvertible = transferConvertible;
|
|
4
|
+
const open_captable_protocol_daml_js_1 = require("@fairmint/open-captable-protocol-daml-js");
|
|
5
|
+
/**
|
|
6
|
+
* Transfer a convertible to a new stakeholder (records transfer event and creates a new convertible contract).
|
|
7
|
+
* Schema: https://schema.opencaptablecoalition.com/v/1.2.0/objects/transactions/transfer/ConvertibleTransfer.schema.json
|
|
8
|
+
*/
|
|
9
|
+
async function transferConvertible(client, params) {
|
|
10
|
+
const monetary = {
|
|
11
|
+
amount: typeof params.amount.amount === 'number' ? params.amount.amount.toString() : params.amount.amount,
|
|
12
|
+
currency: params.amount.currency,
|
|
13
|
+
};
|
|
14
|
+
const choiceArgs = {
|
|
15
|
+
to_owner: params.toOwner,
|
|
16
|
+
amount: monetary,
|
|
17
|
+
date: `${params.date}T00:00:00.000Z`,
|
|
18
|
+
consideration_text: params.considerationText ? { tag: 'Some', value: params.considerationText } : null,
|
|
19
|
+
};
|
|
20
|
+
const response = (await client.submitAndWaitForTransactionTree({
|
|
21
|
+
actAs: [params.issuerParty],
|
|
22
|
+
commands: [
|
|
23
|
+
{
|
|
24
|
+
ExerciseCommand: {
|
|
25
|
+
templateId: open_captable_protocol_daml_js_1.Fairmint.OpenCapTable.Issuer.Convertible.templateId,
|
|
26
|
+
contractId: params.convertibleContractId,
|
|
27
|
+
choice: 'Transfer',
|
|
28
|
+
choiceArgument: choiceArgs,
|
|
29
|
+
},
|
|
30
|
+
},
|
|
31
|
+
],
|
|
32
|
+
}));
|
|
33
|
+
const createdConvertible = Object.values(response.transactionTree.eventsById).find((e) => 'CreatedTreeEvent' in e && e.CreatedTreeEvent.value.templateId === open_captable_protocol_daml_js_1.Fairmint.OpenCapTable.Issuer.Convertible.templateId);
|
|
34
|
+
const createdEvent = Object.values(response.transactionTree.eventsById).find((e) => 'CreatedTreeEvent' in e && e.CreatedTreeEvent.value.templateId === open_captable_protocol_daml_js_1.Fairmint.OpenCapTable.Issuer.ConvertibleTransferEvent.templateId);
|
|
35
|
+
if (!createdConvertible)
|
|
36
|
+
throw new Error('New Convertible not found');
|
|
37
|
+
if (!createdEvent)
|
|
38
|
+
throw new Error('ConvertibleTransferEvent not found');
|
|
39
|
+
return {
|
|
40
|
+
updateId: response.transactionTree.updateId,
|
|
41
|
+
newConvertibleContractId: createdConvertible.CreatedTreeEvent.value.contractId,
|
|
42
|
+
transferEventContractId: createdEvent.CreatedTreeEvent.value.contractId,
|
|
43
|
+
};
|
|
44
|
+
}
|
|
45
|
+
//# sourceMappingURL=transferConvertible.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"transferConvertible.js","sourceRoot":"","sources":["../../../src/functions/convertible/transferConvertible.ts"],"names":[],"mappings":";;AAwBA,kDA8CC;AAtED,6FAAoE;AAoBpE;;;GAGG;AACI,KAAK,UAAU,mBAAmB,CACvC,MAA2B,EAC3B,MAAiC;IAEjC,MAAM,QAAQ,GAA4C;QACxD,MAAM,EAAE,OAAO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AAe,CAAC,UAAU,CAAC,CAAC,IAAI,CAC1E,CAAC,CAAM,EAAE,EAAE,CAAC,kBAAkB,IAAI,CAAC,IAAI,CAAC,CAAC,gBAAgB,CAAC,KAAK,CAAC,UAAU,KAAK,yCAAQ,CAAC,YAAY,CAAC,MAAM,CAAC,wBAAwB,CAAC,UAAU,CACzI,CAAC;IAET,IAAI,CAAC,kBAAkB;QAAE,MAAM,IAAI,KAAK,CAAC,2BAA2B,CAAC,CAAC;IACtE,IAAI,CAAC,YAAY;QAAE,MAAM,IAAI,KAAK,CAAC,oCAAoC,CAAC,CAAC;IAEzE,OAAO;QACL,QAAQ,EAAE,QAAQ,CAAC,eAAe,CAAC,QAAQ;QAC3C,wBAAwB,EAAE,kBAAkB,CAAC,gBAAgB,CAAC,KAAK,CAAC,UAAU;QAC9E,uBAAuB,EAAE,YAAY,CAAC,gBAAgB,CAAC,KAAK,CAAC,UAAU;KACxE,CAAC;AACJ,CAAC"}
|
|
@@ -1,4 +1,13 @@
|
|
|
1
1
|
export * from './issuer';
|
|
2
2
|
export * from './stockClass';
|
|
3
3
|
export * from './companyValuationReport';
|
|
4
|
+
export * from './stakeholder';
|
|
5
|
+
export * from './stockLegendTemplate';
|
|
6
|
+
export * from './valuation';
|
|
7
|
+
export * from './vestingTerms';
|
|
8
|
+
export * from './stockPlan';
|
|
9
|
+
export * from './stockPosition';
|
|
10
|
+
export * from './convertible';
|
|
11
|
+
export * from './warrant';
|
|
12
|
+
export * from './issuerAuthorization';
|
|
4
13
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/functions/index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAC;AACzB,cAAc,cAAc,CAAC;AAC7B,cAAc,0BAA0B,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/functions/index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAC;AACzB,cAAc,cAAc,CAAC;AAC7B,cAAc,0BAA0B,CAAC;AACzC,cAAc,eAAe,CAAC;AAC9B,cAAc,uBAAuB,CAAC;AACtC,cAAc,aAAa,CAAC;AAC5B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,aAAa,CAAC;AAC5B,cAAc,iBAAiB,CAAC;AAChC,cAAc,eAAe,CAAC;AAC9B,cAAc,WAAW,CAAC;AAC1B,cAAc,uBAAuB,CAAC"}
|
package/dist/functions/index.js
CHANGED
|
@@ -17,4 +17,13 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
17
17
|
__exportStar(require("./issuer"), exports);
|
|
18
18
|
__exportStar(require("./stockClass"), exports);
|
|
19
19
|
__exportStar(require("./companyValuationReport"), exports);
|
|
20
|
+
__exportStar(require("./stakeholder"), exports);
|
|
21
|
+
__exportStar(require("./stockLegendTemplate"), exports);
|
|
22
|
+
__exportStar(require("./valuation"), exports);
|
|
23
|
+
__exportStar(require("./vestingTerms"), exports);
|
|
24
|
+
__exportStar(require("./stockPlan"), exports);
|
|
25
|
+
__exportStar(require("./stockPosition"), exports);
|
|
26
|
+
__exportStar(require("./convertible"), exports);
|
|
27
|
+
__exportStar(require("./warrant"), exports);
|
|
28
|
+
__exportStar(require("./issuerAuthorization"), exports);
|
|
20
29
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/functions/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,2CAAyB;AACzB,+CAA6B;AAC7B,2DAAyC"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/functions/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,2CAAyB;AACzB,+CAA6B;AAC7B,2DAAyC;AACzC,gDAA8B;AAC9B,wDAAsC;AACtC,8CAA4B;AAC5B,iDAA+B;AAC/B,8CAA4B;AAC5B,kDAAgC;AAChC,gDAA8B;AAC9B,4CAA0B;AAC1B,wDAAsC"}
|
|
@@ -0,0 +1,20 @@
|
|
|
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 AdjustIssuerAuthorizedSharesParams {
|
|
5
|
+
issuerContractId: ContractId<Fairmint.OpenCapTable.Issuer.Issuer>;
|
|
6
|
+
issuerParty: string;
|
|
7
|
+
newAuthorized: string | number;
|
|
8
|
+
date: string;
|
|
9
|
+
}
|
|
10
|
+
export interface AdjustIssuerAuthorizedSharesResult {
|
|
11
|
+
updateId: string;
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* Adjust issuer-level authorized shares.
|
|
15
|
+
* Schema: https://schema.opencaptablecoalition.com/v/1.2.0/objects/transactions/adjustment/IssuerAuthorizedSharesAdjustment.schema.json
|
|
16
|
+
* - new_authorized: New authorized shares amount (numeric only)
|
|
17
|
+
* - date: Effective date (YYYY-MM-DD)
|
|
18
|
+
*/
|
|
19
|
+
export declare function adjustIssuerAuthorizedShares(client: LedgerJsonApiClient, params: AdjustIssuerAuthorizedSharesParams): Promise<AdjustIssuerAuthorizedSharesResult>;
|
|
20
|
+
//# sourceMappingURL=adjustAuthorizedShares.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"adjustAuthorizedShares.d.ts","sourceRoot":"","sources":["../../../src/functions/issuer/adjustAuthorizedShares.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,kCAAkC;IACjD,gBAAgB,EAAE,UAAU,CAAC,QAAQ,CAAC,YAAY,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC;IAClE,WAAW,EAAE,MAAM,CAAC;IACpB,aAAa,EAAE,MAAM,GAAG,MAAM,CAAC;IAC/B,IAAI,EAAE,MAAM,CAAC;CACd;AAED,MAAM,WAAW,kCAAkC;IACjD,QAAQ,EAAE,MAAM,CAAC;CAClB;AAED;;;;;GAKG;AACH,wBAAsB,4BAA4B,CAChD,MAAM,EAAE,mBAAmB,EAC3B,MAAM,EAAE,kCAAkC,GACzC,OAAO,CAAC,kCAAkC,CAAC,CAwB7C"}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.adjustIssuerAuthorizedShares = adjustIssuerAuthorizedShares;
|
|
4
|
+
const open_captable_protocol_daml_js_1 = require("@fairmint/open-captable-protocol-daml-js");
|
|
5
|
+
/**
|
|
6
|
+
* Adjust issuer-level authorized shares.
|
|
7
|
+
* Schema: https://schema.opencaptablecoalition.com/v/1.2.0/objects/transactions/adjustment/IssuerAuthorizedSharesAdjustment.schema.json
|
|
8
|
+
* - new_authorized: New authorized shares amount (numeric only)
|
|
9
|
+
* - date: Effective date (YYYY-MM-DD)
|
|
10
|
+
*/
|
|
11
|
+
async function adjustIssuerAuthorizedShares(client, params) {
|
|
12
|
+
const choiceArgs = {
|
|
13
|
+
new_authorized: typeof params.newAuthorized === 'number'
|
|
14
|
+
? params.newAuthorized.toString()
|
|
15
|
+
: params.newAuthorized,
|
|
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.Issuer.Issuer.templateId,
|
|
24
|
+
contractId: params.issuerContractId,
|
|
25
|
+
choice: 'AdjustIssuerAuthorizedShares',
|
|
26
|
+
choiceArgument: choiceArgs,
|
|
27
|
+
},
|
|
28
|
+
},
|
|
29
|
+
],
|
|
30
|
+
}));
|
|
31
|
+
return { updateId: response.transactionTree.updateId };
|
|
32
|
+
}
|
|
33
|
+
//# sourceMappingURL=adjustAuthorizedShares.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"adjustAuthorizedShares.js","sourceRoot":"","sources":["../../../src/functions/issuer/adjustAuthorizedShares.ts"],"names":[],"mappings":";;AAsBA,oEA2BC;AAjDD,6FAAoE;AAgBpE;;;;;GAKG;AACI,KAAK,UAAU,4BAA4B,CAChD,MAA2B,EAC3B,MAA0C;IAE1C,MAAM,UAAU,GAA8D;QAC5E,cAAc,EACZ,OAAO,MAAM,CAAC,aAAa,KAAK,QAAQ;YACtC,CAAC,CAAC,MAAM,CAAC,aAAa,CAAC,QAAQ,EAAE;YACjC,CAAC,CAAC,MAAM,CAAC,aAAa;QAC1B,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,MAAM,CAAC,MAAM,CAAC,UAAU;oBAC1D,UAAU,EAAE,MAAM,CAAC,gBAAgB;oBACnC,MAAM,EAAE,8BAA8B;oBACtC,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"}
|
|
@@ -7,7 +7,23 @@ export interface CreateIssuerParams {
|
|
|
7
7
|
/** Details of the FeaturedAppRight contract for disclosed contracts */
|
|
8
8
|
featuredAppRightContractDetails: ContractDetails;
|
|
9
9
|
issuerParty: string;
|
|
10
|
-
/**
|
|
10
|
+
/**
|
|
11
|
+
* Issuer data to create
|
|
12
|
+
*
|
|
13
|
+
* Schema: https://schema.opencaptablecoalition.com/v/1.2.0/objects/Issuer.schema.json
|
|
14
|
+
* - legal_name: Legal name of the issuer
|
|
15
|
+
* - formation_date: Date of formation (YYYY-MM-DD)
|
|
16
|
+
* - country_of_formation: Country of formation (ISO 3166-1 alpha-2)
|
|
17
|
+
* - dba (optional): Doing Business As name
|
|
18
|
+
* - country_subdivision_of_formation (optional): Subdivision code of formation (ISO 3166-2)
|
|
19
|
+
* - country_subdivision_name_of_formation (optional): Text name of subdivision of formation
|
|
20
|
+
* - tax_ids (optional): Issuer tax IDs
|
|
21
|
+
* - email (optional): Work email
|
|
22
|
+
* - phone (optional): Phone number in ITU E.123 format
|
|
23
|
+
* - address (optional): Headquarters address
|
|
24
|
+
* - initial_shares_authorized (optional): Initial authorized shares (enum or numeric)
|
|
25
|
+
* - comments (optional): Additional comments
|
|
26
|
+
*/
|
|
11
27
|
issuerData: OcfIssuerData;
|
|
12
28
|
}
|
|
13
29
|
export interface CreateIssuerResult {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"createIssuer.d.ts","sourceRoot":"","sources":["../../../src/functions/issuer/createIssuer.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,mBAAmB,EAAE,MAAM,2BAA2B,CAAC;AAGhE,OAAO,EAAE,eAAe,EAAE,MAAM,6BAA6B,CAAC;AAC9D,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AAGnD,MAAM,WAAW,kBAAkB;IACjC,0EAA0E;IAC1E,kCAAkC,EAAE,eAAe,CAAC;IACpD,uEAAuE;IACvE,+BAA+B,EAAE,eAAe,CAAC;IACjD,WAAW,EAAE,MAAM,CAAC;IACpB
|
|
1
|
+
{"version":3,"file":"createIssuer.d.ts","sourceRoot":"","sources":["../../../src/functions/issuer/createIssuer.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,mBAAmB,EAAE,MAAM,2BAA2B,CAAC;AAGhE,OAAO,EAAE,eAAe,EAAE,MAAM,6BAA6B,CAAC;AAC9D,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AAGnD,MAAM,WAAW,kBAAkB;IACjC,0EAA0E;IAC1E,kCAAkC,EAAE,eAAe,CAAC;IACpD,uEAAuE;IACvE,+BAA+B,EAAE,eAAe,CAAC;IACjD,WAAW,EAAE,MAAM,CAAC;IACpB;;;;;;;;;;;;;;;;OAgBG;IACH,UAAU,EAAE,aAAa,CAAC;CAC3B;AAED,MAAM,WAAW,kBAAkB;IACjC,UAAU,EAAE,MAAM,CAAC;IACnB,QAAQ,EAAE,MAAM,CAAC;CAClB;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAyCG;AACH,wBAAsB,YAAY,CAChC,MAAM,EAAE,mBAAmB,EAC3B,MAAM,EAAE,kBAAkB,GACzB,OAAO,CAAC,kBAAkB,CAAC,CAiD7B"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"createIssuer.js","sourceRoot":"","sources":["../../../src/functions/issuer/createIssuer.ts"],"names":[],"mappings":";;
|
|
1
|
+
{"version":3,"file":"createIssuer.js","sourceRoot":"","sources":["../../../src/functions/issuer/createIssuer.ts"],"names":[],"mappings":";;AAiFA,oCAoDC;AArID,6FAAoE;AAGpE,mEAA4E;AAG5E,iEAA+D;AAiC/D;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAyCG;AACI,KAAK,UAAU,YAAY,CAChC,MAA2B,EAC3B,MAA0B;IAE1B,+CAA+C;IAC/C,MAAM,eAAe,GAA2D;QAC9E,WAAW,EAAE,IAAA,kCAAgB,EAAC,MAAM,CAAC,UAAU,CAAC;KACjD,CAAC;IAEF,wDAAwD;IACxD,MAAM,QAAQ,GAAG,MAAM,MAAM,CAAC,+BAA+B,CAAC;Q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
|
+
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
|
+
import { ContractDetails } from '../../types/contractDetails';
|
|
5
|
+
import { OcfValuationData } from '../../types/native';
|
|
6
|
+
export interface CreateValuationParams {
|
|
7
|
+
issuerContractId: string;
|
|
8
|
+
stockClassContractId: ContractId<Fairmint.OpenCapTable.StockClass.StockClass>;
|
|
9
|
+
featuredAppRightContractDetails: ContractDetails;
|
|
10
|
+
issuerParty: string;
|
|
11
|
+
valuationData: OcfValuationData;
|
|
12
|
+
}
|
|
13
|
+
export interface CreateValuationResult {
|
|
14
|
+
contractId: string;
|
|
15
|
+
updateId: string;
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* Create a valuation by exercising the CreateValuation choice on an Issuer contract
|
|
19
|
+
*
|
|
20
|
+
* Schema: https://schema.opencaptablecoalition.com/v/1.2.0/objects/Valuation.schema.json
|
|
21
|
+
* - price_per_share: Monetary amount (amount, currency)
|
|
22
|
+
* - effective_date: Valuation effective date (YYYY-MM-DD)
|
|
23
|
+
* - valuation_type: e.g., '409A'
|
|
24
|
+
* - provider (optional): Provider name
|
|
25
|
+
* - board_approval_date (optional): Date board approved valuation
|
|
26
|
+
* - stockholder_approval_date (optional): Date stockholders approved valuation
|
|
27
|
+
* - comments (optional)
|
|
28
|
+
*/
|
|
29
|
+
export declare function createValuation(client: LedgerJsonApiClient, params: CreateValuationParams): Promise<CreateValuationResult>;
|
|
30
|
+
//# sourceMappingURL=createValuation.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"createValuation.d.ts","sourceRoot":"","sources":["../../../src/functions/issuer/createValuation.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,0CAA0C,CAAC;AACpE,OAAO,EAAE,mBAAmB,EAAE,MAAM,2BAA2B,CAAC;AAGhE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAC9C,OAAO,EAAE,eAAe,EAAE,MAAM,6BAA6B,CAAC;AAC9D,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAGtD,MAAM,WAAW,qBAAqB;IACpC,gBAAgB,EAAE,MAAM,CAAC;IACzB,oBAAoB,EAAE,UAAU,CAAC,QAAQ,CAAC,YAAY,CAAC,UAAU,CAAC,UAAU,CAAC,CAAC;IAC9E,+BAA+B,EAAE,eAAe,CAAC;IACjD,WAAW,EAAE,MAAM,CAAC;IACpB,aAAa,EAAE,gBAAgB,CAAC;CACjC;AAED,MAAM,WAAW,qBAAqB;IACpC,UAAU,EAAE,MAAM,CAAC;IACnB,QAAQ,EAAE,MAAM,CAAC;CAClB;AAED;;;;;;;;;;;GAWG;AACH,wBAAsB,eAAe,CACnC,MAAM,EAAE,mBAAmB,EAC3B,MAAM,EAAE,qBAAqB,GAC5B,OAAO,CAAC,qBAAqB,CAAC,CAwChC"}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.createValuation = createValuation;
|
|
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
|
+
* Create a valuation by exercising the CreateValuation choice on an Issuer contract
|
|
9
|
+
*
|
|
10
|
+
* Schema: https://schema.opencaptablecoalition.com/v/1.2.0/objects/Valuation.schema.json
|
|
11
|
+
* - price_per_share: Monetary amount (amount, currency)
|
|
12
|
+
* - effective_date: Valuation effective date (YYYY-MM-DD)
|
|
13
|
+
* - valuation_type: e.g., '409A'
|
|
14
|
+
* - provider (optional): Provider name
|
|
15
|
+
* - board_approval_date (optional): Date board approved valuation
|
|
16
|
+
* - stockholder_approval_date (optional): Date stockholders approved valuation
|
|
17
|
+
* - comments (optional)
|
|
18
|
+
*/
|
|
19
|
+
async function createValuation(client, params) {
|
|
20
|
+
const choiceArguments = {
|
|
21
|
+
stock_class: params.stockClassContractId,
|
|
22
|
+
valuation_data: (0, typeConversions_1.valuationDataToDaml)(params.valuationData)
|
|
23
|
+
};
|
|
24
|
+
const response = await client.submitAndWaitForTransactionTree({
|
|
25
|
+
actAs: [params.issuerParty],
|
|
26
|
+
commands: [
|
|
27
|
+
{
|
|
28
|
+
ExerciseCommand: {
|
|
29
|
+
templateId: open_captable_protocol_daml_js_1.Fairmint.OpenCapTable.Issuer.Issuer.templateId,
|
|
30
|
+
contractId: params.issuerContractId,
|
|
31
|
+
choice: 'CreateValuation',
|
|
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 created = (0, findCreatedEvent_1.findCreatedEventByTemplateId)(response, open_captable_protocol_daml_js_1.Fairmint.OpenCapTable.Valuation.Valuation.templateId);
|
|
46
|
+
if (!created) {
|
|
47
|
+
throw new Error('Expected CreatedTreeEvent not found');
|
|
48
|
+
}
|
|
49
|
+
return {
|
|
50
|
+
contractId: created.CreatedTreeEvent.value.contractId,
|
|
51
|
+
updateId: response.transactionTree.updateId
|
|
52
|
+
};
|
|
53
|
+
}
|
|
54
|
+
//# sourceMappingURL=createValuation.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"createValuation.js","sourceRoot":"","sources":["../../../src/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AQ,CAAC,eAAe,CAAC,QAAQ;KAC5C,CAAC;AACJ,CAAC"}
|
|
@@ -5,93 +5,43 @@ import { LedgerJsonApiClient } from '@fairmint/canton-node-sdk';
|
|
|
5
5
|
* @see https://schema.opencaptablecoalition.com/v/1.2.0/objects/Issuer.schema.json
|
|
6
6
|
*/
|
|
7
7
|
export interface OcfIssuer {
|
|
8
|
-
/** Object type identifier - must be "ISSUER" */
|
|
9
8
|
object_type: 'ISSUER';
|
|
10
|
-
/** Legal name of the issuer */
|
|
11
9
|
legal_name: string;
|
|
12
|
-
/** Doing Business As name */
|
|
13
10
|
dba?: string;
|
|
14
|
-
/** Date of formation (YYYY-MM-DD format) */
|
|
15
11
|
formation_date?: string;
|
|
16
|
-
/** The country where the issuer company was legally formed (ISO 3166-1 alpha-2) */
|
|
17
12
|
country_of_formation: string;
|
|
18
|
-
/** The state, province, or subdivision where the issuer company was legally formed */
|
|
19
13
|
country_subdivision_of_formation?: string;
|
|
20
|
-
|
|
14
|
+
country_subdivision_name_of_formation?: string;
|
|
21
15
|
tax_ids?: Array<{
|
|
22
|
-
/** Tax identifier as string */
|
|
23
16
|
tax_id: string;
|
|
24
|
-
/** Issuing country code (ISO 3166-1 alpha-2) for the tax identifier */
|
|
25
17
|
country: string;
|
|
26
18
|
}>;
|
|
27
|
-
/** A work email that the issuer company can be reached at */
|
|
28
19
|
email?: {
|
|
29
|
-
|
|
30
|
-
email_type: 'PERSONAL' | 'BUSINESS';
|
|
31
|
-
/** The email address */
|
|
20
|
+
email_type: 'BUSINESS' | 'PERSONAL';
|
|
32
21
|
email_address: string;
|
|
33
22
|
};
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
23
|
+
phone?: {
|
|
24
|
+
phone_type: 'HOME' | 'MOBILE' | 'BUSINESS' | 'OTHER';
|
|
25
|
+
phone_number: string;
|
|
26
|
+
};
|
|
37
27
|
address?: {
|
|
38
|
-
/** What type of address is this (e.g. legal address, contact address, etc.) */
|
|
39
28
|
address_type: 'LEGAL' | 'CONTACT' | 'OTHER';
|
|
40
|
-
/** Street address (multi-line string) */
|
|
41
29
|
street_suite?: string;
|
|
42
|
-
/** City */
|
|
43
30
|
city?: string;
|
|
44
|
-
/** State, province, or equivalent identifier required for an address in this country */
|
|
45
31
|
country_subdivision?: string;
|
|
46
|
-
/** Country code for this address (ISO 3166-1 alpha-2) */
|
|
47
32
|
country: string;
|
|
48
|
-
/** Address postal code */
|
|
49
33
|
postal_code?: string;
|
|
50
34
|
};
|
|
51
|
-
|
|
52
|
-
initial_shares_authorized?: string | number;
|
|
53
|
-
/** Unique identifier for the issuer object */
|
|
35
|
+
initial_shares_authorized?: string | number | 'UNLIMITED' | 'NOT_APPLICABLE';
|
|
54
36
|
id?: string;
|
|
55
|
-
/** Additional comments or notes about the issuer */
|
|
56
37
|
comments?: string[];
|
|
57
38
|
}
|
|
58
39
|
export interface GetIssuerAsOcfParams {
|
|
59
|
-
/** Contract ID of the Issuer contract to retrieve */
|
|
60
40
|
contractId: string;
|
|
61
41
|
}
|
|
62
42
|
export interface GetIssuerAsOcfResult {
|
|
63
|
-
/** The OCF Issuer object */
|
|
64
43
|
issuer: OcfIssuer;
|
|
65
|
-
/** The original contract ID */
|
|
66
44
|
contractId: string;
|
|
67
45
|
}
|
|
68
|
-
/**
|
|
69
|
-
* Retrieve an issuer contract by ID and return it as an OCF JSON object
|
|
70
|
-
*
|
|
71
|
-
* This function fetches the issuer contract data from the ledger and transforms it
|
|
72
|
-
* into the Open Cap Table Coalition (OCF) format according to the official schema.
|
|
73
|
-
*
|
|
74
|
-
* @see https://schema.opencaptablecoalition.com/v/1.2.0/objects/Issuer.schema.json
|
|
75
|
-
*
|
|
76
|
-
* @example
|
|
77
|
-
* ```typescript
|
|
78
|
-
* const result = await getIssuerAsOcf(client, {
|
|
79
|
-
* contractId: "1234567890abcdef"
|
|
80
|
-
* });
|
|
81
|
-
*
|
|
82
|
-
* console.log(result.issuer);
|
|
83
|
-
* // {
|
|
84
|
-
* // object_type: "ISSUER",
|
|
85
|
-
* // legal_name: "My Company Inc.",
|
|
86
|
-
* // country_of_formation: "US",
|
|
87
|
-
* // formation_date: "2020-01-15",
|
|
88
|
-
* // // ... other fields
|
|
89
|
-
* // }
|
|
90
|
-
* ```
|
|
91
|
-
*
|
|
92
|
-
* @param client - The ledger JSON API client
|
|
93
|
-
* @param params - Parameters for retrieving the issuer
|
|
94
|
-
* @returns Promise resolving to the OCF Issuer object
|
|
95
|
-
*/
|
|
96
46
|
export declare function getIssuerAsOcf(client: LedgerJsonApiClient, params: GetIssuerAsOcfParams): Promise<GetIssuerAsOcfResult>;
|
|
97
47
|
//# sourceMappingURL=getIssuerAsOcf.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getIssuerAsOcf.d.ts","sourceRoot":"","sources":["../../../src/functions/issuer/getIssuerAsOcf.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,mBAAmB,EAAE,MAAM,2BAA2B,CAAC;AAGhE;;;;GAIG;AACH,MAAM,WAAW,SAAS;IACxB,
|
|
1
|
+
{"version":3,"file":"getIssuerAsOcf.d.ts","sourceRoot":"","sources":["../../../src/functions/issuer/getIssuerAsOcf.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,mBAAmB,EAAE,MAAM,2BAA2B,CAAC;AAGhE;;;;GAIG;AACH,MAAM,WAAW,SAAS;IACxB,WAAW,EAAE,QAAQ,CAAC;IACtB,UAAU,EAAE,MAAM,CAAC;IACnB,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,oBAAoB,EAAE,MAAM,CAAC;IAC7B,gCAAgC,CAAC,EAAE,MAAM,CAAC;IAC1C,qCAAqC,CAAC,EAAE,MAAM,CAAC;IAC/C,OAAO,CAAC,EAAE,KAAK,CAAC;QAAE,MAAM,EAAE,MAAM,CAAC;QAAC,OAAO,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;IACrD,KAAK,CAAC,E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