@easy1staking/cip113-sdk-ts 0.1.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.
- package/README.md +49 -0
- package/blueprints/standard/v0.3.0/plutus.json +596 -0
- package/blueprints/substandards/dummy/v0.1.0/plutus.json +58 -0
- package/blueprints/substandards/freeze-and-seize/v0.1.0/plutus.json +380 -0
- package/dist/core/evo-utils.d.ts +160 -0
- package/dist/core/evo-utils.d.ts.map +1 -0
- package/dist/core/evo-utils.js +401 -0
- package/dist/core/evo-utils.js.map +1 -0
- package/dist/core/registry.d.ts +31 -0
- package/dist/core/registry.d.ts.map +1 -0
- package/dist/core/registry.js +72 -0
- package/dist/core/registry.js.map +1 -0
- package/dist/index.d.ts +89 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +158 -0
- package/dist/index.js.map +1 -0
- package/dist/provider/address-utils.d.ts +15 -0
- package/dist/provider/address-utils.d.ts.map +1 -0
- package/dist/provider/address-utils.js +29 -0
- package/dist/provider/address-utils.js.map +1 -0
- package/dist/provider/tx-utils.d.ts +15 -0
- package/dist/provider/tx-utils.d.ts.map +1 -0
- package/dist/provider/tx-utils.js +18 -0
- package/dist/provider/tx-utils.js.map +1 -0
- package/dist/standard/blueprint.d.ts +31 -0
- package/dist/standard/blueprint.d.ts.map +1 -0
- package/dist/standard/blueprint.js +49 -0
- package/dist/standard/blueprint.js.map +1 -0
- package/dist/standard/params.d.ts +6 -0
- package/dist/standard/params.d.ts.map +1 -0
- package/dist/standard/params.js +5 -0
- package/dist/standard/params.js.map +1 -0
- package/dist/standard/scripts.d.ts +51 -0
- package/dist/standard/scripts.d.ts.map +1 -0
- package/dist/standard/scripts.js +110 -0
- package/dist/standard/scripts.js.map +1 -0
- package/dist/substandards/dummy/index.d.ts +16 -0
- package/dist/substandards/dummy/index.d.ts.map +1 -0
- package/dist/substandards/dummy/index.js +158 -0
- package/dist/substandards/dummy/index.js.map +1 -0
- package/dist/substandards/freeze-and-seize/index.d.ts +17 -0
- package/dist/substandards/freeze-and-seize/index.d.ts.map +1 -0
- package/dist/substandards/freeze-and-seize/index.js +769 -0
- package/dist/substandards/freeze-and-seize/index.js.map +1 -0
- package/dist/substandards/freeze-and-seize/scripts.d.ts +25 -0
- package/dist/substandards/freeze-and-seize/scripts.d.ts.map +1 -0
- package/dist/substandards/freeze-and-seize/scripts.js +54 -0
- package/dist/substandards/freeze-and-seize/scripts.js.map +1 -0
- package/dist/substandards/freeze-and-seize/types.d.ts +18 -0
- package/dist/substandards/freeze-and-seize/types.d.ts.map +1 -0
- package/dist/substandards/freeze-and-seize/types.js +8 -0
- package/dist/substandards/freeze-and-seize/types.js.map +1 -0
- package/dist/substandards/interface.d.ts +166 -0
- package/dist/substandards/interface.d.ts.map +1 -0
- package/dist/substandards/interface.js +10 -0
- package/dist/substandards/interface.js.map +1 -0
- package/dist/types.d.ts +93 -0
- package/dist/types.d.ts.map +1 -0
- package/dist/types.js +8 -0
- package/dist/types.js.map +1 -0
- package/package.json +53 -0
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
{
|
|
2
|
+
"preamble": {
|
|
3
|
+
"title": "wsc-poc/aiken-policy",
|
|
4
|
+
"description": "Aiken contracts for project 'wsc-poc/aiken-policy'",
|
|
5
|
+
"version": "0.0.0",
|
|
6
|
+
"plutusVersion": "v3",
|
|
7
|
+
"compiler": {
|
|
8
|
+
"name": "Aiken",
|
|
9
|
+
"version": "v1.1.19+e525483"
|
|
10
|
+
},
|
|
11
|
+
"license": "Apache-2.0"
|
|
12
|
+
},
|
|
13
|
+
"validators": [
|
|
14
|
+
{
|
|
15
|
+
"title": "transfer.issue.withdraw",
|
|
16
|
+
"redeemer": {
|
|
17
|
+
"title": "redeemer",
|
|
18
|
+
"schema": {
|
|
19
|
+
"$ref": "#/definitions/Int"
|
|
20
|
+
}
|
|
21
|
+
},
|
|
22
|
+
"compiledCode": "585701010029800aba2aba1aab9eaab9dab9a4888896600264646644b30013370e900218031baa00289919b87375a6012008906400980418039baa0028a504014600c600e002600c004600c00260066ea801a29344d9590011",
|
|
23
|
+
"hash": "a82718805c3541469346431c0cc023a76afce8d6d2c1c64d00bf1950"
|
|
24
|
+
},
|
|
25
|
+
{
|
|
26
|
+
"title": "transfer.issue.else",
|
|
27
|
+
"redeemer": {
|
|
28
|
+
"schema": {}
|
|
29
|
+
},
|
|
30
|
+
"compiledCode": "585701010029800aba2aba1aab9eaab9dab9a4888896600264646644b30013370e900218031baa00289919b87375a6012008906400980418039baa0028a504014600c600e002600c004600c00260066ea801a29344d9590011",
|
|
31
|
+
"hash": "a82718805c3541469346431c0cc023a76afce8d6d2c1c64d00bf1950"
|
|
32
|
+
},
|
|
33
|
+
{
|
|
34
|
+
"title": "transfer.transfer.withdraw",
|
|
35
|
+
"redeemer": {
|
|
36
|
+
"title": "redeemer",
|
|
37
|
+
"schema": {
|
|
38
|
+
"$ref": "#/definitions/Int"
|
|
39
|
+
}
|
|
40
|
+
},
|
|
41
|
+
"compiledCode": "585701010029800aba2aba1aab9eaab9dab9a4888896600264646644b30013370e900218031baa00289919b87375a6012008904801980418039baa0028a504014600c600e002600c004600c00260066ea801a29344d9590011",
|
|
42
|
+
"hash": "93fd90884c772ced27987503f9d37c857372b99cf5cc716197ebb8bd"
|
|
43
|
+
},
|
|
44
|
+
{
|
|
45
|
+
"title": "transfer.transfer.else",
|
|
46
|
+
"redeemer": {
|
|
47
|
+
"schema": {}
|
|
48
|
+
},
|
|
49
|
+
"compiledCode": "585701010029800aba2aba1aab9eaab9dab9a4888896600264646644b30013370e900218031baa00289919b87375a6012008904801980418039baa0028a504014600c600e002600c004600c00260066ea801a29344d9590011",
|
|
50
|
+
"hash": "93fd90884c772ced27987503f9d37c857372b99cf5cc716197ebb8bd"
|
|
51
|
+
}
|
|
52
|
+
],
|
|
53
|
+
"definitions": {
|
|
54
|
+
"Int": {
|
|
55
|
+
"dataType": "integer"
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
}
|
|
@@ -0,0 +1,380 @@
|
|
|
1
|
+
{
|
|
2
|
+
"preamble": {
|
|
3
|
+
"title": "cip113/freeze-unfreeze",
|
|
4
|
+
"description": "CIP113 Sub Standard for freeze/unfreeze capabilities",
|
|
5
|
+
"version": "0.0.0",
|
|
6
|
+
"plutusVersion": "v3",
|
|
7
|
+
"compiler": {
|
|
8
|
+
"name": "Aiken",
|
|
9
|
+
"version": "v1.1.21+42babe5"
|
|
10
|
+
},
|
|
11
|
+
"license": "Apache-2.0"
|
|
12
|
+
},
|
|
13
|
+
"validators": [
|
|
14
|
+
{
|
|
15
|
+
"title": "blacklist_mint.blacklist_mint.mint",
|
|
16
|
+
"redeemer": {
|
|
17
|
+
"title": "redeemer",
|
|
18
|
+
"schema": {
|
|
19
|
+
"$ref": "#/definitions/types~1BlacklistRedeemer"
|
|
20
|
+
}
|
|
21
|
+
},
|
|
22
|
+
"parameters": [
|
|
23
|
+
{
|
|
24
|
+
"title": "utxo_ref",
|
|
25
|
+
"schema": {
|
|
26
|
+
"$ref": "#/definitions/cardano~1transaction~1OutputReference"
|
|
27
|
+
}
|
|
28
|
+
},
|
|
29
|
+
{
|
|
30
|
+
"title": "manager_pkh",
|
|
31
|
+
"schema": {
|
|
32
|
+
"$ref": "#/definitions/ByteArray"
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
],
|
|
36
|
+
"compiledCode": "5907980101002229800aba2aba1aba0aab9faab9eaab9dab9a9bae0024888888896600264653001300900198049805000cdc3a400130090024888966002600460126ea800e33001375c601a60146ea800e6e1d20029b874801260126ea80112222325980098038014566002601e6ea8026003164041159800980200144c8c966002602a0050038b2024375c6026002601e6ea80262b30013003002899192cc004c05400a0071640486eb8c04c004c03cdd5004c5900d201a4034330012301230130019180918099809800cdc02400523012301330133013301300191191919800800802112cc00400600713233225980099b910070028acc004cdc78038014400600c80a226600a00a603400880a0dd718098009bab301400130160014050297adef6c60912cc004c020c03cdd500144c8c8cc896600260300070058b202a375c602a0026eb8c054008c054004c040dd500145900e488c8cc00400400c896600200314bd7044cc050c00cc054004cc008008c05800501348c048c04cc04cc04cc04cc04cc04cc04cc04c00644646600200200644b30010018a508acc004c00cdd7180a800c528c4cc008008c058005010202698069baa008911919800800801912cc00400629422b3001300330150018a51899801001180b000a020404c911111111114c004cc88cc896600200513301f4c10180003301f374e00297ae08992cc004c8cc00400400c896600200314a315980099baf302330203754604600200713300200230240018a504078810a2660406e9c00ccc080dd380125eb822c80e0c080c074dd51807980e9baa30200024078660046eb0c078c06cdd50091198011bab300e301c3754601c60386ea8004048cc008dd61806180d9baa0122330023756601c60386ea800404888c8cc00400400c896600200314bd7044cc8966002600a00513302100233004004001899802002000a03a30200013021001407844646600200200644b30010018a508992cc004cdc8802000c4cdc7802000c4cc00c00cc08800901c1bae301c302000140792259800800c520008980599801001180f800a038912cc0040062900044c02ccc008008c07c00501c48c966002601e60346ea80062603c60366ea80062c80c8c02cc068dd5000c888c8cc88cc008008004896600200300389919912cc004cdc8803801456600266e3c01c00a20030064081133005005302600440806eb8c07c004dd698100009811000a0403300b0040031480012222298009bac30210059bac3021302200598020024c00c00e444602d3001003801400500424444464b3001301c00d8acc004cc030dd6181398121baa01b23375e6050604a6ea80040b22b300130280058992cc0056600200f14a314a081322b30013371e6eb8c0a0c094dd5000a441008acc004cdc79bae30173025375400291011effffffffffffffffffffffffffffffffffffffffffffffffffffffffffff008cc004dd5980a18129baa01c80dd220100400d14a0811a29410234528204633001302700501a8b204a8b20448acc004c06403626644b3001302a0088991980a0008992cc004cdc39b8d004480e22b30010038acc00660026eacc05cc0a0dd500fc07a00880322b3001337206eb8c0acc0a0dd5001002456600266e40010dd7180d18141baa0028acc004c070c0200062b30013301000125980099b8f375c605860526ea8004dd7181618149baa003899b8f375c603660526ea8004016294102744cc04000496600266e3cdd7181618149baa001005899b8f375c603660526ea8004dd7180d98149baa0038a50409d14a0813229410264528204c8a50409914a0813229410264528204c3301300823300500101e300a301830263754605201116409c6eb8c09cc090dd500f198071bac300f30243754036466e3c00408a2646644b3001302b002899912cc004c0b402a264b3001330143758602a60546ea80848cdc7800814456600266e1e60026eacc064c0a8dd5010c082008806920018acc004c078c0280322b30013371e6eb8c0b4c0a8dd5001802456600266e3cdd7181698151baa001375c605a60546ea800a2b30013371e6eb8c070c0a8dd50009bae301c302a375400713371e6eb8c070c0a8dd5001002452820508a5040a115980099b8f375c605a60546ea80080122b30013371e6eb8c0b4c0a8dd50009bae302d302a375400715980099b8f375c603860546ea8004dd7180e18151baa002899b8f375c603860546ea800c0122941028452820508b205040a114a0814229410284528205033006302c00a01f8b2054302a003302a0028b20503029001375c6050604a6ea807ccc0400188c8cc04c0044004c024c05cc094dd5000a04440884464b3001301a32330010010022259800800c52000899914c004dd718148014dd598150014896600200310038991991180f9980280298198021bae302c001375a605a002605e0028169222330010010021815800998010011816000a0528992cc004c070c0180062646602a0022b3001337206eb8c0acc0a0dd50009bae301a30283754003159800981600144c8c966002603e6eb4c0a800a2b30015980099b8f001375c605a60546ea800e2946266e3c00522010040a110038b20508b2050375c605000260560051640a51640986016009164094660280020051640906eacc05cc094dd500104590080c024004c010dd5004c52689b2b200401",
|
|
37
|
+
"hash": "0c3a5efef639244026bffcb83d83740a307a4ee7fa72f8371c03f7e8"
|
|
38
|
+
},
|
|
39
|
+
{
|
|
40
|
+
"title": "blacklist_mint.blacklist_mint.else",
|
|
41
|
+
"redeemer": {
|
|
42
|
+
"schema": {}
|
|
43
|
+
},
|
|
44
|
+
"parameters": [
|
|
45
|
+
{
|
|
46
|
+
"title": "utxo_ref",
|
|
47
|
+
"schema": {
|
|
48
|
+
"$ref": "#/definitions/cardano~1transaction~1OutputReference"
|
|
49
|
+
}
|
|
50
|
+
},
|
|
51
|
+
{
|
|
52
|
+
"title": "manager_pkh",
|
|
53
|
+
"schema": {
|
|
54
|
+
"$ref": "#/definitions/ByteArray"
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
],
|
|
58
|
+
"compiledCode": "5907980101002229800aba2aba1aba0aab9faab9eaab9dab9a9bae0024888888896600264653001300900198049805000cdc3a400130090024888966002600460126ea800e33001375c601a60146ea800e6e1d20029b874801260126ea80112222325980098038014566002601e6ea8026003164041159800980200144c8c966002602a0050038b2024375c6026002601e6ea80262b30013003002899192cc004c05400a0071640486eb8c04c004c03cdd5004c5900d201a4034330012301230130019180918099809800cdc02400523012301330133013301300191191919800800802112cc00400600713233225980099b910070028acc004cdc78038014400600c80a226600a00a603400880a0dd718098009bab301400130160014050297adef6c60912cc004c020c03cdd500144c8c8cc896600260300070058b202a375c602a0026eb8c054008c054004c040dd500145900e488c8cc00400400c896600200314bd7044cc050c00cc054004cc008008c05800501348c048c04cc04cc04cc04cc04cc04cc04cc04c00644646600200200644b30010018a508acc004c00cdd7180a800c528c4cc008008c058005010202698069baa008911919800800801912cc00400629422b3001300330150018a51899801001180b000a020404c911111111114c004cc88cc896600200513301f4c10180003301f374e00297ae08992cc004c8cc00400400c896600200314a315980099baf302330203754604600200713300200230240018a504078810a2660406e9c00ccc080dd380125eb822c80e0c080c074dd51807980e9baa30200024078660046eb0c078c06cdd50091198011bab300e301c3754601c60386ea8004048cc008dd61806180d9baa0122330023756601c60386ea800404888c8cc00400400c896600200314bd7044cc8966002600a00513302100233004004001899802002000a03a30200013021001407844646600200200644b30010018a508992cc004cdc8802000c4cdc7802000c4cc00c00cc08800901c1bae301c302000140792259800800c520008980599801001180f800a038912cc0040062900044c02ccc008008c07c00501c48c966002601e60346ea80062603c60366ea80062c80c8c02cc068dd5000c888c8cc88cc008008004896600200300389919912cc004cdc8803801456600266e3c01c00a20030064081133005005302600440806eb8c07c004dd698100009811000a0403300b0040031480012222298009bac30210059bac3021302200598020024c00c00e444602d3001003801400500424444464b3001301c00d8acc004cc030dd6181398121baa01b23375e6050604a6ea80040b22b300130280058992cc0056600200f14a314a081322b30013371e6eb8c0a0c094dd5000a441008acc004cdc79bae30173025375400291011effffffffffffffffffffffffffffffffffffffffffffffffffffffffffff008cc004dd5980a18129baa01c80dd220100400d14a0811a29410234528204633001302700501a8b204a8b20448acc004c06403626644b3001302a0088991980a0008992cc004cdc39b8d004480e22b30010038acc00660026eacc05cc0a0dd500fc07a00880322b3001337206eb8c0acc0a0dd5001002456600266e40010dd7180d18141baa0028acc004c070c0200062b30013301000125980099b8f375c605860526ea8004dd7181618149baa003899b8f375c603660526ea8004016294102744cc04000496600266e3cdd7181618149baa001005899b8f375c603660526ea8004dd7180d98149baa0038a50409d14a0813229410264528204c8a50409914a0813229410264528204c3301300823300500101e300a301830263754605201116409c6eb8c09cc090dd500f198071bac300f30243754036466e3c00408a2646644b3001302b002899912cc004c0b402a264b3001330143758602a60546ea80848cdc7800814456600266e1e60026eacc064c0a8dd5010c082008806920018acc004c078c0280322b30013371e6eb8c0b4c0a8dd5001802456600266e3cdd7181698151baa001375c605a60546ea800a2b30013371e6eb8c070c0a8dd50009bae301c302a375400713371e6eb8c070c0a8dd5001002452820508a5040a115980099b8f375c605a60546ea80080122b30013371e6eb8c0b4c0a8dd50009bae302d302a375400715980099b8f375c603860546ea8004dd7180e18151baa002899b8f375c603860546ea800c0122941028452820508b205040a114a0814229410284528205033006302c00a01f8b2054302a003302a0028b20503029001375c6050604a6ea807ccc0400188c8cc04c0044004c024c05cc094dd5000a04440884464b3001301a32330010010022259800800c52000899914c004dd718148014dd598150014896600200310038991991180f9980280298198021bae302c001375a605a002605e0028169222330010010021815800998010011816000a0528992cc004c070c0180062646602a0022b3001337206eb8c0acc0a0dd50009bae301a30283754003159800981600144c8c966002603e6eb4c0a800a2b30015980099b8f001375c605a60546ea800e2946266e3c00522010040a110038b20508b2050375c605000260560051640a51640986016009164094660280020051640906eacc05cc094dd500104590080c024004c010dd5004c52689b2b200401",
|
|
59
|
+
"hash": "0c3a5efef639244026bffcb83d83740a307a4ee7fa72f8371c03f7e8"
|
|
60
|
+
},
|
|
61
|
+
{
|
|
62
|
+
"title": "blacklist_spend.blacklist_spend.spend",
|
|
63
|
+
"datum": {
|
|
64
|
+
"title": "_datum",
|
|
65
|
+
"schema": {
|
|
66
|
+
"$ref": "#/definitions/Data"
|
|
67
|
+
}
|
|
68
|
+
},
|
|
69
|
+
"redeemer": {
|
|
70
|
+
"title": "_redeemer",
|
|
71
|
+
"schema": {
|
|
72
|
+
"$ref": "#/definitions/Data"
|
|
73
|
+
}
|
|
74
|
+
},
|
|
75
|
+
"parameters": [
|
|
76
|
+
{
|
|
77
|
+
"title": "blacklist_cs",
|
|
78
|
+
"schema": {
|
|
79
|
+
"$ref": "#/definitions/cardano~1assets~1PolicyId"
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
],
|
|
83
|
+
"compiledCode": "589f010100229800aba2aba1aab9faab9eaab9dab9a9bae002488888896600264646644b30013370e900118039baa0018994c004c02c006601660180032259800800c52844c96600266e44024006266e3c024006266006006601e0048050dd718051806800a0184888cc004004dd59807180798079807980798061baa300e00818041baa0018b200c300800130083009001300800130043754011149a26cac8011",
|
|
84
|
+
"hash": "6b364897aedaa2a55564de7da7ed4e3d0c88c9203cbb66be2345ff06"
|
|
85
|
+
},
|
|
86
|
+
{
|
|
87
|
+
"title": "blacklist_spend.blacklist_spend.else",
|
|
88
|
+
"redeemer": {
|
|
89
|
+
"schema": {}
|
|
90
|
+
},
|
|
91
|
+
"parameters": [
|
|
92
|
+
{
|
|
93
|
+
"title": "blacklist_cs",
|
|
94
|
+
"schema": {
|
|
95
|
+
"$ref": "#/definitions/cardano~1assets~1PolicyId"
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
],
|
|
99
|
+
"compiledCode": "589f010100229800aba2aba1aab9faab9eaab9dab9a9bae002488888896600264646644b30013370e900118039baa0018994c004c02c006601660180032259800800c52844c96600266e44024006266e3c024006266006006601e0048050dd718051806800a0184888cc004004dd59807180798079807980798061baa300e00818041baa0018b200c300800130083009001300800130043754011149a26cac8011",
|
|
100
|
+
"hash": "6b364897aedaa2a55564de7da7ed4e3d0c88c9203cbb66be2345ff06"
|
|
101
|
+
},
|
|
102
|
+
{
|
|
103
|
+
"title": "example_transfer_logic.issuer_admin_contract.withdraw",
|
|
104
|
+
"redeemer": {
|
|
105
|
+
"title": "_redeemer",
|
|
106
|
+
"schema": {
|
|
107
|
+
"$ref": "#/definitions/Data"
|
|
108
|
+
}
|
|
109
|
+
},
|
|
110
|
+
"parameters": [
|
|
111
|
+
{
|
|
112
|
+
"title": "permitted_cred",
|
|
113
|
+
"schema": {
|
|
114
|
+
"$ref": "#/definitions/cardano~1address~1Credential"
|
|
115
|
+
}
|
|
116
|
+
},
|
|
117
|
+
{
|
|
118
|
+
"title": "_asset_name",
|
|
119
|
+
"schema": {
|
|
120
|
+
"$ref": "#/definitions/cardano~1assets~1PolicyId"
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
],
|
|
124
|
+
"compiledCode": "5901260101002229800aba2aba1aba0aab9faab9eaab9dab9a9bae00248888888966002646465300130063754003300a00398050012444b30013370e9002001c4c96600266e1d2000300a375402513232330010013758602060226022602260226022602260226022601a6ea8014896600200314a115980099b8f375c602200200714a3133002002301200140308078dd7180718059baa01289919198008009bab3010301130113011301130113011300d375400a44b30010018a508acc004cdd798069808800801c528c4cc008008c04800500c201e3374a900119806980718059baa0124bd702012300d300a375400915980099b874801800e2646644944dd698070009807180780098051baa0048b201040203009300a001300900130043754013149a26cac8011",
|
|
125
|
+
"hash": "d6d54eb91622f0c4ab42e24036ca243159e03cf24f05afef67d5c8ac"
|
|
126
|
+
},
|
|
127
|
+
{
|
|
128
|
+
"title": "example_transfer_logic.issuer_admin_contract.publish",
|
|
129
|
+
"redeemer": {
|
|
130
|
+
"title": "_r",
|
|
131
|
+
"schema": {
|
|
132
|
+
"$ref": "#/definitions/Data"
|
|
133
|
+
}
|
|
134
|
+
},
|
|
135
|
+
"parameters": [
|
|
136
|
+
{
|
|
137
|
+
"title": "permitted_cred",
|
|
138
|
+
"schema": {
|
|
139
|
+
"$ref": "#/definitions/cardano~1address~1Credential"
|
|
140
|
+
}
|
|
141
|
+
},
|
|
142
|
+
{
|
|
143
|
+
"title": "_asset_name",
|
|
144
|
+
"schema": {
|
|
145
|
+
"$ref": "#/definitions/cardano~1assets~1PolicyId"
|
|
146
|
+
}
|
|
147
|
+
}
|
|
148
|
+
],
|
|
149
|
+
"compiledCode": "5901260101002229800aba2aba1aba0aab9faab9eaab9dab9a9bae00248888888966002646465300130063754003300a00398050012444b30013370e9002001c4c96600266e1d2000300a375402513232330010013758602060226022602260226022602260226022601a6ea8014896600200314a115980099b8f375c602200200714a3133002002301200140308078dd7180718059baa01289919198008009bab3010301130113011301130113011300d375400a44b30010018a508acc004cdd798069808800801c528c4cc008008c04800500c201e3374a900119806980718059baa0124bd702012300d300a375400915980099b874801800e2646644944dd698070009807180780098051baa0048b201040203009300a001300900130043754013149a26cac8011",
|
|
150
|
+
"hash": "d6d54eb91622f0c4ab42e24036ca243159e03cf24f05afef67d5c8ac"
|
|
151
|
+
},
|
|
152
|
+
{
|
|
153
|
+
"title": "example_transfer_logic.issuer_admin_contract.else",
|
|
154
|
+
"redeemer": {
|
|
155
|
+
"schema": {}
|
|
156
|
+
},
|
|
157
|
+
"parameters": [
|
|
158
|
+
{
|
|
159
|
+
"title": "permitted_cred",
|
|
160
|
+
"schema": {
|
|
161
|
+
"$ref": "#/definitions/cardano~1address~1Credential"
|
|
162
|
+
}
|
|
163
|
+
},
|
|
164
|
+
{
|
|
165
|
+
"title": "_asset_name",
|
|
166
|
+
"schema": {
|
|
167
|
+
"$ref": "#/definitions/cardano~1assets~1PolicyId"
|
|
168
|
+
}
|
|
169
|
+
}
|
|
170
|
+
],
|
|
171
|
+
"compiledCode": "5901260101002229800aba2aba1aba0aab9faab9eaab9dab9a9bae00248888888966002646465300130063754003300a00398050012444b30013370e9002001c4c96600266e1d2000300a375402513232330010013758602060226022602260226022602260226022601a6ea8014896600200314a115980099b8f375c602200200714a3133002002301200140308078dd7180718059baa01289919198008009bab3010301130113011301130113011300d375400a44b30010018a508acc004cdd798069808800801c528c4cc008008c04800500c201e3374a900119806980718059baa0124bd702012300d300a375400915980099b874801800e2646644944dd698070009807180780098051baa0048b201040203009300a001300900130043754013149a26cac8011",
|
|
172
|
+
"hash": "d6d54eb91622f0c4ab42e24036ca243159e03cf24f05afef67d5c8ac"
|
|
173
|
+
},
|
|
174
|
+
{
|
|
175
|
+
"title": "example_transfer_logic.transfer.withdraw",
|
|
176
|
+
"redeemer": {
|
|
177
|
+
"title": "proofs",
|
|
178
|
+
"schema": {
|
|
179
|
+
"$ref": "#/definitions/List<types~1BlacklistProof>"
|
|
180
|
+
}
|
|
181
|
+
},
|
|
182
|
+
"parameters": [
|
|
183
|
+
{
|
|
184
|
+
"title": "programmable_logic_base_cred",
|
|
185
|
+
"schema": {
|
|
186
|
+
"$ref": "#/definitions/cardano~1address~1Credential"
|
|
187
|
+
}
|
|
188
|
+
},
|
|
189
|
+
{
|
|
190
|
+
"title": "blacklist_node_cs",
|
|
191
|
+
"schema": {
|
|
192
|
+
"$ref": "#/definitions/cardano~1assets~1PolicyId"
|
|
193
|
+
}
|
|
194
|
+
}
|
|
195
|
+
],
|
|
196
|
+
"compiledCode": "5904810101002229800aba2aba1aba0aab9faab9eaab9dab9a9bae00248888888966002646465300130063754003370e90024c02800d222598009801001c4cc88c8cc00400400888c9660020051325980099198008009bab30143015301530153015301530153015301530153011375401044b30010018a508acc004c966002601660246ea8006266ebcc058c04cdd5000804c5282022301130150018a51899801001180b000a020404d13298009800800c896600200314a315980099b8748008c048dd5180b000c4cc008008c05c006294101120289bac30023011375401091119801001194c00400664660020026eb0c064c058dd5006912cc004006297ae0899912cc004cdd7980e180c9baa301c30193754601460326ea800808226644b3001300d301a3754005132598009807180d9baa0018992cc004c03cc070dd5000c4cc07cc080c074dd5000802c4cc07cc080c074dd5000802a036301f301c37540030024068603c60366ea800a00280c8c028c064dd5180e180c9baa300a3019375400420031001405c603400266004004603600280c201480088896600200514bd70456600200314bd7044cc06660026644b3001300b3018375400313259800acc004cdc4240006466446600400400244b3001001801c4c8cc896600266e452201000028acc004cdc7a441000028800c01901e44cc014014c09001101e1bae301d001375a603c002604000280f0c8c8cc004004dd59807180e9baa0042259800800c00e2646644b30013372203c00515980099b8f01e0028800c01901f44cc014014c09401101f1bae301e0013756603e002604200280f852f5bded8c0290004528c4c8cc004004c8cc004004dd59806980e1baa0032259800800c52f5c113233223322330020020012259800800c400e2646604a6e9ccc094dd4802998129811000998129811800a5eb80cc00c00cc09c008c0940050231bab3020003375c603a002660060066044004604000280f0896600200314a115980099b8f375c603e6eb0c07c0040662946266004004604000280d101d20308992cc004c034c068dd5000c4c8c8cc8966002604600715980099b90375c6044603e6ea8014022266e40020dd71808180f9baa0058a5040751640806eb8c080004dd718100011810000980d9baa0018b203232598009809980d1baa0018980f180d9baa0018b2032301d301e301e301a3754003164060601460326ea8c070c064dd5000c590171bae301a002325980099b88001480022980103d87a8000899803802800a02c375a6034602e6ea8c06800698103d87a8000a60103d879800040553001003980d8014c06c005003203040602225980080145300103d87a80008acc004c014006266e9520003301530160024bd70466002007301700299b80001480050032022405114a080708c04cc050006264b30013002300f37540031323259800980b00144cc018018c0580162c8098dd6980a00098081baa0018b201c301200240406e1d2000300d300a37540086eb0c0340162b30013370e9003001c4c8cc89289bad300e001300e300f001300a3754009164020804060126014002601200260086ea802629344d95900201",
|
|
197
|
+
"hash": "d95bf16fdd1ce4260100f158d042a91801ca753339d57d97078075c8"
|
|
198
|
+
},
|
|
199
|
+
{
|
|
200
|
+
"title": "example_transfer_logic.transfer.publish",
|
|
201
|
+
"redeemer": {
|
|
202
|
+
"title": "_r",
|
|
203
|
+
"schema": {
|
|
204
|
+
"$ref": "#/definitions/Data"
|
|
205
|
+
}
|
|
206
|
+
},
|
|
207
|
+
"parameters": [
|
|
208
|
+
{
|
|
209
|
+
"title": "programmable_logic_base_cred",
|
|
210
|
+
"schema": {
|
|
211
|
+
"$ref": "#/definitions/cardano~1address~1Credential"
|
|
212
|
+
}
|
|
213
|
+
},
|
|
214
|
+
{
|
|
215
|
+
"title": "blacklist_node_cs",
|
|
216
|
+
"schema": {
|
|
217
|
+
"$ref": "#/definitions/cardano~1assets~1PolicyId"
|
|
218
|
+
}
|
|
219
|
+
}
|
|
220
|
+
],
|
|
221
|
+
"compiledCode": "5904810101002229800aba2aba1aba0aab9faab9eaab9dab9a9bae00248888888966002646465300130063754003370e90024c02800d222598009801001c4cc88c8cc00400400888c9660020051325980099198008009bab30143015301530153015301530153015301530153011375401044b30010018a508acc004c966002601660246ea8006266ebcc058c04cdd5000804c5282022301130150018a51899801001180b000a020404d13298009800800c896600200314a315980099b8748008c048dd5180b000c4cc008008c05c006294101120289bac30023011375401091119801001194c00400664660020026eb0c064c058dd5006912cc004006297ae0899912cc004cdd7980e180c9baa301c30193754601460326ea800808226644b3001300d301a3754005132598009807180d9baa0018992cc004c03cc070dd5000c4cc07cc080c074dd5000802c4cc07cc080c074dd5000802a036301f301c37540030024068603c60366ea800a00280c8c028c064dd5180e180c9baa300a3019375400420031001405c603400266004004603600280c201480088896600200514bd70456600200314bd7044cc06660026644b3001300b3018375400313259800acc004cdc4240006466446600400400244b3001001801c4c8cc896600266e452201000028acc004cdc7a441000028800c01901e44cc014014c09001101e1bae301d001375a603c002604000280f0c8c8cc004004dd59807180e9baa0042259800800c00e2646644b30013372203c00515980099b8f01e0028800c01901f44cc014014c09401101f1bae301e0013756603e002604200280f852f5bded8c0290004528c4c8cc004004c8cc004004dd59806980e1baa0032259800800c52f5c113233223322330020020012259800800c400e2646604a6e9ccc094dd4802998129811000998129811800a5eb80cc00c00cc09c008c0940050231bab3020003375c603a002660060066044004604000280f0896600200314a115980099b8f375c603e6eb0c07c0040662946266004004604000280d101d20308992cc004c034c068dd5000c4c8c8cc8966002604600715980099b90375c6044603e6ea8014022266e40020dd71808180f9baa0058a5040751640806eb8c080004dd718100011810000980d9baa0018b203232598009809980d1baa0018980f180d9baa0018b2032301d301e301e301a3754003164060601460326ea8c070c064dd5000c590171bae301a002325980099b88001480022980103d87a8000899803802800a02c375a6034602e6ea8c06800698103d87a8000a60103d879800040553001003980d8014c06c005003203040602225980080145300103d87a80008acc004c014006266e9520003301530160024bd70466002007301700299b80001480050032022405114a080708c04cc050006264b30013002300f37540031323259800980b00144cc018018c0580162c8098dd6980a00098081baa0018b201c301200240406e1d2000300d300a37540086eb0c0340162b30013370e9003001c4c8cc89289bad300e001300e300f001300a3754009164020804060126014002601200260086ea802629344d95900201",
|
|
222
|
+
"hash": "d95bf16fdd1ce4260100f158d042a91801ca753339d57d97078075c8"
|
|
223
|
+
},
|
|
224
|
+
{
|
|
225
|
+
"title": "example_transfer_logic.transfer.else",
|
|
226
|
+
"redeemer": {
|
|
227
|
+
"schema": {}
|
|
228
|
+
},
|
|
229
|
+
"parameters": [
|
|
230
|
+
{
|
|
231
|
+
"title": "programmable_logic_base_cred",
|
|
232
|
+
"schema": {
|
|
233
|
+
"$ref": "#/definitions/cardano~1address~1Credential"
|
|
234
|
+
}
|
|
235
|
+
},
|
|
236
|
+
{
|
|
237
|
+
"title": "blacklist_node_cs",
|
|
238
|
+
"schema": {
|
|
239
|
+
"$ref": "#/definitions/cardano~1assets~1PolicyId"
|
|
240
|
+
}
|
|
241
|
+
}
|
|
242
|
+
],
|
|
243
|
+
"compiledCode": "5904810101002229800aba2aba1aba0aab9faab9eaab9dab9a9bae00248888888966002646465300130063754003370e90024c02800d222598009801001c4cc88c8cc00400400888c9660020051325980099198008009bab30143015301530153015301530153015301530153011375401044b30010018a508acc004c966002601660246ea8006266ebcc058c04cdd5000804c5282022301130150018a51899801001180b000a020404d13298009800800c896600200314a315980099b8748008c048dd5180b000c4cc008008c05c006294101120289bac30023011375401091119801001194c00400664660020026eb0c064c058dd5006912cc004006297ae0899912cc004cdd7980e180c9baa301c30193754601460326ea800808226644b3001300d301a3754005132598009807180d9baa0018992cc004c03cc070dd5000c4cc07cc080c074dd5000802c4cc07cc080c074dd5000802a036301f301c37540030024068603c60366ea800a00280c8c028c064dd5180e180c9baa300a3019375400420031001405c603400266004004603600280c201480088896600200514bd70456600200314bd7044cc06660026644b3001300b3018375400313259800acc004cdc4240006466446600400400244b3001001801c4c8cc896600266e452201000028acc004cdc7a441000028800c01901e44cc014014c09001101e1bae301d001375a603c002604000280f0c8c8cc004004dd59807180e9baa0042259800800c00e2646644b30013372203c00515980099b8f01e0028800c01901f44cc014014c09401101f1bae301e0013756603e002604200280f852f5bded8c0290004528c4c8cc004004c8cc004004dd59806980e1baa0032259800800c52f5c113233223322330020020012259800800c400e2646604a6e9ccc094dd4802998129811000998129811800a5eb80cc00c00cc09c008c0940050231bab3020003375c603a002660060066044004604000280f0896600200314a115980099b8f375c603e6eb0c07c0040662946266004004604000280d101d20308992cc004c034c068dd5000c4c8c8cc8966002604600715980099b90375c6044603e6ea8014022266e40020dd71808180f9baa0058a5040751640806eb8c080004dd718100011810000980d9baa0018b203232598009809980d1baa0018980f180d9baa0018b2032301d301e301e301a3754003164060601460326ea8c070c064dd5000c590171bae301a002325980099b88001480022980103d87a8000899803802800a02c375a6034602e6ea8c06800698103d87a8000a60103d879800040553001003980d8014c06c005003203040602225980080145300103d87a80008acc004c014006266e9520003301530160024bd70466002007301700299b80001480050032022405114a080708c04cc050006264b30013002300f37540031323259800980b00144cc018018c0580162c8098dd6980a00098081baa0018b201c301200240406e1d2000300d300a37540086eb0c0340162b30013370e9003001c4c8cc89289bad300e001300e300f001300a3754009164020804060126014002601200260086ea802629344d95900201",
|
|
244
|
+
"hash": "d95bf16fdd1ce4260100f158d042a91801ca753339d57d97078075c8"
|
|
245
|
+
}
|
|
246
|
+
],
|
|
247
|
+
"definitions": {
|
|
248
|
+
"ByteArray": {
|
|
249
|
+
"title": "ByteArray",
|
|
250
|
+
"dataType": "bytes"
|
|
251
|
+
},
|
|
252
|
+
"Data": {
|
|
253
|
+
"title": "Data",
|
|
254
|
+
"description": "Any Plutus data."
|
|
255
|
+
},
|
|
256
|
+
"Int": {
|
|
257
|
+
"dataType": "integer"
|
|
258
|
+
},
|
|
259
|
+
"List<types/BlacklistProof>": {
|
|
260
|
+
"dataType": "list",
|
|
261
|
+
"items": {
|
|
262
|
+
"$ref": "#/definitions/types~1BlacklistProof"
|
|
263
|
+
}
|
|
264
|
+
},
|
|
265
|
+
"aiken/crypto/ScriptHash": {
|
|
266
|
+
"title": "ScriptHash",
|
|
267
|
+
"dataType": "bytes"
|
|
268
|
+
},
|
|
269
|
+
"aiken/crypto/VerificationKeyHash": {
|
|
270
|
+
"title": "VerificationKeyHash",
|
|
271
|
+
"dataType": "bytes"
|
|
272
|
+
},
|
|
273
|
+
"cardano/address/Credential": {
|
|
274
|
+
"title": "Credential",
|
|
275
|
+
"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).",
|
|
276
|
+
"anyOf": [
|
|
277
|
+
{
|
|
278
|
+
"title": "VerificationKey",
|
|
279
|
+
"dataType": "constructor",
|
|
280
|
+
"index": 0,
|
|
281
|
+
"fields": [
|
|
282
|
+
{
|
|
283
|
+
"$ref": "#/definitions/aiken~1crypto~1VerificationKeyHash"
|
|
284
|
+
}
|
|
285
|
+
]
|
|
286
|
+
},
|
|
287
|
+
{
|
|
288
|
+
"title": "Script",
|
|
289
|
+
"dataType": "constructor",
|
|
290
|
+
"index": 1,
|
|
291
|
+
"fields": [
|
|
292
|
+
{
|
|
293
|
+
"$ref": "#/definitions/aiken~1crypto~1ScriptHash"
|
|
294
|
+
}
|
|
295
|
+
]
|
|
296
|
+
}
|
|
297
|
+
]
|
|
298
|
+
},
|
|
299
|
+
"cardano/assets/PolicyId": {
|
|
300
|
+
"title": "PolicyId",
|
|
301
|
+
"dataType": "bytes"
|
|
302
|
+
},
|
|
303
|
+
"cardano/transaction/OutputReference": {
|
|
304
|
+
"title": "OutputReference",
|
|
305
|
+
"description": "An `OutputReference` is a unique reference to an output on-chain. The `output_index`\n corresponds to the position in the output list of the transaction (identified by its id)\n that produced that output",
|
|
306
|
+
"anyOf": [
|
|
307
|
+
{
|
|
308
|
+
"title": "OutputReference",
|
|
309
|
+
"dataType": "constructor",
|
|
310
|
+
"index": 0,
|
|
311
|
+
"fields": [
|
|
312
|
+
{
|
|
313
|
+
"title": "transaction_id",
|
|
314
|
+
"$ref": "#/definitions/ByteArray"
|
|
315
|
+
},
|
|
316
|
+
{
|
|
317
|
+
"title": "output_index",
|
|
318
|
+
"$ref": "#/definitions/Int"
|
|
319
|
+
}
|
|
320
|
+
]
|
|
321
|
+
}
|
|
322
|
+
]
|
|
323
|
+
},
|
|
324
|
+
"types/BlacklistProof": {
|
|
325
|
+
"title": "BlacklistProof",
|
|
326
|
+
"description": "Proof of blacklist membership or non-membership",
|
|
327
|
+
"anyOf": [
|
|
328
|
+
{
|
|
329
|
+
"title": "NonmembershipProof",
|
|
330
|
+
"description": "Proof of non-membership via covering node",
|
|
331
|
+
"dataType": "constructor",
|
|
332
|
+
"index": 0,
|
|
333
|
+
"fields": [
|
|
334
|
+
{
|
|
335
|
+
"title": "node_idx",
|
|
336
|
+
"$ref": "#/definitions/Int"
|
|
337
|
+
}
|
|
338
|
+
]
|
|
339
|
+
}
|
|
340
|
+
]
|
|
341
|
+
},
|
|
342
|
+
"types/BlacklistRedeemer": {
|
|
343
|
+
"title": "BlacklistRedeemer",
|
|
344
|
+
"description": "Redeemer for blacklist minting policy (linked list operations)",
|
|
345
|
+
"anyOf": [
|
|
346
|
+
{
|
|
347
|
+
"title": "BlacklistInit",
|
|
348
|
+
"description": "Initialize the blacklist with the origin node",
|
|
349
|
+
"dataType": "constructor",
|
|
350
|
+
"index": 0,
|
|
351
|
+
"fields": []
|
|
352
|
+
},
|
|
353
|
+
{
|
|
354
|
+
"title": "BlacklistInsert",
|
|
355
|
+
"description": "Insert a credential into the blacklist",
|
|
356
|
+
"dataType": "constructor",
|
|
357
|
+
"index": 1,
|
|
358
|
+
"fields": [
|
|
359
|
+
{
|
|
360
|
+
"title": "key",
|
|
361
|
+
"$ref": "#/definitions/ByteArray"
|
|
362
|
+
}
|
|
363
|
+
]
|
|
364
|
+
},
|
|
365
|
+
{
|
|
366
|
+
"title": "BlacklistRemove",
|
|
367
|
+
"description": "Remove a credential from the blacklist",
|
|
368
|
+
"dataType": "constructor",
|
|
369
|
+
"index": 2,
|
|
370
|
+
"fields": [
|
|
371
|
+
{
|
|
372
|
+
"title": "key",
|
|
373
|
+
"$ref": "#/definitions/ByteArray"
|
|
374
|
+
}
|
|
375
|
+
]
|
|
376
|
+
}
|
|
377
|
+
]
|
|
378
|
+
}
|
|
379
|
+
}
|
|
380
|
+
}
|
|
@@ -0,0 +1,160 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Shared Evolution SDK utility functions.
|
|
3
|
+
*
|
|
4
|
+
* These are used across the SDK to build scripts, addresses, datums, and
|
|
5
|
+
* perform common conversions. All use Evolution SDK types directly.
|
|
6
|
+
*/
|
|
7
|
+
import { Data, Bytes, ScriptHash as EvoScriptHash, Script, UPLC, Address as EvoAddress, Assets, Credential, InlineDatum, KeyHash, TransactionHash, UTxO as EvoUTxO, Transaction } from "@evolution-sdk/evolution";
|
|
8
|
+
import type { HexString, PlutusScript, ScriptHash, TxInput } from "../types.js";
|
|
9
|
+
/**
|
|
10
|
+
* Build a PlutusV3 script object from compiled code hex.
|
|
11
|
+
*
|
|
12
|
+
* Handles CBOR encoding levels: if "double" (from applyParamsToScript),
|
|
13
|
+
* strips outer CBOR header to get single-CBOR for PlutusV3.
|
|
14
|
+
*/
|
|
15
|
+
export declare function buildEvoScript(compiledCode: HexString): Script.Script;
|
|
16
|
+
/**
|
|
17
|
+
* Parameterize a script and compute its hash.
|
|
18
|
+
* Returns a PlutusScript with compiledCode and hash.
|
|
19
|
+
*/
|
|
20
|
+
export declare function parameterizeScript(compiledCode: HexString, params: Data.Data[]): PlutusScript;
|
|
21
|
+
/**
|
|
22
|
+
* Compute script hash from compiled code.
|
|
23
|
+
*/
|
|
24
|
+
export declare function computeScriptHash(compiledCode: HexString): ScriptHash;
|
|
25
|
+
/**
|
|
26
|
+
* Build an enterprise (script-only) address from a script hash.
|
|
27
|
+
*/
|
|
28
|
+
export declare function scriptAddress(networkId: number, scriptHash: ScriptHash): string;
|
|
29
|
+
/**
|
|
30
|
+
* Build a reward (staking) address from a script hash.
|
|
31
|
+
*/
|
|
32
|
+
export declare function rewardAddress(networkId: number, scriptHash: ScriptHash): string;
|
|
33
|
+
/**
|
|
34
|
+
* Build a base address with script payment credential and user's staking credential.
|
|
35
|
+
*/
|
|
36
|
+
export declare function baseAddress(networkId: number, scriptHash: ScriptHash, userAddress: string): string;
|
|
37
|
+
/**
|
|
38
|
+
* Extract the staking credential hash from a bech32 address.
|
|
39
|
+
*/
|
|
40
|
+
export declare function stakingCredentialHash(address: string): HexString;
|
|
41
|
+
/**
|
|
42
|
+
* Extract the payment credential hash from a bech32 address.
|
|
43
|
+
*/
|
|
44
|
+
export declare function paymentCredentialHash(address: string): HexString;
|
|
45
|
+
/** OutputReference: Constr(0, [txHash, outputIndex]) */
|
|
46
|
+
export declare function outputReference(ref: TxInput): Data.Data;
|
|
47
|
+
/** Script credential: Constr(1, [scriptHash]) */
|
|
48
|
+
export declare function scriptCredential(hash: ScriptHash): Data.Data;
|
|
49
|
+
/** Verification key credential: Constr(0, [keyHash]) */
|
|
50
|
+
export declare function keyCredential(hash: HexString): Data.Data;
|
|
51
|
+
/** Void / unit: Constr(0, []) */
|
|
52
|
+
export declare function voidData(): Data.Data;
|
|
53
|
+
/**
|
|
54
|
+
* Extract a bytes field from a Constr datum at a given index.
|
|
55
|
+
* Works with Evolution SDK's Data.Constr format.
|
|
56
|
+
*/
|
|
57
|
+
export declare function extractConstrBytesField(datum: unknown, fieldIndex: number): string | undefined;
|
|
58
|
+
/**
|
|
59
|
+
* Extract a credential (type + hash) from a constr datum field.
|
|
60
|
+
* Credential is Constr(0|1, [bytes]) — 0 = key, 1 = script.
|
|
61
|
+
*/
|
|
62
|
+
export declare function extractCredentialField(datum: unknown, fieldIndex: number): {
|
|
63
|
+
type: "key" | "script";
|
|
64
|
+
hash: string;
|
|
65
|
+
} | undefined;
|
|
66
|
+
export interface RegistryNodeData {
|
|
67
|
+
key: HexString;
|
|
68
|
+
next: HexString;
|
|
69
|
+
transferLogicScript: {
|
|
70
|
+
type: "key" | "script";
|
|
71
|
+
hash: ScriptHash;
|
|
72
|
+
};
|
|
73
|
+
thirdPartyTransferLogicScript: {
|
|
74
|
+
type: "key" | "script";
|
|
75
|
+
hash: ScriptHash;
|
|
76
|
+
};
|
|
77
|
+
globalStateCs: HexString;
|
|
78
|
+
}
|
|
79
|
+
/** Build a RegistryNode datum */
|
|
80
|
+
export declare function registryNodeDatum(node: RegistryNodeData): Data.Data;
|
|
81
|
+
/** Build a BlacklistNode datum */
|
|
82
|
+
export declare function blacklistNodeDatum(key: HexString, next: HexString): Data.Data;
|
|
83
|
+
/**
|
|
84
|
+
* SmartTokenMintingAction redeemer for first mint (OutputIndex).
|
|
85
|
+
*/
|
|
86
|
+
export declare function issuanceRedeemerFirstMint(mintingLogicHash: ScriptHash, registryOutputIndex: number): Data.Data;
|
|
87
|
+
/**
|
|
88
|
+
* SmartTokenMintingAction redeemer for subsequent mint/burn (RefInput).
|
|
89
|
+
*/
|
|
90
|
+
export declare function issuanceRedeemerRefInput(mintingLogicHash: ScriptHash, registryRefInputIndex: number): Data.Data;
|
|
91
|
+
export interface RegistryProof {
|
|
92
|
+
type: "exists" | "not-exists";
|
|
93
|
+
nodeIdx: number;
|
|
94
|
+
}
|
|
95
|
+
/** Build a TransferAct redeemer for PLGlobal. */
|
|
96
|
+
export declare function transferActRedeemer(proofs: RegistryProof[]): Data.Data;
|
|
97
|
+
/** Build a ThirdPartyAct redeemer for PLGlobal. */
|
|
98
|
+
export declare function thirdPartyActRedeemer(registryNodeIdx: number, outputsStartIdx: number): Data.Data;
|
|
99
|
+
/** RegistryInsert redeemer */
|
|
100
|
+
export declare function registryInsertRedeemer(key: HexString, hashedParam: HexString): Data.Data;
|
|
101
|
+
/** Blacklist init (constructor 0) */
|
|
102
|
+
export declare function blacklistInitRedeemer(): Data.Data;
|
|
103
|
+
/** Blacklist add (constructor 1) */
|
|
104
|
+
export declare function blacklistAddRedeemer(stakingPkh: HexString): Data.Data;
|
|
105
|
+
/** Blacklist remove (constructor 2) */
|
|
106
|
+
export declare function blacklistRemoveRedeemer(stakingPkh: HexString): Data.Data;
|
|
107
|
+
/** Build an Assets object with a single native token unit + min lovelace */
|
|
108
|
+
export declare function singleTokenAssets(policyId: string, assetName: string, qty: bigint): Assets.Assets;
|
|
109
|
+
/** Build mint assets map from unit -> qty entries (Evolution SDK format) */
|
|
110
|
+
export declare function mintAssetsFromMap(entries: Map<string, bigint>): Assets.Assets;
|
|
111
|
+
/** Build output assets: lovelace + optional token map */
|
|
112
|
+
export declare function outputAssets(lovelace: bigint, tokenMap?: Map<string, bigint>): Assets.Assets;
|
|
113
|
+
/**
|
|
114
|
+
* Get the inline datum from a UTxO. Returns undefined if no inline datum.
|
|
115
|
+
*/
|
|
116
|
+
export declare function getInlineDatum(utxo: EvoUTxO.UTxO): Data.Data | undefined;
|
|
117
|
+
/**
|
|
118
|
+
* Get the UTxO's value as a check for a specific unit.
|
|
119
|
+
*/
|
|
120
|
+
export declare function utxoHasUnit(utxo: EvoUTxO.UTxO, unit: string): boolean;
|
|
121
|
+
/**
|
|
122
|
+
* Get the quantity of a specific unit in a UTxO.
|
|
123
|
+
*/
|
|
124
|
+
export declare function utxoUnitQty(utxo: EvoUTxO.UTxO, unit: string): bigint;
|
|
125
|
+
/**
|
|
126
|
+
* Get the lovelace amount from a UTxO.
|
|
127
|
+
*/
|
|
128
|
+
export declare function utxoLovelace(utxo: EvoUTxO.UTxO): bigint;
|
|
129
|
+
/**
|
|
130
|
+
* Get the txHash of a UTxO as a hex string.
|
|
131
|
+
*/
|
|
132
|
+
export declare function utxoTxHash(utxo: EvoUTxO.UTxO): string;
|
|
133
|
+
/**
|
|
134
|
+
* Get the output index of a UTxO as a number.
|
|
135
|
+
*/
|
|
136
|
+
export declare function utxoOutputIndex(utxo: EvoUTxO.UTxO): number;
|
|
137
|
+
/**
|
|
138
|
+
* Get the bech32 address of a UTxO.
|
|
139
|
+
*/
|
|
140
|
+
export declare function utxoAddress(utxo: EvoUTxO.UTxO): string;
|
|
141
|
+
/** Max next pointer for linked list sentinel (30 bytes, matches Aiken #"ff"*30) */
|
|
142
|
+
export declare const MAX_NEXT: string;
|
|
143
|
+
/** Convert a UTF-8 string to hex */
|
|
144
|
+
export declare function stringToHex(str: string): string;
|
|
145
|
+
import type { CIP68MetadataInput } from "../substandards/interface.js";
|
|
146
|
+
/** Prefix an asset name hex with a CIP-67 label (e.g., 333 → "000f4141" + assetNameHex). */
|
|
147
|
+
export declare function labeledAssetName(label: number, assetNameHex: HexString): HexString;
|
|
148
|
+
/** Strip a CIP-67 label prefix from an asset name hex, if present. Returns the stripped (unlabeled) name. */
|
|
149
|
+
export declare function stripCIP67Label(assetNameHex: HexString): HexString;
|
|
150
|
+
/** Check if an asset name hex starts with a CIP-67 label prefix. */
|
|
151
|
+
export declare function hasCIP67Label(assetNameHex: HexString): boolean;
|
|
152
|
+
/**
|
|
153
|
+
* Build CIP-68 FT metadata datum: Constr(0, [metadata_map, version, extra]).
|
|
154
|
+
*
|
|
155
|
+
* Keys and text values are byte strings (standard CIP-68 convention).
|
|
156
|
+
* Matches real-world CIP-68 FT datums (e.g., FLDT token).
|
|
157
|
+
*/
|
|
158
|
+
export declare function buildCIP68FTDatum(meta: CIP68MetadataInput): Data.Data;
|
|
159
|
+
export { Data, Bytes, Assets, Credential, InlineDatum, KeyHash, EvoAddress, EvoScriptHash, TransactionHash, Transaction, UPLC, };
|
|
160
|
+
//# sourceMappingURL=evo-utils.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"evo-utils.d.ts","sourceRoot":"","sources":["../../src/core/evo-utils.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EACL,IAAI,EACJ,KAAK,EACL,UAAU,IAAI,aAAa,EAC3B,MAAM,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