@net-protocol/cli 0.1.41 → 0.1.43
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/README.md +131 -0
- package/dist/cli/index.mjs +855 -7
- package/dist/cli/index.mjs.map +1 -1
- package/dist/profile/index.mjs +7 -1
- package/dist/profile/index.mjs.map +1 -1
- package/package.json +2 -1
package/dist/profile/index.mjs
CHANGED
|
@@ -96,6 +96,7 @@ async function executeProfileGet(options) {
|
|
|
96
96
|
}
|
|
97
97
|
let xUsername;
|
|
98
98
|
let bio;
|
|
99
|
+
let displayName;
|
|
99
100
|
let tokenAddress;
|
|
100
101
|
try {
|
|
101
102
|
const metadataResult = await client.readStorageData({
|
|
@@ -106,6 +107,7 @@ async function executeProfileGet(options) {
|
|
|
106
107
|
const metadata = parseProfileMetadata(metadataResult.data);
|
|
107
108
|
xUsername = metadata?.x_username;
|
|
108
109
|
bio = metadata?.bio;
|
|
110
|
+
displayName = metadata?.display_name;
|
|
109
111
|
tokenAddress = metadata?.token_address;
|
|
110
112
|
}
|
|
111
113
|
} catch (error) {
|
|
@@ -146,12 +148,13 @@ async function executeProfileGet(options) {
|
|
|
146
148
|
throw error;
|
|
147
149
|
}
|
|
148
150
|
}
|
|
149
|
-
const hasProfile = profilePicture || xUsername || bio || tokenAddress || canvasSize || cssSize;
|
|
151
|
+
const hasProfile = profilePicture || xUsername || bio || displayName || tokenAddress || canvasSize || cssSize;
|
|
150
152
|
if (options.json) {
|
|
151
153
|
const output = {
|
|
152
154
|
address: options.address,
|
|
153
155
|
chainId: readOnlyOptions.chainId,
|
|
154
156
|
profilePicture: profilePicture || null,
|
|
157
|
+
displayName: displayName || null,
|
|
155
158
|
xUsername: xUsername || null,
|
|
156
159
|
bio: bio || null,
|
|
157
160
|
tokenAddress: tokenAddress || null,
|
|
@@ -165,6 +168,9 @@ async function executeProfileGet(options) {
|
|
|
165
168
|
console.log(chalk3.white.bold("\nProfile:\n"));
|
|
166
169
|
console.log(` ${chalk3.cyan("Address:")} ${options.address}`);
|
|
167
170
|
console.log(` ${chalk3.cyan("Chain ID:")} ${readOnlyOptions.chainId}`);
|
|
171
|
+
console.log(
|
|
172
|
+
` ${chalk3.cyan("Display Name:")} ${displayName || chalk3.gray("(not set)")}`
|
|
173
|
+
);
|
|
168
174
|
console.log(
|
|
169
175
|
` ${chalk3.cyan("Profile Picture:")} ${profilePicture || chalk3.gray("(not set)")}`
|
|
170
176
|
);
|