1 | 'use strict';
|
2 |
|
3 | var docsURL = 'http://bitcore.io/';
|
4 |
|
5 | module.exports = [{
|
6 | name: 'InvalidB58Char',
|
7 | message: 'Invalid Base58 character: {0} in {1}'
|
8 | }, {
|
9 | name: 'InvalidB58Checksum',
|
10 | message: 'Invalid Base58 checksum for {0}'
|
11 | }, {
|
12 | name: 'InvalidNetwork',
|
13 | message: 'Invalid version for network: got {0}'
|
14 | }, {
|
15 | name: 'InvalidState',
|
16 | message: 'Invalid state: {0}'
|
17 | }, {
|
18 | name: 'NotImplemented',
|
19 | message: 'Function {0} was not implemented yet'
|
20 | }, {
|
21 | name: 'InvalidNetworkArgument',
|
22 | message: 'Invalid network: must be "livenet" or "testnet", got {0}'
|
23 | }, {
|
24 | name: 'InvalidArgument',
|
25 | message: function() {
|
26 | return 'Invalid Argument' + (arguments[0] ? (': ' + arguments[0]) : '') +
|
27 | (arguments[1] ? (' Documentation: ' + docsURL + arguments[1]) : '');
|
28 | }
|
29 | }, {
|
30 | name: 'AbstractMethodInvoked',
|
31 | message: 'Abstract Method Invocation: {0}'
|
32 | }, {
|
33 | name: 'InvalidArgumentType',
|
34 | message: function() {
|
35 | return 'Invalid Argument for ' + arguments[2] + ', expected ' + arguments[1] + ' but got ' + typeof arguments[0];
|
36 | }
|
37 | }, {
|
38 | name: 'Unit',
|
39 | message: 'Internal Error on Unit {0}',
|
40 | errors: [{
|
41 | 'name': 'UnknownCode',
|
42 | 'message': 'Unrecognized unit code: {0}'
|
43 | }, {
|
44 | 'name': 'InvalidRate',
|
45 | 'message': 'Invalid exchange rate: {0}'
|
46 | }]
|
47 | }, {
|
48 | name: 'MerkleBlock',
|
49 | message: 'Internal Error on MerkleBlock {0}',
|
50 | errors: [{
|
51 | 'name': 'InvalidMerkleTree',
|
52 | 'message': 'This MerkleBlock contain an invalid Merkle Tree'
|
53 | }]
|
54 | }, {
|
55 | name: 'Transaction',
|
56 | message: 'Internal Error on Transaction {0}',
|
57 | errors: [{
|
58 | name: 'Input',
|
59 | message: 'Internal Error on Input {0}',
|
60 | errors: [{
|
61 | name: 'MissingScript',
|
62 | message: 'Need a script to create an input'
|
63 | }, {
|
64 | name: 'UnsupportedScript',
|
65 | message: 'Unsupported input script type: {0}'
|
66 | }, {
|
67 | name: 'MissingPreviousOutput',
|
68 | message: 'No previous output information.'
|
69 | }, {
|
70 | name: 'BlockHeightOutOfRange',
|
71 | message: 'Block Height can only be between 0 and 65535'
|
72 | } , {
|
73 | name: 'LockTimeRange',
|
74 | message: 'Seconds needs to be more that 0 and less that 33553920'
|
75 | }
|
76 | ]
|
77 | }, {
|
78 | name: 'NeedMoreInfo',
|
79 | message: '{0}'
|
80 | }, {
|
81 | name: 'InvalidSorting',
|
82 | message: 'The sorting function provided did not return the change output as one of the array elements'
|
83 | }, {
|
84 | name: 'InvalidOutputAmountSum',
|
85 | message: '{0}'
|
86 | }, {
|
87 | name: 'MissingSignatures',
|
88 | message: 'Some inputs have not been fully signed'
|
89 | }, {
|
90 | name: 'InvalidIndex',
|
91 | message: 'Invalid index: {0} is not between 0, {1}'
|
92 | }, {
|
93 | name: 'UnableToVerifySignature',
|
94 | message: 'Unable to verify signature: {0}'
|
95 | }, {
|
96 | name: 'DustOutputs',
|
97 | message: 'Dust amount detected in one output'
|
98 | }, {
|
99 | name: 'InvalidSatoshis',
|
100 | message: 'Output satoshis are invalid',
|
101 | }, {
|
102 | name: 'FeeError',
|
103 | message: 'Internal Error on Fee {0}',
|
104 | errors: [{
|
105 | name: 'TooSmall',
|
106 | message: 'Fee is too small: {0}',
|
107 | }, {
|
108 | name: 'TooLarge',
|
109 | message: 'Fee is too large: {0}',
|
110 | }, {
|
111 | name: 'Different',
|
112 | message: 'Unspent value is different from specified fee: {0}',
|
113 | }]
|
114 | }, {
|
115 | name: 'ChangeAddressMissing',
|
116 | message: 'Change address is missing'
|
117 | }, {
|
118 | name: 'BlockHeightTooHigh',
|
119 | message: 'Block Height can be at most 2^32 -1'
|
120 | }, {
|
121 | name: 'NLockTimeOutOfRange',
|
122 | message: 'Block Height can only be between 0 and 499 999 999'
|
123 | }, {
|
124 | name: 'LockTimeTooEarly',
|
125 | message: 'Lock Time can\'t be earlier than UNIX date 500 000 000'
|
126 | }]
|
127 | }, {
|
128 | name: 'Script',
|
129 | message: 'Internal Error on Script {0}',
|
130 | errors: [{
|
131 | name: 'UnrecognizedAddress',
|
132 | message: 'Expected argument {0} to be an address'
|
133 | }, {
|
134 | name: 'CantDeriveAddress',
|
135 | message: 'Can\'t derive address associated with script {0}, needs to be p2pkh in, p2pkh out, p2sh in, or p2sh out.'
|
136 | }, {
|
137 | name: 'InvalidBuffer',
|
138 | message: 'Invalid script buffer: can\'t parse valid script from given buffer {0}'
|
139 | }]
|
140 | }, {
|
141 | name: 'HDPrivateKey',
|
142 | message: 'Internal Error on HDPrivateKey {0}',
|
143 | errors: [{
|
144 | name: 'InvalidDerivationArgument',
|
145 | message: 'Invalid derivation argument {0}, expected string, or number and boolean'
|
146 | }, {
|
147 | name: 'InvalidEntropyArgument',
|
148 | message: 'Invalid entropy: must be an hexa string or binary buffer, got {0}',
|
149 | errors: [{
|
150 | name: 'TooMuchEntropy',
|
151 | message: 'Invalid entropy: more than 512 bits is non standard, got "{0}"'
|
152 | }, {
|
153 | name: 'NotEnoughEntropy',
|
154 | message: 'Invalid entropy: at least 128 bits needed, got "{0}"'
|
155 | }]
|
156 | }, {
|
157 | name: 'InvalidLength',
|
158 | message: 'Invalid length for xprivkey string in {0}'
|
159 | }, {
|
160 | name: 'InvalidPath',
|
161 | message: 'Invalid derivation path: {0}'
|
162 | }, {
|
163 | name: 'UnrecognizedArgument',
|
164 | message: 'Invalid argument: creating a HDPrivateKey requires a string, buffer, json or object, got "{0}"'
|
165 | }]
|
166 | }, {
|
167 | name: 'HDPublicKey',
|
168 | message: 'Internal Error on HDPublicKey {0}',
|
169 | errors: [{
|
170 | name: 'ArgumentIsPrivateExtended',
|
171 | message: 'Argument is an extended private key: {0}'
|
172 | }, {
|
173 | name: 'InvalidDerivationArgument',
|
174 | message: 'Invalid derivation argument: got {0}'
|
175 | }, {
|
176 | name: 'InvalidLength',
|
177 | message: 'Invalid length for xpubkey: got "{0}"'
|
178 | }, {
|
179 | name: 'InvalidPath',
|
180 | message: 'Invalid derivation path, it should look like: "m/1/100", got "{0}"'
|
181 | }, {
|
182 | name: 'InvalidIndexCantDeriveHardened',
|
183 | message: 'Invalid argument: creating a hardened path requires an HDPrivateKey'
|
184 | }, {
|
185 | name: 'MustSupplyArgument',
|
186 | message: 'Must supply an argument to create a HDPublicKey'
|
187 | }, {
|
188 | name: 'UnrecognizedArgument',
|
189 | message: 'Invalid argument for creation, must be string, json, buffer, or object'
|
190 | }]
|
191 | }];
|