@open-captable-protocol/canton 0.0.32 → 0.0.34

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.
Files changed (48) hide show
  1. package/dist/OcpClient.d.ts +6 -1
  2. package/dist/OcpClient.d.ts.map +1 -1
  3. package/dist/OcpClient.js +5 -0
  4. package/dist/OcpClient.js.map +1 -1
  5. package/dist/functions/index.d.ts +1 -0
  6. package/dist/functions/index.d.ts.map +1 -1
  7. package/dist/functions/index.js +1 -0
  8. package/dist/functions/index.js.map +1 -1
  9. package/dist/functions/issuer/createIssuer.d.ts +6 -2
  10. package/dist/functions/issuer/createIssuer.d.ts.map +1 -1
  11. package/dist/functions/issuer/createIssuer.js +6 -1
  12. package/dist/functions/issuer/createIssuer.js.map +1 -1
  13. package/dist/functions/issuer/getIssuerAsOcf.d.ts +24 -0
  14. package/dist/functions/issuer/getIssuerAsOcf.d.ts.map +1 -1
  15. package/dist/functions/issuer/getIssuerAsOcf.js.map +1 -1
  16. package/dist/functions/issuer/updateIssuerData.d.ts +2 -2
  17. package/dist/functions/issuer/updateIssuerData.d.ts.map +1 -1
  18. package/dist/functions/issuer/updateIssuerData.js +2 -1
  19. package/dist/functions/issuer/updateIssuerData.js.map +1 -1
  20. package/dist/functions/stockClass/createStockClass.d.ts +40 -0
  21. package/dist/functions/stockClass/createStockClass.d.ts.map +1 -0
  22. package/dist/functions/stockClass/createStockClass.js +60 -0
  23. package/dist/functions/stockClass/createStockClass.js.map +1 -0
  24. package/dist/functions/stockClass/getStockClassAsOcf.d.ts +103 -0
  25. package/dist/functions/stockClass/getStockClassAsOcf.d.ts.map +1 -0
  26. package/dist/functions/stockClass/getStockClassAsOcf.js +102 -0
  27. package/dist/functions/stockClass/getStockClassAsOcf.js.map +1 -0
  28. package/dist/functions/stockClass/index.d.ts +4 -0
  29. package/dist/functions/stockClass/index.d.ts.map +1 -0
  30. package/dist/functions/stockClass/index.js +20 -0
  31. package/dist/functions/stockClass/index.js.map +1 -0
  32. package/dist/functions/stockClass/updateStockClass.d.ts +38 -0
  33. package/dist/functions/stockClass/updateStockClass.d.ts.map +1 -0
  34. package/dist/functions/stockClass/updateStockClass.js +77 -0
  35. package/dist/functions/stockClass/updateStockClass.js.map +1 -0
  36. package/dist/index.d.ts +1 -0
  37. package/dist/index.d.ts.map +1 -1
  38. package/dist/index.js +1 -0
  39. package/dist/index.js.map +1 -1
  40. package/dist/types/native.d.ts +105 -0
  41. package/dist/types/native.d.ts.map +1 -0
  42. package/dist/types/native.js +8 -0
  43. package/dist/types/native.js.map +1 -0
  44. package/dist/utils/typeConversions.d.ts +22 -0
  45. package/dist/utils/typeConversions.d.ts.map +1 -0
  46. package/dist/utils/typeConversions.js +242 -0
  47. package/dist/utils/typeConversions.js.map +1 -0
  48. package/package.json +2 -2
