@buildonspark/issuer-sdk 0.1.31 → 0.1.33

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,19 @@
1
1
  # @buildonspark/issuer-sdk
2
2
 
3
+ ## 0.1.33
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies
8
+ - @buildonspark/spark-sdk@0.7.15
9
+
10
+ ## 0.1.32
11
+
12
+ ### Patch Changes
13
+
14
+ - Updated dependencies
15
+ - @buildonspark/spark-sdk@0.7.14
16
+
3
17
  ## 0.1.31
4
18
 
5
19
  ### Patch Changes
@@ -71,7 +71,6 @@ interface TokenCreationDetails {
71
71
  declare abstract class IssuerSparkWallet extends SparkWallet {
72
72
  private issuerTokenTransactionService;
73
73
  private tokenFreezeService;
74
- protected tracerId: string;
75
74
  /**
76
75
  * Initializes a new IssuerSparkWallet instance.
77
76
  * Inherits the generic static initialize from the base class.
@@ -282,7 +281,6 @@ declare abstract class IssuerSparkWallet extends SparkWallet {
282
281
  * @private
283
282
  */
284
283
  private validateTokenIssuer;
285
- protected getTraceName(methodName: string): string;
286
284
  private wrapIssuerPublicMethod;
287
285
  private wrapIssuerSparkWalletMethods;
288
286
  }
@@ -264,7 +264,6 @@ const BURN_ADDRESS = "02".repeat(33);
264
264
  var IssuerSparkWallet = class extends SparkWallet {
265
265
  issuerTokenTransactionService;
266
266
  tokenFreezeService;
267
- tracerId = "issuer-sdk";
268
267
  /**
269
268
  * Initializes a new IssuerSparkWallet instance.
270
269
  * Inherits the generic static initialize from the base class.
@@ -611,9 +610,6 @@ var IssuerSparkWallet = class extends SparkWallet {
611
610
  });
612
611
  }
613
612
  }
614
- getTraceName(methodName) {
615
- return `IssuerSparkWallet.${methodName}`;
616
- }
617
613
  wrapIssuerPublicMethod(methodName) {
618
614
  const original = this[methodName];
619
615
  if (typeof original !== "function") throw new Error(`Method ${methodName} is not a function on IssuerSparkWallet.`);
@@ -265,7 +265,6 @@ const BURN_ADDRESS = "02".repeat(33);
265
265
  var IssuerSparkWallet = class extends _buildonspark_spark_sdk.SparkWallet {
266
266
  issuerTokenTransactionService;
267
267
  tokenFreezeService;
268
- tracerId = "issuer-sdk";
269
268
  /**
270
269
  * Initializes a new IssuerSparkWallet instance.
271
270
  * Inherits the generic static initialize from the base class.
@@ -612,9 +611,6 @@ var IssuerSparkWallet = class extends _buildonspark_spark_sdk.SparkWallet {
612
611
  });
613
612
  }
614
613
  }
615
- getTraceName(methodName) {
616
- return `IssuerSparkWallet.${methodName}`;
617
- }
618
614
  wrapIssuerPublicMethod(methodName) {
619
615
  const original = this[methodName];
620
616
  if (typeof original !== "function") throw new Error(`Method ${methodName} is not a function on IssuerSparkWallet.`);
@@ -646,12 +642,6 @@ var IssuerSparkWalletNodeJS = class extends IssuerSparkWallet {
646
642
  buildConnectionManager(config) {
647
643
  return new _buildonspark_spark_sdk.ConnectionManager(config);
648
644
  }
649
- initializeTracerEnv({ spanProcessors, traceUrls }) {
650
- (0, _buildonspark_spark_sdk.initializeTracerEnv)({
651
- spanProcessors,
652
- traceUrls
653
- });
654
- }
655
645
  };
656
646
 
657
647
  //#endregion
@@ -71,7 +71,6 @@ interface TokenCreationDetails {
71
71
  declare abstract class IssuerSparkWallet extends SparkWallet {
72
72
  private issuerTokenTransactionService;
73
73
  private tokenFreezeService;
74
- protected tracerId: string;
75
74
  /**
76
75
  * Initializes a new IssuerSparkWallet instance.
77
76
  * Inherits the generic static initialize from the base class.
@@ -282,7 +281,6 @@ declare abstract class IssuerSparkWallet extends SparkWallet {
282
281
  * @private
283
282
  */
284
283
  private validateTokenIssuer;
285
- protected getTraceName(methodName: string): string;
286
284
  private wrapIssuerPublicMethod;
287
285
  private wrapIssuerSparkWalletMethods;
288
286
  }
@@ -290,10 +288,6 @@ declare abstract class IssuerSparkWallet extends SparkWallet {
290
288
  //#region src/issuer-wallet/issuer-spark-wallet.node.d.ts
291
289
  declare class IssuerSparkWalletNodeJS extends IssuerSparkWallet {
292
290
  protected buildConnectionManager(config: WalletConfigService$1): ConnectionManager;
293
- protected initializeTracerEnv({
294
- spanProcessors,
295
- traceUrls
296
- }: Parameters<IssuerSparkWallet["initializeTracerEnv"]>[0]): void;
297
291
  }
298
292
  //#endregion
299
293
  export { type AggregateFrostParams, type ConfigOptions, DefaultSparkSigner, type DerivedHDKey, type DummyTx, type IKeyPackage, IssuerSparkWalletNodeJS 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 };
@@ -71,7 +71,6 @@ interface TokenCreationDetails {
71
71
  declare abstract class IssuerSparkWallet extends SparkWallet {
72
72
  private issuerTokenTransactionService;
73
73
  private tokenFreezeService;
74
- protected tracerId: string;
75
74
  /**
76
75
  * Initializes a new IssuerSparkWallet instance.
77
76
  * Inherits the generic static initialize from the base class.
@@ -282,7 +281,6 @@ declare abstract class IssuerSparkWallet extends SparkWallet {
282
281
  * @private
283
282
  */
284
283
  private validateTokenIssuer;
285
- protected getTraceName(methodName: string): string;
286
284
  private wrapIssuerPublicMethod;
287
285
  private wrapIssuerSparkWalletMethods;
288
286
  }
@@ -290,10 +288,6 @@ declare abstract class IssuerSparkWallet extends SparkWallet {
290
288
  //#region src/issuer-wallet/issuer-spark-wallet.node.d.ts
291
289
  declare class IssuerSparkWalletNodeJS extends IssuerSparkWallet {
292
290
  protected buildConnectionManager(config: WalletConfigService$1): ConnectionManager;
293
- protected initializeTracerEnv({
294
- spanProcessors,
295
- traceUrls
296
- }: Parameters<IssuerSparkWallet["initializeTracerEnv"]>[0]): void;
297
291
  }
298
292
  //#endregion
299
293
  export { type AggregateFrostParams, type ConfigOptions, DefaultSparkSigner, type DerivedHDKey, type DummyTx, type IKeyPackage, IssuerSparkWalletNodeJS 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 };
@@ -1,4 +1,4 @@
1
- import { ConnectionManager, DefaultSparkSigner, SparkError, SparkRequestError, SparkValidationError, SparkWallet, TokenTransactionService, UnsafeStatelessSparkSigner, WalletConfig, collectResponses, decodeBech32mTokenIdentifier, decodeSparkAddress, encodeBech32mTokenIdentifier, encodeSparkAddress, hashFinalTokenTransaction, initializeTracerEnv } from "@buildonspark/spark-sdk";
1
+ import { ConnectionManager, DefaultSparkSigner, SparkError, SparkRequestError, SparkValidationError, SparkWallet, TokenTransactionService, UnsafeStatelessSparkSigner, WalletConfig, collectResponses, decodeBech32mTokenIdentifier, decodeSparkAddress, encodeBech32mTokenIdentifier, encodeSparkAddress, hashFinalTokenTransaction } from "@buildonspark/spark-sdk";
2
2
  import { bytesToHex, bytesToNumberBE, hexToBytes, numberToBytesBE } from "@noble/curves/utils";
3
3
  import { sha256 } from "@scure/btc-signer/utils";
4
4
 
@@ -264,7 +264,6 @@ const BURN_ADDRESS = "02".repeat(33);
264
264
  var IssuerSparkWallet = class extends SparkWallet {
265
265
  issuerTokenTransactionService;
266
266
  tokenFreezeService;
267
- tracerId = "issuer-sdk";
268
267
  /**
269
268
  * Initializes a new IssuerSparkWallet instance.
270
269
  * Inherits the generic static initialize from the base class.
@@ -611,9 +610,6 @@ var IssuerSparkWallet = class extends SparkWallet {
611
610
  });
612
611
  }
613
612
  }
614
- getTraceName(methodName) {
615
- return `IssuerSparkWallet.${methodName}`;
616
- }
617
613
  wrapIssuerPublicMethod(methodName) {
618
614
  const original = this[methodName];
619
615
  if (typeof original !== "function") throw new Error(`Method ${methodName} is not a function on IssuerSparkWallet.`);
@@ -645,12 +641,6 @@ var IssuerSparkWalletNodeJS = class extends IssuerSparkWallet {
645
641
  buildConnectionManager(config) {
646
642
  return new ConnectionManager(config);
647
643
  }
648
- initializeTracerEnv({ spanProcessors, traceUrls }) {
649
- initializeTracerEnv({
650
- spanProcessors,
651
- traceUrls
652
- });
653
- }
654
644
  };
655
645
 
656
646
  //#endregion
@@ -314,7 +314,6 @@ var IssuerSparkWallet = class extends _buildonspark_spark_sdk.SparkWallet {
314
314
  super(configOptions, signer);
315
315
  _defineProperty(this, "issuerTokenTransactionService", void 0);
316
316
  _defineProperty(this, "tokenFreezeService", void 0);
317
- _defineProperty(this, "tracerId", "issuer-sdk");
318
317
  this.issuerTokenTransactionService = new IssuerTokenTransactionService(this.config, this.connectionManager);
319
318
  this.tokenFreezeService = new TokenFreezeService(this.config, this.connectionManager);
320
319
  this.wrapIssuerSparkWalletMethods();
@@ -655,9 +654,6 @@ var IssuerSparkWallet = class extends _buildonspark_spark_sdk.SparkWallet {
655
654
  });
656
655
  }
657
656
  }
658
- getTraceName(methodName) {
659
- return `IssuerSparkWallet.${methodName}`;
660
- }
661
657
  wrapIssuerPublicMethod(methodName) {
662
658
  const original = this[methodName];
663
659
  if (typeof original !== "function") throw new Error(`Method ${methodName} is not a function on IssuerSparkWallet.`);
@@ -72,7 +72,6 @@ interface TokenCreationDetails {
72
72
  declare abstract class IssuerSparkWallet extends SparkWallet {
73
73
  private issuerTokenTransactionService;
74
74
  private tokenFreezeService;
75
- protected tracerId: string;
76
75
  /**
77
76
  * Initializes a new IssuerSparkWallet instance.
78
77
  * Inherits the generic static initialize from the base class.
@@ -283,7 +282,6 @@ declare abstract class IssuerSparkWallet extends SparkWallet {
283
282
  * @private
284
283
  */
285
284
  private validateTokenIssuer;
286
- protected getTraceName(methodName: string): string;
287
285
  private wrapIssuerPublicMethod;
288
286
  private wrapIssuerSparkWalletMethods;
289
287
  }
@@ -72,7 +72,6 @@ interface TokenCreationDetails {
72
72
  declare abstract class IssuerSparkWallet extends SparkWallet {
73
73
  private issuerTokenTransactionService;
74
74
  private tokenFreezeService;
75
- protected tracerId: string;
76
75
  /**
77
76
  * Initializes a new IssuerSparkWallet instance.
78
77
  * Inherits the generic static initialize from the base class.
@@ -283,7 +282,6 @@ declare abstract class IssuerSparkWallet extends SparkWallet {
283
282
  * @private
284
283
  */
285
284
  private validateTokenIssuer;
286
- protected getTraceName(methodName: string): string;
287
285
  private wrapIssuerPublicMethod;
288
286
  private wrapIssuerSparkWalletMethods;
289
287
  }
@@ -313,7 +313,6 @@ var IssuerSparkWallet = class extends SparkWallet {
313
313
  super(configOptions, signer);
314
314
  _defineProperty(this, "issuerTokenTransactionService", void 0);
315
315
  _defineProperty(this, "tokenFreezeService", void 0);
316
- _defineProperty(this, "tracerId", "issuer-sdk");
317
316
  this.issuerTokenTransactionService = new IssuerTokenTransactionService(this.config, this.connectionManager);
318
317
  this.tokenFreezeService = new TokenFreezeService(this.config, this.connectionManager);
319
318
  this.wrapIssuerSparkWalletMethods();
@@ -654,9 +653,6 @@ var IssuerSparkWallet = class extends SparkWallet {
654
653
  });
655
654
  }
656
655
  }
657
- getTraceName(methodName) {
658
- return `IssuerSparkWallet.${methodName}`;
659
- }
660
656
  wrapIssuerPublicMethod(methodName) {
661
657
  const original = this[methodName];
662
658
  if (typeof original !== "function") throw new Error(`Method ${methodName} is not a function on IssuerSparkWallet.`);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@buildonspark/issuer-sdk",
3
- "version": "0.1.31",
3
+ "version": "0.1.33",
4
4
  "description": "Spark Issuer SDK for token issuance",
5
5
  "license": "Apache-2.0",
6
6
  "keywords": [
@@ -82,7 +82,7 @@
82
82
  "types": "tsc"
83
83
  },
84
84
  "dependencies": {
85
- "@buildonspark/spark-sdk": "0.7.13",
85
+ "@buildonspark/spark-sdk": "0.7.15",
86
86
  "@noble/curves": "^1.9.7",
87
87
  "@scure/btc-signer": "^1.5.0",
88
88
  "buffer": "^6.0.3"
@@ -1,6 +1,5 @@
1
1
  import { IssuerSparkWallet as BaseIssuerSparkWallet } from "./issuer-spark-wallet.js";
2
2
  import {
3
- initializeTracerEnv as initializeTracerEnvNodeJS,
4
3
  ConnectionManager,
5
4
  type WalletConfigService,
6
5
  } from "@buildonspark/spark-sdk";
@@ -9,13 +8,6 @@ export class IssuerSparkWalletNodeJS extends BaseIssuerSparkWallet {
9
8
  protected buildConnectionManager(config: WalletConfigService) {
10
9
  return new ConnectionManager(config);
11
10
  }
12
-
13
- protected initializeTracerEnv({
14
- spanProcessors,
15
- traceUrls,
16
- }: Parameters<BaseIssuerSparkWallet["initializeTracerEnv"]>[0]) {
17
- initializeTracerEnvNodeJS({ spanProcessors, traceUrls });
18
- }
19
11
  }
20
12
 
21
13
  export { IssuerSparkWalletNodeJS as IssuerSparkWallet };
@@ -36,7 +36,6 @@ const BURN_ADDRESS = "02".repeat(33);
36
36
  export abstract class IssuerSparkWallet extends SparkWallet {
37
37
  private issuerTokenTransactionService: IssuerTokenTransactionService;
38
38
  private tokenFreezeService: TokenFreezeService;
39
- protected tracerId = "issuer-sdk";
40
39
 
41
40
  /**
42
41
  * Initializes a new IssuerSparkWallet instance.
@@ -877,10 +876,6 @@ export abstract class IssuerSparkWallet extends SparkWallet {
877
876
  }
878
877
  }
879
878
 
880
- protected getTraceName(methodName: string) {
881
- return `IssuerSparkWallet.${methodName}`;
882
- }
883
-
884
879
  private wrapIssuerPublicMethod<M extends keyof IssuerSparkWallet>(
885
880
  methodName: M,
886
881
  ) {
@@ -1,6 +1,6 @@
1
1
  import { jest } from "@jest/globals";
2
2
  import { IssuerSparkWalletTesting } from "../utils/issuer-test-wallet.js";
3
- import { TEST_CONFIGS } from "./test-configs.js";
3
+ import { TEST_CONFIGS_WITH_BINDINGS } from "./test-configs.js";
4
4
  import { IssuerSparkWallet } from "../../issuer-wallet/issuer-spark-wallet.js";
5
5
  import {
6
6
  burnSingleIssuerToken,
@@ -54,7 +54,7 @@ const setupMultipleTokens = async (issuerWallet: IssuerSparkWallet) => {
54
54
  };
55
55
  };
56
56
 
57
- describe.each(TEST_CONFIGS)(
57
+ describe.each(TEST_CONFIGS_WITH_BINDINGS)(
58
58
  "multi token issuer tests - $name",
59
59
  ({ name, config }) => {
60
60
  jest.setTimeout(80000);
@@ -30,9 +30,25 @@ export const TOKENS_ECDSA_V3_CONFIG: Required<ConfigOptions> = {
30
30
  tokenTransactionVersion: "V3",
31
31
  };
32
32
 
33
+ export const TOKENS_SCHNORR_V3_BINDINGS_CONFIG: Required<ConfigOptions> = {
34
+ ...TOKENS_SCHNORR_V3_CONFIG,
35
+ useTokenPrimitivesBindings: true,
36
+ };
37
+
38
+ export const TOKENS_ECDSA_V3_BINDINGS_CONFIG: Required<ConfigOptions> = {
39
+ ...TOKENS_ECDSA_V3_CONFIG,
40
+ useTokenPrimitivesBindings: true,
41
+ };
42
+
33
43
  export const TEST_CONFIGS = [
34
44
  { name: "E2", config: TOKENS_ECDSA_V2_CONFIG },
35
45
  { name: "E3", config: TOKENS_ECDSA_V3_CONFIG },
36
46
  { name: "S2", config: TOKENS_SCHNORR_V2_CONFIG },
37
47
  { name: "S3", config: TOKENS_SCHNORR_V3_CONFIG },
38
48
  ];
49
+
50
+ export const TEST_CONFIGS_WITH_BINDINGS = [
51
+ ...TEST_CONFIGS,
52
+ { name: "E3B", config: TOKENS_ECDSA_V3_BINDINGS_CONFIG },
53
+ { name: "S3B", config: TOKENS_SCHNORR_V3_BINDINGS_CONFIG },
54
+ ];
@@ -14,9 +14,9 @@ import {
14
14
  getSingleIssuerTokenIdentifier,
15
15
  mintSingleIssuerToken,
16
16
  } from "../utils/multi-token-utils.js";
17
- import { TEST_CONFIGS } from "./test-configs.js";
17
+ import { TEST_CONFIGS_WITH_BINDINGS } from "./test-configs.js";
18
18
 
19
- describe.each(TEST_CONFIGS)(
19
+ describe.each(TEST_CONFIGS_WITH_BINDINGS)(
20
20
  "token invoice tests - $name",
21
21
  ({ name, config }) => {
22
22
  jest.setTimeout(80000);
@@ -9,9 +9,9 @@ import {
9
9
  mintSingleIssuerToken,
10
10
  unfreezeSingleIssuerToken,
11
11
  } from "../utils/multi-token-utils.js";
12
- import { TEST_CONFIGS } from "./test-configs.js";
12
+ import { TEST_CONFIGS_WITH_BINDINGS } from "./test-configs.js";
13
13
 
14
- describe.each(TEST_CONFIGS)(
14
+ describe.each(TEST_CONFIGS_WITH_BINDINGS)(
15
15
  "token lifecycle tests - $name",
16
16
  ({ name, config }) => {
17
17
  jest.setTimeout(80000);
@@ -11,9 +11,9 @@ import {
11
11
  getSingleIssuerTokenIdentifier,
12
12
  mintSingleIssuerToken,
13
13
  } from "../utils/multi-token-utils.js";
14
- import { TEST_CONFIGS } from "./test-configs.js";
14
+ import { TEST_CONFIGS_WITH_BINDINGS } from "./test-configs.js";
15
15
 
16
- describe.each(TEST_CONFIGS)(
16
+ describe.each(TEST_CONFIGS_WITH_BINDINGS)(
17
17
  "token monitoring tests - $name",
18
18
  ({ name, config }) => {
19
19
  jest.setTimeout(80000);
@@ -7,7 +7,7 @@ import {
7
7
  getSingleIssuerTokenIdentifier,
8
8
  mintSingleIssuerToken,
9
9
  } from "../utils/multi-token-utils.js";
10
- import { TEST_CONFIGS } from "./test-configs.js";
10
+ import { TEST_CONFIGS_WITH_BINDINGS } from "./test-configs.js";
11
11
 
12
12
  type TokenIdentifier = Parameters<
13
13
  typeof filterTokenBalanceForTokenIdentifier
@@ -66,7 +66,7 @@ const getOwnedBalance = async ({
66
66
  ).ownedBalance;
67
67
  };
68
68
 
69
- describe.each(TEST_CONFIGS)(
69
+ describe.each(TEST_CONFIGS_WITH_BINDINGS)(
70
70
  "token output tests - $name",
71
71
  ({ name, config }) => {
72
72
  jest.setTimeout(80000);
@@ -11,9 +11,9 @@ import {
11
11
  getSingleIssuerTokenIdentifier,
12
12
  mintSingleIssuerToken,
13
13
  } from "../utils/multi-token-utils.js";
14
- import { TEST_CONFIGS } from "./test-configs.js";
14
+ import { TEST_CONFIGS_WITH_BINDINGS } from "./test-configs.js";
15
15
 
16
- describe.each(TEST_CONFIGS)(
16
+ describe.each(TEST_CONFIGS_WITH_BINDINGS)(
17
17
  "token transfer tests - $name",
18
18
  ({ name, config }) => {
19
19
  jest.setTimeout(80000);