@buildonspark/issuer-sdk 0.1.6 → 0.1.7

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.7
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies
8
+ - @buildonspark/spark-sdk@0.5.7
9
+
3
10
  ## 0.1.6
4
11
 
5
12
  ### Patch Changes
@@ -1,7 +1,7 @@
1
- import { Bech32mTokenIdentifier, SparkWallet, ConfigOptions, SparkSigner, WalletConfigService, ConnectionManager } from '@buildonspark/spark-sdk';
2
- export { AggregateFrostParams, ConfigOptions, DefaultSparkSigner, DerivedHDKey, DummyTx, IKeyPackage, KeyDerivation, KeyDerivationType, KeyPair, SignFrostParams, SigningCommitment, SigningCommitmentWithOptionalNonce, SigningNonce, SparkSigner, SplitSecretWithProofsParams, SubtractSplitAndEncryptParams, SubtractSplitAndEncryptResult, UnsafeStatelessSparkSigner, WalletConfig, WalletConfigService } from '@buildonspark/spark-sdk';
3
- import { OutputWithPreviousTransactionData } from '@buildonspark/spark-sdk/proto/spark_token';
1
+ import { AggregateFrostParams, Bech32mTokenIdentifier, ConfigOptions, ConfigOptions as ConfigOptions$1, ConnectionManager, DefaultSparkSigner, DerivedHDKey, DummyTx, IKeyPackage, KeyDerivation, KeyDerivationType, KeyPair, SignFrostParams, SigningCommitment, SigningCommitmentWithOptionalNonce, SigningNonce, SparkSigner, SparkSigner as SparkSigner$1, SparkWallet, SplitSecretWithProofsParams, SubtractSplitAndEncryptParams, SubtractSplitAndEncryptResult, UnsafeStatelessSparkSigner, WalletConfig, WalletConfigService, WalletConfigService as WalletConfigService$1 } from "@buildonspark/spark-sdk";
2
+ import { OutputWithPreviousTransactionData } from "@buildonspark/spark-sdk/proto/spark_token";
4
3
 
4
+ //#region src/issuer-wallet/types.d.ts
5
5
  /**
6
6
  * Token metadata containing essential information about issuer's token.
7
7
  * This is the wallet's internal representation with JavaScript-friendly types.
@@ -24,31 +24,22 @@ import { OutputWithPreviousTransactionData } from '@buildonspark/spark-sdk/proto
24
24
  * ```
25
25
  */
26
26
  type IssuerTokenMetadata = {
27
- /** Raw binary token identifier - This is used to encode the human readable token identifier */
28
- rawTokenIdentifier: Uint8Array;
29
- /** Public key of the token issuer - Same as issuerPublicKey */
30
- tokenPublicKey: string;
31
- /** Human-readable name of the token (e.g., SparkToken)*/
32
- tokenName: string;
33
- /** Short ticker symbol for the token (e.g., "SPK") */
34
- tokenTicker: string;
35
- /** Number of decimal places for token amounts */
36
- decimals: number;
37
- /** Maximum supply of tokens that can ever be minted */
38
- maxSupply: bigint;
39
- /** Whether the token is freezable */
40
- isFreezable: boolean;
41
- /** Extra metadata of the token */
42
- extraMetadata?: Uint8Array;
43
- /** Bech32m encoded token identifier */
44
- bech32mTokenIdentifier: Bech32mTokenIdentifier;
27
+ /** Raw binary token identifier - This is used to encode the human readable token identifier */rawTokenIdentifier: Uint8Array; /** Public key of the token issuer - Same as issuerPublicKey */
28
+ tokenPublicKey: string; /** Human-readable name of the token (e.g., SparkToken)*/
29
+ tokenName: string; /** Short ticker symbol for the token (e.g., "SPK") */
30
+ tokenTicker: string; /** Number of decimal places for token amounts */
31
+ decimals: number; /** Maximum supply of tokens that can ever be minted */
32
+ maxSupply: bigint; /** Whether the token is freezable */
33
+ isFreezable: boolean; /** Extra metadata of the token */
34
+ extraMetadata?: Uint8Array; /** Bech32m encoded token identifier */
35
+ bech32mTokenIdentifier: Bech32mTokenIdentifier;
45
36
  };
46
37
  interface TokenDistribution {
47
- totalCirculatingSupply: bigint;
48
- totalIssued: bigint;
49
- totalBurned: bigint;
50
- numHoldingAddress: number;
51
- numConfirmedTransactions: bigint;
38
+ totalCirculatingSupply: bigint;
39
+ totalIssued: bigint;
40
+ totalBurned: bigint;
41
+ numHoldingAddress: number;
42
+ numConfirmedTransactions: bigint;
52
43
  }
