YPC  0.2.0
nt_cols.h
1 #pragma once
2 #include <ff/net/middleware/ntpackage.h>
3 #include <ff/util/ntobject.h>
4 
5 namespace ypc {
6 template <typename BytesType> struct nt {
7  define_nt(reserve, uint32_t);
8  define_nt(data, BytesType);
9  define_nt(id, uint32_t);
10  define_nt(tag, uint32_t);
11  define_nt(user_id, std::string);
12  define_nt(timestamp, uint64_t);
13 
14  define_nt(enclave_hash, BytesType);
15  define_nt(encrypted_shu_skey, BytesType);
16  define_nt(encrypted_skey, BytesType);
17  define_nt(pkey, BytesType, "public-key");
18  define_nt(private_key, BytesType, "private-key");
19  define_nt(sealed_skey, BytesType);
20  define_nt(data_hash, BytesType);
21  define_nt(signature, BytesType);
22  define_nt(shu_forward_signature, BytesType);
23  define_nt(model_data, BytesType);
24  define_nt(param_data, BytesType);
25  define_nt(encrypted_sig, BytesType);
26  //define_nt(crypto, std::string);
27 
28  define_nt(msg, std::string);
29  define_nt(succ, bool);
30  define_nt(batch_data, std::vector<BytesType>);
31 
32  using allowance_t = ::ff::util::ntobject<signature, pkey, data_hash>;
33  define_nt(allowance, allowance_t);
34  define_nt(allowances, std::vector<allowance_t>);
35 
36  using forward_target_info_t =
37  ff::util::ntobject<enclave_hash, pkey, encrypted_sig>;
38  define_nt(forward, forward_target_info_t);
39  using param_t = ::ff::util::ntobject<param_data, pkey, allowances, forward>;
40  define_nt(param, param_t);
41  using model_t = ::ff::util::ntobject<model_data, pkey>;
42  define_nt(model, model_t);
43 
44  using sealed_data_info_t = ::ff::util::ntobject<data_hash, pkey, tag>;
45  define_nt(sealed_data_info_vector, std::vector<sealed_data_info_t>);
46  using multi_sealed_data_info_t =
47  ::ff::util::ntobject<sealed_data_info_vector>;
48 
49  using batch_data_pkg_t = ::ff::net::ntpackage<0x82c4e8d8, batch_data>;
50 
51  define_nt(encrypted_param, BytesType);
52  define_nt(pkey4v, BytesType);
53  define_nt(encrypted_result, BytesType);
54  define_nt(result_signature, BytesType);
55  define_nt(cost_signature, BytesType);
56  define_nt(result_encrypt_key, BytesType);
57  using onchain_result_package_t =
58  ::ff::net::ntpackage<0xf13e1f40, encrypted_result, data_hash,
59  result_signature, cost_signature>;
60 
61  using shu_info_t = ff::util::ntobject<pkey, encrypted_shu_skey,
62  shu_forward_signature, enclave_hash>;
63 
64  define_nt(shu_info, shu_info_t);
65 
66  using forward_result_t =
67  ff::util::ntobject<shu_info, data_hash, encrypted_result>;
68 
69  using offchain_result_package_t =
70  ::ff::net::ntpackage<0xf13e1f41, encrypted_result, data_hash,
71  result_signature, cost_signature,
72  result_encrypt_key>;
73 
74  using keymgr_key_package_t =
75  ::ff::net::ntpackage<0x314234b9, pkey, sealed_skey, user_id, timestamp>;
76 
77  define_nt(access_list_type, uint8_t);
78  define_nt(access_data_type, uint8_t);
79  using access_item_t =
80  ::ff::net::ntpackage<0x71185aff, data, access_data_type>;
81 
82  define_nt(access_list, std::vector<access_item_t>);
83  using access_list_package_t =
84  ::ff::net::ntpackage<0x3c92350f, access_list_type, access_list>;
85 
86  using auth_parser_response_pkg_t = ::ff::net::ntpackage<0, succ, msg, data>;
87 };
88 } // namespace ypc
ypc::nt
Definition: nt_cols.h:6
ypc::allowance
Definition: allowance.h:7