rango-sdk 0.1.19 → 0.1.20
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/lib/rango-sdk.cjs.development.js +11 -7
- package/lib/rango-sdk.cjs.development.js.map +1 -1
- package/lib/rango-sdk.cjs.production.min.js +1 -1
- package/lib/rango-sdk.cjs.production.min.js.map +1 -1
- package/lib/rango-sdk.esm.js +11 -7
- package/lib/rango-sdk.esm.js.map +1 -1
- package/lib/services/client.d.ts +1 -1
- package/lib/services/client.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -427,13 +427,17 @@ var RangoClient = /*#__PURE__*/function () {
|
|
|
427
427
|
return getBestRoute;
|
|
428
428
|
}();
|
|
429
429
|
_proto.checkApproval = /*#__PURE__*/function () {
|
|
430
|
-
var _checkApproval = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3(requestId, options) {
|
|
430
|
+
var _checkApproval = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3(requestId, txId, options) {
|
|
431
431
|
var axiosResponse;
|
|
432
432
|
return _regeneratorRuntime().wrap(function _callee3$(_context3) {
|
|
433
433
|
while (1) switch (_context3.prev = _context3.next) {
|
|
434
434
|
case 0:
|
|
435
435
|
_context3.next = 2;
|
|
436
|
-
return this.httpService.get("/tx/" + requestId + "/check-approval?apiKey=" + this.apiKey, _extends({
|
|
436
|
+
return this.httpService.get("/tx/" + requestId + "/check-approval?apiKey=" + this.apiKey, _extends({
|
|
437
|
+
params: {
|
|
438
|
+
txId: txId
|
|
439
|
+
}
|
|
440
|
+
}, options));
|
|
437
441
|
case 2:
|
|
438
442
|
axiosResponse = _context3.sent;
|
|
439
443
|
return _context3.abrupt("return", axiosResponse.data);
|
|
@@ -443,7 +447,7 @@ var RangoClient = /*#__PURE__*/function () {
|
|
|
443
447
|
}
|
|
444
448
|
}, _callee3, this);
|
|
445
449
|
}));
|
|
446
|
-
function checkApproval(_x4, _x5) {
|
|
450
|
+
function checkApproval(_x4, _x5, _x6) {
|
|
447
451
|
return _checkApproval.apply(this, arguments);
|
|
448
452
|
}
|
|
449
453
|
return checkApproval;
|
|
@@ -465,7 +469,7 @@ var RangoClient = /*#__PURE__*/function () {
|
|
|
465
469
|
}
|
|
466
470
|
}, _callee4, this);
|
|
467
471
|
}));
|
|
468
|
-
function checkStatus(
|
|
472
|
+
function checkStatus(_x7, _x8) {
|
|
469
473
|
return _checkStatus.apply(this, arguments);
|
|
470
474
|
}
|
|
471
475
|
return checkStatus;
|
|
@@ -487,7 +491,7 @@ var RangoClient = /*#__PURE__*/function () {
|
|
|
487
491
|
}
|
|
488
492
|
}, _callee5, this);
|
|
489
493
|
}));
|
|
490
|
-
function createTransaction(
|
|
494
|
+
function createTransaction(_x9, _x10) {
|
|
491
495
|
return _createTransaction.apply(this, arguments);
|
|
492
496
|
}
|
|
493
497
|
return createTransaction;
|
|
@@ -505,7 +509,7 @@ var RangoClient = /*#__PURE__*/function () {
|
|
|
505
509
|
}
|
|
506
510
|
}, _callee6, this);
|
|
507
511
|
}));
|
|
508
|
-
function reportFailure(
|
|
512
|
+
function reportFailure(_x11, _x12) {
|
|
509
513
|
return _reportFailure.apply(this, arguments);
|
|
510
514
|
}
|
|
511
515
|
return reportFailure;
|
|
@@ -532,7 +536,7 @@ var RangoClient = /*#__PURE__*/function () {
|
|
|
532
536
|
}
|
|
533
537
|
}, _callee7, this);
|
|
534
538
|
}));
|
|
535
|
-
function getWalletsDetails(
|
|
539
|
+
function getWalletsDetails(_x13, _x14) {
|
|
536
540
|
return _getWalletsDetails.apply(this, arguments);
|
|
537
541
|
}
|
|
538
542
|
return getWalletsDetails;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"rango-sdk.cjs.development.js","sources":["../src/services/client.ts","../../../node_modules/rango-types/src/api/shared/type-gaurds.ts","../../../node_modules/rango-types/src/api/shared/routing.ts","../../../node_modules/rango-types/src/api/shared/transactions.ts"],"sourcesContent":["import uuid from 'uuid-random'\nimport {\n MetaResponse,\n BestRouteRequest,\n BestRouteResponse,\n CheckApprovalResponse,\n CheckTxStatusRequest,\n TransactionStatusResponse,\n CreateTransactionRequest,\n CreateTransactionResponse,\n ReportTransactionRequest,\n WalletDetailsResponse,\n RequestOptions,\n} from '../types'\nimport axios, { AxiosInstance } from 'axios'\n\ntype WalletAddresses = { blockchain: string; address: string }[]\n\nexport class RangoClient {\n private readonly deviceId: string\n private readonly apiKey: string\n private readonly apiUrl: string\n private readonly httpService: AxiosInstance\n\n constructor(apiKey: string, apiUrl?: string) {\n this.apiUrl = apiUrl || 'https://api.rango.exchange'\n this.apiKey = apiKey\n try {\n if (typeof window !== 'undefined') {\n const deviceId = localStorage.getItem('deviceId')\n if (deviceId) {\n this.deviceId = deviceId\n } else {\n const generatedId = uuid()\n localStorage.setItem('deviceId', generatedId)\n this.deviceId = generatedId\n }\n } else {\n this.deviceId = uuid()\n }\n } catch (e) {\n this.deviceId = uuid()\n }\n this.httpService = axios.create({\n baseURL: this.apiUrl,\n })\n }\n\n public async getAllMetadata(options?: RequestOptions): Promise<MetaResponse> {\n const axiosResponse = await this.httpService.get<MetaResponse>(\n `/meta?apiKey=${this.apiKey}`,\n { ...options }\n )\n return axiosResponse.data\n }\n\n public async getBestRoute(\n requestBody: BestRouteRequest,\n options?: RequestOptions\n ): Promise<BestRouteResponse> {\n const axiosResponse = await this.httpService.post<BestRouteResponse>(\n `/routing/best?apiKey=${this.apiKey}`,\n requestBody,\n { headers: { 'X-Rango-Id': this.deviceId }, ...options }\n )\n return axiosResponse.data\n }\n\n public async checkApproval(\n requestId: string,\n options?: RequestOptions\n ): Promise<CheckApprovalResponse> {\n const axiosResponse = await this.httpService.get<CheckApprovalResponse>(\n `/tx/${requestId}/check-approval?apiKey=${this.apiKey}`,\n { ...options }\n )\n return axiosResponse.data\n }\n\n public async checkStatus(\n requestBody: CheckTxStatusRequest,\n options?: RequestOptions\n ): Promise<TransactionStatusResponse> {\n const axiosResponse =\n await this.httpService.post<TransactionStatusResponse>(\n `/tx/check-status?apiKey=${this.apiKey}`,\n requestBody,\n { ...options }\n )\n return axiosResponse.data\n }\n\n public async createTransaction(\n requestBody: CreateTransactionRequest,\n options?: RequestOptions\n ): Promise<CreateTransactionResponse> {\n const axiosResponse =\n await this.httpService.post<CreateTransactionResponse>(\n `/tx/create?apiKey=${this.apiKey}`,\n requestBody,\n { ...options }\n )\n return axiosResponse.data\n }\n\n public async reportFailure(\n requestBody: ReportTransactionRequest,\n options?: RequestOptions\n ): Promise<void> {\n await this.httpService.post(\n `/tx/report-tx?apiKey=${this.apiKey}`,\n requestBody,\n {\n ...options,\n }\n )\n }\n\n public async getWalletsDetails(\n walletAddresses: WalletAddresses,\n options?: RequestOptions\n ): Promise<WalletDetailsResponse> {\n let walletAddressesQueryParams = ''\n for (let i = 0; i < walletAddresses.length; i++) {\n const walletAddress = walletAddresses[i]\n walletAddressesQueryParams += `&address=${walletAddress.blockchain}.${walletAddress.address}`\n }\n const axiosResponse = await this.httpService.get<WalletDetailsResponse>(\n `/wallets/details?apiKey=${this.apiKey}${walletAddressesQueryParams}`,\n { ...options }\n )\n return axiosResponse.data\n }\n}\n",null,null,null],"names":["RangoClient","apiKey","apiUrl","window","deviceId","localStorage","getItem","generatedId","uuid","setItem","e","httpService","axios","create","baseURL","getAllMetadata","options","get","axiosResponse","data","getBestRoute","requestBody","post","headers","checkApproval","requestId","checkStatus","createTransaction","reportFailure","getWalletsDetails","walletAddresses","walletAddressesQueryParams","i","length","walletAddress","blockchain","address","blockchainMeta"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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AAwB;MAAA;MAAA;QAAA;UAAA;YAAA;YAAA,OAEI,IAAI,CAACL,WAAW,CAACW,IAAI,2BACvB,IAAI,CAACrB,MAAM,EACnCoB,WAAW;cACTE,OAAO,EAAE;gBAAE,YAAY,EAAE,IAAI,CAACnB;;eAAeY,OAAO,EACvD;UAAA;YAJKE,aAAa;YAAA,kCAKZA,aAAa,CAACC,IAAI;UAAA;UAAA;YAAA;;;KAC1B;IAAA;MAAA;;IAAA;;EAAA,OAEYK,aAAa;IAAA,6FAAnB,kBACLC,SAAiB,
|
|
1
|
+
{"version":3,"file":"rango-sdk.cjs.development.js","sources":["../src/services/client.ts","../../../node_modules/rango-types/src/api/shared/type-gaurds.ts","../../../node_modules/rango-types/src/api/shared/routing.ts","../../../node_modules/rango-types/src/api/shared/transactions.ts"],"sourcesContent":["import uuid from 'uuid-random'\nimport {\n MetaResponse,\n BestRouteRequest,\n BestRouteResponse,\n CheckApprovalResponse,\n CheckTxStatusRequest,\n TransactionStatusResponse,\n CreateTransactionRequest,\n CreateTransactionResponse,\n ReportTransactionRequest,\n WalletDetailsResponse,\n RequestOptions,\n} from '../types'\nimport axios, { AxiosInstance } from 'axios'\n\ntype WalletAddresses = { blockchain: string; address: string }[]\n\nexport class RangoClient {\n private readonly deviceId: string\n private readonly apiKey: string\n private readonly apiUrl: string\n private readonly httpService: AxiosInstance\n\n constructor(apiKey: string, apiUrl?: string) {\n this.apiUrl = apiUrl || 'https://api.rango.exchange'\n this.apiKey = apiKey\n try {\n if (typeof window !== 'undefined') {\n const deviceId = localStorage.getItem('deviceId')\n if (deviceId) {\n this.deviceId = deviceId\n } else {\n const generatedId = uuid()\n localStorage.setItem('deviceId', generatedId)\n this.deviceId = generatedId\n }\n } else {\n this.deviceId = uuid()\n }\n } catch (e) {\n this.deviceId = uuid()\n }\n this.httpService = axios.create({\n baseURL: this.apiUrl,\n })\n }\n\n public async getAllMetadata(options?: RequestOptions): Promise<MetaResponse> {\n const axiosResponse = await this.httpService.get<MetaResponse>(\n `/meta?apiKey=${this.apiKey}`,\n { ...options }\n )\n return axiosResponse.data\n }\n\n public async getBestRoute(\n requestBody: BestRouteRequest,\n options?: RequestOptions\n ): Promise<BestRouteResponse> {\n const axiosResponse = await this.httpService.post<BestRouteResponse>(\n `/routing/best?apiKey=${this.apiKey}`,\n requestBody,\n { headers: { 'X-Rango-Id': this.deviceId }, ...options }\n )\n return axiosResponse.data\n }\n\n public async checkApproval(\n requestId: string,\n txId?: string,\n options?: RequestOptions\n ): Promise<CheckApprovalResponse> {\n const axiosResponse = await this.httpService.get<CheckApprovalResponse>(\n `/tx/${requestId}/check-approval?apiKey=${this.apiKey}`,\n { params: { txId }, ...options }\n )\n return axiosResponse.data\n }\n\n public async checkStatus(\n requestBody: CheckTxStatusRequest,\n options?: RequestOptions\n ): Promise<TransactionStatusResponse> {\n const axiosResponse =\n await this.httpService.post<TransactionStatusResponse>(\n `/tx/check-status?apiKey=${this.apiKey}`,\n requestBody,\n { ...options }\n )\n return axiosResponse.data\n }\n\n public async createTransaction(\n requestBody: CreateTransactionRequest,\n options?: RequestOptions\n ): Promise<CreateTransactionResponse> {\n const axiosResponse =\n await this.httpService.post<CreateTransactionResponse>(\n `/tx/create?apiKey=${this.apiKey}`,\n requestBody,\n { ...options }\n )\n return axiosResponse.data\n }\n\n public async reportFailure(\n requestBody: ReportTransactionRequest,\n options?: RequestOptions\n ): Promise<void> {\n await this.httpService.post(\n `/tx/report-tx?apiKey=${this.apiKey}`,\n requestBody,\n {\n ...options,\n }\n )\n }\n\n public async getWalletsDetails(\n walletAddresses: WalletAddresses,\n options?: RequestOptions\n ): Promise<WalletDetailsResponse> {\n let walletAddressesQueryParams = ''\n for (let i = 0; i < walletAddresses.length; i++) {\n const walletAddress = walletAddresses[i]\n walletAddressesQueryParams += `&address=${walletAddress.blockchain}.${walletAddress.address}`\n }\n const axiosResponse = await this.httpService.get<WalletDetailsResponse>(\n `/wallets/details?apiKey=${this.apiKey}${walletAddressesQueryParams}`,\n { ...options }\n )\n return axiosResponse.data\n }\n}\n",null,null,null],"names":["RangoClient","apiKey","apiUrl","window","deviceId","localStorage","getItem","generatedId","uuid","setItem","e","httpService","axios","create","baseURL","getAllMetadata","options","get","axiosResponse","data","getBestRoute","requestBody","post","headers","checkApproval","requestId","txId","params","checkStatus","createTransaction","reportFailure","getWalletsDetails","walletAddresses","walletAddressesQueryParams","i","length","walletAddress","blockchain","address","blockchainMeta"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAkBaA,WAAW;EAMtB,qBAAYC,MAAc,EAAEC,MAAe;IACzC,IAAI,CAACA,MAAM,GAAGA,MAAM,IAAI,4BAA4B;IACpD,IAAI,CAACD,MAAM,GAAGA,MAAM;IACpB,IAAI;MACF,IAAI,OAAOE,MAAM,KAAK,WAAW,EAAE;QACjC,IAAMC,QAAQ,GAAGC,YAAY,CAACC,OAAO,CAAC,UAAU,CAAC;QACjD,IAAIF,QAAQ,EAAE;UACZ,IAAI,CAACA,QAAQ,GAAGA,QAAQ;SACzB,MAAM;UACL,IAAMG,WAAW,GAAGC,IAAI,EAAE;UAC1BH,YAAY,CAACI,OAAO,CAAC,UAAU,EAAEF,WAAW,CAAC;UAC7C,IAAI,CAACH,QAAQ,GAAGG,WAAW;;OAE9B,MAAM;QACL,IAAI,CAACH,QAAQ,GAAGI,IAAI,EAAE;;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AA;UAAA;YAAA;;;KAC1B;IAAA;MAAA;;IAAA;;EAAA;AAAA;;mBCjG2B,2BAAA;;;qDAIUoB;;;AAGtC;;;AAKF;;;yDAI0CA;;;;;;;;;;;;;;;;;;;;;;;;;ACpD1C;;;;AAIA,AAAA;gCAAY;;;;;;ACJZ;;;AAGA,AAAA;;;;;;;;AASA,AAIA;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";function t(t){return t&&"object"==typeof t&&"default"in t?t.default:t}Object.defineProperty(exports,"__esModule",{value:!0});var e=t(require("uuid-random")),r=t(require("axios"));function n(){n=function(){return t};var t={},e=Object.prototype,r=e.hasOwnProperty,o=Object.defineProperty||function(t,e,r){t[e]=r.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",c=i.asyncIterator||"@@asyncIterator",u=i.toStringTag||"@@toStringTag";function s(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{s({},"")}catch(t){s=function(t,e,r){return t[e]=r}}function h(t,e,r,n){var i=Object.create((e&&e.prototype instanceof l?e:l).prototype),a=new L(n||[]);return o(i,"_invoke",{value:O(t,r,a)}),i}function p(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}t.wrap=h;var f={};function l(){}function v(){}function d(){}var y={};s(y,a,(function(){return this}));var g=Object.getPrototypeOf,x=g&&g(g(k([])));x&&x!==e&&r.call(x,a)&&(y=x);var m=d.prototype=l.prototype=Object.create(y);function w(t){["next","throw","return"].forEach((function(e){s(t,e,(function(t){return this._invoke(e,t)}))}))}function S(t,e){var n;o(this,"_invoke",{value:function(o,i){function a(){return new e((function(n,a){!function n(o,i,a,c){var u=p(t[o],t,i);if("throw"!==u.type){var s=u.arg,h=s.value;return h&&"object"==typeof h&&r.call(h,"__await")?e.resolve(h.__await).then((function(t){n("next",t,a,c)}),(function(t){n("throw",t,a,c)})):e.resolve(h).then((function(t){s.value=t,a(s)}),(function(t){return n("throw",t,a,c)}))}c(u.arg)}(o,i,n,a)}))}return n=n?n.then(a,a):a()}})}function O(t,e,r){var n="suspendedStart";return function(o,i){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===o)throw i;return{value:void 0,done:!0}}for(r.method=o,r.arg=i;;){var a=r.delegate;if(a){var c=E(a,r);if(c){if(c===f)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var u=p(t,e,r);if("normal"===u.type){if(n=r.done?"completed":"suspendedYield",u.arg===f)continue;return{value:u.arg,done:r.done}}"throw"===u.type&&(n="completed",r.method="throw",r.arg=u.arg)}}}function E(t,e){var r=e.method,n=t.iterator[r];if(void 0===n)return e.delegate=null,"throw"===r&&t.iterator.return&&(e.method="return",e.arg=void 0,E(t,e),"throw"===e.method)||"return"!==r&&(e.method="throw",e.arg=new TypeError("The iterator does not provide a '"+r+"' method")),f;var o=p(n,t.iterator,e.arg);if("throw"===o.type)return e.method="throw",e.arg=o.arg,e.delegate=null,f;var i=o.arg;return i?i.done?(e[t.resultName]=i.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,f):i:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,f)}function T(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function b(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function L(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(T,this),this.reset(!0)}function k(t){if(t){var e=t[a];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var n=-1,o=function e(){for(;++n<t.length;)if(r.call(t,n))return e.value=t[n],e.done=!1,e;return e.value=void 0,e.done=!0,e};return o.next=o}}return{next:N}}function N(){return{value:void 0,done:!0}}return v.prototype=d,o(m,"constructor",{value:d,configurable:!0}),o(d,"constructor",{value:v,configurable:!0}),v.displayName=s(d,u,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===v||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,d):(t.__proto__=d,s(t,u,"GeneratorFunction")),t.prototype=Object.create(m),t},t.awrap=function(t){return{__await:t}},w(S.prototype),s(S.prototype,c,(function(){return this})),t.AsyncIterator=S,t.async=function(e,r,n,o,i){void 0===i&&(i=Promise);var a=new S(h(e,r,n,o),i);return t.isGeneratorFunction(r)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},w(m),s(m,u,"Generator"),s(m,a,(function(){return this})),s(m,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},t.values=k,L.prototype={constructor:L,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(b),!t)for(var e in this)"t"===e.charAt(0)&&r.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function n(r,n){return a.type="throw",a.arg=t,e.next=r,n&&(e.method="next",e.arg=void 0),!!n}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var c=r.call(i,"catchLoc"),u=r.call(i,"finallyLoc");if(c&&u){if(this.prev<i.catchLoc)return n(i.catchLoc,!0);if(this.prev<i.finallyLoc)return n(i.finallyLoc)}else if(c){if(this.prev<i.catchLoc)return n(i.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return n(i.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,f):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),f},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),b(r),f}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;b(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:k(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=void 0),f}},t}function o(t,e,r,n,o,i,a){try{var c=t[i](a),u=c.value}catch(t){return void r(t)}c.done?e(u):Promise.resolve(u).then(n,o)}function i(t){return function(){var e=this,r=arguments;return new Promise((function(n,i){var a=t.apply(e,r);function c(t){o(a,n,i,c,u,"next",t)}function u(t){o(a,n,i,c,u,"throw",t)}c(void 0)}))}}function a(){return(a=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t}).apply(this,arguments)}var c,u,s,h,p=function(){function t(t,n){this.apiUrl=n||"https://api.rango.exchange",this.apiKey=t;try{if("undefined"!=typeof window){var o=localStorage.getItem("deviceId");if(o)this.deviceId=o;else{var i=e();localStorage.setItem("deviceId",i),this.deviceId=i}}else this.deviceId=e()}catch(t){this.deviceId=e()}this.httpService=r.create({baseURL:this.apiUrl})}var o=t.prototype;return o.getAllMetadata=function(){var t=i(n().mark((function t(e){return n().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.httpService.get("/meta?apiKey="+this.apiKey,a({},e));case 2:return t.abrupt("return",t.sent.data);case 4:case"end":return t.stop()}}),t,this)})));return function(e){return t.apply(this,arguments)}}(),o.getBestRoute=function(){var t=i(n().mark((function t(e,r){return n().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.httpService.post("/routing/best?apiKey="+this.apiKey,e,a({headers:{"X-Rango-Id":this.deviceId}},r));case 2:return t.abrupt("return",t.sent.data);case 4:case"end":return t.stop()}}),t,this)})));return function(e,r){return t.apply(this,arguments)}}(),o.checkApproval=function(){var t=i(n().mark((function t(e,r){return n().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.httpService.get("/tx/"+e+"/check-approval?apiKey="+this.apiKey,a({},r));case 2:return t.abrupt("return",t.sent.data);case 4:case"end":return t.stop()}}),t,this)})));return function(e,r){return t.apply(this,arguments)}}(),o.checkStatus=function(){var t=i(n().mark((function t(e,r){return n().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.httpService.post("/tx/check-status?apiKey="+this.apiKey,e,a({},r));case 2:return t.abrupt("return",t.sent.data);case 4:case"end":return t.stop()}}),t,this)})));return function(e,r){return t.apply(this,arguments)}}(),o.createTransaction=function(){var t=i(n().mark((function t(e,r){return n().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.httpService.post("/tx/create?apiKey="+this.apiKey,e,a({},r));case 2:return t.abrupt("return",t.sent.data);case 4:case"end":return t.stop()}}),t,this)})));return function(e,r){return t.apply(this,arguments)}}(),o.reportFailure=function(){var t=i(n().mark((function t(e,r){return n().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.httpService.post("/tx/report-tx?apiKey="+this.apiKey,e,a({},r));case 2:case"end":return t.stop()}}),t,this)})));return function(e,r){return t.apply(this,arguments)}}(),o.getWalletsDetails=function(){var t=i(n().mark((function t(e,r){var o,i,c;return n().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:for(o="",i=0;i<e.length;i++)o+="&address="+(c=e[i]).blockchain+"."+c.address;return t.next=4,this.httpService.get("/wallets/details?apiKey="+this.apiKey+o,a({},r));case 4:return t.abrupt("return",t.sent.data);case 6:case"end":return t.stop()}}),t,this)})));return function(e,r){return t.apply(this,arguments)}}(),t}(),f=function(t){return"EVM"===t.type},l=function(t){return"COSMOS"===t.type},v=function(t){return"SOLANA"===t.type},d=function(t){return"TRON"===t.type},y=function(t){return"TRANSFER"===t.type},g=function(t){return"STARKNET"===t.type};(c=exports.RoutingResultType||(exports.RoutingResultType={})).OK="OK",c.HIGH_IMPACT="HIGH_IMPACT",c.NO_ROUTE="NO_ROUTE",c.INPUT_LIMIT_ISSUE="INPUT_LIMIT_ISSUE",(u=exports.TransactionType||(exports.TransactionType={})).EVM="EVM",u.TRANSFER="TRANSFER",u.COSMOS="COSMOS",u.SOLANA="SOLANA",u.TRON="TRON",u.STARKNET="STARKNET",(s=exports.GenericTransactionType||(exports.GenericTransactionType={})).EVM="EVM",s.TRANSFER="TRANSFER",s.COSMOS="COSMOS",s.SOLANA="SOLANA",(h=exports.TransactionStatus||(exports.TransactionStatus={})).FAILED="failed",h.RUNNING="running",h.SUCCESS="success",exports.RangoClient=p,exports.cosmosBlockchains=function(t){return t.filter(l)},exports.evmBlockchains=function(t){return t.filter(f)},exports.isCosmosBlockchain=l,exports.isEvmBlockchain=f,exports.isSolanaBlockchain=v,exports.isStarknetBlockchain=g,exports.isTransferBlockchain=y,exports.isTronBlockchain=d,exports.solanaBlockchain=function(t){return t.filter(v)},exports.starknetBlockchain=function(t){return t.filter(g)},exports.transferBlockchains=function(t){return t.filter(y)},exports.tronBlockchain=function(t){return t.filter(d)};
|
|
1
|
+
"use strict";function t(t){return t&&"object"==typeof t&&"default"in t?t.default:t}Object.defineProperty(exports,"__esModule",{value:!0});var e=t(require("uuid-random")),r=t(require("axios"));function n(){n=function(){return t};var t={},e=Object.prototype,r=e.hasOwnProperty,o=Object.defineProperty||function(t,e,r){t[e]=r.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",c=i.asyncIterator||"@@asyncIterator",u=i.toStringTag||"@@toStringTag";function s(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{s({},"")}catch(t){s=function(t,e,r){return t[e]=r}}function p(t,e,r,n){var i=Object.create((e&&e.prototype instanceof l?e:l).prototype),a=new L(n||[]);return o(i,"_invoke",{value:O(t,r,a)}),i}function h(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}t.wrap=p;var f={};function l(){}function v(){}function d(){}var y={};s(y,a,(function(){return this}));var g=Object.getPrototypeOf,x=g&&g(g(k([])));x&&x!==e&&r.call(x,a)&&(y=x);var m=d.prototype=l.prototype=Object.create(y);function w(t){["next","throw","return"].forEach((function(e){s(t,e,(function(t){return this._invoke(e,t)}))}))}function S(t,e){var n;o(this,"_invoke",{value:function(o,i){function a(){return new e((function(n,a){!function n(o,i,a,c){var u=h(t[o],t,i);if("throw"!==u.type){var s=u.arg,p=s.value;return p&&"object"==typeof p&&r.call(p,"__await")?e.resolve(p.__await).then((function(t){n("next",t,a,c)}),(function(t){n("throw",t,a,c)})):e.resolve(p).then((function(t){s.value=t,a(s)}),(function(t){return n("throw",t,a,c)}))}c(u.arg)}(o,i,n,a)}))}return n=n?n.then(a,a):a()}})}function O(t,e,r){var n="suspendedStart";return function(o,i){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===o)throw i;return{value:void 0,done:!0}}for(r.method=o,r.arg=i;;){var a=r.delegate;if(a){var c=E(a,r);if(c){if(c===f)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var u=h(t,e,r);if("normal"===u.type){if(n=r.done?"completed":"suspendedYield",u.arg===f)continue;return{value:u.arg,done:r.done}}"throw"===u.type&&(n="completed",r.method="throw",r.arg=u.arg)}}}function E(t,e){var r=e.method,n=t.iterator[r];if(void 0===n)return e.delegate=null,"throw"===r&&t.iterator.return&&(e.method="return",e.arg=void 0,E(t,e),"throw"===e.method)||"return"!==r&&(e.method="throw",e.arg=new TypeError("The iterator does not provide a '"+r+"' method")),f;var o=h(n,t.iterator,e.arg);if("throw"===o.type)return e.method="throw",e.arg=o.arg,e.delegate=null,f;var i=o.arg;return i?i.done?(e[t.resultName]=i.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,f):i:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,f)}function T(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function b(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function L(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(T,this),this.reset(!0)}function k(t){if(t){var e=t[a];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var n=-1,o=function e(){for(;++n<t.length;)if(r.call(t,n))return e.value=t[n],e.done=!1,e;return e.value=void 0,e.done=!0,e};return o.next=o}}return{next:N}}function N(){return{value:void 0,done:!0}}return v.prototype=d,o(m,"constructor",{value:d,configurable:!0}),o(d,"constructor",{value:v,configurable:!0}),v.displayName=s(d,u,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===v||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,d):(t.__proto__=d,s(t,u,"GeneratorFunction")),t.prototype=Object.create(m),t},t.awrap=function(t){return{__await:t}},w(S.prototype),s(S.prototype,c,(function(){return this})),t.AsyncIterator=S,t.async=function(e,r,n,o,i){void 0===i&&(i=Promise);var a=new S(p(e,r,n,o),i);return t.isGeneratorFunction(r)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},w(m),s(m,u,"Generator"),s(m,a,(function(){return this})),s(m,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},t.values=k,L.prototype={constructor:L,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(b),!t)for(var e in this)"t"===e.charAt(0)&&r.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function n(r,n){return a.type="throw",a.arg=t,e.next=r,n&&(e.method="next",e.arg=void 0),!!n}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var c=r.call(i,"catchLoc"),u=r.call(i,"finallyLoc");if(c&&u){if(this.prev<i.catchLoc)return n(i.catchLoc,!0);if(this.prev<i.finallyLoc)return n(i.finallyLoc)}else if(c){if(this.prev<i.catchLoc)return n(i.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return n(i.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,f):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),f},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),b(r),f}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;b(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:k(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=void 0),f}},t}function o(t,e,r,n,o,i,a){try{var c=t[i](a),u=c.value}catch(t){return void r(t)}c.done?e(u):Promise.resolve(u).then(n,o)}function i(t){return function(){var e=this,r=arguments;return new Promise((function(n,i){var a=t.apply(e,r);function c(t){o(a,n,i,c,u,"next",t)}function u(t){o(a,n,i,c,u,"throw",t)}c(void 0)}))}}function a(){return(a=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t}).apply(this,arguments)}var c,u,s,p,h=function(){function t(t,n){this.apiUrl=n||"https://api.rango.exchange",this.apiKey=t;try{if("undefined"!=typeof window){var o=localStorage.getItem("deviceId");if(o)this.deviceId=o;else{var i=e();localStorage.setItem("deviceId",i),this.deviceId=i}}else this.deviceId=e()}catch(t){this.deviceId=e()}this.httpService=r.create({baseURL:this.apiUrl})}var o=t.prototype;return o.getAllMetadata=function(){var t=i(n().mark((function t(e){return n().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.httpService.get("/meta?apiKey="+this.apiKey,a({},e));case 2:return t.abrupt("return",t.sent.data);case 4:case"end":return t.stop()}}),t,this)})));return function(e){return t.apply(this,arguments)}}(),o.getBestRoute=function(){var t=i(n().mark((function t(e,r){return n().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.httpService.post("/routing/best?apiKey="+this.apiKey,e,a({headers:{"X-Rango-Id":this.deviceId}},r));case 2:return t.abrupt("return",t.sent.data);case 4:case"end":return t.stop()}}),t,this)})));return function(e,r){return t.apply(this,arguments)}}(),o.checkApproval=function(){var t=i(n().mark((function t(e,r,o){return n().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.httpService.get("/tx/"+e+"/check-approval?apiKey="+this.apiKey,a({params:{txId:r}},o));case 2:return t.abrupt("return",t.sent.data);case 4:case"end":return t.stop()}}),t,this)})));return function(e,r,n){return t.apply(this,arguments)}}(),o.checkStatus=function(){var t=i(n().mark((function t(e,r){return n().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.httpService.post("/tx/check-status?apiKey="+this.apiKey,e,a({},r));case 2:return t.abrupt("return",t.sent.data);case 4:case"end":return t.stop()}}),t,this)})));return function(e,r){return t.apply(this,arguments)}}(),o.createTransaction=function(){var t=i(n().mark((function t(e,r){return n().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.httpService.post("/tx/create?apiKey="+this.apiKey,e,a({},r));case 2:return t.abrupt("return",t.sent.data);case 4:case"end":return t.stop()}}),t,this)})));return function(e,r){return t.apply(this,arguments)}}(),o.reportFailure=function(){var t=i(n().mark((function t(e,r){return n().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.httpService.post("/tx/report-tx?apiKey="+this.apiKey,e,a({},r));case 2:case"end":return t.stop()}}),t,this)})));return function(e,r){return t.apply(this,arguments)}}(),o.getWalletsDetails=function(){var t=i(n().mark((function t(e,r){var o,i,c;return n().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:for(o="",i=0;i<e.length;i++)o+="&address="+(c=e[i]).blockchain+"."+c.address;return t.next=4,this.httpService.get("/wallets/details?apiKey="+this.apiKey+o,a({},r));case 4:return t.abrupt("return",t.sent.data);case 6:case"end":return t.stop()}}),t,this)})));return function(e,r){return t.apply(this,arguments)}}(),t}(),f=function(t){return"EVM"===t.type},l=function(t){return"COSMOS"===t.type},v=function(t){return"SOLANA"===t.type},d=function(t){return"TRON"===t.type},y=function(t){return"TRANSFER"===t.type},g=function(t){return"STARKNET"===t.type};(c=exports.RoutingResultType||(exports.RoutingResultType={})).OK="OK",c.HIGH_IMPACT="HIGH_IMPACT",c.NO_ROUTE="NO_ROUTE",c.INPUT_LIMIT_ISSUE="INPUT_LIMIT_ISSUE",(u=exports.TransactionType||(exports.TransactionType={})).EVM="EVM",u.TRANSFER="TRANSFER",u.COSMOS="COSMOS",u.SOLANA="SOLANA",u.TRON="TRON",u.STARKNET="STARKNET",(s=exports.GenericTransactionType||(exports.GenericTransactionType={})).EVM="EVM",s.TRANSFER="TRANSFER",s.COSMOS="COSMOS",s.SOLANA="SOLANA",(p=exports.TransactionStatus||(exports.TransactionStatus={})).FAILED="failed",p.RUNNING="running",p.SUCCESS="success",exports.RangoClient=h,exports.cosmosBlockchains=function(t){return t.filter(l)},exports.evmBlockchains=function(t){return t.filter(f)},exports.isCosmosBlockchain=l,exports.isEvmBlockchain=f,exports.isSolanaBlockchain=v,exports.isStarknetBlockchain=g,exports.isTransferBlockchain=y,exports.isTronBlockchain=d,exports.solanaBlockchain=function(t){return t.filter(v)},exports.starknetBlockchain=function(t){return t.filter(g)},exports.transferBlockchains=function(t){return t.filter(y)},exports.tronBlockchain=function(t){return t.filter(d)};
|
|
2
2
|
//# sourceMappingURL=rango-sdk.cjs.production.min.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"rango-sdk.cjs.production.min.js","sources":["../src/services/client.ts","../../../node_modules/rango-types/src/api/shared/type-gaurds.ts"],"sourcesContent":["import uuid from 'uuid-random'\nimport {\n MetaResponse,\n BestRouteRequest,\n BestRouteResponse,\n CheckApprovalResponse,\n CheckTxStatusRequest,\n TransactionStatusResponse,\n CreateTransactionRequest,\n CreateTransactionResponse,\n ReportTransactionRequest,\n WalletDetailsResponse,\n RequestOptions,\n} from '../types'\nimport axios, { AxiosInstance } from 'axios'\n\ntype WalletAddresses = { blockchain: string; address: string }[]\n\nexport class RangoClient {\n private readonly deviceId: string\n private readonly apiKey: string\n private readonly apiUrl: string\n private readonly httpService: AxiosInstance\n\n constructor(apiKey: string, apiUrl?: string) {\n this.apiUrl = apiUrl || 'https://api.rango.exchange'\n this.apiKey = apiKey\n try {\n if (typeof window !== 'undefined') {\n const deviceId = localStorage.getItem('deviceId')\n if (deviceId) {\n this.deviceId = deviceId\n } else {\n const generatedId = uuid()\n localStorage.setItem('deviceId', generatedId)\n this.deviceId = generatedId\n }\n } else {\n this.deviceId = uuid()\n }\n } catch (e) {\n this.deviceId = uuid()\n }\n this.httpService = axios.create({\n baseURL: this.apiUrl,\n })\n }\n\n public async getAllMetadata(options?: RequestOptions): Promise<MetaResponse> {\n const axiosResponse = await this.httpService.get<MetaResponse>(\n `/meta?apiKey=${this.apiKey}`,\n { ...options }\n )\n return axiosResponse.data\n }\n\n public async getBestRoute(\n requestBody: BestRouteRequest,\n options?: RequestOptions\n ): Promise<BestRouteResponse> {\n const axiosResponse = await this.httpService.post<BestRouteResponse>(\n `/routing/best?apiKey=${this.apiKey}`,\n requestBody,\n { headers: { 'X-Rango-Id': this.deviceId }, ...options }\n )\n return axiosResponse.data\n }\n\n public async checkApproval(\n requestId: string,\n options?: RequestOptions\n ): Promise<CheckApprovalResponse> {\n const axiosResponse = await this.httpService.get<CheckApprovalResponse>(\n `/tx/${requestId}/check-approval?apiKey=${this.apiKey}`,\n { ...options }\n )\n return axiosResponse.data\n }\n\n public async checkStatus(\n requestBody: CheckTxStatusRequest,\n options?: RequestOptions\n ): Promise<TransactionStatusResponse> {\n const axiosResponse =\n await this.httpService.post<TransactionStatusResponse>(\n `/tx/check-status?apiKey=${this.apiKey}`,\n requestBody,\n { ...options }\n )\n return axiosResponse.data\n }\n\n public async createTransaction(\n requestBody: CreateTransactionRequest,\n options?: RequestOptions\n ): Promise<CreateTransactionResponse> {\n const axiosResponse =\n await this.httpService.post<CreateTransactionResponse>(\n `/tx/create?apiKey=${this.apiKey}`,\n requestBody,\n { ...options }\n )\n return axiosResponse.data\n }\n\n public async reportFailure(\n requestBody: ReportTransactionRequest,\n options?: RequestOptions\n ): Promise<void> {\n await this.httpService.post(\n `/tx/report-tx?apiKey=${this.apiKey}`,\n requestBody,\n {\n ...options,\n }\n )\n }\n\n public async getWalletsDetails(\n walletAddresses: WalletAddresses,\n options?: RequestOptions\n ): Promise<WalletDetailsResponse> {\n let walletAddressesQueryParams = ''\n for (let i = 0; i < walletAddresses.length; i++) {\n const walletAddress = walletAddresses[i]\n walletAddressesQueryParams += `&address=${walletAddress.blockchain}.${walletAddress.address}`\n }\n const axiosResponse = await this.httpService.get<WalletDetailsResponse>(\n `/wallets/details?apiKey=${this.apiKey}${walletAddressesQueryParams}`,\n { ...options }\n )\n return axiosResponse.data\n }\n}\n",null],"names":["RangoClient","apiKey","apiUrl","this","window","deviceId","localStorage","getItem","generatedId","uuid","setItem","e","httpService","axios","create","baseURL","_proto","getAllMetadata","options","_context","get","data","getBestRoute","requestBody","_context2","post","headers","X-Rango-Id","checkApproval","requestId","_context3","checkStatus","_context4","createTransaction","_context5","reportFailure","_context6","getWalletsDetails","walletAddresses","walletAddressesQueryParams","i","length","walletAddress","blockchain","address","_context7","blockchainMeta"],"mappings":"krOAkBaA,aAMX,WAAYC,EAAgBC,GAC1BC,KAAKD,OAASA,GAAU,6BACxBC,KAAKF,OAASA,EACd,IACE,GAAsB,oBAAXG,OAAwB,CACjC,IAAMC,EAAWC,aAAaC,QAAQ,YACtC,GAAIF,EACFF,KAAKE,SAAWA,MACX,CACL,IAAMG,EAAcC,IACpBH,aAAaI,QAAQ,WAAYF,GACjCL,KAAKE,SAAWG,QAGlBL,KAAKE,SAAWI,IAElB,MAAOE,GACPR,KAAKE,SAAWI,IAElBN,KAAKS,YAAcC,EAAMC,OAAO,CAC9BC,QAASZ,KAAKD,SAEjB,
|
|
1
|
+
{"version":3,"file":"rango-sdk.cjs.production.min.js","sources":["../src/services/client.ts","../../../node_modules/rango-types/src/api/shared/type-gaurds.ts"],"sourcesContent":["import uuid from 'uuid-random'\nimport {\n MetaResponse,\n BestRouteRequest,\n BestRouteResponse,\n CheckApprovalResponse,\n CheckTxStatusRequest,\n TransactionStatusResponse,\n CreateTransactionRequest,\n CreateTransactionResponse,\n ReportTransactionRequest,\n WalletDetailsResponse,\n RequestOptions,\n} from '../types'\nimport axios, { AxiosInstance } from 'axios'\n\ntype WalletAddresses = { blockchain: string; address: string }[]\n\nexport class RangoClient {\n private readonly deviceId: string\n private readonly apiKey: string\n private readonly apiUrl: string\n private readonly httpService: AxiosInstance\n\n constructor(apiKey: string, apiUrl?: string) {\n this.apiUrl = apiUrl || 'https://api.rango.exchange'\n this.apiKey = apiKey\n try {\n if (typeof window !== 'undefined') {\n const deviceId = localStorage.getItem('deviceId')\n if (deviceId) {\n this.deviceId = deviceId\n } else {\n const generatedId = uuid()\n localStorage.setItem('deviceId', generatedId)\n this.deviceId = generatedId\n }\n } else {\n this.deviceId = uuid()\n }\n } catch (e) {\n this.deviceId = uuid()\n }\n this.httpService = axios.create({\n baseURL: this.apiUrl,\n })\n }\n\n public async getAllMetadata(options?: RequestOptions): Promise<MetaResponse> {\n const axiosResponse = await this.httpService.get<MetaResponse>(\n `/meta?apiKey=${this.apiKey}`,\n { ...options }\n )\n return axiosResponse.data\n }\n\n public async getBestRoute(\n requestBody: BestRouteRequest,\n options?: RequestOptions\n ): Promise<BestRouteResponse> {\n const axiosResponse = await this.httpService.post<BestRouteResponse>(\n `/routing/best?apiKey=${this.apiKey}`,\n requestBody,\n { headers: { 'X-Rango-Id': this.deviceId }, ...options }\n )\n return axiosResponse.data\n }\n\n public async checkApproval(\n requestId: string,\n txId?: string,\n options?: RequestOptions\n ): Promise<CheckApprovalResponse> {\n const axiosResponse = await this.httpService.get<CheckApprovalResponse>(\n `/tx/${requestId}/check-approval?apiKey=${this.apiKey}`,\n { params: { txId }, ...options }\n )\n return axiosResponse.data\n }\n\n public async checkStatus(\n requestBody: CheckTxStatusRequest,\n options?: RequestOptions\n ): Promise<TransactionStatusResponse> {\n const axiosResponse =\n await this.httpService.post<TransactionStatusResponse>(\n `/tx/check-status?apiKey=${this.apiKey}`,\n requestBody,\n { ...options }\n )\n return axiosResponse.data\n }\n\n public async createTransaction(\n requestBody: CreateTransactionRequest,\n options?: RequestOptions\n ): Promise<CreateTransactionResponse> {\n const axiosResponse =\n await this.httpService.post<CreateTransactionResponse>(\n `/tx/create?apiKey=${this.apiKey}`,\n requestBody,\n { ...options }\n )\n return axiosResponse.data\n }\n\n public async reportFailure(\n requestBody: ReportTransactionRequest,\n options?: RequestOptions\n ): Promise<void> {\n await this.httpService.post(\n `/tx/report-tx?apiKey=${this.apiKey}`,\n requestBody,\n {\n ...options,\n }\n )\n }\n\n public async getWalletsDetails(\n walletAddresses: WalletAddresses,\n options?: RequestOptions\n ): Promise<WalletDetailsResponse> {\n let walletAddressesQueryParams = ''\n for (let i = 0; i < walletAddresses.length; i++) {\n const walletAddress = walletAddresses[i]\n walletAddressesQueryParams += `&address=${walletAddress.blockchain}.${walletAddress.address}`\n }\n const axiosResponse = await this.httpService.get<WalletDetailsResponse>(\n `/wallets/details?apiKey=${this.apiKey}${walletAddressesQueryParams}`,\n { ...options }\n )\n return axiosResponse.data\n }\n}\n",null],"names":["RangoClient","apiKey","apiUrl","this","window","deviceId","localStorage","getItem","generatedId","uuid","setItem","e","httpService","axios","create","baseURL","_proto","getAllMetadata","options","_context","get","data","getBestRoute","requestBody","_context2","post","headers","X-Rango-Id","checkApproval","requestId","txId","_context3","params","checkStatus","_context4","createTransaction","_context5","reportFailure","_context6","getWalletsDetails","walletAddresses","walletAddressesQueryParams","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AAI,OAAA,UAAA,+BAC1B,OAAA,cAAA,mCAAAL,EAEYmB,6BAAiB,kBAAvB,WACLZ,EACAL,GAAwB,6BAAA,6BAAA,OAAA,OAAAkB,SAGhBjC,KAAKS,YAAYa,0BACAtB,KAAKF,OAC1BsB,OACKL,IACN,OALgB,gCAMEG,MAAI,OAAA,UAAA,+BAC1B,OAAA,cAAA,mCAAAL,EAEYqB,yBAAa,kBAAnB,WACLd,EACAL,GAAwB,6BAAA,6BAAA,OAAA,OAAAoB,SAElBnC,KAAKS,YAAYa,6BACGtB,KAAKF,OAC7BsB,OAEKL,IAEN,OAAA,UAAA,+BACF,OAAA,cAAA,mCAAAF,EAEYuB,6BAAiB,kBAAvB,WACLC,EACAtB,GAAwB,UAAA,6BAAA,6BAAA,OAGxB,IADIuB,EAA6B,GACxBC,EAAI,EAAGA,EAAIF,EAAgBG,OAAQD,IAE1CD,gBADMG,EAAgBJ,EAAgBE,IACkBG,eAAcD,EAAcE,QACrF,OAAAC,SAC2B5C,KAAKS,YAAYQ,+BAChBjB,KAAKF,OAASwC,OACpCvB,IACN,OAHkB,gCAIEG,MAAI,OAAA,UAAA,+BAC1B,OAAA,cAAA,uFC7FqC2B,mHAYEA"}
|
package/lib/rango-sdk.esm.js
CHANGED
|
@@ -421,13 +421,17 @@ var RangoClient = /*#__PURE__*/function () {
|
|
|
421
421
|
return getBestRoute;
|
|
422
422
|
}();
|
|
423
423
|
_proto.checkApproval = /*#__PURE__*/function () {
|
|
424
|
-
var _checkApproval = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3(requestId, options) {
|
|
424
|
+
var _checkApproval = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3(requestId, txId, options) {
|
|
425
425
|
var axiosResponse;
|
|
426
426
|
return _regeneratorRuntime().wrap(function _callee3$(_context3) {
|
|
427
427
|
while (1) switch (_context3.prev = _context3.next) {
|
|
428
428
|
case 0:
|
|
429
429
|
_context3.next = 2;
|
|
430
|
-
return this.httpService.get("/tx/" + requestId + "/check-approval?apiKey=" + this.apiKey, _extends({
|
|
430
|
+
return this.httpService.get("/tx/" + requestId + "/check-approval?apiKey=" + this.apiKey, _extends({
|
|
431
|
+
params: {
|
|
432
|
+
txId: txId
|
|
433
|
+
}
|
|
434
|
+
}, options));
|
|
431
435
|
case 2:
|
|
432
436
|
axiosResponse = _context3.sent;
|
|
433
437
|
return _context3.abrupt("return", axiosResponse.data);
|
|
@@ -437,7 +441,7 @@ var RangoClient = /*#__PURE__*/function () {
|
|
|
437
441
|
}
|
|
438
442
|
}, _callee3, this);
|
|
439
443
|
}));
|
|
440
|
-
function checkApproval(_x4, _x5) {
|
|
444
|
+
function checkApproval(_x4, _x5, _x6) {
|
|
441
445
|
return _checkApproval.apply(this, arguments);
|
|
442
446
|
}
|
|
443
447
|
return checkApproval;
|
|
@@ -459,7 +463,7 @@ var RangoClient = /*#__PURE__*/function () {
|
|
|
459
463
|
}
|
|
460
464
|
}, _callee4, this);
|
|
461
465
|
}));
|
|
462
|
-
function checkStatus(
|
|
466
|
+
function checkStatus(_x7, _x8) {
|
|
463
467
|
return _checkStatus.apply(this, arguments);
|
|
464
468
|
}
|
|
465
469
|
return checkStatus;
|
|
@@ -481,7 +485,7 @@ var RangoClient = /*#__PURE__*/function () {
|
|
|
481
485
|
}
|
|
482
486
|
}, _callee5, this);
|
|
483
487
|
}));
|
|
484
|
-
function createTransaction(
|
|
488
|
+
function createTransaction(_x9, _x10) {
|
|
485
489
|
return _createTransaction.apply(this, arguments);
|
|
486
490
|
}
|
|
487
491
|
return createTransaction;
|
|
@@ -499,7 +503,7 @@ var RangoClient = /*#__PURE__*/function () {
|
|
|
499
503
|
}
|
|
500
504
|
}, _callee6, this);
|
|
501
505
|
}));
|
|
502
|
-
function reportFailure(
|
|
506
|
+
function reportFailure(_x11, _x12) {
|
|
503
507
|
return _reportFailure.apply(this, arguments);
|
|
504
508
|
}
|
|
505
509
|
return reportFailure;
|
|
@@ -526,7 +530,7 @@ var RangoClient = /*#__PURE__*/function () {
|
|
|
526
530
|
}
|
|
527
531
|
}, _callee7, this);
|
|
528
532
|
}));
|
|
529
|
-
function getWalletsDetails(
|
|
533
|
+
function getWalletsDetails(_x13, _x14) {
|
|
530
534
|
return _getWalletsDetails.apply(this, arguments);
|
|
531
535
|
}
|
|
532
536
|
return getWalletsDetails;
|
package/lib/rango-sdk.esm.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"rango-sdk.esm.js","sources":["../src/services/client.ts","../../../node_modules/rango-types/src/api/shared/type-gaurds.ts","../../../node_modules/rango-types/src/api/shared/routing.ts","../../../node_modules/rango-types/src/api/shared/transactions.ts"],"sourcesContent":["import uuid from 'uuid-random'\nimport {\n MetaResponse,\n BestRouteRequest,\n BestRouteResponse,\n CheckApprovalResponse,\n CheckTxStatusRequest,\n TransactionStatusResponse,\n CreateTransactionRequest,\n CreateTransactionResponse,\n ReportTransactionRequest,\n WalletDetailsResponse,\n RequestOptions,\n} from '../types'\nimport axios, { AxiosInstance } from 'axios'\n\ntype WalletAddresses = { blockchain: string; address: string }[]\n\nexport class RangoClient {\n private readonly deviceId: string\n private readonly apiKey: string\n private readonly apiUrl: string\n private readonly httpService: AxiosInstance\n\n constructor(apiKey: string, apiUrl?: string) {\n this.apiUrl = apiUrl || 'https://api.rango.exchange'\n this.apiKey = apiKey\n try {\n if (typeof window !== 'undefined') {\n const deviceId = localStorage.getItem('deviceId')\n if (deviceId) {\n this.deviceId = deviceId\n } else {\n const generatedId = uuid()\n localStorage.setItem('deviceId', generatedId)\n this.deviceId = generatedId\n }\n } else {\n this.deviceId = uuid()\n }\n } catch (e) {\n this.deviceId = uuid()\n }\n this.httpService = axios.create({\n baseURL: this.apiUrl,\n })\n }\n\n public async getAllMetadata(options?: RequestOptions): Promise<MetaResponse> {\n const axiosResponse = await this.httpService.get<MetaResponse>(\n `/meta?apiKey=${this.apiKey}`,\n { ...options }\n )\n return axiosResponse.data\n }\n\n public async getBestRoute(\n requestBody: BestRouteRequest,\n options?: RequestOptions\n ): Promise<BestRouteResponse> {\n const axiosResponse = await this.httpService.post<BestRouteResponse>(\n `/routing/best?apiKey=${this.apiKey}`,\n requestBody,\n { headers: { 'X-Rango-Id': this.deviceId }, ...options }\n )\n return axiosResponse.data\n }\n\n public async checkApproval(\n requestId: string,\n options?: RequestOptions\n ): Promise<CheckApprovalResponse> {\n const axiosResponse = await this.httpService.get<CheckApprovalResponse>(\n `/tx/${requestId}/check-approval?apiKey=${this.apiKey}`,\n { ...options }\n )\n return axiosResponse.data\n }\n\n public async checkStatus(\n requestBody: CheckTxStatusRequest,\n options?: RequestOptions\n ): Promise<TransactionStatusResponse> {\n const axiosResponse =\n await this.httpService.post<TransactionStatusResponse>(\n `/tx/check-status?apiKey=${this.apiKey}`,\n requestBody,\n { ...options }\n )\n return axiosResponse.data\n }\n\n public async createTransaction(\n requestBody: CreateTransactionRequest,\n options?: RequestOptions\n ): Promise<CreateTransactionResponse> {\n const axiosResponse =\n await this.httpService.post<CreateTransactionResponse>(\n `/tx/create?apiKey=${this.apiKey}`,\n requestBody,\n { ...options }\n )\n return axiosResponse.data\n }\n\n public async reportFailure(\n requestBody: ReportTransactionRequest,\n options?: RequestOptions\n ): Promise<void> {\n await this.httpService.post(\n `/tx/report-tx?apiKey=${this.apiKey}`,\n requestBody,\n {\n ...options,\n }\n )\n }\n\n public async getWalletsDetails(\n walletAddresses: WalletAddresses,\n options?: RequestOptions\n ): Promise<WalletDetailsResponse> {\n let walletAddressesQueryParams = ''\n for (let i = 0; i < walletAddresses.length; i++) {\n const walletAddress = walletAddresses[i]\n walletAddressesQueryParams += `&address=${walletAddress.blockchain}.${walletAddress.address}`\n }\n const axiosResponse = await this.httpService.get<WalletDetailsResponse>(\n `/wallets/details?apiKey=${this.apiKey}${walletAddressesQueryParams}`,\n { ...options }\n )\n return axiosResponse.data\n }\n}\n",null,null,null],"names":["RangoClient","apiKey","apiUrl","window","deviceId","localStorage","getItem","generatedId","uuid","setItem","e","httpService","axios","create","baseURL","getAllMetadata","options","get","axiosResponse","data","getBestRoute","requestBody","post","headers","checkApproval","requestId","checkStatus","createTransaction","reportFailure","getWalletsDetails","walletAddresses","walletAddressesQueryParams","i","length","walletAddress","blockchain","address","blockchainMeta"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAkBaA,WAAW;EAMtB,qBAAYC,MAAc,EAAEC,MAAe;IACzC,IAAI,CAACA,MAAM,GAAGA,MAAM,IAAI,4BAA4B;IACpD,IAAI,CAACD,MAAM,GAAGA,MAAM;IACpB,IAAI;MACF,IAAI,OAAOE,MAAM,KAAK,WAAW,EAAE;QACjC,IAAMC,QAAQ,GAAGC,YAAY,CAACC,OAAO,CAAC,UAAU,CAAC;QACjD,IAAIF,QAAQ,EAAE;UACZ,IAAI,CAACA,QAAQ,GAAGA,QAAQ;SACzB,MAAM;UACL,IAAMG,WAAW,GAAGC,IAAI,EAAE;UAC1BH,YAAY,CAACI,OAAO,CAAC,UAAU,EAAEF,WAAW,CAAC;UAC7C,IAAI,CAACH,QAAQ,GAAGG,WAAW;;OAE9B,MAAM;QACL,IAAI,CAACH,QAAQ,GAAGI,IAAI,EAAE;;KAEzB,CAAC,OAAOE,CAAC,EAAE;MACV,IAAI,CAACN,QAAQ,GAAGI,IAAI,EAAE;;IAExB,IAAI,CAACG,WAAW,GAAGC,KAAK,CAACC,MAAM,CAAC;MAC9BC,OAAO,EAAE,IAAI,CAACZ;KACf,CAAC;;EACH;EAAA,OAEYa,cAAc;IAAA,8FAApB,iBAAqBC,OAAwB;MAAA;MAAA;QAAA;UAAA;YAAA;YAAA,OACtB,IAAI,CAACL,WAAW,CAACM,GAAG,mBAC9B,IAAI,CAAChB,MAAM,eACtBe,OAAO,EACb;UAAA;YAHKE,aAAa;YAAA,iCAIZA,aAAa,CAACC,IAAI;UAAA;UAAA;YAAA;;;KAC1B;IAAA;MAAA;;IAAA;;EAAA,OAEYC,YAAY;IAAA,4FAAlB,kBACLC,WAA6B,EAC7BL,OAAwB;MAAA;MAAA;QAAA;UAAA;YAAA;YAAA,OAEI,IAAI,CAACL,WAAW,CAACW,IAAI,2BACvB,IAAI,CAACrB,MAAM,EACnCoB,WAAW;cACTE,OAAO,EAAE;gBAAE,YAAY,EAAE,IAAI,CAACnB;;eAAeY,OAAO,EACvD;UAAA;YAJKE,aAAa;YAAA,kCAKZA,aAAa,CAACC,IAAI;UAAA;UAAA;YAAA;;;KAC1B;IAAA;MAAA;;IAAA;;EAAA,OAEYK,aAAa;IAAA,6FAAnB,kBACLC,SAAiB,
|
|
1
|
+
{"version":3,"file":"rango-sdk.esm.js","sources":["../src/services/client.ts","../../../node_modules/rango-types/src/api/shared/type-gaurds.ts","../../../node_modules/rango-types/src/api/shared/routing.ts","../../../node_modules/rango-types/src/api/shared/transactions.ts"],"sourcesContent":["import uuid from 'uuid-random'\nimport {\n MetaResponse,\n BestRouteRequest,\n BestRouteResponse,\n CheckApprovalResponse,\n CheckTxStatusRequest,\n TransactionStatusResponse,\n CreateTransactionRequest,\n CreateTransactionResponse,\n ReportTransactionRequest,\n WalletDetailsResponse,\n RequestOptions,\n} from '../types'\nimport axios, { AxiosInstance } from 'axios'\n\ntype WalletAddresses = { blockchain: string; address: string }[]\n\nexport class RangoClient {\n private readonly deviceId: string\n private readonly apiKey: string\n private readonly apiUrl: string\n private readonly httpService: AxiosInstance\n\n constructor(apiKey: string, apiUrl?: string) {\n this.apiUrl = apiUrl || 'https://api.rango.exchange'\n this.apiKey = apiKey\n try {\n if (typeof window !== 'undefined') {\n const deviceId = localStorage.getItem('deviceId')\n if (deviceId) {\n this.deviceId = deviceId\n } else {\n const generatedId = uuid()\n localStorage.setItem('deviceId', generatedId)\n this.deviceId = generatedId\n }\n } else {\n this.deviceId = uuid()\n }\n } catch (e) {\n this.deviceId = uuid()\n }\n this.httpService = axios.create({\n baseURL: this.apiUrl,\n })\n }\n\n public async getAllMetadata(options?: RequestOptions): Promise<MetaResponse> {\n const axiosResponse = await this.httpService.get<MetaResponse>(\n `/meta?apiKey=${this.apiKey}`,\n { ...options }\n )\n return axiosResponse.data\n }\n\n public async getBestRoute(\n requestBody: BestRouteRequest,\n options?: RequestOptions\n ): Promise<BestRouteResponse> {\n const axiosResponse = await this.httpService.post<BestRouteResponse>(\n `/routing/best?apiKey=${this.apiKey}`,\n requestBody,\n { headers: { 'X-Rango-Id': this.deviceId }, ...options }\n )\n return axiosResponse.data\n }\n\n public async checkApproval(\n requestId: string,\n txId?: string,\n options?: RequestOptions\n ): Promise<CheckApprovalResponse> {\n const axiosResponse = await this.httpService.get<CheckApprovalResponse>(\n `/tx/${requestId}/check-approval?apiKey=${this.apiKey}`,\n { params: { txId }, ...options }\n )\n return axiosResponse.data\n }\n\n public async checkStatus(\n requestBody: CheckTxStatusRequest,\n options?: RequestOptions\n ): Promise<TransactionStatusResponse> {\n const axiosResponse =\n await this.httpService.post<TransactionStatusResponse>(\n `/tx/check-status?apiKey=${this.apiKey}`,\n requestBody,\n { ...options }\n )\n return axiosResponse.data\n }\n\n public async createTransaction(\n requestBody: CreateTransactionRequest,\n options?: RequestOptions\n ): Promise<CreateTransactionResponse> {\n const axiosResponse =\n await this.httpService.post<CreateTransactionResponse>(\n `/tx/create?apiKey=${this.apiKey}`,\n requestBody,\n { ...options }\n )\n return axiosResponse.data\n }\n\n public async reportFailure(\n requestBody: ReportTransactionRequest,\n options?: RequestOptions\n ): Promise<void> {\n await this.httpService.post(\n `/tx/report-tx?apiKey=${this.apiKey}`,\n requestBody,\n {\n ...options,\n }\n )\n }\n\n public async getWalletsDetails(\n walletAddresses: WalletAddresses,\n options?: RequestOptions\n ): Promise<WalletDetailsResponse> {\n let walletAddressesQueryParams = ''\n for (let i = 0; i < walletAddresses.length; i++) {\n const walletAddress = walletAddresses[i]\n walletAddressesQueryParams += `&address=${walletAddress.blockchain}.${walletAddress.address}`\n }\n const axiosResponse = await this.httpService.get<WalletDetailsResponse>(\n `/wallets/details?apiKey=${this.apiKey}${walletAddressesQueryParams}`,\n { ...options }\n )\n return axiosResponse.data\n }\n}\n",null,null,null],"names":["RangoClient","apiKey","apiUrl","window","deviceId","localStorage","getItem","generatedId","uuid","setItem","e","httpService","axios","create","baseURL","getAllMetadata","options","get","axiosResponse","data","getBestRoute","requestBody","post","headers","checkApproval","requestId","txId","params","checkStatus","createTransaction","reportFailure","getWalletsDetails","walletAddresses","walletAddressesQueryParams","i","length","walletAddress","blockchain","address","blockchainMeta"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAkBaA,WAAW;EAMtB,qBAAYC,MAAc,EAAEC,MAAe;IACzC,IAAI,CAACA,MAAM,GAAGA,MAAM,IAAI,4BAA4B;I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MAAA;QAAA;UAAA;YAEpBiB,0BAA0B,GAAG,EAAE;YACnC,KAASC,CAAC,GAAG,CAAC,EAAEA,CAAC,GAAGF,eAAe,CAACG,MAAM,EAAED,CAAC,EAAE,EAAE;cACzCE,aAAa,GAAGJ,eAAe,CAACE,CAAC,CAAC;cACxCD,0BAA0B,kBAAgBG,aAAa,CAACC,UAAU,SAAID,aAAa,CAACE,OAAS;;YAC9F;YAAA,OAC2B,IAAI,CAAC3B,WAAW,CAACM,GAAG,8BACnB,IAAI,CAAChB,MAAM,GAAGgC,0BAA0B,eAC9DjB,OAAO,EACb;UAAA;YAHKE,aAAa;YAAA,kCAIZA,aAAa,CAACC,IAAI;UAAA;UAAA;YAAA;;;KAC1B;IAAA;MAAA;;IAAA;;EAAA;AAAA;;mBCjG2B,2BAAA;;;qDAIUoB;;;AAGtC;;;AAKF;;;yDAI0CA;;;;;;;;;;;;;;;;;;;;;;;;;ACpD1C;;;;AAIA;AAAA;gCAAY;;;;;;ACJZ;;;AAGA;AAAA;;;;;;;;AASA;;;;AAIA;AAAA;;;;;;;;;;;;;;;;;;"}
|
package/lib/services/client.d.ts
CHANGED
|
@@ -11,7 +11,7 @@ export declare class RangoClient {
|
|
|
11
11
|
constructor(apiKey: string, apiUrl?: string);
|
|
12
12
|
getAllMetadata(options?: RequestOptions): Promise<MetaResponse>;
|
|
13
13
|
getBestRoute(requestBody: BestRouteRequest, options?: RequestOptions): Promise<BestRouteResponse>;
|
|
14
|
-
checkApproval(requestId: string, options?: RequestOptions): Promise<CheckApprovalResponse>;
|
|
14
|
+
checkApproval(requestId: string, txId?: string, options?: RequestOptions): Promise<CheckApprovalResponse>;
|
|
15
15
|
checkStatus(requestBody: CheckTxStatusRequest, options?: RequestOptions): Promise<TransactionStatusResponse>;
|
|
16
16
|
createTransaction(requestBody: CreateTransactionRequest, options?: RequestOptions): Promise<CreateTransactionResponse>;
|
|
17
17
|
reportFailure(requestBody: ReportTransactionRequest, options?: RequestOptions): Promise<void>;
|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