@eluvio/elv-client-js 3.2.33 → 3.2.35

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@eluvio/elv-client-js",
3
- "version": "3.2.33",
3
+ "version": "3.2.35",
4
4
  "description": "Javascript client for the Eluvio Content Fabric",
5
5
  "main": "src/index.js",
6
6
  "author": "Kevin Talmadge",
@@ -314,7 +314,7 @@ exports.CreateABRMezzanine = async function({
314
314
  }
315
315
 
316
316
  if(!storeClear) {
317
- // If files are encrypted, generate encryption conks
317
+ // If mez parts are to be encrypted, generate encryption conks
318
318
  await this.EncryptionConk({
319
319
  libraryId,
320
320
  objectId: id,
@@ -425,6 +425,28 @@ exports.TenantConfiguration = async function({tenantId, contractAddress}) {
425
425
  };
426
426
 
427
427
 
428
+ /**
429
+ * Retrieve the current exchange rate for the specified currency to USD
430
+ *
431
+ * @methodGroup Tenants
432
+ * @namedParams
433
+ * @param {string} currency - The currency for which to retrieve the USD exchange rate
434
+ */
435
+ exports.ExchangeRate = async function({currency}) {
436
+ if(!currency) {
437
+ throw Error("Eluvio Wallet Client: Invalid or missing currency in ExchangeRate");
438
+ }
439
+
440
+ return await Utils.ResponseToJson(
441
+ this.client.authClient.MakeAuthServiceRequest({
442
+ path: UrlJoin("as", "xr", "ebanx", currency),
443
+ method: "GET"
444
+ })
445
+ );
446
+ };
447
+
448
+
449
+
428
450
  /* MARKETPLACE */
429
451
 
430
452
  /**
@@ -24,6 +24,7 @@ let WalletConfiguration = {
24
24
  },
25
25
  __MARKETPLACE_ORDER: [
26
26
  "PREVIEW",
27
+ "de228e92-ed45-4fe0-8e52-658cf366e962",
27
28
  "wwe-marketplace-main",
28
29
  "realcannonballrun-marketplace",
29
30
  "maskverse-marketplace",
@@ -1,3 +1,4 @@
1
+ /* eslint-disable no-console */
1
2
  // initialize abr mezzaninewithout uploading any files
2
3
  // - use to turn a manually created object into an abr mezzanine
3
4
 
@@ -18,7 +19,7 @@ const ABRMezzanineInit = async (libraryId, objectId, productionMasterHash, produ
18
19
  });
19
20
  await client.SetSigner({signer});
20
21
 
21
- console.log("\nCalling production_master/init");
22
+ console.log("\nCalling abr_mezzanine/init");
22
23
 
23
24
  try {
24
25
 
@@ -37,7 +38,7 @@ const ABRMezzanineInit = async (libraryId, objectId, productionMasterHash, produ
37
38
 
38
39
  // ** temporary workaround for server permissions issue **
39
40
  const production_master = masterMetaData["production_master"];
40
- const masterName = masterMetaData["name"];
41
+ // const masterName = masterMetaData["name"];
41
42
  // const production_master_files = masterMetaData["fies"];
42
43
 
43
44
  // get master object name
@@ -0,0 +1,59 @@
1
+ // Probe file in object for media structure
2
+
3
+ const {NewOpt} = require("./lib/options");
4
+ const Utility = require("./lib/Utility");
5
+
6
+ const ArgOutfile = require("./lib/concerns/ArgOutfile");
7
+ const Client = require("./lib/concerns/Client");
8
+ const CloudAccess = require("./lib/concerns/CloudAccess");
9
+ const ExistObjOrVer = require("./lib/concerns/ExistObjOrVer");
10
+
11
+ class ObjectProbeFile extends Utility {
12
+ blueprint() {
13
+ return {
14
+ concerns: [Client, ExistObjOrVer, ArgOutfile, CloudAccess],
15
+ options: [
16
+ NewOpt("file", {
17
+ demand: true,
18
+ descTemplate: "Name of file within object (must be at top level).",
19
+ type: "string"
20
+ })
21
+ ]
22
+ };
23
+ }
24
+
25
+ async body() {
26
+ const {file, outfile} = this.args;
27
+ const client = await this.concerns.Client.get();
28
+
29
+ const access = this.concerns.CloudAccess.credentialSet(false);
30
+
31
+ await this.concerns.ExistObjOrVer.argsProc();
32
+
33
+ const {data, errors, warnings} = await client.CallBitcodeMethod({
34
+ versionHash: this.args.versionHash,
35
+ method: "/media/files/probe",
36
+ constant: false,
37
+ body: {file_paths: [file], access}
38
+ });
39
+
40
+ this.logger.errorsAndWarnings({errors, warnings});
41
+
42
+ if(outfile) {
43
+ this.concerns.ArgOutfile.writeJson(data);
44
+ } else {
45
+ this.logger.logObject(data);
46
+ }
47
+ this.logger.data("fileMediaInfo", data);
48
+ }
49
+
50
+ header() {
51
+ return `Get media info for ${this.args.file} in ${this.args.versionHash || this.args.objectId}...`;
52
+ }
53
+ }
54
+
55
+ if(require.main === module) {
56
+ Utility.cmdLineInvoke(ObjectProbeFile);
57
+ } else {
58
+ module.exports = ObjectProbeFile;
59
+ }
@@ -0,0 +1,120 @@
1
+ {
2
+ "drm_optional": false,
3
+ "store_clear": false,
4
+ "ladder_specs": {
5
+ "{\"media_type\":\"audio\",\"channels\":1}": {
6
+ "rung_specs": [
7
+ {
8
+ "bit_rate": 128000,
9
+ "media_type": "audio",
10
+ "pregenerate": true
11
+ }
12
+ ]
13
+ },
14
+ "{\"media_type\":\"audio\",\"channels\":2}": {
15
+ "rung_specs": [
16
+ {
17
+ "bit_rate": 192000,
18
+ "media_type": "audio",
19
+ "pregenerate": true
20
+ }
21
+ ]
22
+ },
23
+ "{\"media_type\":\"audio\",\"channels\":6}": {
24
+ "rung_specs": [
25
+ {
26
+ "bit_rate": 384000,
27
+ "media_type": "audio",
28
+ "pregenerate": true
29
+ }
30
+ ]
31
+ },
32
+ "{\"media_type\":\"video\",\"aspect_ratio_height\":9,\"aspect_ratio_width\":16}": {
33
+ "rung_specs": [
34
+ {
35
+ "bit_rate": 20000000,
36
+ "height": 2160,
37
+ "media_type": "video",
38
+ "pregenerate": true,
39
+ "width": 3840
40
+ },
41
+ {
42
+ "bit_rate": 9500000,
43
+ "height": 1080,
44
+ "media_type": "video",
45
+ "pregenerate": false,
46
+ "width": 1920
47
+ },
48
+ {
49
+ "bit_rate": 4500000,
50
+ "height":720 ,
51
+ "media_type": "video",
52
+ "pregenerate": false,
53
+ "width": 1280
54
+ },
55
+ {
56
+ "bit_rate": 2000000,
57
+ "height": 540,
58
+ "media_type": "video",
59
+ "pregenerate": false,
60
+ "width": 960
61
+ },
62
+ {
63
+ "bit_rate": 1100000,
64
+ "height": 432,
65
+ "media_type": "video",
66
+ "pregenerate": false,
67
+ "width": 768
68
+ },
69
+ {
70
+ "bit_rate": 810000,
71
+ "height": 360,
72
+ "media_type": "video",
73
+ "pregenerate": false,
74
+ "width": 640
75
+ },
76
+ {
77
+ "bit_rate": 520000,
78
+ "height": 360,
79
+ "media_type": "video",
80
+ "pregenerate": false,
81
+ "width": 640
82
+ }
83
+ ]
84
+ }
85
+ },
86
+ "playout_formats": {
87
+ "dash-widevine": {
88
+ "drm": {
89
+ "content_id": "",
90
+ "enc_scheme_name": "cenc",
91
+ "license_servers": [],
92
+ "type": "DrmWidevine"
93
+ },
94
+ "protocol": {
95
+ "min_buffer_length": 2,
96
+ "type": "ProtoDash"
97
+ }
98
+ },
99
+ "hls-fairplay": {
100
+ "drm": {
101
+ "enc_scheme_name": "cbcs",
102
+ "license_servers": [],
103
+ "type": "DrmFairplay"
104
+ },
105
+ "protocol": {
106
+ "type": "ProtoHls"
107
+ }
108
+ }
109
+ },
110
+ "segment_specs": {
111
+ "audio": {
112
+ "segs_per_chunk": 15,
113
+ "target_dur": 2
114
+ },
115
+ "video": {
116
+ "segs_per_chunk": 15,
117
+ "target_dur": 2
118
+ }
119
+ }
120
+ }
@@ -19,7 +19,7 @@ const blueprint = {
19
19
  type: "string"
20
20
  }),
21
21
  NewOpt("overwrite", {
22
- descTemplate: "Replace file if it already exists.",
22
+ descTemplate: "Replace output file if it already exists.",
23
23
  type: "boolean"
24
24
  })
25
25
  ]
@@ -64,4 +64,4 @@ const New = (context) => {
64
64
  module.exports = {
65
65
  blueprint,
66
66
  New
67
- };
67
+ };