@unicitylabs/sphere-sdk 0.5.8 → 0.6.0-dev.1
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 +11 -9
- package/dist/core/index.cjs.map +1 -1
- package/dist/core/index.d.cts +0 -10
- package/dist/core/index.d.ts +0 -10
- package/dist/core/index.js +11 -9
- package/dist/core/index.js.map +1 -1
- package/dist/impl/browser/index.cjs +191 -497
- package/dist/impl/browser/index.cjs.map +1 -1
- package/dist/impl/browser/index.js +191 -497
- package/dist/impl/browser/index.js.map +1 -1
- package/dist/impl/nodejs/index.cjs +203 -509
- package/dist/impl/nodejs/index.cjs.map +1 -1
- package/dist/impl/nodejs/index.d.cts +10 -20
- package/dist/impl/nodejs/index.d.ts +10 -20
- package/dist/impl/nodejs/index.js +203 -509
- package/dist/impl/nodejs/index.js.map +1 -1
- package/dist/index.cjs +22 -9
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +1 -11
- package/dist/index.d.ts +1 -11
- package/dist/index.js +21 -10
- package/dist/index.js.map +1 -1
- package/package.json +3 -3
package/dist/core/index.cjs
CHANGED
|
@@ -15651,6 +15651,17 @@ var Sphere = class _Sphere {
|
|
|
15651
15651
|
if (this._identity?.nametag) {
|
|
15652
15652
|
throw new SphereError(`Unicity ID already registered for address ${this._currentAddressIndex}: @${this._identity.nametag}`, "ALREADY_INITIALIZED");
|
|
15653
15653
|
}
|
|
15654
|
+
if (!this._payments.hasNametag()) {
|
|
15655
|
+
logger.debug("Sphere", `Minting nametag token for @${cleanNametag}...`);
|
|
15656
|
+
const result = await this.mintNametag(cleanNametag);
|
|
15657
|
+
if (!result.success) {
|
|
15658
|
+
throw new SphereError(
|
|
15659
|
+
`Failed to mint nametag token: ${result.error}`,
|
|
15660
|
+
"AGGREGATOR_ERROR"
|
|
15661
|
+
);
|
|
15662
|
+
}
|
|
15663
|
+
logger.debug("Sphere", `Nametag token minted successfully`);
|
|
15664
|
+
}
|
|
15654
15665
|
if (this._transport.publishIdentityBinding) {
|
|
15655
15666
|
const success = await this._transport.publishIdentityBinding(
|
|
15656
15667
|
this._identity.chainPubkey,
|
|
@@ -15674,15 +15685,6 @@ var Sphere = class _Sphere {
|
|
|
15674
15685
|
nametags.set(0, cleanNametag);
|
|
15675
15686
|
}
|
|
15676
15687
|
await this.persistAddressNametags();
|
|
15677
|
-
if (!this._payments.hasNametag()) {
|
|
15678
|
-
logger.debug("Sphere", `Minting nametag token for @${cleanNametag}...`);
|
|
15679
|
-
const result = await this.mintNametag(cleanNametag);
|
|
15680
|
-
if (!result.success) {
|
|
15681
|
-
logger.warn("Sphere", `Failed to mint nametag token: ${result.error}`);
|
|
15682
|
-
} else {
|
|
15683
|
-
logger.debug("Sphere", `Nametag token minted successfully`);
|
|
15684
|
-
}
|
|
15685
|
-
}
|
|
15686
15688
|
this.emitEvent("nametag:registered", {
|
|
15687
15689
|
nametag: cleanNametag,
|
|
15688
15690
|
addressIndex: this._currentAddressIndex
|