@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.
- package/dist/core/index.cjs +5 -2
- package/dist/core/index.cjs.map +1 -1
- package/dist/core/index.js +5 -2
- package/dist/core/index.js.map +1 -1
- package/dist/index.cjs +5 -2
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +5 -2
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -9839,7 +9839,8 @@ var PaymentsModule = class _PaymentsModule {
|
|
|
9839
9839
|
try {
|
|
9840
9840
|
const peerInfo = await this.deps.transport.resolve?.(request.recipient) ?? null;
|
|
9841
9841
|
const recipientPubkey = this.resolveTransportPubkey(request.recipient, peerInfo);
|
|
9842
|
-
const
|
|
9842
|
+
const willUseEngine = !!(this.deps?.tokenEngine && peerInfo?.chainPubkey);
|
|
9843
|
+
const recipientAddress = willUseEngine ? null : await this.resolveRecipientAddress(request.recipient, request.addressMode, peerInfo);
|
|
9843
9844
|
const signingService = await this.createSigningService();
|
|
9844
9845
|
const stClient = this.deps.oracle.getStateTransitionClient?.();
|
|
9845
9846
|
if (!stClient) {
|
|
@@ -9963,6 +9964,7 @@ var PaymentsModule = class _PaymentsModule {
|
|
|
9963
9964
|
splitPlan.remainderAmount,
|
|
9964
9965
|
splitPlan.coinId,
|
|
9965
9966
|
recipientAddress,
|
|
9967
|
+
// v1 path only — non-null (would have thrown in resolve otherwise)
|
|
9966
9968
|
onChainMessage
|
|
9967
9969
|
);
|
|
9968
9970
|
committedOnChainTokenIds.add(splitPlan.tokenToSplit.uiToken.id);
|
|
@@ -10043,6 +10045,7 @@ var PaymentsModule = class _PaymentsModule {
|
|
|
10043
10045
|
splitPlan.remainderAmount,
|
|
10044
10046
|
splitPlan.coinId,
|
|
10045
10047
|
recipientAddress,
|
|
10048
|
+
// v1 path only — non-null (would have thrown in resolve otherwise)
|
|
10046
10049
|
{
|
|
10047
10050
|
memo: request.memo,
|
|
10048
10051
|
message: onChainMessage,
|
|
@@ -13039,7 +13042,7 @@ var PaymentsModule = class _PaymentsModule {
|
|
|
13039
13042
|
const nametag = recipient.startsWith("@") ? recipient.slice(1) : info.nametag || recipient;
|
|
13040
13043
|
if (!info.directAddress) {
|
|
13041
13044
|
throw new SphereError(
|
|
13042
|
-
`"${nametag}" has no
|
|
13045
|
+
`"${nametag}" has no published identity \u2014 the recipient must register a Unicity ID (publish a key-based identity binding) before they can receive payments.`,
|
|
13043
13046
|
"INVALID_RECIPIENT"
|
|
13044
13047
|
);
|
|
13045
13048
|
}
|