@fairmint/open-captable-protocol-daml-js 0.1.3 → 0.2.0

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 (30) hide show
  1. package/generated/ocp-factory-contract-id.json +4 -4
  2. package/lib/Fairmint/OpenCapTable/Document/index.d.ts +1 -0
  3. package/lib/Fairmint/OpenCapTable/Document/index.js +8 -0
  4. package/lib/Fairmint/OpenCapTable/Document/module.d.ts +135 -0
  5. package/lib/Fairmint/OpenCapTable/Document/module.js +159 -0
  6. package/lib/Fairmint/OpenCapTable/Issuer/module.d.ts +63 -424
  7. package/lib/Fairmint/OpenCapTable/Issuer/module.js +86 -614
  8. package/lib/Fairmint/OpenCapTable/IssuerAuthorization/module.d.ts +3 -6
  9. package/lib/Fairmint/OpenCapTable/IssuerAuthorization/module.js +6 -9
  10. package/lib/Fairmint/OpenCapTable/OcpFactory/module.d.ts +1 -1
  11. package/lib/Fairmint/OpenCapTable/OcpFactory/module.js +2 -2
  12. package/lib/Fairmint/OpenCapTable/Stakeholder/module.d.ts +74 -84
  13. package/lib/Fairmint/OpenCapTable/Stakeholder/module.js +65 -107
  14. package/lib/Fairmint/OpenCapTable/StockClass/module.d.ts +118 -403
  15. package/lib/Fairmint/OpenCapTable/StockClass/module.js +103 -573
  16. package/lib/Fairmint/OpenCapTable/StockLegendTemplate/module.d.ts +19 -11
  17. package/lib/Fairmint/OpenCapTable/StockLegendTemplate/module.js +27 -17
  18. package/lib/Fairmint/OpenCapTable/StockPlan/module.d.ts +24 -403
  19. package/lib/Fairmint/OpenCapTable/StockPlan/module.js +29 -587
  20. package/lib/Fairmint/OpenCapTable/Types/module.d.ts +8 -565
  21. package/lib/Fairmint/OpenCapTable/Types/module.js +7 -582
  22. package/lib/Fairmint/OpenCapTable/Valuation/module.d.ts +34 -13
  23. package/lib/Fairmint/OpenCapTable/Valuation/module.js +40 -19
  24. package/lib/Fairmint/OpenCapTable/VestingTerms/module.d.ts +98 -11
  25. package/lib/Fairmint/OpenCapTable/VestingTerms/module.js +117 -17
  26. package/lib/Fairmint/OpenCapTable/index.d.ts +2 -0
  27. package/lib/Fairmint/OpenCapTable/index.js +2 -0
  28. package/lib/Fairmint/OpenCapTableReports/CompanyValuationReport/module.js +1 -1
  29. package/lib/Fairmint/OpenCapTableReports/ReportsFactory/module.js +1 -1
  30. package/package.json +2 -2
@@ -7,36 +7,30 @@ import * as damlTypes from '@daml/types';
7
7
  /* eslint-disable-next-line @typescript-eslint/no-unused-vars */
8
8
  import * as damlLedger from '@daml/ledger';
9
9
 
10
- import * as pkg7804375fe5e4c6d5afe067bd314c42fe0b7d005a1300019c73154dd939da4dda from '../../../Splice/Api/FeaturedAppRightV1';
11
10
  import * as pkg9e70a8b3510d617f8a136213f33d6a903a10ca0eeec76bb06ba55d1ed9680f69 from '../../../DA/Internal/Template';
12
11
 
13
- import * as Fairmint_OpenCapTable_StockClass from '../../../Fairmint/OpenCapTable/StockClass/module';
14
12
  import * as Fairmint_OpenCapTable_Types from '../../../Fairmint/OpenCapTable/Types/module';
15
13
 
