-
Notifications
You must be signed in to change notification settings - Fork 6
/
AbiTypes.swift
702 lines (615 loc) · 23.9 KB
/
AbiTypes.swift
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
public typealias TSDKAbiHandle = UInt32
public enum TSDKAbiErrorCode: Int, Codable {
case RequiredAddressMissingForEncodeMessage = 301
case RequiredCallSetMissingForEncodeMessage = 302
case InvalidJson = 303
case InvalidMessage = 304
case EncodeDeployMessageFailed = 305
case EncodeRunMessageFailed = 306
case AttachSignatureFailed = 307
case InvalidTvcImage = 308
case RequiredPublicKeyMissingForFunctionHeader = 309
case InvalidSigner = 310
case InvalidAbi = 311
case InvalidFunctionId = 312
case InvalidData = 313
case EncodeInitialDataFailed = 314
}
public enum TSDKAbiEnumTypes: String, Codable {
case Contract = "Contract"
case Json = "Json"
case Handle = "Handle"
case Serialized = "Serialized"
}
public enum TSDKSignerEnumTypes: String, Codable {
case None = "None"
case External = "External"
case Keys = "Keys"
case SigningBox = "SigningBox"
}
public enum TSDKMessageBodyType: String, Codable {
case Input = "Input"
case Output = "Output"
case InternalOutput = "InternalOutput"
case Event = "Event"
}
public enum TSDKStateInitSourceEnumTypes: String, Codable {
case Message = "Message"
case StateInit = "StateInit"
case Tvc = "Tvc"
}
public enum TSDKMessageSourceEnumTypes: String, Codable {
case Encoded = "Encoded"
case EncodingParams = "EncodingParams"
}
public struct TSDKAbi: Codable {
public var type: TSDKAbiEnumTypes
public var value: AnyValue?
public init(type: TSDKAbiEnumTypes, value: AnyValue? = nil) {
self.type = type
self.value = value
}
}
public struct TSDKFunctionHeader: Codable {
/// Message expiration time in seconds. If not specified - calculated automatically from message_expiration_timeout(), try_index and message_expiration_timeout_grow_factor() (if ABI includes `expire` header).
public var expire: UInt32?
/// Message creation time in milliseconds.
/// If not specified, `now` is used (if ABI includes `time` header).
public var time: Int?
/// Public key is used by the contract to check the signature.
/// Encoded in `hex`. If not specified, method fails with exception (if ABI includes `pubkey` header)..
public var pubkey: String?
public init(expire: UInt32? = nil, time: Int? = nil, pubkey: String? = nil) {
self.expire = expire
self.time = time
self.pubkey = pubkey
}
}
public struct TSDKCallSet: Codable {
/// Function name that is being called. Or function id encoded as string in hex (starting with 0x).
public var function_name: String
/// Function header.
/// If an application omits some header parameters required by thecontract's ABI, the library will set the default values forthem.
public var header: TSDKFunctionHeader?
/// Function input parameters according to ABI.
public var input: AnyValue?
public init(function_name: String, header: TSDKFunctionHeader? = nil, input: AnyValue? = nil) {
self.function_name = function_name
self.header = header
self.input = input
}
}
public struct TSDKDeploySet: Codable {
/// Content of TVC file encoded in `base64`.
public var tvc: String
/// Target workchain for destination address.
/// Default is `0`.
public var workchain_id: Int32?
/// List of initial values for contract's public variables.
public var initial_data: AnyValue?
/// Optional public key that can be provided in deploy set in order to substitute one in TVM file or provided by Signer.
/// Public key resolving priority:
/// 1. Public key from deploy set.
/// 2. Public key, specified in TVM file.
/// 3. Public key, provided by Signer.
public var initial_pubkey: String?
public init(tvc: String, workchain_id: Int32? = nil, initial_data: AnyValue? = nil, initial_pubkey: String? = nil) {
self.tvc = tvc
self.workchain_id = workchain_id
self.initial_data = initial_data
self.initial_pubkey = initial_pubkey
}
}
public struct TSDKSigner: Codable {
public var type: TSDKSignerEnumTypes
public var public_key: String?
public var keys: TSDKKeyPair?
public var handle: TSDKSigningBoxHandle?
public init(type: TSDKSignerEnumTypes, public_key: String? = nil, keys: TSDKKeyPair? = nil, handle: TSDKSigningBoxHandle? = nil) {
self.type = type
self.public_key = public_key
self.keys = keys
self.handle = handle
}
}
public struct TSDKStateInitSource: Codable {
public var type: TSDKStateInitSourceEnumTypes
public var source: TSDKMessageSource?
/// Code BOC.
/// Encoded in `base64`.
public var code: String?
/// Data BOC.
/// Encoded in `base64`.
public var data: String?
/// Library BOC.
/// Encoded in `base64`.
public var library: String?
public var tvc: String?
public var public_key: String?
public var init_params: TSDKStateInitParams?
public init(type: TSDKStateInitSourceEnumTypes, source: TSDKMessageSource? = nil, code: String? = nil, data: String? = nil, library: String? = nil, tvc: String? = nil, public_key: String? = nil, init_params: TSDKStateInitParams? = nil) {
self.type = type
self.source = source
self.code = code
self.data = data
self.library = library
self.tvc = tvc
self.public_key = public_key
self.init_params = init_params
}
}
public struct TSDKStateInitParams: Codable {
public var abi: TSDKAbi
public var value: AnyValue
public init(abi: TSDKAbi, value: AnyValue) {
self.abi = abi
self.value = value
}
}
public struct TSDKMessageSource: Codable {
public var type: TSDKMessageSourceEnumTypes
public var message: String?
public var abi: TSDKAbi?
public init(type: TSDKMessageSourceEnumTypes, message: String? = nil, abi: TSDKAbi? = nil) {
self.type = type
self.message = message
self.abi = abi
}
}
public struct TSDKAbiParam: Codable {
public var name: String
public var type: String
public var components: [TSDKAbiParam]?
public init(name: String, type: String, components: [TSDKAbiParam]? = nil) {
self.name = name
self.type = type
self.components = components
}
}
public struct TSDKAbiEvent: Codable {
public var name: String
public var inputs: [TSDKAbiParam]
public var id: String?
public init(name: String, inputs: [TSDKAbiParam], id: String? = nil) {
self.name = name
self.inputs = inputs
self.id = id
}
}
public struct TSDKAbiData: Codable {
public var key: UInt32
public var name: String
public var type: String
public var components: [TSDKAbiParam]?
public init(key: UInt32, name: String, type: String, components: [TSDKAbiParam]? = nil) {
self.key = key
self.name = name
self.type = type
self.components = components
}
}
public struct TSDKAbiFunction: Codable {
public var name: String
public var inputs: [TSDKAbiParam]
public var outputs: [TSDKAbiParam]
public var id: String?
public init(name: String, inputs: [TSDKAbiParam], outputs: [TSDKAbiParam], id: String? = nil) {
self.name = name
self.inputs = inputs
self.outputs = outputs
self.id = id
}
}
public struct TSDKAbiContract: Codable {
public var abi_version: UInt32?
public var version: String?
public var header: [String]?
public var functions: [TSDKAbiFunction]?
public var events: [TSDKAbiEvent]?
public var data: [TSDKAbiData]?
public var fields: [TSDKAbiParam]?
public init(abi_version: UInt32? = nil, version: String? = nil, header: [String]? = nil, functions: [TSDKAbiFunction]? = nil, events: [TSDKAbiEvent]? = nil, data: [TSDKAbiData]? = nil, fields: [TSDKAbiParam]? = nil) {
self.abi_version = abi_version
self.version = version
self.header = header
self.functions = functions
self.events = events
self.data = data
self.fields = fields
}
}
public struct TSDKParamsOfEncodeMessageBody: Codable {
/// Contract ABI.
public var abi: TSDKAbi
/// Function call parameters.
/// Must be specified in non deploy message.
/// In case of deploy message contains parameters of constructor.
public var call_set: TSDKCallSet
/// True if internal message body must be encoded.
public var is_internal: Bool
/// Signing parameters.
public var signer: TSDKSigner
/// Processing try index.
/// Used in message processing with retries.
/// Encoder uses the provided try index to calculate messageexpiration time.
/// Expiration timeouts will grow with every retry.
/// Default value is 0.
public var processing_try_index: UInt8?
public init(abi: TSDKAbi, call_set: TSDKCallSet, is_internal: Bool, signer: TSDKSigner, processing_try_index: UInt8? = nil) {
self.abi = abi
self.call_set = call_set
self.is_internal = is_internal
self.signer = signer
self.processing_try_index = processing_try_index
}
}
public struct TSDKResultOfEncodeMessageBody: Codable {
/// Message body BOC encoded with `base64`.
public var body: String
/// Optional data to sign.
/// Encoded with `base64`.
/// /// Presents when `message` is unsigned. Can be used for externalmessage signing. Is this case you need to sing this data andproduce signed message using `abi.attach_signature`.
public var data_to_sign: String?
public init(body: String, data_to_sign: String? = nil) {
self.body = body
self.data_to_sign = data_to_sign
}
}
public struct TSDKParamsOfAttachSignatureToMessageBody: Codable {
/// Contract ABI
public var abi: TSDKAbi
/// Public key.
/// Must be encoded with `hex`.
public var public_key: String
/// Unsigned message body BOC.
/// Must be encoded with `base64`.
public var message: String
/// Signature.
/// Must be encoded with `hex`.
public var signature: String
public init(abi: TSDKAbi, public_key: String, message: String, signature: String) {
self.abi = abi
self.public_key = public_key
self.message = message
self.signature = signature
}
}
public struct TSDKResultOfAttachSignatureToMessageBody: Codable {
public var body: String
public init(body: String) {
self.body = body
}
}
public struct TSDKParamsOfEncodeMessage: Codable {
/// Contract ABI.
public var abi: TSDKAbi
/// Target address the message will be sent to.
/// Must be specified in case of non-deploy message.
public var address: String?
/// Deploy parameters.
/// Must be specified in case of deploy message.
public var deploy_set: TSDKDeploySet?
/// Function call parameters.
/// Must be specified in case of non-deploy message.
/// In case of deploy message it is optional and contains parametersof the functions that will to be called upon deploy transaction.
public var call_set: TSDKCallSet?
/// Signing parameters.
public var signer: TSDKSigner
/// Processing try index.
/// Used in message processing with retries (if contract's ABI includes "expire" header).
/// Encoder uses the provided try index to calculate messageexpiration time. The 1st message expiration time is specified inClient config.
/// Expiration timeouts will grow with every retry.
/// Retry grow factor is set in Client config:
/// <.....add config parameter with default value here>Default value is 0.
public var processing_try_index: UInt8?
public init(abi: TSDKAbi, address: String? = nil, deploy_set: TSDKDeploySet? = nil, call_set: TSDKCallSet? = nil, signer: TSDKSigner, processing_try_index: UInt8? = nil) {
self.abi = abi
self.address = address
self.deploy_set = deploy_set
self.call_set = call_set
self.signer = signer
self.processing_try_index = processing_try_index
}
}
public struct TSDKResultOfEncodeMessage: Codable {
/// Message BOC encoded with `base64`.
public var message: String
/// Optional data to be signed encoded in `base64`.
/// Returned in case of `Signer::External`. Can be used for externalmessage signing. Is this case you need to use this data to create signature andthen produce signed message using `abi.attach_signature`.
public var data_to_sign: String?
/// Destination address.
public var address: String
/// Message id.
public var message_id: String
public init(message: String, data_to_sign: String? = nil, address: String, message_id: String) {
self.message = message
self.data_to_sign = data_to_sign
self.address = address
self.message_id = message_id
}
}
public struct TSDKParamsOfEncodeInternalMessage: Codable {
/// Contract ABI.
/// Can be None if both deploy_set and call_set are None.
public var abi: TSDKAbi?
/// Target address the message will be sent to.
/// Must be specified in case of non-deploy message.
public var address: String?
/// Source address of the message.
public var src_address: String?
/// Deploy parameters.
/// Must be specified in case of deploy message.
public var deploy_set: TSDKDeploySet?
/// Function call parameters.
/// Must be specified in case of non-deploy message.
/// In case of deploy message it is optional and contains parametersof the functions that will to be called upon deploy transaction.
public var call_set: TSDKCallSet?
/// Value in nanotokens to be sent with message.
public var value: String
/// Flag of bounceable message.
/// Default is true.
public var bounce: Bool?
/// Enable Instant Hypercube Routing for the message.
/// Default is false.
public var enable_ihr: Bool?
public init(abi: TSDKAbi? = nil, address: String? = nil, src_address: String? = nil, deploy_set: TSDKDeploySet? = nil, call_set: TSDKCallSet? = nil, value: String, bounce: Bool? = nil, enable_ihr: Bool? = nil) {
self.abi = abi
self.address = address
self.src_address = src_address
self.deploy_set = deploy_set
self.call_set = call_set
self.value = value
self.bounce = bounce
self.enable_ihr = enable_ihr
}
}
public struct TSDKResultOfEncodeInternalMessage: Codable {
/// Message BOC encoded with `base64`.
public var message: String
/// Destination address.
public var address: String
/// Message id.
public var message_id: String
public init(message: String, address: String, message_id: String) {
self.message = message
self.address = address
self.message_id = message_id
}
}
public struct TSDKParamsOfAttachSignature: Codable {
/// Contract ABI
public var abi: TSDKAbi
/// Public key encoded in `hex`.
public var public_key: String
/// Unsigned message BOC encoded in `base64`.
public var message: String
/// Signature encoded in `hex`.
public var signature: String
public init(abi: TSDKAbi, public_key: String, message: String, signature: String) {
self.abi = abi
self.public_key = public_key
self.message = message
self.signature = signature
}
}
public struct TSDKResultOfAttachSignature: Codable {
/// Signed message BOC
public var message: String
/// Message ID
public var message_id: String
public init(message: String, message_id: String) {
self.message = message
self.message_id = message_id
}
}
public struct TSDKParamsOfDecodeMessage: Codable {
/// contract ABI
public var abi: TSDKAbi
/// Message BOC
public var message: String
/// Flag allowing partial BOC decoding when ABI doesn't describe the full body BOC. Controls decoder behaviour when after decoding all described in ABI params there are some data left in BOC: `true` - return decoded values `false` - return error of incomplete BOC deserialization (default)
public var allow_partial: Bool?
public init(abi: TSDKAbi, message: String, allow_partial: Bool? = nil) {
self.abi = abi
self.message = message
self.allow_partial = allow_partial
}
}
public struct TSDKDecodedMessageBody: Codable {
/// Type of the message body content.
public var body_type: TSDKMessageBodyType
/// Function or event name.
public var name: String
/// Parameters or result value.
public var value: AnyValue?
/// Function header.
public var header: TSDKFunctionHeader?
public init(body_type: TSDKMessageBodyType, name: String, value: AnyValue? = nil, header: TSDKFunctionHeader? = nil) {
self.body_type = body_type
self.name = name
self.value = value
self.header = header
}
}
public struct TSDKParamsOfDecodeMessageBody: Codable {
/// Contract ABI used to decode.
public var abi: TSDKAbi
/// Message body BOC encoded in `base64`.
public var body: String
/// True if the body belongs to the internal message.
public var is_internal: Bool
/// Flag allowing partial BOC decoding when ABI doesn't describe the full body BOC. Controls decoder behaviour when after decoding all described in ABI params there are some data left in BOC: `true` - return decoded values `false` - return error of incomplete BOC deserialization (default)
public var allow_partial: Bool?
public init(abi: TSDKAbi, body: String, is_internal: Bool, allow_partial: Bool? = nil) {
self.abi = abi
self.body = body
self.is_internal = is_internal
self.allow_partial = allow_partial
}
}
public struct TSDKParamsOfEncodeAccount: Codable {
/// Source of the account state init.
public var state_init: TSDKStateInitSource
/// Initial balance.
public var balance: Int?
/// Initial value for the `last_trans_lt`.
public var last_trans_lt: Int?
/// Initial value for the `last_paid`.
public var last_paid: UInt32?
/// Cache type to put the result.
/// The BOC itself returned if no cache type provided
public var boc_cache: TSDKBocCacheType?
public init(state_init: TSDKStateInitSource, balance: Int? = nil, last_trans_lt: Int? = nil, last_paid: UInt32? = nil, boc_cache: TSDKBocCacheType? = nil) {
self.state_init = state_init
self.balance = balance
self.last_trans_lt = last_trans_lt
self.last_paid = last_paid
self.boc_cache = boc_cache
}
}
public struct TSDKResultOfEncodeAccount: Codable {
/// Account BOC encoded in `base64`.
public var account: String
/// Account ID encoded in `hex`.
public var id: String
public init(account: String, id: String) {
self.account = account
self.id = id
}
}
public struct TSDKParamsOfDecodeAccountData: Codable {
/// Contract ABI
public var abi: TSDKAbi
/// Data BOC or BOC handle
public var data: String
/// Flag allowing partial BOC decoding when ABI doesn't describe the full body BOC. Controls decoder behaviour when after decoding all described in ABI params there are some data left in BOC: `true` - return decoded values `false` - return error of incomplete BOC deserialization (default)
public var allow_partial: Bool?
public init(abi: TSDKAbi, data: String, allow_partial: Bool? = nil) {
self.abi = abi
self.data = data
self.allow_partial = allow_partial
}
}
public struct TSDKResultOfDecodeAccountData: Codable {
/// Decoded data as a JSON structure.
public var data: AnyValue
public init(data: AnyValue) {
self.data = data
}
}
public struct TSDKParamsOfUpdateInitialData: Codable {
/// Contract ABI
public var abi: TSDKAbi?
/// Data BOC or BOC handle
public var data: String
/// List of initial values for contract's static variables.
/// `abi` parameter should be provided to set initial data
public var initial_data: AnyValue?
/// Initial account owner's public key to set into account data
public var initial_pubkey: String?
/// Cache type to put the result. The BOC itself returned if no cache type provided.
public var boc_cache: TSDKBocCacheType?
public init(abi: TSDKAbi? = nil, data: String, initial_data: AnyValue? = nil, initial_pubkey: String? = nil, boc_cache: TSDKBocCacheType? = nil) {
self.abi = abi
self.data = data
self.initial_data = initial_data
self.initial_pubkey = initial_pubkey
self.boc_cache = boc_cache
}
}
public struct TSDKResultOfUpdateInitialData: Codable {
/// Updated data BOC or BOC handle
public var data: String
public init(data: String) {
self.data = data
}
}
public struct TSDKParamsOfEncodeInitialData: Codable {
/// Contract ABI
public var abi: TSDKAbi?
/// List of initial values for contract's static variables.
/// `abi` parameter should be provided to set initial data
public var initial_data: AnyValue?
/// Initial account owner's public key to set into account data
public var initial_pubkey: String?
/// Cache type to put the result. The BOC itself returned if no cache type provided.
public var boc_cache: TSDKBocCacheType?
public init(abi: TSDKAbi? = nil, initial_data: AnyValue? = nil, initial_pubkey: String? = nil, boc_cache: TSDKBocCacheType? = nil) {
self.abi = abi
self.initial_data = initial_data
self.initial_pubkey = initial_pubkey
self.boc_cache = boc_cache
}
}
public struct TSDKResultOfEncodeInitialData: Codable {
/// Updated data BOC or BOC handle
public var data: String
public init(data: String) {
self.data = data
}
}
public struct TSDKParamsOfDecodeInitialData: Codable {
/// Contract ABI.
/// Initial data is decoded if this parameter is provided
public var abi: TSDKAbi?
/// Data BOC or BOC handle
public var data: String
/// Flag allowing partial BOC decoding when ABI doesn't describe the full body BOC. Controls decoder behaviour when after decoding all described in ABI params there are some data left in BOC: `true` - return decoded values `false` - return error of incomplete BOC deserialization (default)
public var allow_partial: Bool?
public init(abi: TSDKAbi? = nil, data: String, allow_partial: Bool? = nil) {
self.abi = abi
self.data = data
self.allow_partial = allow_partial
}
}
public struct TSDKResultOfDecodeInitialData: Codable {
/// List of initial values of contract's public variables.
/// Initial data is decoded if `abi` input parameter is provided
public var initial_data: AnyValue?
/// Initial account owner's public key
public var initial_pubkey: String
public init(initial_data: AnyValue? = nil, initial_pubkey: String) {
self.initial_data = initial_data
self.initial_pubkey = initial_pubkey
}
}
public struct TSDKParamsOfDecodeBoc: Codable {
/// Parameters to decode from BOC
public var params: [TSDKAbiParam]
/// Data BOC or BOC handle
public var boc: String
public var allow_partial: Bool
public init(params: [TSDKAbiParam], boc: String, allow_partial: Bool) {
self.params = params
self.boc = boc
self.allow_partial = allow_partial
}
}
public struct TSDKResultOfDecodeBoc: Codable {
/// Decoded data as a JSON structure.
public var data: AnyValue
public init(data: AnyValue) {
self.data = data
}
}
public struct TSDKParamsOfAbiEncodeBoc: Codable {
/// Parameters to encode into BOC
public var params: [TSDKAbiParam]
/// Parameters and values as a JSON structure
public var data: AnyValue
/// Cache type to put the result.
/// The BOC itself returned if no cache type provided
public var boc_cache: TSDKBocCacheType?
public init(params: [TSDKAbiParam], data: AnyValue, boc_cache: TSDKBocCacheType? = nil) {
self.params = params
self.data = data
self.boc_cache = boc_cache
}
}
public struct TSDKResultOfAbiEncodeBoc: Codable {
/// BOC encoded as base64
public var boc: String
public init(boc: String) {
self.boc = boc
}
}