53
44
  /**
54
45
  * Details of a token creation.
@@ -65,225 +56,240 @@ interface TokenDistribution {
65
56
  * ```
66
57
  */
67
58
  interface TokenCreationDetails {
68
- /** Bech32m encoded token identifier */
69
- tokenIdentifier: Bech32mTokenIdentifier;
70
- /** Transaction hash of the announcement */
71
- transactionHash: string;
59
+ /** Bech32m encoded token identifier */
60
+ tokenIdentifier: Bech32mTokenIdentifier;
61
+ /** Transaction hash of the announcement */
62
+ transactionHash: string;
72
63
  }
73
-
64
+ //#endregion
65
+ //#region src/issuer-wallet/issuer-spark-wallet.d.ts
74
66
  /**
75
67
  * Represents a Spark wallet with minting capabilities.
76
68
  * This class extends the base SparkWallet with additional functionality for token minting,
77
69
  * burning, and freezing operations.
78
70
  */
79
71
  declare abstract class IssuerSparkWallet extends SparkWallet {
80
- private issuerTokenTransactionService;
81
- private tokenFreezeService;
82
- protected tracerId: string;
83
- /**
84
- * Initializes a new IssuerSparkWallet instance.
85
- * Inherits the generic static initialize from the base class.
86
- */
87
- constructor(configOptions?: ConfigOptions, signer?: SparkSigner);
88
- /**
89
- * Gets the token balance for the issuer's token.
90
- * @deprecated Use getIssuerTokenBalances() instead. This method will be removed in a future version.
91
- * @returns An object containing the token balance as a bigint
92
- *
93
- * @throws {SparkValidationError} If multiple tokens are found for this issuer
94
- */
95
- getIssuerTokenBalance(): Promise<{
96
- tokenIdentifier: Bech32mTokenIdentifier | undefined;
97
- balance: bigint;
98
- }>;
99
- /**
100
- * Gets the token balances for the tokens that were issued by this user.
101
- * @returns An array of objects containing the token identifier and balance
102
- */
103
- getIssuerTokenBalances(): Promise<{
104
- tokenIdentifier: Bech32mTokenIdentifier | undefined;
105
- balance: bigint;
106
- }[]>;
107
- /**
108
- * Retrieves information about the issuer's token.
109
- * @deprecated Use getIssuerTokensMetadata() instead. This method will be removed in a future version.
110
- * @returns An object containing token information including public key, name, symbol, decimals, max supply, freeze status, and extra metadata
111
- * @throws {SparkRequestError} If the token metadata cannot be retrieved
112
- * @throws {SparkValidationError} If multiple tokens are found for this issuer
113
- */
114
- getIssuerTokenMetadata(): Promise<IssuerTokenMetadata>;
115
- /**
116
- * Retrieves information about the tokens that were issued by this user.
117
- * @param tokenIdentifiers - Optional array of specific token identifiers to fetch.
118
- * If omitted, all tokens for this issuer are fetched.
119
- * @returns An array of objects containing token information including public key, name, symbol, decimals, max supply, freeze status, and extra metadata
120
- * @throws {SparkRequestError} If the token metadata cannot be retrieved
121
- */
122
- getIssuerTokensMetadata(tokenIdentifiers?: Bech32mTokenIdentifier[]): Promise<IssuerTokenMetadata[]>;
123
- /**
124
- * Retrieves the bech32m encoded token identifier for the issuer's token.
125
- * @deprecated Use getIssuerTokenIdentifiers() instead. This method will be removed in a future version.
126
- * @returns The bech32m encoded token identifier for the issuer's token
127
- * @throws {SparkRequestError} If the token identifier cannot be retrieved
128
- * @throws {SparkValidationError} If multiple tokens are found for this issuer
129
- */
130
- getIssuerTokenIdentifier(): Promise<Bech32mTokenIdentifier>;
131
- /**
132
- * Retrieves the bech32m encoded token identifier for the issuer's token.
133
- * @returns The bech32m encoded token identifier for the issuer's token
134
- * @throws {SparkRequestError} If the token identifier cannot be retrieved
135
- */
136
- getIssuerTokenIdentifiers(): Promise<Bech32mTokenIdentifier[]>;
137
- /**
138
- * Create a new token on Spark.
139
- *
140
- * @param params - Object containing token creation parameters.
141
- * @param params.tokenName - The name of the token.
142
- * @param params.tokenTicker - The ticker symbol for the token.
143
- * @param params.decimals - The number of decimal places for the token.
144
- * @param params.isFreezable - Whether the token can be frozen.
145
- * @param [params.maxSupply=0n] - (Optional) The maximum supply of the token. Defaults to <code>0n</code>.
146
- * @param params.extraMetadata - (Optional) This can be used to store additional bytes data to be associated with a token, like image data.
147
- * @param params.returnIdentifierForCreate - (Optional) Whether to return the token identifier in addition to the transaction hash. Defaults to <code>false</code>.
148
- * @returns The transaction hash of the announcement or TokenCreationDetails if `returnIdentifierForCreate` is true.
149
- * @throws {SparkValidationError} If `decimals` is not a safe integer or other validation fails.
150
- * @throws {SparkRequestError} If the announcement transaction cannot be broadcast.
151
- */
152
- createToken(params: {
153
- tokenName: string;
154
- tokenTicker: string;
155
- decimals: number;
156
- isFreezable: boolean;
157
- maxSupply?: bigint;
158
- extraMetadata?: Uint8Array;
159
- returnIdentifierForCreate?: false;
160
- }): Promise<string>;
161
- createToken(params: {
162
- tokenName: string;
163
- tokenTicker: string;
164
- decimals: number;
165
- isFreezable: boolean;
166
- maxSupply?: bigint;
167
- extraMetadata?: Uint8Array;
168
- returnIdentifierForCreate: true;
169
- }): Promise<TokenCreationDetails>;
170
- /**
171
- * @deprecated Use mintTokens({ tokenAmount, tokenIdentifier }) instead. This method will be removed in a future version.
172
- * @param amount - The amount of tokens to mint
173
- * @returns The transaction ID of the mint operation
174
- * @throws {SparkValidationError} If multiple tokens are found for this issuer
175
- * @throws {SparkValidationError} If no tokens are found for this issuer
176
- */
177
- mintTokens(amount: bigint): Promise<string>;
178
- /**
179
- * Mints new tokens
180
- * @param params - Object containing token minting parameters.
181
- * @param params.tokenAmount - The amount of tokens to mint
182
- * @param params.tokenIdentifier - The bech32m encoded token identifier
183
- * @returns The transaction ID of the mint operation
184
- * @throws {SparkValidationError} If no tokens are found for this issuer
185
- */
186
- mintTokens({ tokenAmount, tokenIdentifier, }: {
187
- tokenAmount: bigint;
188
- tokenIdentifier: Bech32mTokenIdentifier;
189
- }): Promise<string>;
190
- /**
191
- * Burns issuer's tokens
192
- * @deprecated Use burnTokens({ tokenAmount, tokenIdentifier, selectedOutputs }) instead. This method will be removed in a future version.
193
- * @param tokenAmount - The amount of tokens to burn
194
- * @param selectedOutputs - Optional array of outputs to use for the burn operation
195
- * @returns The transaction ID of the burn operation
196
- * @throws {SparkValidationError} If multiple tokens are found for this issuer
197
- * @throws {SparkValidationError} If no tokens are found for this issuer
198
- */
199
- burnTokens(tokenAmount: bigint, selectedOutputs?: OutputWithPreviousTransactionData[]): Promise<string>;
200
- /**
201
- * Burns issuer's tokens
202
- * @param params - Object containing token burning parameters.
203
- * @param params.tokenAmount - The amount of tokens to burn
204
- * @param params.tokenIdentifier - The bech32m encoded token identifier
205
- * @param params.selectedOutputs - Optional array of outputs to use for the burn operation
206
- * @returns The transaction ID of the burn operation
207
- */
208
- burnTokens({ tokenAmount, tokenIdentifier, selectedOutputs, }: {
209
- tokenAmount: bigint;
210
- tokenIdentifier: Bech32mTokenIdentifier;
211
- selectedOutputs?: OutputWithPreviousTransactionData[];
212
- }): Promise<string>;
213
- /**
214
- * Freezes tokens associated with a specific Spark address.
215
- * @deprecated Use freezeToken({ tokenIdentifier, sparkAddress }) instead. This method will be removed in a future version.
216
- * @param sparkAddress - The Spark address whose tokens should be frozen
217
- * @returns An object containing the IDs of impacted outputs and the total amount of frozen tokens
218
- * @throws {SparkValidationError} If multiple tokens are found for this issuer
219
- * @throws {SparkValidationError} If no tokens are found for this issuer
220
- */
221
- freezeTokens(sparkAddress: string): Promise<{
222
- impactedOutputIds: string[];
223
- impactedTokenAmount: bigint;
224
- }>;
225
- /**
226
- * Freezes tokens associated with a specific Spark address.
227
- * @param params - Object containing token freezing parameters.
228
- * @param params.tokenIdentifier - The bech32m encoded token identifier
229
- * @param params.sparkAddress - The Spark address whose tokens should be frozen
230
- * @returns An object containing the IDs of impacted outputs and the total amount of frozen tokens
231
- */
232
- freezeTokens({ tokenIdentifier, sparkAddress, }: {
233
- tokenIdentifier: Bech32mTokenIdentifier;
234
- sparkAddress: string;
235
- }): Promise<{
236
- impactedOutputIds: string[];
237
- impactedTokenAmount: bigint;
238
- }>;
239
- /**
240
- * Unfreezes previously frozen tokens associated with a specific Spark address.
241
- * @deprecated Use unfreezeToken({ tokenIdentifier, sparkAddress }) instead. This method will be removed in a future version.
242
- * @param sparkAddress - The Spark address whose tokens should be unfrozen
243
- * @returns An object containing the IDs of impacted outputs and the total amount of unfrozen tokens
244
- * @throws {SparkValidationError} If multiple tokens are found for this issuer
245
- * @throws {SparkValidationError} If no tokens are found for this issuer
246
- */
247
- unfreezeTokens(sparkAddress: string): Promise<{
248
- impactedOutputIds: string[];
249
- impactedTokenAmount: bigint;
250
- }>;
251
- /**
252
- * Unfreezes previously frozen tokens associated with a specific Spark address.
253
- * @param params - Object containing token unfreezing parameters.
254
- * @param params.tokenIdentifier - The bech32m encoded token identifier
255
- * @param params.sparkAddress - The Spark address whose tokens should be unfrozen
256
- * @returns An object containing the IDs of impacted outputs and the total amount of unfrozen tokens
257
- * @throws {SparkValidationError} If multiple tokens are found for this issuer
258
- * @throws {SparkValidationError} If no tokens are found for this issuer
259
- */
260
- unfreezeTokens({ tokenIdentifier, sparkAddress, }: {
261
- tokenIdentifier: Bech32mTokenIdentifier;
262
- sparkAddress: string;
263
- }): Promise<{
264
- impactedOutputIds: string[];
265
- impactedTokenAmount: bigint;
266
- }>;
267
- /**
268
- * Retrieves the distribution information for the issuer's token.
269
- * @throws {SparkError} This feature is not yet supported
270
- */
271
- getIssuerTokenDistribution(): Promise<TokenDistribution>;
272
- /**
273
- * This validates that the token belongs to this issuer.
274
- * If a token is in the cache, it must belong to this issuer.
275
- * @param tokenIdentifier - The bech32m encoded token identifier
276
- * @throws {SparkValidationError} If the token is not found for this issuer
277
- * @private
278
- */
279
- private validateTokenIssuer;
280
- protected getTraceName(methodName: string): string;
281
- private wrapIssuerPublicMethod;
282
- private wrapIssuerSparkWalletMethods;
72
+ private issuerTokenTransactionService;
73
+ private tokenFreezeService;
74
+ protected tracerId: string;
75
+ /**
76
+ * Initializes a new IssuerSparkWallet instance.
77
+ * Inherits the generic static initialize from the base class.
78
+ */
79
+ constructor(configOptions?: ConfigOptions$1, signer?: SparkSigner$1);
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
+ */
87
+ getIssuerTokenBalance(): Promise<{
88
+ tokenIdentifier: Bech32mTokenIdentifier | undefined;
89
+ balance: bigint;
90
+ }>;
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
+ */
95
+ getIssuerTokenBalances(): Promise<{
96
+ tokenIdentifier: Bech32mTokenIdentifier | undefined;
97
+ balance: bigint;
98
+ }[]>;
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
+ */
106
+ getIssuerTokenMetadata(): Promise<IssuerTokenMetadata>;
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
+ */
114
+ getIssuerTokensMetadata(tokenIdentifiers?: Bech32mTokenIdentifier[]): Promise<IssuerTokenMetadata[]>;
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
+ */
122
+ getIssuerTokenIdentifier(): Promise<Bech32mTokenIdentifier>;
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
+ */
128
+ getIssuerTokenIdentifiers(): Promise<Bech32mTokenIdentifier[]>;
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
+ */
144
+ createToken(params: {
145
+ tokenName: string;
146
+ tokenTicker: string;
147
+ decimals: number;
148
+ isFreezable: boolean;
149
+ maxSupply?: bigint;
150
+ extraMetadata?: Uint8Array;
151
+ returnIdentifierForCreate?: false;
152
+ }): Promise<string>;
153
+ createToken(params: {
154
+ tokenName: string;
155
+ tokenTicker: string;
156
+ decimals: number;
157
+ isFreezable: boolean;
158
+ maxSupply?: bigint;
159
+ extraMetadata?: Uint8Array;
160
+ returnIdentifierForCreate: true;
161
+ }): Promise<TokenCreationDetails>;
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
+ */
169
+ mintTokens(amount: bigint): Promise<string>;
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
+ */
178
+ mintTokens({
179
+ tokenAmount,
180
+ tokenIdentifier
181
+ }: {
182
+ tokenAmount: bigint;
183
+ tokenIdentifier: Bech32mTokenIdentifier;
184
+ }): Promise<string>;
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
+ */
194
+ burnTokens(tokenAmount: bigint, selectedOutputs?: OutputWithPreviousTransactionData[]): Promise<string>;
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
+ */
203
+ burnTokens({
204
+ tokenAmount,
205
+ tokenIdentifier,
206
+ selectedOutputs
207
+ }: {
208
+ tokenAmount: bigint;
209
+ tokenIdentifier: Bech32mTokenIdentifier;
210
+ selectedOutputs?: OutputWithPreviousTransactionData[];
211
+ }): Promise<string>;
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
+ */
220
+ freezeTokens(sparkAddress: string): Promise<{
221
+ impactedOutputIds: string[];
222
+ impactedTokenAmount: bigint;
223
+ }>;
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
+ */
231
+ freezeTokens({
232
+ tokenIdentifier,
233
+ sparkAddress
234
+ }: {
235
+ tokenIdentifier: Bech32mTokenIdentifier;
236
+ sparkAddress: string;
237
+ }): Promise<{
238
+ impactedOutputIds: string[];
239
+ impactedTokenAmount: bigint;
240
+ }>;
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
+ */
249
+ unfreezeTokens(sparkAddress: string): Promise<{
250
+ impactedOutputIds: string[];
251
+ impactedTokenAmount: bigint;
252
+ }>;
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
+ */
262
+ unfreezeTokens({
263
+ tokenIdentifier,
264
+ sparkAddress
265
+ }: {
266
+ tokenIdentifier: Bech32mTokenIdentifier;
267
+ sparkAddress: string;
268
+ }): Promise<{
269
+ impactedOutputIds: string[];
270
+ impactedTokenAmount: bigint;
271
+ }>;
272
+ /**
273
+ * Retrieves the distribution information for the issuer's token.
274
+ * @throws {SparkError} This feature is not yet supported
275
+ */
276
+ getIssuerTokenDistribution(): Promise<TokenDistribution>;
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
+ */
284
+ private validateTokenIssuer;
285
+ protected getTraceName(methodName: string): string;
286
+ private wrapIssuerPublicMethod;
287
+ private wrapIssuerSparkWalletMethods;
283
288
  }