16
- export declare type UpdateValuationData = {
17
- new_valuation_data: Fairmint_OpenCapTable_Types.OcfValuationData;
14
+ export declare type ArchiveByIssuer = {
18
15
  };
19
16
 
20
- export declare const UpdateValuationData:
21
- damlTypes.Serializable<UpdateValuationData> & {
17
+ export declare const ArchiveByIssuer:
18
+ damlTypes.Serializable<ArchiveByIssuer> & {
22
19
  }
23
20
  ;
24
21
 
25
22
 
26
23
  export declare type Valuation = {
27
- issuer: damlTypes.Party;
28
- system_operator: damlTypes.Party;
29
- featured_app_right: damlTypes.ContractId<pkg7804375fe5e4c6d5afe067bd314c42fe0b7d005a1300019c73154dd939da4dda.Splice.Api.FeaturedAppRightV1.FeaturedAppRight>;
30
- stock_class: damlTypes.ContractId<Fairmint_OpenCapTable_StockClass.StockClass>;
31
- valuation_data: Fairmint_OpenCapTable_Types.OcfValuationData;
24
+ context: Fairmint_OpenCapTable_Types.Context;
25
+ valuation_data: OcfValuationData;
32
26
  };
33
27
 
34
28
  export declare interface ValuationInterface {
35
29
  Archive: damlTypes.Choice<Valuation, pkg9e70a8b3510d617f8a136213f33d6a903a10ca0eeec76bb06ba55d1ed9680f69.DA.Internal.Template.Archive, {}, undefined> & damlTypes.ChoiceFrom<damlTypes.Template<Valuation, undefined>>;
36
- UpdateValuationData: damlTypes.Choice<Valuation, UpdateValuationData, damlTypes.ContractId<Valuation>, undefined> & damlTypes.ChoiceFrom<damlTypes.Template<Valuation, undefined>>;
30
+ ArchiveByIssuer: damlTypes.Choice<Valuation, ArchiveByIssuer, {}, undefined> & damlTypes.ChoiceFrom<damlTypes.Template<Valuation, undefined>>;
37
31
  }
38
32
  export declare const Valuation:
39
- damlTypes.Template<Valuation, undefined, '#OpenCapTable-v15:Fairmint.OpenCapTable.Valuation:Valuation'> &
33
+ damlTypes.Template<Valuation, undefined, '#OpenCapTable-v16:Fairmint.OpenCapTable.Valuation:Valuation'> &
40
34
  damlTypes.ToInterface<Valuation, never> &
41
35
  ValuationInterface;
42
36
 
@@ -48,3 +42,30 @@ export declare namespace Valuation {
48
42
  }
49
43
 
50
44
 
45
+
46
+ export declare type OcfValuationData = {
47
+ provider: damlTypes.Optional<string>;
48
+ board_approval_date: damlTypes.Optional<damlTypes.Time>;
49
+ stockholder_approval_date: damlTypes.Optional<damlTypes.Time>;
50
+ comments: damlTypes.Optional<string[]>;
51
+ price_per_share: Fairmint_OpenCapTable_Types.OcfMonetary;
52
+ effective_date: damlTypes.Time;
53
+ valuation_type: OcfValuationType;
54
+ };
55
+
56
+ export declare const OcfValuationData:
57
+ damlTypes.Serializable<OcfValuationData> & {
58
+ }
59
+ ;
60
+
61
+
62
+ export declare type OcfValuationType =
63
+ | 'OcfValuationType409A'
64
+ ;
65
+
66
+ export declare const OcfValuationType:
67
+ damlTypes.Serializable<OcfValuationType> & {
68
+ }
69
+ & { readonly keys: OcfValuationType[] } & { readonly [e in OcfValuationType]: e }
70
+ ;
71
+
@@ -12,18 +12,15 @@ var damlTypes = require('@daml/types');
12
12
  /* eslint-disable-next-line no-unused-vars */
13
13
  var damlLedger = require('@daml/ledger');
14
14
 
15
- var pkg7804375fe5e4c6d5afe067bd314c42fe0b7d005a1300019c73154dd939da4dda = require('../../../Splice/Api/FeaturedAppRightV1');
16
15
  var pkg9e70a8b3510d617f8a136213f33d6a903a10ca0eeec76bb06ba55d1ed9680f69 = require('../../../DA/Internal/Template');
17
16
 
18
- var Fairmint_OpenCapTable_StockClass = require('../../../Fairmint/OpenCapTable/StockClass/module');
19
17
  var Fairmint_OpenCapTable_Types = require('../../../Fairmint/OpenCapTable/Types/module');
20
18
 
21
19
 
22
- exports.UpdateValuationData = {
23
- decoder: damlTypes.lazyMemo(function () { return jtv.object({new_valuation_data: Fairmint_OpenCapTable_Types.OcfValuationData.decoder, }); }),
20
+ exports.ArchiveByIssuer = {
21
+ decoder: damlTypes.lazyMemo(function () { return jtv.object({}); }),
24
22
  encode: function (__typed__) {
25
23
  return {
26
- new_valuation_data: Fairmint_OpenCapTable_Types.OcfValuationData.encode(__typed__.new_valuation_data),
27
24
  };
28
25
  }
29
26
  ,
@@ -33,17 +30,14 @@ exports.UpdateValuationData = {
33
30
 
34
31
  exports.Valuation = damlTypes.assembleTemplate(
35
32
  {
36
- templateId: '#OpenCapTable-v15:Fairmint.OpenCapTable.Valuation:Valuation',
33
+ templateId: '#OpenCapTable-v16:Fairmint.OpenCapTable.Valuation:Valuation',
37
34
  keyDecoder: damlTypes.lazyMemo(function () { return jtv.constant(undefined); }),
38
35
  keyEncode: function () { throw 'EncodeError'; },
39
- decoder: damlTypes.lazyMemo(function () { return jtv.object({issuer: damlTypes.Party.decoder, system_operator: damlTypes.Party.decoder, featured_app_right: damlTypes.ContractId(pkg7804375fe5e4c6d5afe067bd314c42fe0b7d005a1300019c73154dd939da4dda.Splice.Api.FeaturedAppRightV1.FeaturedAppRight).decoder, stock_class: damlTypes.ContractId(Fairmint_OpenCapTable_StockClass.StockClass).decoder, valuation_data: Fairmint_OpenCapTable_Types.OcfValuationData.decoder, }); }),
36
+ decoder: damlTypes.lazyMemo(function () { return jtv.object({context: Fairmint_OpenCapTable_Types.Context.decoder, valuation_data: exports.OcfValuationData.decoder, }); }),
40
37
  encode: function (__typed__) {
41
38
  return {
42
- issuer: damlTypes.Party.encode(__typed__.issuer),
43
- system_operator: damlTypes.Party.encode(__typed__.system_operator),
44
- featured_app_right: damlTypes.ContractId(pkg7804375fe5e4c6d5afe067bd314c42fe0b7d005a1300019c73154dd939da4dda.Splice.Api.FeaturedAppRightV1.FeaturedAppRight).encode(__typed__.featured_app_right),
45
- stock_class: damlTypes.ContractId(Fairmint_OpenCapTable_StockClass.StockClass).encode(__typed__.stock_class),
46
- valuation_data: Fairmint_OpenCapTable_Types.OcfValuationData.encode(__typed__.valuation_data),
39
+ context: Fairmint_OpenCapTable_Types.Context.encode(__typed__.context),
40
+ valuation_data: exports.OcfValuationData.encode(__typed__.valuation_data),
47
41
  };
48
42
  }
49
43
  ,
@@ -55,18 +49,45 @@ exports.Valuation = damlTypes.assembleTemplate(
55
49
  resultDecoder: damlTypes.lazyMemo(function () { return damlTypes.Unit.decoder; }),
56
50
  resultEncode: function (__typed__) { return damlTypes.Unit.encode(__typed__); },
57
51
  },
58
- UpdateValuationData: {
52
+ ArchiveByIssuer: {
59
53
  template: function () { return exports.Valuation; },
60
- choiceName: 'UpdateValuationData',
61
- argumentDecoder: damlTypes.lazyMemo(function () { return exports.UpdateValuationData.decoder; }),
62
- argumentEncode: function (__typed__) { return exports.UpdateValuationData.encode(__typed__); },
63
- resultDecoder: damlTypes.lazyMemo(function () { return damlTypes.ContractId(exports.Valuation).decoder; }),
64
- resultEncode: function (__typed__) { return damlTypes.ContractId(exports.Valuation).encode(__typed__); },
54
+ choiceName: 'ArchiveByIssuer',
55
+ argumentDecoder: damlTypes.lazyMemo(function () { return exports.ArchiveByIssuer.decoder; }),
56
+ argumentEncode: function (__typed__) { return exports.ArchiveByIssuer.encode(__typed__); },
57
+ resultDecoder: damlTypes.lazyMemo(function () { return damlTypes.Unit.decoder; }),
58
+ resultEncode: function (__typed__) { return damlTypes.Unit.encode(__typed__); },
65
59
  },
66
60
  }
67
61
 
68
62
  );
69
63
 
70
64
 
71
- damlTypes.registerTemplate(exports.Valuation, ['a22b30e9890713436459a82beb484343b723f78de6c9b77eca7b23fdf71c9e2a', '#OpenCapTable-v15']);
65
+ damlTypes.registerTemplate(exports.Valuation, ['163112c54b83300e400a7af319d46aa89a7c1c325d3c13fce6bf37cbde816e77', '#OpenCapTable-v16']);
66
+
67
+
68
+
69
+ exports.OcfValuationData = {
70
+ decoder: damlTypes.lazyMemo(function () { return jtv.object({provider: jtv.Decoder.withDefault(null, damlTypes.Optional(damlTypes.Text).decoder), board_approval_date: jtv.Decoder.withDefault(null, damlTypes.Optional(damlTypes.Time).decoder), stockholder_approval_date: jtv.Decoder.withDefault(null, damlTypes.Optional(damlTypes.Time).decoder), comments: jtv.Decoder.withDefault(null, damlTypes.Optional(damlTypes.List(damlTypes.Text)).decoder), price_per_share: Fairmint_OpenCapTable_Types.OcfMonetary.decoder, effective_date: damlTypes.Time.decoder, valuation_type: exports.OcfValuationType.decoder, }); }),
71
+ encode: function (__typed__) {
72
+ return {
73
+ provider: damlTypes.Optional(damlTypes.Text).encode(__typed__.provider),
74
+ board_approval_date: damlTypes.Optional(damlTypes.Time).encode(__typed__.board_approval_date),
75
+ stockholder_approval_date: damlTypes.Optional(damlTypes.Time).encode(__typed__.stockholder_approval_date),
76
+ comments: damlTypes.Optional(damlTypes.List(damlTypes.Text)).encode(__typed__.comments),
77
+ price_per_share: Fairmint_OpenCapTable_Types.OcfMonetary.encode(__typed__.price_per_share),
78
+ effective_date: damlTypes.Time.encode(__typed__.effective_date),
79
+ valuation_type: exports.OcfValuationType.encode(__typed__.valuation_type),
80
+ };
81
+ }
82
+ ,
83
+ };
84
+
85
+
86
+
87
+ exports.OcfValuationType = {
88
+ OcfValuationType409A: 'OcfValuationType409A',
89
+ keys: ['OcfValuationType409A',],
90
+ decoder: damlTypes.lazyMemo(function () { return jtv.oneOf(jtv.constant(exports.OcfValuationType.OcfValuationType409A)); }),
91
+ encode: function (__typed__) { return __typed__; },
92
+ };
72
93
 
@@ -7,34 +7,30 @@ import * as damlTypes from '@daml/types';
7
7
  /* eslint-disable-next-line @typescript-eslint/no-unused-vars */
8
8
  import * as damlLedger from '@daml/ledger';
9
9
 
10
- import * as pkg7804375fe5e4c6d5afe067bd314c42fe0b7d005a1300019c73154dd939da4dda from '../../../Splice/Api/FeaturedAppRightV1';
11
10
  import * as pkg9e70a8b3510d617f8a136213f33d6a903a10ca0eeec76bb06ba55d1ed9680f69 from '../../../DA/Internal/Template';
12
11
 
13
12
  import * as Fairmint_OpenCapTable_Types from '../../../Fairmint/OpenCapTable/Types/module';
14
13
 
15
- export declare type UpdateVestingTerms = {
16
- new_vesting_terms_data: Fairmint_OpenCapTable_Types.OcfVestingTermsData;
14
+ export declare type ArchiveByIssuer = {
17
15
  };
18
16
 
19
- export declare const UpdateVestingTerms:
20
- damlTypes.Serializable<UpdateVestingTerms> & {
17
+ export declare const ArchiveByIssuer:
18
+ damlTypes.Serializable<ArchiveByIssuer> & {
21
19
  }
22
20
  ;
23
21
 
24
22
 
25
23
  export declare type VestingTerms = {
26
- issuer: damlTypes.Party;
27
- system_operator: damlTypes.Party;
28
- featured_app_right: damlTypes.ContractId<pkg7804375fe5e4c6d5afe067bd314c42fe0b7d005a1300019c73154dd939da4dda.Splice.Api.FeaturedAppRightV1.FeaturedAppRight>;
29
- vesting_terms_data: Fairmint_OpenCapTable_Types.OcfVestingTermsData;
24
+ context: Fairmint_OpenCapTable_Types.Context;
25
+ vesting_terms_data: OcfVestingTermsData;
30
26
  };
31
27
 
32
28
  export declare interface VestingTermsInterface {
33
29
  Archive: damlTypes.Choice<VestingTerms, pkg9e70a8b3510d617f8a136213f33d6a903a10ca0eeec76bb06ba55d1ed9680f69.DA.Internal.Template.Archive, {}, undefined> & damlTypes.ChoiceFrom<damlTypes.Template<VestingTerms, undefined>>;
34
- UpdateVestingTerms: damlTypes.Choice<VestingTerms, UpdateVestingTerms, damlTypes.ContractId<VestingTerms>, undefined> & damlTypes.ChoiceFrom<damlTypes.Template<VestingTerms, undefined>>;
30
+ ArchiveByIssuer: damlTypes.Choice<VestingTerms, ArchiveByIssuer, {}, undefined> & damlTypes.ChoiceFrom<damlTypes.Template<VestingTerms, undefined>>;
35
31
  }
36
32
  export declare const VestingTerms:
37
- damlTypes.Template<VestingTerms, undefined, '#OpenCapTable-v15:Fairmint.OpenCapTable.VestingTerms:VestingTerms'> &
33
+ damlTypes.Template<VestingTerms, undefined, '#OpenCapTable-v16:Fairmint.OpenCapTable.VestingTerms:VestingTerms'> &
38
34
  damlTypes.ToInterface<VestingTerms, never> &
39
35
  VestingTermsInterface;
40
36
 
@@ -46,3 +42,94 @@ export declare namespace VestingTerms {
46
42
  }
47
43
 
48
44
 
45
+
46
+ export declare type OcfVestingTermsData = {
47
+ name: string;
48
+ description: string;
49
+ allocation_type: OcfAllocationType;
50
+ vesting_conditions: OcfVestingCondition[];
51
+ comments: damlTypes.Optional<string[]>;
52
+ };
53
+
54
+ export declare const OcfVestingTermsData:
55
+ damlTypes.Serializable<OcfVestingTermsData> & {
56
+ }
57
+ ;
58
+
59
+
60
+ export declare type OcfVestingCondition = {
61
+ id_: string;
62
+ description: damlTypes.Optional<string>;
63
+ portion: damlTypes.Optional<OcfVestingConditionPortion>;
64
+ quantity: damlTypes.Optional<damlTypes.Numeric>;
65
+ trigger: OcfVestingTrigger;
66
+ next_condition_ids: string[];
67
+ };
68
+
69
+ export declare const OcfVestingCondition:
70
+ damlTypes.Serializable<OcfVestingCondition> & {
71
+ }
72
+ ;
73
+
74
+
75
+ export declare type OcfAllocationType =
76
+ | 'OcfAllocationCumulativeRounding'
77
+ | 'OcfAllocationCumulativeRoundDown'
78
+ | 'OcfAllocationFrontLoaded'
79
+ | 'OcfAllocationBackLoaded'
80
+ | 'OcfAllocationFrontLoadedToSingleTranche'
81
+ | 'OcfAllocationBackLoadedToSingleTranche'
82
+ | 'OcfAllocationFractional'
83
+ ;
84
+
85
+ export declare const OcfAllocationType:
86
+ damlTypes.Serializable<OcfAllocationType> & {
87
+ }
88
+ & { readonly keys: OcfAllocationType[] } & { readonly [e in OcfAllocationType]: e }
89
+ ;
90
+
91
+
92
+ export declare type OcfVestingConditionPortion = {
93
+ numerator: damlTypes.Numeric;
94
+ denominator: damlTypes.Numeric;
95
+ remainder: boolean;
96
+ };
97
+
98
+ export declare const OcfVestingConditionPortion:
99
+ damlTypes.Serializable<OcfVestingConditionPortion> & {
100
+ }
101
+ ;
102
+
103
+
104
+ export declare type OcfVestingTrigger =
105
+ | { tag: 'OcfVestingStartTrigger'; value: {} }
106
+ | { tag: 'OcfVestingScheduleAbsoluteTrigger'; value: damlTypes.Time }
107
+ | { tag: 'OcfVestingScheduleRelativeTrigger'; value: OcfVestingTrigger.OcfVestingScheduleRelativeTrigger }
108
+ | { tag: 'OcfVestingEventTrigger'; value: {} }
109
+ ;
110
+
111
+ export declare const OcfVestingTrigger:
112
+ damlTypes.Serializable<OcfVestingTrigger> & {
113
+ OcfVestingScheduleRelativeTrigger: damlTypes.Serializable<OcfVestingTrigger.OcfVestingScheduleRelativeTrigger>;
114
+ }
115
+ ;
116
+
117
+
118
+ export namespace OcfVestingTrigger {
119
+ type OcfVestingScheduleRelativeTrigger = {
120
+ period: OcfVestingPeriod;
121
+ relative_to_condition_id: string;
122
+ };
123
+ } //namespace OcfVestingTrigger
124
+
125
+
126
+ export declare type OcfVestingPeriod =
127
+ | { tag: 'OcfVestingPeriodDays'; value: damlTypes.Int }
128
+ | { tag: 'OcfVestingPeriodMonths'; value: damlTypes.Int }
129
+ ;
130
+
131
+ export declare const OcfVestingPeriod:
132
+ damlTypes.Serializable<OcfVestingPeriod> & {
133
+ }
134
+ ;
135
+
@@ -12,17 +12,15 @@ var damlTypes = require('@daml/types');
12
12
  /* eslint-disable-next-line no-unused-vars */
13
13
  var damlLedger = require('@daml/ledger');
14
14
 
15
- var pkg7804375fe5e4c6d5afe067bd314c42fe0b7d005a1300019c73154dd939da4dda = require('../../../Splice/Api/FeaturedAppRightV1');
16
15
  var pkg9e70a8b3510d617f8a136213f33d6a903a10ca0eeec76bb06ba55d1ed9680f69 = require('../../../DA/Internal/Template');
17
16
 
18
17
  var Fairmint_OpenCapTable_Types = require('../../../Fairmint/OpenCapTable/Types/module');
19
18
 
20
19
 
21
- exports.UpdateVestingTerms = {
22
- decoder: damlTypes.lazyMemo(function () { return jtv.object({new_vesting_terms_data: Fairmint_OpenCapTable_Types.OcfVestingTermsData.decoder, }); }),
20
+ exports.ArchiveByIssuer = {
21
+ decoder: damlTypes.lazyMemo(function () { return jtv.object({}); }),
23
22
  encode: function (__typed__) {
24
23
  return {
25
- new_vesting_terms_data: Fairmint_OpenCapTable_Types.OcfVestingTermsData.encode(__typed__.new_vesting_terms_data),
26
24
  };
27
25
  }
28
26
  ,
@@ -32,16 +30,14 @@ exports.UpdateVestingTerms = {
32
30
 
33
31
  exports.VestingTerms = damlTypes.assembleTemplate(
34
32
  {
35
- templateId: '#OpenCapTable-v15:Fairmint.OpenCapTable.VestingTerms:VestingTerms',
33
+ templateId: '#OpenCapTable-v16:Fairmint.OpenCapTable.VestingTerms:VestingTerms',
36
34
  keyDecoder: damlTypes.lazyMemo(function () { return jtv.constant(undefined); }),
37
35
  keyEncode: function () { throw 'EncodeError'; },
38
- decoder: damlTypes.lazyMemo(function () { return jtv.object({issuer: damlTypes.Party.decoder, system_operator: damlTypes.Party.decoder, featured_app_right: damlTypes.ContractId(pkg7804375fe5e4c6d5afe067bd314c42fe0b7d005a1300019c73154dd939da4dda.Splice.Api.FeaturedAppRightV1.FeaturedAppRight).decoder, vesting_terms_data: Fairmint_OpenCapTable_Types.OcfVestingTermsData.decoder, }); }),
36
+ decoder: damlTypes.lazyMemo(function () { return jtv.object({context: Fairmint_OpenCapTable_Types.Context.decoder, vesting_terms_data: exports.OcfVestingTermsData.decoder, }); }),
39
37
  encode: function (__typed__) {
40
38
  return {
41
- issuer: damlTypes.Party.encode(__typed__.issuer),
42
- system_operator: damlTypes.Party.encode(__typed__.system_operator),
43
- featured_app_right: damlTypes.ContractId(pkg7804375fe5e4c6d5afe067bd314c42fe0b7d005a1300019c73154dd939da4dda.Splice.Api.FeaturedAppRightV1.FeaturedAppRight).encode(__typed__.featured_app_right),
44
- vesting_terms_data: Fairmint_OpenCapTable_Types.OcfVestingTermsData.encode(__typed__.vesting_terms_data),
39
+ context: Fairmint_OpenCapTable_Types.Context.encode(__typed__.context),
40
+ vesting_terms_data: exports.OcfVestingTermsData.encode(__typed__.vesting_terms_data),
45
41
  };
46
42
  }
47
43
  ,
@@ -53,18 +49,122 @@ exports.VestingTerms = damlTypes.assembleTemplate(
53
49
  resultDecoder: damlTypes.lazyMemo(function () { return damlTypes.Unit.decoder; }),
54
50
  resultEncode: function (__typed__) { return damlTypes.Unit.encode(__typed__); },
55
51
  },
56
- UpdateVestingTerms: {
52
+ ArchiveByIssuer: {
57
53
  template: function () { return exports.VestingTerms; },
58
- choiceName: 'UpdateVestingTerms',
59
- argumentDecoder: damlTypes.lazyMemo(function () { return exports.UpdateVestingTerms.decoder; }),
60
- argumentEncode: function (__typed__) { return exports.UpdateVestingTerms.encode(__typed__); },
61
- resultDecoder: damlTypes.lazyMemo(function () { return damlTypes.ContractId(exports.VestingTerms).decoder; }),
62
- resultEncode: function (__typed__) { return damlTypes.ContractId(exports.VestingTerms).encode(__typed__); },
54
+ choiceName: 'ArchiveByIssuer',
55
+ argumentDecoder: damlTypes.lazyMemo(function () { return exports.ArchiveByIssuer.decoder; }),
56
+ argumentEncode: function (__typed__) { return exports.ArchiveByIssuer.encode(__typed__); },
57
+ resultDecoder: damlTypes.lazyMemo(function () { return damlTypes.Unit.decoder; }),
58
+ resultEncode: function (__typed__) { return damlTypes.Unit.encode(__typed__); },
63
59
  },
64
60
  }
65
61
 
66
62
  );
67
63
 
68
64
 
69
- damlTypes.registerTemplate(exports.VestingTerms, ['a22b30e9890713436459a82beb484343b723f78de6c9b77eca7b23fdf71c9e2a', '#OpenCapTable-v15']);
65
+ damlTypes.registerTemplate(exports.VestingTerms, ['163112c54b83300e400a7af319d46aa89a7c1c325d3c13fce6bf37cbde816e77', '#OpenCapTable-v16']);
66
+
67
+
68
+
69
+ exports.OcfVestingTermsData = {
70
+ decoder: damlTypes.lazyMemo(function () { return jtv.object({name: damlTypes.Text.decoder, description: damlTypes.Text.decoder, allocation_type: exports.OcfAllocationType.decoder, vesting_conditions: damlTypes.List(exports.OcfVestingCondition).decoder, comments: jtv.Decoder.withDefault(null, damlTypes.Optional(damlTypes.List(damlTypes.Text)).decoder), }); }),
71
+ encode: function (__typed__) {
72
+ return {
73
+ name: damlTypes.Text.encode(__typed__.name),
74
+ description: damlTypes.Text.encode(__typed__.description),
75
+ allocation_type: exports.OcfAllocationType.encode(__typed__.allocation_type),
76
+ vesting_conditions: damlTypes.List(exports.OcfVestingCondition).encode(__typed__.vesting_conditions),
77
+ comments: damlTypes.Optional(damlTypes.List(damlTypes.Text)).encode(__typed__.comments),
78
+ };
79
+ }
80
+ ,
81
+ };
82
+
83
+
84
+
85
+ exports.OcfVestingCondition = {
86
+ decoder: damlTypes.lazyMemo(function () { return jtv.object({id_: damlTypes.Text.decoder, description: jtv.Decoder.withDefault(null, damlTypes.Optional(damlTypes.Text).decoder), portion: jtv.Decoder.withDefault(null, damlTypes.Optional(exports.OcfVestingConditionPortion).decoder), quantity: jtv.Decoder.withDefault(null, damlTypes.Optional(damlTypes.Numeric(10)).decoder), trigger: exports.OcfVestingTrigger.decoder, next_condition_ids: damlTypes.List(damlTypes.Text).decoder, }); }),
87
+ encode: function (__typed__) {
88
+ return {
89
+ id_: damlTypes.Text.encode(__typed__.id_),
90
+ description: damlTypes.Optional(damlTypes.Text).encode(__typed__.description),
91
+ portion: damlTypes.Optional(exports.OcfVestingConditionPortion).encode(__typed__.portion),
92
+ quantity: damlTypes.Optional(damlTypes.Numeric(10)).encode(__typed__.quantity),
93
+ trigger: exports.OcfVestingTrigger.encode(__typed__.trigger),
94
+ next_condition_ids: damlTypes.List(damlTypes.Text).encode(__typed__.next_condition_ids),
95
+ };
96
+ }
97
+ ,
98
+ };
99
+
100
+
101
+
102
+ exports.OcfAllocationType = {
103
+ OcfAllocationCumulativeRounding: 'OcfAllocationCumulativeRounding',
104
+ OcfAllocationCumulativeRoundDown: 'OcfAllocationCumulativeRoundDown',
105
+ OcfAllocationFrontLoaded: 'OcfAllocationFrontLoaded',
106
+ OcfAllocationBackLoaded: 'OcfAllocationBackLoaded',
107
+ OcfAllocationFrontLoadedToSingleTranche: 'OcfAllocationFrontLoadedToSingleTranche',
108
+ OcfAllocationBackLoadedToSingleTranche: 'OcfAllocationBackLoadedToSingleTranche',
109
+ OcfAllocationFractional: 'OcfAllocationFractional',
110
+ keys: ['OcfAllocationCumulativeRounding','OcfAllocationCumulativeRoundDown','OcfAllocationFrontLoaded','OcfAllocationBackLoaded','OcfAllocationFrontLoadedToSingleTranche','OcfAllocationBackLoadedToSingleTranche','OcfAllocationFractional',],
111
+ decoder: damlTypes.lazyMemo(function () { return jtv.oneOf(jtv.constant(exports.OcfAllocationType.OcfAllocationCumulativeRounding), jtv.constant(exports.OcfAllocationType.OcfAllocationCumulativeRoundDown), jtv.constant(exports.OcfAllocationType.OcfAllocationFrontLoaded), jtv.constant(exports.OcfAllocationType.OcfAllocationBackLoaded), jtv.constant(exports.OcfAllocationType.OcfAllocationFrontLoadedToSingleTranche), jtv.constant(exports.OcfAllocationType.OcfAllocationBackLoadedToSingleTranche), jtv.constant(exports.OcfAllocationType.OcfAllocationFractional)); }),
112
+ encode: function (__typed__) { return __typed__; },
113
+ };
114
+
115
+
116
+
117
+ exports.OcfVestingConditionPortion = {
118
+ decoder: damlTypes.lazyMemo(function () { return jtv.object({numerator: damlTypes.Numeric(10).decoder, denominator: damlTypes.Numeric(10).decoder, remainder: damlTypes.Bool.decoder, }); }),
119
+ encode: function (__typed__) {
120
+ return {
121
+ numerator: damlTypes.Numeric(10).encode(__typed__.numerator),
122
+ denominator: damlTypes.Numeric(10).encode(__typed__.denominator),
123
+ remainder: damlTypes.Bool.encode(__typed__.remainder),
124
+ };
125
+ }
126
+ ,
127
+ };
128
+
129
+
130
+
131
+ exports.OcfVestingTrigger = {
132
+ decoder: damlTypes.lazyMemo(function () { return jtv.oneOf(jtv.object({tag: jtv.constant('OcfVestingStartTrigger'), value: damlTypes.Unit.decoder, }), jtv.object({tag: jtv.constant('OcfVestingScheduleAbsoluteTrigger'), value: damlTypes.Time.decoder, }), jtv.object({tag: jtv.constant('OcfVestingScheduleRelativeTrigger'), value: exports.OcfVestingTrigger.OcfVestingScheduleRelativeTrigger.decoder, }), jtv.object({tag: jtv.constant('OcfVestingEventTrigger'), value: damlTypes.Unit.decoder, })); }),
133
+ encode: function (__typed__) {
134
+ switch(__typed__.tag) {
135
+ case 'OcfVestingStartTrigger': return {tag: __typed__.tag, value: damlTypes.Unit.encode(__typed__.value)};
136
+ case 'OcfVestingScheduleAbsoluteTrigger': return {tag: __typed__.tag, value: damlTypes.Time.encode(__typed__.value)};
137
+ case 'OcfVestingScheduleRelativeTrigger': return {tag: __typed__.tag, value: exports.OcfVestingTrigger.OcfVestingScheduleRelativeTrigger.encode(__typed__.value)};
138
+ case 'OcfVestingEventTrigger': return {tag: __typed__.tag, value: damlTypes.Unit.encode(__typed__.value)};
139
+ default: throw 'unrecognized type tag: ' + __typed__.tag + ' while serializing a value of type OcfVestingTrigger';
140
+ }
141
+ }
142
+ ,
143
+ OcfVestingScheduleRelativeTrigger:({
144
+ decoder: damlTypes.lazyMemo(function () { return jtv.object({period: exports.OcfVestingPeriod.decoder, relative_to_condition_id: damlTypes.Text.decoder, }); }),
145
+ encode: function (__typed__) {
146
+ return {
147
+ period: exports.OcfVestingPeriod.encode(__typed__.period),
148
+ relative_to_condition_id: damlTypes.Text.encode(__typed__.relative_to_condition_id),
149
+ };
150
+ }
151
+ ,
152
+ }),
153
+ };
154
+
155
+
156
+
157
+
158
+
159
+ exports.OcfVestingPeriod = {
160
+ decoder: damlTypes.lazyMemo(function () { return jtv.oneOf(jtv.object({tag: jtv.constant('OcfVestingPeriodDays'), value: damlTypes.Int.decoder, }), jtv.object({tag: jtv.constant('OcfVestingPeriodMonths'), value: damlTypes.Int.decoder, })); }),
161
+ encode: function (__typed__) {
162
+ switch(__typed__.tag) {
163
+ case 'OcfVestingPeriodDays': return {tag: __typed__.tag, value: damlTypes.Int.encode(__typed__.value)};
164
+ case 'OcfVestingPeriodMonths': return {tag: __typed__.tag, value: damlTypes.Int.encode(__typed__.value)};
165
+ default: throw 'unrecognized type tag: ' + __typed__.tag + ' while serializing a value of type OcfVestingPeriod';
166
+ }
167
+ }
168
+ ,
169
+ };
70
170
 
@@ -1,3 +1,5 @@
1
+ import * as Document from './Document';
2
+ export { Document } ;
1
3
  import * as Issuer from './Issuer';
2
4
  export { Issuer } ;
3
5
  import * as IssuerAuthorization from './IssuerAuthorization';
@@ -5,6 +5,8 @@ function __export(m) {
5
5
  for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];
6
6
  }
7
7
  Object.defineProperty(exports, "__esModule", { value: true });
8
+ var Document = require('./Document');
9
+ exports.Document = Document;
8
10
  var Issuer = require('./Issuer');
9
11
  exports.Issuer = Issuer;
10
12
  var IssuerAuthorization = require('./IssuerAuthorization');
@@ -86,5 +86,5 @@ exports.CompanyValuationReport = damlTypes.assembleTemplate(
86
86
  );
87
87
 
88
88
 
89
- damlTypes.registerTemplate(exports.CompanyValuationReport, ['75c7ecc8835eb76d44e47ddd08f8e49425d938db47f2857d6c9b7f25843e78c8', '#OpenCapTableReports-v01']);
89
+ damlTypes.registerTemplate(exports.CompanyValuationReport, ['121e9c9b9413fd04b4eba3fc8365100074d113af81a748ac9a4861f7b5b035b3', '#OpenCapTableReports-v01']);
90
90
 
@@ -66,5 +66,5 @@ exports.ReportsFactory = damlTypes.assembleTemplate(
66
66
  );
67
67
 
68
68
 
69
- damlTypes.registerTemplate(exports.ReportsFactory, ['75c7ecc8835eb76d44e47ddd08f8e49425d938db47f2857d6c9b7f25843e78c8', '#OpenCapTableReports-v01']);
69
+ damlTypes.registerTemplate(exports.ReportsFactory, ['121e9c9b9413fd04b4eba3fc8365100074d113af81a748ac9a4861f7b5b035b3', '#OpenCapTableReports-v01']);
70
70
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fairmint/open-captable-protocol-daml-js",
3
- "version": "0.1.3",
3
+ "version": "0.2.0",
4
4
  "description": "Open CapTable Protocol DAML smart contracts with generated JavaScript bindings",
5
5
  "main": "lib/index.js",
6
6
  "types": "lib/index.d.ts",
@@ -34,7 +34,7 @@
34
34
  "build": "daml build --all",
35
35
  "build:ts": "tsc",
36
36
  "clean": "daml clean --all",
37
- "codegen": "npm run build && cd OpenCapTable-v15 && daml codegen js && cd .. && cd OpenCapTableShared-v01 && daml codegen js && cd .. && cd OpenCapTableReports-v01 && daml codegen js && cd .. && tsx scripts/bundle-dependencies.ts && tsx scripts/create-package-index.ts && tsx scripts/create-root-index.ts && npm run build:ts",
37
+ "codegen": "npm run build && cd OpenCapTable-v16 && daml codegen js && cd .. && cd OpenCapTableShared-v01 && daml codegen js && cd .. && cd OpenCapTableReports-v01 && daml codegen js && cd .. && tsx scripts/bundle-dependencies.ts && tsx scripts/create-package-index.ts && tsx scripts/create-root-index.ts && npm run build:ts",
38
38
  "test": "cd Test && daml test",
39
39
  "test:imports": "tsx scripts/test-imports.ts",
40
40
  "upload-dar:ocp": "npm run build && ts-node scripts/upload-dar.ts --network devnet && ts-node scripts/upload-dar.ts --network mainnet",