@@ -0,0 +1,20 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./createStockClass"), exports);
18
+ __exportStar(require("./updateStockClass"), exports);
19
+ __exportStar(require("./getStockClassAsOcf"), exports);
20
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/functions/stockClass/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,qDAAmC;AACnC,qDAAmC;AACnC,uDAAqC"}
@@ -0,0 +1,38 @@
1
+ import { LedgerJsonApiClient } from '@fairmint/canton-node-sdk';
2
+ import { OcfStockClassData } from '../../types/native';
3
+ export interface UpdateStockClassParams {
4
+ stockClassContractId: string;
5
+ newStockClassData: OcfStockClassData;
6
+ }
7
+ export interface UpdateStockClassResult {
8
+ contractId: string;
9
+ updateId: string;
10
+ }
11
+ /**
12
+ * Update stock class data by exercising the UpdateStockClassData choice on a StockClass contract
13
+ *
14
+ * This function retrieves the issuer party from the stock class contract and then updates
15
+ * the stock class data with the provided new data.
16
+ *
17
+ * @example
18
+ * ```typescript
19
+ * const result = await updateStockClass(client, {
20
+ * stockClassContractId: "1234567890abcdef",
21
+ * newStockClassData: {
22
+ * name: "Series A Preferred (Updated)",
23
+ * class_type: "PREFERRED",
24
+ * default_id_prefix: "SA-",
25
+ * initial_shares_authorized: "2000000", // Updated from 1000000
26
+ * votes_per_share: "1",
27
+ * seniority: "1",
28
+ * // ... other updated stock class data
29
+ * }
30
+ * });
31
+ * ```
32
+ *
33
+ * @param client - The ledger JSON API client
34
+ * @param params - Parameters for updating stock class data
35
+ * @returns Promise resolving to the result of the stock class data update
36
+ */
37
+ export declare function updateStockClass(client: LedgerJsonApiClient, params: UpdateStockClassParams): Promise<UpdateStockClassResult>;
38
+ //# sourceMappingURL=updateStockClass.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"updateStockClass.d.ts","sourceRoot":"","sources":["../../../src/functions/stockClass/updateStockClass.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,mBAAmB,EAAE,MAAM,2BAA2B,CAAC;AAEhE,OAAO,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAC;AAGvD,MAAM,WAAW,sBAAsB;IACrC,oBAAoB,EAAE,MAAM,CAAC;IAC7B,iBAAiB,EAAE,iBAAiB,CAAC;CACtC;AAED,MAAM,WAAW,sBAAsB;IACrC,UAAU,EAAE,MAAM,CAAC;IACnB,QAAQ,EAAE,MAAM,CAAC;CAClB;AAUD;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,wBAAsB,gBAAgB,CACpC,MAAM,EAAE,mBAAmB,EAC3B,MAAM,EAAE,sBAAsB,GAC7B,OAAO,CAAC,sBAAsB,CAAC,CA6CjC"}
@@ -0,0 +1,77 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.updateStockClass = updateStockClass;
4
+ const open_captable_protocol_daml_js_1 = require("@fairmint/open-captable-protocol-daml-js");
5
+ const typeConversions_1 = require("../../utils/typeConversions");
6
+ function hasIssuer(arg) {
7
+ return !!arg && typeof arg === 'object' && typeof arg.issuer === 'string';
8
+ }
9
+ /**
10
+ * Update stock class data by exercising the UpdateStockClassData choice on a StockClass contract
11
+ *
12
+ * This function retrieves the issuer party from the stock class contract and then updates
13
+ * the stock class data with the provided new data.
14
+ *
15
+ * @example
16
+ * ```typescript
17
+ * const result = await updateStockClass(client, {
18
+ * stockClassContractId: "1234567890abcdef",
19
+ * newStockClassData: {
20
+ * name: "Series A Preferred (Updated)",
21
+ * class_type: "PREFERRED",
22
+ * default_id_prefix: "SA-",
23
+ * initial_shares_authorized: "2000000", // Updated from 1000000
24
+ * votes_per_share: "1",
25
+ * seniority: "1",
26
+ * // ... other updated stock class data
27
+ * }
28
+ * });
29
+ * ```
30
+ *
31
+ * @param client - The ledger JSON API client
32
+ * @param params - Parameters for updating stock class data
33
+ * @returns Promise resolving to the result of the stock class data update
34
+ */
35
+ async function updateStockClass(client, params) {
36
+ // Get the events for the StockClass contract to extract the issuer party
37
+ const eventsResponse = await client.getEventsByContractId({
38
+ contractId: params.stockClassContractId
39
+ });
40
+ if (!eventsResponse.created?.createdEvent?.createArgument) {
41
+ throw new Error('Invalid contract events response: missing created event or create argument');
42
+ }
43
+ const createArgument = eventsResponse.created.createdEvent.createArgument;
44
+ if (!hasIssuer(createArgument)) {
45
+ throw new Error('Issuer party not found in contract create argument');
46
+ }
47
+ const issuerParty = createArgument.issuer;
48
+ // Create the choice arguments for UpdateStockClassData
49
+ const choiceArguments = {
50
+ new_stock_class_data: (0, typeConversions_1.stockClassDataToDaml)(params.newStockClassData)
51
+ };
52
+ // Submit the choice to the StockClass contract
53
+ const response = await client.submitAndWaitForTransactionTree({
54
+ actAs: [issuerParty],
55
+ commands: [
56
+ {
57
+ ExerciseCommand: {
58
+ templateId: open_captable_protocol_daml_js_1.Fairmint.OpenCapTable.StockClass.StockClass.templateId,
59
+ contractId: params.stockClassContractId,
60
+ choice: 'UpdateStockClassData',
61
+ choiceArgument: choiceArguments
62
+ }
63
+ }
64
+ ]
65
+ });
66
+ const event = response.transactionTree.eventsById[1];
67
+ if ('CreatedTreeEvent' in event) {
68
+ return {
69
+ contractId: event.CreatedTreeEvent.value.contractId,
70
+ updateId: response.transactionTree.updateId
71
+ };
72
+ }
73
+ else {
74
+ throw new Error('Expected CreatedTreeEvent not found');
75
+ }
76
+ }
77
+ //# sourceMappingURL=updateStockClass.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"updateStockClass.js","sourceRoot":"","sources":["../../../src/functions/stockClass/updateStockClass.ts"],"names":[],"mappings":";;AAkDA,4CAgDC;AAlGD,6FAAoE;AAIpE,iEAAmE;AAgBnE,SAAS,SAAS,CAAC,GAAY;IAC7B,OAAO,CAAC,CAAC,GAAG,IAAI,OAAO,GAAG,KAAK,QAAQ,IAAI,OAAQ,GAAqC,CAAC,MAAM,KAAK,QAAQ,CAAC;AAC/G,CAAC;AAED;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACI,KAAK,UAAU,gBAAgB,CACpC,MAA2B,EAC3B,MAA8B;IAE9B,yEAAyE;IACzE,MAAM,cAAc,GAAG,MAAM,MAAM,CAAC,qBAAqB,CAAC;QACxD,UAAU,EAAE,MAAM,CAAC,oBAAoB;KACxC,CAAC,CAAC;IAEH,IAAI,CAAC,cAAc,CAAC,OAAO,EAAE,YAAY,EAAE,cAAc,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  export * from './types/contractDetails';
4
+ export * from './types/native';
4
5
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAC;AAC5B,cAAc,aAAa,CAAC;AAC5B,cAAc,yBAAyB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAC;AAC5B,cAAc,aAAa,CAAC;AAC5B,cAAc,yBAAyB,CAAC;AACxC,cAAc,gBAAgB,CAAC"}
package/dist/index.js CHANGED
@@ -17,4 +17,5 @@ Object.defineProperty(exports, "__esModule", { value: true });
17
17
  __exportStar(require("./OcpClient"), exports);