284
-
289
+ //#endregion
290
+ //#region src/issuer-wallet/issuer-spark-wallet.browser.d.ts
285
291
  declare class IssuerSparkWalletBrowser extends IssuerSparkWallet {
286
- protected buildConnectionManager(config: WalletConfigService): ConnectionManager;
292
+ protected buildConnectionManager(config: WalletConfigService$1): ConnectionManager;
287
293
  }
288
-
289
- export { IssuerSparkWalletBrowser as IssuerSparkWallet, type IssuerTokenMetadata, type TokenCreationDetails, type TokenDistribution };
294
+ //#endregion
295
+ export { type AggregateFrostParams, type ConfigOptions, DefaultSparkSigner, type DerivedHDKey, type DummyTx, type IKeyPackage, IssuerSparkWalletBrowser as IssuerSparkWallet, IssuerTokenMetadata, type KeyDerivation, type KeyDerivationType, type KeyPair, type SignFrostParams, type SigningCommitment, type SigningCommitmentWithOptionalNonce, type SigningNonce, type SparkSigner, type SplitSecretWithProofsParams, type SubtractSplitAndEncryptParams, type SubtractSplitAndEncryptResult, TokenCreationDetails, TokenDistribution, UnsafeStatelessSparkSigner, WalletConfig, type WalletConfigService };