/
sdk.go
executable file
·526 lines (483 loc) · 23.6 KB
/
sdk.go
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
/*
Copyright (C) CESS. All rights reserved.
Copyright (C) Cumulus Encrypted Storage System. All rights reserved.
SPDX-License-Identifier: Apache-2.0
*/
package sdk
import (
"io"
"math/big"
"github.com/CESSProject/cess-go-sdk/core/event"
"github.com/CESSProject/cess-go-sdk/core/pattern"
gsrpc "github.com/centrifuge/go-substrate-rpc-client/v4"
"github.com/centrifuge/go-substrate-rpc-client/v4/types"
)
// CESS Go SDK Interface Description
type SDK interface {
// Audit-State
// QueryChallengeVerifyExpiration Query Challenge Expiration Block High
QueryChallengeVerifyExpiration() (uint32, error)
// QueryChallengeInfo queries accountID's challenge information
// Tip: accountID can only be a storage node account
QueryChallengeInfo(accountID []byte) (bool, pattern.ChallengeInfo, error)
// Audit-Extrinsics
// SubmitIdleProof submits proof of idle data to the chain
// Tip: This method can only be used for storage nodes
SubmitIdleProof(idleProve []types.U8) (string, error)
// SubmitServiceProof submits proof of service data to the chain
// Tip: This method can only be used for storage nodes
SubmitServiceProof(serviceProof []types.U8) (string, error)
// SubmitIdleProofResult submits the proof verification results of idle data to the chain
// Tip: This method can only be used for storage nodes
SubmitIdleProofResult(totalProofHash []types.U8, front, rear types.U64, accumulator pattern.Accumulator, result types.Bool, sig types.Bytes, teePuk pattern.WorkerPublicKey) (string, error)
// SubmitServiceProofResult submits the proof verification results of service data to the chain
// Tip: This method can only be used for storage nodes
SubmitServiceProofResult(result types.Bool, sign types.Bytes, bloomFilter pattern.BloomFilter, teePuk pattern.WorkerPublicKey) (string, error)
// Filebank-State
// QueryBucketInfo query the bucket information of the accountID
QueryBucketInfo(accountID []byte, bucketName string) (pattern.BucketInfo, error)
// QueryAllBucket query all buckets of the accountID
QueryAllBucket(accountID []byte) ([]types.Bytes, error)
// QueryAllBucketString query all bucket names as string of the accountID
QueryAllBucketString(accountID []byte) ([]string, error)
// QueryStorageOrder query storage order information.
QueryStorageOrder(fid string) (pattern.StorageOrder, error)
// QueryFileMetadata queries the metadata of the roothash file.
QueryFileMetadata(fid string) (pattern.FileMetadata, error)
// QueryFileMetadataByBlock queries the metadata of the roothash file.
QueryFileMetadataByBlock(fid string, block uint64) (pattern.FileMetadata, error)
// QueryRestoralOrder queries a restore order info.
QueryRestoralOrder(roothash string) (pattern.RestoralOrderInfo, error)
QueryRestoralOrderList() ([]pattern.RestoralOrderInfo, error)
// Filebank-Extrinsics
// ClaimRestoralNoExistOrder is used to receive recovery orders from exiting miners.
ClaimRestoralNoExistOrder(accountID []byte, fid, restoralFragmentHash string) (string, error)
// ClaimRestoralOrder is used to collect restoration orders.
ClaimRestoralOrder(fragmentHash string) (string, error)
// CreateBucket creates a bucket for accountID
// For details on bucket naming rules, see:
// https://app.gitbook.com/o/kiTNX10jBU59sjnYZbiH/s/G1ekWsjn9OlGH381wiK2/get-started/deoss-gateway/step-1-create-a-bucket#naming-conventions-for-a-bucket
CreateBucket(accountID []byte, bucketName string) (string, error)
// DeleteBucket deletes buckets for accountID
// Tip: Only empty buckets can be deleted
DeleteBucket(accountID []byte, bucketName string) (string, error)
// DeleteFile deletes files for accountID
DeleteFile(accountID []byte, fid []string) (string, []pattern.FileHash, error)
// GenerateRestoralOrder generates data for restoration orders.
GenerateRestoralOrder(fid, fragmentHash string) (string, error)
// RestoralComplete reports order recovery completion.
RestoralComplete(restoralFragmentHash string) (string, error)
// SubmitFileReport submits a stored file report.
SubmitFileReport(index types.U8, roothash pattern.FileHash) (string, error)
ReportFile(index uint8, roothash string) (string, error)
// UploadDeclaration creates a storage order.
UploadDeclaration(filehash string, dealinfo []pattern.SegmentList, user pattern.UserBrief, filesize uint64) (string, error)
// GenerateStorageOrder for generating storage orders
GenerateStorageOrder(roothash string, segment []pattern.SegmentDataInfo, owner []byte, filename, buckname string, filesize uint64) (string, error)
// CertIdleSpace
CertIdleSpace(idleSignInfo pattern.SpaceProofInfo, teeSignWithAcc, teeSign types.Bytes, teePuk pattern.WorkerPublicKey) (string, error)
// ReplaceIdleSpace
ReplaceIdleSpace(idleSignInfo pattern.SpaceProofInfo, teeSignWithAcc, teeSign types.Bytes, teePuk pattern.WorkerPublicKey) (string, error)
// ReportTagCalculated
ReportTagCalculated(teeSig types.Bytes, tagSigInfo pattern.TagSigInfo) (string, error)
// Oss-State
// QueryAuthorizedAccountIDs queries all DeOSS accountIDs authorized by accountID
QueryAuthorizedAccountIDs(accountID []byte) ([]types.AccountID, error)
// QueryAuthorizedAccounts queries all DeOSS accounts authorized by accountID
QueryAuthorizedAccounts(accountID []byte) ([]string, error)
// QueryDeOSSInfo Query the DeOSS information registered by accountID account
QueryDeOSSInfo(accountID []byte) (pattern.OssInfo, error)
// QueryAllDeOSSInfo queries all deoss information
QueryAllDeOSSInfo() ([]pattern.OssInfo, error)
// QueryAllDeOSSPeerId queries peerID of all DeOSS
QueryAllDeOSSPeerId() ([]string, error)
// Oss-Extrinsics
// RegisterDeOSS register as deoss node
RegisterDeOSS(peerId []byte, domain string) (string, error)
// UpdateDeOSS updates the peerID and domain of deoss
// Tip: This method can only be used for DeOSS nodes
UpdateDeOSS(peerId string, domain string) (string, error)
// ExitDeoss exit deoss
// Tip: This method can only be used for DeOSS nodes
ExitDeOSS() (string, error)
// AuthorizeSpace authorizes space to oss account
// Tip: accountID can only be a DeOSS node account
AuthorizeSpace(accountID string) (string, error)
// UnAuthorizeSpace cancels space authorization
// Tip: accountID can only be a DeOSS node account
UnAuthorizeSpace(accountID string) (string, error)
// Sminer-State
// QueryExpenders queries expenders information
QueryExpenders() (pattern.ExpendersInfo, error)
// // QueryStorageMinerByAccount queries storage node information by account.
QueryStorageMinerByAccount(account string) (pattern.MinerInfo, error)
// QueryStorageMiner queries storage node information.
QueryStorageMiner(accountID []byte) (pattern.MinerInfo, error)
// QueryStorageMinerByBlock queries storage node information in specified block
// - if block < 0, then query the latest block
QueryStorageMinerByBlock(puk []byte, block int32) (pattern.MinerInfo, error)
// QueryAllSminerAccount queries the accounts of all storage miners.
QueryAllSminerAccount() ([]types.AccountID, error)
// QueryAllSminerAccountByBlock queries accounts of all storage miners in specified block.
// - if block < 0, then query the latest block
QueryAllSminerAccountByBlock(block int32) ([]types.AccountID, error)
// QueryRewardsMap queries rewardsMap for accountID
// Tip: accountID can only be a storage node account
QueryRewardsMap(accountID []byte) (pattern.MinerReward, error)
// QueryRewards queries rewards for accountID
// Tip: accountID can only be a storage node account
QueryRewards(accountID []byte) (pattern.RewardsType, error)
// QueryStorageMinerStakingStartBlock
QueryStorageMinerStakingStartBlock(puk []byte) (types.U32, error)
// QueryRestoralTarget queries the space recovery information of the exited storage node
// Tip: accountID can only be a storage node account
QueryRestoralTarget(accountID []byte) (pattern.RestoralTargetInfo, error)
// QueryRestoralTargetList queries the space recovery information of all exited storage nodes
QueryRestoralTargetList() ([]pattern.RestoralTargetInfo, error)
// QueryPendingReplacements queries the amount of idle data that can be replaced
// Tip: accountID can only be a storage node account
QueryPendingReplacements(accountID []byte) (types.U128, error)
// Sminer-Extrinsics
//
IncreaseDeclarationSpace(tibCount uint32) (string, error)
// RegisterSminer register sminer information
RegisterSminer(earnings string, peerId []byte, pledge uint64, tib_count uint32) (string, error)
// RegisterSminerAssignStaking
RegisterSminerAssignStaking(beneficiaryAcc string, peerId []byte, stakingAcc string, tib_count uint32) (string, error)
// RegisterSminerPOISKey register the pois key of sminer
RegisterSminerPOISKey(poisKey pattern.PoISKeyInfo, teeSignWithAcc, teeSign types.Bytes, teePuk pattern.WorkerPublicKey) (string, error)
// ExitSminer exit mining
ExitSminer(miner string) (string, error)
// UpdateEarningsAcc update earnings account.
UpdateEarningsAcc(puk []byte) (string, error)
UpdateEarningsAccount(earnings string) (string, error)
// UpdateSminerPeerId update miner peerid
UpdateSminerPeerId(peerid pattern.PeerId) (string, error)
// IncreaseStakingAmount increase staking amount.
IncreaseStakingAmount(miner string, tokens *big.Int) (string, error)
IncreaseStorageNodeStakingAmount(miner string, token string) (string, error)
// ClaimRewards is used to claim rewards.
ClaimRewards() (string, error)
// Withdraw is used to withdraw staking.
Withdraw() (string, error)
// Staking-State
// QueryAllValidatorCount queries all the validator count
QueryAllValidatorCount(block int) (uint32, error)
//
QueryValidatorsCount(block int) (uint32, error)
//
QueryNominatorCount(block int) (uint32, error)
//
QueryErasTotalStake(era uint32, block int) (string, error)
//
QueryCurrentEra(block int) (uint32, error)
//
//QueryeErasStakers(era uint32) ([]pattern.StakingExposure, error)
//
QueryStakingEraRewardPoints(era uint32) (pattern.StakingEraRewardPoints, error)
//
QueryNominatorsLatest() ([]pattern.StakingNominations, error)
//
QueryBondedList(block int32) ([]types.AccountID, error)
//
QueryValidatorCommission(account string, block int) (uint8, error)
//
QueryEraValidatorReward(era uint32) (string, error)
// StorageHandler-State
// QueryUserSpaceInfo queries the space information purchased by the user.
QueryUserSpaceInfo(puk []byte) (pattern.UserSpaceInfo, error)
QueryUserSpaceSt(puk []byte) (pattern.UserSpaceSt, error)
// QuerySpacePricePerGib query space price per GiB.
QuerySpacePricePerGib() (string, error)
// QueryTotalIdleSpace query total idle space
QueryTotalIdleSpace() (uint64, error)
// QueryTotalServiceSpace query total service space
QueryTotalServiceSpace() (uint64, error)
// QueryPurchasedSpace query purchased space
QueryPurchasedSpace() (uint64, error)
// StorageHandler-Extrinsics
// BuySpace for purchasing space.
BuySpace(count uint32) (string, error)
// ExpansionSpace for expansion space.
ExpansionSpace(count uint32) (string, error)
// RenewalSpace is used to extend the validity of space.
RenewalSpace(days uint32) (string, error)
// TeeWorker-State
// QueryTeeWorker queries the information of the Tee worker.
QueryTeeWorker(puk pattern.WorkerPublicKey) (pattern.TeeWorkerInfo, error)
// QueryTeeInfo queries the information of the Tee worker.
QueryTeeInfo(puk pattern.WorkerPublicKey) (pattern.TeeInfo, error)
// QueryMasterPublicKey queries the master publicKey.
QueryMasterPublicKey() ([]byte, error)
// QueryAllTeeWorkerMap queries the information of all tee workers.
QueryAllTeeWorkerMap() ([]pattern.TeeWorkerInfo, error)
// QueryAllTeeInfo queries the information of all tee workers.
QueryAllTeeInfo() ([]pattern.TeeInfo, error)
// QueryTeeWorkEndpoint queries the endpoint of tee workers.
QueryTeeWorkEndpoint(workPuk pattern.WorkerPublicKey) (string, error)
//
QueryWorkerAddedAt(workPuk pattern.WorkerPublicKey) (types.U32, error)
// System
// QueryBlockHeight queries the block height corresponding to the block hash,
// If the blockhash is empty, query the latest block height.
QueryBlockHeight(blockhash string) (uint32, error)
// QueryNodeSynchronizationSt returns the synchronization status of the current node.
QueryNodeSynchronizationSt() (bool, error)
// QueryAccountInfoByAccount query account information by account.
QueryAccountInfoByAccount(acc string) (types.AccountInfo, error)
// QueryAccountInfo query account information by public key.
QueryAccountInfo(puk []byte) (types.AccountInfo, error)
// GetTokenSymbol returns the token symbol
GetTokenSymbol() string
// GetNetworkEnv returns the network environment
GetNetworkEnv() string
// SysProperties returns the system properties.
SysProperties() (pattern.SysProperties, error)
// SyncState returns the system sync state.
SyncState() (pattern.SysSyncState, error)
// SysVersion returns the system version.
ChainVersion() (string, error)
// NetListening returns whether the current node is listening.
NetListening() (bool, error)
//
DecodeEventNameFromBlock(block uint64) ([]string, error)
//
DecodeEventNameFromBlockhash(blockhash types.Hash) ([]string, error)
//
QueryAllAccountInfoFromBlock(block int) ([]types.AccountInfo, error)
//
QueryTotalIssuance(block int) (string, error)
// TransferToken to dest.
//
// Receive parameter:
// - dest: target account.
// - amount: transfer amount.
// Return parameter:
// - string: transaction hash.
// - string: target account.
// - error: error message.
TransferToken(dest string, amount uint64) (string, string, error)
// Other
// GetSignatureAcc returns the signature account.
GetSignatureAcc() string
// GetSignatureAccPulickey returns the signature account public key.
GetSignatureAccPulickey() []byte
// GetSubstrateAPI returns Substrate API.
GetSubstrateAPI() *gsrpc.SubstrateAPI
// GetChainState returns chain node state.
GetChainState() bool
// SetChainState sets the state of the chain node.
SetChainState(state bool)
// GetSdkName return sdk name
GetSDKName() string
// GetCurrentRpcAddr return current rpc address
GetCurrentRpcAddr() string
// SetSdkName set sdk name
SetSDKName(name string)
// ReconnectRPC for reconnecting chains.
ReconnectRPC() error
// GetMetadata returns the metadata of the chain.
GetMetadata() *types.Metadata
// GetKeyEvents returns the events storage key.
GetKeyEvents() types.StorageKey
// GetURI returns URI.
GetURI() string
// Sign returns the signature of the msg with the private key of the signing account.
Sign(msg []byte) ([]byte, error)
// Verify the signature of the msg with the public key of the signing account.
Verify(msg []byte, sig []byte) (bool, error)
// Verify Polka Signature With JavaScript
VerifyPolkaSignatureWithJS(account, msg, signature string) (bool, error)
// Verify Polka Signature With Base58
VerifyPolkaSignatureWithBase58(account, msg, signature string) (bool, error)
//
Close()
// Upload file to CESS gateway.
//
// Receive parameter:
// - url: the address of the gateway.
// - file: uploaded file.
// - bucket: the bucket for storing files, it will be created automatically.
// Return parameter:
// - string: [fid] unique identifier for the file.
// - error: error message.
// Preconditions:
// 1. Account requires purchasing space, refer to [BuySpace] interface.
// 2. Authorize the space usage rights of the account to the gateway account,
// refer to the [AuthorizeSpace] interface.
// 3. Make sure the name of the bucket is legal, use the [CheckBucketName] method to check.
// Explanation:
// - Account refers to the account where you configured mnemonic when creating an SDK.
// - CESS public gateway address: [http://deoss-pub-gateway.cess.cloud/]
// - CESS public gateway account: [cXhwBytXqrZLr1qM5NHJhCzEMckSTzNKw17ci2aHft6ETSQm9]
StoreFile(url, file, bucket string) (string, error)
// Upload object to CESS gateway.
//
// Receive parameter:
// - url: the address of the gateway.
// - reader: strings, byte data, file streams, network streams, etc.
// - bucket: the bucket for storing object, it will be created automatically.
// Return parameter:
// - string: [fid] unique identifier for the file.
// - error: error message.
// Preconditions:
// 1. Account requires purchasing space, refer to [BuySpace] interface.
// 2. Authorize the space usage rights of the account to the gateway account,
// refer to the [AuthorizeSpace] interface.
// 3. Make sure the name of the bucket is legal, use the [CheckBucketName] method to check.
// Explanation:
// - Account refers to the account where you configured mnemonic when creating an SDK.
// - CESS public gateway address: [http://deoss-pub-gateway.cess.cloud/]
// - CESS public gateway account: [cXhwBytXqrZLr1qM5NHJhCzEMckSTzNKw17ci2aHft6ETSQm9]
StoreObject(url string, reader io.Reader, bucket string) (string, error)
// Download file from CESS public gateway.
//
// Receive parameter:
// - url: the address of the gateway.
// - fid: unique identifier for the file.
// - savepath: file save location.
// Return parameter:
// - error: error message.
RetrieveFile(url, fid, savepath string) error
// Download object from CESS gateway.
//
// Receive parameter:
// - url: the address of the gateway.
// - fid: unique identifier for the file.
// Return parameter:
// - Reader: object stream.
// - error: error message.
RetrieveObject(url, fid string) (io.ReadCloser, error)
// Split File into Chunks.
//
// Receive parameter:
// - fpath: the path of the file to be split.
// - chunksDir: directory path to store file chunks, please do not mix it elsewhere.
// - chunkSize: the size of each chunk, it does not exceed the file size
// Return parameter:
// - int64: chunks total size (byte).
// - int: number of file chunks.
// - error: error message.
SplitFile(fpath, chunksDir string, chunkSize int64, filling bool) (int64, int, error)
// Split File into Chunks with standard size.
// It split file into chunks of the default size and fills the last chunk that does not meet the size.
//
// Receive parameter:
// - fpath: the path of the file to be split.
// - chunksDir: directory path to store file chunks, please do not mix it elsewhere.
// Return parameter:
// - int64: chunks total size (byte).
// - int: number of file chunks.
// - error: error message.
SplitFileWithstandardSize(fpath, chunksDir string) (int64, int, error)
// Upload chunk of file to the gateway
//
// Receive parameter:
// - url: the address of the gateway.
// - chunksDir: directory path to store file chunks, please do not mix it elsewhere.
// - bucket: the bucket name to store user data.
// - fname: the name of the file.
// - chunksNum: total number of file chunks.
// - chunksId: index of the current chunk to be uploaded ([0,chunksNum)).
// - totalSize: chunks total size (byte), can be obtained from the first return value of SplitFile
// Return parameter:
// - Reader: number of file chunks.
// - error: error message.
UploadFileChunk(url, chunksDir, bucket, fname string, chunksNum, chunksId int, totalSize int64) (string, error)
// Upload file chunks in the directory to the gateway as much as possible, chunks will be removed after being uploaded, if the chunks are not transferred successfuly, jus
//
// Receive parameter:
// - url: the address of the gateway.
// - chunksDir: directory path to store file chunks, please do not mix it elsewhere.
// - bucket: the bucket name to store user data.
// - fname: the name of the file.
// - chunksNum: total number of file chunks.
// - totalSize: chunks total size (byte), can be obtained from the first return value of SplitFile
// Return parameter:
// - Reader: number of file chunks.
// - error: error message.
UploadFileChunks(url, chunksDir, bucket, fname string, chunksNum int, totalSize int64) (string, error)
// retrieve event
//
RetrieveEvent_Audit_SubmitIdleProof(blockhash types.Hash) (event.Event_SubmitIdleProof, error)
//
RetrieveEvent_Audit_SubmitServiceProof(blockhash types.Hash) (event.Event_SubmitServiceProof, error)
//
RetrieveEvent_Audit_SubmitIdleVerifyResult(blockhash types.Hash) (event.Event_SubmitIdleVerifyResult, error)
//
RetrieveEvent_Audit_SubmitServiceVerifyResult(blockhash types.Hash) (event.Event_SubmitServiceVerifyResult, error)
//
RetrieveEvent_Oss_OssUpdate(blockhash types.Hash) (event.Event_OssUpdate, error)
//
RetrieveEvent_Oss_OssRegister(blockhash types.Hash) (event.Event_OssRegister, error)
//
RetrieveEvent_Oss_OssDestroy(blockhash types.Hash) (event.Event_OssDestroy, error)
//
RetrieveEvent_Oss_Authorize(blockhash types.Hash) (event.Event_Authorize, error)
//
RetrieveEvent_Oss_CancelAuthorize(blockhash types.Hash) (event.Event_CancelAuthorize, error)
//
RetrieveEvent_FileBank_UploadDeclaration(blockhash types.Hash) (event.Event_UploadDeclaration, error)
//
RetrieveEvent_FileBank_CreateBucket(blockhash types.Hash) (event.Event_CreateBucket, error)
//
RetrieveEvent_FileBank_DeleteFile(blockhash types.Hash) (event.Event_DeleteFile, error)
//
RetrieveEvent_FileBank_TransferReport(blockhash types.Hash) (event.Event_TransferReport, error)
//
RetrieveEvent_FileBank_ClaimRestoralOrder(blockhash types.Hash) (event.Event_ClaimRestoralOrder, error)
//
RetrieveEvent_FileBank_RecoveryCompleted(blockhash types.Hash) (event.Event_RecoveryCompleted, error)
//
RetrieveEvent_FileBank_IdleSpaceCert(blockhash types.Hash) (event.Event_IdleSpaceCert, error)
//
RetrieveEvent_FileBank_ReplaceIdleSpace(blockhash types.Hash) (event.Event_ReplaceIdleSpace, error)
//
RetrieveEvent_FileBank_CalculateReport(blockhash types.Hash) (event.Event_CalculateReport, error)
//
RetrieveEvent_Sminer_Registered(blockhash types.Hash) (event.Event_Registered, error)
//
RetrieveEvent_Sminer_RegisterPoisKey(blockhash types.Hash) (event.Event_RegisterPoisKey, error)
//
RetrieveEvent_Sminer_UpdataIp(blockhash types.Hash) (event.Event_UpdatePeerId, error)
//
RetrieveEvent_Sminer_UpdataBeneficiary(blockhash types.Hash) (event.Event_UpdateBeneficiary, error)
//
RetrieveEvent_Sminer_MinerExitPrep(blockhash types.Hash) (event.Event_MinerExitPrep, error)
//
RetrieveEvent_Sminer_IncreaseCollateral(blockhash types.Hash) (event.Event_IncreaseCollateral, error)
//
RetrieveEvent_Sminer_Receive(blockhash types.Hash) (event.Event_Receive, error)
//
RetrieveEvent_Sminer_Withdraw(blockhash types.Hash) (event.Event_Withdraw, error)
//
RetrieveEvent_Sminer_IncreaseDeclarationSpace(blockhash types.Hash) (event.Event_IncreaseDeclarationSpace, error)
//
RetrieveEvent_StorageHandler_BuySpace(blockhash types.Hash) (event.Event_BuySpace, error)
//
RetrieveEvent_StorageHandler_ExpansionSpace(blockhash types.Hash) (event.Event_ExpansionSpace, error)
//
RetrieveEvent_StorageHandler_RenewalSpace(blockhash types.Hash) (event.Event_RenewalSpace, error)
//
RetrieveEvent_Balances_Transfer(blockhash types.Hash) (types.EventBalancesTransfer, error)
//
RetrieveEvent_FileBank_GenRestoralOrder(blockhash types.Hash) (event.Event_GenerateRestoralOrder, error)
//
RetrieveAllEvent_FileBank_UploadDeclaration(blockhash types.Hash) ([]event.AllUploadDeclarationEvent, error)
//
RetrieveAllEvent_FileBank_StorageCompleted(blockhash types.Hash) ([]string, error)
//
RetrieveAllEvent_FileBank_DeleteFile(blockhash types.Hash) ([]event.AllDeleteFileEvent, error)
//
//RetrieveAllEvent(blockhash types.Hash) ([]string, []string, error)
//
RetrieveAllEventFromBlock(blockhash types.Hash) ([]string, map[string][]string, error)
//
RetrieveBlock(blocknumber uint64) ([]string, []event.ExtrinsicsInfo, []event.TransferInfo, string, string, string, string, int64, error)
//
RetrieveBlockAndAll(blocknumber uint64) ([]string, []event.ExtrinsicsInfo, []event.TransferInfo, []string, []string, string, string, string, string, string, int64, error)
//
ParseBlockData(blocknumber uint64) (event.BlockData, error)
//
InitExtrinsicsName() error
}