@buildonspark/issuer-sdk 0.0.5 → 0.0.6

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.
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,41 @@
1
+ export {};
2
+ /*
3
+ // TODO: Change to typed when LRC20 JS SDK is added.
4
+ import {
5
+ TokenPubkeyAnnouncement,
6
+ TokenPubkey,
7
+ Lrc20Transaction,
8
+ Lrc20TransactionDto,
9
+ LRCWallet,
10
+ } from "lrc20-sdk";
11
+ import { randomBytes } from "crypto";
12
+
13
+ export async function announceToken(
14
+ lrcWallet: LRCWallet,
15
+ tokenName: string,
16
+ tokenTicker: string,
17
+ maxSupply: bigint,
18
+ decimals: number,
19
+ isFreezeable: boolean,
20
+ feeRateSatsPerVb: number = 2,
21
+ ): Promise<string> {
22
+ const tokenId = randomBytes(32);
23
+
24
+ const announcement = new TokenPubkeyAnnouncement(
25
+ new TokenPubkey(tokenId),
26
+ tokenName,
27
+ tokenTicker,
28
+ decimals,
29
+ maxSupply,
30
+ isFreezeable,
31
+ );
32
+
33
+ const tx: Lrc20Transaction = await lrcWallet.prepareAnnouncement(
34
+ announcement,
35
+ feeRateSatsPerVb,
36
+ );
37
+ const txDto = Lrc20TransactionDto.fromLrc20Transaction(tx);
38
+ return await lrcWallet.broadcast(txDto);
39
+ }
40
+ */
41
+ //# sourceMappingURL=create.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"create.js","sourceRoot":"","sources":["../../src/services/create.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAsCE"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@buildonspark/issuer-sdk",
3
- "version": "0.0.5",
3
+ "version": "0.0.6",
4
4
  "description": "Spark Issuer SDK for token issuance",
5
5
  "module": "./dist/issuer-sdk.js",
6
6
  "types": "./dist/issuer-sdk.d.ts",
@@ -42,8 +42,8 @@
42
42
  },
43
43
  "dependencies": {
44
44
  "@bufbuild/protobuf": "^2.2.3",
45
- "@buildonspark/lrc20-sdk": "0.0.3",
46
- "@buildonspark/spark-sdk": "0.0.5",
45
+ "@buildonspark/lrc20-sdk": "0.0.4",
46
+ "@buildonspark/spark-sdk": "0.0.6",
47
47
  "@grpc/grpc-js": "^1.12.5",
48
48
  "@noble/curves": "^1.8.0",
49
49
  "@noble/secp256k1": "^2.2.3",