@cardano-sdk/cardano-services 0.6.0 → 0.6.1-nightly.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/cjs/StakePool/HttpStakePoolMetadata/schemas/schemas/ada-pools.json +170 -0
- package/dist/cjs/StakePool/HttpStakePoolMetadata/schemas/schemas/cip-6.json +276 -0
- package/dist/cjs/Utxo/DbSyncUtxoProvider/mappers.d.ts.map +1 -1
- package/dist/cjs/Utxo/DbSyncUtxoProvider/mappers.js +3 -2
- package/dist/cjs/Utxo/DbSyncUtxoProvider/mappers.js.map +1 -1
- package/dist/cjs/original-package.json +10 -8
- package/dist/cjs/tsconfig.tsbuildinfo +1 -1
- package/package.json +10 -8
|
@@ -0,0 +1,170 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$id": "https://a.adapools.org/extended-example",
|
|
3
|
+
"$schema": "http://json-schema.org/draft-07/schema",
|
|
4
|
+
"default": {},
|
|
5
|
+
"description": "Additional information for Cardano Stake Pools in Ada Pools format",
|
|
6
|
+
"examples": [
|
|
7
|
+
{
|
|
8
|
+
"info": {
|
|
9
|
+
"url_png_icon_64x64": "http(s) url to pool icon; png format; not animated; max 40kb",
|
|
10
|
+
"url_png_logo": "http(s) url to pool logo; png format; not animated; max 50kb",
|
|
11
|
+
"location": "London, England",
|
|
12
|
+
"social": {
|
|
13
|
+
"twitter_handle": "adapools_org",
|
|
14
|
+
"telegram_handle": "adapools_ops",
|
|
15
|
+
"facebook_handle": "",
|
|
16
|
+
"youtube_handle": "",
|
|
17
|
+
"twitch_handle": "",
|
|
18
|
+
"discord_handle": "",
|
|
19
|
+
"github_handle": ""
|
|
20
|
+
},
|
|
21
|
+
"company": {
|
|
22
|
+
"name": "Company Name",
|
|
23
|
+
"addr": "Street, Number",
|
|
24
|
+
"city": "London",
|
|
25
|
+
"country": "England",
|
|
26
|
+
"company_id": "123456789",
|
|
27
|
+
"vat_id": "GB123456789"
|
|
28
|
+
},
|
|
29
|
+
"about": {
|
|
30
|
+
"me": "...",
|
|
31
|
+
"server": "Raspberry Pi Hosted at my Home in London 100MB up/down, solar energy.",
|
|
32
|
+
"company": "..."
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
],
|
|
37
|
+
"maxLength": 4096,
|
|
38
|
+
"required": [
|
|
39
|
+
"info"
|
|
40
|
+
],
|
|
41
|
+
"title": "Extended stake pool metadata",
|
|
42
|
+
"type": "object",
|
|
43
|
+
"properties": {
|
|
44
|
+
"info": {
|
|
45
|
+
"$id": "#/properties/info",
|
|
46
|
+
"default": {},
|
|
47
|
+
"title": "Info object",
|
|
48
|
+
"type": "object",
|
|
49
|
+
"properties": {
|
|
50
|
+
"url_png_icon_64x64": {
|
|
51
|
+
"$id": "#/properties/info/properties/url_png_icon_64x64",
|
|
52
|
+
"type": "string",
|
|
53
|
+
"title": "PNG image with exact 64x64 pixel size"
|
|
54
|
+
},
|
|
55
|
+
"url_png_logo": {
|
|
56
|
+
"$id": "#/properties/info/properties/url_png_logo",
|
|
57
|
+
"type": "string",
|
|
58
|
+
"title": "Pool Logo in PNG file format"
|
|
59
|
+
},
|
|
60
|
+
"location": {
|
|
61
|
+
"$id": "#/properties/info/properties/location",
|
|
62
|
+
"type": "string",
|
|
63
|
+
"title": "Stake Pool location"
|
|
64
|
+
},
|
|
65
|
+
"social": {
|
|
66
|
+
"$id": "#/properties/info/properties/social",
|
|
67
|
+
"title": "Pool social data",
|
|
68
|
+
"type": "object",
|
|
69
|
+
"properties": {
|
|
70
|
+
"twitter_handle": {
|
|
71
|
+
"$id": "#/properties/info/properties/social/properties/twitter_handle",
|
|
72
|
+
"title": "twitter account",
|
|
73
|
+
"type": "string"
|
|
74
|
+
},
|
|
75
|
+
"telegram_handle": {
|
|
76
|
+
"$id": "#/properties/info/properties/social/properties/telegram_handle",
|
|
77
|
+
"title": "telegram account",
|
|
78
|
+
"type": "string"
|
|
79
|
+
},
|
|
80
|
+
"facebook_handle": {
|
|
81
|
+
"$id": "#/properties/info/properties/social/properties/facebook_handle",
|
|
82
|
+
"title": "facebook account",
|
|
83
|
+
"type": "string"
|
|
84
|
+
},
|
|
85
|
+
"youtube_handle": {
|
|
86
|
+
"$id": "#/properties/info/properties/social/properties/youtube_handle",
|
|
87
|
+
"title": "youtube account",
|
|
88
|
+
"type": "string"
|
|
89
|
+
},
|
|
90
|
+
"twitch_handle": {
|
|
91
|
+
"$id": "#/properties/info/properties/social/properties/twitch_handle",
|
|
92
|
+
"title": "twitch account",
|
|
93
|
+
"type": "string"
|
|
94
|
+
},
|
|
95
|
+
"discord_handle": {
|
|
96
|
+
"$id": "#/properties/info/properties/social/properties/discord_handle",
|
|
97
|
+
"title": "discord account",
|
|
98
|
+
"type": "string"
|
|
99
|
+
},
|
|
100
|
+
"github_handle": {
|
|
101
|
+
"$id": "#/properties/info/properties/social/properties/github_handle",
|
|
102
|
+
"title": "github account",
|
|
103
|
+
"type": "string"
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
},
|
|
107
|
+
"company": {
|
|
108
|
+
"$id": "#/properties/info/properties/company",
|
|
109
|
+
"type": "object",
|
|
110
|
+
"title": "Company information",
|
|
111
|
+
"properties": {
|
|
112
|
+
"name": {
|
|
113
|
+
"$id": "#/properties/info/properties/company/properties/name",
|
|
114
|
+
"type": "string",
|
|
115
|
+
"title": "The company name"
|
|
116
|
+
},
|
|
117
|
+
"addr": {
|
|
118
|
+
"$id": "#/properties/info/properties/company/properties/addr",
|
|
119
|
+
"type": "string",
|
|
120
|
+
"title": "The company address"
|
|
121
|
+
},
|
|
122
|
+
"city": {
|
|
123
|
+
"$id": "#/properties/info/properties/company/properties/city",
|
|
124
|
+
"type": "string",
|
|
125
|
+
"title": "The company city"
|
|
126
|
+
},
|
|
127
|
+
"country": {
|
|
128
|
+
"$id": "#/properties/info/properties/company/properties/country",
|
|
129
|
+
"type": "string",
|
|
130
|
+
"title": "The company country"
|
|
131
|
+
},
|
|
132
|
+
"company_id": {
|
|
133
|
+
"$id": "#/properties/info/properties/company/properties/company_id",
|
|
134
|
+
"type": "string",
|
|
135
|
+
"title": "The company ID"
|
|
136
|
+
},
|
|
137
|
+
"vat_id": {
|
|
138
|
+
"$id": "#/properties/info/properties/company/properties/vat_id",
|
|
139
|
+
"type": "string",
|
|
140
|
+
"title": "The company VAT ID"
|
|
141
|
+
}
|
|
142
|
+
}
|
|
143
|
+
},
|
|
144
|
+
"about": {
|
|
145
|
+
"$id": "#/properties/info/properties/about",
|
|
146
|
+
"type": "object",
|
|
147
|
+
"title": "Stake pool about information",
|
|
148
|
+
"description": "A proof of ownership for an established ITN pool brand.",
|
|
149
|
+
"properties": {
|
|
150
|
+
"me": {
|
|
151
|
+
"$id": "#/properties/info/properties/about/properties/me",
|
|
152
|
+
"type": "string",
|
|
153
|
+
"title": "Stake pool about info"
|
|
154
|
+
},
|
|
155
|
+
"server": {
|
|
156
|
+
"$id": "#/properties/info/properties/about/properties/server",
|
|
157
|
+
"type": "string",
|
|
158
|
+
"title": "Stake pool server about information"
|
|
159
|
+
},
|
|
160
|
+
"company": {
|
|
161
|
+
"$id": "#/properties/info/properties/about/properties/company",
|
|
162
|
+
"type": "string",
|
|
163
|
+
"title": "Stake pool company about info"
|
|
164
|
+
}
|
|
165
|
+
}
|
|
166
|
+
}
|
|
167
|
+
}
|
|
168
|
+
}
|
|
169
|
+
}
|
|
170
|
+
}
|
|
@@ -0,0 +1,276 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$id": "https://raw.githubusercontent.com/cardano-foundation/CIPs/master/CIP-0006/schema.json",
|
|
3
|
+
"$schema": "http://json-schema.org/draft-07/schema",
|
|
4
|
+
"default": {},
|
|
5
|
+
"description": "Additional information for Cardano Stake Pools in CIP-6 format",
|
|
6
|
+
"examples": [
|
|
7
|
+
{
|
|
8
|
+
"serial": 2020072001,
|
|
9
|
+
"pool": {
|
|
10
|
+
"id": "5ee7591bf30eaa4f5dce70b4a676eb02d5be8012d188f04fe3beffb0",
|
|
11
|
+
"country": "DE",
|
|
12
|
+
"status": "active",
|
|
13
|
+
"contact": {
|
|
14
|
+
"primary": "email",
|
|
15
|
+
"email": "help@pooldomain.org",
|
|
16
|
+
"facebook": "demopool",
|
|
17
|
+
"github": "demopool",
|
|
18
|
+
"feed": "https://demopool.com/xml/poolrss.xml",
|
|
19
|
+
"telegram": "demopool",
|
|
20
|
+
"twitter": "demopool"
|
|
21
|
+
},
|
|
22
|
+
"media_assets": {
|
|
23
|
+
"icon_png_64x64": "https://mydemopool.com/icon.png",
|
|
24
|
+
"logo_png": "https://mydemopool.com/logo.png",
|
|
25
|
+
"logo_svg": "https://mydemopool.com/logo.svg",
|
|
26
|
+
"color_fg": "#RRGGBB",
|
|
27
|
+
"color_bg": "#RRGGBB"
|
|
28
|
+
},
|
|
29
|
+
"itn": {
|
|
30
|
+
"owner": "ed25519_pk1...",
|
|
31
|
+
"witness": "ed25519_sig1..."
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
],
|
|
36
|
+
"maxLength": 4096,
|
|
37
|
+
"required": [
|
|
38
|
+
"serial",
|
|
39
|
+
"pool"
|
|
40
|
+
],
|
|
41
|
+
"title": "Extended stake pool metadata",
|
|
42
|
+
"type": "object",
|
|
43
|
+
"properties": {
|
|
44
|
+
"serial": {
|
|
45
|
+
"$id": "#/properties/serial",
|
|
46
|
+
"default": 0,
|
|
47
|
+
"description": "Integer number incremented on every update, by using YYYYMMDDxx (xx each day start by 01 and is incremented on each update",
|
|
48
|
+
"examples": [
|
|
49
|
+
2021012001
|
|
50
|
+
],
|
|
51
|
+
"maxLength": 10,
|
|
52
|
+
"minLength": 10,
|
|
53
|
+
"required": [],
|
|
54
|
+
"title": "serial number",
|
|
55
|
+
"type": "integer"
|
|
56
|
+
},
|
|
57
|
+
"pool": {
|
|
58
|
+
"$id": "#/properties/pool",
|
|
59
|
+
"default": {},
|
|
60
|
+
"description": "pool related metadata",
|
|
61
|
+
"required": [
|
|
62
|
+
"id"
|
|
63
|
+
],
|
|
64
|
+
"title": "stake pool",
|
|
65
|
+
"type": "object",
|
|
66
|
+
"properties": {
|
|
67
|
+
"id": {
|
|
68
|
+
"$id": "#/properties/pool/properties/id",
|
|
69
|
+
"type": "string",
|
|
70
|
+
"title": "Pool ID",
|
|
71
|
+
"description": "the pools unique id in hex format",
|
|
72
|
+
"maxLength": 56,
|
|
73
|
+
"minLength": 56,
|
|
74
|
+
"examples": [
|
|
75
|
+
"5ee7591bf30eaa4f5dce70b4a676eb02d5be8012d188f04fe3beffb0"
|
|
76
|
+
]
|
|
77
|
+
},
|
|
78
|
+
"country": {
|
|
79
|
+
"$id": "#/properties/pool/properties/country",
|
|
80
|
+
"default": "",
|
|
81
|
+
"description": "3 letter country code as defined in https://www.iso.org/iso-3166-country-codes.html (alpha-3)",
|
|
82
|
+
"maxLength": 20,
|
|
83
|
+
"minLength": 2,
|
|
84
|
+
"examples": [
|
|
85
|
+
"JPN"
|
|
86
|
+
],
|
|
87
|
+
"title": "declared pool location",
|
|
88
|
+
"type": "string"
|
|
89
|
+
},
|
|
90
|
+
"status": {
|
|
91
|
+
"$id": "#/properties/pool/properties/status",
|
|
92
|
+
"default": "",
|
|
93
|
+
"maxLength": 12,
|
|
94
|
+
"description": "the current operative status (see examples).",
|
|
95
|
+
"examples": [
|
|
96
|
+
"active",
|
|
97
|
+
"retired",
|
|
98
|
+
"offline",
|
|
99
|
+
"experimental",
|
|
100
|
+
"private"
|
|
101
|
+
],
|
|
102
|
+
"title": "pool status",
|
|
103
|
+
"type": "string"
|
|
104
|
+
},
|
|
105
|
+
"contact": {
|
|
106
|
+
"$id": "#/properties/pool/properties/contact",
|
|
107
|
+
"default": {},
|
|
108
|
+
"description": "Optional contact information.",
|
|
109
|
+
"examples": [
|
|
110
|
+
{
|
|
111
|
+
"primary": "email",
|
|
112
|
+
"email": "help@demopool.org",
|
|
113
|
+
"facebook": "demopool",
|
|
114
|
+
"github": "demopool",
|
|
115
|
+
"feed": "https://mydemopool.com/xml/poolrss.xml",
|
|
116
|
+
"telegram": "demopool",
|
|
117
|
+
"telegram_channel": "https://t.me/coolchannel",
|
|
118
|
+
"twitter": "demopool"
|
|
119
|
+
}
|
|
120
|
+
],
|
|
121
|
+
"required": [
|
|
122
|
+
"primary"
|
|
123
|
+
],
|
|
124
|
+
"title": "Pool contact data",
|
|
125
|
+
"type": "object",
|
|
126
|
+
"properties": {
|
|
127
|
+
"primary": {
|
|
128
|
+
"$id": "#/properties/pool/properties/contact/properties/primary",
|
|
129
|
+
"default": "email",
|
|
130
|
+
"description": "the pools preferred communication channel",
|
|
131
|
+
"title": "primary contact preference",
|
|
132
|
+
"type": "string"
|
|
133
|
+
},
|
|
134
|
+
"email": {
|
|
135
|
+
"$id": "#/properties/pool/properties/contact/properties/email",
|
|
136
|
+
"description": "valid email contact address",
|
|
137
|
+
"title": "email address",
|
|
138
|
+
"type": "string"
|
|
139
|
+
},
|
|
140
|
+
"facebook": {
|
|
141
|
+
"$id": "#/properties/pool/properties/contact/properties/facebook",
|
|
142
|
+
"description": "a user or page name",
|
|
143
|
+
"title": "facebook account",
|
|
144
|
+
"examples": [
|
|
145
|
+
"demopool"
|
|
146
|
+
],
|
|
147
|
+
"type": "string"
|
|
148
|
+
},
|
|
149
|
+
"github": {
|
|
150
|
+
"$id": "#/properties/pool/properties/contact/properties/github",
|
|
151
|
+
"description": "a github username",
|
|
152
|
+
"examples": [
|
|
153
|
+
"demopool"
|
|
154
|
+
],
|
|
155
|
+
"title": "github account",
|
|
156
|
+
"type": "string"
|
|
157
|
+
},
|
|
158
|
+
"feed": {
|
|
159
|
+
"$id": "#/properties/pool/properties/contact/properties/feed",
|
|
160
|
+
"default": "",
|
|
161
|
+
"description": "RSS feed URL",
|
|
162
|
+
"examples": [
|
|
163
|
+
"https://mydemopool.com/xml/poolrss.xml"
|
|
164
|
+
],
|
|
165
|
+
"title": "RSS feed",
|
|
166
|
+
"type": "string"
|
|
167
|
+
},
|
|
168
|
+
"telegram": {
|
|
169
|
+
"$id": "#/properties/pool/properties/contact/properties/telegram",
|
|
170
|
+
"description": "a telegram username",
|
|
171
|
+
"examples": [
|
|
172
|
+
"demopool"
|
|
173
|
+
],
|
|
174
|
+
"title": "telegram account",
|
|
175
|
+
"type": "string"
|
|
176
|
+
},
|
|
177
|
+
"twitter": {
|
|
178
|
+
"$id": "#/properties/pool/properties/contact/properties/twitter",
|
|
179
|
+
"description": "a twitter username",
|
|
180
|
+
"examples": [
|
|
181
|
+
"demopool"
|
|
182
|
+
],
|
|
183
|
+
"title": "twitter account",
|
|
184
|
+
"type": "string"
|
|
185
|
+
}
|
|
186
|
+
}
|
|
187
|
+
},
|
|
188
|
+
"media_assets": {
|
|
189
|
+
"$id": "#/properties/pool/properties/media_assets",
|
|
190
|
+
"type": "object",
|
|
191
|
+
"title": "The pools media assets",
|
|
192
|
+
"description": "Media file URLs and colors",
|
|
193
|
+
"required": [
|
|
194
|
+
"icon_png_64x64"
|
|
195
|
+
],
|
|
196
|
+
"properties": {
|
|
197
|
+
"icon_png_64x64": {
|
|
198
|
+
"$id": "#/properties/pool/properties/media_assets/properties/icon_png_64x64",
|
|
199
|
+
"type": "string",
|
|
200
|
+
"title": "Pool Icon in PNG file format 64x64 px",
|
|
201
|
+
"description": "PNG image with exact 64x64 pixel size",
|
|
202
|
+
"examples": [
|
|
203
|
+
"https://mydemopool.com/media/icon64.png"
|
|
204
|
+
]
|
|
205
|
+
},
|
|
206
|
+
"logo_png": {
|
|
207
|
+
"$id": "#/properties/pool/properties/media_assets/properties/logo_png",
|
|
208
|
+
"type": "string",
|
|
209
|
+
"title": "Pool Logo in PNG file format",
|
|
210
|
+
"description": "PNG image (should have less than 250 kByte of file size)",
|
|
211
|
+
"examples": [
|
|
212
|
+
"https://mydemopool.com/media/logo.png"
|
|
213
|
+
]
|
|
214
|
+
},
|
|
215
|
+
"logo_svg": {
|
|
216
|
+
"$id": "#/properties/pool/properties/media_assets/properties/logo_svg",
|
|
217
|
+
"type": "string",
|
|
218
|
+
"title": "Pool Logo in SVG file format",
|
|
219
|
+
"description": "(should have less tha 250 kByte of file size)",
|
|
220
|
+
"examples": [
|
|
221
|
+
"https://mydemopool.com/media/logo.svg"
|
|
222
|
+
]
|
|
223
|
+
},
|
|
224
|
+
"color_fg": {
|
|
225
|
+
"$id": "#/properties/pool/properties/media_assets/properties/color_fg",
|
|
226
|
+
"type": "string",
|
|
227
|
+
"title": "Pool primary color",
|
|
228
|
+
"description": "RGB color code.",
|
|
229
|
+
"examples": [
|
|
230
|
+
"#AABBCC"
|
|
231
|
+
]
|
|
232
|
+
},
|
|
233
|
+
"color_bg": {
|
|
234
|
+
"$id": "#/properties/pool/properties/media_assets/properties/color_bg",
|
|
235
|
+
"type": "string",
|
|
236
|
+
"title": "Pool secondary color",
|
|
237
|
+
"description": "RGB color code.",
|
|
238
|
+
"default": "",
|
|
239
|
+
"examples": [
|
|
240
|
+
"#C0C0C0"
|
|
241
|
+
]
|
|
242
|
+
}
|
|
243
|
+
}
|
|
244
|
+
},
|
|
245
|
+
"itn": {
|
|
246
|
+
"$id": "#/properties/pool/properties/itn",
|
|
247
|
+
"type": "object",
|
|
248
|
+
"title": "ITN verification",
|
|
249
|
+
"description": "A proof of ownership for an established ITN pool brand.",
|
|
250
|
+
"required": [
|
|
251
|
+
"owner",
|
|
252
|
+
"witness"
|
|
253
|
+
],
|
|
254
|
+
"properties": {
|
|
255
|
+
"owner": {
|
|
256
|
+
"$id": "#/properties/pool/properties/itn/properties/owner",
|
|
257
|
+
"type": "string",
|
|
258
|
+
"title": "the ITN pool owner public key",
|
|
259
|
+
"examples": [
|
|
260
|
+
"ed25519_pk1..."
|
|
261
|
+
]
|
|
262
|
+
},
|
|
263
|
+
"witness": {
|
|
264
|
+
"$id": "#/properties/pool/properties/itn/properties/witness",
|
|
265
|
+
"type": "string",
|
|
266
|
+
"title": "the secret key generated witness",
|
|
267
|
+
"examples": [
|
|
268
|
+
"ed25519_sig1..."
|
|
269
|
+
]
|
|
270
|
+
}
|
|
271
|
+
}
|
|
272
|
+
}
|
|
273
|
+
}
|
|
274
|
+
}
|
|
275
|
+
}
|
|
276
|
+
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mappers.d.ts","sourceRoot":"","sources":["../../../../src/Utxo/DbSyncUtxoProvider/mappers.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAgB,MAAM,mBAAmB,CAAC;AAC1D,OAAO,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;
|
|
1
|
+
{"version":3,"file":"mappers.d.ts","sourceRoot":"","sources":["../../../../src/Utxo/DbSyncUtxoProvider/mappers.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAgB,MAAM,mBAAmB,CAAC;AAC1D,OAAO,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AAUpC,eAAO,MAAM,WAAW,gBAAiB,SAAS,EAAE,KAAG,QAAQ,IAAI,EAuClE,CAAC"}
|
|
@@ -3,6 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.utxosToCore = void 0;
|
|
4
4
|
const core_1 = require("@cardano-sdk/core");
|
|
5
5
|
const util_1 = require("./util");
|
|
6
|
+
const util_2 = require("@cardano-sdk/util");
|
|
6
7
|
const utxosToCore = (utxosModels) => {
|
|
7
8
|
const utxosMap = utxosModels.reduce((utxos, current) => {
|
|
8
9
|
const utxoId = (0, core_1.createUtxoId)(current.tx_id, current.index);
|
|
@@ -10,7 +11,7 @@ const utxosToCore = (utxosModels) => {
|
|
|
10
11
|
if (utxo) {
|
|
11
12
|
const txIn = utxo[0];
|
|
12
13
|
const txOut = utxo[1];
|
|
13
|
-
if (current.asset_name && current.asset_policy && current.asset_quantity) {
|
|
14
|
+
if ((0, util_2.isNotNil)(current.asset_name) && current.asset_policy && current.asset_quantity) {
|
|
14
15
|
const newAssets = txOut.value.assets || new Map();
|
|
15
16
|
newAssets.set((0, util_1.generateAssetId)(current.asset_policy, current.asset_name), BigInt(current.asset_quantity));
|
|
16
17
|
txOut.value.assets = newAssets;
|
|
@@ -27,7 +28,7 @@ const utxosToCore = (utxosModels) => {
|
|
|
27
28
|
};
|
|
28
29
|
if (current.data_hash)
|
|
29
30
|
txOut.datum = core_1.Cardano.util.Hash32ByteBase16(current.data_hash);
|
|
30
|
-
if (current.asset_name && current.asset_policy && current.asset_quantity) {
|
|
31
|
+
if ((0, util_2.isNotNil)(current.asset_name) && current.asset_policy && current.asset_quantity) {
|
|
31
32
|
txOut.value.assets = new Map([
|
|
32
33
|
[(0, util_1.generateAssetId)(current.asset_policy, current.asset_name), BigInt(current.asset_quantity)]
|
|
33
34
|
]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mappers.js","sourceRoot":"","sources":["../../../../src/Utxo/DbSyncUtxoProvider/mappers.ts"],"names":[],"mappings":";;;AAAA,4CAA0D;AAE1D,iCAAyC;
|
|
1
|
+
{"version":3,"file":"mappers.js","sourceRoot":"","sources":["../../../../src/Utxo/DbSyncUtxoProvider/mappers.ts"],"names":[],"mappings":";;;AAAA,4CAA0D;AAE1D,iCAAyC;AACzC,4CAA6C;AAQtC,MAAM,WAAW,GAAG,CAAC,WAAwB,EAAkB,EAAE;IACtE,MAAM,QAAQ,GAAG,WAAW,CAAC,MAAM,CAAC,CAAC,KAAK,EAAE,OAAO,EAAE,EAAE;QACrD,MAAM,MAAM,GAAG,IAAA,mBAAY,EAAC,OAAO,CAAC,KAAK,EAAE,OAAO,CAAC,KAAK,CAAC,CAAC;QAC1D,MAAM,IAAI,GAAG,KAAK,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;QAC/B,IAAI,IAAI,EAAE;YACR,MAAM,IAAI,GAAG,IAAI,CAAC,CAAC,CAAC,CAAC;YACrB,MAAM,KAAK,GAAG,IAAI,CAAC,CAAC,CAAC,CAAC;YACtB,IAAI,IAAA,eAAQ,EAAC,OAAO,CAAC,UAAU,CAAC,IAAI,OAAO,CAAC,YAAY,IAAI,OAAO,CAAC,cAAc,EAAE;gBAClF,MAAM,SAAS,GAAG,KAAK,CAAC,KAAK,CAAC,MAAM,IAAI,IAAI,GAAG,EAA2B,CAAC;gBAC3E,SAAS,CAAC,GAAG,CAAC,IAAA,sBAAe,EAAC,OAAO,CAAC,YAAY,EAAE,OAAO,CAAC,UAAU,CAAC,EAAE,MAAM,CAAC,OAAO,CAAC,cAAc,CAAC,CAAC,CAAC;gBACzG,KAAK,CAAC,KAAK,CAAC,MAAM,GAAG,SAAS,CAAC;aAChC;YACD,KAAK,CAAC,GAAG,CAAC,MAAM,EAAE,CAAC,IAAI,EAAE,KAAK,CAAC,CAAC,CAAC;SAClC;aAAM;YACL,MAAM,OAAO,GAAG,cAAO,CAAC,OAAO,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC;YACjD,MAAM,KAAK,GAAkB;gBAC3B,OAAO;gBACP,KAAK,EAAE;oBACL,KAAK,EAAE,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC;iBAC7B;aACF,CAAC;YACF,IAAI,OAAO,CAAC,SAAS;gBAAE,KAAK,CAAC,KAAK,GAAG,cAAO,CAAC,IAAI,CAAC,gBAAgB,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC;YACtF,IAAI,IAAA,eAAQ,EAAC,OAAO,CAAC,UAAU,CAAC,IAAI,OAAO,CAAC,YAAY,IAAI,OAAO,CAAC,cAAc,EAAE;gBAClF,KAAK,CAAC,KAAK,CAAC,MAAM,GAAG,IAAI,GAAG,CAA0B;oBACpD,CAAC,IAAA,sBAAe,EAAC,OAAO,CAAC,YAAY,EAAE,OAAO,CAAC,UAAU,CAAC,EAAE,MAAM,CAAC,OAAO,CAAC,cAAc,CAAC,CAAC;iBAC5F,CAAC,CAAC;aACJ;YACD,KAAK,CAAC,GAAG,CAAC,MAAM,EAAE;gBAChB;oBACE,OAAO;oBACP,KAAK,EAAE,OAAO,CAAC,KAAK;oBACpB,IAAI,EAAE,cAAO,CAAC,aAAa,CAAC,OAAO,CAAC,KAAK,CAAC;iBAC3C;gBACD,KAAK;aACN,CAAC,CAAC;SACJ;QACD,OAAO,KAAK,CAAC;IACf,CAAC,EAAE,IAAI,GAAG,EAAwB,CAAC,CAAC;IACpC,OAAO,CAAC,GAAG,QAAQ,CAAC,MAAM,EAAE,CAAC,CAAC;AAChC,CAAC,CAAC;AAvCW,QAAA,WAAW,eAuCtB"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cardano-sdk/cardano-services",
|
|
3
|
-
"version": "0.6.
|
|
3
|
+
"version": "0.6.1-nightly.1",
|
|
4
4
|
"description": "Cardano GraphQL Services",
|
|
5
5
|
"engines": {
|
|
6
6
|
"node": ">=14.20.1"
|
|
@@ -61,8 +61,9 @@
|
|
|
61
61
|
"tscNoEmit": "shx echo typescript --noEmit command not implemented yet"
|
|
62
62
|
},
|
|
63
63
|
"devDependencies": {
|
|
64
|
-
"@cardano-
|
|
65
|
-
"@cardano-sdk/
|
|
64
|
+
"@cardano-ogmios/client": "5.5.5",
|
|
65
|
+
"@cardano-sdk/cardano-services-client": "^0.6.1-nightly.0",
|
|
66
|
+
"@cardano-sdk/util-dev": "^0.5.1-nightly.0",
|
|
66
67
|
"@types/amqplib": "^0.8.2",
|
|
67
68
|
"@types/bunyan": "^1.8.8",
|
|
68
69
|
"@types/clear": "^0.1.2",
|
|
@@ -73,7 +74,6 @@
|
|
|
73
74
|
"@types/lodash": "^4.14.182",
|
|
74
75
|
"@types/pg": "^8.6.5",
|
|
75
76
|
"@types/wait-on": "^5.3.1",
|
|
76
|
-
"axios": "^0.27.2",
|
|
77
77
|
"cbor": "^8.1.0",
|
|
78
78
|
"dockerode": "^3.3.1",
|
|
79
79
|
"dockerode-utils": "^0.0.7",
|
|
@@ -91,10 +91,12 @@
|
|
|
91
91
|
"wait-on": "^6.0.1"
|
|
92
92
|
},
|
|
93
93
|
"dependencies": {
|
|
94
|
-
"@cardano-sdk/core": "^0.6.0",
|
|
95
|
-
"@cardano-sdk/ogmios": "^0.6.0",
|
|
96
|
-
"@cardano-sdk/util": "^0.6.0",
|
|
94
|
+
"@cardano-sdk/core": "^0.6.1-nightly.0",
|
|
95
|
+
"@cardano-sdk/ogmios": "^0.6.1-nightly.0",
|
|
96
|
+
"@cardano-sdk/util": "^0.6.1-nightly.0",
|
|
97
97
|
"amqplib": "^0.10.0",
|
|
98
|
+
"axios": "^0.27.2",
|
|
99
|
+
"bignumber.js": "^9.1.0",
|
|
98
100
|
"body-parser": "^1.19.2",
|
|
99
101
|
"bunyan": "^1.8.15",
|
|
100
102
|
"clear": "^0.1.0",
|
|
@@ -124,5 +126,5 @@
|
|
|
124
126
|
"LICENSE",
|
|
125
127
|
"NOTICE"
|
|
126
128
|
],
|
|
127
|
-
"gitHead": "
|
|
129
|
+
"gitHead": "1a7b69f166028f5d29f2d30a7d0205d1c9ffaa15"
|
|
128
130
|
}
|