@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.
@@ -9394,7 +9394,8 @@ var PaymentsModule = class _PaymentsModule {
9394
9394
  try {
9395
9395
  const peerInfo = await this.deps.transport.resolve?.(request.recipient) ?? null;
9396
9396
  const recipientPubkey = this.resolveTransportPubkey(request.recipient, peerInfo);
9397
- const recipientAddress = await this.resolveRecipientAddress(request.recipient, request.addressMode, peerInfo);
9397
+ const willUseEngine = !!(this.deps?.tokenEngine && peerInfo?.chainPubkey);
9398
+ const recipientAddress = willUseEngine ? null : await this.resolveRecipientAddress(request.recipient, request.addressMode, peerInfo);
9398
9399
  const signingService = await this.createSigningService();
9399
9400
  const stClient = this.deps.oracle.getStateTransitionClient?.();
9400
9401
  if (!stClient) {
@@ -9518,6 +9519,7 @@ var PaymentsModule = class _PaymentsModule {
9518
9519
  splitPlan.remainderAmount,
9519
9520
  splitPlan.coinId,
9520
9521
  recipientAddress,
9522
+ // v1 path only — non-null (would have thrown in resolve otherwise)
9521
9523
  onChainMessage
9522
9524
  );
9523
9525
  committedOnChainTokenIds.add(splitPlan.tokenToSplit.uiToken.id);
@@ -9598,6 +9600,7 @@ var PaymentsModule = class _PaymentsModule {
9598
9600
  splitPlan.remainderAmount,
9599
9601
  splitPlan.coinId,
9600
9602
  recipientAddress,
9603
+ // v1 path only — non-null (would have thrown in resolve otherwise)
9601
9604
  {
9602
9605
  memo: request.memo,
9603
9606
  message: onChainMessage,
@@ -12594,7 +12597,7 @@ var PaymentsModule = class _PaymentsModule {
12594
12597
  const nametag = recipient.startsWith("@") ? recipient.slice(1) : info.nametag || recipient;
12595
12598
  if (!info.directAddress) {
12596
12599
  throw new SphereError(
12597
- `"${nametag}" has no DirectAddress \u2014 the recipient must publish a key-based identity binding.`,
12600
+ `"${nametag}" has no published identity \u2014 the recipient must register a Unicity ID (publish a key-based identity binding) before they can receive payments.`,
12598
12601
  "INVALID_RECIPIENT"
12599
12602
  );
12600
12603
  }