@eluvio/elv-client-js 4.0.9 → 4.0.10
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/ElvClient-min.js +11 -10
- package/dist/ElvClient-node-min.js +11 -10
- package/dist/ElvFrameClient-min.js +11 -10
- package/dist/ElvPermissionsClient-min.js +10 -9
- package/dist/ElvWalletClient-min.js +10 -9
- package/dist/ElvWalletClient-node-min.js +10 -9
- package/dist/src/AuthorizationClient.js +1556 -2077
- package/dist/src/ContentObjectVerification.js +134 -185
- package/dist/src/Crypto.js +224 -319
- package/dist/src/ElvClient.js +822 -1114
- package/dist/src/ElvWallet.js +64 -106
- package/dist/src/EthClient.js +719 -974
- package/dist/src/FrameClient.js +222 -318
- package/dist/src/HttpClient.js +112 -154
- package/dist/src/Id.js +1 -6
- package/dist/src/LogMessage.js +4 -8
- package/dist/src/PermissionsClient.js +973 -1271
- package/dist/src/RemoteSigner.js +161 -232
- package/dist/src/UserProfileClient.js +781 -1038
- package/dist/src/Utils.js +159 -299
- package/dist/src/Validation.js +2 -17
- package/dist/src/client/ABRPublishing.js +772 -942
- package/dist/src/client/AccessGroups.js +849 -1095
- package/dist/src/client/ContentAccess.js +3322 -4195
- package/dist/src/client/ContentManagement.js +1817 -2286
- package/dist/src/client/Contracts.js +468 -614
- package/dist/src/client/Files.js +1505 -1845
- package/dist/src/client/NFT.js +94 -116
- package/dist/src/client/NTP.js +326 -425
- package/dist/src/index.js +2 -5
- package/dist/src/walletClient/ClientMethods.js +1368 -1763
- package/dist/src/walletClient/Configuration.js +4 -2
- package/dist/src/walletClient/Notifications.js +98 -127
- package/dist/src/walletClient/Profile.js +184 -246
- package/dist/src/walletClient/Utils.js +76 -122
- package/dist/src/walletClient/index.js +1171 -1496
- package/package.json +1 -1
- package/src/client/ContentManagement.js +24 -29
- package/testScripts/CreateMezMonolithic.js +779 -0
- package/utilities/ListAccessGroups.js +34 -0
package/package.json
CHANGED
|
@@ -174,20 +174,20 @@ exports.CreateContentType = async function({name, metadata={}, bitcode}) {
|
|
|
174
174
|
this.Log(`Created type: ${contractAddress} ${objectId}`);
|
|
175
175
|
|
|
176
176
|
/* Create object, upload bitcode and finalize */
|
|
177
|
-
const
|
|
178
|
-
this.
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
);
|
|
177
|
+
const rawCreateResponse = await this.HttpClient.Request({
|
|
178
|
+
headers: await this.authClient.AuthorizationHeader({
|
|
179
|
+
libraryId: this.contentSpaceLibraryId,
|
|
180
|
+
objectId,
|
|
181
|
+
update: true
|
|
182
|
+
}),
|
|
183
|
+
method: "POST",
|
|
184
|
+
path: path
|
|
185
|
+
});
|
|
186
|
+
const nodeUrl = (new URL(rawCreateResponse.url)).origin;
|
|
187
|
+
const createResponse = await this.utils.ResponseToJson(rawCreateResponse);
|
|
188
188
|
|
|
189
189
|
// Record the node used in creating this write token
|
|
190
|
-
this.HttpClient.RecordWriteToken(createResponse.write_token);
|
|
190
|
+
this.HttpClient.RecordWriteToken(createResponse.write_token, nodeUrl);
|
|
191
191
|
|
|
192
192
|
await this.ReplaceMetadata({
|
|
193
193
|
libraryId: this.contentSpaceLibraryId,
|
|
@@ -605,20 +605,21 @@ exports.CreateContentObject = async function({libraryId, objectId, options={}})
|
|
|
605
605
|
|
|
606
606
|
const path = UrlJoin("qid", objectId);
|
|
607
607
|
|
|
608
|
-
|
|
609
|
-
this.
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
);
|
|
608
|
+
const rawCreateResponse = await this.HttpClient.Request({
|
|
609
|
+
headers: await this.authClient.AuthorizationHeader({libraryId, objectId, update: true}),
|
|
610
|
+
method: "POST",
|
|
611
|
+
path: path,
|
|
612
|
+
body: options
|
|
613
|
+
});
|
|
614
|
+
const nodeUrl = (new URL(rawCreateResponse.url)).origin;
|
|
615
|
+
const createResponse = await this.utils.ResponseToJson(rawCreateResponse);
|
|
616
616
|
|
|
617
617
|
// Record the node used in creating this write token
|
|
618
|
-
this.HttpClient.RecordWriteToken(createResponse.write_token);
|
|
618
|
+
this.HttpClient.RecordWriteToken(createResponse.write_token, nodeUrl);
|
|
619
619
|
|
|
620
620
|
createResponse.writeToken = createResponse.write_token;
|
|
621
621
|
createResponse.objectId = createResponse.id;
|
|
622
|
+
createResponse.nodeUrl = nodeUrl;
|
|
622
623
|
|
|
623
624
|
return createResponse;
|
|
624
625
|
};
|
|
@@ -780,14 +781,8 @@ exports.EditContentObject = async function({libraryId, objectId, options={}}) {
|
|
|
780
781
|
path: path,
|
|
781
782
|
body: options
|
|
782
783
|
});
|
|
783
|
-
|
|
784
|
-
const
|
|
785
|
-
actualUrl.pathname = "";
|
|
786
|
-
actualUrl.search = "";
|
|
787
|
-
actualUrl.hash = "";
|
|
788
|
-
const nodeUrl = actualUrl.href;
|
|
789
|
-
|
|
790
|
-
let editResponse = await this.utils.ResponseToJson(rawEditResponse);
|
|
784
|
+
const nodeUrl = (new URL(rawEditResponse.url)).origin;
|
|
785
|
+
const editResponse = await this.utils.ResponseToJson(rawEditResponse);
|
|
791
786
|
|
|
792
787
|
// Record the node used in creating this write token
|
|
793
788
|
this.HttpClient.RecordWriteToken(editResponse.write_token, nodeUrl);
|