@open-captable-protocol/canton 0.2.5 → 0.2.7
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/README.docs.md +43 -0
- package/dist/functions/issuer/getIssuerAsOcf.d.ts.map +1 -1
- package/dist/functions/issuer/getIssuerAsOcf.js +17 -16
- package/dist/functions/issuer/getIssuerAsOcf.js.map +1 -1
- package/dist/functions/stakeholder/getStakeholderAsOcf.d.ts.map +1 -1
- package/dist/functions/stakeholder/getStakeholderAsOcf.js +11 -10
- package/dist/functions/stakeholder/getStakeholderAsOcf.js.map +1 -1
- package/dist/functions/stockClass/getStockClassAsOcf.js +3 -4
- package/dist/functions/stockClass/getStockClassAsOcf.js.map +1 -1
- package/dist/functions/stockClass/getStockIssuanceEventAsOcf.js +1 -1
- package/dist/functions/stockClass/getStockIssuanceEventAsOcf.js.map +1 -1
- package/dist/functions/stockClass/getStockRepurchaseEventAsOcf.js +1 -1
- package/dist/functions/stockClass/getStockRepurchaseEventAsOcf.js.map +1 -1
- package/dist/functions/stockClass/getStockTransferEventAsOcf.js +1 -1
- package/dist/functions/stockClass/getStockTransferEventAsOcf.js.map +1 -1
- package/dist/functions/stockLegendTemplate/getStockLegendTemplateAsOcf.d.ts.map +1 -1
- package/dist/functions/stockLegendTemplate/getStockLegendTemplateAsOcf.js +3 -2
- package/dist/functions/stockLegendTemplate/getStockLegendTemplateAsOcf.js.map +1 -1
- package/dist/functions/stockPlan/getEquityCompensationExerciseEventAsOcf.js +1 -1
- package/dist/functions/stockPlan/getEquityCompensationExerciseEventAsOcf.js.map +1 -1
- package/dist/functions/stockPlan/getStockPlanAsOcf.d.ts.map +1 -1
- package/dist/functions/stockPlan/getStockPlanAsOcf.js +3 -2
- package/dist/functions/stockPlan/getStockPlanAsOcf.js.map +1 -1
- package/dist/functions/valuation/getValuationAsOcf.d.ts.map +1 -1
- package/dist/functions/valuation/getValuationAsOcf.js +3 -2
- package/dist/functions/valuation/getValuationAsOcf.js.map +1 -1
- package/dist/functions/vestingTerms/getVestingTermsAsOcf.d.ts.map +1 -1
- package/dist/functions/vestingTerms/getVestingTermsAsOcf.js +3 -2
- package/dist/functions/vestingTerms/getVestingTermsAsOcf.js.map +1 -1
- package/package.json +7 -4
- 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 -5
- package/dist/functions/stockPosition/index.d.ts.map +0 -1
- package/dist/functions/stockPosition/index.js +0 -21
- 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 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"updateIssuerData.js","sour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,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,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,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 RecordRelationshipChangeParams {
|
|
5
|
-
stakeholderContractId: ContractId<Fairmint.OpenCapTable.Stakeholder.Stakeholder>;
|
|
6
|
-
issuerParty: string;
|
|
7
|
-
date: string;
|
|
8
|
-
relationshipStarted?: Fairmint.OpenCapTable.Types.OcfStakeholderRelationshipType;
|
|
9
|
-
relationshipEnded?: Fairmint.OpenCapTable.Types.OcfStakeholderRelationshipType;
|
|
10
|
-
}
|
|
11
|
-
export interface RecordRelationshipChangeResult {
|
|
12
|
-
updateId: string;
|
|
13
|
-
eventContractId: string;
|
|
14
|
-
}
|
|
15
|
-
/**
|
|
16
|
-
* Record a stakeholder relationship change event.
|
|
17
|
-
* Schema: https://schema.opencaptablecoalition.com/v/1.2.0/objects/transactions/change_event/StakeholderRelationshipChangeEvent.schema.json
|
|
18
|
-
*/
|
|
19
|
-
export declare function recordRelationshipChange(client: LedgerJsonApiClient, params: RecordRelationshipChangeParams): Promise<RecordRelationshipChangeResult>;
|
|
20
|
-
//# sourceMappingURL=recordRelationshipChange.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"recordRelationshipChange.d.ts","sourceRoot":"","sources":["../../../src/functions/stakeholder/recordRelationshipChange.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,8BAA8B;IAC7C,qBAAqB,EAAE,UAAU,CAAC,QAAQ,CAAC,YAAY,CAAC,WAAW,CAAC,WAAW,CAAC,CAAC;IACjF,WAAW,EAAE,MAAM,CAAC;IACpB,IAAI,EAAE,MAAM,CAAC;IACb,mBAAmB,CAAC,EAAE,QAAQ,CAAC,YAAY,CAAC,KAAK,CAAC,8BAA8B,CAAC;IACjF,iBAAiB,CAAC,EAAE,QAAQ,CAAC,YAAY,CAAC,KAAK,CAAC,8BAA8B,CAAC;CAChF;AAED,MAAM,WAAW,8BAA8B;IAC7C,QAAQ,EAAE,MAAM,CAAC;IACjB,eAAe,EAAE,MAAM,CAAC;CACzB;AAED;;;GAGG;AACH,wBAAsB,wBAAwB,CAC5C,MAAM,EAAE,mBAAmB,EAC3B,MAAM,EAAE,8BAA8B,GACrC,OAAO,CAAC,8BAA8B,CAAC,CA4BzC"}
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.recordRelationshipChange = recordRelationshipChange;
|
|
4
|
-
const open_captable_protocol_daml_js_1 = require("@fairmint/open-captable-protocol-daml-js");
|
|
5
|
-
/**
|
|
6
|
-
* Record a stakeholder relationship change event.
|
|
7
|
-
* Schema: https://schema.opencaptablecoalition.com/v/1.2.0/objects/transactions/change_event/StakeholderRelationshipChangeEvent.schema.json
|
|
8
|
-
*/
|
|
9
|
-
async function recordRelationshipChange(client, params) {
|
|
10
|
-
const choiceArgs = {
|
|
11
|
-
date: `${params.date}T00:00:00.000Z`,
|
|
12
|
-
relationship_started: params.relationshipStarted ? { tag: 'Some', value: params.relationshipStarted } : null,
|
|
13
|
-
relationship_ended: params.relationshipEnded ? { tag: 'Some', value: params.relationshipEnded } : null,
|
|
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.Stakeholder.Stakeholder.templateId,
|
|
21
|
-
contractId: params.stakeholderContractId,
|
|
22
|
-
choice: 'RecordRelationshipChange',
|
|
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.Stakeholder.StakeholderRelationshipChangeEvent.templateId);
|
|
29
|
-
if (!created)
|
|
30
|
-
throw new Error('StakeholderRelationshipChangeEvent not found');
|
|
31
|
-
return { updateId: response.transactionTree.updateId, eventContractId: created.CreatedTreeEvent.value.contractId };
|
|
32
|
-
}
|
|
33
|
-
//# sourceMappingURL=recordRelationshipChange.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":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ET,IAAI,CAAC,OAAO;QAAE,MAAM,IAAI,KAAK,CAAC,8CAA8C,CAAC,CAAC;IAE9E,OAAO,EAAE,QAAQ,EAAE,QAAQ,CAAC,eAAe,CAAC,QAAQ,EAAE,eAAe,EAAE,OAAO,CAAC,gBAAgB,CAAC,KAAK,CAAC,UAAU,EAAE,CAAC;AACrH,CAAC"}
|
|
@@ -1,19 +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 RecordStatusChangeParams {
|
|
5
|
-
stakeholderContractId: ContractId<Fairmint.OpenCapTable.Stakeholder.Stakeholder>;
|
|
6
|
-
issuerParty: string;
|
|
7
|
-
date: string;
|
|
8
|
-
newStatus: Fairmint.OpenCapTable.Types.OcfStakeholderStatusType;
|
|
9
|
-
}
|
|
10
|
-
export interface RecordStatusChangeResult {
|
|
11
|
-
updateId: string;
|
|
12
|
-
eventContractId: string;
|
|
13
|
-
}
|
|
14
|
-
/**
|
|
15
|
-
* Record a stakeholder status change event.
|
|
16
|
-
* Schema: https://schema.opencaptablecoalition.com/v/1.2.0/objects/transactions/change_event/StakeholderStatusChangeEvent.schema.json
|
|
17
|
-
*/
|
|
18
|
-
export declare function recordStatusChange(client: LedgerJsonApiClient, params: RecordStatusChangeParams): Promise<RecordStatusChangeResult>;
|
|
19
|
-
//# sourceMappingURL=recordStatusChange.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"recordStatusChange.d.ts","sourceRoot":"","sources":["../../../src/functions/stakeholder/recordStatusChange.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,WAAW,CAAC,WAAW,CAAC,CAAC;IACjF,WAAW,EAAE,MAAM,CAAC;IACpB,IAAI,EAAE,MAAM,CAAC;IACb,SAAS,EAAE,QAAQ,CAAC,YAAY,CAAC,KAAK,CAAC,wBAAwB,CAAC;CACjE;AAED,MAAM,WAAW,wBAAwB;IACvC,QAAQ,EAAE,MAAM,CAAC;IACjB,eAAe,EAAE,MAAM,CAAC;CACzB;AAED;;;GAGG;AACH,wBAAsB,kBAAkB,CACtC,MAAM,EAAE,mBAAmB,EAC3B,MAAM,EAAE,wBAAwB,GAC/B,OAAO,CAAC,wBAAwB,CAAC,CA2BnC"}
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.recordStatusChange = recordStatusChange;
|
|
4
|
-
const open_captable_protocol_daml_js_1 = require("@fairmint/open-captable-protocol-daml-js");
|
|
5
|
-
/**
|
|
6
|
-
* Record a stakeholder status change event.
|
|
7
|
-
* Schema: https://schema.opencaptablecoalition.com/v/1.2.0/objects/transactions/change_event/StakeholderStatusChangeEvent.schema.json
|
|
8
|
-
*/
|
|
9
|
-
async function recordStatusChange(client, params) {
|
|
10
|
-
const choiceArgs = {
|
|
11
|
-
date: `${params.date}T00:00:00.000Z`,
|
|
12
|
-
new_status: params.newStatus,
|
|
13
|
-
};
|
|
14
|
-
const response = (await client.submitAndWaitForTransactionTree({
|
|
15
|
-
actAs: [params.issuerParty],
|
|
16
|
-
commands: [
|
|
17
|
-
{
|
|
18
|
-
ExerciseCommand: {
|
|
19
|
-
templateId: open_captable_protocol_daml_js_1.Fairmint.OpenCapTable.Stakeholder.Stakeholder.templateId,
|
|
20
|
-
contractId: params.stakeholderContractId,
|
|
21
|
-
choice: 'RecordStatusChange',
|
|
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.Stakeholder.StakeholderStatusChangeEvent.templateId);
|
|
28
|
-
if (!created)
|
|
29
|
-
throw new Error('StakeholderStatusChangeEvent not found');
|
|
30
|
-
return { updateId: response.transactionTree.updateId, eventContractId: created.CreatedTreeEvent.value.contractId };
|
|
31
|
-
}
|
|
32
|
-
//# sourceMappingURL=recordStatusChange.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"recordStatusChange.js","sourceRoot":"","sources":["../../../src/functions/stakeholder/recordStatusChange.ts"],"names":[],"mappings":";;AAqBA,gDA8BC;AAnDD,6FAAoE;AAiBpE;;;GAGG;AACI,KAAK,UAAU,kBAAkB,CACtC,MAA2B,EAC3B,MAAgC;IAEhC,MAAM,UAAU,GAAyD;QACvE,IAAI,EAAE,GAAG,MAAM,CAAC,IAAI,gBAAgB;QACpC,UAAU,EAAE,MAAM,CAAC,SAAgB;KAC7B,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,WAAW,CAAC,WAAW,CAAC,UAAU;oBACpE,UAAU,EAAE,MAAM,CAAC,qBAAqB;oBACxC,MAAM,EAAE,oBAAoB;oBAC5B,cAAc,EAAE,UAAU;iBAC3B;aACF;SACF;KACF,CAAC,CAA4C,CAAC;IAE/C,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,WAAW,CAAC,4BAA4B,CAAC,UAAU,CAClJ,CAAC;IAET,IAAI,CAAC,OAAO;QAAE,MAAM,IAAI,KAAK,CAAC,wCAAwC,CAAC,CAAC;IAExE,OAAO,EAAE,QAAQ,EAAE,QAAQ,CAAC,eAAe,CAAC,QAAQ,EAAE,eAAe,EAAE,OAAO,CAAC,gBAAgB,CAAC,KAAK,CAAC,UAAU,EAAE,CAAC;AACrH,CAAC"}
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import { LedgerJsonApiClient } from '@fairmint/canton-node-sdk';
|
|
2
|
-
import { ContractDetails } from '../../types/contractDetails';
|
|
3
|
-
import { OcfStakeholderData } from '../../types/native';
|
|
4
|
-
export interface UpdateStakeholderDataParams {
|
|
5
|
-
stakeholderContractId: string;
|
|
6
|
-
featuredAppRightContractDetails: ContractDetails;
|
|
7
|
-
newStakeholderData: OcfStakeholderData;
|
|
8
|
-
}
|
|
9
|
-
export interface UpdateStakeholderDataResult {
|
|
10
|
-
contractId: string;
|
|
11
|
-
updateId: string;
|
|
12
|
-
}
|
|
13
|
-
/**
|
|
14
|
-
* Update stakeholder data by exercising the UpdateStakeholderData choice on a Stakeholder contract
|
|
15
|
-
*/
|
|
16
|
-
export declare function updateStakeholderData(client: LedgerJsonApiClient, params: UpdateStakeholderDataParams): Promise<UpdateStakeholderDataResult>;
|
|
17
|
-
//# sourceMappingURL=updateStakeholderData.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"updateStakeholderData.d.ts","sourceRoot":"","sources":["../../../src/functions/stakeholder/updateStakeholderData.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,mBAAmB,EAAE,MAAM,2BAA2B,CAAC;AAEhE,OAAO,EAAE,eAAe,EAAE,MAAM,6BAA6B,CAAC;AAC9D,OAAO,EAAE,kBAAkB,EAAE,MAAM,oBAAoB,CAAC;AAGxD,MAAM,WAAW,2BAA2B;IAC1C,qBAAqB,EAAE,MAAM,CAAC;IAC9B,+BAA+B,EAAE,eAAe,CAAC;IACjD,kBAAkB,EAAE,kBAAkB,CAAC;CACxC;AAED,MAAM,WAAW,2BAA2B;IAC1C,UAAU,EAAE,MAAM,CAAC;IACnB,QAAQ,EAAE,MAAM,CAAC;CAClB;AAUD;;GAEG;AACH,wBAAsB,qBAAqB,CACzC,MAAM,EAAE,mBAAmB,EAC3B,MAAM,EAAE,2BAA2B,GAClC,OAAO,CAAC,2BAA2B,CAAC,CAkDtC"}
|
|
@@ -1,59 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.updateStakeholderData = updateStakeholderData;
|
|
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 stakeholder data by exercising the UpdateStakeholderData choice on a Stakeholder contract
|
|
11
|
-
*/
|
|
12
|
-
async function updateStakeholderData(client, params) {
|
|
13
|
-
const eventsResponse = await client.getEventsByContractId({
|
|
14
|
-
contractId: params.stakeholderContractId
|
|
15
|
-
});
|
|
16
|
-
if (!eventsResponse.created?.createdEvent?.createArgument) {
|
|
17
|
-
throw new Error('Invalid contract events response: missing created event or create argument');
|
|
18
|
-
}
|
|
19
|
-
const createArgument = eventsResponse.created.createdEvent.createArgument;
|
|
20
|
-
if (!hasIssuer(createArgument)) {
|
|
21
|
-
throw new Error('Issuer party not found in contract create argument');
|
|
22
|
-
}
|
|
23
|
-
const issuerParty = createArgument.issuer;
|
|
24
|
-
const choiceArguments = {
|
|
25
|
-
new_stakeholder_data: (0, typeConversions_1.stakeholderDataToDaml)(params.newStakeholderData)
|
|
26
|
-
};
|
|
27
|
-
const response = await client.submitAndWaitForTransactionTree({
|
|
28
|
-
actAs: [issuerParty],
|
|
29
|
-
commands: [
|
|
30
|
-
{
|
|
31
|
-
ExerciseCommand: {
|
|
32
|
-
templateId: open_captable_protocol_daml_js_1.Fairmint.OpenCapTable.Stakeholder.Stakeholder.templateId,
|
|
33
|
-
contractId: params.stakeholderContractId,
|
|
34
|
-
choice: 'UpdateStakeholderData',
|
|
35
|
-
choiceArgument: choiceArguments
|
|
36
|
-
}
|
|
37
|
-
}
|
|
38
|
-
],
|
|
39
|
-
disclosedContracts: [
|
|
40
|
-
{
|
|
41
|
-
templateId: params.featuredAppRightContractDetails.templateId,
|
|
42
|
-
contractId: params.featuredAppRightContractDetails.contractId,
|
|
43
|
-
createdEventBlob: params.featuredAppRightContractDetails.createdEventBlob,
|
|
44
|
-
synchronizerId: params.featuredAppRightContractDetails.synchronizerId
|
|
45
|
-
}
|
|
46
|
-
]
|
|
47
|
-
});
|
|
48
|
-
const event = response.transactionTree.eventsById[1];
|
|
49
|
-
if ('CreatedTreeEvent' in event) {
|
|
50
|
-
return {
|
|
51
|
-
contractId: event.CreatedTreeEvent.value.contractId,
|
|
52
|
-
updateId: response.transactionTree.updateId
|
|
53
|
-
};
|
|
54
|
-
}
|
|
55
|
-
else {
|
|
56
|
-
throw new Error('Expected CreatedTreeEvent not found');
|
|
57
|
-
}
|
|
58
|
-
}
|
|
59
|
-
//# sourceMappingURL=updateStakeholderData.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"updateStakeholderData.js","sourceRoot":"","sources":["../../../src/functions/stakeholder/updateStakeholderData.ts"],"names":[],"mappings":";;AA6BA,sDAqDC;AAlFD,6FAAoE;AAKpE,iEAAoE;AAiBpE,SAAS,SAAS,CAAC,GAAY;IAC7B,OAAO,CAAC,CAAC,GAAG,IAAI,OAAO,GAAG,K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AC,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,20 +0,0 @@
|
|
|
1
|
-
import { LedgerJsonApiClient } from '@fairmint/canton-node-sdk';
|
|
2
|
-
/**
|
|
3
|
-
* Adjust authorized shares for a stock class.
|
|
4
|
-
*
|
|
5
|
-
* Schema reference: https://schema.opencaptablecoalition.com/v/1.2.0/objects/transactions/adjustment/StockClassAuthorizedSharesAdjustment.schema.json
|
|
6
|
-
* - new_authorized: New authorized shares amount (must be >= issued_shares and numeric for adjustable classes)
|
|
7
|
-
* - date: Transaction date (YYYY-MM-DD)
|
|
8
|
-
*/
|
|
9
|
-
export interface AdjustAuthorizedSharesParams {
|
|
10
|
-
stockClassContractId: string;
|
|
11
|
-
issuerParty: string;
|
|
12
|
-
newAuthorized: string | number;
|
|
13
|
-
date: string;
|
|
14
|
-
}
|
|
15
|
-
export interface AdjustAuthorizedSharesResult {
|
|
16
|
-
updateId: string;
|
|
17
|
-
updatedStockClassContractId: string;
|
|
18
|
-
}
|
|
19
|
-
export declare function adjustAuthorizedShares(client: LedgerJsonApiClient, params: AdjustAuthorizedSharesParams): Promise<AdjustAuthorizedSharesResult>;
|
|
20
|
-
//# sourceMappingURL=adjustAuthorizedShares.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"adjustAuthorizedShares.d.ts","sourceRoot":"","sources":["../../../src/functions/stockClass/adjustAuthorizedShares.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,mBAAmB,EAAE,MAAM,2BAA2B,CAAC;AAGhE;;;;;;GAMG;AACH,MAAM,WAAW,4BAA4B;IAC3C,oBAAoB,EAAE,MAAM,CAAC;IAC7B,WAAW,EAAE,MAAM,CAAC;IACpB,aAAa,EAAE,MAAM,GAAG,MAAM,CAAC;IAC/B,IAAI,EAAE,MAAM,CAAC;CACd;AAED,MAAM,WAAW,4BAA4B;IAC3C,QAAQ,EAAE,MAAM,CAAC;IACjB,2BAA2B,EAAE,MAAM,CAAC;CACrC;AAED,wBAAsB,sBAAsB,CAC1C,MAAM,EAAE,mBAAmB,EAC3B,MAAM,EAAE,4BAA4B,GACnC,OAAO,CAAC,4BAA4B,CAAC,CA2BvC"}
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.adjustAuthorizedShares = adjustAuthorizedShares;
|
|
4
|
-
const open_captable_protocol_daml_js_1 = require("@fairmint/open-captable-protocol-daml-js");
|
|
5
|
-
async function adjustAuthorizedShares(client, params) {
|
|
6
|
-
const choiceArgs = {
|
|
7
|
-
new_authorized: typeof params.newAuthorized === 'number' ? params.newAuthorized.toString() : params.newAuthorized,
|
|
8
|
-
date: `${params.date}T00:00:00.000Z`
|
|
9
|
-
};
|
|
10
|
-
const response = await client.submitAndWaitForTransactionTree({
|
|
11
|
-
actAs: [params.issuerParty],
|
|
12
|
-
commands: [
|
|
13
|
-
{
|
|
14
|
-
ExerciseCommand: {
|
|
15
|
-
templateId: open_captable_protocol_daml_js_1.Fairmint.OpenCapTable.StockClass.StockClass.templateId,
|
|
16
|
-
contractId: params.stockClassContractId,
|
|
17
|
-
choice: 'AdjustAuthorizedShares',
|
|
18
|
-
choiceArgument: choiceArgs
|
|
19
|
-
}
|
|
20
|
-
}
|
|
21
|
-
]
|
|
22
|
-
});
|
|
23
|
-
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.StockClass.templateId);
|
|
24
|
-
if (!created)
|
|
25
|
-
throw new Error('Updated StockClass not found');
|
|
26
|
-
return { updateId: response.transactionTree.updateId, updatedStockClassContractId: created.CreatedTreeEvent.value.contractId };
|
|
27
|
-
}
|
|
28
|
-
//# sourceMappingURL=adjustAuthorizedShares.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"adjustAuthorizedShares.js","sourceRoot":"","sources":["../../../src/functions/stockClass/adjustAuthorizedShares.ts"],"names":[],"mappings":";;AAuBA,wDA8BC;AArDD,6FAAoE;AAuB7D,KAAK,UAAU,sBAAsB,CAC1C,MAA2B,EAC3B,MAAoC;IAEpC,MAAM,UAAU,GAA4D;QAC1E,cAAc,EAAE,OAAO,MAAM,CAAC,aAAa,KAAK,QAAQ,CAAC,CAAC,CAAC,MAAM,CAAC,aAAa,CAAC,QAAQ,EAAE,CAAC,CAAC,CAAC,MAAM,CAAC,aAAa;QACjH,IAAI,EAAE,GAAG,MAAM,CAAC,IAAI,gBAAgB;KAC9B,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,UAAU,CAAC,UAAU,CAAC,UAAU;oBAClE,UAAU,EAAE,MAAM,CAAC,oBAAoB;oBACvC,MAAM,EAAE,wBAAwB;oBAChC,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,UAAU,CAAC,UAAU,CAC/H,CAAC;IAET,IAAI,CAAC,OAAO;QAAE,MAAM,IAAI,KAAK,CAAC,8BAA8B,CAAC,CAAC;IAE9D,OAAO,EAAE,QAAQ,EAAE,QAAQ,CAAC,eAAe,CAAC,QAAQ,EAAE,2BAA2B,EAAE,OAAO,CAAC,gBAAgB,CAAC,KAAK,CAAC,UAAU,EAAE,CAAC;AACjI,CAAC"}
|
|
@@ -1,23 +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 AdjustConversionRatioParams {
|
|
5
|
-
stockClassContractId: ContractId<Fairmint.OpenCapTable.StockClass.StockClass>;
|
|
6
|
-
issuerParty: string;
|
|
7
|
-
newRatio: {
|
|
8
|
-
numerator: string | number;
|
|
9
|
-
denominator: string | number;
|
|
10
|
-
};
|
|
11
|
-
date: string;
|
|
12
|
-
}
|
|
13
|
-
export interface AdjustConversionRatioResult {
|
|
14
|
-
updateId: string;
|
|
15
|
-
}
|
|
16
|
-
/**
|
|
17
|
-
* Adjust the ratio for a stock class ratio-based conversion mechanism.
|
|
18
|
-
* Schema: https://schema.opencaptablecoalition.com/v/1.2.0/objects/transactions/adjustment/StockClassConversionRatioAdjustment.schema.json
|
|
19
|
-
* - new_ratio_conversion_mechanism.ratio: New ratio to apply (numerator/denominator both > 0)
|
|
20
|
-
* - date: Effective date (YYYY-MM-DD)
|
|
21
|
-
*/
|
|
22
|
-
export declare function adjustConversionRatio(client: LedgerJsonApiClient, params: AdjustConversionRatioParams): Promise<AdjustConversionRatioResult>;
|
|
23
|
-
//# sourceMappingURL=adjustConversionRatio.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"adjustConversionRatio.d.ts","sourceRoot":"","sources":["../../../src/functions/stockClass/adjustConversionRatio.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,2BAA2B;IAC1C,oBAAoB,EAAE,UAAU,CAAC,QAAQ,CAAC,YAAY,CAAC,UAAU,CAAC,UAAU,CAAC,CAAC;IAC9E,WAAW,EAAE,MAAM,CAAC;IACpB,QAAQ,EAAE;QAAE,SAAS,EAAE,MAAM,GAAG,MAAM,CAAC;QAAC,WAAW,EAAE,MAAM,GAAG,MAAM,CAAA;KAAE,CAAC;IACvE,IAAI,EAAE,MAAM,CAAC;CACd;AAED,MAAM,WAAW,2BAA2B;IAC1C,QAAQ,EAAE,MAAM,CAAC;CAClB;AAED;;;;;GAKG;AACH,wBAAsB,qBAAqB,CACzC,MAAM,EAAE,mBAAmB,EAC3B,MAAM,EAAE,2BAA2B,GAClC,OAAO,CAAC,2BAA2B,CAAC,CAgCtC"}
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.adjustConversionRatio = adjustConversionRatio;
|
|
4
|
-
const open_captable_protocol_daml_js_1 = require("@fairmint/open-captable-protocol-daml-js");
|
|
5
|
-
/**
|
|
6
|
-
* Adjust the ratio for a stock class ratio-based conversion mechanism.
|
|
7
|
-
* Schema: https://schema.opencaptablecoalition.com/v/1.2.0/objects/transactions/adjustment/StockClassConversionRatioAdjustment.schema.json
|
|
8
|
-
* - new_ratio_conversion_mechanism.ratio: New ratio to apply (numerator/denominator both > 0)
|
|
9
|
-
* - date: Effective date (YYYY-MM-DD)
|
|
10
|
-
*/
|
|
11
|
-
async function adjustConversionRatio(client, params) {
|
|
12
|
-
const ratio = {
|
|
13
|
-
numerator: typeof params.newRatio.numerator === 'number'
|
|
14
|
-
? params.newRatio.numerator.toString()
|
|
15
|
-
: params.newRatio.numerator,
|
|
16
|
-
denominator: typeof params.newRatio.denominator === 'number'
|
|
17
|
-
? params.newRatio.denominator.toString()
|
|
18
|
-
: params.newRatio.denominator,
|
|
19
|
-
};
|
|
20
|
-
const choiceArgs = {
|
|
21
|
-
new_ratio: ratio,
|
|
22
|
-
date: `${params.date}T00:00:00.000Z`,
|
|
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.StockClass.StockClass.templateId,
|
|
30
|
-
contractId: params.stockClassContractId,
|
|
31
|
-
choice: 'AdjustConversionRatio',
|
|
32
|
-
choiceArgument: choiceArgs,
|
|
33
|
-
},
|
|
34
|
-
},
|
|
35
|
-
],
|
|
36
|
-
}));
|
|
37
|
-
return { updateId: response.transactionTree.updateId };
|
|
38
|
-
}
|
|
39
|
-
//# sourceMappingURL=adjustConversionRatio.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"adjustConversionRatio.js","sourceRoot":"","sources":["../../../src/functions/stockClass/adjustConversionRatio.ts"],"names":[],"mappings":";;AAsBA,sDAmCC;AAzDD,6FAAoE;AAgBpE;;;;;GAKG;AACI,KAAK,UAAU,qBAAqB,CACzC,MAA2B,EAC3B,MAAmC;IAEnC,MAAM,KAAK,GAAyC;QAClD,SAAS,EACP,OAAO,MAAM,CAAC,QAAQ,CAAC,SAAS,KAAK,QAAQ;YAC3C,CAAC,CAAC,MAAM,CAAC,QAAQ,CAAC,SAAS,CAAC,QAAQ,EAAE;YACtC,CAAC,CAAC,MAAM,CAAC,QAAQ,CAAC,SAAS;QAC/B,WAAW,EACT,OAAO,MAAM,CAAC,QAAQ,CAAC,WAAW,KAAK,QAAQ;YAC7C,CAAC,CAAC,MAAM,CAAC,QAAQ,CAAC,WAAW,CAAC,QAAQ,EAAE;YACxC,CAAC,CAAC,MAAM,CAAC,QAAQ,CAAC,WAAW;KAC3B,CAAC;IAET,MAAM,UAAU,GAA2D;QACzE,SAAS,EAAE,KAAY;QACvB,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,UAAU,CAAC,UAAU,CAAC,UAAU;oBAClE,UAAU,EAAE,MAAM,CAAC,oBAAoB;oBACvC,MAAM,EAAE,uBAAuB;oBAC/B,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,21 +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 ConsolidatePositionsParams {
|
|
5
|
-
stockClassContractId: ContractId<Fairmint.OpenCapTable.StockClass.StockClass>;
|
|
6
|
-
issuerParty: string;
|
|
7
|
-
owner: string;
|
|
8
|
-
positions: string[];
|
|
9
|
-
date: string;
|
|
10
|
-
reasonText?: string;
|
|
11
|
-
}
|
|
12
|
-
export interface ConsolidatePositionsResult {
|
|
13
|
-
updateId: string;
|
|
14
|
-
resultingPositionContractId: string;
|
|
15
|
-
}
|
|
16
|
-
/**
|
|
17
|
-
* Consolidate multiple stock positions of the same owner into one.
|
|
18
|
-
* Schema: https://schema.opencaptablecoalition.com/v/1.2.0/objects/transactions/consolidation/StockConsolidation.schema.json
|
|
19
|
-
*/
|
|
20
|
-
export declare function consolidatePositions(client: LedgerJsonApiClient, params: ConsolidatePositionsParams): Promise<ConsolidatePositionsResult>;
|
|
21
|
-
//# sourceMappingURL=consolidatePositions.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"consolidatePositions.d.ts","sourceRoot":"","sources":["../../../src/functions/stockClass/consolidatePositions.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,0BAA0B;IACzC,oBAAoB,EAAE,UAAU,CAAC,QAAQ,CAAC,YAAY,CAAC,UAAU,CAAC,UAAU,CAAC,CAAC;IAC9E,WAAW,EAAE,MAAM,CAAC;IACpB,KAAK,EAAE,MAAM,CAAC;IACd,SAAS,EAAE,MAAM,EAAE,CAAC;IACpB,IAAI,EAAE,MAAM,CAAC;IACb,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAED,MAAM,WAAW,0BAA0B;IACzC,QAAQ,EAAE,MAAM,CAAC;IACjB,2BAA2B,EAAE,MAAM,CAAC;CACrC;AAED;;;GAGG;AACH,wBAAsB,oBAAoB,CACxC,MAAM,EAAE,mBAAmB,EAC3B,MAAM,EAAE,0BAA0B,GACjC,OAAO,CAAC,0BAA0B,CAAC,CA6BrC"}
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.consolidatePositions = consolidatePositions;
|
|
4
|
-
const open_captable_protocol_daml_js_1 = require("@fairmint/open-captable-protocol-daml-js");
|
|
5
|
-
/**
|
|
6
|
-
* Consolidate multiple stock positions of the same owner into one.
|
|
7
|
-
* Schema: https://schema.opencaptablecoalition.com/v/1.2.0/objects/transactions/consolidation/StockConsolidation.schema.json
|
|
8
|
-
*/
|
|
9
|
-
async function consolidatePositions(client, params) {
|
|
10
|
-
const choiceArgs = {
|
|
11
|
-
owner: params.owner,
|
|
12
|
-
positions: params.positions,
|
|
13
|
-
date: `${params.date}T00:00:00.000Z`,
|
|
14
|
-
reason_text: params.reasonText ? { tag: 'Some', value: params.reasonText } : null,
|
|
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.StockClass.StockClass.templateId,
|
|
22
|
-
contractId: params.stockClassContractId,
|
|
23
|
-
choice: 'ConsolidatePositions',
|
|
24
|
-
choiceArgument: choiceArgs,
|
|
25
|
-
},
|
|
26
|
-
},
|
|
27
|
-
],
|
|
28
|
-
}));
|
|
29
|
-
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);
|
|
30
|
-
if (!created)
|
|
31
|
-
throw new Error('Resulting StockPosition not found');
|
|
32
|
-
return { updateId: response.transactionTree.updateId, resultingPositionContractId: created.CreatedTreeEvent.value.contractId };
|
|
33
|
-
}
|
|
34
|
-
//# sourceMappingURL=consolidatePositions.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"consolidatePositions.js","sourceRoot":"","sources":["../../../src/functions/stockClass/consolidatePositions.ts"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O,CAAC,gBAAgB,CAAC,KAAK,CAAC,UAAU,EAAE,CAAC;AACjI,CAAC"}
|
|
@@ -1,19 +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 IssueStockParams {
|
|
5
|
-
stockClassContractId: ContractId<Fairmint.OpenCapTable.StockClass.StockClass>;
|
|
6
|
-
issuerParty: string;
|
|
7
|
-
recipientParty: string;
|
|
8
|
-
quantity: string | number;
|
|
9
|
-
}
|
|
10
|
-
export interface IssueStockResult {
|
|
11
|
-
updateId: string;
|
|
12
|
-
stockPositionContractId: string;
|
|
13
|
-
}
|
|
14
|
-
/**
|
|
15
|
-
* Issue stock to a stakeholder by exercising the IssueStock choice on a StockClass contract
|
|
16
|
-
* @see https://schema.opencaptablecoalition.com/v/1.2.0/objects/transactions/issuance/StockIssuance.schema.json
|
|
17
|
-
*/
|
|
18
|
-
export declare function issueStock(client: LedgerJsonApiClient, params: IssueStockParams): Promise<IssueStockResult>;
|
|
19
|
-
//# sourceMappingURL=issueStock.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"issueStock.d.ts","sourceRoot":"","sources":["../../../src/functions/stockClass/issueStock.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,0CAA0C,CAAC;AACpE,OAAO,EAAE,mBAAmB,EAAE,MAAM,2BAA2B,CAAC;AAChE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAG9C,MAAM,WAAW,gBAAgB;IAC/B,oBAAoB,EAAE,UAAU,CAAC,QAAQ,CAAC,YAAY,CAAC,UAAU,CAAC,UAAU,CAAC,CAAC;IAC9E,WAAW,EAAE,MAAM,CAAC;IACpB,cAAc,EAAE,MAAM,CAAC;IACvB,QAAQ,EAAE,MAAM,GAAG,MAAM,CAAC;CAC3B;AAED,MAAM,WAAW,gBAAgB;IAC/B,QAAQ,EAAE,MAAM,CAAC;IACjB,uBAAuB,EAAE,MAAM,CAAC;CACjC;AAED;;;GAGG;AACH,wBAAsB,UAAU,CAC9B,MAAM,EAAE,mBAAmB,EAC3B,MAAM,EAAE,gBAAgB,GACvB,OAAO,CAAC,gBAAgB,CAAC,CA6B3B"}
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.issueStock = issueStock;
|
|
4
|
-
const open_captable_protocol_daml_js_1 = require("@fairmint/open-captable-protocol-daml-js");
|
|
5
|
-
/**
|
|
6
|
-
* Issue stock to a stakeholder by exercising the IssueStock choice on a StockClass contract
|
|
7
|
-
* @see https://schema.opencaptablecoalition.com/v/1.2.0/objects/transactions/issuance/StockIssuance.schema.json
|
|
8
|
-
*/
|
|
9
|
-
async function issueStock(client, params) {
|
|
10
|
-
const choiceArgs = {
|
|
11
|
-
transfer: {
|
|
12
|
-
recipient: params.recipientParty,
|
|
13
|
-
quantity: typeof params.quantity === 'number' ? params.quantity.toString() : params.quantity
|
|
14
|
-
}
|
|
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.StockClass.StockClass.templateId,
|
|
22
|
-
contractId: params.stockClassContractId,
|
|
23
|
-
choice: 'IssueStock',
|
|
24
|
-
choiceArgument: choiceArgs
|
|
25
|
-
}
|
|
26
|
-
}
|
|
27
|
-
]
|
|
28
|
-
});
|
|
29
|
-
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);
|
|
30
|
-
if (!created)
|
|
31
|
-
throw new Error('StockPosition not found');
|
|
32
|
-
return { updateId: response.transactionTree.updateId, stockPositionContractId: created.CreatedTreeEvent.value.contractId };
|
|
33
|
-
}
|
|
34
|
-
//# sourceMappingURL=issueStock.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"issueStock.js","sourceRoot":"","sources":["../../../src/functions/stockClass/issueStock.ts"],"names":[],"mappings":";;AAqBA,gCAgCC;AArDD,6FAAoE;AAiBpE;;;GAGG;AACI,KAAK,UAAU,UAAU,CAC9B,MAA2B,EAC3B,MAAwB;IAExB,MAAM,UAAU,GAAgD;QAC9D,QAAQ,EAAE;YACR,SAAS,EAAE,MAAM,CAAC,cAAc;YAChC,QAAQ,EAAE,OAAO,MAAM,CAAC,QAAQ,KAAK,QAAQ,CAAC,CAAC,CAAC,MAAM,CAAC,QAAQ,CAAC,QAAQ,EAAE,CAAC,CAAC,CAAC,MAAM,CAAC,QAAQ;SACtF;KACF,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,UAAU,CAAC,UAAU,CAAC,UAAU;oBAClE,UAAU,EAAE,MAAM,CAAC,oBAAoB;oBACvC,MAAM,EAAE,YAAY;oBACpB,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,18 +0,0 @@
|
|
|
1
|
-
import { LedgerJsonApiClient } from '@fairmint/canton-node-sdk';
|
|
2
|
-
export interface ReissueStockParams {
|
|
3
|
-
stockClassContractId: string;
|
|
4
|
-
issuerParty: string;
|
|
5
|
-
recipientParty: string;
|
|
6
|
-
quantity: string | number;
|
|
7
|
-
date: string;
|
|
8
|
-
}
|
|
9
|
-
export interface ReissueStockResult {
|
|
10
|
-
updateId: string;
|
|
11
|
-
stockPositionContractId: string;
|
|
12
|
-
}
|
|
13
|
-
/**
|
|
14
|
-
* Reissue previously repurchased shares into a stock position
|
|
15
|
-
* @see https://schema.opencaptablecoalition.com/v/1.2.0/objects/transactions/reissuance/StockReissuance.schema.json
|
|
16
|
-
*/
|
|
17
|
-
export declare function reissueStock(client: LedgerJsonApiClient, params: ReissueStockParams): Promise<ReissueStockResult>;
|
|
18
|
-
//# sourceMappingURL=reissueStock.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"reissueStock.d.ts","sourceRoot":"","sources":["../../../src/functions/stockClass/reissueStock.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,mBAAmB,EAAE,MAAM,2BAA2B,CAAC;AAGhE,MAAM,WAAW,kBAAkB;IACjC,oBAAoB,EAAE,MAAM,CAAC;IAC7B,WAAW,EAAE,MAAM,CAAC;IACpB,cAAc,EAAE,MAAM,CAAC;IACvB,QAAQ,EAAE,MAAM,GAAG,MAAM,CAAC;IAC1B,IAAI,EAAE,MAAM,CAAC;CACd;AAED,MAAM,WAAW,kBAAkB;IACjC,QAAQ,EAAE,MAAM,CAAC;IACjB,uBAAuB,EAAE,MAAM,CAAC;CACjC;AAED;;;GAGG;AACH,wBAAsB,YAAY,CAChC,MAAM,EAAE,mBAAmB,EAC3B,MAAM,EAAE,kBAAkB,GACzB,OAAO,CAAC,kBAAkB,CAAC,CA8B7B"}
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.reissueStock = reissueStock;
|
|
4
|
-
const open_captable_protocol_daml_js_1 = require("@fairmint/open-captable-protocol-daml-js");
|
|
5
|
-
/**
|
|
6
|
-
* Reissue previously repurchased shares into a stock position
|
|
7
|
-
* @see https://schema.opencaptablecoalition.com/v/1.2.0/objects/transactions/reissuance/StockReissuance.schema.json
|
|
8
|
-
*/
|
|
9
|
-
async function reissueStock(client, params) {
|
|
10
|
-
const choiceArgs = {
|
|
11
|
-
transfer: {
|
|
12
|
-
recipient: params.recipientParty,
|
|
13
|
-
quantity: typeof params.quantity === 'number' ? params.quantity.toString() : params.quantity
|
|
14
|
-
},
|
|
15
|
-
date: `${params.date}T00:00:00.000Z`
|
|
16
|
-
};
|
|
17
|
-
const response = await client.submitAndWaitForTransactionTree({
|
|
18
|
-
actAs: [params.issuerParty],
|
|
19
|
-
commands: [
|
|
20
|
-
{
|
|
21
|
-
ExerciseCommand: {
|
|
22
|
-
templateId: open_captable_protocol_daml_js_1.Fairmint.OpenCapTable.StockClass.StockClass.templateId,
|
|
23
|
-
contractId: params.stockClassContractId,
|
|
24
|
-
choice: 'ReissueStock',
|
|
25
|
-
choiceArgument: choiceArgs
|
|
26
|
-
}
|
|
27
|
-
}
|
|
28
|
-
]
|
|
29
|
-
});
|
|
30
|
-
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);
|
|
31
|
-
if (!created)
|
|
32
|
-
throw new Error('StockPosition not found');
|
|
33
|
-
return { updateId: response.transactionTree.updateId, stockPositionContractId: created.CreatedTreeEvent.value.contractId };
|
|
34
|
-
}
|
|
35
|
-
//# sourceMappingURL=reissueStock.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"reissueStock.js","sourceRoot":"","sources":["../../../src/functions/stockClass/reissueStock.ts"],"names":[],"mappings":";;AAqBA,oCAiCC;AAtDD,6FAAoE;AAiBpE;;;GAGG;AACI,KAAK,UAAU,YAAY,CAChC,MAA2B,EAC3B,MAA0B;IAE1B,MAAM,UAAU,GAAkD;QAChE,QAAQ,EAAE;YACR,SAAS,EAAE,MAAM,CAAC,cAAc;YAChC,QAAQ,EAAE,OAAO,MAAM,CAAC,QAAQ,KAAK,QAAQ,CAAC,CAAC,CAAC,MAAM,CAAC,QAAQ,CAAC,QAAQ,EAAE,CAAC,CAAC,CAAC,MAAM,CAAC,QAAQ;SACtF;QACR,IAAI,EAAE,GAAG,MAAM,CAAC,IAAI,gBAAgB;KAC9B,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,UAAU,CAAC,UAAU,CAAC,UAAU;oBAClE,UAAU,EAAE,MAAM,CAAC,oBAAoB;oBACvC,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,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,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 RepurchaseStockParams {
|
|
5
|
-
stockClassContractId: ContractId<Fairmint.OpenCapTable.StockClass.StockClass>;
|
|
6
|
-
issuerParty: string;
|
|
7
|
-
stockPositionContractId: ContractId<Fairmint.OpenCapTable.StockClass.StockPosition>;
|
|
8
|
-
quantity: string | number;
|
|
9
|
-
date: string;
|
|
10
|
-
}
|
|
11
|
-
export interface RepurchaseStockResult {
|
|
12
|
-
updateId: string;
|
|
13
|
-
updatedStockClassContractId: string;
|
|
14
|
-
}
|
|
15
|
-
/**
|
|
16
|
-
* Repurchase stock from a position
|
|
17
|
-
* @see https://schema.opencaptablecoalition.com/v/1.2.0/objects/transactions/repurchase/StockRepurchase.schema.json
|
|
18
|
-
*/
|
|
19
|
-
export declare function repurchaseStock(client: LedgerJsonApiClient, params: RepurchaseStockParams): Promise<RepurchaseStockResult>;
|
|
20
|
-
//# sourceMappingURL=repurchaseStock.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"repurchaseStock.d.ts","sourceRoot":"","sources":["../../../src/functions/stockClass/repurchaseStock.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,qBAAqB;IACpC,oBAAoB,EAAE,UAAU,CAAC,QAAQ,CAAC,YAAY,CAAC,UAAU,CAAC,UAAU,CAAC,CAAC;IAC9E,WAAW,EAAE,MAAM,CAAC;IACpB,uBAAuB,EAAE,UAAU,CAAC,QAAQ,CAAC,YAAY,CAAC,UAAU,CAAC,aAAa,CAAC,CAAC;IACpF,QAAQ,EAAE,MAAM,GAAG,MAAM,CAAC;IAC1B,IAAI,EAAE,MAAM,CAAC;CACd;AAED,MAAM,WAAW,qBAAqB;IACpC,QAAQ,EAAE,MAAM,CAAC;IACjB,2BAA2B,EAAE,MAAM,CAAC;CACrC;AAED;;;GAGG;AACH,wBAAsB,eAAe,CACnC,MAAM,EAAE,mBAAmB,EAC3B,MAAM,EAAE,qBAAqB,GAC5B,OAAO,CAAC,qBAAqB,CAAC,CA4BhC"}
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.repurchaseStock = repurchaseStock;
|
|
4
|
-
const open_captable_protocol_daml_js_1 = require("@fairmint/open-captable-protocol-daml-js");
|
|
5
|
-
/**
|
|
6
|
-
* Repurchase stock from a position
|
|
7
|
-
* @see https://schema.opencaptablecoalition.com/v/1.2.0/objects/transactions/repurchase/StockRepurchase.schema.json
|
|
8
|
-
*/
|
|
9
|
-
async function repurchaseStock(client, params) {
|
|
10
|
-
const choiceArgs = {
|
|
11
|
-
position: params.stockPositionContractId,
|
|
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.StockClass.StockClass.templateId,
|
|
21
|
-
contractId: params.stockClassContractId,
|
|
22
|
-
choice: 'RepurchaseStock',
|
|
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.StockClass.templateId);
|
|
29
|
-
if (!created)
|
|
30
|
-
throw new Error('Updated StockClass not found');
|
|
31
|
-
return { updateId: response.transactionTree.updateId, updatedStockClassContractId: created.CreatedTreeEvent.value.contractId };
|
|
32
|
-
}
|
|
33
|
-
//# sourceMappingURL=repurchaseStock.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"repurchaseStock.js","sourceRoot":"","sources":["../../../src/functions/stockClass/repurchaseStock.ts"],"names":[],"mappings":";;AAsBA,0CA+BC;AArDD,6FAAoE;AAkBpE;;;GAGG;AACI,KAAK,UAAU,eAAe,CACnC,MAA2B,EAC3B,MAA6B;IAE7B,MAAM,UAAU,GAAqD;QACnE,QAAQ,EAAE,MAAM,CAAC,uBAAuB;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,UAA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