@gitmyabi/dec 1.0.0 → 1.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,165 +1,146 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.Decentr_json = exports.Decentr_jsonAbi = void 0;
3
+ exports.DarkEnergyCrystals = exports.DarkEnergyCrystalsAbi = void 0;
4
4
  const viem_1 = require("viem");
5
5
  /**
6
- * Decentr_json ABI
6
+ * DarkEnergyCrystals ABI
7
7
  *
8
8
  * This ABI is typed using viem's type system for full type safety.
9
9
  */
10
- exports.Decentr_jsonAbi = [
10
+ exports.DarkEnergyCrystalsAbi = [
11
11
  {
12
- "inputs": [
12
+ "constant": true,
13
+ "inputs": [],
14
+ "name": "name",
15
+ "outputs": [
13
16
  {
14
- "internalType": "address",
15
- "name": "saleAddress",
16
- "type": "address"
17
+ "name": "",
18
+ "type": "string"
17
19
  }
18
20
  ],
19
- "stateMutability": "nonpayable",
20
- "type": "constructor"
21
+ "payable": false,
22
+ "stateMutability": "view",
23
+ "type": "function"
21
24
  },
22
25
  {
23
- "anonymous": false,
26
+ "constant": false,
24
27
  "inputs": [
25
28
  {
26
- "indexed": true,
27
- "internalType": "address",
28
- "name": "owner",
29
- "type": "address"
30
- },
31
- {
32
- "indexed": true,
33
- "internalType": "address",
34
29
  "name": "spender",
35
30
  "type": "address"
36
31
  },
37
32
  {
38
- "indexed": false,
39
- "internalType": "uint256",
40
- "name": "value",
33
+ "name": "amount",
41
34
  "type": "uint256"
42
35
  }
43
36
  ],
44
- "name": "Approval",
45
- "type": "event"
46
- },
47
- {
48
- "anonymous": false,
49
- "inputs": [
37
+ "name": "approve",
38
+ "outputs": [
50
39
  {
51
- "indexed": false,
52
- "internalType": "address",
53
- "name": "account",
54
- "type": "address"
40
+ "name": "",
41
+ "type": "bool"
55
42
  }
56
43
  ],
57
- "name": "Paused",
58
- "type": "event"
44
+ "payable": false,
45
+ "stateMutability": "nonpayable",
46
+ "type": "function"
59
47
  },
60
48
  {
61
- "anonymous": false,
62
- "inputs": [
49
+ "constant": true,
50
+ "inputs": [],
51
+ "name": "totalSupply",
52
+ "outputs": [
63
53
  {
64
- "indexed": false,
65
- "internalType": "address",
66
- "name": "minter",
67
- "type": "address"
54
+ "name": "",
55
+ "type": "uint256"
68
56
  }
69
57
  ],
70
- "name": "TokenMinterUpdated",
71
- "type": "event"
58
+ "payable": false,
59
+ "stateMutability": "view",
60
+ "type": "function"
72
61
  },
73
62
  {
74
- "anonymous": false,
63
+ "constant": false,
75
64
  "inputs": [
76
65
  {
77
- "indexed": true,
78
- "internalType": "address",
79
- "name": "from",
66
+ "name": "sender",
80
67
  "type": "address"
81
68
  },
82
69
  {
83
- "indexed": true,
84
- "internalType": "address",
85
- "name": "to",
70
+ "name": "recipient",
86
71
  "type": "address"
87
72
  },
88
73
  {
89
- "indexed": false,
90
- "internalType": "uint256",
91
- "name": "value",
74
+ "name": "amount",
92
75
  "type": "uint256"
93
76
  }
94
77
  ],
95
- "name": "Transfer",
96
- "type": "event"
97
- },
98
- {
99
- "anonymous": false,
100
- "inputs": [
78
+ "name": "transferFrom",
79
+ "outputs": [
101
80
  {
102
- "indexed": false,
103
- "internalType": "address",
104
- "name": "account",
105
- "type": "address"
81
+ "name": "",
82
+ "type": "bool"
106
83
  }
107
84
  ],
108
- "name": "Unpaused",
109
- "type": "event"
85
+ "payable": false,
86
+ "stateMutability": "nonpayable",
87
+ "type": "function"
110
88
  },
111
89
  {
112
- "inputs": [
113
- {
114
- "internalType": "address",
115
- "name": "owner",
116
- "type": "address"
117
- },
118
- {
119
- "internalType": "address",
120
- "name": "spender",
121
- "type": "address"
122
- }
123
- ],
124
- "name": "allowance",
90
+ "constant": true,
91
+ "inputs": [],
92
+ "name": "decimals",
125
93
  "outputs": [
126
94
  {
127
- "internalType": "uint256",
128
95
  "name": "",
129
96
  "type": "uint256"
130
97
  }
131
98
  ],
99
+ "payable": false,
132
100
  "stateMutability": "view",
133
101
  "type": "function"
134
102
  },
135
103
  {
104
+ "constant": false,
136
105
  "inputs": [
137
106
  {
138
- "internalType": "address",
139
107
  "name": "spender",
140
108
  "type": "address"
141
109
  },
142
110
  {
143
- "internalType": "uint256",
144
- "name": "amount",
111
+ "name": "addedValue",
145
112
  "type": "uint256"
146
113
  }
147
114
  ],
148
- "name": "approve",
115
+ "name": "increaseAllowance",
149
116
  "outputs": [
150
117
  {
151
- "internalType": "bool",
152
118
  "name": "",
153
119
  "type": "bool"
154
120
  }
155
121
  ],
122
+ "payable": false,
156
123
  "stateMutability": "nonpayable",
157
124
  "type": "function"
158
125
  },
159
126
  {
127
+ "constant": false,
128
+ "inputs": [
129
+ {
130
+ "name": "_quantity",
131
+ "type": "uint256"
132
+ }
133
+ ],
134
+ "name": "burn",
135
+ "outputs": [],
136
+ "payable": false,
137
+ "stateMutability": "nonpayable",
138
+ "type": "function"
139
+ },
140
+ {
141
+ "constant": true,
160
142
  "inputs": [
161
143
  {
162
- "internalType": "address",
163
144
  "name": "account",
164
145
  "type": "address"
165
146
  }
@@ -167,234 +148,310 @@ exports.Decentr_jsonAbi = [
167
148
  "name": "balanceOf",
168
149
  "outputs": [
169
150
  {
170
- "internalType": "uint256",
171
151
  "name": "",
172
152
  "type": "uint256"
173
153
  }
174
154
  ],
155
+ "payable": false,
175
156
  "stateMutability": "view",
176
157
  "type": "function"
177
158
  },
178
159
  {
160
+ "constant": false,
179
161
  "inputs": [],
180
- "name": "decimals",
181
- "outputs": [
182
- {
183
- "internalType": "uint8",
184
- "name": "",
185
- "type": "uint8"
186
- }
187
- ],
188
- "stateMutability": "view",
162
+ "name": "renounceOwnership",
163
+ "outputs": [],
164
+ "payable": false,
165
+ "stateMutability": "nonpayable",
189
166
  "type": "function"
190
167
  },
191
168
  {
169
+ "constant": false,
192
170
  "inputs": [
193
171
  {
194
- "internalType": "address",
195
- "name": "spender",
172
+ "name": "_holder",
196
173
  "type": "address"
197
174
  },
198
175
  {
199
- "internalType": "uint256",
200
- "name": "subtractedValue",
176
+ "name": "_quantity",
201
177
  "type": "uint256"
202
178
  }
203
179
  ],
204
- "name": "decreaseAllowance",
180
+ "name": "unlock",
181
+ "outputs": [],
182
+ "payable": false,
183
+ "stateMutability": "nonpayable",
184
+ "type": "function"
185
+ },
186
+ {
187
+ "constant": true,
188
+ "inputs": [],
189
+ "name": "owner",
190
+ "outputs": [
191
+ {
192
+ "name": "",
193
+ "type": "address"
194
+ }
195
+ ],
196
+ "payable": false,
197
+ "stateMutability": "view",
198
+ "type": "function"
199
+ },
200
+ {
201
+ "constant": true,
202
+ "inputs": [],
203
+ "name": "isOwner",
205
204
  "outputs": [
206
205
  {
207
- "internalType": "bool",
208
206
  "name": "",
209
207
  "type": "bool"
210
208
  }
211
209
  ],
210
+ "payable": false,
211
+ "stateMutability": "view",
212
+ "type": "function"
213
+ },
214
+ {
215
+ "constant": true,
216
+ "inputs": [],
217
+ "name": "symbol",
218
+ "outputs": [
219
+ {
220
+ "name": "",
221
+ "type": "string"
222
+ }
223
+ ],
224
+ "payable": false,
225
+ "stateMutability": "view",
226
+ "type": "function"
227
+ },
228
+ {
229
+ "constant": false,
230
+ "inputs": [
231
+ {
232
+ "name": "_quantity",
233
+ "type": "uint256"
234
+ }
235
+ ],
236
+ "name": "mint",
237
+ "outputs": [],
238
+ "payable": false,
212
239
  "stateMutability": "nonpayable",
213
240
  "type": "function"
214
241
  },
215
242
  {
243
+ "constant": false,
216
244
  "inputs": [
217
245
  {
218
- "internalType": "address",
219
246
  "name": "spender",
220
247
  "type": "address"
221
248
  },
222
249
  {
223
- "internalType": "uint256",
224
- "name": "addedValue",
250
+ "name": "subtractedValue",
225
251
  "type": "uint256"
226
252
  }
227
253
  ],
228
- "name": "increaseAllowance",
254
+ "name": "decreaseAllowance",
229
255
  "outputs": [
230
256
  {
231
- "internalType": "bool",
232
257
  "name": "",
233
258
  "type": "bool"
234
259
  }
235
260
  ],
261
+ "payable": false,
236
262
  "stateMutability": "nonpayable",
237
263
  "type": "function"
238
264
  },
239
265
  {
266
+ "constant": false,
240
267
  "inputs": [
241
268
  {
242
- "internalType": "address",
243
- "name": "receiver",
269
+ "name": "recipient",
244
270
  "type": "address"
245
271
  },
246
272
  {
247
- "internalType": "uint256",
248
273
  "name": "amount",
249
274
  "type": "uint256"
250
275
  }
251
276
  ],
252
- "name": "mintToken",
277
+ "name": "transfer",
253
278
  "outputs": [
254
279
  {
255
- "internalType": "bool",
256
- "name": "success",
280
+ "name": "",
257
281
  "type": "bool"
258
282
  }
259
283
  ],
284
+ "payable": false,
260
285
  "stateMutability": "nonpayable",
261
286
  "type": "function"
262
287
  },
263
288
  {
264
- "inputs": [],
265
- "name": "name",
289
+ "constant": true,
290
+ "inputs": [
291
+ {
292
+ "name": "owner",
293
+ "type": "address"
294
+ },
295
+ {
296
+ "name": "spender",
297
+ "type": "address"
298
+ }
299
+ ],
300
+ "name": "allowance",
266
301
  "outputs": [
267
302
  {
268
- "internalType": "string",
269
303
  "name": "",
270
- "type": "string"
304
+ "type": "uint256"
271
305
  }
272
306
  ],
307
+ "payable": false,
273
308
  "stateMutability": "view",
274
309
  "type": "function"
275
310
  },
276
311
  {
277
- "inputs": [],
278
- "name": "pause",
279
- "outputs": [],
280
- "stateMutability": "nonpayable",
281
- "type": "function"
282
- },
283
- {
284
- "inputs": [],
285
- "name": "paused",
286
- "outputs": [
312
+ "constant": false,
313
+ "inputs": [
287
314
  {
288
- "internalType": "bool",
289
- "name": "",
290
- "type": "bool"
315
+ "name": "_steemAddr",
316
+ "type": "string"
317
+ },
318
+ {
319
+ "name": "_quantity",
320
+ "type": "uint256"
291
321
  }
292
322
  ],
293
- "stateMutability": "view",
323
+ "name": "lock",
324
+ "outputs": [],
325
+ "payable": false,
326
+ "stateMutability": "nonpayable",
294
327
  "type": "function"
295
328
  },
296
329
  {
330
+ "constant": false,
297
331
  "inputs": [
298
332
  {
299
- "internalType": "address",
300
- "name": "_minter",
333
+ "name": "newOwner",
301
334
  "type": "address"
302
335
  }
303
336
  ],
304
- "name": "setMiter",
337
+ "name": "transferOwnership",
305
338
  "outputs": [],
339
+ "payable": false,
306
340
  "stateMutability": "nonpayable",
307
341
  "type": "function"
308
342
  },
309
343
  {
310
- "inputs": [],
311
- "name": "symbol",
312
- "outputs": [
344
+ "constant": false,
345
+ "inputs": [
313
346
  {
314
- "internalType": "string",
315
- "name": "",
316
- "type": "string"
347
+ "name": "_newMinter",
348
+ "type": "address"
317
349
  }
318
350
  ],
319
- "stateMutability": "view",
351
+ "name": "setMinter",
352
+ "outputs": [],
353
+ "payable": false,
354
+ "stateMutability": "nonpayable",
320
355
  "type": "function"
321
356
  },
322
357
  {
323
- "inputs": [],
324
- "name": "totalSupply",
325
- "outputs": [
358
+ "anonymous": false,
359
+ "inputs": [
326
360
  {
327
- "internalType": "uint256",
328
- "name": "",
329
- "type": "uint256"
361
+ "indexed": true,
362
+ "name": "minter",
363
+ "type": "address"
330
364
  }
331
365
  ],
332
- "stateMutability": "view",
333
- "type": "function"
366
+ "name": "SetMinter",
367
+ "type": "event"
334
368
  },
335
369
  {
370
+ "anonymous": false,
336
371
  "inputs": [
337
372
  {
338
- "internalType": "address",
339
- "name": "recipient",
373
+ "indexed": true,
374
+ "name": "holder",
340
375
  "type": "address"
341
376
  },
342
377
  {
343
- "internalType": "uint256",
378
+ "indexed": true,
344
379
  "name": "amount",
345
380
  "type": "uint256"
381
+ },
382
+ {
383
+ "indexed": false,
384
+ "name": "steemAddr",
385
+ "type": "string"
346
386
  }
347
387
  ],
348
- "name": "transfer",
349
- "outputs": [
388
+ "name": "LockCrystals",
389
+ "type": "event"
390
+ },
391
+ {
392
+ "anonymous": false,
393
+ "inputs": [
350
394
  {
351
- "internalType": "bool",
352
- "name": "",
353
- "type": "bool"
395
+ "indexed": true,
396
+ "name": "previousOwner",
397
+ "type": "address"
398
+ },
399
+ {
400
+ "indexed": true,
401
+ "name": "newOwner",
402
+ "type": "address"
354
403
  }
355
404
  ],
356
- "stateMutability": "nonpayable",
357
- "type": "function"
405
+ "name": "OwnershipTransferred",
406
+ "type": "event"
358
407
  },
359
408
  {
409
+ "anonymous": false,
360
410
  "inputs": [
361
411
  {
362
- "internalType": "address",
363
- "name": "sender",
412
+ "indexed": true,
413
+ "name": "from",
364
414
  "type": "address"
365
415
  },
366
416
  {
367
- "internalType": "address",
368
- "name": "recipient",
417
+ "indexed": true,
418
+ "name": "to",
369
419
  "type": "address"
370
420
  },
371
421
  {
372
- "internalType": "uint256",
373
- "name": "amount",
422
+ "indexed": false,
423
+ "name": "value",
374
424
  "type": "uint256"
375
425
  }
376
426
  ],
377
- "name": "transferFrom",
378
- "outputs": [
427
+ "name": "Transfer",
428
+ "type": "event"
429
+ },
430
+ {
431
+ "anonymous": false,
432
+ "inputs": [
379
433
  {
380
- "internalType": "bool",
381
- "name": "",
382
- "type": "bool"
434
+ "indexed": true,
435
+ "name": "owner",
436
+ "type": "address"
437
+ },
438
+ {
439
+ "indexed": true,
440
+ "name": "spender",
441
+ "type": "address"
442
+ },
443
+ {
444
+ "indexed": false,
445
+ "name": "value",
446
+ "type": "uint256"
383
447
  }
384
448
  ],
385
- "stateMutability": "nonpayable",
386
- "type": "function"
387
- },
388
- {
389
- "inputs": [],
390
- "name": "unpause",
391
- "outputs": [],
392
- "stateMutability": "nonpayable",
393
- "type": "function"
449
+ "name": "Approval",
450
+ "type": "event"
394
451
  }
395
452
  ];
396
453
  /**
397
- * Decentr_json Contract Class
454
+ * DarkEnergyCrystals Contract Class
398
455
  *
399
456
  * Provides a class-based API similar to TypeChain for interacting with the contract.
400
457
  *
@@ -402,12 +459,12 @@ exports.Decentr_jsonAbi = [
402
459
  * ```typescript
403
460
  * import { createPublicClient, createWalletClient, http } from 'viem';
404
461
  * import { mainnet } from 'viem/chains';
405
- * import { Decentr_json } from 'Decentr_json';
462
+ * import { DarkEnergyCrystals } from 'DarkEnergyCrystals';
406
463
  *
407
464
  * const publicClient = createPublicClient({ chain: mainnet, transport: http() });
408
465
  * const walletClient = createWalletClient({ chain: mainnet, transport: http() });
409
466
  *
410
- * const contract = new Decentr_json('0x...', { publicClient, walletClient });
467
+ * const contract = new DarkEnergyCrystals('0x...', { publicClient, walletClient });
411
468
  *
412
469
  * // Read functions
413
470
  * const result = await contract.balanceOf('0x...');
@@ -425,13 +482,13 @@ exports.Decentr_jsonAbi = [
425
482
  * });
426
483
  * ```
427
484
  */
428
- class Decentr_json {
485
+ class DarkEnergyCrystals {
429
486
  constructor(address, clients) {
430
487
  this.contractAddress = address;
431
488
  this.publicClient = clients.publicClient;
432
489
  this.contract = (0, viem_1.getContract)({
433
490
  address,
434
- abi: exports.Decentr_jsonAbi,
491
+ abi: exports.DarkEnergyCrystalsAbi,
435
492
  client: {
436
493
  public: clients.publicClient,
437
494
  wallet: clients.walletClient,
@@ -445,24 +502,24 @@ class Decentr_json {
445
502
  return this.contractAddress;
446
503
  }
447
504
  /**
448
- * Get the underlying viem contract instance
505
+ * Get the underlying viem contract instance.
449
506
  */
450
507
  getContract() {
451
508
  return this.contract;
452
509
  }
453
510
  /**
454
- * allowance
511
+ * name
455
512
  * view
456
513
  */
457
- async allowance(owner, spender) {
458
- return this.contract.read.allowance([owner, spender]);
514
+ async name() {
515
+ return this.contract.read.name();
459
516
  }
460
517
  /**
461
- * balanceOf
518
+ * totalSupply
462
519
  * view
463
520
  */
464
- async balanceOf(account) {
465
- return this.contract.read.balanceOf([account]);
521
+ async totalSupply() {
522
+ return this.contract.read.totalSupply();
466
523
  }
467
524
  /**
468
525
  * decimals
@@ -472,18 +529,25 @@ class Decentr_json {
472
529
  return this.contract.read.decimals();
473
530
  }
474
531
  /**
475
- * name
532
+ * balanceOf
476
533
  * view
477
534
  */
478
- async name() {
479
- return this.contract.read.name();
535
+ async balanceOf(account) {
536
+ return this.contract.read.balanceOf([account]);
537
+ }
538
+ /**
539
+ * owner
540
+ * view
541
+ */
542
+ async owner() {
543
+ return this.contract.read.owner();
480
544
  }
481
545
  /**
482
- * paused
546
+ * isOwner
483
547
  * view
484
548
  */
485
- async paused() {
486
- return this.contract.read.paused();
549
+ async isOwner() {
550
+ return this.contract.read.isOwner();
487
551
  }
488
552
  /**
489
553
  * symbol
@@ -493,11 +557,11 @@ class Decentr_json {
493
557
  return this.contract.read.symbol();
494
558
  }
495
559
  /**
496
- * totalSupply
560
+ * allowance
497
561
  * view
498
562
  */
499
- async totalSupply() {
500
- return this.contract.read.totalSupply();
563
+ async allowance(owner, spender) {
564
+ return this.contract.read.allowance([owner, spender]);
501
565
  }
502
566
  /**
503
567
  * approve
@@ -511,15 +575,15 @@ class Decentr_json {
511
575
  return this.contract.write.approve([spender, amount], options);
512
576
  }
513
577
  /**
514
- * decreaseAllowance
578
+ * transferFrom
515
579
  * nonpayable
516
580
  * @param options Optional transaction parameters (value, gas, nonce, etc.)
517
581
  */
518
- async decreaseAllowance(spender, subtractedValue, options) {
582
+ async transferFrom(sender, recipient, amount, options) {
519
583
  if (!this.contract.write) {
520
584
  throw new Error('Wallet client is required for write operations');
521
585
  }
522
- return this.contract.write.decreaseAllowance([spender, subtractedValue], options);
586
+ return this.contract.write.transferFrom([sender, recipient, amount], options);
523
587
  }
524
588
  /**
525
589
  * increaseAllowance
@@ -533,37 +597,59 @@ class Decentr_json {
533
597
  return this.contract.write.increaseAllowance([spender, addedValue], options);
534
598
  }
535
599
  /**
536
- * mintToken
600
+ * burn
601
+ * nonpayable
602
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
603
+ */
604
+ async burn(_quantity, options) {
605
+ if (!this.contract.write) {
606
+ throw new Error('Wallet client is required for write operations');
607
+ }
608
+ return this.contract.write.burn([_quantity], options);
609
+ }
610
+ /**
611
+ * renounceOwnership
612
+ * nonpayable
613
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
614
+ */
615
+ async renounceOwnership(options) {
616
+ if (!this.contract.write) {
617
+ throw new Error('Wallet client is required for write operations');
618
+ }
619
+ return this.contract.write.renounceOwnership(options);
620
+ }
621
+ /**
622
+ * unlock
537
623
  * nonpayable
538
624
  * @param options Optional transaction parameters (value, gas, nonce, etc.)
539
625
  */
540
- async mintToken(receiver, amount, options) {
626
+ async unlock(_holder, _quantity, options) {
541
627
  if (!this.contract.write) {
542
628
  throw new Error('Wallet client is required for write operations');
543
629
  }
544
- return this.contract.write.mintToken([receiver, amount], options);
630
+ return this.contract.write.unlock([_holder, _quantity], options);
545
631
  }
546
632
  /**
547
- * pause
633
+ * mint
548
634
  * nonpayable
549
635
  * @param options Optional transaction parameters (value, gas, nonce, etc.)
550
636
  */
551
- async pause(options) {
637
+ async mint(_quantity, options) {
552
638
  if (!this.contract.write) {
553
639
  throw new Error('Wallet client is required for write operations');
554
640
  }
555
- return this.contract.write.pause(options);
641
+ return this.contract.write.mint([_quantity], options);
556
642
  }
557
643
  /**
558
- * setMiter
644
+ * decreaseAllowance
559
645
  * nonpayable
560
646
  * @param options Optional transaction parameters (value, gas, nonce, etc.)
561
647
  */
562
- async setMiter(_minter, options) {
648
+ async decreaseAllowance(spender, subtractedValue, options) {
563
649
  if (!this.contract.write) {
564
650
  throw new Error('Wallet client is required for write operations');
565
651
  }
566
- return this.contract.write.setMiter([_minter], options);
652
+ return this.contract.write.decreaseAllowance([spender, subtractedValue], options);
567
653
  }
568
654
  /**
569
655
  * transfer
@@ -577,26 +663,37 @@ class Decentr_json {
577
663
  return this.contract.write.transfer([recipient, amount], options);
578
664
  }
579
665
  /**
580
- * transferFrom
666
+ * lock
581
667
  * nonpayable
582
668
  * @param options Optional transaction parameters (value, gas, nonce, etc.)
583
669
  */
584
- async transferFrom(sender, recipient, amount, options) {
670
+ async lock(_steemAddr, _quantity, options) {
585
671
  if (!this.contract.write) {
586
672
  throw new Error('Wallet client is required for write operations');
587
673
  }
588
- return this.contract.write.transferFrom([sender, recipient, amount], options);
674
+ return this.contract.write.lock([_steemAddr, _quantity], options);
675
+ }
676
+ /**
677
+ * transferOwnership
678
+ * nonpayable
679
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
680
+ */
681
+ async transferOwnership(newOwner, options) {
682
+ if (!this.contract.write) {
683
+ throw new Error('Wallet client is required for write operations');
684
+ }
685
+ return this.contract.write.transferOwnership([newOwner], options);
589
686
  }
590
687
  /**
591
- * unpause
688
+ * setMinter
592
689
  * nonpayable
593
690
  * @param options Optional transaction parameters (value, gas, nonce, etc.)
594
691
  */
595
- async unpause(options) {
692
+ async setMinter(_newMinter, options) {
596
693
  if (!this.contract.write) {
597
694
  throw new Error('Wallet client is required for write operations');
598
695
  }
599
- return this.contract.write.unpause(options);
696
+ return this.contract.write.setMinter([_newMinter], options);
600
697
  }
601
698
  /**
602
699
  * Simulate contract write operations (dry-run without sending transaction)
@@ -621,12 +718,12 @@ class Decentr_json {
621
718
  return contract.simulate.approve([spender, amount], options);
622
719
  },
623
720
  /**
624
- * Simulate decreaseAllowance
721
+ * Simulate transferFrom
625
722
  * Returns gas estimate and result without sending transaction
626
723
  * @param options Optional transaction parameters (value, gas, nonce, etc.)
627
724
  */
628
- async decreaseAllowance(spender, subtractedValue, options) {
629
- return contract.simulate.decreaseAllowance([spender, subtractedValue], options);
725
+ async transferFrom(sender, recipient, amount, options) {
726
+ return contract.simulate.transferFrom([sender, recipient, amount], options);
630
727
  },
631
728
  /**
632
729
  * Simulate increaseAllowance
@@ -637,28 +734,44 @@ class Decentr_json {
637
734
  return contract.simulate.increaseAllowance([spender, addedValue], options);
638
735
  },
639
736
  /**
640
- * Simulate mintToken
737
+ * Simulate burn
738
+ * Returns gas estimate and result without sending transaction
739
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
740
+ */
741
+ async burn(_quantity, options) {
742
+ return contract.simulate.burn([_quantity], options);
743
+ },
744
+ /**
745
+ * Simulate renounceOwnership
746
+ * Returns gas estimate and result without sending transaction
747
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
748
+ */
749
+ async renounceOwnership(options) {
750
+ return contract.simulate.renounceOwnership(options);
751
+ },
752
+ /**
753
+ * Simulate unlock
641
754
  * Returns gas estimate and result without sending transaction
642
755
  * @param options Optional transaction parameters (value, gas, nonce, etc.)
643
756
  */
644
- async mintToken(receiver, amount, options) {
645
- return contract.simulate.mintToken([receiver, amount], options);
757
+ async unlock(_holder, _quantity, options) {
758
+ return contract.simulate.unlock([_holder, _quantity], options);
646
759
  },
647
760
  /**
648
- * Simulate pause
761
+ * Simulate mint
649
762
  * Returns gas estimate and result without sending transaction
650
763
  * @param options Optional transaction parameters (value, gas, nonce, etc.)
651
764
  */
652
- async pause(options) {
653
- return contract.simulate.pause(options);
765
+ async mint(_quantity, options) {
766
+ return contract.simulate.mint([_quantity], options);
654
767
  },
655
768
  /**
656
- * Simulate setMiter
769
+ * Simulate decreaseAllowance
657
770
  * Returns gas estimate and result without sending transaction
658
771
  * @param options Optional transaction parameters (value, gas, nonce, etc.)
659
772
  */
660
- async setMiter(_minter, options) {
661
- return contract.simulate.setMiter([_minter], options);
773
+ async decreaseAllowance(spender, subtractedValue, options) {
774
+ return contract.simulate.decreaseAllowance([spender, subtractedValue], options);
662
775
  },
663
776
  /**
664
777
  * Simulate transfer
@@ -669,20 +782,28 @@ class Decentr_json {
669
782
  return contract.simulate.transfer([recipient, amount], options);
670
783
  },
671
784
  /**
672
- * Simulate transferFrom
785
+ * Simulate lock
673
786
  * Returns gas estimate and result without sending transaction
674
787
  * @param options Optional transaction parameters (value, gas, nonce, etc.)
675
788
  */
676
- async transferFrom(sender, recipient, amount, options) {
677
- return contract.simulate.transferFrom([sender, recipient, amount], options);
789
+ async lock(_steemAddr, _quantity, options) {
790
+ return contract.simulate.lock([_steemAddr, _quantity], options);
791
+ },
792
+ /**
793
+ * Simulate transferOwnership
794
+ * Returns gas estimate and result without sending transaction
795
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
796
+ */
797
+ async transferOwnership(newOwner, options) {
798
+ return contract.simulate.transferOwnership([newOwner], options);
678
799
  },
679
800
  /**
680
- * Simulate unpause
801
+ * Simulate setMinter
681
802
  * Returns gas estimate and result without sending transaction
682
803
  * @param options Optional transaction parameters (value, gas, nonce, etc.)
683
804
  */
684
- async unpause(options) {
685
- return contract.simulate.unpause(options);
805
+ async setMinter(_newMinter, options) {
806
+ return contract.simulate.setMinter([_newMinter], options);
686
807
  }
687
808
  };
688
809
  }
@@ -701,16 +822,16 @@ class Decentr_json {
701
822
  get watch() {
702
823
  return {
703
824
  /**
704
- * Watch Approval events
825
+ * Watch SetMinter events
705
826
  * @param callback Function to call when event is emitted
706
827
  * @param filter Optional filter for indexed parameters
707
828
  * @returns Unwatch function to stop listening
708
829
  */
709
- Approval: (callback, filter) => {
830
+ SetMinter: (callback, filter) => {
710
831
  return this.publicClient.watchContractEvent({
711
832
  address: this.contractAddress,
712
- abi: exports.Decentr_jsonAbi,
713
- eventName: 'Approval',
833
+ abi: exports.DarkEnergyCrystalsAbi,
834
+ eventName: 'SetMinter',
714
835
  args: filter,
715
836
  onLogs: (logs) => {
716
837
  logs.forEach((log) => {
@@ -720,16 +841,17 @@ class Decentr_json {
720
841
  });
721
842
  },
722
843
  /**
723
- * Watch Paused events
844
+ * Watch LockCrystals events
724
845
  * @param callback Function to call when event is emitted
725
846
  * @param filter Optional filter for indexed parameters
726
847
  * @returns Unwatch function to stop listening
727
848
  */
728
- Paused: (callback) => {
849
+ LockCrystals: (callback, filter) => {
729
850
  return this.publicClient.watchContractEvent({
730
851
  address: this.contractAddress,
731
- abi: exports.Decentr_jsonAbi,
732
- eventName: 'Paused',
852
+ abi: exports.DarkEnergyCrystalsAbi,
853
+ eventName: 'LockCrystals',
854
+ args: filter,
733
855
  onLogs: (logs) => {
734
856
  logs.forEach((log) => {
735
857
  callback(log.args);
@@ -738,16 +860,17 @@ class Decentr_json {
738
860
  });
739
861
  },
740
862
  /**
741
- * Watch TokenMinterUpdated events
863
+ * Watch OwnershipTransferred events
742
864
  * @param callback Function to call when event is emitted
743
865
  * @param filter Optional filter for indexed parameters
744
866
  * @returns Unwatch function to stop listening
745
867
  */
746
- TokenMinterUpdated: (callback) => {
868
+ OwnershipTransferred: (callback, filter) => {
747
869
  return this.publicClient.watchContractEvent({
748
870
  address: this.contractAddress,
749
- abi: exports.Decentr_jsonAbi,
750
- eventName: 'TokenMinterUpdated',
871
+ abi: exports.DarkEnergyCrystalsAbi,
872
+ eventName: 'OwnershipTransferred',
873
+ args: filter,
751
874
  onLogs: (logs) => {
752
875
  logs.forEach((log) => {
753
876
  callback(log.args);
@@ -764,7 +887,7 @@ class Decentr_json {
764
887
  Transfer: (callback, filter) => {
765
888
  return this.publicClient.watchContractEvent({
766
889
  address: this.contractAddress,
767
- abi: exports.Decentr_jsonAbi,
890
+ abi: exports.DarkEnergyCrystalsAbi,
768
891
  eventName: 'Transfer',
769
892
  args: filter,
770
893
  onLogs: (logs) => {
@@ -775,16 +898,17 @@ class Decentr_json {
775
898
  });
776
899
  },
777
900
  /**
778
- * Watch Unpaused events
901
+ * Watch Approval events
779
902
  * @param callback Function to call when event is emitted
780
903
  * @param filter Optional filter for indexed parameters
781
904
  * @returns Unwatch function to stop listening
782
905
  */
783
- Unpaused: (callback) => {
906
+ Approval: (callback, filter) => {
784
907
  return this.publicClient.watchContractEvent({
785
908
  address: this.contractAddress,
786
- abi: exports.Decentr_jsonAbi,
787
- eventName: 'Unpaused',
909
+ abi: exports.DarkEnergyCrystalsAbi,
910
+ eventName: 'Approval',
911
+ args: filter,
788
912
  onLogs: (logs) => {
789
913
  logs.forEach((log) => {
790
914
  callback(log.args);
@@ -795,4 +919,4 @@ class Decentr_json {
795
919
  };
796
920
  }
797
921
  }
798
- exports.Decentr_json = Decentr_json;
922
+ exports.DarkEnergyCrystals = DarkEnergyCrystals;