1
1
export const idlFactory = ( { IDL } ) => {
2
- const Branch = IDL . Rec ( ) ;
3
- const List = IDL . Rec ( ) ;
4
2
const Error = IDL . Variant ( {
5
3
'NoFreeBoxNum' : IDL . Null ,
6
4
'NoUnBoundOg' : IDL . Null ,
@@ -40,14 +38,31 @@ export const idlFactory = ({IDL}) => {
40
38
'box_type' : BoxType ,
41
39
} ) ;
42
40
const CreateBoxArgs = IDL . Record ( { 'metadata' : BoxMetadata } ) ;
43
- const Result_6 = IDL . Variant ( { 'ok' : IDL . Principal , 'err' : Error } ) ;
41
+ const Result_5 = IDL . Variant ( { 'ok' : IDL . Principal , 'err' : Error } ) ;
44
42
const DelBoxArgs = IDL . Record ( {
45
43
'cycleTo' : IDL . Opt ( IDL . Principal ) ,
46
44
'box_type' : BoxType ,
47
45
'canisterId' : IDL . Principal ,
48
46
} ) ;
49
- const Result_5 = IDL . Variant ( { 'ok' : IDL . Text , 'err' : Error } ) ;
47
+ const Result_4 = IDL . Variant ( { 'ok' : IDL . Text , 'err' : Error } ) ;
50
48
const BoxStatus = IDL . Variant ( { 'stopped' : IDL . Null , 'running' : IDL . Null } ) ;
49
+ const BoxState__1 = IDL . Record ( {
50
+ 'status' : BoxStatus ,
51
+ 'owner' : IDL . Principal ,
52
+ 'avatar_key' : IDL . Text ,
53
+ 'is_private' : IDL . Bool ,
54
+ 'box_name' : IDL . Text ,
55
+ 'box_type' : BoxType ,
56
+ } ) ;
57
+ const BackUp = IDL . Variant ( {
58
+ 'One' : IDL . Vec ( IDL . Tuple ( IDL . Principal , IDL . Vec ( IDL . Principal ) ) ) ,
59
+ 'Six' : IDL . Vec ( IDL . Tuple ( IDL . Principal , IDL . Text ) ) ,
60
+ 'Two' : IDL . Vec ( IDL . Tuple ( IDL . Principal , IDL . Nat ) ) ,
61
+ 'Seven' : IDL . Vec ( IDL . Principal ) ,
62
+ 'Five' : IDL . Vec ( IDL . Tuple ( IDL . Text , IDL . Principal ) ) ,
63
+ 'Four' : IDL . Vec ( IDL . Tuple ( IDL . Principal , IDL . Principal ) ) ,
64
+ 'Three' : IDL . Vec ( IDL . Tuple ( IDL . Principal , BoxState__1 ) ) ,
65
+ } ) ;
51
66
const BoxState = IDL . Record ( {
52
67
'status' : BoxStatus ,
53
68
'owner' : IDL . Principal ,
@@ -56,7 +71,7 @@ export const idlFactory = ({IDL}) => {
56
71
'box_name' : IDL . Text ,
57
72
'box_type' : BoxType ,
58
73
} ) ;
59
- const Result_4 = IDL . Variant ( { 'ok' : BoxState , 'err' : Error } ) ;
74
+ const Result_3 = IDL . Variant ( { 'ok' : BoxState , 'err' : Error } ) ;
60
75
const BoxAllInfo = IDL . Record ( {
61
76
'status' : BoxStatus ,
62
77
'owner' : IDL . Principal ,
@@ -66,49 +81,21 @@ export const idlFactory = ({IDL}) => {
66
81
'box_name' : IDL . Text ,
67
82
'box_type' : BoxType ,
68
83
} ) ;
84
+ const Result_2 = IDL . Variant ( {
85
+ 'ok' : IDL . Vec ( IDL . Principal ) ,
86
+ 'err' : Error ,
87
+ } ) ;
69
88
const BoxInfo__1 = IDL . Record ( {
70
89
'status' : BoxStatus ,
71
90
'canister_id' : IDL . Principal ,
72
91
'is_private' : IDL . Bool ,
73
92
'box_name' : IDL . Text ,
74
93
'box_type' : BoxType ,
75
94
} ) ;
76
- const Hash = IDL . Nat32 ;
77
- const Key = IDL . Record ( { 'key' : BoxInfo__1 , 'hash' : Hash } ) ;
78
- List . fill ( IDL . Opt ( IDL . Tuple ( IDL . Tuple ( Key , IDL . Null ) , List ) ) ) ;
79
- const AssocList = IDL . Opt ( IDL . Tuple ( IDL . Tuple ( Key , IDL . Null ) , List ) ) ;
80
- const Leaf = IDL . Record ( { 'size' : IDL . Nat , 'keyvals' : AssocList } ) ;
81
- const Trie = IDL . Variant ( {
82
- 'branch' : Branch ,
83
- 'leaf' : Leaf ,
84
- 'empty' : IDL . Null ,
85
- } ) ;
86
- Branch . fill ( IDL . Record ( { 'left' : Trie , 'size' : IDL . Nat , 'right' : Trie } ) ) ;
87
- const Set = IDL . Variant ( {
88
- 'branch' : Branch ,
89
- 'leaf' : Leaf ,
90
- 'empty' : IDL . Null ,
91
- } ) ;
92
- const Result_3 = IDL . Variant ( {
93
- 'ok' : IDL . Vec ( IDL . Principal ) ,
94
- 'err' : Error ,
95
- } ) ;
96
95
const TopUpArgs = IDL . Record ( {
97
96
'box_id' : IDL . Principal ,
98
97
'icp_amount' : IDL . Nat64 ,
99
98
} ) ;
100
- const AccountIdentifier = IDL . Vec ( IDL . Nat8 ) ;
101
- const BlockIndex__1 = IDL . Nat64 ;
102
- const Token = IDL . Record ( { 'e8s' : IDL . Nat64 } ) ;
103
- const BlockIndex = IDL . Nat64 ;
104
- const TransferError = IDL . Variant ( {
105
- 'TxTooOld' : IDL . Record ( { 'allowed_window_nanos' : IDL . Nat64 } ) ,
106
- 'BadFee' : IDL . Record ( { 'expected_fee' : Token } ) ,
107
- 'TxDuplicate' : IDL . Record ( { 'duplicate_of' : BlockIndex } ) ,
108
- 'TxCreatedInFuture' : IDL . Null ,
109
- 'InsufficientFunds' : IDL . Record ( { 'balance' : Token } ) ,
110
- } ) ;
111
- const Result_2 = IDL . Variant ( { 'ok' : BlockIndex__1 , 'err' : TransferError } ) ;
112
99
const UpdateWasmArgs = IDL . Record ( {
113
100
'wasm' : IDL . Vec ( IDL . Nat8 ) ,
114
101
'box_type' : BoxType ,
@@ -125,23 +112,24 @@ export const idlFactory = ({IDL}) => {
125
112
const MetaBox = IDL . Service ( {
126
113
'acceptSharedBox' : IDL . Func ( [ IDL . Principal , IDL . Principal ] , [ Result ] , [ ] ) ,
127
114
'addAdmin' : IDL . Func ( [ IDL . Principal ] , [ IDL . Bool ] , [ ] ) ,
128
- 'boundOgDataboxOwner' : IDL . Func (
129
- [ IDL . Principal , IDL . Principal ] ,
130
- [ Result ] ,
131
- [ ] ,
132
- ) ,
115
+ 'addControlWhiteList' : IDL . Func ( [ IDL . Principal ] , [ IDL . Bool ] , [ ] ) ,
133
116
'burnxtc' : IDL . Func ( [ IDL . Nat ] , [ RustResult ] , [ ] ) ,
134
117
'changeAdmin' : IDL . Func ( [ IDL . Vec ( IDL . Principal ) ] , [ IDL . Bool ] , [ ] ) ,
135
118
'changeBoxAvatarKey' : IDL . Func ( [ IDL . Text ] , [ ] , [ ] ) ,
136
119
'clearLog' : IDL . Func ( [ ] , [ ] , [ ] ) ,
137
- 'createDataBoxFee' : IDL . Func ( [ CreateBoxArgs , IDL . Bool ] , [ Result_6 ] , [ ] ) ,
138
- 'createDataBoxFree' : IDL . Func ( [ CreateBoxArgs ] , [ Result_6 ] , [ ] ) ,
139
- 'createProfile' : IDL . Func ( [ IDL . Vec ( IDL . Nat8 ) ] , [ Result_6 ] , [ ] ) ,
140
- 'deleteBox' : IDL . Func ( [ DelBoxArgs ] , [ Result_5 ] , [ ] ) ,
120
+ 'createDataBoxControl' : IDL . Func (
121
+ [ CreateBoxArgs , IDL . Bool , IDL . Opt ( IDL . Principal ) ] ,
122
+ [ Result_5 ] ,
123
+ [ ] ,
124
+ ) ,
125
+ 'createDataBoxFee' : IDL . Func ( [ CreateBoxArgs , IDL . Bool ] , [ Result_5 ] , [ ] ) ,
126
+ 'createDataBoxFree' : IDL . Func ( [ CreateBoxArgs ] , [ Result_5 ] , [ ] ) ,
127
+ 'createProfile' : IDL . Func ( [ IDL . Vec ( IDL . Nat8 ) ] , [ Result_5 ] , [ ] ) ,
128
+ 'deleteBox' : IDL . Func ( [ DelBoxArgs ] , [ Result_4 ] , [ ] ) ,
141
129
'emitShareBox' : IDL . Func ( [ IDL . Principal , IDL . Principal ] , [ Result ] , [ ] ) ,
142
- 'getActivitySet' : IDL . Func ( [ ] , [ IDL . Vec ( IDL . Principal ) ] , [ 'query' ] ) ,
143
130
'getAdmins' : IDL . Func ( [ ] , [ IDL . Vec ( IDL . Principal ) ] , [ 'query' ] ) ,
144
- 'getBoxState' : IDL . Func ( [ IDL . Principal ] , [ Result_4 ] , [ 'query' ] ) ,
131
+ 'getBackUp' : IDL . Func ( [ IDL . Nat ] , [ BackUp ] , [ 'query' ] ) ,
132
+ 'getBoxState' : IDL . Func ( [ IDL . Principal ] , [ Result_3 ] , [ 'query' ] ) ,
145
133
'getBoxes' : IDL . Func ( [ IDL . Principal ] , [ IDL . Vec ( BoxAllInfo ) ] , [ 'query' ] ) ,
146
134
'getCycleBalance' : IDL . Func ( [ ] , [ IDL . Nat64 ] , [ 'query' ] ) ,
147
135
'getDataBoxVersion' : IDL . Func ( [ ] , [ IDL . Nat ] , [ 'query' ] ) ,
@@ -153,18 +141,6 @@ export const idlFactory = ({IDL}) => {
153
141
[ 'query' ] ,
154
142
) ,
155
143
'getNamePrin' : IDL . Func ( [ IDL . Principal ] , [ IDL . Opt ( IDL . Text ) ] , [ 'query' ] ) ,
156
- 'getOGBoxes' : IDL . Func ( [ ] , [ IDL . Vec ( BoxInfo__1 ) ] , [ 'query' ] ) ,
157
- 'getOGNum' : IDL . Func ( [ ] , [ IDL . Nat ] , [ 'query' ] ) ,
158
- 'getOGPreBoxes' : IDL . Func (
159
- [ IDL . Principal ] ,
160
- [ IDL . Vec ( BoxInfo__1 ) ] ,
161
- [ 'query' ] ,
162
- ) ,
163
- 'getOGUpBoxes' : IDL . Func (
164
- [ IDL . Principal ] ,
165
- [ IDL . Vec ( BoxInfo__1 ) ] ,
166
- [ 'query' ] ,
167
- ) ,
168
144
'getPre' : IDL . Func ( [ ] , [ IDL . Nat , IDL . Nat ] , [ 'query' ] ) ,
169
145
'getPrincipalFromName' : IDL . Func (
170
146
[ IDL . Text ] ,
@@ -181,25 +157,14 @@ export const idlFactory = ({IDL}) => {
181
157
'getSharedBoxes' : IDL . Func ( [ ] , [ IDL . Vec ( BoxAllInfo ) ] , [ 'query' ] ) ,
182
158
'getTotal' : IDL . Func ( [ ] , [ IDL . Nat , IDL . Nat ] , [ 'query' ] ) ,
183
159
'getUserBalance' : IDL . Func ( [ ] , [ IDL . Opt ( IDL . Nat ) ] , [ 'query' ] ) ,
184
- 'getUserOgBox' : IDL . Func (
185
- [ ] ,
186
- [ IDL . Vec ( IDL . Tuple ( IDL . Principal , Set ) ) ] ,
187
- [ 'query' ] ,
188
- ) ,
189
- 'getUserPreBox' : IDL . Func (
190
- [ ] ,
191
- [ IDL . Vec ( IDL . Tuple ( IDL . Principal , Set ) ) ] ,
192
- [ 'query' ] ,
193
- ) ,
194
- 'initPreCreateDatabox' : IDL . Func ( [ ] , [ Result_3 ] , [ ] ) ,
195
- 'initPreCreateProfile' : IDL . Func ( [ ] , [ Result_3 ] , [ ] ) ,
160
+ 'initPreCreateDatabox' : IDL . Func ( [ ] , [ Result_2 ] , [ ] ) ,
161
+ 'initPreCreateProfile' : IDL . Func ( [ ] , [ Result_2 ] , [ ] ) ,
196
162
'installCycleWasm' : IDL . Func ( [ IDL . Vec ( IDL . Nat8 ) ] , [ Result ] , [ ] ) ,
197
163
'isNotFirstDataBox' : IDL . Func ( [ ] , [ IDL . Bool ] , [ 'query' ] ) ,
198
- 'preCreateDataBox' : IDL . Func ( [ ] , [ Result_3 ] , [ ] ) ,
164
+ 'preCreateDataBox' : IDL . Func ( [ ] , [ Result_2 ] , [ ] ) ,
199
165
'preCreateDataBoxOne' : IDL . Func ( [ ] , [ Result ] , [ ] ) ,
200
- 'preCreateProfile' : IDL . Func ( [ ] , [ Result_3 ] , [ ] ) ,
201
- 'preCreateProfileOne' : IDL . Func ( [ ] , [ Result_3 ] , [ ] ) ,
202
- 'recoverOG' : IDL . Func ( [ IDL . Principal ] , [ ] , [ ] ) ,
166
+ 'preCreateProfile' : IDL . Func ( [ ] , [ Result_2 ] , [ ] ) ,
167
+ 'preCreateProfileOne' : IDL . Func ( [ ] , [ Result_2 ] , [ ] ) ,
203
168
'refreshBalance' : IDL . Func ( [ IDL . Principal ] , [ ] , [ ] ) ,
204
169
'removeShareBox' : IDL . Func ( [ IDL . Principal , IDL . Principal ] , [ Result ] , [ ] ) ,
205
170
'removeSharedBox' : IDL . Func ( [ IDL . Principal , IDL . Principal ] , [ Result ] , [ ] ) ,
@@ -213,8 +178,6 @@ export const idlFactory = ({IDL}) => {
213
178
[ Result ] ,
214
179
[ ] ,
215
180
) ,
216
- 'transferOutICP' : IDL . Func ( [ AccountIdentifier , IDL . Nat64 ] , [ Result_2 ] , [ ] ) ,
217
- 'transferV1UserID' : IDL . Func ( [ IDL . Text , IDL . Principal ] , [ Result ] , [ ] ) ,
218
181
'updateBoxInfo' : IDL . Func ( [ BoxInfo__1 ] , [ Result ] , [ ] ) ,
219
182
'updateDataBoxVersion' : IDL . Func ( [ IDL . Nat ] , [ IDL . Bool ] , [ ] ) ,
220
183
'updateProfileVersion' : IDL . Func ( [ IDL . Nat ] , [ IDL . Bool ] , [ ] ) ,
0 commit comments