18
18
  __exportStar(require("./functions"), exports);
19
19
  __exportStar(require("./types/contractDetails"), exports);
20
+ __exportStar(require("./types/native"), exports);
20
21
  //# sourceMappingURL=index.js.map
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,8CAA4B;AAC5B,8CAA4B;AAC5B,0DAAwC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,8CAA4B;AAC5B,8CAA4B;AAC5B,0DAAwC;AACxC,iDAA+B"}
@@ -0,0 +1,105 @@
1
+ /**
2
+ * Clean TypeScript types that provide a better developer experience
3
+ * compared to the raw DAML types. These types use simple string literals
4
+ * for enums and standard TypeScript objects for complex types.
5
+ */
6
+ /** Email type */
7
+ export type EmailType = 'PERSONAL' | 'BUSINESS';
8
+ /** Address type */
9
+ export type AddressType = 'LEGAL' | 'CONTACT' | 'OTHER';
10
+ /** Stock class type */
11
+ export type StockClassType = 'PREFERRED' | 'COMMON';
12
+ /** Monetary value */
13
+ export interface Monetary {
14
+ /** The amount of the monetary value */
15
+ amount: string | number;
16
+ /** The currency code for the monetary value (ISO 4217) */
17
+ currency: string;
18
+ }
19
+ /** Email object */
20
+ export interface Email {
21
+ /** Type of email address */
22
+ email_type: EmailType;
23
+ /** The email address */
24
+ email_address: string;
25
+ }
26
+ /** Address object */
27
+ export interface Address {
28
+ /** What type of address this is */
29
+ address_type: AddressType;
30
+ /** Street address (multi-line string) */
31
+ street_suite?: string;
32
+ /** City */
33
+ city?: string;
34
+ /** State, province, or equivalent identifier */
35
+ country_subdivision?: string;
36
+ /** Country code for this address (ISO 3166-1 alpha-2) */
37
+ country: string;
38
+ /** Address postal code */
39
+ postal_code?: string;
40
+ }
41
+ /** Tax ID object */
42
+ export interface TaxId {
43
+ /** Type of tax identifier */
44
+ tax_id_type: string;
45
+ /** The tax identification number */
46
+ tax_id: string;
47
+ }
48
+ /** OCF Issuer Data */
49
+ export interface OcfIssuerData {
50
+ /** Legal name of the issuer */
51
+ legal_name: string;
52
+ /** The country where the issuer company was legally formed (ISO 3166-1 alpha-2) */
53
+ country_of_formation: string;
54
+ /** Doing Business As name */
55
+ dba?: string;
56
+ /** Date of formation (ISO 8601 date string YYYY-MM-DD) */
57
+ formation_date?: string;
58
+ /** The state, province, or subdivision where the issuer company was legally formed */
59
+ country_subdivision_of_formation?: string;
60
+ /** The tax ids for this issuer company */
61
+ tax_ids?: TaxId[];
62
+ /** A work email that the issuer company can be reached at */
63
+ email?: Email;
64
+ /** A phone number that the issuer company can be reached at */
65
+ phone?: string;
66
+ /** The headquarters address of the issuing company */
67
+ address?: Address;
68
+ /** The initial number of shares authorized for this issuer */
69
+ initial_shares_authorized?: string | number;
70
+ }
71
+ /** OCF Stock Class Data */
72
+ export interface OcfStockClassData {
73
+ /** Name for the stock type (e.g. Series A Preferred or Class A Common) */
74
+ name: string;
75
+ /** The type of this stock class */
76
+ class_type: StockClassType;
77
+ /** Default prefix for certificate numbers */
78
+ default_id_prefix: string;
79
+ /** The initial number of shares authorized for this stock class */
80
+ initial_shares_authorized: string | number;
81
+ /** The number of votes each share of this stock class gets */
82
+ votes_per_share: string | number;
83
+ /** Seniority of the stock - determines repayment priority */
84
+ seniority: string | number;
85
+ /** Date on which the board approved the stock class (ISO 8601 date string YYYY-MM-DD) */
86
+ board_approval_date?: string;
87
+ /** Date on which the stockholders approved the stock class (ISO 8601 date string YYYY-MM-DD) */
88
+ stockholder_approval_date?: string;
89
+ /** Per-share par value of this stock class */
90
+ par_value?: Monetary;
91
+ /** Per-share price this stock class was issued for */
92
+ price_per_share?: Monetary;
93
+ /** List of stock class conversion rights possible for this stock class */
94
+ conversion_rights?: Array<{
95
+ /** The type of conversion right */
96
+ conversion_mechanism: string;
97
+ /** Additional conversion right details */
98
+ [key: string]: any;
99
+ }>;
100
+ /** The liquidation preference per share for this stock class */
101
+ liquidation_preference_multiple?: string | number;
102
+ /** The participation cap multiple per share for this stock class */
103
+ participation_cap_multiple?: string | number;
104
+ }
105
+ //# sourceMappingURL=native.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"native.d.ts","sourceRoot":"","sources":["../../src/types/native.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,iBAAiB;AACjB,MAAM,MAAM,SAAS,GAAG,UAAU,GAAG,UAAU,CAAC;AAEhD,mBAAmB;AACnB,MAAM,MAAM,WAAW,GAAG,OAAO,GAAG,SAAS,GAAG,OAAO,CAAC;AAExD,uBAAuB;AACvB,MAAM,MAAM,cAAc,GAAG,WAAW,GAAG,QAAQ,CAAC;AAEpD,qBAAqB;AACrB,MAAM,WAAW,QAAQ;IACvB,uCAAuC;IACvC,MAAM,EAAE,MAAM,GAAG,MAAM,CAAC;IACxB,0DAA0D;IAC1D,QAAQ,EAAE,MAAM,CAAC;CAClB;AAED,mBAAmB;AACnB,MAAM,WAAW,KAAK;IACpB,4BAA4B;IAC5B,UAAU,EAAE,SAAS,CAAC;IACtB,wBAAwB;IACxB,aAAa,EAAE,MAAM,CAAC;CACvB;AAED,qBAAqB;AACrB,MAAM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MAAM,GAAG,MAAM,CAAC;IAC3C,8DAA8D;IAC9D,eAAe,EAAE,MAAM,GAAG,MAAM,CAAC;IACjC,6DAA6D;IAC7D,SAAS,EAAE,MAAM,GAAG,MAAM,CAAC;IAC3B,yFAAyF;IACzF,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAC7B,gGAAgG;IAChG,yBAAyB,CAAC,EAAE,MAAM,CAAC;IACnC,8CAA8C;IAC9C,SAAS,CAAC,EAAE,QAAQ,CAAC;IACrB,sDAAsD;IACtD,eAAe,CAAC,EAAE,QAAQ,CAAC;IAC3B,0EAA0E;IAC1E,iBAAiB,CAAC,EAAE,KAAK,CAAC;QACxB,mCAAmC;QACnC,oBAAoB,EAAE,MAAM,CAAC;QAC7B,0CAA0C;QAC1C,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAC;KACpB,CAAC,CAAC;IACH,gEAAgE;IAChE,+BAA+B,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IAClD,oEAAoE;IACpE,0BAA0B,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;CAC9C"}
@@ -0,0 +1,8 @@
1
+ "use strict";
2
+ /**
3
+ * Clean TypeScript types that provide a better developer experience
4
+ * compared to the raw DAML types. These types use simple string literals
5
+ * for enums and standard TypeScript objects for complex types.
6
+ */
7
+ Object.defineProperty(exports, "__esModule", { value: true });
8
+ //# sourceMappingURL=native.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"native.js","sourceRoot":"","sources":["../../src/types/native.ts"],"names":[],"mappings":";AAAA;;;;GAIG"}
@@ -0,0 +1,22 @@
1
+ /**
2
+ * Utility functions to convert between DAML types and TypeScript-native types
3
+ */
4
+ import { Fairmint } from '@fairmint/open-captable-protocol-daml-js';
5
+ import { EmailType, AddressType, StockClassType, Monetary, Email, Address, OcfIssuerData, OcfStockClassData } from '../types/native';
6
+ export declare function emailTypeToDaml(emailType: EmailType): Fairmint.OpenCapTable.Types.OcfEmailType;
7
+ export declare function damlEmailTypeToNative(damlType: Fairmint.OpenCapTable.Types.OcfEmailType): EmailType;
8
+ export declare function addressTypeToDaml(addressType: AddressType): Fairmint.OpenCapTable.Types.OcfAddressType;
9
+ export declare function damlAddressTypeToNative(damlType: Fairmint.OpenCapTable.Types.OcfAddressType): AddressType;
10
+ export declare function stockClassTypeToDaml(stockClassType: StockClassType): Fairmint.OpenCapTable.Types.OcfStockClassType;
11
+ export declare function damlStockClassTypeToNative(damlType: Fairmint.OpenCapTable.Types.OcfStockClassType): StockClassType;
12
+ export declare function monetaryToDaml(monetary: Monetary): Fairmint.OpenCapTable.Types.OcfMonetary;
13
+ export declare function damlMonetaryToNative(damlMonetary: Fairmint.OpenCapTable.Types.OcfMonetary): Monetary;
14
+ export declare function emailToDaml(email: Email): Fairmint.OpenCapTable.Types.OcfEmail;
15
+ export declare function damlEmailToNative(damlEmail: Fairmint.OpenCapTable.Types.OcfEmail): Email;
16
+ export declare function addressToDaml(address: Address): Fairmint.OpenCapTable.Types.OcfAddress;
17
+ export declare function damlAddressToNative(damlAddress: Fairmint.OpenCapTable.Types.OcfAddress): Address;
18
+ export declare function issuerDataToDaml(issuerData: OcfIssuerData): Fairmint.OpenCapTable.Types.OcfIssuerData;
19
+ export declare function damlIssuerDataToNative(damlData: Fairmint.OpenCapTable.Types.OcfIssuerData): OcfIssuerData;
20
+ export declare function stockClassDataToDaml(stockClassData: OcfStockClassData): Fairmint.OpenCapTable.Types.OcfStockClassData;
21
+ export declare function damlStockClassDataToNative(damlData: Fairmint.OpenCapTable.Types.OcfStockClassData): OcfStockClassData;
22
+ //# sourceMappingURL=typeConversions.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"typeConversions.d.ts","sourceRoot":"","sources":["../../src/utils/typeConversions.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,QAAQ,EAAE,MAAM,0CAA0C,CAAC;AACpE,OAAO,EACL,SAAS,EACT,WAAW,EACX,cAAc,EACd,QAAQ,EACR,KAA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QAAQ,CAAC,YAAY,CAAC,KAAK,CAAC,UAAU,GAAG,OAAO,CAShG;AAID,wBAAgB,gBAAgB,CAAC,UAAU,EAAE,aAAa,GAAG,QAAQ,CAAC,YAAY,CAAC,KAAK,CAAC,aAAa,CAgBrG;AAED,wBAAgB,sBAAsB,CAAC,QAAQ,EAAE,QAAQ,CAAC,YAAY,CAAC,KAAK,CAAC,aAAa,GAAG,aAAa,CAiBzG;AAED,wBAAgB,oBAAoB,CAAC,cAAc,EAAE,iBAAiB,GAAG,QAAQ,CAAC,YAAY,CAAC,KAAK,CAAC,iBAAiB,CAmCrH;AAED,wBAAgB,0BAA0B,CAAC,QAAQ,EAAE,QAAQ,CAAC,YAAY,CAAC,KAAK,CAAC,iBAAiB,GAAG,iBAAiB,CAmCrH"}
@@ -0,0 +1,242 @@
1
+ "use strict";
2
+ /**
3
+ * Utility functions to convert between DAML types and TypeScript-native types
4
+ */
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.emailTypeToDaml = emailTypeToDaml;
7
+ exports.damlEmailTypeToNative = damlEmailTypeToNative;
8
+ exports.addressTypeToDaml = addressTypeToDaml;
9
+ exports.damlAddressTypeToNative = damlAddressTypeToNative;
10
+ exports.stockClassTypeToDaml = stockClassTypeToDaml;
11
+ exports.damlStockClassTypeToNative = damlStockClassTypeToNative;
12
+ exports.monetaryToDaml = monetaryToDaml;
13
+ exports.damlMonetaryToNative = damlMonetaryToNative;
14
+ exports.emailToDaml = emailToDaml;
15
+ exports.damlEmailToNative = damlEmailToNative;
16
+ exports.addressToDaml = addressToDaml;
17
+ exports.damlAddressToNative = damlAddressToNative;
18
+ exports.issuerDataToDaml = issuerDataToDaml;
19
+ exports.damlIssuerDataToNative = damlIssuerDataToNative;
20
+ exports.stockClassDataToDaml = stockClassDataToDaml;
21
+ exports.damlStockClassDataToNative = damlStockClassDataToNative;
22
+ // ===== Email Type Conversions =====
23
+ function emailTypeToDaml(emailType) {
24
+ switch (emailType) {
25
+ case 'PERSONAL':
26
+ return 'OcfEmailTypePersonal';
27
+ case 'BUSINESS':
28
+ return 'OcfEmailTypeBusiness';
29
+ default:
30
+ throw new Error(`Unknown email type: ${emailType}`);
31
+ }
32
+ }
33
+ function damlEmailTypeToNative(damlType) {
34
+ switch (damlType) {
35
+ case 'OcfEmailTypePersonal':
36
+ return 'PERSONAL';
37
+ case 'OcfEmailTypeBusiness':
38
+ return 'BUSINESS';
39
+ default:
40
+ throw new Error(`Unknown DAML email type: ${damlType}`);
41
+ }
42
+ }
43
+ // ===== Address Type Conversions =====
44
+ function addressTypeToDaml(addressType) {
45
+ switch (addressType) {
46
+ case 'LEGAL':
47
+ return 'OcfAddressTypeLegal';
48
+ case 'CONTACT':
49
+ return 'OcfAddressTypeContact';
50
+ case 'OTHER':
51
+ return 'OcfAddressTypeOther';
52
+ default:
53
+ throw new Error(`Unknown address type: ${addressType}`);
54
+ }
55
+ }
56
+ function damlAddressTypeToNative(damlType) {
57
+ switch (damlType) {
58
+ case 'OcfAddressTypeLegal':
59
+ return 'LEGAL';
60
+ case 'OcfAddressTypeContact':
61
+ return 'CONTACT';
62
+ case 'OcfAddressTypeOther':
63
+ return 'OTHER';
64
+ default:
65
+ throw new Error(`Unknown DAML address type: ${damlType}`);
66
+ }
67
+ }
68
+ // ===== Stock Class Type Conversions =====
69
+ function stockClassTypeToDaml(stockClassType) {
70
+ switch (stockClassType) {
71
+ case 'PREFERRED':
72
+ return 'OcfStockClassTypePreferred';
73
+ case 'COMMON':
74
+ return 'OcfStockClassTypeCommon';
75
+ default:
76
+ throw new Error(`Unknown stock class type: ${stockClassType}`);
77
+ }
78
+ }
79
+ function damlStockClassTypeToNative(damlType) {
80
+ switch (damlType) {
81
+ case 'OcfStockClassTypePreferred':
82
+ return 'PREFERRED';
83
+ case 'OcfStockClassTypeCommon':
84
+ return 'COMMON';
85
+ default:
86
+ throw new Error(`Unknown DAML stock class type: ${damlType}`);
87
+ }
88
+ }
89
+ // ===== Monetary Value Conversions =====
90
+ function monetaryToDaml(monetary) {
91
+ return {
92
+ amount: typeof monetary.amount === 'number' ? monetary.amount.toString() : monetary.amount,
93
+ currency: monetary.currency
94
+ };
95
+ }
96
+ function damlMonetaryToNative(damlMonetary) {
97
+ return {
98
+ amount: damlMonetary.amount,
99
+ currency: damlMonetary.currency
100
+ };
101
+ }
102
+ // ===== Complex Object Conversions =====
103
+ function emailToDaml(email) {
104
+ return {
105
+ email_type: emailTypeToDaml(email.email_type),
106
+ email_address: email.email_address
107
+ };
108
+ }
109
+ function damlEmailToNative(damlEmail) {
110
+ return {
111
+ email_type: damlEmailTypeToNative(damlEmail.email_type),
112
+ email_address: damlEmail.email_address
113
+ };
114
+ }
115
+ function addressToDaml(address) {
116
+ return {
117
+ address_type: addressTypeToDaml(address.address_type),
118
+ street_suite: address.street_suite || null,
119
+ city: address.city || null,
120
+ country_subdivision: address.country_subdivision || null,
121
+ country: address.country,
122
+ postal_code: address.postal_code || null
123
+ };
124
+ }
125
+ function damlAddressToNative(damlAddress) {
126
+ return {
127
+ address_type: damlAddressTypeToNative(damlAddress.address_type),
128
+ country: damlAddress.country,
129
+ ...(damlAddress.street_suite && { street_suite: damlAddress.street_suite }),
130
+ ...(damlAddress.city && { city: damlAddress.city }),
131
+ ...(damlAddress.country_subdivision && { country_subdivision: damlAddress.country_subdivision }),
132
+ ...(damlAddress.postal_code && { postal_code: damlAddress.postal_code })
133
+ };
134
+ }
135
+ // ===== Main Data Structure Conversions =====
136
+ function issuerDataToDaml(issuerData) {
137
+ return {
138
+ legal_name: issuerData.legal_name,
139
+ country_of_formation: issuerData.country_of_formation,
140
+ dba: issuerData.dba || null,
141
+ formation_date: issuerData.formation_date || null,
142
+ country_subdivision_of_formation: issuerData.country_subdivision_of_formation || null,
143
+ tax_ids: issuerData.tax_ids || null,
144
+ email: issuerData.email ? emailToDaml(issuerData.email) : null,
145
+ phone: issuerData.phone || null,
146
+ address: issuerData.address ? addressToDaml(issuerData.address) : null,
147
+ initial_shares_authorized: issuerData.initial_shares_authorized ?
148
+ (typeof issuerData.initial_shares_authorized === 'number' ?
149
+ issuerData.initial_shares_authorized.toString() :
150
+ issuerData.initial_shares_authorized) : null
151
+ };
152
+ }
153
+ function damlIssuerDataToNative(damlData) {
154
+ return {
155
+ legal_name: damlData.legal_name || '',
156
+ country_of_formation: damlData.country_of_formation || '',
157
+ ...(damlData.dba && { dba: damlData.dba }),
158
+ ...(damlData.formation_date && { formation_date: damlData.formation_date }),
159
+ ...(damlData.country_subdivision_of_formation && {
160
+ country_subdivision_of_formation: damlData.country_subdivision_of_formation
161
+ }),
162
+ ...(damlData.tax_ids && { tax_ids: damlData.tax_ids }),
163
+ ...(damlData.email && { email: damlEmailToNative(damlData.email) }),
164
+ ...(damlData.phone && { phone: damlData.phone }),
165
+ ...(damlData.address && { address: damlAddressToNative(damlData.address) }),
166
+ ...(damlData.initial_shares_authorized && {
167
+ initial_shares_authorized: damlData.initial_shares_authorized
168
+ })
169
+ };
170
+ }
171
+ function stockClassDataToDaml(stockClassData) {
172
+ // Convert initial_shares_authorized to the required tagged union format
173
+ const initialSharesValue = typeof stockClassData.initial_shares_authorized === 'number' ?
174
+ stockClassData.initial_shares_authorized.toString() : stockClassData.initial_shares_authorized;
175
+ return {
176
+ name: stockClassData.name,
177
+ class_type: stockClassTypeToDaml(stockClassData.class_type),
178
+ default_id_prefix: stockClassData.default_id_prefix,
179
+ initial_shares_authorized: { tag: 'OcfInitialSharesNumeric', value: initialSharesValue },
180
+ votes_per_share: typeof stockClassData.votes_per_share === 'number' ?
181
+ stockClassData.votes_per_share.toString() : stockClassData.votes_per_share,
182
+ seniority: typeof stockClassData.seniority === 'number' ?
183
+ stockClassData.seniority.toString() : stockClassData.seniority,
184
+ board_approval_date: stockClassData.board_approval_date || null,
185
+ stockholder_approval_date: stockClassData.stockholder_approval_date || null,
186
+ par_value: stockClassData.par_value ? monetaryToDaml(stockClassData.par_value) : null,
187
+ price_per_share: stockClassData.price_per_share ? monetaryToDaml(stockClassData.price_per_share) : null,
188
+ conversion_rights: stockClassData.conversion_rights ?
189
+ stockClassData.conversion_rights.map(right => ({
190
+ type_: right.conversion_mechanism,
191
+ conversion_mechanism: 'OcfConversionMechanismRatioConversion', // Default for now
192
+ conversion_trigger: 'OcfConversionTriggerOptional', // Default for now
193
+ converts_to_stock_class_id: '',
194
+ conversion_rate: null,
195
+ conversion_price: null,
196
+ expires_at: null
197
+ })) : [],
198
+ liquidation_preference_multiple: stockClassData.liquidation_preference_multiple ?
199
+ (typeof stockClassData.liquidation_preference_multiple === 'number' ?
200
+ stockClassData.liquidation_preference_multiple.toString() : stockClassData.liquidation_preference_multiple) : null,
201
+ participation_cap_multiple: stockClassData.participation_cap_multiple ?
202
+ (typeof stockClassData.participation_cap_multiple === 'number' ?
203
+ stockClassData.participation_cap_multiple.toString() : stockClassData.participation_cap_multiple) : null
204
+ };
205
+ }
206
+ function damlStockClassDataToNative(damlData) {
207
+ // Extract initial_shares_authorized from tagged union
208
+ let initialShares = '0';
209
+ if (damlData.initial_shares_authorized) {
210
+ if (damlData.initial_shares_authorized.tag === 'OcfInitialSharesNumeric') {
211
+ initialShares = damlData.initial_shares_authorized.value;
212
+ }
213
+ else if (damlData.initial_shares_authorized.tag === 'OcfInitialSharesEnum') {
214
+ initialShares = damlData.initial_shares_authorized.value === 'OcfAuthorizedSharesUnlimited' ? 'Unlimited' : 'N/A';
215
+ }
216
+ }
217
+ return {
218
+ name: damlData.name || '',
219
+ class_type: damlStockClassTypeToNative(damlData.class_type),
220
+ default_id_prefix: damlData.default_id_prefix || '',
221
+ initial_shares_authorized: initialShares,
222
+ votes_per_share: damlData.votes_per_share || '0',
223
+ seniority: damlData.seniority || '0',
224
+ ...(damlData.board_approval_date && { board_approval_date: damlData.board_approval_date }),
225
+ ...(damlData.stockholder_approval_date && { stockholder_approval_date: damlData.stockholder_approval_date }),
226
+ ...(damlData.par_value && { par_value: damlMonetaryToNative(damlData.par_value) }),
227
+ ...(damlData.price_per_share && { price_per_share: damlMonetaryToNative(damlData.price_per_share) }),
228
+ ...(damlData.conversion_rights && damlData.conversion_rights.length > 0 && {
229
+ conversion_rights: damlData.conversion_rights.map(right => ({
230
+ ...right,
231
+ conversion_mechanism: right.type_
232
+ }))
233
+ }),
234
+ ...(damlData.liquidation_preference_multiple && {
235
+ liquidation_preference_multiple: damlData.liquidation_preference_multiple
236
+ }),
237
+ ...(damlData.participation_cap_multiple && {
238
+ participation_cap_multiple: damlData.participation_cap_multiple
239
+ })
240
+ };
241
+ }
242
+ //# sourceMappingURL=typeConversions.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"typeConversions.js","sourceRoot":"","sources":["../../src/utils/typeConversions.ts"],"names":[],"mappings":";AAAA;;GAEG;;AAiBH,0CASC;AAED,sDASC;AAID,8CAWC;AAED,0DAWC;AAID,oDASC;AAED,gEASC;AAID,wCAKC;AAED,oDAKC;AAID,kCAKC;AAED,8CAKC;AAED,sCASC;AAED,kDASC;AAID,4CAgBC;AAED,wDAiBC;AAED,oDAmCC;AAED,gEAmCC;AAjPD,qCAAqC;AAErC,SAAgB,eAAe,CAAC,SAAoB;IAClD,QAAQ,SAAS,EAAE,CAAC;QAClB,KAAK,UAAU;YACb,OAAO,sBAAsB,CAAC;QAChC,KAAK,UAAU;YACb,OAAO,sBAAsB,CAAC;QAChC;YACE,MAAM,IAAI,KAAK,CAAC,uBAAuB,SAAS,EAAE,CAAC,CAAC;IACxD,CAAC;AACH,CAAC;AAED,SAAgB,qBAAqB,CAAC,QAAkD;IACtF,QAAQ,QAAQ,EAAE,CAAC;QACjB,KAAK,sBAAsB;YACzB,OAAO,UAAU,CAAC;QACpB,KAAK,sBAAsB;YACzB,OAAO,UAAU,CAAC;QACpB;YACE,MAAM,IAAI,KAAK,CAAC,4BAA4B,QAAQ,EAAE,CAAC,CAAC;IAC5D,CAAC;AACH,CAAC;AAED,uCAAuC;AAEvC,SAAgB,iBAAiB,CAAC,WAAwB;IACxD,QAAQ,WAAW,EAAE,CAAC;QACp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AAC,QAAQ,CAAC,yBAAyB,IAAI,EAAE,yBAAyB,EAAE,QAAQ,CAAC,yBAAyB,EAAE,CAAC;QAC5G,GAAG,CAAC,QAAQ,CAAC,SAAS,IAAI,EAAE,SAAS,EAAE,oBAAoB,CAAC,QAAQ,CAAC,SAAS,CAAC,EAAE,CAAC;QAClF,GAAG,CAAC,QAAQ,CAAC,eAAe,IAAI,EAAE,eAAe,EAAE,oBAAoB,CAAC,QAAQ,CAAC,eAAe,CAAC,EAAE,CAAC;QACpG,GAAG,CAAC,QAAQ,CAAC,iBAAiB,IAAI,QAAQ,CAAC,iBAAiB,CAAC,MAAM,GAAG,CAAC,IAAI;YACzE,iBAAiB,EAAE,QAAQ,CAAC,iBAAiB,CAAC,GAAG,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC;gBAC1D,GAAG,KAAK;gBACR,oBAAoB,EAAE,KAAK,CAAC,KAAK;aAClC,CAAC,CAAC;SACJ,CAAC;QACF,GAAG,CAAC,QAAQ,CAAC,+BAA+B,IAAI;YAC9C,+BAA+B,EAAE,QAAQ,CAAC,+BAA+B;SAC1E,CAAC;QACF,GAAG,CAAC,QAAQ,CAAC,0BAA0B,IAAI;YACzC,0BAA0B,EAAE,QAAQ,CAAC,0BAA0B;SAChE,CAAC;KACH,CAAC;AACJ,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@open-captable-protocol/canton",
3
- "version": "0.0.32",
3
+ "version": "0.0.34",
4
4
  "description": "A TypeScript SDK for interacting with the Open CapTable Protocol (OCP) Factory contract on Canton blockchain",
5
5
  "license": "MIT",
6
6
  "main": "dist/index.js",
@@ -20,7 +20,7 @@
20
20
  "@daml/ledger": "^2.10.2",
21
21
  "@daml/types": "^2.10.2",
22
22
  "@fairmint/canton-node-sdk": "^0.0.85",
23
- "@fairmint/open-captable-protocol-daml-js": "^0.0.37"
23
+ "@fairmint/open-captable-protocol-daml-js": "^0.0.39"
24
24
  },
25
25
 
26
26
  "devDependencies": {