@meshsdk/contract 1.6.0-alpha.20 → 1.6.1
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/dist/index.cjs +37 -0
- package/dist/index.d.cts +739 -0
- package/dist/index.d.ts +739 -0
- package/dist/index.js +37 -0
- package/package.json +23 -7
- package/src/common.ts +0 -186
- package/src/coupon-bond-guaranteed/aiken-workspace/readme.md +0 -0
- package/src/coupon-bond-guaranteed/offchain.ts +0 -3
- package/src/coupon-bond-guaranteed/readme.md +0 -3
- package/src/escrow/aiken-workspace/aiken.lock +0 -26
- package/src/escrow/aiken-workspace/aiken.toml +0 -19
- package/src/escrow/aiken-workspace/lib/escrow/types.ak +0 -21
- package/src/escrow/aiken-workspace/lib/escrow/validators/escrow.ak +0 -122
- package/src/escrow/aiken-workspace/plutus.json +0 -238
- package/src/escrow/aiken-workspace/readme.md +0 -55
- package/src/escrow/aiken-workspace/validators/escrow.ak +0 -9
- package/src/escrow/aiken-workspace/validators/tests/escrow.ak +0 -462
- package/src/escrow/index.ts +0 -1
- package/src/escrow/offchain.ts +0 -254
- package/src/escrow/readme.md +0 -38
- package/src/giftcard/aiken-workspace/aiken.lock +0 -26
- package/src/giftcard/aiken-workspace/aiken.toml +0 -19
- package/src/giftcard/aiken-workspace/plutus.json +0 -138
- package/src/giftcard/aiken-workspace/readme.md +0 -55
- package/src/giftcard/aiken-workspace/validators/oneshot.ak +0 -173
- package/src/giftcard/index.ts +0 -1
- package/src/giftcard/offchain.ts +0 -184
- package/src/giftcard/readme.md +0 -36
- package/src/hello-world/aiken-workspace/README.md +0 -19
- package/src/hello-world/aiken-workspace/aiken.lock +0 -15
- package/src/hello-world/aiken-workspace/aiken.toml +0 -14
- package/src/hello-world/aiken-workspace/contract.md +0 -27
- package/src/hello-world/aiken-workspace/plutus.json +0 -69
- package/src/hello-world/aiken-workspace/validators/hello_world.ak +0 -24
- package/src/hello-world/index.ts +0 -1
- package/src/hello-world/offchain.ts +0 -24
- package/src/hello-world/readme.md +0 -1
- package/src/index.ts +0 -6
- package/src/marketplace/aiken-workspace/aiken.lock +0 -26
- package/src/marketplace/aiken-workspace/aiken.toml +0 -19
- package/src/marketplace/aiken-workspace/lib/marketplace/types.ak +0 -15
- package/src/marketplace/aiken-workspace/lib/marketplace/validators/marketplace.ak +0 -52
- package/src/marketplace/aiken-workspace/plutus.json +0 -204
- package/src/marketplace/aiken-workspace/readme.md +0 -55
- package/src/marketplace/aiken-workspace/validators/marketplace.ak +0 -14
- package/src/marketplace/aiken-workspace/validators/tests/marketplace.ak +0 -218
- package/src/marketplace/index.ts +0 -1
- package/src/marketplace/offchain.ts +0 -248
- package/src/marketplace/readme.md +0 -45
- package/src/payment-splitter/aiken-workspace/aiken.lock +0 -15
- package/src/payment-splitter/aiken-workspace/aiken.toml +0 -14
- package/src/payment-splitter/aiken-workspace/plutus.json +0 -83
- package/src/payment-splitter/aiken-workspace/validators/payment-splitter.ak +0 -329
- package/src/payment-splitter/index.ts +0 -1
- package/src/payment-splitter/offchain.ts +0 -143
- package/src/payment-splitter/readme.md +0 -100
- package/src/swap/aiken-workspace/aiken.lock +0 -26
- package/src/swap/aiken-workspace/aiken.toml +0 -19
- package/src/swap/aiken-workspace/plutus.json +0 -208
- package/src/swap/aiken-workspace/readme.md +0 -55
- package/src/swap/aiken-workspace/validators/swap.ak +0 -188
- package/src/swap/index.ts +0 -1
- package/src/swap/offchain.ts +0 -139
- package/src/swap/readme.md +0 -35
- package/src/vesting/aiken-workspace/README.md +0 -24
- package/src/vesting/aiken-workspace/aiken.lock +0 -26
- package/src/vesting/aiken-workspace/aiken.toml +0 -19
- package/src/vesting/aiken-workspace/lib/vesting/types.ak +0 -8
- package/src/vesting/aiken-workspace/lib/vesting/validators/vesting.ak +0 -19
- package/src/vesting/aiken-workspace/plutus.json +0 -67
- package/src/vesting/aiken-workspace/validators/tests/vesting.ak +0 -108
- package/src/vesting/aiken-workspace/validators/vesting.ak +0 -9
- package/src/vesting/index.ts +0 -1
- package/src/vesting/offchain.ts +0 -117
- package/src/vesting/readme.md +0 -36
- package/tsconfig.json +0 -5
|
@@ -1,238 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"preamble": {
|
|
3
|
-
"title": "meshjs/escrow",
|
|
4
|
-
"description": "Aiken contracts for project 'meshjs/escrow'",
|
|
5
|
-
"version": "0.0.0",
|
|
6
|
-
"plutusVersion": "v2",
|
|
7
|
-
"compiler": {
|
|
8
|
-
"name": "Aiken",
|
|
9
|
-
"version": "v1.0.29-alpha+unknown"
|
|
10
|
-
},
|
|
11
|
-
"license": "Apache-2.0"
|
|
12
|
-
},
|
|
13
|
-
"validators": [
|
|
14
|
-
{
|
|
15
|
-
"title": "escrow.escrow",
|
|
16
|
-
"datum": {
|
|
17
|
-
"title": "datum",
|
|
18
|
-
"schema": {
|
|
19
|
-
"$ref": "#/definitions/escrow~1types~1EscrowDatum"
|
|
20
|
-
}
|
|
21
|
-
},
|
|
22
|
-
"redeemer": {
|
|
23
|
-
"title": "redeemer",
|
|
24
|
-
"schema": {
|
|
25
|
-
"$ref": "#/definitions/escrow~1types~1EscrowRedeemer"
|
|
26
|
-
}
|
|
27
|
-
},
|
|
28
|
-
"compiledCode": "590c2f01000032323232323232232323232323232232322533300d323232323232323232323232323232533301c3019301d37540022646464646464a666044604060466ea80044c8c94ccc090c0880044c8c8c8c8c8c8c94ccc0b8c0c400c4c94ccc0bcc0c800c4c94ccc0b4c08cc0b8dd5000899192999817981298181baa0011325333030302e30313754006264646464a66606e6074004264646464a66607066ebc024cdd2a40046607800e660786e98014cc0f004ccc0f0dd300925eb804004528198111bab302830393754018660426eacc0a0c0e4dd51814181c9baa00d3020011302f0073302f00223233031375660720044646eb4c0ec008dd7181c8009bae3037001302f00316375660700026070004606c00260646ea800c58c0d0c0c4dd50008b180d98181baa0033032302f37540022c6032605c6ea8c074c0b8dd50010b18180010b18178011bac302e302f0023758605a002660566e9ccc058028014cc0acdd39980a804002a5eb80dd598159816001181500098131baa01b153330243021001132323232533302b302e0031533302b0021325333029301f302a375400226464a666056605260586ea80084c94ccc0b0c0a8c0b4dd50008998098061bae3031302e37540022c60266060605a6ea80084c8c8c8c8c8c8c8c94ccc0ccc0c4c0d0dd500089919299981a9819981b1baa0011533303532330010013303a375200666074607660706ea80092f5c044a66607400229404c94ccc0e0cc07c060dd7181e8010a51133003003001303d00115333035005100414a0294058c070014dd7181c181a9baa00116301a0063301c33017012002301a3756606c606e006660366602c02200860326eacc0d400cc0d0004c0d0004c0cc008c0c4004c0b4dd50011811800981718159baa001163015302a3754603260546ea80045858c0b0008dd6181598160011bac302a00133028374e6602600e004660506e9ccc0480140092f5c0264646464a666056605c0062a666056004264a666052603e60546ea80044c94ccc0a8c09cc0acdd500089919191919191919299981a981c001099191919191919299981c981b981d1baa00113232533303b3039303c37540022a6660766466002002660806ea400ccc100c104c0f8dd500125eb80894ccc100004528899299981f1981280f1bae304300213300300300114a060860022a66607600a200829405280b18110059bae303e303b37540022c604001a660446603a0300106040014660426603802e016603e00a6605e008464660626eacc0e40088c8dd6981d8011bae3039001375c606e002605e00a6605a00c4646605e6eacc0dc0088c8dd6981c8011bae3037001375c606a002605a00e2c6eacc0d8004c0d8008c0d0004c0d0008dd598190009819001181800098161baa00116302e302b37540022c602a60546ea8c064c0a8dd50008b0b18160011bac302b302c00237586054002660506e9ccc04c01c008cc0a0dd39980900280125eb80c090dd500d180918121baa301330243754604e60486ea800458c8c8cc004004018894ccc09c004530103d87a80001323253330263375e602c60506ea80080144c048cc0a80092f5c026600800800260560046052002604c60466ea8018dd618129813181318131813181318130011bac30240013024302400237586044002603c6ea8c030c078dd50080a50300c301d375401e44646600200200644a666042002297adef6c601332253330203375e602060446ea80080144cc028004dd5980898111baa0021001302300133002002302400122323300100100322533302000114a0264a66603c66e3cdd718118010020a511330030030013023001232533301a3018301b37540022600c6603c603e60386ea80052f5c02980103d87a80003009301b37540024646600200200444a66603a002297adef6c6013322323233330110030020012226323200232323300100100322533302400114984c94ccc09400454ccc088c010dd6981218138010a4c2c264646464a66604c66e40dd718138021bae30270031533302630080011330070073302a0030021616375a604e00660540066050004604e004604e002466603e603a002941289bab301f003375c603a004603e0026600400460400024464666002002006004444a66603c00420022646660080086044006666601e0046eb8c074004dd5980f00091119299981029998118008a5114a02980103d87a80001300c33024374c00297ae0323330010010030022225333025002100113233300400430290033322323300100100522533302a00113302b337606ea4010dd4001a5eb7bdb1804c8c8c8c94ccc0accdc800400109981799bb037520106ea001c01454ccc0accdc78040010992999816181518169baa001133030337606ea4024c0c4c0b8dd5000802080219299981618150008a60103d87a80001301833030375000297ae03370000e00226605e66ec0dd48011ba800133006006003375a60580066eb8c0a8008c0b8008c0b0004dd718120009bad302500130270023020002223233001001323300100100322533301d00114bd7009919991119198008008019129998118008801899198129ba733025375200c6604a60440026604a604600297ae03300300330270023025001375c60380026eacc074004cc00c00cc084008c07c004894ccc070004528899299980d1919b89375a6010002664464a66603c6036603e6ea8004520001375a604660406ea8004c94ccc078c06cc07cdd50008a6103d87a8000132330010013756604860426ea8008894ccc08c004530103d87a80001323232325333024337220100042a66604866e3c0200084c040cc0a0dd4000a5eb80530103d87a8000133006006003375a604a0066eb8c08c008c09c008c094004c8cc004004024894ccc0880045300103d87a80001323232325333023337220100042a66604666e3c0200084c03ccc09cdd3000a5eb80530103d87a8000133006006003375660480066eb8c088008c098008c090004dd718058009bae300c0013758603e0042660060060022940c07c004dd2a40004603260346034002446600c004466ebcc014c05cdd50008011119802801119baf300430163754600a602c6ea80040088c0580048c054c05800488c8cc00400400c894ccc05400452f5c026464a666028600a004266030004660080080022660080080026032004602e0024444646600200200a44a66602c00226602e66ec0dd48029ba60044bd6f7b630099191919299980b99b9000900213301b337606ea4024dd30040028a99980b99b8f009002132533301830163019375400226603866ec0dd4805180e980d1baa001004100433300700900800113301b337606ea4008dd3000998030030019bab3018003375c602c0046034004603000229309b2b19299980618050008991919192999809980b0010991924c660160044646601a6eacc0540088c8dd6980b8011bae3015001375c602600260160062c6eacc050004c050008c048004c038dd50018a99980618048008a99980798071baa00314985854ccc030c00800454ccc03cc038dd50018a4c2c2c60186ea8008dc3a4008600200e464a666012600e002264646464a6660206026004264649319804001119198051bab3012002232375a60280046eb8c048004dd7180800098040018b1bab30110013011002300f001300b37540042a666012600c00226464646464646464a666028602e0042646464649319807002119198081bab3018002232375a60340046eb8c060004dd7180b000980700299806003119198071bab3016002232375a60300046eb8c058004dd7180a00098060038b1bab3015001301500230130013013002375660220026022004601e00260166ea800858c024dd50009119198008008019129998068008a4c2646600600660220046006601e0024a66600c6008600e6ea80044c8c8c8c94ccc034c0400084c8c92632533300c300a0011323253330113014002132498c94ccc03cc0340044c8c94ccc050c05c0084c926300d001163015001301137540042a66601e60180022646464646464a66603060360042930b1bad30190013019002375a602e002602e0046eb4c054004c044dd50010b18079baa001163012001300e37540062a66601860120022a66601e601c6ea800c5261616300c3754004600c0062c601c002601c004601800260106ea8004588c94ccc018c0100044c8c94ccc02cc03800852616375c601800260106ea800854ccc018c00c0044c8c94ccc02cc03800852616375c601800260106ea800858c018dd50009b8748008dc3a4000ae6955ceaab9e5573eae815d0aba201",
|
|
29
|
-
"hash": "bb0ead2a88fda451e0e5e01ff096309c06c1a6eb2206209d20243aaa"
|
|
30
|
-
}
|
|
31
|
-
],
|
|
32
|
-
"definitions": {
|
|
33
|
-
"ByteArray": {
|
|
34
|
-
"dataType": "bytes"
|
|
35
|
-
},
|
|
36
|
-
"Int": {
|
|
37
|
-
"dataType": "integer"
|
|
38
|
-
},
|
|
39
|
-
"List$Pair$ByteArray_Int": {
|
|
40
|
-
"dataType": "map",
|
|
41
|
-
"keys": {
|
|
42
|
-
"$ref": "#/definitions/ByteArray"
|
|
43
|
-
},
|
|
44
|
-
"values": {
|
|
45
|
-
"$ref": "#/definitions/Int"
|
|
46
|
-
}
|
|
47
|
-
},
|
|
48
|
-
"List$Pair$ByteArray_List$Pair$ByteArray_Int": {
|
|
49
|
-
"dataType": "map",
|
|
50
|
-
"keys": {
|
|
51
|
-
"$ref": "#/definitions/ByteArray"
|
|
52
|
-
},
|
|
53
|
-
"values": {
|
|
54
|
-
"$ref": "#/definitions/List$Pair$ByteArray_Int"
|
|
55
|
-
}
|
|
56
|
-
},
|
|
57
|
-
"Option$aiken/transaction/credential/Referenced$aiken/transaction/credential/Credential": {
|
|
58
|
-
"title": "Optional",
|
|
59
|
-
"anyOf": [
|
|
60
|
-
{
|
|
61
|
-
"title": "Some",
|
|
62
|
-
"description": "An optional value.",
|
|
63
|
-
"dataType": "constructor",
|
|
64
|
-
"index": 0,
|
|
65
|
-
"fields": [
|
|
66
|
-
{
|
|
67
|
-
"$ref": "#/definitions/aiken~1transaction~1credential~1Referenced$aiken~1transaction~1credential~1Credential"
|
|
68
|
-
}
|
|
69
|
-
]
|
|
70
|
-
},
|
|
71
|
-
{
|
|
72
|
-
"title": "None",
|
|
73
|
-
"description": "Nothing.",
|
|
74
|
-
"dataType": "constructor",
|
|
75
|
-
"index": 1,
|
|
76
|
-
"fields": []
|
|
77
|
-
}
|
|
78
|
-
]
|
|
79
|
-
},
|
|
80
|
-
"aiken/transaction/credential/Address": {
|
|
81
|
-
"title": "Address",
|
|
82
|
-
"description": "A Cardano `Address` typically holding one or two credential references.\n\n Note that legacy bootstrap addresses (a.k.a. 'Byron addresses') are\n completely excluded from Plutus contexts. Thus, from an on-chain\n perspective only exists addresses of type 00, 01, ..., 07 as detailed\n in [CIP-0019 :: Shelley Addresses](https://github.com/cardano-foundation/CIPs/tree/master/CIP-0019/#shelley-addresses).",
|
|
83
|
-
"anyOf": [
|
|
84
|
-
{
|
|
85
|
-
"title": "Address",
|
|
86
|
-
"dataType": "constructor",
|
|
87
|
-
"index": 0,
|
|
88
|
-
"fields": [
|
|
89
|
-
{
|
|
90
|
-
"title": "payment_credential",
|
|
91
|
-
"$ref": "#/definitions/aiken~1transaction~1credential~1Credential"
|
|
92
|
-
},
|
|
93
|
-
{
|
|
94
|
-
"title": "stake_credential",
|
|
95
|
-
"$ref": "#/definitions/Option$aiken~1transaction~1credential~1Referenced$aiken~1transaction~1credential~1Credential"
|
|
96
|
-
}
|
|
97
|
-
]
|
|
98
|
-
}
|
|
99
|
-
]
|
|
100
|
-
},
|
|
101
|
-
"aiken/transaction/credential/Credential": {
|
|
102
|
-
"title": "Credential",
|
|
103
|
-
"description": "A general structure for representing an on-chain `Credential`.\n\n Credentials are always one of two kinds: a direct public/private key\n pair, or a script (native or Plutus).",
|
|
104
|
-
"anyOf": [
|
|
105
|
-
{
|
|
106
|
-
"title": "VerificationKeyCredential",
|
|
107
|
-
"dataType": "constructor",
|
|
108
|
-
"index": 0,
|
|
109
|
-
"fields": [
|
|
110
|
-
{
|
|
111
|
-
"$ref": "#/definitions/ByteArray"
|
|
112
|
-
}
|
|
113
|
-
]
|
|
114
|
-
},
|
|
115
|
-
{
|
|
116
|
-
"title": "ScriptCredential",
|
|
117
|
-
"dataType": "constructor",
|
|
118
|
-
"index": 1,
|
|
119
|
-
"fields": [
|
|
120
|
-
{
|
|
121
|
-
"$ref": "#/definitions/ByteArray"
|
|
122
|
-
}
|
|
123
|
-
]
|
|
124
|
-
}
|
|
125
|
-
]
|
|
126
|
-
},
|
|
127
|
-
"aiken/transaction/credential/Referenced$aiken/transaction/credential/Credential": {
|
|
128
|
-
"title": "Referenced",
|
|
129
|
-
"description": "Represent a type of object that can be represented either inline (by hash)\n or via a reference (i.e. a pointer to an on-chain location).\n\n This is mainly use for capturing pointers to a stake credential\n registration certificate in the case of so-called pointer addresses.",
|
|
130
|
-
"anyOf": [
|
|
131
|
-
{
|
|
132
|
-
"title": "Inline",
|
|
133
|
-
"dataType": "constructor",
|
|
134
|
-
"index": 0,
|
|
135
|
-
"fields": [
|
|
136
|
-
{
|
|
137
|
-
"$ref": "#/definitions/aiken~1transaction~1credential~1Credential"
|
|
138
|
-
}
|
|
139
|
-
]
|
|
140
|
-
},
|
|
141
|
-
{
|
|
142
|
-
"title": "Pointer",
|
|
143
|
-
"dataType": "constructor",
|
|
144
|
-
"index": 1,
|
|
145
|
-
"fields": [
|
|
146
|
-
{
|
|
147
|
-
"title": "slot_number",
|
|
148
|
-
"$ref": "#/definitions/Int"
|
|
149
|
-
},
|
|
150
|
-
{
|
|
151
|
-
"title": "transaction_index",
|
|
152
|
-
"$ref": "#/definitions/Int"
|
|
153
|
-
},
|
|
154
|
-
{
|
|
155
|
-
"title": "certificate_index",
|
|
156
|
-
"$ref": "#/definitions/Int"
|
|
157
|
-
}
|
|
158
|
-
]
|
|
159
|
-
}
|
|
160
|
-
]
|
|
161
|
-
},
|
|
162
|
-
"escrow/types/EscrowDatum": {
|
|
163
|
-
"title": "EscrowDatum",
|
|
164
|
-
"anyOf": [
|
|
165
|
-
{
|
|
166
|
-
"title": "Initiation",
|
|
167
|
-
"dataType": "constructor",
|
|
168
|
-
"index": 0,
|
|
169
|
-
"fields": [
|
|
170
|
-
{
|
|
171
|
-
"title": "initiator",
|
|
172
|
-
"$ref": "#/definitions/aiken~1transaction~1credential~1Address"
|
|
173
|
-
},
|
|
174
|
-
{
|
|
175
|
-
"title": "initiator_assets",
|
|
176
|
-
"$ref": "#/definitions/List$Pair$ByteArray_List$Pair$ByteArray_Int"
|
|
177
|
-
}
|
|
178
|
-
]
|
|
179
|
-
},
|
|
180
|
-
{
|
|
181
|
-
"title": "ActiveEscrow",
|
|
182
|
-
"dataType": "constructor",
|
|
183
|
-
"index": 1,
|
|
184
|
-
"fields": [
|
|
185
|
-
{
|
|
186
|
-
"title": "initiator",
|
|
187
|
-
"$ref": "#/definitions/aiken~1transaction~1credential~1Address"
|
|
188
|
-
},
|
|
189
|
-
{
|
|
190
|
-
"title": "initiator_assets",
|
|
191
|
-
"$ref": "#/definitions/List$Pair$ByteArray_List$Pair$ByteArray_Int"
|
|
192
|
-
},
|
|
193
|
-
{
|
|
194
|
-
"title": "recipient",
|
|
195
|
-
"$ref": "#/definitions/aiken~1transaction~1credential~1Address"
|
|
196
|
-
},
|
|
197
|
-
{
|
|
198
|
-
"title": "recipient_assets",
|
|
199
|
-
"$ref": "#/definitions/List$Pair$ByteArray_List$Pair$ByteArray_Int"
|
|
200
|
-
}
|
|
201
|
-
]
|
|
202
|
-
}
|
|
203
|
-
]
|
|
204
|
-
},
|
|
205
|
-
"escrow/types/EscrowRedeemer": {
|
|
206
|
-
"title": "EscrowRedeemer",
|
|
207
|
-
"anyOf": [
|
|
208
|
-
{
|
|
209
|
-
"title": "RecipientDeposit",
|
|
210
|
-
"dataType": "constructor",
|
|
211
|
-
"index": 0,
|
|
212
|
-
"fields": [
|
|
213
|
-
{
|
|
214
|
-
"title": "recipient",
|
|
215
|
-
"$ref": "#/definitions/aiken~1transaction~1credential~1Address"
|
|
216
|
-
},
|
|
217
|
-
{
|
|
218
|
-
"title": "recipient_assets",
|
|
219
|
-
"$ref": "#/definitions/List$Pair$ByteArray_List$Pair$ByteArray_Int"
|
|
220
|
-
}
|
|
221
|
-
]
|
|
222
|
-
},
|
|
223
|
-
{
|
|
224
|
-
"title": "CancelTrade",
|
|
225
|
-
"dataType": "constructor",
|
|
226
|
-
"index": 1,
|
|
227
|
-
"fields": []
|
|
228
|
-
},
|
|
229
|
-
{
|
|
230
|
-
"title": "CompleteTrade",
|
|
231
|
-
"dataType": "constructor",
|
|
232
|
-
"index": 2,
|
|
233
|
-
"fields": []
|
|
234
|
-
}
|
|
235
|
-
]
|
|
236
|
-
}
|
|
237
|
-
}
|
|
238
|
-
}
|
|
@@ -1,55 +0,0 @@
|
|
|
1
|
-
# escrow
|
|
2
|
-
|
|
3
|
-
Write validators in the `validators` folder, and supporting functions in the `lib` folder using `.ak` as a file extension.
|
|
4
|
-
|
|
5
|
-
For example, as `validators/always_true.ak`
|
|
6
|
-
|
|
7
|
-
```gleam
|
|
8
|
-
validator {
|
|
9
|
-
fn spend(_datum: Data, _redeemer: Data, _context: Data) -> Bool {
|
|
10
|
-
True
|
|
11
|
-
}
|
|
12
|
-
}
|
|
13
|
-
```
|
|
14
|
-
|
|
15
|
-
## Building
|
|
16
|
-
|
|
17
|
-
```sh
|
|
18
|
-
aiken build
|
|
19
|
-
```
|
|
20
|
-
|
|
21
|
-
## Testing
|
|
22
|
-
|
|
23
|
-
You can write tests in any module using the `test` keyword. For example:
|
|
24
|
-
|
|
25
|
-
```gleam
|
|
26
|
-
test foo() {
|
|
27
|
-
1 + 1 == 2
|
|
28
|
-
}
|
|
29
|
-
```
|
|
30
|
-
|
|
31
|
-
To run all tests, simply do:
|
|
32
|
-
|
|
33
|
-
```sh
|
|
34
|
-
aiken check
|
|
35
|
-
```
|
|
36
|
-
|
|
37
|
-
To run only tests matching the string `foo`, do:
|
|
38
|
-
|
|
39
|
-
```sh
|
|
40
|
-
aiken check -m foo
|
|
41
|
-
```
|
|
42
|
-
|
|
43
|
-
## Documentation
|
|
44
|
-
|
|
45
|
-
If you're writing a library, you might want to generate an HTML documentation for it.
|
|
46
|
-
|
|
47
|
-
Use:
|
|
48
|
-
|
|
49
|
-
```sh
|
|
50
|
-
aiken docs
|
|
51
|
-
```
|
|
52
|
-
|
|
53
|
-
## Resources
|
|
54
|
-
|
|
55
|
-
Find more on the [Aiken's user manual](https://aiken-lang.org).
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
use aiken/transaction.{ScriptContext}
|
|
2
|
-
use escrow/types.{EscrowDatum, EscrowRedeemer}
|
|
3
|
-
use escrow/validators/escrow.{escrow_logic}
|
|
4
|
-
|
|
5
|
-
validator {
|
|
6
|
-
fn escrow(datum: EscrowDatum, redeemer: EscrowRedeemer, ctx: ScriptContext) {
|
|
7
|
-
escrow_logic(datum, redeemer, ctx)
|
|
8
|
-
}
|
|
9
|
-
}
|