@unicitylabs/sphere-sdk 0.8.0-dev.2 → 0.8.0-dev.3

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.
@@ -9475,7 +9475,8 @@ var PaymentsModule = class _PaymentsModule {
9475
9475
  try {
9476
9476
  const peerInfo = await this.deps.transport.resolve?.(request.recipient) ?? null;
9477
9477
  const recipientPubkey = this.resolveTransportPubkey(request.recipient, peerInfo);
9478
- const recipientAddress = await this.resolveRecipientAddress(request.recipient, request.addressMode, peerInfo);
9478
+ const willUseEngine = !!(this.deps?.tokenEngine && peerInfo?.chainPubkey);
9479
+ const recipientAddress = willUseEngine ? null : await this.resolveRecipientAddress(request.recipient, request.addressMode, peerInfo);
9479
9480
  const signingService = await this.createSigningService();
9480
9481
  const stClient = this.deps.oracle.getStateTransitionClient?.();
9481
9482
  if (!stClient) {
@@ -9599,6 +9600,7 @@ var PaymentsModule = class _PaymentsModule {
9599
9600
  splitPlan.remainderAmount,
9600
9601
  splitPlan.coinId,
9601
9602
  recipientAddress,
9603
+ // v1 path only — non-null (would have thrown in resolve otherwise)
9602
9604
  onChainMessage
9603
9605
  );
9604
9606
  committedOnChainTokenIds.add(splitPlan.tokenToSplit.uiToken.id);
@@ -9679,6 +9681,7 @@ var PaymentsModule = class _PaymentsModule {
9679
9681
  splitPlan.remainderAmount,
9680
9682
  splitPlan.coinId,
9681
9683
  recipientAddress,
9684
+ // v1 path only — non-null (would have thrown in resolve otherwise)
9682
9685
  {
9683
9686
  memo: request.memo,
9684
9687
  message: onChainMessage,
@@ -12675,7 +12678,7 @@ var PaymentsModule = class _PaymentsModule {
12675
12678
  const nametag = recipient.startsWith("@") ? recipient.slice(1) : info.nametag || recipient;
12676
12679
  if (!info.directAddress) {
12677
12680
  throw new SphereError(
12678
- `"${nametag}" has no DirectAddress \u2014 the recipient must publish a key-based identity binding.`,
12681
+ `"${nametag}" has no published identity \u2014 the recipient must register a Unicity ID (publish a key-based identity binding) before they can receive payments.`,
12679
12682
  "INVALID_RECIPIENT"
12680
12683
  );
12681
12684
  }