@buildonspark/issuer-sdk 0.0.71 → 0.0.73
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.
- package/CHANGELOG.md +14 -0
- package/dist/index.cjs +48 -19
- package/dist/index.d.cts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +39 -9
- package/package.json +3 -3
- package/src/issuer-wallet/issuer-spark-wallet.ts +24 -11
- package/src/services/token-transactions.ts +29 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,19 @@
|
|
|
1
1
|
# @buildonspark/issuer-sdk
|
|
2
2
|
|
|
3
|
+
## 0.0.73
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Updated dependencies
|
|
8
|
+
- @buildonspark/spark-sdk@0.1.42
|
|
9
|
+
|
|
10
|
+
## 0.0.72
|
|
11
|
+
|
|
12
|
+
### Patch Changes
|
|
13
|
+
|
|
14
|
+
- Updated dependencies
|
|
15
|
+
- @buildonspark/spark-sdk@0.1.41
|
|
16
|
+
|
|
3
17
|
## 0.0.71
|
|
4
18
|
|
|
5
19
|
### Patch Changes
|
package/dist/index.cjs
CHANGED
|
@@ -43,7 +43,6 @@ var import_lrc20_sdk = require("@buildonspark/lrc20-sdk");
|
|
|
43
43
|
var import_spark_sdk3 = require("@buildonspark/spark-sdk");
|
|
44
44
|
var import_core = require("@lightsparkdev/core");
|
|
45
45
|
var import_address = require("@buildonspark/spark-sdk/address");
|
|
46
|
-
var import_lrc202 = require("@buildonspark/spark-sdk/proto/lrc20");
|
|
47
46
|
var import_utils6 = require("@noble/curves/abstract/utils");
|
|
48
47
|
|
|
49
48
|
// src/services/freeze.ts
|
|
@@ -163,7 +162,7 @@ var IssuerTokenTransactionService = class extends import_token_transactions.Toke
|
|
|
163
162
|
constructor(config, connectionManager) {
|
|
164
163
|
super(config, connectionManager);
|
|
165
164
|
}
|
|
166
|
-
async
|
|
165
|
+
async constructMintTokenTransactionV0(tokenPublicKey, tokenAmount) {
|
|
167
166
|
return {
|
|
168
167
|
network: this.config.getNetworkProto(),
|
|
169
168
|
tokenInputs: {
|
|
@@ -183,6 +182,28 @@ var IssuerTokenTransactionService = class extends import_token_transactions.Toke
|
|
|
183
182
|
sparkOperatorIdentityPublicKeys: super.collectOperatorIdentityPublicKeys()
|
|
184
183
|
};
|
|
185
184
|
}
|
|
185
|
+
async constructMintTokenTransaction(tokenPublicKey, tokenAmount) {
|
|
186
|
+
return {
|
|
187
|
+
version: 1,
|
|
188
|
+
network: this.config.getNetworkProto(),
|
|
189
|
+
tokenInputs: {
|
|
190
|
+
$case: "mintInput",
|
|
191
|
+
mintInput: {
|
|
192
|
+
issuerPublicKey: tokenPublicKey,
|
|
193
|
+
issuerProvidedTimestamp: Date.now()
|
|
194
|
+
}
|
|
195
|
+
},
|
|
196
|
+
tokenOutputs: [
|
|
197
|
+
{
|
|
198
|
+
ownerPublicKey: tokenPublicKey,
|
|
199
|
+
tokenPublicKey,
|
|
200
|
+
tokenAmount: (0, import_utils4.numberToBytesBE)(tokenAmount, 16)
|
|
201
|
+
}
|
|
202
|
+
],
|
|
203
|
+
sparkOperatorIdentityPublicKeys: super.collectOperatorIdentityPublicKeys(),
|
|
204
|
+
expiryTime: void 0
|
|
205
|
+
};
|
|
206
|
+
}
|
|
186
207
|
};
|
|
187
208
|
|
|
188
209
|
// src/utils/type-mappers.ts
|
|
@@ -285,7 +306,7 @@ function getEnumName(enumObj, value) {
|
|
|
285
306
|
|
|
286
307
|
// src/issuer-wallet/issuer-spark-wallet.ts
|
|
287
308
|
var import_spark_sdk4 = require("@buildonspark/spark-sdk");
|
|
288
|
-
var
|
|
309
|
+
var import_lrc202 = require("@buildonspark/spark-sdk/proto/lrc20");
|
|
289
310
|
var BURN_ADDRESS = "02".repeat(33);
|
|
290
311
|
var IssuerSparkWallet = class _IssuerSparkWallet extends import_spark_sdk3.SparkWallet {
|
|
291
312
|
issuerTokenTransactionService;
|
|
@@ -412,11 +433,19 @@ var IssuerSparkWallet = class _IssuerSparkWallet extends import_spark_sdk3.Spark
|
|
|
412
433
|
* @returns The transaction ID of the mint operation
|
|
413
434
|
*/
|
|
414
435
|
async mintTokens(tokenAmount) {
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
436
|
+
const tokenPublicKey = await super.getIdentityPublicKey();
|
|
437
|
+
let tokenTransaction;
|
|
438
|
+
if (this.config.getTokenTransactionVersion() === "V0") {
|
|
439
|
+
tokenTransaction = await this.issuerTokenTransactionService.constructMintTokenTransactionV0(
|
|
440
|
+
(0, import_utils6.hexToBytes)(tokenPublicKey),
|
|
441
|
+
tokenAmount
|
|
442
|
+
);
|
|
443
|
+
} else {
|
|
444
|
+
tokenTransaction = await this.issuerTokenTransactionService.constructMintTokenTransaction(
|
|
445
|
+
(0, import_utils6.hexToBytes)(tokenPublicKey),
|
|
446
|
+
tokenAmount
|
|
447
|
+
);
|
|
448
|
+
}
|
|
420
449
|
return await this.issuerTokenTransactionService.broadcastTokenTransaction(
|
|
421
450
|
tokenTransaction
|
|
422
451
|
);
|
|
@@ -452,7 +481,7 @@ var IssuerSparkWallet = class _IssuerSparkWallet extends import_spark_sdk3.Spark
|
|
|
452
481
|
this.config.getNetworkType()
|
|
453
482
|
);
|
|
454
483
|
const response = await this.tokenFreezeService.freezeTokens(
|
|
455
|
-
(0, import_utils6.hexToBytes)(decodedOwnerPubkey),
|
|
484
|
+
(0, import_utils6.hexToBytes)(decodedOwnerPubkey.identityPublicKey),
|
|
456
485
|
(0, import_utils6.hexToBytes)(tokenPublicKey)
|
|
457
486
|
);
|
|
458
487
|
const tokenAmount = (0, import_utils6.bytesToNumberBE)(response.impactedTokenAmount);
|
|
@@ -474,7 +503,7 @@ var IssuerSparkWallet = class _IssuerSparkWallet extends import_spark_sdk3.Spark
|
|
|
474
503
|
this.config.getNetworkType()
|
|
475
504
|
);
|
|
476
505
|
const response = await this.tokenFreezeService.unfreezeTokens(
|
|
477
|
-
(0, import_utils6.hexToBytes)(decodedOwnerPubkey),
|
|
506
|
+
(0, import_utils6.hexToBytes)(decodedOwnerPubkey.identityPublicKey),
|
|
478
507
|
(0, import_utils6.hexToBytes)(tokenPublicKey)
|
|
479
508
|
);
|
|
480
509
|
const tokenAmount = (0, import_utils6.bytesToNumberBE)(response.impactedTokenAmount);
|
|
@@ -532,23 +561,23 @@ var IssuerSparkWallet = class _IssuerSparkWallet extends import_spark_sdk3.Spark
|
|
|
532
561
|
convertedOperationTypes = operationTypes.map((opType) => {
|
|
533
562
|
switch (opType.toUpperCase()) {
|
|
534
563
|
case "USER_TRANSFER":
|
|
535
|
-
return
|
|
564
|
+
return import_lrc202.OperationType.USER_TRANSFER;
|
|
536
565
|
case "USER_BURN":
|
|
537
|
-
return
|
|
566
|
+
return import_lrc202.OperationType.USER_BURN;
|
|
538
567
|
case "ISSUER_ANNOUNCE":
|
|
539
|
-
return
|
|
568
|
+
return import_lrc202.OperationType.ISSUER_ANNOUNCE;
|
|
540
569
|
case "ISSUER_MINT":
|
|
541
|
-
return
|
|
570
|
+
return import_lrc202.OperationType.ISSUER_MINT;
|
|
542
571
|
case "ISSUER_TRANSFER":
|
|
543
|
-
return
|
|
572
|
+
return import_lrc202.OperationType.ISSUER_TRANSFER;
|
|
544
573
|
case "ISSUER_FREEZE":
|
|
545
|
-
return
|
|
574
|
+
return import_lrc202.OperationType.ISSUER_FREEZE;
|
|
546
575
|
case "ISSUER_UNFREEZE":
|
|
547
|
-
return
|
|
576
|
+
return import_lrc202.OperationType.ISSUER_UNFREEZE;
|
|
548
577
|
case "ISSUER_BURN":
|
|
549
|
-
return
|
|
578
|
+
return import_lrc202.OperationType.ISSUER_BURN;
|
|
550
579
|
default:
|
|
551
|
-
return
|
|
580
|
+
return import_lrc202.OperationType.UNRECOGNIZED;
|
|
552
581
|
}
|
|
553
582
|
});
|
|
554
583
|
} else {
|
package/dist/index.d.cts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { SparkWallet, SparkWalletProps } from '@buildonspark/spark-sdk';
|
|
2
2
|
import { OutputWithPreviousTransactionData } from '@buildonspark/spark-sdk/proto/spark';
|
|
3
|
-
import { Layer, OperationType } from '@buildonspark/spark-sdk/proto/lrc20';
|
|
4
3
|
import { ConfigOptions } from '@buildonspark/spark-sdk/services/wallet-config';
|
|
5
4
|
import { TokenActivityResponse, TokenDistribution } from './types.cjs';
|
|
5
|
+
import { Layer, OperationType } from '@buildonspark/spark-sdk/proto/lrc20';
|
|
6
6
|
import { SparkSigner } from '@buildonspark/spark-sdk/signer';
|
|
7
7
|
|
|
8
8
|
type IssuerTokenInfo = {
|
package/dist/index.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { SparkWallet, SparkWalletProps } from '@buildonspark/spark-sdk';
|
|
2
2
|
import { OutputWithPreviousTransactionData } from '@buildonspark/spark-sdk/proto/spark';
|
|
3
|
-
import { Layer, OperationType } from '@buildonspark/spark-sdk/proto/lrc20';
|
|
4
3
|
import { ConfigOptions } from '@buildonspark/spark-sdk/services/wallet-config';
|
|
5
4
|
import { TokenActivityResponse, TokenDistribution } from './types.js';
|
|
5
|
+
import { Layer, OperationType } from '@buildonspark/spark-sdk/proto/lrc20';
|
|
6
6
|
import { SparkSigner } from '@buildonspark/spark-sdk/signer';
|
|
7
7
|
|
|
8
8
|
type IssuerTokenInfo = {
|
package/dist/index.js
CHANGED
|
@@ -12,7 +12,6 @@ import {
|
|
|
12
12
|
decodeSparkAddress,
|
|
13
13
|
encodeSparkAddress
|
|
14
14
|
} from "@buildonspark/spark-sdk/address";
|
|
15
|
-
import { Layer as Layer2 } from "@buildonspark/spark-sdk/proto/lrc20";
|
|
16
15
|
import {
|
|
17
16
|
bytesToHex as bytesToHex2,
|
|
18
17
|
bytesToNumberBE as bytesToNumberBE2,
|
|
@@ -136,7 +135,7 @@ var IssuerTokenTransactionService = class extends TokenTransactionService {
|
|
|
136
135
|
constructor(config, connectionManager) {
|
|
137
136
|
super(config, connectionManager);
|
|
138
137
|
}
|
|
139
|
-
async
|
|
138
|
+
async constructMintTokenTransactionV0(tokenPublicKey, tokenAmount) {
|
|
140
139
|
return {
|
|
141
140
|
network: this.config.getNetworkProto(),
|
|
142
141
|
tokenInputs: {
|
|
@@ -156,6 +155,28 @@ var IssuerTokenTransactionService = class extends TokenTransactionService {
|
|
|
156
155
|
sparkOperatorIdentityPublicKeys: super.collectOperatorIdentityPublicKeys()
|
|
157
156
|
};
|
|
158
157
|
}
|
|
158
|
+
async constructMintTokenTransaction(tokenPublicKey, tokenAmount) {
|
|
159
|
+
return {
|
|
160
|
+
version: 1,
|
|
161
|
+
network: this.config.getNetworkProto(),
|
|
162
|
+
tokenInputs: {
|
|
163
|
+
$case: "mintInput",
|
|
164
|
+
mintInput: {
|
|
165
|
+
issuerPublicKey: tokenPublicKey,
|
|
166
|
+
issuerProvidedTimestamp: Date.now()
|
|
167
|
+
}
|
|
168
|
+
},
|
|
169
|
+
tokenOutputs: [
|
|
170
|
+
{
|
|
171
|
+
ownerPublicKey: tokenPublicKey,
|
|
172
|
+
tokenPublicKey,
|
|
173
|
+
tokenAmount: numberToBytesBE(tokenAmount, 16)
|
|
174
|
+
}
|
|
175
|
+
],
|
|
176
|
+
sparkOperatorIdentityPublicKeys: super.collectOperatorIdentityPublicKeys(),
|
|
177
|
+
expiryTime: void 0
|
|
178
|
+
};
|
|
179
|
+
}
|
|
159
180
|
};
|
|
160
181
|
|
|
161
182
|
// src/utils/type-mappers.ts
|
|
@@ -264,6 +285,7 @@ function getEnumName(enumObj, value) {
|
|
|
264
285
|
// src/issuer-wallet/issuer-spark-wallet.ts
|
|
265
286
|
import { NotImplementedError } from "@buildonspark/spark-sdk";
|
|
266
287
|
import {
|
|
288
|
+
Layer as Layer2,
|
|
267
289
|
OperationType as OperationType2
|
|
268
290
|
} from "@buildonspark/spark-sdk/proto/lrc20";
|
|
269
291
|
var BURN_ADDRESS = "02".repeat(33);
|
|
@@ -392,11 +414,19 @@ var IssuerSparkWallet = class _IssuerSparkWallet extends SparkWallet {
|
|
|
392
414
|
* @returns The transaction ID of the mint operation
|
|
393
415
|
*/
|
|
394
416
|
async mintTokens(tokenAmount) {
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
417
|
+
const tokenPublicKey = await super.getIdentityPublicKey();
|
|
418
|
+
let tokenTransaction;
|
|
419
|
+
if (this.config.getTokenTransactionVersion() === "V0") {
|
|
420
|
+
tokenTransaction = await this.issuerTokenTransactionService.constructMintTokenTransactionV0(
|
|
421
|
+
hexToBytes2(tokenPublicKey),
|
|
422
|
+
tokenAmount
|
|
423
|
+
);
|
|
424
|
+
} else {
|
|
425
|
+
tokenTransaction = await this.issuerTokenTransactionService.constructMintTokenTransaction(
|
|
426
|
+
hexToBytes2(tokenPublicKey),
|
|
427
|
+
tokenAmount
|
|
428
|
+
);
|
|
429
|
+
}
|
|
400
430
|
return await this.issuerTokenTransactionService.broadcastTokenTransaction(
|
|
401
431
|
tokenTransaction
|
|
402
432
|
);
|
|
@@ -432,7 +462,7 @@ var IssuerSparkWallet = class _IssuerSparkWallet extends SparkWallet {
|
|
|
432
462
|
this.config.getNetworkType()
|
|
433
463
|
);
|
|
434
464
|
const response = await this.tokenFreezeService.freezeTokens(
|
|
435
|
-
hexToBytes2(decodedOwnerPubkey),
|
|
465
|
+
hexToBytes2(decodedOwnerPubkey.identityPublicKey),
|
|
436
466
|
hexToBytes2(tokenPublicKey)
|
|
437
467
|
);
|
|
438
468
|
const tokenAmount = bytesToNumberBE2(response.impactedTokenAmount);
|
|
@@ -454,7 +484,7 @@ var IssuerSparkWallet = class _IssuerSparkWallet extends SparkWallet {
|
|
|
454
484
|
this.config.getNetworkType()
|
|
455
485
|
);
|
|
456
486
|
const response = await this.tokenFreezeService.unfreezeTokens(
|
|
457
|
-
hexToBytes2(decodedOwnerPubkey),
|
|
487
|
+
hexToBytes2(decodedOwnerPubkey.identityPublicKey),
|
|
458
488
|
hexToBytes2(tokenPublicKey)
|
|
459
489
|
);
|
|
460
490
|
const tokenAmount = bytesToNumberBE2(response.impactedTokenAmount);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@buildonspark/issuer-sdk",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.73",
|
|
4
4
|
"description": "Spark Issuer SDK for token issuance",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"module": "./dist/index.js",
|
|
@@ -63,8 +63,8 @@
|
|
|
63
63
|
},
|
|
64
64
|
"dependencies": {
|
|
65
65
|
"@buildonspark/lrc20-sdk": "0.0.57",
|
|
66
|
-
"@buildonspark/spark-sdk": "0.1.
|
|
67
|
-
"@lightsparkdev/core": "^1.4.
|
|
66
|
+
"@buildonspark/spark-sdk": "0.1.42",
|
|
67
|
+
"@lightsparkdev/core": "^1.4.2",
|
|
68
68
|
"@noble/curves": "^1.8.0",
|
|
69
69
|
"@scure/btc-signer": "^1.5.0",
|
|
70
70
|
"bitcoinjs-lib": "^6.1.5",
|
|
@@ -10,8 +10,11 @@ import {
|
|
|
10
10
|
decodeSparkAddress,
|
|
11
11
|
encodeSparkAddress,
|
|
12
12
|
} from "@buildonspark/spark-sdk/address";
|
|
13
|
-
import {
|
|
14
|
-
|
|
13
|
+
import {
|
|
14
|
+
OutputWithPreviousTransactionData,
|
|
15
|
+
TokenTransaction as TokenTransactionV0,
|
|
16
|
+
} from "@buildonspark/spark-sdk/proto/spark";
|
|
17
|
+
import { TokenTransaction } from "@buildonspark/spark-sdk/proto/spark_token";
|
|
15
18
|
import { ConfigOptions } from "@buildonspark/spark-sdk/services/wallet-config";
|
|
16
19
|
import {
|
|
17
20
|
bytesToHex,
|
|
@@ -24,6 +27,7 @@ import { TokenActivityResponse, TokenDistribution } from "../types.js";
|
|
|
24
27
|
import { convertToTokenActivity } from "../utils/type-mappers.js";
|
|
25
28
|
import { NotImplementedError } from "@buildonspark/spark-sdk";
|
|
26
29
|
import {
|
|
30
|
+
Layer,
|
|
27
31
|
ListAllTokenTransactionsCursor,
|
|
28
32
|
OperationType,
|
|
29
33
|
} from "@buildonspark/spark-sdk/proto/lrc20";
|
|
@@ -185,13 +189,22 @@ export class IssuerSparkWallet extends SparkWallet {
|
|
|
185
189
|
* @returns The transaction ID of the mint operation
|
|
186
190
|
*/
|
|
187
191
|
public async mintTokens(tokenAmount: bigint): Promise<string> {
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
192
|
+
const tokenPublicKey = await super.getIdentityPublicKey();
|
|
193
|
+
let tokenTransaction: TokenTransactionV0 | TokenTransaction;
|
|
194
|
+
|
|
195
|
+
if (this.config.getTokenTransactionVersion() === "V0") {
|
|
196
|
+
tokenTransaction =
|
|
197
|
+
await this.issuerTokenTransactionService.constructMintTokenTransactionV0(
|
|
198
|
+
hexToBytes(tokenPublicKey),
|
|
199
|
+
tokenAmount,
|
|
200
|
+
);
|
|
201
|
+
} else {
|
|
202
|
+
tokenTransaction =
|
|
203
|
+
await this.issuerTokenTransactionService.constructMintTokenTransaction(
|
|
204
|
+
hexToBytes(tokenPublicKey),
|
|
205
|
+
tokenAmount,
|
|
206
|
+
);
|
|
207
|
+
}
|
|
195
208
|
|
|
196
209
|
return await this.issuerTokenTransactionService.broadcastTokenTransaction(
|
|
197
210
|
tokenTransaction,
|
|
@@ -235,7 +248,7 @@ export class IssuerSparkWallet extends SparkWallet {
|
|
|
235
248
|
this.config.getNetworkType(),
|
|
236
249
|
);
|
|
237
250
|
const response = await this.tokenFreezeService!.freezeTokens(
|
|
238
|
-
hexToBytes(decodedOwnerPubkey),
|
|
251
|
+
hexToBytes(decodedOwnerPubkey.identityPublicKey),
|
|
239
252
|
hexToBytes(tokenPublicKey),
|
|
240
253
|
);
|
|
241
254
|
|
|
@@ -263,7 +276,7 @@ export class IssuerSparkWallet extends SparkWallet {
|
|
|
263
276
|
this.config.getNetworkType(),
|
|
264
277
|
);
|
|
265
278
|
const response = await this.tokenFreezeService!.unfreezeTokens(
|
|
266
|
-
hexToBytes(decodedOwnerPubkey),
|
|
279
|
+
hexToBytes(decodedOwnerPubkey.identityPublicKey),
|
|
267
280
|
hexToBytes(tokenPublicKey),
|
|
268
281
|
);
|
|
269
282
|
const tokenAmount = bytesToNumberBE(response.impactedTokenAmount);
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { WalletConfigService } from "@buildonspark/spark-sdk/config";
|
|
2
2
|
import { ConnectionManager } from "@buildonspark/spark-sdk/connection";
|
|
3
|
-
import { TokenTransaction } from "@buildonspark/spark-sdk/proto/spark";
|
|
3
|
+
import { TokenTransaction as TokenTransactionV0 } from "@buildonspark/spark-sdk/proto/spark";
|
|
4
|
+
import { TokenTransaction } from "@buildonspark/spark-sdk/proto/spark_token";
|
|
4
5
|
import { TokenTransactionService } from "@buildonspark/spark-sdk/token-transactions";
|
|
5
6
|
import { numberToBytesBE } from "@noble/curves/abstract/utils";
|
|
6
7
|
|
|
@@ -12,11 +13,37 @@ export class IssuerTokenTransactionService extends TokenTransactionService {
|
|
|
12
13
|
super(config, connectionManager);
|
|
13
14
|
}
|
|
14
15
|
|
|
16
|
+
async constructMintTokenTransactionV0(
|
|
17
|
+
tokenPublicKey: Uint8Array,
|
|
18
|
+
tokenAmount: bigint,
|
|
19
|
+
): Promise<TokenTransactionV0> {
|
|
20
|
+
return {
|
|
21
|
+
network: this.config.getNetworkProto(),
|
|
22
|
+
tokenInputs: {
|
|
23
|
+
$case: "mintInput",
|
|
24
|
+
mintInput: {
|
|
25
|
+
issuerPublicKey: tokenPublicKey,
|
|
26
|
+
issuerProvidedTimestamp: Date.now(),
|
|
27
|
+
},
|
|
28
|
+
},
|
|
29
|
+
tokenOutputs: [
|
|
30
|
+
{
|
|
31
|
+
ownerPublicKey: tokenPublicKey,
|
|
32
|
+
tokenPublicKey: tokenPublicKey,
|
|
33
|
+
tokenAmount: numberToBytesBE(tokenAmount, 16),
|
|
34
|
+
},
|
|
35
|
+
],
|
|
36
|
+
sparkOperatorIdentityPublicKeys:
|
|
37
|
+
super.collectOperatorIdentityPublicKeys(),
|
|
38
|
+
};
|
|
39
|
+
}
|
|
40
|
+
|
|
15
41
|
async constructMintTokenTransaction(
|
|
16
42
|
tokenPublicKey: Uint8Array,
|
|
17
43
|
tokenAmount: bigint,
|
|
18
44
|
): Promise<TokenTransaction> {
|
|
19
45
|
return {
|
|
46
|
+
version: 1,
|
|
20
47
|
network: this.config.getNetworkProto(),
|
|
21
48
|
tokenInputs: {
|
|
22
49
|
$case: "mintInput",
|
|
@@ -34,6 +61,7 @@ export class IssuerTokenTransactionService extends TokenTransactionService {
|
|
|
34
61
|
],
|
|
35
62
|
sparkOperatorIdentityPublicKeys:
|
|
36
63
|
super.collectOperatorIdentityPublicKeys(),
|
|
64
|
+
expiryTime: undefined,
|
|
37
65
|
};
|
|
38
66
|
}
|
|
39
67
|
}
|