@fairmint/open-captable-protocol-daml-js 0.2.12 → 0.2.14
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +152 -1
- package/generated/subscriptions-factory-contract-id.json +10 -0
- package/generated/subscriptions-factory-contract-id.json.d.ts +11 -0
- package/lib/DA/Date/Types/index.d.ts +1 -0
- package/lib/DA/Date/Types/index.js +8 -0
- package/lib/DA/Date/Types/module.d.ts +47 -0
- package/lib/DA/Date/Types/module.js +48 -0
- package/lib/DA/Date/index.d.ts +2 -0
- package/lib/DA/Date/index.js +9 -0
- package/lib/DA/Exception/ArithmeticError/index.d.ts +1 -0
- package/lib/DA/Exception/ArithmeticError/index.js +8 -0
- package/lib/DA/Exception/ArithmeticError/module.d.ts +18 -0
- package/lib/DA/Exception/ArithmeticError/module.js +25 -0
- package/lib/DA/Exception/AssertionFailed/index.d.ts +1 -0
- package/lib/DA/Exception/AssertionFailed/index.js +8 -0
- package/lib/DA/Exception/AssertionFailed/module.d.ts +18 -0
- package/lib/DA/Exception/AssertionFailed/module.js +25 -0
- package/lib/DA/Exception/GeneralError/index.d.ts +1 -0
- package/lib/DA/Exception/GeneralError/index.js +8 -0
- package/lib/DA/Exception/GeneralError/module.d.ts +18 -0
- package/lib/DA/Exception/GeneralError/module.js +25 -0
- package/lib/DA/Exception/PreconditionFailed/index.d.ts +1 -0
- package/lib/DA/Exception/PreconditionFailed/index.js +8 -0
- package/lib/DA/Exception/PreconditionFailed/module.d.ts +18 -0
- package/lib/DA/Exception/PreconditionFailed/module.js +25 -0
- package/lib/DA/Exception/index.d.ts +2 -0
- package/lib/DA/Exception/index.js +9 -0
- package/lib/DA/Internal/Down/index.d.ts +1 -0
- package/lib/DA/Internal/Down/index.js +8 -0
- package/lib/DA/Internal/Down/module.d.ts +17 -0
- package/lib/DA/Internal/Down/module.js +25 -0
- package/lib/DA/Logic/Types/index.d.ts +1 -0
- package/lib/DA/Logic/Types/index.js +8 -0
- package/lib/DA/Logic/Types/module.d.ts +20 -0
- package/lib/DA/Logic/Types/module.js +29 -0
- package/lib/DA/Logic/index.d.ts +2 -0
- package/lib/DA/Logic/index.js +9 -0
- package/lib/DA/Monoid/Types/index.d.ts +1 -0
- package/lib/DA/Monoid/Types/index.js +8 -0
- package/lib/DA/Monoid/Types/module.d.ts +46 -0
- package/lib/DA/Monoid/Types/module.js +61 -0
- package/lib/DA/Monoid/index.d.ts +2 -0
- package/lib/DA/Monoid/index.js +9 -0
- package/lib/DA/NonEmpty/Types/index.d.ts +1 -0
- package/lib/DA/NonEmpty/Types/index.js +8 -0
- package/lib/DA/NonEmpty/Types/module.d.ts +18 -0
- package/lib/DA/NonEmpty/Types/module.js +26 -0
- package/lib/DA/NonEmpty/index.d.ts +2 -0
- package/lib/DA/NonEmpty/index.js +9 -0
- package/lib/DA/Random/Types/index.d.ts +1 -0
- package/lib/DA/Random/Types/index.js +8 -0
- package/lib/DA/Random/Types/module.d.ts +18 -0
- package/lib/DA/Random/Types/module.js +26 -0
- package/lib/DA/Random/index.d.ts +2 -0
- package/lib/DA/Random/index.js +9 -0
- package/lib/DA/Semigroup/Types/index.d.ts +1 -0
- package/lib/DA/Semigroup/Types/index.js +8 -0
- package/lib/DA/Semigroup/Types/module.d.ts +26 -0
- package/lib/DA/Semigroup/Types/module.js +37 -0
- package/lib/DA/Semigroup/index.d.ts +2 -0
- package/lib/DA/Semigroup/index.js +9 -0
- package/lib/DA/Set/Types/index.d.ts +1 -0
- package/lib/DA/Set/Types/index.js +8 -0
- package/lib/DA/Set/Types/module.d.ts +17 -0
- package/lib/DA/Set/Types/module.js +25 -0
- package/lib/DA/Set/index.d.ts +2 -0
- package/lib/DA/Set/index.js +9 -0
- package/lib/DA/Stack/Types/index.d.ts +1 -0
- package/lib/DA/Stack/Types/index.js +8 -0
- package/lib/DA/Stack/Types/module.d.ts +24 -0
- package/lib/DA/Stack/Types/module.js +31 -0
- package/lib/DA/Stack/index.d.ts +2 -0
- package/lib/DA/Stack/index.js +9 -0
- package/lib/DA/Time/Types/index.d.ts +1 -0
- package/lib/DA/Time/Types/index.js +8 -0
- package/lib/DA/Time/Types/module.d.ts +18 -0
- package/lib/DA/Time/Types/module.js +25 -0
- package/lib/DA/Time/index.d.ts +2 -0
- package/lib/DA/Time/index.js +9 -0
- package/lib/DA/Types/index.d.ts +1 -0
- package/lib/DA/Types/index.js +8 -0
- package/lib/DA/Types/module.d.ts +379 -0
- package/lib/DA/Types/module.js +445 -0
- package/lib/DA/Validation/Types/index.d.ts +1 -0
- package/lib/DA/Validation/Types/index.js +8 -0
- package/lib/DA/Validation/Types/module.d.ts +20 -0
- package/lib/DA/Validation/Types/module.js +29 -0
- package/lib/DA/Validation/index.d.ts +2 -0
- package/lib/DA/Validation/index.js +9 -0
- package/lib/Fairmint/OpenCapTable/ConvertibleIssuance/module.js +1 -1
- package/lib/Fairmint/OpenCapTable/Document/module.js +1 -1
- package/lib/Fairmint/OpenCapTable/EquityCompensationExercise/module.js +1 -1
- package/lib/Fairmint/OpenCapTable/EquityCompensationIssuance/module.js +1 -1
- package/lib/Fairmint/OpenCapTable/Issuer/module.js +1 -1
- package/lib/Fairmint/OpenCapTable/IssuerAuthorization/module.js +1 -1
- package/lib/Fairmint/OpenCapTable/IssuerAuthorizedSharesAdjustment/module.js +1 -1
- package/lib/Fairmint/OpenCapTable/OcpFactory/module.js +1 -1
- package/lib/Fairmint/OpenCapTable/Stakeholder/module.js +1 -1
- package/lib/Fairmint/OpenCapTable/StockCancellation/module.js +1 -1
- package/lib/Fairmint/OpenCapTable/StockClass/module.js +1 -1
- package/lib/Fairmint/OpenCapTable/StockClassAuthorizedSharesAdjustment/module.js +1 -1
- package/lib/Fairmint/OpenCapTable/StockIssuance/module.js +1 -1
- package/lib/Fairmint/OpenCapTable/StockLegendTemplate/module.js +1 -1
- package/lib/Fairmint/OpenCapTable/StockPlan/module.js +1 -1
- package/lib/Fairmint/OpenCapTable/StockPlanPoolAdjustment/module.js +1 -1
- package/lib/Fairmint/OpenCapTable/Valuation/module.js +1 -1
- package/lib/Fairmint/OpenCapTable/VestingTerms/module.js +1 -1
- package/lib/Fairmint/OpenCapTable/WarrantIssuance/module.js +1 -1
- package/lib/Fairmint/Subscriptions/ProcessorApprovedSubscriptionProposal/index.d.ts +1 -0
- package/lib/Fairmint/Subscriptions/ProcessorApprovedSubscriptionProposal/index.js +8 -0
- package/lib/Fairmint/Subscriptions/ProcessorApprovedSubscriptionProposal/module.d.ts +75 -0
- package/lib/Fairmint/Subscriptions/ProcessorApprovedSubscriptionProposal/module.js +124 -0
- package/lib/Fairmint/Subscriptions/Subscription/index.d.ts +1 -0
- package/lib/Fairmint/Subscriptions/Subscription/index.js +8 -0
- package/lib/Fairmint/Subscriptions/Subscription/module.d.ts +246 -0
- package/lib/Fairmint/Subscriptions/Subscription/module.js +400 -0
- package/lib/Fairmint/Subscriptions/SubscriptionConfig/index.d.ts +1 -0
- package/lib/Fairmint/Subscriptions/SubscriptionConfig/index.js +8 -0
- package/lib/Fairmint/Subscriptions/SubscriptionConfig/module.d.ts +59 -0
- package/lib/Fairmint/Subscriptions/SubscriptionConfig/module.js +73 -0
- package/lib/Fairmint/Subscriptions/SubscriptionFactory/index.d.ts +1 -0
- package/lib/Fairmint/Subscriptions/SubscriptionFactory/index.js +8 -0
- package/lib/Fairmint/Subscriptions/SubscriptionFactory/module.d.ts +45 -0
- package/lib/Fairmint/Subscriptions/SubscriptionFactory/module.js +67 -0
- package/lib/Fairmint/Subscriptions/SubscriptionProposal/index.d.ts +1 -0
- package/lib/Fairmint/Subscriptions/SubscriptionProposal/index.js +8 -0
- package/lib/Fairmint/Subscriptions/SubscriptionProposal/module.d.ts +75 -0
- package/lib/Fairmint/Subscriptions/SubscriptionProposal/module.js +124 -0
- package/lib/Fairmint/Subscriptions/index.d.ts +10 -0
- package/lib/Fairmint/Subscriptions/index.js +17 -0
- package/lib/Fairmint/index.d.ts +1 -0
- package/lib/Fairmint/index.js +2 -0
- package/lib/Splice/Amulet/TokenApiUtils/index.d.ts +1 -0
- package/lib/Splice/Amulet/TokenApiUtils/index.js +8 -0
- package/lib/Splice/Amulet/TokenApiUtils/module.d.ts +24 -0
- package/lib/Splice/Amulet/TokenApiUtils/module.js +27 -0
- package/lib/Splice/Amulet/TwoStepTransfer/index.d.ts +1 -0
- package/lib/Splice/Amulet/TwoStepTransfer/index.js +8 -0
- package/lib/Splice/Amulet/TwoStepTransfer/module.d.ts +26 -0
- package/lib/Splice/Amulet/TwoStepTransfer/module.js +33 -0
- package/lib/Splice/Amulet/index.d.ts +5 -0
- package/lib/Splice/Amulet/index.js +12 -0
- package/lib/Splice/Amulet/module.d.ts +588 -0
- package/lib/Splice/Amulet/module.js +814 -0
- package/lib/Splice/AmuletAllocation/index.d.ts +1 -0
- package/lib/Splice/AmuletAllocation/index.js +8 -0
- package/lib/Splice/AmuletAllocation/module.d.ts +35 -0
- package/lib/Splice/AmuletAllocation/module.js +49 -0
- package/lib/Splice/AmuletConfig/index.d.ts +1 -0
- package/lib/Splice/AmuletConfig/index.js +8 -0
- package/lib/Splice/AmuletConfig/module.d.ts +83 -0
- package/lib/Splice/AmuletConfig/module.js +92 -0
- package/lib/Splice/AmuletRules/index.d.ts +1 -0
- package/lib/Splice/AmuletRules/index.js +8 -0
- package/lib/Splice/AmuletRules/module.d.ts +1040 -0
- package/lib/Splice/AmuletRules/module.js +1441 -0
- package/lib/Splice/AmuletTransferInstruction/index.d.ts +1 -0
- package/lib/Splice/AmuletTransferInstruction/index.js +8 -0
- package/lib/Splice/AmuletTransferInstruction/module.d.ts +35 -0
- package/lib/Splice/AmuletTransferInstruction/module.js +49 -0
- package/lib/Splice/Api/Token/AllocationInstructionV1/index.d.ts +1 -0
- package/lib/Splice/Api/Token/AllocationInstructionV1/index.js +8 -0
- package/lib/Splice/Api/Token/AllocationInstructionV1/module.d.ts +149 -0
- package/lib/Splice/Api/Token/AllocationInstructionV1/module.js +215 -0
- package/lib/Splice/Api/Token/AllocationV1/index.d.ts +1 -0
- package/lib/Splice/Api/Token/AllocationV1/index.js +8 -0
- package/lib/Splice/Api/Token/AllocationV1/module.d.ts +153 -0
- package/lib/Splice/Api/Token/AllocationV1/module.js +206 -0
- package/lib/Splice/Api/Token/HoldingV1/index.d.ts +1 -0
- package/lib/Splice/Api/Token/HoldingV1/index.js +8 -0
- package/lib/Splice/Api/Token/HoldingV1/module.d.ts +60 -0
- package/lib/Splice/Api/Token/HoldingV1/module.js +76 -0
- package/lib/Splice/Api/Token/MetadataV1/index.d.ts +1 -0
- package/lib/Splice/Api/Token/MetadataV1/index.js +8 -0
- package/lib/Splice/Api/Token/MetadataV1/module.d.ts +91 -0
- package/lib/Splice/Api/Token/MetadataV1/module.js +114 -0
- package/lib/Splice/Api/Token/TransferInstructionV1/index.d.ts +1 -0
- package/lib/Splice/Api/Token/TransferInstructionV1/index.js +8 -0
- package/lib/Splice/Api/Token/TransferInstructionV1/module.d.ts +202 -0
- package/lib/Splice/Api/Token/TransferInstructionV1/module.js +294 -0
- package/lib/Splice/Api/Token/index.d.ts +2 -0
- package/lib/Splice/Api/Token/index.js +9 -0
- package/lib/Splice/DecentralizedSynchronizer/index.d.ts +1 -0
- package/lib/Splice/DecentralizedSynchronizer/index.js +8 -0
- package/lib/Splice/DecentralizedSynchronizer/module.d.ts +89 -0
- package/lib/Splice/DecentralizedSynchronizer/module.js +110 -0
- package/lib/Splice/Expiry/index.d.ts +1 -0
- package/lib/Splice/Expiry/index.js +8 -0
- package/lib/Splice/Expiry/module.d.ts +30 -0
- package/lib/Splice/Expiry/module.js +41 -0
- package/lib/Splice/ExternalPartyAmuletRules/index.d.ts +1 -0
- package/lib/Splice/ExternalPartyAmuletRules/index.js +8 -0
- package/lib/Splice/ExternalPartyAmuletRules/module.d.ts +210 -0
- package/lib/Splice/ExternalPartyAmuletRules/module.js +294 -0
- package/lib/Splice/Fees/index.d.ts +1 -0
- package/lib/Splice/Fees/index.js +8 -0
- package/lib/Splice/Fees/module.d.ts +65 -0
- package/lib/Splice/Fees/module.js +80 -0
- package/lib/Splice/Issuance/index.d.ts +1 -0
- package/lib/Splice/Issuance/index.js +8 -0
- package/lib/Splice/Issuance/module.d.ts +67 -0
- package/lib/Splice/Issuance/module.js +80 -0
- package/lib/Splice/RelRound/index.d.ts +1 -0
- package/lib/Splice/RelRound/index.js +8 -0
- package/lib/Splice/RelRound/module.d.ts +18 -0
- package/lib/Splice/RelRound/module.js +25 -0
- package/lib/Splice/Round/index.d.ts +1 -0
- package/lib/Splice/Round/index.js +8 -0
- package/lib/Splice/Round/module.d.ts +136 -0
- package/lib/Splice/Round/module.js +182 -0
- package/lib/Splice/Schedule/index.d.ts +1 -0
- package/lib/Splice/Schedule/index.js +8 -0
- package/lib/Splice/Schedule/module.d.ts +20 -0
- package/lib/Splice/Schedule/module.js +28 -0
- package/lib/Splice/Types/index.d.ts +1 -0
- package/lib/Splice/Types/index.js +8 -0
- package/lib/Splice/Types/module.d.ts +50 -0
- package/lib/Splice/Types/module.js +63 -0
- package/lib/Splice/ValidatorLicense/index.d.ts +1 -0
- package/lib/Splice/ValidatorLicense/index.js +8 -0
- package/lib/Splice/ValidatorLicense/module.d.ts +283 -0
- package/lib/Splice/ValidatorLicense/module.js +388 -0
- package/package.json +15 -3
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
## Shared Coding Guidelines for OCP DAML Packages
|
|
2
2
|
|
|
3
|
-
This repository contains multiple DAML packages (e.g., `OpenCapTable-v25`, `OpenCapTableReports-v01`, `OpenCapTableProofOfOwnership-v01`, `
|
|
3
|
+
This repository contains multiple DAML packages (e.g., `OpenCapTable-v25`, `OpenCapTableReports-v01`, `OpenCapTableProofOfOwnership-v01`, `Shared-v01`, `Subscriptions-v01`). This document defines coding guidelines that apply to all packages.
|
|
4
4
|
|
|
5
5
|
For package-specific details about each implementation, see the README.md file in the respective package directory (e.g., `open-captable-protocol-daml/OpenCapTable-v25/README.md`).
|
|
6
6
|
|
|
@@ -62,4 +62,155 @@ Each package may include additional constraints and domain guidance. Refer to:
|
|
|
62
62
|
- `open-captable-protocol-daml/OpenCapTable-v25/README.md` for Open Cap Table specifics (e.g., Issuer management patterns).
|
|
63
63
|
- Other package READMEs as applicable.
|
|
64
64
|
|
|
65
|
+
## Adding Support for New Packages
|
|
66
|
+
|
|
67
|
+
When adding a new DAML package to this repository (e.g., `NewPackage-v01`), follow these steps to ensure full integration with the build, deployment, and publishing pipeline:
|
|
68
|
+
|
|
69
|
+
### 1. Create the Package Directory
|
|
70
|
+
|
|
71
|
+
Create a new directory at the root level with your package name and version (e.g., `NewPackage-v01/`).
|
|
72
|
+
|
|
73
|
+
### 2. Set Up Package Structure
|
|
74
|
+
|
|
75
|
+
- Create `daml.yaml` with proper configuration
|
|
76
|
+
- Add your DAML modules under `daml/` directory
|
|
77
|
+
- Create a package-specific `README.md` documenting the package purpose and usage
|
|
78
|
+
|
|
79
|
+
### 3. Update Build Scripts
|
|
80
|
+
|
|
81
|
+
Update the following files to include your new package:
|
|
82
|
+
|
|
83
|
+
#### `package.json`
|
|
84
|
+
- **codegen script**: Add codegen step for your package in the `codegen` script
|
|
85
|
+
```
|
|
86
|
+
cd NewPackage-v01 && daml codegen js && cd ..
|
|
87
|
+
```
|
|
88
|
+
- **upload-dar script**: Add new script for uploading DAR files
|
|
89
|
+
```json
|
|
90
|
+
"upload-dar:newpackage": "npm run build && ts-node scripts/upload-dar-newpackage.ts --network devnet && ts-node scripts/upload-dar-newpackage.ts --network mainnet"
|
|
91
|
+
```
|
|
92
|
+
- **create-factory script**: Add new script for creating factory contracts
|
|
93
|
+
```json
|
|
94
|
+
"create-factory:newpackage": "npm run codegen && ts-node scripts/create-newpackage-factory.ts --network devnet && ts-node scripts/create-newpackage-factory.ts --network mainnet"
|
|
95
|
+
```
|
|
96
|
+
- **upload-and-create script**: Add combined script
|
|
97
|
+
```json
|
|
98
|
+
"upload-and-create:newpackage": "npm run upload-dar:newpackage && npm run create-factory:newpackage"
|
|
99
|
+
```
|
|
100
|
+
- **exports**: Add export for factory contract ID JSON
|
|
101
|
+
```json
|
|
102
|
+
"./newpackage-factory-contract-id.json": {
|
|
103
|
+
"types": "./generated/newpackage-factory-contract-id.json.d.ts",
|
|
104
|
+
"default": "./generated/newpackage-factory-contract-id.json"
|
|
105
|
+
}
|
|
106
|
+
```
|
|
107
|
+
- **files**: Add generated files to the npm package
|
|
108
|
+
```json
|
|
109
|
+
"generated/newpackage-factory-contract-id.json",
|
|
110
|
+
"generated/newpackage-factory-contract-id.json.d.ts"
|
|
111
|
+
```
|
|
112
|
+
- **typesVersions**: Add type definitions for JSON imports
|
|
113
|
+
```json
|
|
114
|
+
"newpackage-factory-contract-id.json": [
|
|
115
|
+
"generated/newpackage-factory-contract-id.json.d.ts"
|
|
116
|
+
]
|
|
117
|
+
```
|
|
118
|
+
|
|
119
|
+
#### `scripts/bundle-dependencies.ts`
|
|
120
|
+
Add your package directory to the `PACKAGE_DIRS` array:
|
|
121
|
+
```typescript
|
|
122
|
+
const PACKAGE_DIRS = [
|
|
123
|
+
path.join(__dirname, '../generated/js/OpenCapTable-v25-0.0.1'),
|
|
124
|
+
path.join(__dirname, '../generated/js/OpenCapTableReports-v01-0.0.2'),
|
|
125
|
+
path.join(__dirname, '../generated/js/NewPackage-v01-0.0.1'),
|
|
126
|
+
];
|
|
127
|
+
```
|
|
128
|
+
|
|
129
|
+
#### `scripts/create-package-index.ts`
|
|
130
|
+
Add your package directory to the `packageDirs` array:
|
|
131
|
+
```typescript
|
|
132
|
+
const packageDirs = [
|
|
133
|
+
path.join(__dirname, '..', 'generated', 'js', 'OpenCapTable-v25-0.0.1'),
|
|
134
|
+
path.join(__dirname, '..', 'generated', 'js', 'OpenCapTableReports-v01-0.0.2'),
|
|
135
|
+
path.join(__dirname, '..', 'generated', 'js', 'NewPackage-v01-0.0.1'),
|
|
136
|
+
];
|
|
137
|
+
```
|
|
138
|
+
|
|
139
|
+
#### `scripts/create-root-index.ts`
|
|
140
|
+
1. Add constants for your package directories:
|
|
141
|
+
```typescript
|
|
142
|
+
const NEWPACKAGE_DIR = path.join(ROOT_DIR, 'generated', 'js', 'NewPackage-v01-0.0.1');
|
|
143
|
+
const NEWPACKAGE_LIB = path.join(NEWPACKAGE_DIR, 'lib');
|
|
144
|
+
```
|
|
145
|
+
|
|
146
|
+
2. Copy your package namespace in `buildCombinedLib()`:
|
|
147
|
+
```typescript
|
|
148
|
+
copyDir(path.join(NEWPACKAGE_LIB, 'Fairmint', 'NewPackage'), path.join(destFairmint, 'NewPackage'));
|
|
149
|
+
```
|
|
150
|
+
|
|
151
|
+
3. Update Fairmint index files to export your namespace:
|
|
152
|
+
```typescript
|
|
153
|
+
// In index.js:
|
|
154
|
+
var NewPackage = require('./NewPackage');
|
|
155
|
+
exports.NewPackage = NewPackage;
|
|
156
|
+
|
|
157
|
+
// In index.d.ts:
|
|
158
|
+
export * as NewPackage from './NewPackage';
|
|
159
|
+
```
|
|
160
|
+
|
|
161
|
+
4. Add JSON type definition in `ensureJsonDts()`:
|
|
162
|
+
```typescript
|
|
163
|
+
ensureJson(
|
|
164
|
+
path.join(ROOT_DIR, 'generated', 'newpackage-factory-contract-id.json'),
|
|
165
|
+
path.join(ROOT_DIR, 'generated', 'newpackage-factory-contract-id.json.d.ts'),
|
|
166
|
+
`declare const data: {\n devnet: {\n newpackageFactoryContractId: string;\n templateId: string;\n };\n mainnet: {\n newpackageFactoryContractId: string;\n templateId: string;\n };\n};\nexport default data;\n`
|
|
167
|
+
);
|
|
168
|
+
```
|
|
169
|
+
|
|
170
|
+
### 4. Create Deployment Scripts
|
|
171
|
+
|
|
172
|
+
Create two new scripts in the `scripts/` directory:
|
|
173
|
+
|
|
174
|
+
#### `scripts/upload-dar-newpackage.ts`
|
|
175
|
+
Upload the DAR file to both devnet and mainnet. Use existing scripts as templates (e.g., `upload-dar-reports.ts`).
|
|
176
|
+
|
|
177
|
+
Key elements:
|
|
178
|
+
- Parse `--network` argument
|
|
179
|
+
- Upload to both `intellect` and `5n` providers
|
|
180
|
+
- Point to correct DAR file path: `NewPackage-v01/.daml/dist/NewPackage-v01-{version}.dar`
|
|
181
|
+
|
|
182
|
+
#### `scripts/create-newpackage-factory.ts`
|
|
183
|
+
Create factory contract on both networks. Use existing factory scripts as templates.
|
|
184
|
+
|
|
185
|
+
Key elements:
|
|
186
|
+
- Import generated DAML types from `../lib`
|
|
187
|
+
- Create factory contract with appropriate arguments
|
|
188
|
+
- Save contract ID to `generated/newpackage-factory-contract-id.json`
|
|
189
|
+
- Include proper error handling and network argument parsing
|
|
190
|
+
|
|
191
|
+
### 5. Test the Integration
|
|
192
|
+
|
|
193
|
+
1. Build DAML packages:
|
|
194
|
+
```bash
|
|
195
|
+
npm run build
|
|
196
|
+
```
|
|
197
|
+
|
|
198
|
+
2. Generate JavaScript bindings:
|
|
199
|
+
```bash
|
|
200
|
+
npm run codegen
|
|
201
|
+
```
|
|
202
|
+
|
|
203
|
+
3. Verify generated files exist in `lib/Fairmint/NewPackage/`
|
|
204
|
+
|
|
205
|
+
4. Test deployment scripts:
|
|
206
|
+
```bash
|
|
207
|
+
npm run upload-and-create:newpackage
|
|
208
|
+
```
|
|
209
|
+
|
|
210
|
+
### 6. Update Documentation
|
|
211
|
+
|
|
212
|
+
- Add package to the list in this README's introduction
|
|
213
|
+
- Create package-specific README with domain guidance
|
|
214
|
+
- Document any new contract templates and their usage
|
|
215
|
+
|
|
65
216
|
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
{
|
|
2
|
+
"devnet": {
|
|
3
|
+
"subscriptionsFactoryContractId": "004f6cd59c7ae93bebbfb3e43eff5877907cfe9a5d1b385752e76b2f907a1b57b3ca111220eaf625bdca4c94f6d67bda92f2bcad7e3e258bb6f5a81964d0bee24971f88d1b",
|
|
4
|
+
"templateId": "a69aaed3f2c990040ac22263af73b2547522cc540ffeca867b0f13d74d9e663d:Fairmint.Subscriptions.SubscriptionFactory:SubscriptionFactory"
|
|
5
|
+
},
|
|
6
|
+
"mainnet": {
|
|
7
|
+
"subscriptionsFactoryContractId": "0077a4cc4aa445a09b04f1c72eaf8fd17ca61310ae7dc1a1e0d39918125d08e960ca111220d8fc5ce9b61e47b1871b45437c32882afb75dd2b93dacbbc87d6134b5859dcaf",
|
|
8
|
+
"templateId": "a69aaed3f2c990040ac22263af73b2547522cc540ffeca867b0f13d74d9e663d:Fairmint.Subscriptions.SubscriptionFactory:SubscriptionFactory"
|
|
9
|
+
}
|
|
10
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './module';
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/* eslint-disable-next-line no-unused-vars */
|
|
3
|
+
function __export(m) {
|
|
4
|
+
/* eslint-disable-next-line no-prototype-builtins */
|
|
5
|
+
for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];
|
|
6
|
+
}
|
|
7
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8
|
+
__export(require('./module'));
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
// Generated from DA/Date/Types.daml
|
|
2
|
+
/* eslint-disable @typescript-eslint/camelcase */
|
|
3
|
+
/* eslint-disable @typescript-eslint/no-namespace */
|
|
4
|
+
/* eslint-disable @typescript-eslint/no-use-before-define */
|
|
5
|
+
import * as jtv from '@mojotech/json-type-validation';
|
|
6
|
+
import * as damlTypes from '@daml/types';
|
|
7
|
+
/* eslint-disable-next-line @typescript-eslint/no-unused-vars */
|
|
8
|
+
import * as damlLedger from '@daml/ledger';
|
|
9
|
+
|
|
10
|
+
export declare type DayOfWeek =
|
|
11
|
+
| 'Monday'
|
|
12
|
+
| 'Tuesday'
|
|
13
|
+
| 'Wednesday'
|
|
14
|
+
| 'Thursday'
|
|
15
|
+
| 'Friday'
|
|
16
|
+
| 'Saturday'
|
|
17
|
+
| 'Sunday'
|
|
18
|
+
;
|
|
19
|
+
|
|
20
|
+
export declare const DayOfWeek:
|
|
21
|
+
damlTypes.Serializable<DayOfWeek> & {
|
|
22
|
+
}
|
|
23
|
+
& { readonly keys: DayOfWeek[] } & { readonly [e in DayOfWeek]: e }
|
|
24
|
+
;
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
export declare type Month =
|
|
28
|
+
| 'Jan'
|
|
29
|
+
| 'Feb'
|
|
30
|
+
| 'Mar'
|
|
31
|
+
| 'Apr'
|
|
32
|
+
| 'May'
|
|
33
|
+
| 'Jun'
|
|
34
|
+
| 'Jul'
|
|
35
|
+
| 'Aug'
|
|
36
|
+
| 'Sep'
|
|
37
|
+
| 'Oct'
|
|
38
|
+
| 'Nov'
|
|
39
|
+
| 'Dec'
|
|
40
|
+
;
|
|
41
|
+
|
|
42
|
+
export declare const Month:
|
|
43
|
+
damlTypes.Serializable<Month> & {
|
|
44
|
+
}
|
|
45
|
+
& { readonly keys: Month[] } & { readonly [e in Month]: e }
|
|
46
|
+
;
|
|
47
|
+
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/* eslint-disable-next-line no-unused-vars */
|
|
3
|
+
function __export(m) {
|
|
4
|
+
/* eslint-disable-next-line no-prototype-builtins */
|
|
5
|
+
for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];
|
|
6
|
+
}
|
|
7
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8
|
+
/* eslint-disable-next-line no-unused-vars */
|
|
9
|
+
var jtv = require('@mojotech/json-type-validation');
|
|
10
|
+
/* eslint-disable-next-line no-unused-vars */
|
|
11
|
+
var damlTypes = require('@daml/types');
|
|
12
|
+
/* eslint-disable-next-line no-unused-vars */
|
|
13
|
+
var damlLedger = require('@daml/ledger');
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
exports.DayOfWeek = {
|
|
17
|
+
Monday: 'Monday',
|
|
18
|
+
Tuesday: 'Tuesday',
|
|
19
|
+
Wednesday: 'Wednesday',
|
|
20
|
+
Thursday: 'Thursday',
|
|
21
|
+
Friday: 'Friday',
|
|
22
|
+
Saturday: 'Saturday',
|
|
23
|
+
Sunday: 'Sunday',
|
|
24
|
+
keys: ['Monday','Tuesday','Wednesday','Thursday','Friday','Saturday','Sunday',],
|
|
25
|
+
decoder: damlTypes.lazyMemo(function () { return jtv.oneOf(jtv.constant(exports.DayOfWeek.Monday), jtv.constant(exports.DayOfWeek.Tuesday), jtv.constant(exports.DayOfWeek.Wednesday), jtv.constant(exports.DayOfWeek.Thursday), jtv.constant(exports.DayOfWeek.Friday), jtv.constant(exports.DayOfWeek.Saturday), jtv.constant(exports.DayOfWeek.Sunday)); }),
|
|
26
|
+
encode: function (__typed__) { return __typed__; },
|
|
27
|
+
};
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
exports.Month = {
|
|
32
|
+
Jan: 'Jan',
|
|
33
|
+
Feb: 'Feb',
|
|
34
|
+
Mar: 'Mar',
|
|
35
|
+
Apr: 'Apr',
|
|
36
|
+
May: 'May',
|
|
37
|
+
Jun: 'Jun',
|
|
38
|
+
Jul: 'Jul',
|
|
39
|
+
Aug: 'Aug',
|
|
40
|
+
Sep: 'Sep',
|
|
41
|
+
Oct: 'Oct',
|
|
42
|
+
Nov: 'Nov',
|
|
43
|
+
Dec: 'Dec',
|
|
44
|
+
keys: ['Jan','Feb','Mar','Apr','May','Jun','Jul','Aug','Sep','Oct','Nov','Dec',],
|
|
45
|
+
decoder: damlTypes.lazyMemo(function () { return jtv.oneOf(jtv.constant(exports.Month.Jan), jtv.constant(exports.Month.Feb), jtv.constant(exports.Month.Mar), jtv.constant(exports.Month.Apr), jtv.constant(exports.Month.May), jtv.constant(exports.Month.Jun), jtv.constant(exports.Month.Jul), jtv.constant(exports.Month.Aug), jtv.constant(exports.Month.Sep), jtv.constant(exports.Month.Oct), jtv.constant(exports.Month.Nov), jtv.constant(exports.Month.Dec)); }),
|
|
46
|
+
encode: function (__typed__) { return __typed__; },
|
|
47
|
+
};
|
|
48
|
+
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/* eslint-disable-next-line no-unused-vars */
|
|
3
|
+
function __export(m) {
|
|
4
|
+
/* eslint-disable-next-line no-prototype-builtins */
|
|
5
|
+
for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];
|
|
6
|
+
}
|
|
7
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8
|
+
var Types = require('./Types');
|
|
9
|
+
exports.Types = Types;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './module';
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/* eslint-disable-next-line no-unused-vars */
|
|
3
|
+
function __export(m) {
|
|
4
|
+
/* eslint-disable-next-line no-prototype-builtins */
|
|
5
|
+
for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];
|
|
6
|
+
}
|
|
7
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8
|
+
__export(require('./module'));
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
// Generated from DA/Exception/ArithmeticError.daml
|
|
2
|
+
/* eslint-disable @typescript-eslint/camelcase */
|
|
3
|
+
/* eslint-disable @typescript-eslint/no-namespace */
|
|
4
|
+
/* eslint-disable @typescript-eslint/no-use-before-define */
|
|
5
|
+
import * as jtv from '@mojotech/json-type-validation';
|
|
6
|
+
import * as damlTypes from '@daml/types';
|
|
7
|
+
/* eslint-disable-next-line @typescript-eslint/no-unused-vars */
|
|
8
|
+
import * as damlLedger from '@daml/ledger';
|
|
9
|
+
|
|
10
|
+
export declare type ArithmeticError = {
|
|
11
|
+
message: string;
|
|
12
|
+
};
|
|
13
|
+
|
|
14
|
+
export declare const ArithmeticError:
|
|
15
|
+
damlTypes.Serializable<ArithmeticError> & {
|
|
16
|
+
}
|
|
17
|
+
;
|
|
18
|
+
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/* eslint-disable-next-line no-unused-vars */
|
|
3
|
+
function __export(m) {
|
|
4
|
+
/* eslint-disable-next-line no-prototype-builtins */
|
|
5
|
+
for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];
|
|
6
|
+
}
|
|
7
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8
|
+
/* eslint-disable-next-line no-unused-vars */
|
|
9
|
+
var jtv = require('@mojotech/json-type-validation');
|
|
10
|
+
/* eslint-disable-next-line no-unused-vars */
|
|
11
|
+
var damlTypes = require('@daml/types');
|
|
12
|
+
/* eslint-disable-next-line no-unused-vars */
|
|
13
|
+
var damlLedger = require('@daml/ledger');
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
exports.ArithmeticError = {
|
|
17
|
+
decoder: damlTypes.lazyMemo(function () { return jtv.object({message: damlTypes.Text.decoder, }); }),
|
|
18
|
+
encode: function (__typed__) {
|
|
19
|
+
return {
|
|
20
|
+
message: damlTypes.Text.encode(__typed__.message),
|
|
21
|
+
};
|
|
22
|
+
}
|
|
23
|
+
,
|
|
24
|
+
};
|
|
25
|
+
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './module';
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/* eslint-disable-next-line no-unused-vars */
|
|
3
|
+
function __export(m) {
|
|
4
|
+
/* eslint-disable-next-line no-prototype-builtins */
|
|
5
|
+
for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];
|
|
6
|
+
}
|
|
7
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8
|
+
__export(require('./module'));
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
// Generated from DA/Exception/AssertionFailed.daml
|
|
2
|
+
/* eslint-disable @typescript-eslint/camelcase */
|
|
3
|
+
/* eslint-disable @typescript-eslint/no-namespace */
|
|
4
|
+
/* eslint-disable @typescript-eslint/no-use-before-define */
|
|
5
|
+
import * as jtv from '@mojotech/json-type-validation';
|
|
6
|
+
import * as damlTypes from '@daml/types';
|
|
7
|
+
/* eslint-disable-next-line @typescript-eslint/no-unused-vars */
|
|
8
|
+
import * as damlLedger from '@daml/ledger';
|
|
9
|
+
|
|
10
|
+
export declare type AssertionFailed = {
|
|
11
|
+
message: string;
|
|
12
|
+
};
|
|
13
|
+
|
|
14
|
+
export declare const AssertionFailed:
|
|
15
|
+
damlTypes.Serializable<AssertionFailed> & {
|
|
16
|
+
}
|
|
17
|
+
;
|
|
18
|
+
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/* eslint-disable-next-line no-unused-vars */
|
|
3
|
+
function __export(m) {
|
|
4
|
+
/* eslint-disable-next-line no-prototype-builtins */
|
|
5
|
+
for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];
|
|
6
|
+
}
|
|
7
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8
|
+
/* eslint-disable-next-line no-unused-vars */
|
|
9
|
+
var jtv = require('@mojotech/json-type-validation');
|
|
10
|
+
/* eslint-disable-next-line no-unused-vars */
|
|
11
|
+
var damlTypes = require('@daml/types');
|
|
12
|
+
/* eslint-disable-next-line no-unused-vars */
|
|
13
|
+
var damlLedger = require('@daml/ledger');
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
exports.AssertionFailed = {
|
|
17
|
+
decoder: damlTypes.lazyMemo(function () { return jtv.object({message: damlTypes.Text.decoder, }); }),
|
|
18
|
+
encode: function (__typed__) {
|
|
19
|
+
return {
|
|
20
|
+
message: damlTypes.Text.encode(__typed__.message),
|
|
21
|
+
};
|
|
22
|
+
}
|
|
23
|
+
,
|
|
24
|
+
};
|
|
25
|
+
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './module';
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/* eslint-disable-next-line no-unused-vars */
|
|
3
|
+
function __export(m) {
|
|
4
|
+
/* eslint-disable-next-line no-prototype-builtins */
|
|
5
|
+
for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];
|
|
6
|
+
}
|
|
7
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8
|
+
__export(require('./module'));
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
// Generated from DA/Exception/GeneralError.daml
|
|
2
|
+
/* eslint-disable @typescript-eslint/camelcase */
|
|
3
|
+
/* eslint-disable @typescript-eslint/no-namespace */
|
|
4
|
+
/* eslint-disable @typescript-eslint/no-use-before-define */
|
|
5
|
+
import * as jtv from '@mojotech/json-type-validation';
|
|
6
|
+
import * as damlTypes from '@daml/types';
|
|
7
|
+
/* eslint-disable-next-line @typescript-eslint/no-unused-vars */
|
|
8
|
+
import * as damlLedger from '@daml/ledger';
|
|
9
|
+
|
|
10
|
+
export declare type GeneralError = {
|
|
11
|
+
message: string;
|
|
12
|
+
};
|
|
13
|
+
|
|
14
|
+
export declare const GeneralError:
|
|
15
|
+
damlTypes.Serializable<GeneralError> & {
|
|
16
|
+
}
|
|
17
|
+
;
|
|
18
|
+
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/* eslint-disable-next-line no-unused-vars */
|
|
3
|
+
function __export(m) {
|
|
4
|
+
/* eslint-disable-next-line no-prototype-builtins */
|
|
5
|
+
for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];
|
|
6
|
+
}
|
|
7
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8
|
+
/* eslint-disable-next-line no-unused-vars */
|
|
9
|
+
var jtv = require('@mojotech/json-type-validation');
|
|
10
|
+
/* eslint-disable-next-line no-unused-vars */
|
|
11
|
+
var damlTypes = require('@daml/types');
|
|
12
|
+
/* eslint-disable-next-line no-unused-vars */
|
|
13
|
+
var damlLedger = require('@daml/ledger');
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
exports.GeneralError = {
|
|
17
|
+
decoder: damlTypes.lazyMemo(function () { return jtv.object({message: damlTypes.Text.decoder, }); }),
|
|
18
|
+
encode: function (__typed__) {
|
|
19
|
+
return {
|
|
20
|
+
message: damlTypes.Text.encode(__typed__.message),
|
|
21
|
+
};
|
|
22
|
+
}
|
|
23
|
+
,
|
|
24
|
+
};
|
|
25
|
+
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './module';
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/* eslint-disable-next-line no-unused-vars */
|
|
3
|
+
function __export(m) {
|
|
4
|
+
/* eslint-disable-next-line no-prototype-builtins */
|
|
5
|
+
for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];
|
|
6
|
+
}
|
|
7
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8
|
+
__export(require('./module'));
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
// Generated from DA/Exception/PreconditionFailed.daml
|
|
2
|
+
/* eslint-disable @typescript-eslint/camelcase */
|
|
3
|
+
/* eslint-disable @typescript-eslint/no-namespace */
|
|
4
|
+
/* eslint-disable @typescript-eslint/no-use-before-define */
|
|
5
|
+
import * as jtv from '@mojotech/json-type-validation';
|
|
6
|
+
import * as damlTypes from '@daml/types';
|
|
7
|
+
/* eslint-disable-next-line @typescript-eslint/no-unused-vars */
|
|
8
|
+
import * as damlLedger from '@daml/ledger';
|
|
9
|
+
|
|
10
|
+
export declare type PreconditionFailed = {
|
|
11
|
+
message: string;
|
|
12
|
+
};
|
|
13
|
+
|
|
14
|
+
export declare const PreconditionFailed:
|
|
15
|
+
damlTypes.Serializable<PreconditionFailed> & {
|
|
16
|
+
}
|
|
17
|
+
;
|
|
18
|
+
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/* eslint-disable-next-line no-unused-vars */
|
|
3
|
+
function __export(m) {
|
|
4
|
+
/* eslint-disable-next-line no-prototype-builtins */
|
|
5
|
+
for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];
|
|
6
|
+
}
|
|
7
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8
|
+
/* eslint-disable-next-line no-unused-vars */
|
|
9
|
+
var jtv = require('@mojotech/json-type-validation');
|
|
10
|
+
/* eslint-disable-next-line no-unused-vars */
|
|
11
|
+
var damlTypes = require('@daml/types');
|
|
12
|
+
/* eslint-disable-next-line no-unused-vars */
|
|
13
|
+
var damlLedger = require('@daml/ledger');
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
exports.PreconditionFailed = {
|
|
17
|
+
decoder: damlTypes.lazyMemo(function () { return jtv.object({message: damlTypes.Text.decoder, }); }),
|
|
18
|
+
encode: function (__typed__) {
|
|
19
|
+
return {
|
|
20
|
+
message: damlTypes.Text.encode(__typed__.message),
|
|
21
|
+
};
|
|
22
|
+
}
|
|
23
|
+
,
|
|
24
|
+
};
|
|
25
|
+
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/* eslint-disable-next-line no-unused-vars */
|
|
3
|
+
function __export(m) {
|
|
4
|
+
/* eslint-disable-next-line no-prototype-builtins */
|
|
5
|
+
for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];
|
|
6
|
+
}
|
|
7
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8
|
+
var PreconditionFailed = require('./PreconditionFailed');
|
|
9
|
+
exports.PreconditionFailed = PreconditionFailed;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './module';
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/* eslint-disable-next-line no-unused-vars */
|
|
3
|
+
function __export(m) {
|
|
4
|
+
/* eslint-disable-next-line no-prototype-builtins */
|
|
5
|
+
for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];
|
|
6
|
+
}
|
|
7
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8
|
+
__export(require('./module'));
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
// Generated from DA/Internal/Down.daml
|
|
2
|
+
/* eslint-disable @typescript-eslint/camelcase */
|
|
3
|
+
/* eslint-disable @typescript-eslint/no-namespace */
|
|
4
|
+
/* eslint-disable @typescript-eslint/no-use-before-define */
|
|
5
|
+
import * as jtv from '@mojotech/json-type-validation';
|
|
6
|
+
import * as damlTypes from '@daml/types';
|
|
7
|
+
/* eslint-disable-next-line @typescript-eslint/no-unused-vars */
|
|
8
|
+
import * as damlLedger from '@daml/ledger';
|
|
9
|
+
|
|
10
|
+
export declare type Down<a> = {
|
|
11
|
+
unpack: a;
|
|
12
|
+
};
|
|
13
|
+
|
|
14
|
+
export declare const Down :
|
|
15
|
+
(<a>(a: damlTypes.Serializable<a>) => damlTypes.Serializable<Down<a>>) & {
|
|
16
|
+
};
|
|
17
|
+
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/* eslint-disable-next-line no-unused-vars */
|
|
3
|
+
function __export(m) {
|
|
4
|
+
/* eslint-disable-next-line no-prototype-builtins */
|
|
5
|
+
for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];
|
|
6
|
+
}
|
|
7
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8
|
+
/* eslint-disable-next-line no-unused-vars */
|
|
9
|
+
var jtv = require('@mojotech/json-type-validation');
|
|
10
|
+
/* eslint-disable-next-line no-unused-vars */
|
|
11
|
+
var damlTypes = require('@daml/types');
|
|
12
|
+
/* eslint-disable-next-line no-unused-vars */
|
|
13
|
+
var damlLedger = require('@daml/ledger');
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
exports.Down = function (a) { return ({
|
|
17
|
+
decoder: damlTypes.lazyMemo(function () { return jtv.object({unpack: a.decoder, }); }),
|
|
18
|
+
encode: function (__typed__) {
|
|
19
|
+
return {
|
|
20
|
+
unpack: a.encode(__typed__.unpack),
|
|
21
|
+
};
|
|
22
|
+
}
|
|
23
|
+
,
|
|
24
|
+
}); };
|
|
25
|
+
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './module';
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/* eslint-disable-next-line no-unused-vars */
|
|
3
|
+
function __export(m) {
|
|
4
|
+
/* eslint-disable-next-line no-prototype-builtins */
|
|
5
|
+
for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];
|
|
6
|
+
}
|
|
7
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8
|
+
__export(require('./module'));
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
// Generated from DA/Logic/Types.daml
|
|
2
|
+
/* eslint-disable @typescript-eslint/camelcase */
|
|
3
|
+
/* eslint-disable @typescript-eslint/no-namespace */
|
|
4
|
+
/* eslint-disable @typescript-eslint/no-use-before-define */
|
|
5
|
+
import * as jtv from '@mojotech/json-type-validation';
|
|
6
|
+
import * as damlTypes from '@daml/types';
|
|
7
|
+
/* eslint-disable-next-line @typescript-eslint/no-unused-vars */
|
|
8
|
+
import * as damlLedger from '@daml/ledger';
|
|
9
|
+
|
|
10
|
+
export declare type Formula<a> =
|
|
11
|
+
| { tag: 'Proposition'; value: a }
|
|
12
|
+
| { tag: 'Negation'; value: Formula<a> }
|
|
13
|
+
| { tag: 'Conjunction'; value: Formula<a>[] }
|
|
14
|
+
| { tag: 'Disjunction'; value: Formula<a>[] }
|
|
15
|
+
;
|
|
16
|
+
|
|
17
|
+
export declare const Formula :
|
|
18
|
+
(<a>(a: damlTypes.Serializable<a>) => damlTypes.Serializable<Formula<a>>) & {
|
|
19
|
+
};
|
|
20
|
+
|