@buildonspark/issuer-sdk 0.1.15 → 0.1.16

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 CHANGED
@@ -1,5 +1,12 @@
1
1
  # @buildonspark/issuer-sdk
2
2
 
3
+ ## 0.1.16
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies
8
+ - @buildonspark/spark-sdk@0.6.6
9
+
3
10
  ## 0.1.15
4
11
 
5
12
  ### Patch Changes
@@ -73,74 +73,74 @@ declare abstract class IssuerSparkWallet extends SparkWallet {
73
73
  private tokenFreezeService;
74
74
  protected tracerId: string;
75
75
  /**
76
- * Initializes a new IssuerSparkWallet instance.
77
- * Inherits the generic static initialize from the base class.
78
- */
76
+ * Initializes a new IssuerSparkWallet instance.
77
+ * Inherits the generic static initialize from the base class.
78
+ */
79
79
  constructor(configOptions?: ConfigOptions$1, signer?: SparkSigner$1);
80
80
  /**
81
- * Gets the token balance for the issuer's token.
82
- * @deprecated Use getIssuerTokenBalances() instead. This method will be removed in a future version.
83
- * @returns An object containing the token balance as a bigint
84
- *
85
- * @throws {SparkValidationError} If multiple tokens are found for this issuer
86
- */
81
+ * Gets the token balance for the issuer's token.
82
+ * @deprecated Use getIssuerTokenBalances() instead. This method will be removed in a future version.
83
+ * @returns An object containing the token balance as a bigint
84
+ *
85
+ * @throws {SparkValidationError} If multiple tokens are found for this issuer
86
+ */
87
87
  getIssuerTokenBalance(): Promise<{
88
88
  tokenIdentifier: Bech32mTokenIdentifier | undefined;
89
89
  balance: bigint;
90
90
  }>;
91
91
  /**
92
- * Gets the token balances for the tokens that were issued by this user.
93
- * @returns An array of objects containing the token identifier and balance
94
- */
92
+ * Gets the token balances for the tokens that were issued by this user.
93
+ * @returns An array of objects containing the token identifier and balance
94
+ */
95
95
  getIssuerTokenBalances(): Promise<{
96
96
  tokenIdentifier: Bech32mTokenIdentifier | undefined;
97
97
  balance: bigint;
98
98
  }[]>;
99
99
  /**
100
- * Retrieves information about the issuer's token.
101
- * @deprecated Use getIssuerTokensMetadata() instead. This method will be removed in a future version.
102
- * @returns An object containing token information including public key, name, symbol, decimals, max supply, freeze status, and extra metadata
103
- * @throws {SparkRequestError} If the token metadata cannot be retrieved
104
- * @throws {SparkValidationError} If multiple tokens are found for this issuer
105
- */
100
+ * Retrieves information about the issuer's token.
101
+ * @deprecated Use getIssuerTokensMetadata() instead. This method will be removed in a future version.
102
+ * @returns An object containing token information including public key, name, symbol, decimals, max supply, freeze status, and extra metadata
103
+ * @throws {SparkRequestError} If the token metadata cannot be retrieved
104
+ * @throws {SparkValidationError} If multiple tokens are found for this issuer
105
+ */
106
106
  getIssuerTokenMetadata(): Promise<IssuerTokenMetadata>;
107
107
  /**
108
- * Retrieves information about the tokens that were issued by this user.
109
- * @param tokenIdentifiers - Optional array of specific token identifiers to fetch.
110
- * If omitted, all tokens for this issuer are fetched.
111
- * @returns An array of objects containing token information including public key, name, symbol, decimals, max supply, freeze status, and extra metadata
112
- * @throws {SparkRequestError} If the token metadata cannot be retrieved
113
- */
108
+ * Retrieves information about the tokens that were issued by this user.
109
+ * @param tokenIdentifiers - Optional array of specific token identifiers to fetch.
110
+ * If omitted, all tokens for this issuer are fetched.
111
+ * @returns An array of objects containing token information including public key, name, symbol, decimals, max supply, freeze status, and extra metadata
112
+ * @throws {SparkRequestError} If the token metadata cannot be retrieved
113
+ */
114
114
  getIssuerTokensMetadata(tokenIdentifiers?: Bech32mTokenIdentifier[]): Promise<IssuerTokenMetadata[]>;
115
115
  /**
116
- * Retrieves the bech32m encoded token identifier for the issuer's token.
117
- * @deprecated Use getIssuerTokenIdentifiers() instead. This method will be removed in a future version.
118
- * @returns The bech32m encoded token identifier for the issuer's token
119
- * @throws {SparkRequestError} If the token identifier cannot be retrieved
120
- * @throws {SparkValidationError} If multiple tokens are found for this issuer
121
- */
116
+ * Retrieves the bech32m encoded token identifier for the issuer's token.
117
+ * @deprecated Use getIssuerTokenIdentifiers() instead. This method will be removed in a future version.
118
+ * @returns The bech32m encoded token identifier for the issuer's token
119
+ * @throws {SparkRequestError} If the token identifier cannot be retrieved
120
+ * @throws {SparkValidationError} If multiple tokens are found for this issuer
121
+ */
122
122
  getIssuerTokenIdentifier(): Promise<Bech32mTokenIdentifier>;
123
123
  /**
124
- * Retrieves the bech32m encoded token identifier for the issuer's token.
125
- * @returns The bech32m encoded token identifier for the issuer's token
126
- * @throws {SparkRequestError} If the token identifier cannot be retrieved
127
- */
124
+ * Retrieves the bech32m encoded token identifier for the issuer's token.
125
+ * @returns The bech32m encoded token identifier for the issuer's token
126
+ * @throws {SparkRequestError} If the token identifier cannot be retrieved
127
+ */
128
128
  getIssuerTokenIdentifiers(): Promise<Bech32mTokenIdentifier[]>;
129
129
  /**
130
- * Create a new token on Spark.
131
- *
132
- * @param params - Object containing token creation parameters.
133
- * @param params.tokenName - The name of the token.
134
- * @param params.tokenTicker - The ticker symbol for the token.
135
- * @param params.decimals - The number of decimal places for the token.
136
- * @param params.isFreezable - Whether the token can be frozen.
137
- * @param [params.maxSupply=0n] - (Optional) The maximum supply of the token. Defaults to <code>0n</code>.
138
- * @param params.extraMetadata - (Optional) This can be used to store additional bytes data to be associated with a token, like image data.
139
- * @param params.returnIdentifierForCreate - (Optional) Whether to return the token identifier in addition to the transaction hash. Defaults to <code>false</code>.
140
- * @returns The transaction hash of the announcement or TokenCreationDetails if `returnIdentifierForCreate` is true.
141
- * @throws {SparkValidationError} If `decimals` is not a safe integer or other validation fails.
142
- * @throws {SparkRequestError} If the announcement transaction cannot be broadcast.
143
- */
130
+ * Create a new token on Spark.
131
+ *
132
+ * @param params - Object containing token creation parameters.
133
+ * @param params.tokenName - The name of the token.
134
+ * @param params.tokenTicker - The ticker symbol for the token.
135
+ * @param params.decimals - The number of decimal places for the token.
136
+ * @param params.isFreezable - Whether the token can be frozen.
137
+ * @param [params.maxSupply=0n] - (Optional) The maximum supply of the token. Defaults to <code>0n</code>.
138
+ * @param params.extraMetadata - (Optional) This can be used to store additional bytes data to be associated with a token, like image data.
139
+ * @param params.returnIdentifierForCreate - (Optional) Whether to return the token identifier in addition to the transaction hash. Defaults to <code>false</code>.
140
+ * @returns The transaction hash of the announcement or TokenCreationDetails if `returnIdentifierForCreate` is true.
141
+ * @throws {SparkValidationError} If `decimals` is not a safe integer or other validation fails.
142
+ * @throws {SparkRequestError} If the announcement transaction cannot be broadcast.
143
+ */
144
144
  createToken(params: {
145
145
  tokenName: string;
146
146
  tokenTicker: string;
@@ -160,21 +160,21 @@ declare abstract class IssuerSparkWallet extends SparkWallet {
160
160
  returnIdentifierForCreate: true;
161
161
  }): Promise<TokenCreationDetails>;
162
162
  /**
163
- * @deprecated Use mintTokens({ tokenAmount, tokenIdentifier }) instead. This method will be removed in a future version.
164
- * @param amount - The amount of tokens to mint
165
- * @returns The transaction ID of the mint operation
166
- * @throws {SparkValidationError} If multiple tokens are found for this issuer
167
- * @throws {SparkValidationError} If no tokens are found for this issuer
168
- */
163
+ * @deprecated Use mintTokens({ tokenAmount, tokenIdentifier }) instead. This method will be removed in a future version.
164
+ * @param amount - The amount of tokens to mint
165
+ * @returns The transaction ID of the mint operation
166
+ * @throws {SparkValidationError} If multiple tokens are found for this issuer
167
+ * @throws {SparkValidationError} If no tokens are found for this issuer
168
+ */
169
169
  mintTokens(amount: bigint): Promise<string>;
170
170
  /**
171
- * Mints new tokens
172
- * @param params - Object containing token minting parameters.
173
- * @param params.tokenAmount - The amount of tokens to mint
174
- * @param params.tokenIdentifier - The bech32m encoded token identifier
175
- * @returns The transaction ID of the mint operation
176
- * @throws {SparkValidationError} If no tokens are found for this issuer
177
- */
171
+ * Mints new tokens
172
+ * @param params - Object containing token minting parameters.
173
+ * @param params.tokenAmount - The amount of tokens to mint
174
+ * @param params.tokenIdentifier - The bech32m encoded token identifier
175
+ * @returns The transaction ID of the mint operation
176
+ * @throws {SparkValidationError} If no tokens are found for this issuer
177
+ */
178
178
  mintTokens({
179
179
  tokenAmount,
180
180
  tokenIdentifier
@@ -183,23 +183,23 @@ declare abstract class IssuerSparkWallet extends SparkWallet {
183
183
  tokenIdentifier: Bech32mTokenIdentifier;
184
184
  }): Promise<string>;
185
185
  /**
186
- * Burns issuer's tokens
187
- * @deprecated Use burnTokens({ tokenAmount, tokenIdentifier, selectedOutputs }) instead. This method will be removed in a future version.
188
- * @param tokenAmount - The amount of tokens to burn
189
- * @param selectedOutputs - Optional array of outputs to use for the burn operation
190
- * @returns The transaction ID of the burn operation
191
- * @throws {SparkValidationError} If multiple tokens are found for this issuer
192
- * @throws {SparkValidationError} If no tokens are found for this issuer
193
- */
186
+ * Burns issuer's tokens
187
+ * @deprecated Use burnTokens({ tokenAmount, tokenIdentifier, selectedOutputs }) instead. This method will be removed in a future version.
188
+ * @param tokenAmount - The amount of tokens to burn
189
+ * @param selectedOutputs - Optional array of outputs to use for the burn operation
190
+ * @returns The transaction ID of the burn operation
191
+ * @throws {SparkValidationError} If multiple tokens are found for this issuer
192
+ * @throws {SparkValidationError} If no tokens are found for this issuer
193
+ */
194
194
  burnTokens(tokenAmount: bigint, selectedOutputs?: OutputWithPreviousTransactionData[]): Promise<string>;
195
195
  /**
196
- * Burns issuer's tokens
197
- * @param params - Object containing token burning parameters.
198
- * @param params.tokenAmount - The amount of tokens to burn
199
- * @param params.tokenIdentifier - The bech32m encoded token identifier
200
- * @param params.selectedOutputs - Optional array of outputs to use for the burn operation
201
- * @returns The transaction ID of the burn operation
202
- */
196
+ * Burns issuer's tokens
197
+ * @param params - Object containing token burning parameters.
198
+ * @param params.tokenAmount - The amount of tokens to burn
199
+ * @param params.tokenIdentifier - The bech32m encoded token identifier
200
+ * @param params.selectedOutputs - Optional array of outputs to use for the burn operation
201
+ * @returns The transaction ID of the burn operation
202
+ */
203
203
  burnTokens({
204
204
  tokenAmount,
205
205
  tokenIdentifier,
@@ -210,24 +210,24 @@ declare abstract class IssuerSparkWallet extends SparkWallet {
210
210
  selectedOutputs?: OutputWithPreviousTransactionData[];
211
211
  }): Promise<string>;
212
212
  /**
213
- * Freezes tokens associated with a specific Spark address.
214
- * @deprecated Use freezeToken({ tokenIdentifier, sparkAddress }) instead. This method will be removed in a future version.
215
- * @param sparkAddress - The Spark address whose tokens should be frozen
216
- * @returns An object containing the IDs of impacted outputs and the total amount of frozen tokens
217
- * @throws {SparkValidationError} If multiple tokens are found for this issuer
218
- * @throws {SparkValidationError} If no tokens are found for this issuer
219
- */
213
+ * Freezes tokens associated with a specific Spark address.
214
+ * @deprecated Use freezeToken({ tokenIdentifier, sparkAddress }) instead. This method will be removed in a future version.
215
+ * @param sparkAddress - The Spark address whose tokens should be frozen
216
+ * @returns An object containing the IDs of impacted outputs and the total amount of frozen tokens
217
+ * @throws {SparkValidationError} If multiple tokens are found for this issuer
218
+ * @throws {SparkValidationError} If no tokens are found for this issuer
219
+ */
220
220
  freezeTokens(sparkAddress: string): Promise<{
221
221
  impactedTokenOutputs: TokenOutputRef[];
222
222
  impactedTokenAmount: bigint;
223
223
  }>;
224
224
  /**
225
- * Freezes tokens associated with a specific Spark address.
226
- * @param params - Object containing token freezing parameters.
227
- * @param params.tokenIdentifier - The bech32m encoded token identifier
228
- * @param params.sparkAddress - The Spark address whose tokens should be frozen
229
- * @returns An object containing the IDs of impacted outputs and the total amount of frozen tokens
230
- */
225
+ * Freezes tokens associated with a specific Spark address.
226
+ * @param params - Object containing token freezing parameters.
227
+ * @param params.tokenIdentifier - The bech32m encoded token identifier
228
+ * @param params.sparkAddress - The Spark address whose tokens should be frozen
229
+ * @returns An object containing the IDs of impacted outputs and the total amount of frozen tokens
230
+ */
231
231
  freezeTokens({
232
232
  tokenIdentifier,
233
233
  sparkAddress
@@ -239,26 +239,26 @@ declare abstract class IssuerSparkWallet extends SparkWallet {
239
239
  impactedTokenAmount: bigint;
240
240
  }>;
241
241
  /**
242
- * Unfreezes previously frozen tokens associated with a specific Spark address.
243
- * @deprecated Use unfreezeToken({ tokenIdentifier, sparkAddress }) instead. This method will be removed in a future version.
244
- * @param sparkAddress - The Spark address whose tokens should be unfrozen
245
- * @returns An object containing the IDs of impacted outputs and the total amount of unfrozen tokens
246
- * @throws {SparkValidationError} If multiple tokens are found for this issuer
247
- * @throws {SparkValidationError} If no tokens are found for this issuer
248
- */
242
+ * Unfreezes previously frozen tokens associated with a specific Spark address.
243
+ * @deprecated Use unfreezeToken({ tokenIdentifier, sparkAddress }) instead. This method will be removed in a future version.
244
+ * @param sparkAddress - The Spark address whose tokens should be unfrozen
245
+ * @returns An object containing the IDs of impacted outputs and the total amount of unfrozen tokens
246
+ * @throws {SparkValidationError} If multiple tokens are found for this issuer
247
+ * @throws {SparkValidationError} If no tokens are found for this issuer
248
+ */
249
249
  unfreezeTokens(sparkAddress: string): Promise<{
250
250
  impactedTokenOutputs: TokenOutputRef[];
251
251
  impactedTokenAmount: bigint;
252
252
  }>;
253
253
  /**
254
- * Unfreezes previously frozen tokens associated with a specific Spark address.
255
- * @param params - Object containing token unfreezing parameters.
256
- * @param params.tokenIdentifier - The bech32m encoded token identifier
257
- * @param params.sparkAddress - The Spark address whose tokens should be unfrozen
258
- * @returns An object containing the IDs of impacted outputs and the total amount of unfrozen tokens
259
- * @throws {SparkValidationError} If multiple tokens are found for this issuer
260
- * @throws {SparkValidationError} If no tokens are found for this issuer
261
- */
254
+ * Unfreezes previously frozen tokens associated with a specific Spark address.
255
+ * @param params - Object containing token unfreezing parameters.
256
+ * @param params.tokenIdentifier - The bech32m encoded token identifier
257
+ * @param params.sparkAddress - The Spark address whose tokens should be unfrozen
258
+ * @returns An object containing the IDs of impacted outputs and the total amount of unfrozen tokens
259
+ * @throws {SparkValidationError} If multiple tokens are found for this issuer
260
+ * @throws {SparkValidationError} If no tokens are found for this issuer
261
+ */
262
262
  unfreezeTokens({
263
263
  tokenIdentifier,
264
264
  sparkAddress
@@ -270,17 +270,17 @@ declare abstract class IssuerSparkWallet extends SparkWallet {
270
270
  impactedTokenAmount: bigint;
271
271
  }>;
272
272
  /**
273
- * Retrieves the distribution information for the issuer's token.
274
- * @throws {SparkError} This feature is not yet supported
275
- */
273
+ * Retrieves the distribution information for the issuer's token.
274
+ * @throws {SparkError} This feature is not yet supported
275
+ */
276
276
  getIssuerTokenDistribution(): Promise<TokenDistribution>;
277
277
  /**
278
- * This validates that the token belongs to this issuer.
279
- * If a token is in the cache, it must belong to this issuer.
280
- * @param tokenIdentifier - The bech32m encoded token identifier
281
- * @throws {SparkValidationError} If the token is not found for this issuer
282
- * @private
283
- */
278
+ * This validates that the token belongs to this issuer.
279
+ * If a token is in the cache, it must belong to this issuer.
280
+ * @param tokenIdentifier - The bech32m encoded token identifier
281
+ * @throws {SparkValidationError} If the token is not found for this issuer
282
+ * @private
283
+ */
284
284
  private validateTokenIssuer;
285
285
  protected getTraceName(methodName: string): string;
286
286
  private wrapIssuerPublicMethod;
@@ -1,3 +1,4 @@
1
+ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
1
2
  let _buildonspark_spark_sdk = require("@buildonspark/spark-sdk");
2
3
  let _noble_curves_utils = require("@noble/curves/utils");
3
4
  let _scure_btc_signer_utils = require("@scure/btc-signer/utils");
@@ -73,74 +73,74 @@ declare abstract class IssuerSparkWallet extends SparkWallet {
73
73
  private tokenFreezeService;
74
74
  protected tracerId: string;
75
75
  /**
76
- * Initializes a new IssuerSparkWallet instance.
77
- * Inherits the generic static initialize from the base class.
78
- */
76
+ * Initializes a new IssuerSparkWallet instance.
77
+ * Inherits the generic static initialize from the base class.
78
+ */
79
79
  constructor(configOptions?: ConfigOptions$1, signer?: SparkSigner$1);
80
80
  /**
81
- * Gets the token balance for the issuer's token.
82
- * @deprecated Use getIssuerTokenBalances() instead. This method will be removed in a future version.
83
- * @returns An object containing the token balance as a bigint
84
- *
85
- * @throws {SparkValidationError} If multiple tokens are found for this issuer
86
- */
81
+ * Gets the token balance for the issuer's token.
82
+ * @deprecated Use getIssuerTokenBalances() instead. This method will be removed in a future version.
83
+ * @returns An object containing the token balance as a bigint
84
+ *
85
+ * @throws {SparkValidationError} If multiple tokens are found for this issuer
86
+ */
87
87
  getIssuerTokenBalance(): Promise<{
88
88
  tokenIdentifier: Bech32mTokenIdentifier | undefined;
89
89
  balance: bigint;
90
90
  }>;
91
91
  /**
92
- * Gets the token balances for the tokens that were issued by this user.
93
- * @returns An array of objects containing the token identifier and balance
94
- */
92
+ * Gets the token balances for the tokens that were issued by this user.
93
+ * @returns An array of objects containing the token identifier and balance
94
+ */
95
95
  getIssuerTokenBalances(): Promise<{
96
96
  tokenIdentifier: Bech32mTokenIdentifier | undefined;
97
97
  balance: bigint;
98
98
  }[]>;
99
99
  /**
100
- * Retrieves information about the issuer's token.
101
- * @deprecated Use getIssuerTokensMetadata() instead. This method will be removed in a future version.
102
- * @returns An object containing token information including public key, name, symbol, decimals, max supply, freeze status, and extra metadata
103
- * @throws {SparkRequestError} If the token metadata cannot be retrieved
104
- * @throws {SparkValidationError} If multiple tokens are found for this issuer
105
- */
100
+ * Retrieves information about the issuer's token.
101
+ * @deprecated Use getIssuerTokensMetadata() instead. This method will be removed in a future version.
102
+ * @returns An object containing token information including public key, name, symbol, decimals, max supply, freeze status, and extra metadata
103
+ * @throws {SparkRequestError} If the token metadata cannot be retrieved
104
+ * @throws {SparkValidationError} If multiple tokens are found for this issuer
105
+ */
106
106
  getIssuerTokenMetadata(): Promise<IssuerTokenMetadata>;
107
107
  /**
108
- * Retrieves information about the tokens that were issued by this user.
109
- * @param tokenIdentifiers - Optional array of specific token identifiers to fetch.
110
- * If omitted, all tokens for this issuer are fetched.
111
- * @returns An array of objects containing token information including public key, name, symbol, decimals, max supply, freeze status, and extra metadata
112
- * @throws {SparkRequestError} If the token metadata cannot be retrieved
113
- */
108
+ * Retrieves information about the tokens that were issued by this user.
109
+ * @param tokenIdentifiers - Optional array of specific token identifiers to fetch.
110
+ * If omitted, all tokens for this issuer are fetched.
111
+ * @returns An array of objects containing token information including public key, name, symbol, decimals, max supply, freeze status, and extra metadata
112
+ * @throws {SparkRequestError} If the token metadata cannot be retrieved
113
+ */
114
114
  getIssuerTokensMetadata(tokenIdentifiers?: Bech32mTokenIdentifier[]): Promise<IssuerTokenMetadata[]>;
115
115
  /**
116
- * Retrieves the bech32m encoded token identifier for the issuer's token.
117
- * @deprecated Use getIssuerTokenIdentifiers() instead. This method will be removed in a future version.
118
- * @returns The bech32m encoded token identifier for the issuer's token
119
- * @throws {SparkRequestError} If the token identifier cannot be retrieved
120
- * @throws {SparkValidationError} If multiple tokens are found for this issuer
121
- */
116
+ * Retrieves the bech32m encoded token identifier for the issuer's token.
117
+ * @deprecated Use getIssuerTokenIdentifiers() instead. This method will be removed in a future version.
118
+ * @returns The bech32m encoded token identifier for the issuer's token
119
+ * @throws {SparkRequestError} If the token identifier cannot be retrieved
120
+ * @throws {SparkValidationError} If multiple tokens are found for this issuer
121
+ */
122
122
  getIssuerTokenIdentifier(): Promise<Bech32mTokenIdentifier>;
123
123
  /**
124
- * Retrieves the bech32m encoded token identifier for the issuer's token.
125
- * @returns The bech32m encoded token identifier for the issuer's token
126
- * @throws {SparkRequestError} If the token identifier cannot be retrieved
127
- */
124
+ * Retrieves the bech32m encoded token identifier for the issuer's token.
125
+ * @returns The bech32m encoded token identifier for the issuer's token
126
+ * @throws {SparkRequestError} If the token identifier cannot be retrieved
127
+ */
128
128
  getIssuerTokenIdentifiers(): Promise<Bech32mTokenIdentifier[]>;
129
129
  /**
130
- * Create a new token on Spark.
131
- *
132
- * @param params - Object containing token creation parameters.
133
- * @param params.tokenName - The name of the token.
134
- * @param params.tokenTicker - The ticker symbol for the token.
135
- * @param params.decimals - The number of decimal places for the token.
136
- * @param params.isFreezable - Whether the token can be frozen.
137
- * @param [params.maxSupply=0n] - (Optional) The maximum supply of the token. Defaults to <code>0n</code>.
138
- * @param params.extraMetadata - (Optional) This can be used to store additional bytes data to be associated with a token, like image data.
139
- * @param params.returnIdentifierForCreate - (Optional) Whether to return the token identifier in addition to the transaction hash. Defaults to <code>false</code>.
140
- * @returns The transaction hash of the announcement or TokenCreationDetails if `returnIdentifierForCreate` is true.
141
- * @throws {SparkValidationError} If `decimals` is not a safe integer or other validation fails.
142
- * @throws {SparkRequestError} If the announcement transaction cannot be broadcast.
143
- */
130
+ * Create a new token on Spark.
131
+ *
132
+ * @param params - Object containing token creation parameters.
133
+ * @param params.tokenName - The name of the token.
134
+ * @param params.tokenTicker - The ticker symbol for the token.
135
+ * @param params.decimals - The number of decimal places for the token.
136
+ * @param params.isFreezable - Whether the token can be frozen.
137
+ * @param [params.maxSupply=0n] - (Optional) The maximum supply of the token. Defaults to <code>0n</code>.
138
+ * @param params.extraMetadata - (Optional) This can be used to store additional bytes data to be associated with a token, like image data.
139
+ * @param params.returnIdentifierForCreate - (Optional) Whether to return the token identifier in addition to the transaction hash. Defaults to <code>false</code>.
140
+ * @returns The transaction hash of the announcement or TokenCreationDetails if `returnIdentifierForCreate` is true.
141
+ * @throws {SparkValidationError} If `decimals` is not a safe integer or other validation fails.
142
+ * @throws {SparkRequestError} If the announcement transaction cannot be broadcast.
143
+ */
144
144
  createToken(params: {
145
145
  tokenName: string;
146
146
  tokenTicker: string;
@@ -160,21 +160,21 @@ declare abstract class IssuerSparkWallet extends SparkWallet {
160
160
  returnIdentifierForCreate: true;
161
161
  }): Promise<TokenCreationDetails>;
162
162
  /**
163
- * @deprecated Use mintTokens({ tokenAmount, tokenIdentifier }) instead. This method will be removed in a future version.
164
- * @param amount - The amount of tokens to mint
165
- * @returns The transaction ID of the mint operation
166
- * @throws {SparkValidationError} If multiple tokens are found for this issuer
167
- * @throws {SparkValidationError} If no tokens are found for this issuer
168
- */
163
+ * @deprecated Use mintTokens({ tokenAmount, tokenIdentifier }) instead. This method will be removed in a future version.
164
+ * @param amount - The amount of tokens to mint
165
+ * @returns The transaction ID of the mint operation
166
+ * @throws {SparkValidationError} If multiple tokens are found for this issuer
167
+ * @throws {SparkValidationError} If no tokens are found for this issuer
168
+ */
169
169
  mintTokens(amount: bigint): Promise<string>;
170
170
  /**
171
- * Mints new tokens
172
- * @param params - Object containing token minting parameters.
173
- * @param params.tokenAmount - The amount of tokens to mint
174
- * @param params.tokenIdentifier - The bech32m encoded token identifier
175
- * @returns The transaction ID of the mint operation
176
- * @throws {SparkValidationError} If no tokens are found for this issuer
177
- */
171
+ * Mints new tokens
172
+ * @param params - Object containing token minting parameters.
173
+ * @param params.tokenAmount - The amount of tokens to mint
174
+ * @param params.tokenIdentifier - The bech32m encoded token identifier
175
+ * @returns The transaction ID of the mint operation
176
+ * @throws {SparkValidationError} If no tokens are found for this issuer
177
+ */
178
178
  mintTokens({
179
179
  tokenAmount,
180
180
  tokenIdentifier
@@ -183,23 +183,23 @@ declare abstract class IssuerSparkWallet extends SparkWallet {
183
183
  tokenIdentifier: Bech32mTokenIdentifier;
184
184
  }): Promise<string>;
185
185
  /**
186
- * Burns issuer's tokens
187
- * @deprecated Use burnTokens({ tokenAmount, tokenIdentifier, selectedOutputs }) instead. This method will be removed in a future version.
188
- * @param tokenAmount - The amount of tokens to burn
189
- * @param selectedOutputs - Optional array of outputs to use for the burn operation
190
- * @returns The transaction ID of the burn operation
191
- * @throws {SparkValidationError} If multiple tokens are found for this issuer
192
- * @throws {SparkValidationError} If no tokens are found for this issuer
193
- */
186
+ * Burns issuer's tokens
187
+ * @deprecated Use burnTokens({ tokenAmount, tokenIdentifier, selectedOutputs }) instead. This method will be removed in a future version.
188
+ * @param tokenAmount - The amount of tokens to burn
189
+ * @param selectedOutputs - Optional array of outputs to use for the burn operation
190
+ * @returns The transaction ID of the burn operation
191
+ * @throws {SparkValidationError} If multiple tokens are found for this issuer
192
+ * @throws {SparkValidationError} If no tokens are found for this issuer
193
+ */
194
194
  burnTokens(tokenAmount: bigint, selectedOutputs?: OutputWithPreviousTransactionData[]): Promise<string>;
195
195
  /**
196
- * Burns issuer's tokens
197
- * @param params - Object containing token burning parameters.
198
- * @param params.tokenAmount - The amount of tokens to burn
199
- * @param params.tokenIdentifier - The bech32m encoded token identifier
200
- * @param params.selectedOutputs - Optional array of outputs to use for the burn operation
201
- * @returns The transaction ID of the burn operation
202
- */
196
+ * Burns issuer's tokens
197
+ * @param params - Object containing token burning parameters.
198
+ * @param params.tokenAmount - The amount of tokens to burn
199
+ * @param params.tokenIdentifier - The bech32m encoded token identifier
200
+ * @param params.selectedOutputs - Optional array of outputs to use for the burn operation
201
+ * @returns The transaction ID of the burn operation
202
+ */
203
203
  burnTokens({
204
204
  tokenAmount,
205
205
  tokenIdentifier,
@@ -210,24 +210,24 @@ declare abstract class IssuerSparkWallet extends SparkWallet {
210
210
  selectedOutputs?: OutputWithPreviousTransactionData[];
211
211
  }): Promise<string>;
212
212
  /**
213
- * Freezes tokens associated with a specific Spark address.
214
- * @deprecated Use freezeToken({ tokenIdentifier, sparkAddress }) instead. This method will be removed in a future version.
215
- * @param sparkAddress - The Spark address whose tokens should be frozen
216
- * @returns An object containing the IDs of impacted outputs and the total amount of frozen tokens
217
- * @throws {SparkValidationError} If multiple tokens are found for this issuer
218
- * @throws {SparkValidationError} If no tokens are found for this issuer
219
- */
213
+ * Freezes tokens associated with a specific Spark address.
214
+ * @deprecated Use freezeToken({ tokenIdentifier, sparkAddress }) instead. This method will be removed in a future version.
215
+ * @param sparkAddress - The Spark address whose tokens should be frozen
216
+ * @returns An object containing the IDs of impacted outputs and the total amount of frozen tokens
217
+ * @throws {SparkValidationError} If multiple tokens are found for this issuer
218
+ * @throws {SparkValidationError} If no tokens are found for this issuer
219
+ */
220
220
  freezeTokens(sparkAddress: string): Promise<{
221
221
  impactedTokenOutputs: TokenOutputRef[];
222
222
  impactedTokenAmount: bigint;
223
223
  }>;
224
224
  /**
225
- * Freezes tokens associated with a specific Spark address.
226
- * @param params - Object containing token freezing parameters.
227
- * @param params.tokenIdentifier - The bech32m encoded token identifier
228
- * @param params.sparkAddress - The Spark address whose tokens should be frozen
229
- * @returns An object containing the IDs of impacted outputs and the total amount of frozen tokens
230
- */
225
+ * Freezes tokens associated with a specific Spark address.
226
+ * @param params - Object containing token freezing parameters.
227
+ * @param params.tokenIdentifier - The bech32m encoded token identifier
228
+ * @param params.sparkAddress - The Spark address whose tokens should be frozen
229
+ * @returns An object containing the IDs of impacted outputs and the total amount of frozen tokens
230
+ */
231
231
  freezeTokens({
232
232
  tokenIdentifier,
233
233
  sparkAddress
@@ -239,26 +239,26 @@ declare abstract class IssuerSparkWallet extends SparkWallet {
239
239
  impactedTokenAmount: bigint;
240
240
  }>;
241
241
  /**
242
- * Unfreezes previously frozen tokens associated with a specific Spark address.
243
- * @deprecated Use unfreezeToken({ tokenIdentifier, sparkAddress }) instead. This method will be removed in a future version.
244
- * @param sparkAddress - The Spark address whose tokens should be unfrozen
245
- * @returns An object containing the IDs of impacted outputs and the total amount of unfrozen tokens
246
- * @throws {SparkValidationError} If multiple tokens are found for this issuer
247
- * @throws {SparkValidationError} If no tokens are found for this issuer
248
- */
242
+ * Unfreezes previously frozen tokens associated with a specific Spark address.
243
+ * @deprecated Use unfreezeToken({ tokenIdentifier, sparkAddress }) instead. This method will be removed in a future version.
244
+ * @param sparkAddress - The Spark address whose tokens should be unfrozen
245
+ * @returns An object containing the IDs of impacted outputs and the total amount of unfrozen tokens
246
+ * @throws {SparkValidationError} If multiple tokens are found for this issuer
247
+ * @throws {SparkValidationError} If no tokens are found for this issuer
248
+ */
249
249
  unfreezeTokens(sparkAddress: string): Promise<{
250
250
  impactedTokenOutputs: TokenOutputRef[];
251
251
  impactedTokenAmount: bigint;
252
252
  }>;
253
253
  /**
254
- * Unfreezes previously frozen tokens associated with a specific Spark address.
255
- * @param params - Object containing token unfreezing parameters.
256
- * @param params.tokenIdentifier - The bech32m encoded token identifier
257
- * @param params.sparkAddress - The Spark address whose tokens should be unfrozen
258
- * @returns An object containing the IDs of impacted outputs and the total amount of unfrozen tokens
259
- * @throws {SparkValidationError} If multiple tokens are found for this issuer
260
- * @throws {SparkValidationError} If no tokens are found for this issuer
261
- */
254
+ * Unfreezes previously frozen tokens associated with a specific Spark address.
255
+ * @param params - Object containing token unfreezing parameters.
256
+ * @param params.tokenIdentifier - The bech32m encoded token identifier
257
+ * @param params.sparkAddress - The Spark address whose tokens should be unfrozen
258
+ * @returns An object containing the IDs of impacted outputs and the total amount of unfrozen tokens
259
+ * @throws {SparkValidationError} If multiple tokens are found for this issuer
260
+ * @throws {SparkValidationError} If no tokens are found for this issuer
261
+ */
262
262
  unfreezeTokens({
263
263
  tokenIdentifier,
264
264
  sparkAddress
@@ -270,17 +270,17 @@ declare abstract class IssuerSparkWallet extends SparkWallet {
270
270
  impactedTokenAmount: bigint;
271
271
  }>;
272
272
  /**
273
- * Retrieves the distribution information for the issuer's token.
274
- * @throws {SparkError} This feature is not yet supported
275
- */
273
+ * Retrieves the distribution information for the issuer's token.
274
+ * @throws {SparkError} This feature is not yet supported
275
+ */
276
276
  getIssuerTokenDistribution(): Promise<TokenDistribution>;
277
277
  /**
278
- * This validates that the token belongs to this issuer.
279
- * If a token is in the cache, it must belong to this issuer.
280
- * @param tokenIdentifier - The bech32m encoded token identifier
281
- * @throws {SparkValidationError} If the token is not found for this issuer
282
- * @private
283
- */
278
+ * This validates that the token belongs to this issuer.
279
+ * If a token is in the cache, it must belong to this issuer.
280
+ * @param tokenIdentifier - The bech32m encoded token identifier
281
+ * @throws {SparkValidationError} If the token is not found for this issuer
282
+ * @private
283
+ */
284
284
  private validateTokenIssuer;
285
285
  protected getTraceName(methodName: string): string;
286
286
  private wrapIssuerPublicMethod;