Skip to content

Commit 176a2a4

Browse files
committed
Update version to 8.8.0
1 parent e1722c8 commit 176a2a4

File tree

8 files changed

+65
-65
lines changed

8 files changed

+65
-65
lines changed

cjs/client.cjs

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -23901,7 +23901,7 @@ HTTP.prototype.request = function (options, callback) {
2390123901
/**
2390223902
* @class
2390323903
* @param {Object} options
23904-
* @param {string} options.server - Server address, defaults to https://api.mpin.io
23904+
* @param {string} options.projectUrl - MIRACL Trust Project URL that is used for communication with the MIRACL Trust API
2390523905
* @param {string} options.projectId - MIRACL Trust Project ID
2390623906
* @param {string} options.seed - Hex encoded random number generator seed
2390723907
* @param {string} options.deviceName - Name of the current device
@@ -23931,11 +23931,11 @@ function Client(options) {
2393123931
throw new Error("Invalid user storage");
2393223932
}
2393323933

23934-
if (!options.server) {
23935-
options.server = "https://api.mpin.io";
23934+
if (!options.projectUrl) {
23935+
options.projectUrl = "https://api.mpin.io";
2393623936
} else {
2393723937
// remove trailing slash from url, if there is one
23938-
options.server = options.server.replace(/\/$/, "");
23938+
options.projectUrl = options.projectUrl.replace(/\/$/, "");
2393923939
}
2394023940

2394123941
// Ensure that default PIN lenght is between 4 and 6
@@ -23952,7 +23952,7 @@ function Client(options) {
2395223952
}
2395323953

2395423954
// Set the client name using the current lib version and provided application info
23955-
options.clientName = "MIRACL Client.js/8.7.0" + (options.applicationInfo ? " " + options.applicationInfo : "");
23955+
options.clientName = "MIRACL Client.js/8.8.0" + (options.applicationInfo ? " " + options.applicationInfo : "");
2395623956

2395723957
self.options = options;
2395823958

@@ -23987,7 +23987,7 @@ Client.prototype.fetchAccessId = function (userId, callback) {
2398723987
reqData;
2398823988

2398923989
reqData = {
23990-
url: self.options.server + "/rps/v2/session",
23990+
url: self.options.projectUrl + "/rps/v2/session",
2399123991
type: "POST",
2399223992
data: {
2399323993
projectId: self.options.projectId,
@@ -24016,7 +24016,7 @@ Client.prototype.fetchStatus = function (callback) {
2401624016
reqData;
2401724017

2401824018
reqData = {
24019-
url: self.options.server + "/rps/v2/access",
24019+
url: self.options.projectUrl + "/rps/v2/access",
2402024020
type: "POST",
2402124021
data: {
2402224022
webOTT: self.session.webOTT
@@ -24047,7 +24047,7 @@ Client.prototype.sendPushNotificationForAuth = function (userId, callback) {
2404724047
}
2404824048

2404924049
reqData = {
24050-
url: self.options.server + "/pushauth?" + self._urlEncode(self.options.oidc),
24050+
url: self.options.projectUrl + "/pushauth?" + self._urlEncode(self.options.oidc),
2405124051
type: "POST",
2405224052
data: {
2405324053
prerollId: userId
@@ -24083,7 +24083,7 @@ Client.prototype.sendVerificationEmail = function (userId, callback) {
2408324083
return callback(new Error("Empty user ID"), null);
2408424084
}
2408524085

24086-
reqData.url = self.options.server + "/verification/email";
24086+
reqData.url = self.options.projectUrl + "/verification/email";
2408724087
reqData.type = "POST";
2408824088
reqData.data = {
2408924089
userId: userId,
@@ -24132,7 +24132,7 @@ Client.prototype.getActivationToken = function (verificationURI, callback) {
2413224132
return callback(new Error("Empty verification code"), null);
2413324133
}
2413424134

24135-
reqData.url = self.options.server + "/verification/confirmation";
24135+
reqData.url = self.options.projectUrl + "/verification/confirmation";
2413624136
reqData.type = "POST";
2413724137
reqData.data = {
2413824138
userId: params["user_id"],
@@ -24222,7 +24222,7 @@ Client.prototype._createMPinID = function (userId, activationToken, keypair, cal
2422224222
var self = this,
2422324223
regData = {};
2422424224

24225-
regData.url = self.options.server + "/registration";
24225+
regData.url = self.options.projectUrl + "/registration";
2422624226
regData.type = "POST";
2422724227
regData.data = {
2422824228
userId: userId,
@@ -24371,7 +24371,7 @@ Client.prototype.generateQuickCode = function (userId, userPin, callback) {
2437124371
}
2437224372

2437324373
self.http.request({
24374-
url: self.options.server + "/verification/quickcode",
24374+
url: self.options.projectUrl + "/verification/quickcode",
2437524375
type: "POST",
2437624376
data: {
2437724377
projectId: self.options.projectId,
@@ -24485,7 +24485,7 @@ Client.prototype._getPass1 = function (identityData, userPin, scope, X, SEC, cal
2448524485
U: res.U
2448624486
};
2448724487

24488-
self.http.request({ url: self.options.server + "/rps/v2/pass1", type: "POST", data: requestData }, callback);
24488+
self.http.request({ url: self.options.projectUrl + "/rps/v2/pass1", type: "POST", data: requestData }, callback);
2448924489
};
2449024490

2449124491
/**
@@ -24520,7 +24520,7 @@ Client.prototype._getPass2 = function (identityData, scope, yHex, X, SEC, callba
2452024520
V: vHex
2452124521
};
2452224522

24523-
self.http.request({ url: self.options.server + "/rps/v2/pass2", type: "POST", data: requestData}, callback);
24523+
self.http.request({ url: self.options.projectUrl + "/rps/v2/pass2", type: "POST", data: requestData}, callback);
2452424524
};
2452524525

2452624526
Client.prototype._finishAuthentication = function (userId, userPin, scope, authOTT, callback) {
@@ -24532,7 +24532,7 @@ Client.prototype._finishAuthentication = function (userId, userPin, scope, authO
2453224532
"wam": "dvs"
2453324533
};
2453424534

24535-
self.http.request({ url: self.options.server + "/rps/v2/authenticate", type: "POST", data: requestData }, function (err, result) {
24535+
self.http.request({ url: self.options.projectUrl + "/rps/v2/authenticate", type: "POST", data: requestData }, function (err, result) {
2453624536
if (err) {
2453724537
return callback(err, result);
2453824538
}

cjs/promise.cjs

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -23901,7 +23901,7 @@ HTTP.prototype.request = function (options, callback) {
2390123901
/**
2390223902
* @class
2390323903
* @param {Object} options
23904-
* @param {string} options.server - Server address, defaults to https://api.mpin.io
23904+
* @param {string} options.projectUrl - MIRACL Trust Project URL that is used for communication with the MIRACL Trust API
2390523905
* @param {string} options.projectId - MIRACL Trust Project ID
2390623906
* @param {string} options.seed - Hex encoded random number generator seed
2390723907
* @param {string} options.deviceName - Name of the current device
@@ -23931,11 +23931,11 @@ function Client(options) {
2393123931
throw new Error("Invalid user storage");
2393223932
}
2393323933

23934-
if (!options.server) {
23935-
options.server = "https://api.mpin.io";
23934+
if (!options.projectUrl) {
23935+
options.projectUrl = "https://api.mpin.io";
2393623936
} else {
2393723937
// remove trailing slash from url, if there is one
23938-
options.server = options.server.replace(/\/$/, "");
23938+
options.projectUrl = options.projectUrl.replace(/\/$/, "");
2393923939
}
2394023940

2394123941
// Ensure that default PIN lenght is between 4 and 6
@@ -23952,7 +23952,7 @@ function Client(options) {
2395223952
}
2395323953

2395423954
// Set the client name using the current lib version and provided application info
23955-
options.clientName = "MIRACL Client.js/8.7.0" + (options.applicationInfo ? " " + options.applicationInfo : "");
23955+
options.clientName = "MIRACL Client.js/8.8.0" + (options.applicationInfo ? " " + options.applicationInfo : "");
2395623956

2395723957
self.options = options;
2395823958

@@ -23987,7 +23987,7 @@ Client.prototype.fetchAccessId = function (userId, callback) {
2398723987
reqData;
2398823988

2398923989
reqData = {
23990-
url: self.options.server + "/rps/v2/session",
23990+
url: self.options.projectUrl + "/rps/v2/session",
2399123991
type: "POST",
2399223992
data: {
2399323993
projectId: self.options.projectId,
@@ -24016,7 +24016,7 @@ Client.prototype.fetchStatus = function (callback) {
2401624016
reqData;
2401724017

2401824018
reqData = {
24019-
url: self.options.server + "/rps/v2/access",
24019+
url: self.options.projectUrl + "/rps/v2/access",
2402024020
type: "POST",
2402124021
data: {
2402224022
webOTT: self.session.webOTT
@@ -24047,7 +24047,7 @@ Client.prototype.sendPushNotificationForAuth = function (userId, callback) {
2404724047
}
2404824048

2404924049
reqData = {
24050-
url: self.options.server + "/pushauth?" + self._urlEncode(self.options.oidc),
24050+
url: self.options.projectUrl + "/pushauth?" + self._urlEncode(self.options.oidc),
2405124051
type: "POST",
2405224052
data: {
2405324053
prerollId: userId
@@ -24083,7 +24083,7 @@ Client.prototype.sendVerificationEmail = function (userId, callback) {
2408324083
return callback(new Error("Empty user ID"), null);
2408424084
}
2408524085

24086-
reqData.url = self.options.server + "/verification/email";
24086+
reqData.url = self.options.projectUrl + "/verification/email";
2408724087
reqData.type = "POST";
2408824088
reqData.data = {
2408924089
userId: userId,
@@ -24132,7 +24132,7 @@ Client.prototype.getActivationToken = function (verificationURI, callback) {
2413224132
return callback(new Error("Empty verification code"), null);
2413324133
}
2413424134

24135-
reqData.url = self.options.server + "/verification/confirmation";
24135+
reqData.url = self.options.projectUrl + "/verification/confirmation";
2413624136
reqData.type = "POST";
2413724137
reqData.data = {
2413824138
userId: params["user_id"],
@@ -24222,7 +24222,7 @@ Client.prototype._createMPinID = function (userId, activationToken, keypair, cal
2422224222
var self = this,
2422324223
regData = {};
2422424224

24225-
regData.url = self.options.server + "/registration";
24225+
regData.url = self.options.projectUrl + "/registration";
2422624226
regData.type = "POST";
2422724227
regData.data = {
2422824228
userId: userId,
@@ -24371,7 +24371,7 @@ Client.prototype.generateQuickCode = function (userId, userPin, callback) {
2437124371
}
2437224372

2437324373
self.http.request({
24374-
url: self.options.server + "/verification/quickcode",
24374+
url: self.options.projectUrl + "/verification/quickcode",
2437524375
type: "POST",
2437624376
data: {
2437724377
projectId: self.options.projectId,
@@ -24485,7 +24485,7 @@ Client.prototype._getPass1 = function (identityData, userPin, scope, X, SEC, cal
2448524485
U: res.U
2448624486
};
2448724487

24488-
self.http.request({ url: self.options.server + "/rps/v2/pass1", type: "POST", data: requestData }, callback);
24488+
self.http.request({ url: self.options.projectUrl + "/rps/v2/pass1", type: "POST", data: requestData }, callback);
2448924489
};
2449024490

2449124491
/**
@@ -24520,7 +24520,7 @@ Client.prototype._getPass2 = function (identityData, scope, yHex, X, SEC, callba
2452024520
V: vHex
2452124521
};
2452224522

24523-
self.http.request({ url: self.options.server + "/rps/v2/pass2", type: "POST", data: requestData}, callback);
24523+
self.http.request({ url: self.options.projectUrl + "/rps/v2/pass2", type: "POST", data: requestData}, callback);
2452424524
};
2452524525

2452624526
Client.prototype._finishAuthentication = function (userId, userPin, scope, authOTT, callback) {
@@ -24532,7 +24532,7 @@ Client.prototype._finishAuthentication = function (userId, userPin, scope, authO
2453224532
"wam": "dvs"
2453324533
};
2453424534

24535-
self.http.request({ url: self.options.server + "/rps/v2/authenticate", type: "POST", data: requestData }, function (err, result) {
24535+
self.http.request({ url: self.options.projectUrl + "/rps/v2/authenticate", type: "POST", data: requestData }, function (err, result) {
2453624536
if (err) {
2453724537
return callback(err, result);
2453824538
}

dist/client.js

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -23902,7 +23902,7 @@ HTTP.prototype.request = function (options, callback) {
2390223902
/**
2390323903
* @class
2390423904
* @param {Object} options
23905-
* @param {string} options.server - Server address, defaults to https://api.mpin.io
23905+
* @param {string} options.projectUrl - MIRACL Trust Project URL that is used for communication with the MIRACL Trust API
2390623906
* @param {string} options.projectId - MIRACL Trust Project ID
2390723907
* @param {string} options.seed - Hex encoded random number generator seed
2390823908
* @param {string} options.deviceName - Name of the current device
@@ -23932,11 +23932,11 @@ function Client(options) {
2393223932
throw new Error("Invalid user storage");
2393323933
}
2393423934

23935-
if (!options.server) {
23936-
options.server = "https://api.mpin.io";
23935+
if (!options.projectUrl) {
23936+
options.projectUrl = "https://api.mpin.io";
2393723937
} else {
2393823938
// remove trailing slash from url, if there is one
23939-
options.server = options.server.replace(/\/$/, "");
23939+
options.projectUrl = options.projectUrl.replace(/\/$/, "");
2394023940
}
2394123941

2394223942
// Ensure that default PIN lenght is between 4 and 6
@@ -23953,7 +23953,7 @@ function Client(options) {
2395323953
}
2395423954

2395523955
// Set the client name using the current lib version and provided application info
23956-
options.clientName = "MIRACL Client.js/8.7.0" + (options.applicationInfo ? " " + options.applicationInfo : "");
23956+
options.clientName = "MIRACL Client.js/8.8.0" + (options.applicationInfo ? " " + options.applicationInfo : "");
2395723957

2395823958
self.options = options;
2395923959

@@ -23988,7 +23988,7 @@ Client.prototype.fetchAccessId = function (userId, callback) {
2398823988
reqData;
2398923989

2399023990
reqData = {
23991-
url: self.options.server + "/rps/v2/session",
23991+
url: self.options.projectUrl + "/rps/v2/session",
2399223992
type: "POST",
2399323993
data: {
2399423994
projectId: self.options.projectId,
@@ -24017,7 +24017,7 @@ Client.prototype.fetchStatus = function (callback) {
2401724017
reqData;
2401824018

2401924019
reqData = {
24020-
url: self.options.server + "/rps/v2/access",
24020+
url: self.options.projectUrl + "/rps/v2/access",
2402124021
type: "POST",
2402224022
data: {
2402324023
webOTT: self.session.webOTT
@@ -24048,7 +24048,7 @@ Client.prototype.sendPushNotificationForAuth = function (userId, callback) {
2404824048
}
2404924049

2405024050
reqData = {
24051-
url: self.options.server + "/pushauth?" + self._urlEncode(self.options.oidc),
24051+
url: self.options.projectUrl + "/pushauth?" + self._urlEncode(self.options.oidc),
2405224052
type: "POST",
2405324053
data: {
2405424054
prerollId: userId
@@ -24084,7 +24084,7 @@ Client.prototype.sendVerificationEmail = function (userId, callback) {
2408424084
return callback(new Error("Empty user ID"), null);
2408524085
}
2408624086

24087-
reqData.url = self.options.server + "/verification/email";
24087+
reqData.url = self.options.projectUrl + "/verification/email";
2408824088
reqData.type = "POST";
2408924089
reqData.data = {
2409024090
userId: userId,
@@ -24133,7 +24133,7 @@ Client.prototype.getActivationToken = function (verificationURI, callback) {
2413324133
return callback(new Error("Empty verification code"), null);
2413424134
}
2413524135

24136-
reqData.url = self.options.server + "/verification/confirmation";
24136+
reqData.url = self.options.projectUrl + "/verification/confirmation";
2413724137
reqData.type = "POST";
2413824138
reqData.data = {
2413924139
userId: params["user_id"],
@@ -24223,7 +24223,7 @@ Client.prototype._createMPinID = function (userId, activationToken, keypair, cal
2422324223
var self = this,
2422424224
regData = {};
2422524225

24226-
regData.url = self.options.server + "/registration";
24226+
regData.url = self.options.projectUrl + "/registration";
2422724227
regData.type = "POST";
2422824228
regData.data = {
2422924229
userId: userId,
@@ -24372,7 +24372,7 @@ Client.prototype.generateQuickCode = function (userId, userPin, callback) {
2437224372
}
2437324373

2437424374
self.http.request({
24375-
url: self.options.server + "/verification/quickcode",
24375+
url: self.options.projectUrl + "/verification/quickcode",
2437624376
type: "POST",
2437724377
data: {
2437824378
projectId: self.options.projectId,
@@ -24486,7 +24486,7 @@ Client.prototype._getPass1 = function (identityData, userPin, scope, X, SEC, cal
2448624486
U: res.U
2448724487
};
2448824488

24489-
self.http.request({ url: self.options.server + "/rps/v2/pass1", type: "POST", data: requestData }, callback);
24489+
self.http.request({ url: self.options.projectUrl + "/rps/v2/pass1", type: "POST", data: requestData }, callback);
2449024490
};
2449124491

2449224492
/**
@@ -24521,7 +24521,7 @@ Client.prototype._getPass2 = function (identityData, scope, yHex, X, SEC, callba
2452124521
V: vHex
2452224522
};
2452324523

24524-
self.http.request({ url: self.options.server + "/rps/v2/pass2", type: "POST", data: requestData}, callback);
24524+
self.http.request({ url: self.options.projectUrl + "/rps/v2/pass2", type: "POST", data: requestData}, callback);
2452524525
};
2452624526

2452724527
Client.prototype._finishAuthentication = function (userId, userPin, scope, authOTT, callback) {
@@ -24533,7 +24533,7 @@ Client.prototype._finishAuthentication = function (userId, userPin, scope, authO
2453324533
"wam": "dvs"
2453424534
};
2453524535

24536-
self.http.request({ url: self.options.server + "/rps/v2/authenticate", type: "POST", data: requestData }, function (err, result) {
24536+
self.http.request({ url: self.options.projectUrl + "/rps/v2/authenticate", type: "POST", data: requestData }, function (err, result) {
2453724537
if (err) {
2453824538
return callback(err, result);
2453924539
}

dist/client.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)