@fairmint/open-captable-protocol-daml-js 0.0.36 → 0.0.38
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/generated/ocp-factory-contract-id.json +4 -4
- package/lib/Fairmint/OpenCapTable/Issuer/module.d.ts +1 -1
- package/lib/Fairmint/OpenCapTable/Issuer/module.js +2 -2
- package/lib/Fairmint/OpenCapTable/IssuerAuthorization/module.d.ts +1 -1
- package/lib/Fairmint/OpenCapTable/IssuerAuthorization/module.js +2 -2
- package/lib/Fairmint/OpenCapTable/OcpFactory/module.d.ts +1 -1
- package/lib/Fairmint/OpenCapTable/OcpFactory/module.js +2 -2
- package/lib/Fairmint/OpenCapTable/StockClass/module.d.ts +1 -1
- package/lib/Fairmint/OpenCapTable/StockClass/module.js +2 -2
- package/lib/Fairmint/OpenCapTable/StockPosition/module.d.ts +2 -2
- package/lib/Fairmint/OpenCapTable/StockPosition/module.js +4 -4
- package/lib/Fairmint/OpenCapTable/Types/module.d.ts +99 -10
- package/lib/Fairmint/OpenCapTable/Types/module.js +100 -12
- package/package.json +2 -2
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"mainnet": {
|
|
3
|
-
"ocpFactoryContractId": "
|
|
4
|
-
"templateId": "
|
|
3
|
+
"ocpFactoryContractId": "004953d91e29a88e13a94181e9fe9a2779ca475e3597d11978dc98c9fa7ebad709ca1112204901f420bdce583ace578ce98b657de1ce471b5b78b3c3b5289c004fac4f85a0",
|
|
4
|
+
"templateId": "b9c3a74ba621085835c31ab527d49145f7b1a46bee852df0addc5ba75bd0d9d8:Fairmint.OpenCapTable.OcpFactory:OcpFactory"
|
|
5
5
|
},
|
|
6
6
|
"devnet": {
|
|
7
|
-
"ocpFactoryContractId": "
|
|
8
|
-
"templateId": "
|
|
7
|
+
"ocpFactoryContractId": "0055c6dfbf72ab17de38ae6c988a6d8b068e447f02006b01f6257ca48a0f9fbae2ca111220b44cdbcb234b6cbfc03ef49269b37d717d4f6ca35cde8dbc90a0d346e3b5ade2",
|
|
8
|
+
"templateId": "b9c3a74ba621085835c31ab527d49145f7b1a46bee852df0addc5ba75bd0d9d8:Fairmint.OpenCapTable.OcpFactory:OcpFactory"
|
|
9
9
|
}
|
|
10
10
|
}
|
|
@@ -46,7 +46,7 @@ export declare interface IssuerInterface {
|
|
|
46
46
|
UpdateIssuerData: damlTypes.Choice<Issuer, UpdateIssuerData, damlTypes.ContractId<Issuer>, undefined> & damlTypes.ChoiceFrom<damlTypes.Template<Issuer, undefined>>;
|
|
47
47
|
}
|
|
48
48
|
export declare const Issuer:
|
|
49
|
-
damlTypes.Template<Issuer, undefined, '#OpenCapTable-
|
|
49
|
+
damlTypes.Template<Issuer, undefined, '#OpenCapTable-v10:Fairmint.OpenCapTable.Issuer:Issuer'> &
|
|
50
50
|
damlTypes.ToInterface<Issuer, never> &
|
|
51
51
|
IssuerInterface;
|
|
52
52
|
|
|
@@ -45,7 +45,7 @@ exports.CreateStockClass = {
|
|
|
45
45
|
|
|
46
46
|
exports.Issuer = damlTypes.assembleTemplate(
|
|
47
47
|
{
|
|
48
|
-
templateId: '#OpenCapTable-
|
|
48
|
+
templateId: '#OpenCapTable-v10:Fairmint.OpenCapTable.Issuer:Issuer',
|
|
49
49
|
keyDecoder: damlTypes.lazyMemo(function () { return jtv.constant(undefined); }),
|
|
50
50
|
keyEncode: function () { throw 'EncodeError'; },
|
|
51
51
|
decoder: damlTypes.lazyMemo(function () { return jtv.object({issuer: damlTypes.Party.decoder, issuer_data: Fairmint_OpenCapTable_Types.OcfIssuerData.decoder, system_operator: damlTypes.Party.decoder, featured_app_right: damlTypes.ContractId(pkg7804375fe5e4c6d5afe067bd314c42fe0b7d005a1300019c73154dd939da4dda.Splice.Api.FeaturedAppRightV1.FeaturedAppRight).decoder, }); }),
|
|
@@ -87,5 +87,5 @@ exports.Issuer = damlTypes.assembleTemplate(
|
|
|
87
87
|
);
|
|
88
88
|
|
|
89
89
|
|
|
90
|
-
damlTypes.registerTemplate(exports.Issuer, ['
|
|
90
|
+
damlTypes.registerTemplate(exports.Issuer, ['b9c3a74ba621085835c31ab527d49145f7b1a46bee852df0addc5ba75bd0d9d8', '#OpenCapTable-v10']);
|
|
91
91
|
|
|
@@ -44,7 +44,7 @@ export declare interface IssuerAuthorizationInterface {
|
|
|
44
44
|
WithdrawAuthorization: damlTypes.Choice<IssuerAuthorization, WithdrawAuthorization, {}, undefined> & damlTypes.ChoiceFrom<damlTypes.Template<IssuerAuthorization, undefined>>;
|
|
45
45
|
}
|
|
46
46
|
export declare const IssuerAuthorization:
|
|
47
|
-
damlTypes.Template<IssuerAuthorization, undefined, '#OpenCapTable-
|
|
47
|
+
damlTypes.Template<IssuerAuthorization, undefined, '#OpenCapTable-v10:Fairmint.OpenCapTable.IssuerAuthorization:IssuerAuthorization'> &
|
|
48
48
|
damlTypes.ToInterface<IssuerAuthorization, never> &
|
|
49
49
|
IssuerAuthorizationInterface;
|
|
50
50
|
|
|
@@ -44,7 +44,7 @@ exports.CreateIssuer = {
|
|
|
44
44
|
|
|
45
45
|
exports.IssuerAuthorization = damlTypes.assembleTemplate(
|
|
46
46
|
{
|
|
47
|
-
templateId: '#OpenCapTable-
|
|
47
|
+
templateId: '#OpenCapTable-v10:Fairmint.OpenCapTable.IssuerAuthorization:IssuerAuthorization',
|
|
48
48
|
keyDecoder: damlTypes.lazyMemo(function () { return jtv.constant(undefined); }),
|
|
49
49
|
keyEncode: function () { throw 'EncodeError'; },
|
|
50
50
|
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, }); }),
|
|
@@ -85,5 +85,5 @@ exports.IssuerAuthorization = damlTypes.assembleTemplate(
|
|
|
85
85
|
);
|
|
86
86
|
|
|
87
87
|
|
|
88
|
-
damlTypes.registerTemplate(exports.IssuerAuthorization, ['
|
|
88
|
+
damlTypes.registerTemplate(exports.IssuerAuthorization, ['b9c3a74ba621085835c31ab527d49145f7b1a46bee852df0addc5ba75bd0d9d8', '#OpenCapTable-v10']);
|
|
89
89
|
|
|
@@ -32,7 +32,7 @@ export declare interface OcpFactoryInterface {
|
|
|
32
32
|
AuthorizeIssuer: damlTypes.Choice<OcpFactory, AuthorizeIssuer, damlTypes.ContractId<Fairmint_OpenCapTable_IssuerAuthorization.IssuerAuthorization>, undefined> & damlTypes.ChoiceFrom<damlTypes.Template<OcpFactory, undefined>>;
|
|
33
33
|
}
|
|
34
34
|
export declare const OcpFactory:
|
|
35
|
-
damlTypes.Template<OcpFactory, undefined, '#OpenCapTable-
|
|
35
|
+
damlTypes.Template<OcpFactory, undefined, '#OpenCapTable-v10:Fairmint.OpenCapTable.OcpFactory:OcpFactory'> &
|
|
36
36
|
damlTypes.ToInterface<OcpFactory, never> &
|
|
37
37
|
OcpFactoryInterface;
|
|
38
38
|
|
|
@@ -32,7 +32,7 @@ exports.AuthorizeIssuer = {
|
|
|
32
32
|
|
|
33
33
|
exports.OcpFactory = damlTypes.assembleTemplate(
|
|
34
34
|
{
|
|
35
|
-
templateId: '#OpenCapTable-
|
|
35
|
+
templateId: '#OpenCapTable-v10:Fairmint.OpenCapTable.OcpFactory:OcpFactory',
|
|
36
36
|
keyDecoder: damlTypes.lazyMemo(function () { return jtv.constant(undefined); }),
|
|
37
37
|
keyEncode: function () { throw 'EncodeError'; },
|
|
38
38
|
decoder: damlTypes.lazyMemo(function () { return jtv.object({system_operator: damlTypes.Party.decoder, featured_app_right: damlTypes.ContractId(pkg7804375fe5e4c6d5afe067bd314c42fe0b7d005a1300019c73154dd939da4dda.Splice.Api.FeaturedAppRightV1.FeaturedAppRight).decoder, }); }),
|
|
@@ -64,5 +64,5 @@ exports.OcpFactory = damlTypes.assembleTemplate(
|
|
|
64
64
|
);
|
|
65
65
|
|
|
66
66
|
|
|
67
|
-
damlTypes.registerTemplate(exports.OcpFactory, ['
|
|
67
|
+
damlTypes.registerTemplate(exports.OcpFactory, ['b9c3a74ba621085835c31ab527d49145f7b1a46bee852df0addc5ba75bd0d9d8', '#OpenCapTable-v10']);
|
|
68
68
|
|
|
@@ -36,7 +36,7 @@ export declare interface StockClassInterface {
|
|
|
36
36
|
IssueStock: damlTypes.Choice<StockClass, IssueStock, damlTypes.ContractId<Fairmint_OpenCapTable_StockPosition.StockPosition>, undefined> & damlTypes.ChoiceFrom<damlTypes.Template<StockClass, undefined>>;
|
|
37
37
|
}
|
|
38
38
|
export declare const StockClass:
|
|
39
|
-
damlTypes.Template<StockClass, undefined, '#OpenCapTable-
|
|
39
|
+
damlTypes.Template<StockClass, undefined, '#OpenCapTable-v10:Fairmint.OpenCapTable.StockClass:StockClass'> &
|
|
40
40
|
damlTypes.ToInterface<StockClass, never> &
|
|
41
41
|
StockClassInterface;
|
|
42
42
|
|
|
@@ -33,7 +33,7 @@ exports.IssueStock = {
|
|
|
33
33
|
|
|
34
34
|
exports.StockClass = damlTypes.assembleTemplate(
|
|
35
35
|
{
|
|
36
|
-
templateId: '#OpenCapTable-
|
|
36
|
+
templateId: '#OpenCapTable-v10:Fairmint.OpenCapTable.StockClass:StockClass',
|
|
37
37
|
keyDecoder: damlTypes.lazyMemo(function () { return jtv.constant(undefined); }),
|
|
38
38
|
keyEncode: function () { throw 'EncodeError'; },
|
|
39
39
|
decoder: damlTypes.lazyMemo(function () { return jtv.object({issuer: damlTypes.Party.decoder, stock_class_data: Fairmint_OpenCapTable_Types.OcfStockClassData.decoder, issued_shares: damlTypes.Int.decoder, system_operator: damlTypes.Party.decoder, featured_app_right: damlTypes.ContractId(pkg7804375fe5e4c6d5afe067bd314c42fe0b7d005a1300019c73154dd939da4dda.Splice.Api.FeaturedAppRightV1.FeaturedAppRight).decoder, }); }),
|
|
@@ -68,5 +68,5 @@ exports.StockClass = damlTypes.assembleTemplate(
|
|
|
68
68
|
);
|
|
69
69
|
|
|
70
70
|
|
|
71
|
-
damlTypes.registerTemplate(exports.StockClass, ['
|
|
71
|
+
damlTypes.registerTemplate(exports.StockClass, ['b9c3a74ba621085835c31ab527d49145f7b1a46bee852df0addc5ba75bd0d9d8', '#OpenCapTable-v10']);
|
|
72
72
|
|
|
@@ -35,7 +35,7 @@ export declare interface StockTransferProposalInterface {
|
|
|
35
35
|
AcceptTransfer: damlTypes.Choice<StockTransferProposal, AcceptTransfer, damlTypes.ContractId<StockPosition>, undefined> & damlTypes.ChoiceFrom<damlTypes.Template<StockTransferProposal, undefined>>;
|
|
36
36
|
}
|
|
37
37
|
export declare const StockTransferProposal:
|
|
38
|
-
damlTypes.Template<StockTransferProposal, undefined, '#OpenCapTable-
|
|
38
|
+
damlTypes.Template<StockTransferProposal, undefined, '#OpenCapTable-v10:Fairmint.OpenCapTable.StockPosition:StockTransferProposal'> &
|
|
39
39
|
damlTypes.ToInterface<StockTransferProposal, never> &
|
|
40
40
|
StockTransferProposalInterface;
|
|
41
41
|
|
|
@@ -71,7 +71,7 @@ export declare interface StockPositionInterface {
|
|
|
71
71
|
Archive: damlTypes.Choice<StockPosition, pkg9e70a8b3510d617f8a136213f33d6a903a10ca0eeec76bb06ba55d1ed9680f69.DA.Internal.Template.Archive, {}, undefined> & damlTypes.ChoiceFrom<damlTypes.Template<StockPosition, undefined>>;
|
|
72
72
|
}
|
|
73
73
|
export declare const StockPosition:
|
|
74
|
-
damlTypes.Template<StockPosition, undefined, '#OpenCapTable-
|
|
74
|
+
damlTypes.Template<StockPosition, undefined, '#OpenCapTable-v10:Fairmint.OpenCapTable.StockPosition:StockPosition'> &
|
|
75
75
|
damlTypes.ToInterface<StockPosition, never> &
|
|
76
76
|
StockPositionInterface;
|
|
77
77
|
|
|
@@ -31,7 +31,7 @@ exports.AcceptTransfer = {
|
|
|
31
31
|
|
|
32
32
|
exports.StockTransferProposal = damlTypes.assembleTemplate(
|
|
33
33
|
{
|
|
34
|
-
templateId: '#OpenCapTable-
|
|
34
|
+
templateId: '#OpenCapTable-v10:Fairmint.OpenCapTable.StockPosition:StockTransferProposal',
|
|
35
35
|
keyDecoder: damlTypes.lazyMemo(function () { return jtv.constant(undefined); }),
|
|
36
36
|
keyEncode: function () { throw 'EncodeError'; },
|
|
37
37
|
decoder: damlTypes.lazyMemo(function () { return jtv.object({system_operator: damlTypes.Party.decoder, issuer: damlTypes.Party.decoder, owner: damlTypes.Party.decoder, recipient: damlTypes.Party.decoder, quantity: damlTypes.Int.decoder, featured_app_right: damlTypes.ContractId(pkg7804375fe5e4c6d5afe067bd314c42fe0b7d005a1300019c73154dd939da4dda.Splice.Api.FeaturedAppRightV1.FeaturedAppRight).decoder, }); }),
|
|
@@ -67,7 +67,7 @@ exports.StockTransferProposal = damlTypes.assembleTemplate(
|
|
|
67
67
|
);
|
|
68
68
|
|
|
69
69
|
|
|
70
|
-
damlTypes.registerTemplate(exports.StockTransferProposal, ['
|
|
70
|
+
damlTypes.registerTemplate(exports.StockTransferProposal, ['b9c3a74ba621085835c31ab527d49145f7b1a46bee852df0addc5ba75bd0d9d8', '#OpenCapTable-v10']);
|
|
71
71
|
|
|
72
72
|
|
|
73
73
|
|
|
@@ -85,7 +85,7 @@ exports.ProposeTransfer = {
|
|
|
85
85
|
|
|
86
86
|
exports.StockPosition = damlTypes.assembleTemplate(
|
|
87
87
|
{
|
|
88
|
-
templateId: '#OpenCapTable-
|
|
88
|
+
templateId: '#OpenCapTable-v10:Fairmint.OpenCapTable.StockPosition:StockPosition',
|
|
89
89
|
keyDecoder: damlTypes.lazyMemo(function () { return jtv.constant(undefined); }),
|
|
90
90
|
keyEncode: function () { throw 'EncodeError'; },
|
|
91
91
|
decoder: damlTypes.lazyMemo(function () { return jtv.object({system_operator: damlTypes.Party.decoder, issuer: damlTypes.Party.decoder, owner: damlTypes.Party.decoder, quantity: damlTypes.Int.decoder, featured_app_right: damlTypes.ContractId(pkg7804375fe5e4c6d5afe067bd314c42fe0b7d005a1300019c73154dd939da4dda.Splice.Api.FeaturedAppRightV1.FeaturedAppRight).decoder, }); }),
|
|
@@ -120,5 +120,5 @@ exports.StockPosition = damlTypes.assembleTemplate(
|
|
|
120
120
|
);
|
|
121
121
|
|
|
122
122
|
|
|
123
|
-
damlTypes.registerTemplate(exports.StockPosition, ['
|
|
123
|
+
damlTypes.registerTemplate(exports.StockPosition, ['b9c3a74ba621085835c31ab527d49145f7b1a46bee852df0addc5ba75bd0d9d8', '#OpenCapTable-v10']);
|
|
124
124
|
|
|
@@ -22,15 +22,16 @@ export declare type OcfStockClassData = {
|
|
|
22
22
|
name: string;
|
|
23
23
|
class_type: OcfStockClassType;
|
|
24
24
|
default_id_prefix: string;
|
|
25
|
-
initial_shares_authorized:
|
|
25
|
+
initial_shares_authorized: OcfInitialSharesAuthorized;
|
|
26
26
|
votes_per_share: damlTypes.Numeric;
|
|
27
27
|
seniority: damlTypes.Numeric;
|
|
28
|
-
board_approval_date: damlTypes.Optional<damlTypes.
|
|
29
|
-
stockholder_approval_date: damlTypes.Optional<damlTypes.
|
|
30
|
-
par_value: damlTypes.Optional<
|
|
31
|
-
price_per_share: damlTypes.Optional<
|
|
28
|
+
board_approval_date: damlTypes.Optional<damlTypes.Time>;
|
|
29
|
+
stockholder_approval_date: damlTypes.Optional<damlTypes.Time>;
|
|
30
|
+
par_value: damlTypes.Optional<OcfMonetary>;
|
|
31
|
+
price_per_share: damlTypes.Optional<OcfMonetary>;
|
|
32
32
|
liquidation_preference_multiple: damlTypes.Optional<damlTypes.Numeric>;
|
|
33
33
|
participation_cap_multiple: damlTypes.Optional<damlTypes.Numeric>;
|
|
34
|
+
conversion_rights: OcfStockClassConversionRight[];
|
|
34
35
|
};
|
|
35
36
|
|
|
36
37
|
export declare const OcfStockClassData:
|
|
@@ -58,6 +59,81 @@ export declare const OcfIssuerData:
|
|
|
58
59
|
;
|
|
59
60
|
|
|
60
61
|
|
|
62
|
+
export declare type OcfStockClassConversionRight = {
|
|
63
|
+
type_: string;
|
|
64
|
+
conversion_mechanism: OcfConversionMechanism;
|
|
65
|
+
conversion_trigger: OcfConversionTrigger;
|
|
66
|
+
converts_to_stock_class_id: string;
|
|
67
|
+
conversion_rate: damlTypes.Optional<damlTypes.Numeric>;
|
|
68
|
+
conversion_price: damlTypes.Optional<OcfMonetary>;
|
|
69
|
+
expires_at: damlTypes.Optional<damlTypes.Time>;
|
|
70
|
+
};
|
|
71
|
+
|
|
72
|
+
export declare const OcfStockClassConversionRight:
|
|
73
|
+
damlTypes.Serializable<OcfStockClassConversionRight> & {
|
|
74
|
+
}
|
|
75
|
+
;
|
|
76
|
+
|
|
77
|
+
|
|
78
|
+
export declare type OcfConversionTrigger =
|
|
79
|
+
| 'OcfConversionTriggerAutomatic'
|
|
80
|
+
| 'OcfConversionTriggerOptional'
|
|
81
|
+
;
|
|
82
|
+
|
|
83
|
+
export declare const OcfConversionTrigger:
|
|
84
|
+
damlTypes.Serializable<OcfConversionTrigger> & {
|
|
85
|
+
}
|
|
86
|
+
& { readonly keys: OcfConversionTrigger[] } & { readonly [e in OcfConversionTrigger]: e }
|
|
87
|
+
;
|
|
88
|
+
|
|
89
|
+
|
|
90
|
+
export declare type OcfConversionMechanism =
|
|
91
|
+
| 'OcfConversionMechanismRatioConversion'
|
|
92
|
+
| 'OcfConversionMechanismPercentConversion'
|
|
93
|
+
| 'OcfConversionMechanismFixedAmountConversion'
|
|
94
|
+
;
|
|
95
|
+
|
|
96
|
+
export declare const OcfConversionMechanism:
|
|
97
|
+
damlTypes.Serializable<OcfConversionMechanism> & {
|
|
98
|
+
}
|
|
99
|
+
& { readonly keys: OcfConversionMechanism[] } & { readonly [e in OcfConversionMechanism]: e }
|
|
100
|
+
;
|
|
101
|
+
|
|
102
|
+
|
|
103
|
+
export declare type OcfInitialSharesAuthorized =
|
|
104
|
+
| { tag: 'OcfInitialSharesNumeric'; value: damlTypes.Numeric }
|
|
105
|
+
| { tag: 'OcfInitialSharesEnum'; value: OcfAuthorizedShares }
|
|
106
|
+
;
|
|
107
|
+
|
|
108
|
+
export declare const OcfInitialSharesAuthorized:
|
|
109
|
+
damlTypes.Serializable<OcfInitialSharesAuthorized> & {
|
|
110
|
+
}
|
|
111
|
+
;
|
|
112
|
+
|
|
113
|
+
|
|
114
|
+
export declare type OcfAuthorizedShares =
|
|
115
|
+
| 'OcfAuthorizedSharesNotApplicable'
|
|
116
|
+
| 'OcfAuthorizedSharesUnlimited'
|
|
117
|
+
;
|
|
118
|
+
|
|
119
|
+
export declare const OcfAuthorizedShares:
|
|
120
|
+
damlTypes.Serializable<OcfAuthorizedShares> & {
|
|
121
|
+
}
|
|
122
|
+
& { readonly keys: OcfAuthorizedShares[] } & { readonly [e in OcfAuthorizedShares]: e }
|
|
123
|
+
;
|
|
124
|
+
|
|
125
|
+
|
|
126
|
+
export declare type OcfMonetary = {
|
|
127
|
+
amount: damlTypes.Numeric;
|
|
128
|
+
currency: string;
|
|
129
|
+
};
|
|
130
|
+
|
|
131
|
+
export declare const OcfMonetary:
|
|
132
|
+
damlTypes.Serializable<OcfMonetary> & {
|
|
133
|
+
}
|
|
134
|
+
;
|
|
135
|
+
|
|
136
|
+
|
|
61
137
|
export declare type OcfStockClassType =
|
|
62
138
|
| 'OcfStockClassTypeCommon'
|
|
63
139
|
| 'OcfStockClassTypePreferred'
|
|
@@ -71,12 +147,12 @@ export declare const OcfStockClassType:
|
|
|
71
147
|
|
|
72
148
|
|
|
73
149
|
export declare type OcfAddress = {
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
city: string
|
|
77
|
-
|
|
78
|
-
postal_code: string;
|
|
150
|
+
address_type: OcfAddressType;
|
|
151
|
+
street_suite: damlTypes.Optional<string>;
|
|
152
|
+
city: damlTypes.Optional<string>;
|
|
153
|
+
country_subdivision: damlTypes.Optional<string>;
|
|
79
154
|
country: string;
|
|
155
|
+
postal_code: damlTypes.Optional<string>;
|
|
80
156
|
};
|
|
81
157
|
|
|
82
158
|
export declare const OcfAddress:
|
|
@@ -85,6 +161,19 @@ export declare const OcfAddress:
|
|
|
85
161
|
;
|
|
86
162
|
|
|
87
163
|
|
|
164
|
+
export declare type OcfAddressType =
|
|
165
|
+
| 'OcfAddressTypeLegal'
|
|
166
|
+
| 'OcfAddressTypeContact'
|
|
167
|
+
| 'OcfAddressTypeOther'
|
|
168
|
+
;
|
|
169
|
+
|
|
170
|
+
export declare const OcfAddressType:
|
|
171
|
+
damlTypes.Serializable<OcfAddressType> & {
|
|
172
|
+
}
|
|
173
|
+
& { readonly keys: OcfAddressType[] } & { readonly [e in OcfAddressType]: e }
|
|
174
|
+
;
|
|
175
|
+
|
|
176
|
+
|
|
88
177
|
export declare type OcfTaxID = {
|
|
89
178
|
tax_id_type: string;
|
|
90
179
|
tax_id: string;
|
|
@@ -27,21 +27,22 @@ exports.TransferOperation = {
|
|
|
27
27
|
|
|
28
28
|
|
|
29
29
|
exports.OcfStockClassData = {
|
|
30
|
-
decoder: damlTypes.lazyMemo(function () { return jtv.object({name: damlTypes.Text.decoder, class_type: exports.OcfStockClassType.decoder, default_id_prefix: damlTypes.Text.decoder, initial_shares_authorized:
|
|
30
|
+
decoder: damlTypes.lazyMemo(function () { return jtv.object({name: damlTypes.Text.decoder, class_type: exports.OcfStockClassType.decoder, default_id_prefix: damlTypes.Text.decoder, initial_shares_authorized: exports.OcfInitialSharesAuthorized.decoder, votes_per_share: damlTypes.Numeric(10).decoder, seniority: damlTypes.Numeric(10).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), par_value: jtv.Decoder.withDefault(null, damlTypes.Optional(exports.OcfMonetary).decoder), price_per_share: jtv.Decoder.withDefault(null, damlTypes.Optional(exports.OcfMonetary).decoder), liquidation_preference_multiple: jtv.Decoder.withDefault(null, damlTypes.Optional(damlTypes.Numeric(10)).decoder), participation_cap_multiple: jtv.Decoder.withDefault(null, damlTypes.Optional(damlTypes.Numeric(10)).decoder), conversion_rights: damlTypes.List(exports.OcfStockClassConversionRight).decoder, }); }),
|
|
31
31
|
encode: function (__typed__) {
|
|
32
32
|
return {
|
|
33
33
|
name: damlTypes.Text.encode(__typed__.name),
|
|
34
34
|
class_type: exports.OcfStockClassType.encode(__typed__.class_type),
|
|
35
35
|
default_id_prefix: damlTypes.Text.encode(__typed__.default_id_prefix),
|
|
36
|
-
initial_shares_authorized:
|
|
36
|
+
initial_shares_authorized: exports.OcfInitialSharesAuthorized.encode(__typed__.initial_shares_authorized),
|
|
37
37
|
votes_per_share: damlTypes.Numeric(10).encode(__typed__.votes_per_share),
|
|
38
38
|
seniority: damlTypes.Numeric(10).encode(__typed__.seniority),
|
|
39
|
-
board_approval_date: damlTypes.Optional(damlTypes.
|
|
40
|
-
stockholder_approval_date: damlTypes.Optional(damlTypes.
|
|
41
|
-
par_value: damlTypes.Optional(
|
|
42
|
-
price_per_share: damlTypes.Optional(
|
|
39
|
+
board_approval_date: damlTypes.Optional(damlTypes.Time).encode(__typed__.board_approval_date),
|
|
40
|
+
stockholder_approval_date: damlTypes.Optional(damlTypes.Time).encode(__typed__.stockholder_approval_date),
|
|
41
|
+
par_value: damlTypes.Optional(exports.OcfMonetary).encode(__typed__.par_value),
|
|
42
|
+
price_per_share: damlTypes.Optional(exports.OcfMonetary).encode(__typed__.price_per_share),
|
|
43
43
|
liquidation_preference_multiple: damlTypes.Optional(damlTypes.Numeric(10)).encode(__typed__.liquidation_preference_multiple),
|
|
44
44
|
participation_cap_multiple: damlTypes.Optional(damlTypes.Numeric(10)).encode(__typed__.participation_cap_multiple),
|
|
45
|
+
conversion_rights: damlTypes.List(exports.OcfStockClassConversionRight).encode(__typed__.conversion_rights),
|
|
45
46
|
};
|
|
46
47
|
}
|
|
47
48
|
,
|
|
@@ -70,6 +71,82 @@ exports.OcfIssuerData = {
|
|
|
70
71
|
|
|
71
72
|
|
|
72
73
|
|
|
74
|
+
exports.OcfStockClassConversionRight = {
|
|
75
|
+
decoder: damlTypes.lazyMemo(function () { return jtv.object({type_: damlTypes.Text.decoder, conversion_mechanism: exports.OcfConversionMechanism.decoder, conversion_trigger: exports.OcfConversionTrigger.decoder, converts_to_stock_class_id: damlTypes.Text.decoder, conversion_rate: jtv.Decoder.withDefault(null, damlTypes.Optional(damlTypes.Numeric(10)).decoder), conversion_price: jtv.Decoder.withDefault(null, damlTypes.Optional(exports.OcfMonetary).decoder), expires_at: jtv.Decoder.withDefault(null, damlTypes.Optional(damlTypes.Time).decoder), }); }),
|
|
76
|
+
encode: function (__typed__) {
|
|
77
|
+
return {
|
|
78
|
+
type_: damlTypes.Text.encode(__typed__.type_),
|
|
79
|
+
conversion_mechanism: exports.OcfConversionMechanism.encode(__typed__.conversion_mechanism),
|
|
80
|
+
conversion_trigger: exports.OcfConversionTrigger.encode(__typed__.conversion_trigger),
|
|
81
|
+
converts_to_stock_class_id: damlTypes.Text.encode(__typed__.converts_to_stock_class_id),
|
|
82
|
+
conversion_rate: damlTypes.Optional(damlTypes.Numeric(10)).encode(__typed__.conversion_rate),
|
|
83
|
+
conversion_price: damlTypes.Optional(exports.OcfMonetary).encode(__typed__.conversion_price),
|
|
84
|
+
expires_at: damlTypes.Optional(damlTypes.Time).encode(__typed__.expires_at),
|
|
85
|
+
};
|
|
86
|
+
}
|
|
87
|
+
,
|
|
88
|
+
};
|
|
89
|
+
|
|
90
|
+
|
|
91
|
+
|
|
92
|
+
exports.OcfConversionTrigger = {
|
|
93
|
+
OcfConversionTriggerAutomatic: 'OcfConversionTriggerAutomatic',
|
|
94
|
+
OcfConversionTriggerOptional: 'OcfConversionTriggerOptional',
|
|
95
|
+
keys: ['OcfConversionTriggerAutomatic','OcfConversionTriggerOptional',],
|
|
96
|
+
decoder: damlTypes.lazyMemo(function () { return jtv.oneOf(jtv.constant(exports.OcfConversionTrigger.OcfConversionTriggerAutomatic), jtv.constant(exports.OcfConversionTrigger.OcfConversionTriggerOptional)); }),
|
|
97
|
+
encode: function (__typed__) { return __typed__; },
|
|
98
|
+
};
|
|
99
|
+
|
|
100
|
+
|
|
101
|
+
|
|
102
|
+
exports.OcfConversionMechanism = {
|
|
103
|
+
OcfConversionMechanismRatioConversion: 'OcfConversionMechanismRatioConversion',
|
|
104
|
+
OcfConversionMechanismPercentConversion: 'OcfConversionMechanismPercentConversion',
|
|
105
|
+
OcfConversionMechanismFixedAmountConversion: 'OcfConversionMechanismFixedAmountConversion',
|
|
106
|
+
keys: ['OcfConversionMechanismRatioConversion','OcfConversionMechanismPercentConversion','OcfConversionMechanismFixedAmountConversion',],
|
|
107
|
+
decoder: damlTypes.lazyMemo(function () { return jtv.oneOf(jtv.constant(exports.OcfConversionMechanism.OcfConversionMechanismRatioConversion), jtv.constant(exports.OcfConversionMechanism.OcfConversionMechanismPercentConversion), jtv.constant(exports.OcfConversionMechanism.OcfConversionMechanismFixedAmountConversion)); }),
|
|
108
|
+
encode: function (__typed__) { return __typed__; },
|
|
109
|
+
};
|
|
110
|
+
|
|
111
|
+
|
|
112
|
+
|
|
113
|
+
exports.OcfInitialSharesAuthorized = {
|
|
114
|
+
decoder: damlTypes.lazyMemo(function () { return jtv.oneOf(jtv.object({tag: jtv.constant('OcfInitialSharesNumeric'), value: damlTypes.Numeric(10).decoder, }), jtv.object({tag: jtv.constant('OcfInitialSharesEnum'), value: exports.OcfAuthorizedShares.decoder, })); }),
|
|
115
|
+
encode: function (__typed__) {
|
|
116
|
+
switch(__typed__.tag) {
|
|
117
|
+
case 'OcfInitialSharesNumeric': return {tag: __typed__.tag, value: damlTypes.Numeric(10).encode(__typed__.value)};
|
|
118
|
+
case 'OcfInitialSharesEnum': return {tag: __typed__.tag, value: exports.OcfAuthorizedShares.encode(__typed__.value)};
|
|
119
|
+
default: throw 'unrecognized type tag: ' + __typed__.tag + ' while serializing a value of type OcfInitialSharesAuthorized';
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
,
|
|
123
|
+
};
|
|
124
|
+
|
|
125
|
+
|
|
126
|
+
|
|
127
|
+
exports.OcfAuthorizedShares = {
|
|
128
|
+
OcfAuthorizedSharesNotApplicable: 'OcfAuthorizedSharesNotApplicable',
|
|
129
|
+
OcfAuthorizedSharesUnlimited: 'OcfAuthorizedSharesUnlimited',
|
|
130
|
+
keys: ['OcfAuthorizedSharesNotApplicable','OcfAuthorizedSharesUnlimited',],
|
|
131
|
+
decoder: damlTypes.lazyMemo(function () { return jtv.oneOf(jtv.constant(exports.OcfAuthorizedShares.OcfAuthorizedSharesNotApplicable), jtv.constant(exports.OcfAuthorizedShares.OcfAuthorizedSharesUnlimited)); }),
|
|
132
|
+
encode: function (__typed__) { return __typed__; },
|
|
133
|
+
};
|
|
134
|
+
|
|
135
|
+
|
|
136
|
+
|
|
137
|
+
exports.OcfMonetary = {
|
|
138
|
+
decoder: damlTypes.lazyMemo(function () { return jtv.object({amount: damlTypes.Numeric(10).decoder, currency: damlTypes.Text.decoder, }); }),
|
|
139
|
+
encode: function (__typed__) {
|
|
140
|
+
return {
|
|
141
|
+
amount: damlTypes.Numeric(10).encode(__typed__.amount),
|
|
142
|
+
currency: damlTypes.Text.encode(__typed__.currency),
|
|
143
|
+
};
|
|
144
|
+
}
|
|
145
|
+
,
|
|
146
|
+
};
|
|
147
|
+
|
|
148
|
+
|
|
149
|
+
|
|
73
150
|
exports.OcfStockClassType = {
|
|
74
151
|
OcfStockClassTypeCommon: 'OcfStockClassTypeCommon',
|
|
75
152
|
OcfStockClassTypePreferred: 'OcfStockClassTypePreferred',
|
|
@@ -81,15 +158,15 @@ exports.OcfStockClassType = {
|
|
|
81
158
|
|
|
82
159
|
|
|
83
160
|
exports.OcfAddress = {
|
|
84
|
-
decoder: damlTypes.lazyMemo(function () { return jtv.object({
|
|
161
|
+
decoder: damlTypes.lazyMemo(function () { return jtv.object({address_type: exports.OcfAddressType.decoder, street_suite: jtv.Decoder.withDefault(null, damlTypes.Optional(damlTypes.Text).decoder), city: jtv.Decoder.withDefault(null, damlTypes.Optional(damlTypes.Text).decoder), country_subdivision: jtv.Decoder.withDefault(null, damlTypes.Optional(damlTypes.Text).decoder), country: damlTypes.Text.decoder, postal_code: jtv.Decoder.withDefault(null, damlTypes.Optional(damlTypes.Text).decoder), }); }),
|
|
85
162
|
encode: function (__typed__) {
|
|
86
163
|
return {
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
city: damlTypes.Text.encode(__typed__.city),
|
|
90
|
-
|
|
91
|
-
postal_code: damlTypes.Text.encode(__typed__.postal_code),
|
|
164
|
+
address_type: exports.OcfAddressType.encode(__typed__.address_type),
|
|
165
|
+
street_suite: damlTypes.Optional(damlTypes.Text).encode(__typed__.street_suite),
|
|
166
|
+
city: damlTypes.Optional(damlTypes.Text).encode(__typed__.city),
|
|
167
|
+
country_subdivision: damlTypes.Optional(damlTypes.Text).encode(__typed__.country_subdivision),
|
|
92
168
|
country: damlTypes.Text.encode(__typed__.country),
|
|
169
|
+
postal_code: damlTypes.Optional(damlTypes.Text).encode(__typed__.postal_code),
|
|
93
170
|
};
|
|
94
171
|
}
|
|
95
172
|
,
|
|
@@ -97,6 +174,17 @@ exports.OcfAddress = {
|
|
|
97
174
|
|
|
98
175
|
|
|
99
176
|
|
|
177
|
+
exports.OcfAddressType = {
|
|
178
|
+
OcfAddressTypeLegal: 'OcfAddressTypeLegal',
|
|
179
|
+
OcfAddressTypeContact: 'OcfAddressTypeContact',
|
|
180
|
+
OcfAddressTypeOther: 'OcfAddressTypeOther',
|
|
181
|
+
keys: ['OcfAddressTypeLegal','OcfAddressTypeContact','OcfAddressTypeOther',],
|
|
182
|
+
decoder: damlTypes.lazyMemo(function () { return jtv.oneOf(jtv.constant(exports.OcfAddressType.OcfAddressTypeLegal), jtv.constant(exports.OcfAddressType.OcfAddressTypeContact), jtv.constant(exports.OcfAddressType.OcfAddressTypeOther)); }),
|
|
183
|
+
encode: function (__typed__) { return __typed__; },
|
|
184
|
+
};
|
|
185
|
+
|
|
186
|
+
|
|
187
|
+
|
|
100
188
|
exports.OcfTaxID = {
|
|
101
189
|
decoder: damlTypes.lazyMemo(function () { return jtv.object({tax_id_type: damlTypes.Text.decoder, tax_id: damlTypes.Text.decoder, }); }),
|
|
102
190
|
encode: function (__typed__) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fairmint/open-captable-protocol-daml-js",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.38",
|
|
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-
|
|
37
|
+
"codegen": "npm run build && cd OpenCapTable-v10 && daml codegen js && cd .. && cd OpenCapTableShared-v01 && daml codegen js && cd .. && cd OpenCapTableReports-v01 && daml codegen js && cd .. && npm run build:ts && tsx scripts/bundle-dependencies.ts && tsx scripts/create-package-index.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",
|