/
errors.go
535 lines (499 loc) · 49.1 KB
/
errors.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
527
528
529
530
531
532
533
534
535
package lib
import (
"fmt"
"reflect"
"github.com/btcsuite/btcd/btcec"
"strings"
)
// RuleError is an error type that specifies an error occurred during
// block processing that is related to a consensus rule. By checking the
// type of the error the caller can determine that the error was due to
// a consensus rule and determine which consensus rule caused the issue.
type RuleError string
const (
RuleErrorDuplicateBlock RuleError = "RuleErrorDuplicateBlock"
RuleErrorDuplicateOrphan RuleError = "RuleErrorDuplicateOrphan"
RuleErrorMinDifficulty RuleError = "RuleErrorMinDifficulty"
RuleErrorBlockTooBig RuleError = "RuleErrorBlockTooBig"
RuleErrorNoTxns RuleError = "RuleErrorNoTxns"
RuleErrorFirstTxnMustBeBlockReward RuleError = "RuleErrorFirstTxnMustBeBlockReward"
RuleErrorMoreThanOneBlockReward RuleError = "RuleErrorMoreThanOneBlockReward"
RuleErrorPreviousBlockInvalid RuleError = "RuleErrorPreviousBlockInvalid"
RuleErrorPreviousBlockHeaderInvalid RuleError = "RuleErrorPreviousBlockHeaderInvalid"
RuleErrorTxnMustHaveAtLeastOneInput RuleError = "RuleErrorTxnMustHaveAtLeastOneInput"
RuleErrorTxnMustHaveAtLeastOneOutput RuleError = "RuleErrorTxnMustHaveAtLeastOneOutput"
RuleErrorOutputExceedsMax RuleError = "RuleErrorOutputExceedsMax"
RuleErrorOutputOverflowsTotal RuleError = "RuleErrorOutputOverflowsTotal"
RuleErrorTotalOutputExceedsMax RuleError = "RuleErrorTotalOutputExceedsMax"
RuleErrorDuplicateInputs RuleError = "RuleErrorDuplicateInputs"
RuleErrorInvalidTxnMerkleRoot RuleError = "RuleErrorInvalidTxnMerkleRoot"
RuleErrorDuplicateTxn RuleError = "RuleErrorDuplicateTxn"
RuleErrorInputSpendsNonexistentUtxo RuleError = "RuleErrorInputSpendsNonexistentUtxo"
RuleErrorInputSpendsPreviouslySpentOutput RuleError = "RuleErrorInputSpendsPreviouslySpentOutput"
RuleErrorInputSpendsImmatureBlockReward RuleError = "RuleErrorInputSpendsImmatureBlockReward"
RuleErrorInputSpendsOutputWithInvalidAmount RuleError = "RuleErrorInputSpendsOutputWithInvalidAmount"
RuleErrorTxnOutputWithInvalidAmount RuleError = "RuleErrorTxnOutputWithInvalidAmount"
RuleErrorTxnOutputExceedsInput RuleError = "RuleErrorTxnOutputExceedsInput"
RuleErrorTxnFeeBelowNetworkMinimum RuleError = "RuleErrorTxnFeeBelowNetworkMinimum"
RuleErrorOverflowDetectedInFeeRateCalculation RuleError = "RuleErrorOverflowDetectedInFeeRateCalculation"
RuleErrorBlockRewardOutputWithInvalidAmount RuleError = "RuleErrorBlockRewardOutputWithInvalidAmount"
RuleErrorBlockRewardOverflow RuleError = "RuleErrorBlockRewardOverflow"
RuleErrorBlockRewardExceedsMaxAllowed RuleError = "RuleErrorBlockRewardExceedsMaxAllowed"
RuleErrorProfileUsernameExists RuleError = "RuleErrorProfileUsernameExists"
RuleErrorPubKeyLen RuleError = "RuleErrorPubKeyLen"
RuleErrorMaxProfilePicSize RuleError = "RuleErrorMaxProfilePicSize"
RuleErrorProfileCreatorPercentageSize RuleError = "RuleErrorProfileCreatorPercentageSize"
RuleErrorProfileStakeMultipleSize RuleError = "RuleErrorProfileStakeMultipleSize"
RuleErrorInvalidUsername RuleError = "RuleErrorInvalidUsername"
RuleErrorEncryptedDataLen RuleError = "RuleErrorEncryptedDataLen"
RuleErrorInputOverflows RuleError = "RuleErrorInputOverflows"
RuleErrorInsufficientRefund RuleError = "RuleErrorInsufficientRefund"
RuleErrorMissingSignature RuleError = "RuleErrorMissingSignature"
RuleErrorSigHash RuleError = "RuleErrorSigHash"
RuleErrorParsePublicKey RuleError = "RuleErrorParsePublicKey"
RuleErrorSigCheckFailed RuleError = "RuleErrorSigCheckFailed"
RuleErrorOutputPublicKeyNotRecognized RuleError = "RuleErrorOutputPublicKeyNotRecognized"
RuleErrorInputsWithDifferingSpendKeys RuleError = "RuleErrorInputsWithDifferingSpendKeys"
RuleErrorInvalidTransactionSignature RuleError = "RuleErrorInvalidTransactionSignature"
RuleErrorMissingBlockProducerSignature RuleError = "RuleErrorMissingBlockProducerSignature"
RuleErrorInvalidBlockProducerPublicKey RuleError = "RuleErrorInvalidBlockProducerPublicKey"
RuleErrorBlockProducerPublicKeyNotInWhitelist RuleError = "RuleErrorBlockProducerPublicKeyNotInWhitelist"
RuleErrorForbiddenBlockProducerPublicKey RuleError = "RuleErrorForbiddenBlockProducerPublicKey"
RuleErrorInvalidBlockProducerSIgnature RuleError = "RuleErrorInvalidBlockProducerSIgnature"
RuleErrorInvalidBlockHeader RuleError = "RuleErrorInvalidBlockHeader"
RuleErrorBlockAlreadyExists RuleError = "RuleErrorBlockAlreadyExists"
RuleErrorOrphanBlock RuleError = "RuleErrorOrphanBlock"
RuleErrorInputWithPublicKeyDifferentFromTxnPublicKey RuleError = "RuleErrorInputWithPublicKeyDifferentFromTxnPublicKey"
RuleErrorBlockRewardTxnNotAllowedToHaveInputs RuleError = "RuleErrorBlockRewardTxnNotAllowedToHaveInputs"
RuleErrorBlockRewardTxnNotAllowedToHaveSignature RuleError = "RuleErrorBlockRewardTxnNotAllowedToHaveSignature"
RuleErrorDeflationBombForbidsMintingAnyMoreDeSo RuleError = "RuleErrorDeflationBombForbidsMintingAnyMoreDeSo"
RuleErrorBitcoinExchangeShouldNotHaveInputs RuleError = "RuleErrorBitcoinExchangeShouldNotHaveInputs"
RuleErrorBitcoinExchangeShouldNotHaveOutputs RuleError = "RuleErrorBitcoinExchangeShouldNotHaveOutputs"
RuleErrorBitcoinExchangeShouldNotHavePublicKey RuleError = "RuleErrorBitcoinExchangeShouldNotHavePublicKey"
RuleErrorBitcoinExchangeShouldNotHaveSignature RuleError = "RuleErrorBitcoinExchangeShouldNotHaveSignature"
RuleErrorBitcoinExchangeHasBadBitcoinTxHash RuleError = "RuleErrorBitcoinExchangeHasBadBitcoinTxHash"
RuleErrorBitcoinExchangeDoubleSpendingBitcoinTransaction RuleError = "RuleErrorBitcoinExchangeDoubleSpendingBitcoinTransaction"
RuleErrorBitcoinExchangeBlockHashNotFoundInMainBitcoinChain RuleError = "RuleErrorBitcoinExchangeBlockHashNotFoundInMainBitcoinChain"
RuleErrorBitcoinExchangeHasBadMerkleRoot RuleError = "RuleErrorBitcoinExchangeHasBadMerkleRoot"
RuleErrorBitcoinExchangeInvalidMerkleProof RuleError = "RuleErrorBitcoinExchangeInvalidMerkleProof"
RuleErrorBitcoinExchangeValidPublicKeyNotFoundInInputs RuleError = "RuleErrorBitcoinExchangeValidPublicKeyNotFoundInInputs"
RuleErrorBitcoinExchangeProblemComputingBurnOutput RuleError = "RuleErrorBitcoinExchangeProblemComputingBurnOutput"
RuleErrorBitcoinExchangeFeeOverflow RuleError = "RuleErrorBitcoinExchangeFeeOverflow"
RuleErrorBitcoinExchangeTotalOutputLessThanOrEqualZero RuleError = "RuleErrorBitcoinExchangeTotalOutputLessThanOrEqualZero"
RuleErrorTxnSanity RuleError = "RuleErrorTxnSanity"
RuleErrorTxnTooBig RuleError = "RuleErrorTxnTooBig"
RuleErrorTxnSigHasHighS RuleError = "RuleErrorTxnSigHasHighS"
RuleErrorPrivateMessageEncryptedTextLengthExceedsMax RuleError = "RuleErrorPrivateMessageEncryptedTextLengthExceedsMax"
RuleErrorPrivateMessageRecipientPubKeyLen RuleError = "RuleErrorPrivateMessageRecipientPubKeyLen"
RuleErrorPrivateMessageTstampIsZero RuleError = "RuleErrorPrivateMessageTstampIsZero"
RuleErrorTransactionMissingPublicKey RuleError = "RuleErrorTransactionMissingPublicKey"
RuleErrorPrivateMessageExistsWithSenderPublicKeyTstampTuple RuleError = "RuleErrorPrivateMessageExistsWithSenderPublicKeyTstampTuple"
RuleErrorPrivateMessageExistsWithRecipientPublicKeyTstampTuple RuleError = "RuleErrorPrivateMessageExistsWithRecipientPublicKeyTstampTuple"
RuleErrorPrivateMessageParsePubKeyError RuleError = "RuleErrorPrivateMessageParsePubKeyError"
RuleErrorPrivateMessageSenderPublicKeyEqualsRecipientPublicKey RuleError = "RuleErrorPrivateMessageSenderPublicKeyEqualsRecipientPublicKey"
RuleErrorPrivateMessageMessagingPartyBeforeBlockHeight RuleError = "RuleErrorPrivateMessageMessagingPartyBeforeBlockHeight"
RuleErrorPrivateMessageSentWithoutProperMessagingParty RuleError = "RuleErrorPrivateMessageSentWithoutProperMessagingParty"
RuleErrorPrivateMessageFailedToValidateMessagingKey RuleError = "RuleErrorPrivateMessageFailedToValidateMessagingKey"
RuleErrorBurnAddressCannotBurnBitcoin RuleError = "RuleErrorBurnAddressCannotBurnBitcoin"
RuleErrorPrivateMessageInvalidVersion RuleError = "RuleErrorPrivateMessageInvalidVersion"
RuleErrorPrivateMessageMissingExtraData RuleError = "RuleErrorPrivateMessageMissingExtraData"
RuleErrorAccessGroupsBeforeBlockHeight RuleError = "RuleErrorAccessGroupsBeforeBlockHeight"
RuleErrorAccessGroupsNameCannotBeZeros RuleError = "RuleErrorAccessGroupsNameCannotBeZeros"
RuleErrorAccessPublicKeyCannotBeOwnerKey RuleError = "RuleErrorAccessPublicKeyCannotBeOwnerKey"
RuleErrorAccessGroupOwnerPublicKeyCannotBeDifferent RuleError = "RuleErrorAccessGroupOwnerPublicKeyCannotBeDifferent"
RuleErrorAccessGroupAlreadyExists RuleError = "RuleErrorAccessGroupAlreadyExists"
RuleErrorAccessGroupDoesNotExist RuleError = "RuleErrorAccessGroupDoesNotExist"
RuleErrorAccessGroupOperationTypeNotSupported RuleError = "RuleErrorAccessGroupOperationTypeNotSupported"
RuleErrorAccessGroupMembersBeforeBlockHeight RuleError = "RuleErrorAccessGroupMembersBeforeBlockHeight"
RuleErrorAccessGroupDoesntExist RuleError = "RuleErrorAccessGroupDoesntExist"
RuleErrorAccessGroupKeyNameTooShort RuleError = "RuleErrorAccessGroupKeyNameTooShort"
RuleErrorAccessGroupKeyNameTooLong RuleError = "RuleErrorAccessGroupKeyNameTooLong"
RuleErrorAccessGroupMembersListCannotBeEmpty RuleError = "RuleErrorAccessGroupMembersListCannotBeEmpty"
RuleErrorAccessMemberAlreadyExists RuleError = "RuleErrorAccessMemberAlreadyExists"
RuleErrorAccessGroupMemberOperationTypeNotSupported RuleError = "RuleErrorAccessGroupMemberOperationTypeNotSupported"
RuleErrorAccessMemberDoesntExist RuleError = "RuleErrorAccessMemberDoesntExist"
RuleErrorAccessGroupMemberListDuplicateMember RuleError = "RuleErrorAccessGroupMemberListDuplicateMember"
RuleErrorAccessGroupMemberCantAddOwnerBySameGroup RuleError = "RuleErrorAccessGroupMemberCantAddOwnerBySameGroup"
RuleErrorAccessGroupMemberDoesntExistOrIsDeleted RuleError = "RuleErrorAccessGroupMemberDoesntExistOrIsDeleted"
RuleErrorAccessGroupMemberRemoveEncryptedKeyNotEmpty RuleError = "RuleErrorAccessGroupMemberRemoveEncryptedKeyNotEmpty"
RuleErrorAccessGroupMemberRemoveExtraDataNotEmpty RuleError = "RuleErrorAccessGroupMemberRemoveExtraDataNotEmpty"
RuleErrorAccessGroupPrevMembersListIsIncorrect RuleError = "RuleErrorAccessGroupPrevMembersListIsIncorrect"
RuleErrorAccessGroupMemberEnumerationRecursionLimit RuleError = "RuleErrorAccessGroupMemberEnumerationRecursionLimit"
RuleErrorAccessGroupMemberPublicKeyMismatch RuleError = "RuleErrorAccessGroupMemberPublicKeyMismatch"
RuleErrorAccessGroupCreateRequiresNonZeroInput RuleError = "RuleErrorAccessGroupCreateRequiresNonZeroInput"
RuleErrorAccessGroupTransactionSpendingLimitInvalid RuleError = "RuleErrorAccessGroupTransactionSpendingLimitInvalid"
RuleErrorAccessGroupMemberSpendingLimitInvalid RuleError = "RuleErrorAccessGroupMemberSpendingLimitInvalid"
RuleErrorAccessGroupMemberPublicKeyCannotBeDifferent RuleError = "RuleErrorAccessGroupMemberPublicKeyCannotBeDifferent"
RuleErrorNewMessageEncryptedTextLengthExceedsMax RuleError = "RuleErrorNewMessageEncryptedTextLengthExceedsMax"
RuleErrorNewMessageTimestampNanosCannotBeZero RuleError = "RuleErrorNewMessageTimestampNanosCannotBeZero"
RuleErrorNewMessageDmSenderAndRecipientCannotBeTheSame RuleError = "RuleErrorNewMessageDmSenderAndRecipientCannotBeTheSame"
RuleErrorNewMessageDmMessageAlreadyExists RuleError = "RuleErrorNewMessageDmMessageAlreadyExists"
RuleErrorNewMessageDmMessageDoesNotExist RuleError = "RuleErrorNewMessageDmMessageDoesNotExist"
RuleErrorNewMessageDmMessageTimestampMismatch RuleError = "RuleErrorNewMessageDmMessageTimestampMismatch"
RuleErrorNewMessageMessageSenderDoesNotMatchTxnPublicKey RuleError = "RuleErrorNewMessageMessageSenderDoesNotMatchTxnPublicKey"
RuleErrorNewMessageBeforeDeSoAccessGroups RuleError = "RuleErrorNewMessageBeforeDeSoAccessGroups"
RuleErrorNewMessageGroupChatMessageAlreadyExists RuleError = "RuleErrorNewMessageGroupChatMessageAlreadyExists"
RuleErrorNewMessageGroupChatMessageDoesNotExist RuleError = "RuleErrorNewMessageGroupChatMessageDoesNotExist"
RuleErrorNewMessageGroupMessageTimestampMismatch RuleError = "RuleErrorNewMessageGroupMessageTimestampMismatch"
RuleErrorNewMessageGetDmMessagesRecursionLimit RuleError = "RuleErrorNewMessageGetDmMessagesRecursionLimit"
RuleErrorNewMessageGetGroupMessagesRecursionLimit RuleError = "RuleErrorNewMessageGetGroupMessagesRecursionLimit"
RuleErrorNewMessageGroupChatMemberEntryDoesntExist RuleError = "RuleErrorNewMessageGroupChatMemberEntryDoesntExist"
RuleErrorNewMessageUnknownMessageType RuleError = "RuleErrorNewMessageUnknownMessageType"
RuleErrorNewMessageUnknownOperationType RuleError = "RuleErrorNewMessageUnknownOperationType"
RuleErrorFollowPubKeyLen RuleError = "RuleErrorFollowFollowedPubKeyLen"
RuleErrorFollowParsePubKeyError RuleError = "RuleErrorFollowParsePubKeyError"
RuleErrorFollowEntryAlreadyExists RuleError = "RuleErrorFollowEntryAlreadyExists"
RuleErrorFollowingNonexistentProfile RuleError = "RuleErrorFollowingNonexistentProfile"
RuleErrorCannotUnfollowNonexistentFollowEntry RuleError = "RuleErrorCannotUnfollowNonexistentFollowEntry"
RuleErrorProfilePublicKeyNotEqualToPKIDPublicKey RuleError = "RuleErrorProfilePublicKeyNotEqualToPKIDPublicKey"
RuleErrorLikeEntryAlreadyExists RuleError = "RuleErrorLikeEntryAlreadyExists"
RuleErrorCannotLikeNonexistentPost RuleError = "RuleErrorCannotLikeNonexistentPost"
RuleErrorCannotUnlikeWithoutAnExistingLike RuleError = "RuleErrorCannotUnlikeWithoutAnExistingLike"
RuleErrorProfileUsernameTooShort RuleError = "RuleErrorProfileUsernameTooShort"
RuleErrorProfileDescriptionTooShort RuleError = "RuleErrorProfileDescriptionTooShort"
RuleErrorProfileUsernameTooLong RuleError = "RuleErrorProfileUsernameTooLong"
RuleErrorProfileDescriptionTooLong RuleError = "RuleErrorProfileDescriptionTooLong"
RuleErrorProfileProfilePicTooShort RuleError = "RuleErrorProfileProfilePicTooShort"
RuleErrorProfileUpdateRequiresNonZeroInput RuleError = "RuleErrorProfileUpdateRequiresNonZeroInput"
RuleErrorCreateProfileTxnOutputExceedsInput RuleError = "RuleErrorCreateProfileTxnOutputExceedsInput"
RuleErrorProfilePublicKeySize RuleError = "RuleErrorProfilePublicKeySize"
RuleErrorProfileBadPublicKey RuleError = "RuleErrorProfileBadPublicKey"
RuleErrorProfilePubKeyNotAuthorized RuleError = "RuleErrorProfilePubKeyNotAuthorized"
RuleErrorProfileModificationNotAuthorized RuleError = "RuleErrorProfileModificationNotAuthorized"
RuleErrorProfileUsernameCannotContainZeros RuleError = "RuleErrorProfileUsernameCannotContainZeros"
RuleSubmitPostNilParentPostHash RuleError = "RuleSubmitPostNilParentPostHash"
RuleSubmitPostTitleLength RuleError = "RuleSubmitPostTitleLength"
RuleSubmitPostBodyLength RuleError = "RuleSubmitPostBodyLength"
RuleSubmitPostSubLength RuleError = "RuleSubmitPostSubLength"
RuleErrorSubmitPostStakeMultipleSize RuleError = "RuleErrorSubmitPostStakeMultipleSize"
RuleErrorSubmitPostCreatorPercentageSize RuleError = "RuleErrorSubmitPostCreatorPercentageSize"
RuleErrorSubmitPostTimestampIsZero RuleError = "RuleErrorSubmitPostTimestampIsZero"
RuleErrorPostAlreadyExists RuleError = "RuleErrorPostAlreadyExists"
RuleErrorSubmitPostInvalidCommentStakeID RuleError = "RuleErrorSubmitPostInvalidCommentStakeID"
RuleErrorSubmitPostRequiresNonZeroInput RuleError = "RuleErrorSubmitPostRequiresNonZeroInput"
RuleErrorSubmitPostInvalidPostHashToModify RuleError = "RuleErrorSubmitPostInvalidPostHashToModify"
RuleErrorSubmitPostModifyingNonexistentPost RuleError = "RuleErrorSubmitPostModifyingNonexistentPost"
RuleErrorSubmitPostPostModificationNotAuthorized RuleError = "RuleErrorSubmitPostPostModificationNotAuthorized"
RuleErrorSubmitPostInvalidParentStakeIDLength RuleError = "RuleErrorSubmitPostInvalidParentStakeIDLength"
RuleErrorSubmitPostParentNotFound RuleError = "RuleErrorSubmitPostParentNotFound"
RuleErrorSubmitPostRepostPostNotFound RuleError = "RuleErrorSubmitPostRepostPostNotFound"
RuleErrorSubmitPostRepostOfRepost RuleError = "RuleErrorSubmitPostRepostOfRepost"
RuleErrorSubmitPostUpdateRepostHash RuleError = "RuleErrorSubmitPostUpdateRepostHash"
RuleErrorSubmitPostUpdateIsQuotedRepost RuleError = "RuleErrorSubmitPostUpdateIsQuotedRepost"
RuleErrorSubmitPostCannotUpdateNFT RuleError = "RuleErrorSubmitPostCannotUpdateNFT"
RuleErrorSubmitPostModifyingFrozenPost RuleError = "RuleErrorSubmitPostModifyingFrozenPost"
RuleErrorInvalidStakeID RuleError = "RuleErrorInvalidStakeID"
RuleErrorInvalidStakeIDSize RuleError = "RuleErrorInvalidStakeIDSize"
RuleErrorStakingToNonexistentPost RuleError = "RuleErrorStakingToNonexistentPost"
RuleErrorStakingToNonexistentProfile RuleError = "RuleErrorStakingToNonexistentProfile"
RuleErrorNotImplemented RuleError = "RuleErrorNotImplemented"
RuleErrorStakingZeroNanosNotAllowed RuleError = "RuleErrorStakingZeroNanosNotAllowed"
RuleErrorAddStakeTxnMustHaveExactlyOneOutput RuleError = "RuleErrorAddStakeTxnMustHaveExactlyOneOutput"
RuleErrorExistingStakeExceedsMaxAllowed RuleError = "RuleErrorExistingStakeExceedsMaxAllowed"
RuleErrorAddStakeRequiresNonZeroInput RuleError = "RuleErrorAddStakeRequiresNonZeroInput"
RuleErrorProfileForPostDoesNotExist RuleError = "RuleErrorProfileForPostDoesNotExist"
// Global Params
RuleErrorExchangeRateTooLow RuleError = "RuleErrorExchangeRateTooLow"
RuleErrorExchangeRateTooHigh RuleError = "RuleErrorExchangeRateTooHigh"
RuleErrorMinNetworkFeeTooLow RuleError = "RuleErrorMinNetworkFeeTooLow"
RuleErrorMinNetworkFeeTooHigh RuleError = "RuleErrorMinNetworkFeeTooHigh"
RuleErrorCreateProfileFeeTooLow RuleError = "RuleErrorCreateProfileFeeTooLow"
RuleErrorCreateProfileTooHigh RuleError = "RuleErrorCreateProfileTooHigh"
RuleErrorCreateNFTFeeTooLow RuleError = "RuleErrorCreateNFTFeeTooLow"
RuleErrorCreateNFTFeeTooHigh RuleError = "RuleErrorCreateNFTFeeTooHigh"
RuleErrorMaxCopiesPerNFTTooLow RuleError = "RuleErrorMaxCopiesPerNFTTooLow"
RuleErrorMaxCopiesPerNFTTooHigh RuleError = "RuleErrorMaxCopiesPerNFTTooHigh"
RuleErrorForbiddenPubKeyLength RuleError = "RuleErrorForbiddenPubKeyLength"
RuleErrorUserNotAuthorizedToUpdateExchangeRate RuleError = "RuleErrorUserNotAuthorizedToUpdateExchangeRate"
RuleErrorUserNotAuthorizedToUpdateGlobalParams RuleError = "RuleErrorUserNotAuthorizedToUpdateGlobalParams"
RuleErrorUserOutputMustBeNonzero RuleError = "RuleErrorUserOutputMustBeNonzero"
// DeSo Diamonds
RuleErrorBasicTransferHasDiamondPostHashWithoutDiamondLevel RuleError = "RuleErrorBasicTransferHasDiamondPostHashWithoutDiamondLevel"
RuleErrorBasicTransferHasInvalidDiamondLevel RuleError = "RuleErrorBasicTransferHasInvalidDiamondLevel"
RuleErrorBasicTransferDiamondInvalidLengthForPostHashBytes RuleError = "RuleErrorBasicTransferInvalidLengthForPostHashBytes"
RuleErrorBasicTransferDiamondPostEntryDoesNotExist RuleError = "RuleErrorBasicTransferDiamondPostEntryDoesNotExist"
RuleErrorBasicTransferInsufficientCreatorCoinsForDiamondLevel RuleError = "RuleErrorBasicTransferInsufficientCreatorCoinsForDiamondLevel"
RuleErrorBasicTransferDiamondCannotTransferToSelf RuleError = "RuleErrorBasicTransferDiamondCannotTransferToSelf"
RuleErrorBasicTransferInsufficientDeSoForDiamondLevel RuleError = "RuleErrorBasicTransferInsufficientDeSoForDiamondLevel"
RuleErrorCoinTransferRequiresNonZeroInput RuleError = "RuleErrorCoinTransferRequiresNonZeroInput"
RuleErrorCoinTransferInvalidProfilePubKeySize RuleError = "RuleErrorCoinTransferInvalidProfilePubKeySize"
RuleErrorCoinTransferInvalidReceiverPubKeySize RuleError = "RuleErrorCoinTransferInvalidReceiverPubKeySize"
RuleErrorCoinTransferInvalidReceiverPubKey RuleError = "RuleErrorCoinTransferInvalidReceiverPubKey"
RuleErrorCoinTransferInvalidProfilePubKey RuleError = "RuleErrorCoinTransferInvalidProfilePubKey"
RuleErrorCoinTransferOnNonexistentProfile RuleError = "RuleErrorCoinTransferOnNonexistentProfile"
RuleErrorCoinTransferBalanceEntryDoesNotExist RuleError = "RuleErrorCoinTransferBalanceEntryDoesNotExist"
RuleErrorCreatorCoinTransferMustBeGreaterThanMinThreshold RuleError = "RuleErrorCreatorCoinTransferMustBeGreaterThanMinThreshold"
RuleErrorCoinTransferInsufficientCoins RuleError = "RuleErrorCoinTransferInsufficientCoins"
RuleErrorCoinTransferCannotTransferToSelf RuleError = "RuleErrorCoinTransferCannotTransferToSelf"
RuleErrorCreatorCoinTransferHasDiamondPostHashWithoutDiamondLevel RuleError = "RuleErrorCreatorCoinTransferHasDiamondPostHashWithoutDiamondLevel"
RuleErrorCreatorCoinTransferCantSendDiamondsForOtherProfiles RuleError = "RuleErrorCreatorCoinTransferCantSendDiamondsForOtherProfiles"
RuleErrorCreatorCoinTransferCantDiamondYourself RuleError = "RuleErrorCreatorCoinTransferCantDiamondYourself"
RuleErrorCreatorCoinTransferInvalidLengthForPostHashBytes RuleError = "RuleErrorCreatorCoinTransferInvalidLengthForPostHashBytes"
RuleErrorCreatorCoinTransferInsufficientCreatorCoinsForDiamondLevel RuleError = "RuleErrorCreatorCoinTransferInsufficientCreatorCoinsForDiamondLevel"
RuleErrorCreatorCoinTransferHasInvalidDiamondLevel RuleError = "RuleErrorCreatorCoinTransferHasInvalidDiamondLevel"
RuleErrorCreatorCoinTransferHasDiamondsAfterDeSoBlockHeight RuleError = "RuleErrorCreatorCoinTransferHasDiamondsAfterDeSoBlockHeight"
RuleErrorCreatorCoinTransferPostAlreadyHasSufficientDiamonds RuleError = "RuleErrorCreatorCoinTransferPostAlreadyHasSufficientDiamonds"
RuleErrorCreatorCoinTransferDiamondsCantHaveNegativeNanos RuleError = "RuleErrorCreatorCoinTransferDiamondsCantHaveNegativeNanos"
RuleErrorCreatorCoinTransferDiamondPostEntryDoesNotExist RuleError = "RuleErrorCreatorCoinTransferDiamondPostEntryDoesNotExist"
RuleErrorCreatorCoinRequiresNonZeroInput RuleError = "RuleErrorCreatorCoinRequiresNonZeroInput"
RuleErrorCreatorCoinInvalidPubKeySize RuleError = "RuleErrorCreatorCoinInvalidPubKeySize"
RuleErrorCreatorCoinOperationOnNonexistentProfile RuleError = "RuleErrorCreatorCoinOperationOnNonexistentProfile"
RuleErrorCreatorCoinBuyMustTradeNonZeroDeSo RuleError = "RuleErrorCreatorCoinBuyMustTradeNonZeroDeSo"
RuleErrorCreatorCoinTxnOutputWithInvalidBuyAmount RuleError = "RuleErrorCreatorCoinTxnOutputWithInvalidBuyAmount"
RuleErrorCreatorCoinTxnOutputExceedsInput RuleError = "RuleErrorCreatorCoinTxnOutputExceedsInput"
RuleErrorCreatorCoinLessThanMinimumSetByUser RuleError = "RuleErrorCreatorCoinLessThanMinimumSetByUser"
RuleErrorCreatorCoinBuyMustTradeNonZeroDeSoAfterFees RuleError = "RuleErrorCreatorCoinBuyMustTradeNonZeroDeSoAfterFees"
RuleErrorCreatorCoinBuyMustTradeNonZeroDeSoAfterFounderReward RuleError = "RuleErrorCreatorCoinBuyMustTradeNonZeroDeSoAfterFounderReward"
RuleErrorCreatorCoinBuyMustSatisfyAutoSellThresholdNanos RuleError = "RuleErrorCreatorCoinBuyMustSatisfyAutoSellThresholdNanos"
RuleErrorCreatorCoinBuyMustSatisfyAutoSellThresholdNanosForCreator RuleError = "RuleErrorCreatorCoinBuyMustSatisfyAutoSellThresholdNanosForCreator"
RuleErrorCreatorCoinBuyMustSatisfyAutoSellThresholdNanosForBuyer RuleError = "RuleErrorCreatorCoinBuyMustSatisfyAutoSellThresholdNanosForBuyer"
RuleErrorCreatorCoinBuyZeroLockedNanosAndNonZeroHolders RuleError = "RuleErrorCreatorCoinBuyZeroLockedNanosAndNonZeroHolders"
RuleErrorCreatorCoinSellMustHaveAtLeastOneInput RuleError = "RuleErrorCreatorCoinSellMustHaveAtLeastOneInput"
RuleErrorCreatorCoinSellMustTradeNonZeroCreatorCoin RuleError = "RuleErrorCreatorCoinSellMustTradeNonZeroCreatorCoin"
RuleErrorCreatorCoinSellerBalanceEntryDoesNotExist RuleError = "RuleErrorCreatorCoinSellerBalanceEntryDoesNotExist"
RuleErrorCreatorCoinSellInsufficientCoins RuleError = "RuleErrorCreatorCoinSellInsufficientCoins"
RuleErrorCreatorCoinSellNotAllowedWhenZeroDeSoLocked RuleError = "RuleErrorCreatorCoinSellNotAllowedWhenZeroDeSoLocked"
RuleErrorDeSoReceivedIsLessThanMinimumSetBySeller RuleError = "RuleErrorDeSoReceivedIsLessThanMinimumSetBySeller"
// DAO Coins
RuleErrorDAOCoinRequiresNonZeroInput RuleError = "RuleErrorDAOCoinRequiresNonZeroInput"
RuleErrorDAOCoinInvalidPubKeySize RuleError = "RuleErrorDAOCoinInvalidPubKeySize"
RuleErrorDAOCoinInvalidPubKey RuleError = "RuleErrorDAOCoinInvalidPubKey"
RuleErrorDAOCoinOperationOnNonexistentProfile RuleError = "RuleErrorDAOCoinOperationOnNonexistentProfile"
RuleErrorDAOCoinBurnMustBurnNonZeroDAOCoin RuleError = "RuleErrorDAOCoinBurnMustBurnNonZeroDAOCoin"
RuleErrorDAOCoinBurnerBalanceEntryDoesNotExist RuleError = "RuleErrorDAOCoinBurnerBalanceEntryDoesNotExist"
RuleErrorDAOCoinBurnInsufficientCoins RuleError = "RuleErrorDAOCoinBurnInsufficientCoins"
RuleErrorOnlyProfileOwnerCanMintDAOCoin RuleError = "RuleErrorOnlyProfileOwnerCanMintDAOCoin"
RuleErrorDAOCoinMustMintNonZeroDAOCoin RuleError = "RuleErrorDAOCoinMustMintNonZeroDAOCoin"
RuleErrorOverflowWhileMintingDAOCoins RuleError = "RuleErrorOverflowWhileMintingDAOCoins"
RuleErrorDAOCoinBurnAmountExceedsCoinsInCirculation RuleError = "RuleErrorDAOCoinBurnAmountExceedsCoinsInCirculation"
RuleErrorDAOCoinBeforeDAOCoinBlockHeight RuleError = "RuleErrorDAOCoinBeforeDAOCoinBlockHeight"
RuleErrorDAOCoinCannotDisableMintingIfAlreadyDisabled RuleError = "RuleErrorDAOCoinCannotDisableMintingIfAlreadyDisabled"
RuleErrorDAOCoinCannotMintIfMintingIsDisabled RuleError = "RuleErrorDAOCoinCannotMintIfMintingIsDisabled"
RuleErrorOnlyProfileOwnerCanDisableMintingDAOCoin RuleError = "RuleErrorOnlyProfileOwnerCanDisableMintingDAOCoin"
RuleErrorDAOCoinTransferProfileOwnerOnlyViolation RuleError = "RuleErrorDAOCoinTransferProfileOwnerOnlyViolation"
RuleErrorDAOCoinTransferDAOMemberOnlyViolation RuleError = "RuleErrorDAOCoinTransferDAOMemberOnlyViolation"
// DAO Coin Transfer Restrictions
RuleErrorOnlyProfileOwnerCanUpdateTransferRestrictionStatus RuleError = "RuleErrorOnlyProfileOwnerCanUpdateTransferRestrictionStatus"
RuleErrorDAOCoinCannotUpdateRestrictionStatusIfStatusIsPermanentlyUnrestricted RuleError = "RuleErrorDAOCoinCannotUpdateRestrictionStatusIfStatusIsPermanentlyUnrestricted"
RuleErrorDAOCoinCannotUpdateTransferRestrictionStatusToCurrentStatus RuleError = "RuleErrorDAOCoinCannotUpdateTransferRestrictionStatusToCurrentStatus"
// DAO Coin Limit Orders
RuleErrorDAOCoinLimitOrderBeforeBlockHeight RuleError = "RuleErrorDAOCoinLimitOrderBeforeBlockHeight"
RuleErrorDAOCoinLimitOrderInvalidTransactorPKID RuleError = "RuleErrorDAOCoinLimitOrderInvalidTransactorPKID"
RuleErrorDAOCoinLimitOrderInvalidBuyingDAOCoinCreatorPKID RuleError = "RuleErrorDAOCoinLimitOrderInvalidBuyingDAOCoinCreatorPKID"
RuleErrorDAOCoinLimitOrderInvalidSellingDAOCoinCreatorPKID RuleError = "RuleErrorDAOCoinLimitOrderInvalidSellingDAOCoinCreatorPKID"
RuleErrorDAOCoinLimitOrderCannotBuyAndSellSameCoin RuleError = "RuleErrorDAOCoinLimitOrderCannotBuyAndSellSameCoin"
RuleErrorDAOCoinLimitOrderInvalidOperationType RuleError = "RuleErrorDAOCoinLimitOrderInvalidOperationType"
RuleErrorDAOCoinLimitOrderBuyingDAOCoinCreatorMissingProfile RuleError = "RuleErrorDAOCoinLimitOrderBuyingDAOCoinCreatorMissingProfile"
RuleErrorDAOCoinLimitOrderSellingDAOCoinCreatorMissingProfile RuleError = "RuleErrorDAOCoinLimitOrderSellingDAOCoinCreatorMissingProfile"
RuleErrorDAOCoinLimitOrderInvalidExchangeRate RuleError = "RuleErrorDAOCoinLimitOrderInvalidExchangeRate"
RuleErrorDAOCoinLimitOrderInvalidQuantity RuleError = "RuleErrorDAOCoinLimitOrderInvalidQuantity"
RuleErrorDAOCoinLimitOrderTotalCostOverflowsUint256 RuleError = "RuleErrorDAOCoinLimitOrderTotalCostOverflowsUint256"
RuleErrorDAOCoinLimitOrderTotalCostOverflowsUint64 RuleError = "RuleErrorDAOCoinLimitOrderTotalCostOverflowsUint64"
RuleErrorDAOCoinLimitOrderTotalCostIsLessThanOneNano RuleError = "RuleErrorDAOCoinLimitOrderTotalCostIsLessThanOneNano"
RuleErrorDAOCoinLimitOrderInsufficientDESOToOpenOrder RuleError = "RuleErrorDAOCoinLimitOrderInsufficientDESOToOpenOrder"
RuleErrorDAOCoinLimitOrderInsufficientDAOCoinsToOpenOrder RuleError = "RuleErrorDAOCoinLimitOrderInsufficientDAOCoinsToOpenOrder"
RuleErrorDAOCoinLimitOrderBidderInputNoLongerExists RuleError = "RuleErrorDAOCoinLimitOrderBidderInputNoLongerExists"
RuleErrorDAOCoinLimitOrderToCancelNotFound RuleError = "RuleErrorDAOCoinLimitOrderToCancelNotFound"
RuleErrorDAOCoinLimitOrderToCancelNotYours RuleError = "RuleErrorDAOCoinLimitOrderToCancelNotYours"
RuleErrorDAOCoinLimitOrderOverspendingDESO RuleError = "RuleErrorDAOCoinLimitOrderOverspendingDESO"
RuleErrorDAOCoinLimitOrderOverflowsDESO RuleError = "RuleErrorDAOCoinLimitOrderOverflowsDESO"
RuleErrorDAOCoinLimitOrderOverspendingDAOCoin RuleError = "RuleErrorDAOCoinLimitOrderOverspendingDAOCoin"
RuleErrorDAOCoinLimitOrderOverflowsDAOCoin RuleError = "RuleErrorDAOCoinLimitOrderOverflowsDAOCoin"
RuleErrorDAOCoinLimitOrderMatchingOrderIsDeleted RuleError = "RuleErrorDAOCoinLimitOrderMatchingOrderIsDeleted"
RuleErrorDAOCoinLimitOrderMatchingOwnOrder RuleError = "RuleErrorDAOCoinLimitOrderMatchingOwnOrder"
RuleErrorDAOCoinLimitOrderMatchingOrderBuyingDifferentCoins RuleError = "RuleErrorDAOCoinLimitOrderMatchingOrderBuyingDifferentCoins"
RuleErrorDAOCoinLimitOrderMatchingOrderSellingDifferentCoins RuleError = "RuleErrorDAOCoinLimitOrderMatchingOrderSellingDifferentCoins"
RuleErrorDAOCoinLimitOrderBalanceEntryDoesNotExist RuleError = "RuleErrorDAOCoinLimitOrderBalanceEntryDoesNotExist"
RuleErrorDAOCoinLimitOrderBalanceDeltasNonZero RuleError = "RuleErrorDAOCoinLimitOrderBalanceDeltasNonZero"
RuleErrorDAOCoinLimitOrderFeeNanosBelowMinTxFee RuleError = "RuleErrorDAOCoinLimitOrderFeeNanosBelowMinTxFee"
RuleErrorDAOCoinLimitOrderFeeNanosOverflow RuleError = "RuleErrorDAOCoinLimitOrderFeeNanosOverflow"
RuleErrorDAOCoinLimitOrderTotalInputMinusTotalOutputNotEqualToFee RuleError = "RuleErrorDAOCoinLimitOrderTotalInputMinusTotalOutputNotEqualToFee"
RuleErrorDAOCoinLimitOrderInvalidFillType RuleError = "RuleErrorDAOCoinLimitOrderInvalidFillType"
RuleErrorDAOCoinLimitOrderFillOrKillOrderUnfulfilled RuleError = "RuleErrorDAOCoinLimitOrderFillOrKillOrderUnfulfilled"
// Derived Keys
RuleErrorAuthorizeDerivedKeyAccessSignatureNotValid RuleError = "RuleErrorAuthorizeDerivedKeyAccessSignatureNotValid"
RuleErrorAuthorizeDerivedKeyRequiresNonZeroInput RuleError = "RuleErrorAuthorizeDerivedKeyRequiresNonZeroInput"
RuleErrorAuthorizeDerivedKeyExpiredDerivedPublicKey RuleError = "RuleErrorAuthorizeDerivedKeyExpired"
RuleErrorAuthorizeDerivedKeyInvalidDerivedPublicKey RuleError = "RuleErrorAuthorizeDerivedKeyInvalidDerivedKey"
RuleErrorAuthorizeDerivedKeyDeletedDerivedPublicKey RuleError = "RuleErrorAuthorizeDerivedKeyDeletedDerivedPublicKey"
RuleErrorAuthorizeDerivedKeyInvalidOwnerPublicKey RuleError = "RuleErrorAuthorizeDerivedKeyInvalidOwnerPublicKey"
RuleErrorDerivedKeyNotAuthorized RuleError = "RuleErrorDerivedKeyNotAuthorized"
RuleErrorDerivedKeyInvalidExtraData RuleError = "RuleErrorDerivedKeyInvalidExtraData"
RuleErrorDerivedKeyBeforeBlockHeight RuleError = "RuleErrorDerivedKeyBeforeBlockHeight"
RuleErrorDerivedKeyHasBothExtraDataAndRecoveryId RuleError = "RuleErrorDerivedKeyHasBothExtraDataAndRecoveryId"
RuleErrorDerivedKeyInvalidRecoveryId RuleError = "RuleErrorDerivedKeyInvalidRecoveryId"
RuleErrorUnlimitedDerivedKeyBeforeBlockHeight RuleError = "RuleErrorUnlimitedDerivedKeyBeforeBlockHeight"
RuleErrorUnlimitedDerivedKeyNonEmptySpendingLimits RuleError = "RuleErrorUnlimitedDerivedKeyNonEmptySpendingLimits"
// Messages
RuleErrorMessagingPublicKeyCannotBeOwnerKey RuleError = "RuleErrorMessagingPublicKeyCannotBeOwnerKey"
RuleErrorMessagingSignatureInvalid RuleError = "RuleErrorMessagingSignatureInvalid"
RuleErrorMessagingPublicKeyCannotBeDifferent RuleError = "RuleErrorMessagingPublicKeyCannotBeDifferent"
RuleErrorMessagingEncryptedKeyCannotBeDifferent RuleError = "RuleErrorMessagingEncryptedKeyCannotBeDifferent"
RuleErrorMessagingMemberEncryptedKeyTooShort RuleError = "RuleErrorMessagingMemberEncryptedKeyTooShort"
RuleErrorMessagingMemberKeyDoesntExist RuleError = "RuleErrorMessagingMemberKeyDoesntExist"
RuleErrorMessagingMemberAlreadyExists RuleError = "RuleErrorMessagingMemberAlreadyExists"
RuleErrorMessagingKeyDoesntAddMembers RuleError = "RuleErrorMessagingKeyDoesntAddMembers"
RuleErrorMessagingKeyNameNotProvided RuleError = "RuleErrorMessagingKeyNameNotProvided"
RuleErrorMessagingKeyNameTooShort RuleError = "RuleErrorMessagingKeyNameTooShort"
RuleErrorMessagingKeyNameTooLong RuleError = "RuleErrorMessagingKeyNameTooLong"
RuleErrorMessagingKeyNameCannotBeZeros RuleError = "RuleErrorMessagingKeyNameCannotBeZeros"
RuleErrorMessagingOwnerPublicKeyInvalid RuleError = "RuleErrorMessagingOwnerPublicKeyInvalid"
RuleErrorMessagingKeyConnect RuleError = "RuleErrorMessagingKeyConnect"
RuleErrorMessagingKeySignatureNotProvided RuleError = "RuleErrorMessagingKeySignatureNotProvided"
RuleErrorMessagingKeyBeforeBlockHeight RuleError = "RuleErrorMessagingKeyBeforeBlockHeight"
// NFTs
RuleErrorTooManyNFTCopies RuleError = "RuleErrorTooManyNFTCopies"
RuleErrorCreateNFTRequiresNonZeroInput RuleError = "RuleErrorCreateNFTRequiresNonZeroInput"
RuleErrorUpdateNFTRequiresNonZeroInput RuleError = "RuleErrorUpdateNFTRequiresNonZeroInput"
RuleErrorCreateNFTOnNonexistentPost RuleError = "RuleErrorCreateNFTOnNonexistentPost"
RuleErrorCreateNFTOnVanillaRepost RuleError = "RuleErrorCreateNFTOnVanillaRepost"
RuleErrorCreateNFTWithInsufficientFunds RuleError = "RuleErrorCreateNFTWithInsufficientFunds"
RuleErrorCreateNFTOnPostThatAlreadyIsNFT RuleError = "RuleErrorCreateNFTOnPostThatAlreadyIsNFT"
RuleErrorCannotHaveUnlockableAndBuyNowNFT RuleError = "RuleErrorCannotHaveUnlockableAndBuyNowNFT"
RuleErrorCannotHaveBuyNowPriceBelowMinBidAmountNanos RuleError = "RuleErrorCannotHaveBuyNowPriceBelowMinBidAmountNanos"
RuleErrorCreateNFTMustBeCalledByPoster RuleError = "RuleErrorCreateNFTMustBeCalledByPoster"
RuleErrorNFTMustHaveNonZeroCopies RuleError = "RuleErrorNFTMustHaveNonZeroCopies"
RuleErrorCannotUpdateNonExistentNFT RuleError = "RuleErrorCannotUpdateNonExistentNFT"
RuleErrorCannotUpdatePendingNFTTransfer RuleError = "RuleErrorCannotUpdatePendingNFTTransfer"
RuleErrorCannotAcceptBidForPendingNFTTransfer RuleError = "RuleErrorCannotAcceptBidForPendingNFTTransfer"
RuleErrorCannotBidForPendingNFTTransfer RuleError = "RuleErrorCannotBidForPendingNFTTransfer"
RuleErrorUpdateNFTByNonOwner RuleError = "RuleErrorUpdateNFTByNonOwner"
RuleErrorAcceptNFTBidByNonOwner RuleError = "RuleErrorAcceptNFTBidByNonOwner"
RuleErrorCantCreateNFTWithoutProfileEntry RuleError = "RuleErrorCantCreateNFTWithoutProfileEntry"
RuleErrorNFTRoyaltyHasTooManyBasisPoints RuleError = "RuleErrorNFTRoyaltyHasTooManyBasisPoints"
RuleErrorNFTRoyaltyOverflow RuleError = "RuleErrorNFTRoyaltyOverflow"
RuleErrorNFTUpdateMustUpdateIsForSaleStatus RuleError = "RuleErrorNFTUpdateMustUpdateIsForSaleStatus"
RuleErrorBuyNowNFTBeforeBlockHeight RuleError = "RuleErrorBuyNowNFTBeforeBlockHeight"
RuleErrorAdditionalCoinRoyaltyMustHaveProfile RuleError = "RuleErrorAdditionalCoinRoyaltyMustHaveProfile"
RuleErrorAdditionalCoinRoyaltyOverflow RuleError = "RuleErrorAdditionalCoinRoyaltyOverflow"
RuleErrorCannotSpecifyCreatorAsAdditionalRoyalty RuleError = "RuleErrorCannotSpecifyCreatorAsAdditionalRoyalty"
RuleErrorAdditionalRoyaltyPubKeyMustBeValid RuleError = "RuleErrorAdditionalRoyaltyPubKeyMustBeValid"
// NFT Bids
RuleErrorNFTBidRequiresNonZeroInput RuleError = "RuleErrorNFTBidRequiresNonZeroInput"
RuleErrorAcceptNFTBidRequiresNonZeroInput RuleError = "RuleErrorAcceptNFTBidRequiresNonZeroInput"
RuleErrorNFTBidTxnOutputWithInvalidBidAmount RuleError = "RuleErrorNFTBidTxnOutputWithInvalidBidAmount"
RuleErrorBuyNowNFTBidTxnOutputExceedsInput RuleError = "RuleErrorBuyNowNFTBidTxnOutputExceedsInput"
RuleErrorBuyNowNFTBidMustBidNonZeroDeSo RuleError = "RuleErrorBuyNowNFTBidMustBidNonZeroDeSo"
RuleErrorBuyNowNFTBidMustHaveMinBidAmountNanos RuleError = "RuleErrorBuyNowNFTBidMustHaveMinBidAmountNanos"
RuleErrorNFTBidOnNonExistentPost RuleError = "RuleErrorNFTBidOnNonExistentPost"
RuleErrorNFTBidOnPostThatIsNotAnNFT RuleError = "RuleErrorNFTBidOnPostThatIsNotAnNFT"
RuleErrorNFTBidOnInvalidSerialNumber RuleError = "RuleErrorNFTBidOnInvalidSerialNumber"
RuleErrorNFTBidOnNonExistentNFTEntry RuleError = "RuleErrorNFTBidOnNonExistentNFTEntry"
RuleErrorNFTBidOnNFTThatIsNotForSale RuleError = "RuleErrorNFTBidOnNFTThatIsNotForSale"
RuleErrorNFTOwnerCannotBidOnOwnedNFT RuleError = "RuleErrorNFTOwnerCannotBidOnOwnedNFT"
RuleErrorCantAcceptNonExistentBid RuleError = "RuleErrorCantAcceptNonExistentBid"
RuleErrorAcceptedNFTBidAmountDoesNotMatch RuleError = "RuleErrorAcceptedNFTBidAmountDoesNotMatch"
RuleErrorPostEntryNotFoundForAcceptedNFTBid RuleError = "RuleErrorPostEntryNotFoundForAcceptedNFTBid"
RuleErrorUnlockableNFTMustProvideUnlockableText RuleError = "RuleErrorUnlockableNFTMustProvideUnlockableText"
RuleErrorUnlockableTextLengthExceedsMax RuleError = "RuleErrorUnlockableTextLengthExceedsMax"
RuleErrorAcceptedNFTBidMustSpecifyBidderInputs RuleError = "RuleErrorAcceptedNFTBidMustSpecifyBidderInputs"
RuleErrorBidderInputForAcceptedNFTBidNoLongerExists RuleError = "RuleErrorBidderInputForAcceptedNFTBidNoLongerExists"
RuleErrorAcceptNFTBidderInputsInsufficientForBidAmount RuleError = "RuleErrorAcceptNFTBidderInputsInsufficientForBidAmount"
RuleErrorInsufficientFundsForNFTBid RuleError = "RuleErrorInsufficientFundsForNFTBid"
RuleErrorNFTBidLessThanMinBidAmountNanos RuleError = "RuleErrorNFTBidLessThanMinBidAmountNanos"
RuleErrorZeroBidOnBuyNowNFT RuleError = "RuleErrorZeroBidOnBuyNowNFT"
// NFT Transfers
RuleErrorNFTTransferBeforeBlockHeight RuleError = "RuleErrorNFTTranserBeforeBlockHeight"
RuleErrorAcceptNFTTransferBeforeBlockHeight RuleError = "RuleErrorAcceptNFTTranserBeforeBlockHeight"
RuleErrorNFTTransferInvalidReceiverPubKeySize RuleError = "RuleErrorNFTTransferInvalidReceiverPubKeySize"
RuleErrorNFTTransferCannotTransferToSelf RuleError = "RuleErrorNFTTransferCannotTransferToSelf"
RuleErrorCannotTransferNonExistentNFT RuleError = "RuleErrorCannotTransferNonExistentNFT"
RuleErrorNFTTransferByNonOwner RuleError = "RuleErrorNFTTransferByNonOwner"
RuleErrorCannotTransferForSaleNFT RuleError = "RuleErrorCannotTransferForSaleNFT"
RuleErrorCannotTransferUnlockableNFTWithoutUnlockable RuleError = "RuleErrorCannotTransferUnlockableNFTWithoutUnlockable"
RuleErrorNFTTransferRequiresNonZeroInput RuleError = "RuleErrorNFTTransferRequiresNonZeroInput"
RuleErrorCannotAcceptTransferOfNonExistentNFT RuleError = "RuleErrorCannotAcceptTransferOfNonExistentNFT"
RuleErrorAcceptNFTTransferByNonOwner RuleError = "RuleErrorAcceptNFTTransferByNonOwner"
RuleErrorAcceptNFTTransferForNonPendingNFT RuleError = "RuleErrorAcceptNFTTransferForNonPendingNFT"
RuleErrorAcceptNFTTransferRequiresNonZeroInput RuleError = "RuleErrorAcceptNFTTransferRequiresNonZeroInput"
// NFT Burns
RuleErrorBurnNFTBeforeBlockHeight RuleError = "RuleErrorBurnNFTBeforeBlockHeight"
RuleErrorCannotBurnNonExistentNFT RuleError = "RuleErrorCannotBurnNonExistentNFT"
RuleErrorBurnNFTByNonOwner RuleError = "RuleErrorBurnNFTByNonOwner"
RuleErrorCannotBurnNFTThatIsForSale RuleError = "RuleErrorCannotBurnNFTThatIsForSale"
RuleErrorBurnNFTRequiresNonZeroInput RuleError = "RuleErrorBurnNFTRequiresNonZeroInput"
RuleErrorSwapIdentityIsParamUpdaterOnly RuleError = "RuleErrorSwapIdentityIsParamUpdaterOnly"
RuleErrorFromPublicKeyIsRequired RuleError = "RuleErrorFromPublicKeyIsRequired"
RuleErrorInvalidFromPublicKey RuleError = "RuleErrorInvalidFromPublicKey"
RuleErrorToPublicKeyIsRequired RuleError = "RuleErrorToPublicKeyIsRequired"
RuleErrorInvalidToPublicKey RuleError = "RuleErrorInvalidToPublicKey"
RuleErrorOldFromPublicKeyHasDeletedPKID RuleError = "RuleErrorOldFromPublicKeyHasDeletedPKID"
RuleErrorOldToPublicKeyHasDeletedPKID RuleError = "RuleErrorOldToPublicKeyHasDeletedPKID"
// Derived Key Transaction Spending Limits
RuleErrorDerivedKeyTxnTypeNotAuthorized RuleError = "RuleErrorDerivedKeyTxnTypeNotAuthorized"
RuleErrorDerivedKeyTxnSpendsMoreThanGlobalDESOLimit RuleError = "RuleErrorDerivedKeyTxnSpendsMoreThanGlobalDESOLimit"
RuleErrorDerivedKeyInvalidCreatorCoinLimitOperation RuleError = "RuleErrorInvalidCreatorCoinLimitOperation"
RuleErrorDerivedKeyInvalidDAOCoinLimitOperation RuleError = "RuleErrorInvalidDAOCoinLimitOperation"
RuleErrorDerivedKeyNFTOperationNotAuthorized RuleError = "RuleErrorDerivedKeyNFTOperationNotAuthorized"
RuleErrorDerivedKeyCreatorCoinOperationNotAuthorized RuleError = "RuleErrorDerivedKeyCreatorCoinOperationNotAuthorized"
RuleErrorDerivedKeyDAOCoinOperationNotAuthorized RuleError = "RuleErrorDerivedKeyDAOCoinOperationNotAuthorized"
RuleErrorDerivedKeyInvalidDAOCoinLimitOrderOrderID RuleError = "RuleErrorDerivedKeyInvalidDAOCoinLimitOrderOrderID"
RuleErrorDerivedKeyDAOCoinLimitOrderNotAuthorized RuleError = "RuleErrorDerivedKeyDAOCoinLimitOrderNotAuthorized"
// Association Errors
RuleErrorAssociationBeforeBlockHeight RuleError = "RuleErrorAssociationBeforeBlockHeight"
RuleErrorAssociationInvalidID RuleError = "RuleErrorAssociationInvalidID"
RuleErrorAssociationNotFound RuleError = "RuleErrorAssociationNotFound"
RuleErrorAssociationInvalidTransactor RuleError = "RuleErrorAssociationInvalidTransactor"
RuleErrorAssociationInvalidApp RuleError = "RuleErrorAssociationInvalidApp"
RuleErrorAssociationInvalidType RuleError = "RuleErrorAssociationInvalidType"
RuleErrorAssociationInvalidValue RuleError = "RuleErrorAssociationInvalidValue"
RuleErrorUserAssociationInvalidTargetUser RuleError = "RuleErrorUserAssociationInvalidTargetUser"
RuleErrorPostAssociationInvalidPost RuleError = "RuleErrorPostAssociationInvalidPost"
HeaderErrorDuplicateHeader RuleError = "HeaderErrorDuplicateHeader"
HeaderErrorNilPrevHash RuleError = "HeaderErrorNilPrevHash"
HeaderErrorInvalidParent RuleError = "HeaderErrorInvalidParent"
HeaderErrorBlockTooFarInTheFuture RuleError = "HeaderErrorBlockTooFarInTheFuture"
HeaderErrorTimestampTooEarly RuleError = "HeaderErrorTimestampTooEarly"
HeaderErrorBlockDifficultyAboveTarget RuleError = "HeaderErrorBlockDifficultyAboveTarget"
HeaderErrorHeightInvalid RuleError = "HeaderErrorHeightInvalid"
HeaderErrorDifficultyBitsNotConsistentWithTargetDifficultyComputedFromParent RuleError = "HeaderErrorDifficultyBitsNotConsistentWithTargetDifficultyComputedFromParent"
TxErrorTooLarge RuleError = "TxErrorTooLarge"
TxErrorDuplicate RuleError = "TxErrorDuplicate"
TxErrorIndividualBlockReward RuleError = "TxErrorIndividualBlockReward"
TxErrorInsufficientFeeMinFee RuleError = "TxErrorInsufficientFeeMinFee"
TxErrorInsufficientFeeRateLimit RuleError = "TxErrorInsufficientFeeRateLimit"
TxErrorInsufficientFeePriorityQueue RuleError = "TxErrorInsufficientFeePriorityQueue"
TxErrorUnconnectedTxnNotAllowed RuleError = "TxErrorUnconnectedTxnNotAllowed"
)
func (e RuleError) Error() string {
return string(e)
}
// IsRuleError returns true if the error is any of the errors specified above.
func IsRuleError(err error) bool {
// TODO: I know I am a bad person for doing a string comparison here, but I
// realized late in the game that errors.Wrapf warps the type of what it contains
// and moving this from a type-switch to a string compare is easier than going
// back and expunging all instances of Wrapf that might cause us to lose the
// type of RuleError randomly as the error gets passed up the stack. Nevertheless,
// eventually we should clean this up and get rid of the string comparison both
// for the code's sake but also for the sake of our tests.
return strings.Contains(err.Error(), "RuleError") ||
strings.Contains(err.Error(), "HeaderError") ||
strings.Contains(err.Error(), "TxError")
}
// IsByteArrayValidPublicKey is a general functionality that is used to verify if a
// byte array is a valid secp256k1 public key
func IsByteArrayValidPublicKey(bytes []byte) error {
if len(bytes) != btcec.PubKeyBytesLenCompressed {
return RuleErrorPubKeyLen
}
_, err := btcec.ParsePubKey(bytes, btcec.S256())
if err != nil {
return RuleErrorParsePublicKey
}
return nil
}
// AssertDependencyStructFieldNumbers checks if a struct has a specified number of fields, otherwise it panics. The idea
// is to place this as an anti-bug feature that will detect changes to the code that poses a risk of causing a bug.
func AssertDependencyStructFieldNumbers[T any](obj T, num int) {
if GetNumberOfStructFields(obj) != num {
panic(any(fmt.Sprintf("AssertDependencyStructFieldNumbers: Struct type (%T), number of struct fields (%v), "+
"expected (%v). This probably means that you've modified a dependency of this code but did not update the "+
"code itself.", obj, GetNumberOfStructFields(obj), num,
)))
}
}
func GetNumberOfStructFields[T any](obj T) int {
objElements := reflect.ValueOf(obj).Elem()
return objElements.NumField()
}