Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@bloks/api

Package Overview
Dependencies
Maintainers
1
Versions
270
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@bloks/api - npm Package Compare versions

Comparing version 24.0.5 to 24.0.6

2

dist/api.cjs.production.min.js

@@ -1,2 +0,2 @@

"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("@proton/js"),t=require("@bloks/constants"),r=require("@eoscafe/hyperion"),n=require("@eoscafe/light-api"),o=require("@bloks/utils"),i=require("@bloks/numbers");const s=function(){function e(){}return e.prototype.then=function(t,r){const n=new e,o=this.s;if(o){const e=1&o?t:r;if(e){try{c(n,1,e(this.v))}catch(e){c(n,2,e)}return n}return this}return this.o=function(e){try{const o=e.v;1&e.s?c(n,1,t?t(o):o):r?c(n,1,r(o)):c(n,2,o)}catch(e){c(n,2,e)}},n},e}();function c(e,t,r){if(!e.s){if(r instanceof s){if(!r.s)return void(r.o=c.bind(null,e,t));1&t&&(t=r.s),r=r.v}if(r&&r.then)return void r.then(c.bind(null,e,t),c.bind(null,e,2));e.s=t,e.v=r;const n=e.o;n&&n(e)}}function a(e){return e instanceof s&&1&e.s}const u="undefined"!=typeof Symbol?Symbol.iterator||(Symbol.iterator=Symbol("Symbol.iterator")):"@@iterator";function l(e,t,r){if("function"==typeof e[u]){var n,o,i,l=e[u]();if(function e(u){try{for(;!((n=l.next()).done||r&&r());)if((u=t(n.value))&&u.then){if(!a(u))return void u.then(e,i||(i=c.bind(null,o=new s,2)));u=u.v}o?c(o,1,u):o=u}catch(e){c(o||(o=new s),2,e)}}(),l.return){var f=function(e){try{n.done||l.return()}catch(e){}return e};if(o&&o.then)return o.then(f,(function(e){throw f(e)}));f()}return o}if(!("length"in e))throw new TypeError("Object is not iterable");for(var h=[],d=0;d<e.length;d++)h.push(e[d]);return function(e,t,r){var n,o,i=-1;return function u(l){try{for(;++i<e.length&&(!r||!r());)if((l=t(i))&&l.then){if(!a(l))return void l.then(u,o||(o=c.bind(null,n=new s,2)));l=l.v}n?c(n,1,l):n=l}catch(e){c(n||(n=new s),2,e)}}(),n}(h,(function(e){return t(h[e])}),r)}function f(e,t){var r;do{var n=e();if(n&&n.then){if(!a(n)){r=!0;break}n=n.v}var o=t();if(a(o)&&(o=o.v),!o)return n}while(!o.then);const i=new s,u=c.bind(null,i,2);return(r?n.then(l):o.then(f)).then(void 0,u),i;function l(r){for(n=r;a(o=t())&&(o=o.v),o;){if(o.then)return void o.then(f).then(void 0,u);if((n=e())&&n.then){if(!a(n))return void n.then(l).then(void 0,u);n=n.v}}c(i,1,n)}function f(r){if(r){do{if((n=e())&&n.then){if(!a(n))return void n.then(l).then(void 0,u);n=n.v}if(a(r=t())&&(r=r.v),!r)return void c(i,1,n)}while(!r.then);r.then(f).then(void 0,u)}else c(i,1,n)}}function h(e,t){try{var r=e()}catch(e){return t(e)}return r&&r.then?r.then(void 0,t):r}"undefined"!=typeof Symbol&&(Symbol.asyncIterator||(Symbol.asyncIterator=Symbol("Symbol.asyncIterator")));var d=function(e){try{var t=this;return Promise.resolve(t.lightApi?h((function(){return Promise.resolve(t.lightApi.get_account_info(e))}),(function(e){console.log(e)})):void 0)}catch(e){return Promise.reject(e)}},p=function(e){try{return t.constants.HISTORY_TYPES.includes("hyperion")?Promise.resolve(t.constants.HYPERION_URL?this.hyperion.get_creator(e):this.get(o.urlBuilder(t.constants.API_URL,"hyperion",{type:"get_creator",account:e}))):Promise.resolve(null)}catch(e){return Promise.reject(e)}},m=function(e){try{return"eos"===t.constants.CHAIN?Promise.resolve(this.rpc.get_table_rows({json:!0,code:t.constants.ACCOUNT_INFO,scope:t.constants.ACCOUNT_INFO,table:"accounts",table_key:"",key_type:"name",lower_bound:e,index_position:1,limit:1})).then((function(t){return t.rows.length>0&&t.rows[0].account_name===e?t.rows[0]:void 0})):Promise.resolve(void 0)}catch(e){return Promise.reject(e)}},v=function(e,r){try{var n=this;return e&&/(^[a-zA-Z12345.]+$)/.test(e)?0===e.indexOf(".")?Promise.resolve([]):Promise.resolve(h((function(){return e=e.trim().toLowerCase(),Promise.resolve(n.rpc.get_table_by_scope({json:!0,code:t.constants.EOSIO,limit:r,lower_bound:e,table:"userres",upper_bound:""+e+(e.length<12?"z".repeat(12-e.length):"")})).then((function(e){return e.rows.map((function(e){return e.scope}))}))}),(function(e){return console.log(e),[]}))):Promise.resolve([])}catch(e){return Promise.reject(e)}},_=function(r){try{var n=this;return Promise.resolve(h((function(){return Promise.resolve(n.rpc.get_account(r)).then((function(r){return r.permissions=r.permissions.map((function(r){return r.required_auth.keys=r.required_auth.keys.map((function(r){return-1!==r.key.indexOf(t.constants.KEY_PREFIX)&&(r.key=e.Numeric.convertLegacyPublicKey(r.key,t.constants.KEY_PREFIX)),r})),r})),r}))}),(function(e){console.log(e)})))}catch(e){return Promise.reject(e)}};function g(){return(g=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e}).apply(this,arguments)}function P(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function y(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(r)return(r=r.call(e)).next.bind(r);if(Array.isArray(e)||(r=function(e,t){if(e){if("string"==typeof e)return P(e,void 0);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?P(e,void 0):void 0}}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0;return function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var b=function(e,r){var n=void 0===r?{}:r,i=n.skip,s=n.limit,c=n.sort,a=n.after,u=n.before,l=n.filter,f=n.tokenFilter,h=n.actionFilters,d=n.contractFilter,p=n.actionFilter;try{var m,v=function(){if(!m)throw new Error("Could not retrieve actions");return o.hyperionTransformGetActions(m)},_={filter:l,skip:i,limit:s,sort:c,after:a,before:u};if(console.log("Fetching actions from Hyperion"),console.table(_),f){var g=f.split(" ")[1];_.filter=_.filter?_.filter.replace("*",g):g+":*"}if(h){var P=Object.entries(h).reduce((function(e,t){var r=t[1];return r.isActive?e.concat(r):e}),[]);if(P.length){for(var b,w=y(P);!(b=w()).done;)b.value.hyperionQuery(e,_);console.log(_)}}if(d&&(_.filter=_.filter?_.filter.split(",").map((function(e){return d+":"+e.split(":")[1]})).join(","):d+":*"),p)if(_.filter){var O=Array.from(new Set(_.filter.split(",").map((function(e){return e.split(":")[0]}))));_.filter=O.map((function(e){return e+":"+p})).join(",")}else _.filter="*:"+p;var I=t.constants.HYPERION_URL?Promise.resolve(this.hyperion.get_actions(e,Object.assign({},_))).then((function(e){m=e})):Promise.resolve(this.get(o.urlBuilder(t.constants.API_URL,"hyperion",{type:"get_actions",account:e,options:Object.assign({},_)}))).then((function(e){m=e}));return Promise.resolve(I&&I.then?I.then(v):v())}catch(e){return Promise.reject(e)}},w=function(e,r){var n=void 0===r?{}:r,i=n.before,s=n.after,c=n.limit,a=void 0===c?25:c,u=n.cursor,l=n.query,f=n.direction,h=void 0===f?"desc":f,d=n.tokenFilter,p=n.actionFilters,m=n.contractFilter,v=n.actionFilter,_=n.type,g=void 0===_?"search_transactions_graphql":_;try{var P=l||"(auth:"+e+" OR\n receiver:"+e+" OR\n data.to:"+e+" OR\n data.from:"+e+" OR\n data.receiver:"+e+")";if(d&&(P=P+" account:"+d.split(" ")[1]),p){var y=Object.entries(p).reduce((function(e,t){var r=t[1];return r.isActive?e.concat(r):e}),[]);if(y.length){var b=y.map((function(t){return t.dfuseQuery(e)})).join(" OR ");-1!==b.search("OR")&&(b="("+b+")"),P=P+" "+b}m&&(P=P+" account:"+m),v&&(P=P+" action:"+v)}return Promise.resolve(this.get(o.urlBuilder(t.constants.API_URL,"dfuse",{type:g,q:P,options:Object.assign({},{sort:h,cursor:u,limit:a,withReversible:!0,before:i,after:s,code:1})}))).then((function(r){if(!r)throw new Error("Could not retrieve actions");return o.dfuseTransformGetActions(r,e,t.constants)}))}catch(e){return Promise.reject(e)}},O=function(e,r,n){var o=void 0===n?{}:n,i=o.actionsPerPage,s=void 0===i?100:i,c=o.actionSkip,a=void 0===c?0:c,u=o.sortDirection,l=void 0===u?"desc":u,f=o.dfuseCursorStack,h=void 0===f?[]:f,d=o.tokenFilter,p=o.actionFilters,m=o.contractFilter,v=o.actionFilter,_=o.start,g=void 0===_?t.constants.CHAIN_START_DATE:_,P=o.end;try{var y,b=this;!r&&t.constants.HISTORY_TYPES.length&&(r=t.constants.HISTORY_TYPES[0]),g&&P?(g=g||t.constants.CHAIN_START_DATE?new Date(g||t.constants.CHAIN_START_DATE).toISOString():void 0,P=new Date(P||new Date).toISOString()):(g=void 0,P=void 0);var w=function(){if("dfuse"===r)return Promise.resolve(b.getActionsFromDfuse(e,{limit:s,cursor:h.length>0?h[h.length-1]:"",direction:l,query:"",after:g,before:P,tokenFilter:d,actionFilters:p,contractFilter:m,actionFilter:v})).then((function(e){y=e}));var t="hyperion"===r?Promise.resolve(b.getActionsFromHyperion(e,{skip:Math.abs(a)-1,limit:s,sort:l,after:g,before:P,tokenFilter:d,actionFilters:p,contractFilter:m,actionFilter:v})).then((function(e){y=e})):Promise.resolve(b.getActionsFromNative(e,a,-s,"native")).then((function(e){y=e}));return t&&t.then?t.then((function(){})):void 0}();return Promise.resolve(w&&w.then?w.then((function(){return y})):y)}catch(e){return Promise.reject(e)}},I=function(e,r,n,i){void 0===i&&(i="native");try{return console.log("Fetching actions from:",i),console.log("Fetch Params:","actionSkip",r,"actionsPerPage",n),Promise.resolve(this.actionsRpc.history_get_actions(e,r,n)).then((function(e){if(!e)throw new Error("Could not retrieve actions");return"native"===i?o.nativeTransformGetActions(e,t.constants):[]}))}catch(e){return Promise.reject(e)}},S=function(e){var t=this;return Promise.resolve(h((function(){return Promise.resolve(t.rpc.get_table_rows({code:"dappservices",json:!0,limit:1e3,scope:"dappairhodl1",table:"refunds"})).then((function(r){function n(){return o.filter((function(t){return t.account===e})).map((function(e){return e.scope="dappairhodl1",e}))}if(!r)return[];var o=r.rows,i=function(){if(r.more){var n=o,i=n.concat;return Promise.resolve(t.getDapphodlUnstakes(e)).then((function(e){o=i.call(n,e)}))}}();return i&&i.then?i.then(n):n()}))}),(function(){return[]})))},k=function(e){var t=this;return Promise.resolve(h((function(){return Promise.resolve(t.rpc.get_table_rows({code:"dappservices",json:!0,limit:100,scope:e,table:"refunds"})).then((function(t){return t&&t.rows&&t.rows.length?t.rows.map((function(t){return t.scope=e,t})):[]}))}),(function(){return[]})))},A=function(e,t){var r=this;return void 0===t&&(t=""),Promise.resolve(h((function(){return Promise.resolve(r.rpc.get_table_rows({code:"dappservices",json:!0,limit:1e3,scope:"dappairhodl1",table:"staking",lower_bound:t})).then((function(t){function n(){return o.filter((function(t){return t.account===e})).map((function(e){return e.scope="dappairhodl1",e}))}if(!t)return[];var o=t.rows,i=function(){if(t.more){var n=o,i=n.concat;return Promise.resolve(r.getDapphodlStakes(e,+o[o.length-1].id+1)).then((function(e){o=i.call(n,e)}))}}();return i&&i.then?i.then(n):n()}))}),(function(){return[]})))},j=function(e){var t=this;return Promise.resolve(h((function(){return Promise.resolve(t.rpc.get_table_rows({code:"dappservices",json:!0,limit:100,scope:e,table:"staking"})).then((function(t){return t&&t.rows&&t.rows.length?t.rows.map((function(t){return t.scope=e,t})):[]}))}),(function(){return[]})))},E=function(e){var t=this;return Promise.resolve(h((function(){return Promise.resolve(t.rpc.get_table_rows({code:"dappservices",json:!0,limit:1,scope:e,table:"accounts"})).then((function(e){return e&&e.rows&&e.rows.length?e.rows[0]:{}}))}),(function(){return{}})))},R=function(e){var t=this;return Promise.resolve(h((function(){return Promise.resolve(t.rpc.get_table_rows({code:"dappairhodl1",json:!0,limit:1,scope:e,table:"accounts"})).then((function(e){return e&&e.rows&&e.rows.length?e.rows[0]:{}}))}),(function(){return{}})))},N=function(){try{var e=this;return Promise.resolve(h((function(){return Promise.resolve(e.rpc.get_table_rows({code:"dappservices",json:!0,limit:500,scope:"dappservices",table:"package"})).then((function(e){return e&&e.rows&&e.rows.length?e.rows:[]}))}),(function(e){return console.log(e),[]})))}catch(e){return Promise.reject(e)}},T=function(){try{var e=this;return Promise.resolve(h((function(){return Promise.resolve(e.rpc.get_table_rows({code:"dappservices",json:!0,limit:1,scope:"......2ke1.o4",table:"statext"})).then((function(e){return e&&e.rows&&e.rows.length?e.rows[0]:{}}))}),(function(e){return console.log(e),{}})))}catch(e){return Promise.reject(e)}},x=function(e,t){void 0===t&&(t="json");try{return Promise.resolve(h((function(){return Promise.resolve(fetch(e)).then((function(e){return function(){if(e.ok)return Promise.resolve("arraybuffer"===t?e.arrayBuffer():e.json())}()}))}),(function(e){console.log(e)})))}catch(e){return Promise.reject(e)}},F=function(e,t,r){void 0===t&&(t={method:"get"}),void 0===r&&(r="json");try{return Promise.resolve(x(new Request(e,t),r))}catch(e){return Promise.reject(e)}},L=function(e,t,r){try{return void 0===r&&(r={method:"post",body:JSON.stringify(t)}),Promise.resolve(x(new Request(e,r)))}catch(e){return Promise.reject(e)}},C=function(e,r){try{var n=this,o={"eosio::deleteauth":"auth_delete","eosio::linkauth":"auth_link","eosio::regproducer":"register_producer","eosio::regproxy":"register_proxy","eosio::unregprod":"unregister_producer","eosio::unregproxy":"unregister_proxy","eosio::updateauth":"auth_update","eosio::voteproducer":"vote_producer","eosio::voteproxy":"proxy_vote","fio.token::trnsfiopubky":"transfer_tokens_pub_key","fio.address::addaddress":"add_pub_address","fio.address::regaddress":"register_fio_address","fio.address::regdomain":"register_fio_domain","fio.address::renewaddress":"renew_fio_address","fio.address::renewdomain":"renew_fio_domain","fio.address::setdomainpub":"set_fio_domain_public","eosio.msig::approve":"msig_approve","eosio.msig::cancel":"msig_cancel","eosio.msig::exec":"msig_exec","eosio.msig::invalidate":"msig_invalidate","eosio.msig::propose":"msig_propose","eosio.msig::unapprove":"msig_approve","fio.reqobt::newfundsreq":"new_funds_request","fio.reqobt::rejectfndreq":"reject_funds_request","fio.reqobt::cancelfndreq":"cancelfndreq","fio.reqobt::recordobt":"record_obt_data","fio.reqobt::newpubaddreq":"new_pub_address_request","fio.reqobt::relpubadd":"release_pub_address","fio.reqobt::rejectaddreq":"reject_pub_address_request","fio.reqobt::canceladdreq":"cancel_pub_address_request","fio.lock::trnsloctoks":"transfer_locked_tokens","fio.lock::locktokens":"lock_tokens","fio.address::remaddress":"remove_pub_address","fio.address::remalladdr":"remove_all_pub_addresses","fio.address::burnaddress":"burn_fio_address","fio.address::xferdomain":"transfer_fio_domain","fio.address::xferaddress":"transfer_fio_address"};return Promise.resolve(n.getFIOFees()).then((function(i){var s=[],c=l(e,(function(e){return Promise.resolve(n.api.getCachedAbi(e.account)).then((function(c){var a=c.abi,u=a.structs;function l(){s.push(e)}var f=a.actions.find((function(t){return t.name===e.name})),h=function(){if(f){var s=u.find((function(e){return e.name===f.type})),c=function(){if(s){if(s.fields.find((function(e){return"max_fee"===e.name}))&&void 0===e.data.max_fee){var c=o[e.account+"::"+e.name];if(c){var a=i.find((function(e){return e.end_point===c}));e.data.max_fee=a?a.suf_amount:0}}s.fields.find((function(e){return"actor"===e.name}))&&void 0===e.data.actor&&(e.data.actor=r),s.fields.find((function(e){return"tpid"===e.name}))&&void 0===e.data.tpid&&(e.data.tpid=t.constants.FIO_FEES_ACCOUNT);var u=s.fields.find((function(e){return"fio_address"===e.name})),l=function(){if(u&&void 0===e.data.fio_address)return Promise.resolve(n.getFIOAddresses(r)).then((function(t){t.length&&(e.data.fio_address=t[0].name)}))}();if(l&&l.then)return l.then((function(){}))}}();if(c&&c.then)return c.then((function(){}))}}();return h&&h.then?h.then(l):l()}))}));return c&&c.then?c.then((function(){return s})):s}))}catch(e){return Promise.reject(e)}},q=function(){try{return Promise.resolve(this.rpc.get_table_rows({code:"fio.fee",scope:"fio.fee",table:"fiofees",limit:-1}).then((function(e){return e.rows})).catch((function(e){return[]})))}catch(e){return Promise.reject(e)}},D=function(){try{var e=this;return Promise.resolve(e.rpc.get_table_rows({code:"fio.token",scope:"FIO",table:"stat"})).then((function(r){var n=+r.rows[0].supply.split(" ")[0];return Promise.resolve(e.rpc.get_table_rows({code:"fio.treasury",scope:"fio.treasury",table:"bprewards"})).then((function(r){var o=r.rows[0].rewards/Math.pow(10,t.constants.CORE_PRECISION);return Promise.resolve(e.rpc.get_table_rows({code:"fio.treasury",scope:"fio.treasury",table:"bpbucketpool"})).then((function(e){var r=e.rows[0].rewards/Math.pow(10,t.constants.CORE_PRECISION),i=o+r;return Promise.resolve(fetch("https://fioprotocol.io/circulating").then((function(e){return e.json()}))).then((function(e){return{supply:n,totalLocked:n-e,bpRewards:o,bpBucket:r,totalBp:i,circulating:e}}))}))}))}))}catch(e){return Promise.reject(e)}},H=function(){try{var e=this,t=!0,r=[],n=null,s="",c=f((function(){return Promise.resolve(e.getFIOLocked(s)).then((function(e){t=(n=e).more,r=r.concat(n.rows),t&&(s=new i.BN(o.encodeName(r[r.length-1].owner,!1)).plus(1).toString())}))}),(function(){return!!t}));return Promise.resolve(c&&c.then?c.then((function(){return r})):r)}catch(e){return Promise.reject(e)}},M=function(e){try{var r=this;return Promise.resolve(h((function(){return Promise.resolve(r.rpc.get_table_rows({code:t.constants.EOSIO,scope:t.constants.EOSIO,table:"lockedtokens",lower_bound:o.encodeName(e,!1),limit:1})).then((function(r){var n=r.rows;return n&&n.length&&n[0].owner===e?n[0].remaining_locked_amount/Math.pow(10,t.constants.CORE_PRECISION):0}))}),(function(e){return console.log(e),0})))}catch(e){return Promise.reject(e)}},B=function(e){try{var r=this;return Promise.resolve(h((function(){return Promise.resolve(r.rpc.get_table_rows({code:t.constants.EOSIO,scope:t.constants.EOSIO,table:"producers",reverse:!0,limit:e})).then((function(e){var t=e.rows;return t&&t.length?t:[]}))}),(function(e){return console.log(e),[]})))}catch(e){return Promise.reject(e)}},Y=function(e,t){void 0===e&&(e=-1);try{var r=this;return Promise.resolve(h((function(){return Promise.resolve(r.rpc.get_table_rows({code:"fio.address",scope:"fio.address",table:"fionames",reverse:!0,upper_bound:t,limit:e})).then((function(e){var t=e.rows;return t&&t.length?t:[]}))}),(function(e){return console.log(e),[]})))}catch(e){return Promise.reject(e)}},G=function(e,t){void 0===e&&(e=-1);try{var r=this;return Promise.resolve(h((function(){return Promise.resolve(r.rpc.get_table_rows({code:"fio.address",scope:"fio.address",table:"domains",reverse:!0,upper_bound:t,limit:e})).then((function(e){var t=e.rows;return t&&t.length?t:[]}))}),(function(e){return console.log(e),[]})))}catch(e){return Promise.reject(e)}},U=function(e){try{var t=this;return Promise.resolve(h((function(){var r=t.rpc,n=r.get_table_rows;return Promise.resolve(o.string_to_uint128_hash(e)).then((function(t){return Promise.resolve(n.call(r,{code:"fio.address",scope:"fio.address",table:"domains",lower_bound:"0x"+t,limit:1,key_type:"i128",index_position:4})).then((function(t){var r=t.rows;return r&&r.length&&r[0].name===e?r[0]:void 0}))}))}),(function(e){console.log(e)})))}catch(e){return Promise.reject(e)}},K=function(e){try{var t=this;return Promise.resolve(h((function(){var r=t.rpc,n=r.get_table_rows;return Promise.resolve(o.string_to_uint128_hash(e)).then((function(t){return Promise.resolve(n.call(r,{code:"fio.address",scope:"fio.address",table:"fionames",lower_bound:"0x"+t,limit:1,key_type:"i128",index_position:5})).then((function(t){var r=t.rows;return r&&r.length&&r[0].name===e?r[0]:void 0}))}))}),(function(e){console.log(e)})))}catch(e){return Promise.reject(e)}},X=function(e){try{var r=this;return Promise.resolve(h((function(){return Promise.resolve(r.rpc.get_table_rows({json:!0,code:t.constants.EOSIO,scope:t.constants.EOSIO,lower_bound:o.encodeName(e,!1),upper_bound:o.encodeName(e,!1),table:"voters",key_type:"i64",index_position:3,limit:1})).then((function(e){var t=e.rows;return t.length?t[0]:void 0}))}),(function(e){console.log(e)})))}catch(e){return Promise.reject(e)}};function V(e){return this.rpc.get_table_rows({code:t.constants.EOSIO,scope:t.constants.EOSIO,table:"lockedtokens",lower_bound:e,limit:-1})}function J(e){return this.rpc.get_table_rows({code:"fio.address",scope:"fio.address",table:"fionames",key_type:"i64",limit:-1,lower_bound:o.encodeName(e,!1),upper_bound:new i.BN(o.encodeName(e,!1)).plus(1).toString(),index_position:4}).then((function(t){return t.rows.length>0?t.rows.filter((function(t){return t.owner_account===e})):[]})).catch((function(e){return[]}))}function z(e){return this.rpc.get_table_rows({code:"fio.address",scope:"fio.address",table:"domains",key_type:"i64",limit:-1,lower_bound:o.encodeName(e,!1),upper_bound:new i.BN(o.encodeName(e,!1)).plus(1).toString(),index_position:2}).then((function(t){return t.rows.length>0?t.rows.filter((function(t){return t.account===e})):[]})).catch((function(e){return[]}))}function W(e){return L(t.constants.DEFAULT_ENDPOINTS[0]+"/v1/get_fio_names",{fio_public_key:e})}var Q=function(e){try{var r=this;return r.hyperion?Promise.resolve(r.hyperion.get_proposals(e)).then((function(n){if(n&&n.proposals&&n.proposals.length){var o,i,s=n.proposals[0];return Promise.resolve(Promise.all([r.hyperion.get_actions(t.constants.EOSIO_MSIG,{block_num:s.block_num,limit:1}),r.hyperion.get_deltas(t.constants.EOSIO_MSIG,e.proposer,"proposal",void 0,{block_num:s.block_num})])).then((function(t){var n=t[0],c=t[1];function a(){return{approvals:s,transaction:i,executionTransaction:o}}if(n&&n.actions&&n.actions.length){var u=n.actions.find((function(t){return t.act.data.proposal_name===e.proposal}));u&&(o={payer:u.act.data.executer||u.act.data.canceler,trx_id:u.trx_id,published_at:u.timestamp,cancelled:"cancel"===u.act.name})}var l=function(){if(c&&c.deltas&&c.deltas.length){var e=c.deltas[0].data.transaction;return Promise.resolve(r.parsePackedMsigActions(e.actions)).then((function(t){e.actions=t,i=e}))}}();return l&&l.then?l.then(a):a()}))}})):Promise.resolve(void 0)}catch(e){return Promise.reject(e)}},$=function(e){try{var r=this;return Promise.resolve(h((function(){var n=[r.getMsigApprovals(e,t.constants.EOSIO_MSIG_APPROVALS_TABLE)];return"approvals2"===t.constants.EOSIO_MSIG_APPROVALS_TABLE&&n.push(r.getMsigApprovals(e,"approvals")),Promise.resolve(Promise.all(n)).then((function(e){return e[0].concat(e[1])}))}),(function(e){return console.log(e),[]})))}catch(e){return Promise.reject(e)}},Z=function(e,r){try{var n=this;return Promise.resolve(h((function(){return Promise.resolve(n.rpc.get_table_rows({json:!0,code:t.constants.EOSIO_MSIG,scope:o.encodeName(e,!1),table:r,limit:-1})).then((function(e){return e.rows}))}),(function(e){return console.log(e),[]})))}catch(e){return Promise.reject(e)}},ee=function(e,r){try{var n=this;return Promise.resolve(h((function(){return Promise.resolve(n.rpc.get_table_rows({json:!0,code:t.constants.EOSIO_MSIG,scope:o.encodeName(e,!1),table:t.constants.EOSIO_MSIG_PROPOSALS_TABLE,table_key:"",key_type:"name",lower_bound:r,index_position:1,limit:1})).then((function(e){return function(){if(e&&e.rows&&e.rows.length)return Promise.resolve(n.parsePackedMsig(e.rows[0].packed_transaction))}()}))}),(function(e){console.log(e)})))}catch(e){return Promise.reject(e)}},te=function(e){try{var t=this;return Promise.resolve(h((function(){return Promise.resolve(t.api.deserializeTransactionWithActions(e)).then((function(e){return Promise.resolve(t.parsePackedMsigActions(e.actions)).then((function(t){return e.actions=t,e}))}))}),(function(e){console.log("Error parsing packed msig"),console.log(e)})))}catch(e){return Promise.reject(e)}},re=function(e){try{var r=this,n=function(){return i=i.map((function(e){return{action_trace:{act:e}}}))},i=[],s=l(e,(function(e){function n(){function n(){i.push(e)}var s=function(){if(e.account===t.constants.EOSIO&&"setabi"===e.name)return Promise.resolve(r.api.rawAbiToJson(o.hexToUint8Array(e.data.abi))).then((function(t){e.data.abi=t}))}();return s&&s.then?s.then(n):n()}var s=function(){if(e.account===t.constants.EOSIO_MSIG&&"propose"===e.name)return Promise.resolve(r.api.deserializeActionsSync(e.data.trx.actions)).then((function(t){e.data.trx.actions=t}))}();return s&&s.then?s.then(n):n()}));return Promise.resolve(s&&s.then?s.then(n):n())}catch(e){return Promise.reject(e)}},ne=function(){try{var e=this;if(t.constants.HISTORY_TYPES.includes("dfuse"))return Promise.resolve(e.get(o.urlBuilder(t.constants.API_URL,"dfuse",{type:"state_scope_pipeline",account:t.constants.EOSIO_MSIG,table:t.constants.EOSIO_MSIG_PROPOSALS_TABLE,options:{}}))).then((function(e){return e.tables.map((function(e){return e.rows=e.rows.sort((function(e,t){return t.block-e.block})),e.highestBlock=e.rows[0].block,e})).sort((function(e,t){return t.highestBlock-e.highestBlock}))}));var r=function(){return n.map((function(e){return{scope:e.scope,rows:Array(e.count).fill({key:""})}}))},n=[],i="",s=f((function(){return Promise.resolve(e.rpc.get_table_by_scope({json:!0,code:"eosio.msig",limit:100,lower_bound:i,table:"proposal",upper_bound:""})).then((function(e){i=e.more,n=n.concat(e.rows)}))}),(function(){return!!i}));return Promise.resolve(s&&s.then?s.then(r):r())}catch(e){return Promise.reject(e)}},oe=function(){try{return Promise.resolve(this.rpc.get_table_rows({code:t.constants.EOSIO,scope:t.constants.EOSIO,table:"global",limit:1})).then((function(e){return e.rows[0]}))}catch(e){return Promise.reject(e)}},ie=function(e,r){void 0===e&&(e=1),void 0===r&&(r=50);try{var n=this;if(""!==t.constants.API_URL)return Promise.resolve(n.get(o.urlBuilder(t.constants.API_URL,"producers",{pageNum:e,perPage:r})));var s=!0,c=[],a=null,u=null,l=f((function(){return Promise.resolve(n.rpc.get_table_rows({json:!0,code:t.constants.EOSIO,scope:t.constants.EOSIO,table:"producers",lower_bound:u,index_position:1,key_type:"i64",limit:100})).then((function(e){s=(a=e).more,c=c.concat(a.rows),u=new i.BN(o.encodeName(c[c.length-1].owner,!1)).plus(1).toString()}))}),(function(){return!!s}));return Promise.resolve(l&&l.then?l.then((function(){return c})):c)}catch(e){return Promise.reject(e)}},se=function(e){try{return""!==t.constants.ALOHA_PROXY_URL?Promise.resolve(this.get(t.constants.ALOHA_PROXY_URL+"/"+e+"?output=json")).then((function(e){return e.proxy})):Promise.resolve(void 0)}catch(e){return Promise.reject(e)}},ce=function(e,r){try{return r||(r=this.calculateVoteWeight()),Promise.resolve(+e/r/Math.pow(10,t.constants.CORE_PRECISION))}catch(e){return Promise.reject(e)}},ae=function(e){try{var t=this;return t.hyperion?Promise.resolve(t.hyperion.get_voters({producer:e,limit:100})).then((function(e){var r=e.voters,n=t.calculateVoteWeight();return r.map((function(e){return g({},e,{vote:t.weightedVoteToNumber(e.weight,n)})}))})):Promise.resolve(void 0)}catch(e){return Promise.reject(e)}},ue=function(){try{return""!==t.constants.ALOHA_PROXY_URL?Promise.resolve(this.get(t.constants.ALOHA_PROXY_URL+"?output=json")).then((function(e){return e.proxies})):Promise.resolve(this.hyperion.get_voters({proxy:!0,limit:1e3})).then((function(e){return e.voters.map((function(e,r){return g({},e,{weight:e.weight/Math.pow(10,t.constants.CORE_PRECISION),rank:r+1})}))}))}catch(e){return Promise.reject(e)}},le=function(e){try{var r=this;return Promise.resolve(h((function(){return Promise.resolve(r.rpc.get_table_rows({json:!0,code:t.constants.EOSIO,scope:t.constants.EOSIO,lower_bound:o.encodeName(e,!1),upper_bound:o.encodeName(e,!1),table:"voters",limit:1})).then((function(e){var t=e.rows;return t.length?t[0]:void 0}))}),(function(e){console.log(e)})))}catch(e){return Promise.reject(e)}};function fe(){var e="wax"===t.constants.CHAIN?13:52,r=Date.now()/1e3-946684800,n=Math.floor(r/604800)/e;return Math.pow(2,n)}var he=function(e){try{var r=this;return Promise.resolve(function(){if(-1!==t.constants.CHAIN.indexOf("proton"))return Promise.resolve(r.rpc.get_table_rows({json:!0,code:"eosio.proton",scope:"eosio.proton",table:"usersinfo",table_key:"",key_type:"name",lower_bound:e,index_position:1,limit:1})).then((function(t){return t.rows.length>0&&t.rows[0].acc===e?t.rows[0]:void 0}))}())}catch(e){return Promise.reject(e)}},de=function(e){try{var t=!1,r=this,n=h((function(){return Promise.resolve(r.rpc.get_table_rows({code:"oracles",scope:"oracles",table:"data",limit:-1,lower_bound:e,upper_bound:e})).then((function(r){var n=r.rows;if(n&&n.length&&n[0].feed_index===e)return t=!0,n[0]}))}),(function(e){console.log(e)}));return Promise.resolve(n&&n.then?n.then((function(e){return t?e:void 0})):t?n:void 0)}catch(e){return Promise.reject(e)}},pe=function(e){void 0===e&&(e=void 0);try{var t=this;return Promise.resolve(h((function(){return Promise.resolve(t.rpc.get_table_rows({code:"oracles",scope:"oracles",table:"feeds",limit:-1,lower_bound:e})).then((function(e){var r=e.rows;return e.more?Promise.resolve(t.getAllOracleFeeds(e.next_key)).then((function(e){return r.concat(e)})):r}))}),(function(e){return console.log(e),[]})))}catch(e){return Promise.reject(e)}},me=function(e){try{var t=this;return Promise.resolve(h((function(){return Promise.resolve(t.rpc.get_table_rows({code:"oracles",scope:"oracles",table:"data",limit:1,lower_bound:e,upper_bound:e})).then((function(e){var t=e.rows;return t&&t.length?t[0]:void 0}))}),(function(e){console.log(e)})))}catch(e){return Promise.reject(e)}},ve=function(e){try{var t=this;return Promise.resolve(h((function(){return Promise.resolve(t.rpc.get_table_rows({code:"longstaking",scope:"longstaking",table:"stakes",lower_bound:e,upper_bound:e,key_type:"name",index_position:2,limit:-1})).then((function(e){return e.rows}))}),(function(e){return console.log(e),[]})))}catch(e){return Promise.reject(e)}},_e=function(){try{var e=this;return Promise.resolve(h((function(){return Promise.resolve(e.rpc.get_table_rows({code:"longstaking",scope:"longstaking",table:"plans",limit:-1})).then((function(e){return e.rows.sort((function(e,t){return e.plan_days-t.plan_days}))}))}),(function(e){return console.log(e),[]})))}catch(e){return Promise.reject(e)}},ge=function(e){try{var r,n=this,i=h((function(){return Promise.resolve(n.rpc.get_table_rows({code:t.constants.EOSIO,scope:o.encodeName(e,!1),table:"refundsxpr",limit:-1})).then((function(e){var t=e.rows;t&&t.length&&((r=t[0]).quantity=+r.quantity.split(" ")[0])}))}),(function(e){console.log(e)}));return Promise.resolve(i&&i.then?i.then((function(){return r})):r)}catch(e){return Promise.reject(e)}},Pe=function(e){try{var r=this,n=[],i=h((function(){return Promise.resolve(r.rpc.get_table_rows({code:t.constants.EOSIO,scope:o.encodeName(e,!1),table:"delxpr",limit:-1})).then((function(e){var t=e.rows;t&&t.length&&(n=t)}))}),(function(e){console.log(e)}));return Promise.resolve(i&&i.then?i.then((function(){return n})):n)}catch(e){return Promise.reject(e)}},ye=function(e){try{var r=this;return Promise.resolve(h((function(){return Promise.resolve(r.rpc.get_table_rows({code:t.constants.EOSIO,scope:t.constants.EOSIO,lower_bound:o.encodeName(e,!1),table:"votersxpr",limit:1})).then((function(t){var r=t.rows;return r&&r.length&&r[0].owner===e?r[0]:void 0}))}),(function(e){console.log(e)})))}catch(e){return Promise.reject(e)}},be=function(){try{var e=this;return Promise.resolve(h((function(){return Promise.resolve(Promise.all([e.getTokenSupply(t.constants.EOSIO_TOKEN,t.constants.CORE_SYMBOL),e.rpc.get_table_rows({code:t.constants.EOSIO,scope:t.constants.EOSIO,table:"globalsd",limit:1}).then((function(e){return e.rows[0]})),e.rpc.get_table_rows({code:t.constants.EOSIO,scope:t.constants.EOSIO,table:"global4",limit:1}).then((function(e){return e.rows[0]}))])).then((function(e){var r=e[0].supply,n=e[2],o=n.continuous_rate,i=n.inflation_pay_factor,s=n.votepay_factor,c=+e[1].totalrstaked/Math.pow(10,t.constants.CORE_PRECISION);return{totalStaked:c,apr:r*(+i/(+i+ +s)*+o)/c*100}}))}),(function(e){return console.log(e),0})))}catch(e){return Promise.reject(e)}},we=function(){try{var e=!1,r=this,n=h((function(){return Promise.resolve(r.rpc.get_table_rows({json:!0,code:t.constants.EOSIO,scope:t.constants.EOSIO,table:"rammarket",table_key:"",limit:10})).then((function(t){var r=t.rows[0].base.balance,n=+r.substr(0,r.indexOf(" ")),o=t.rows[0].quote.balance,i=o.substr(0,o.indexOf(" ")),s=1024*Number((i/n).toFixed(8));return e=!0,s}))}),(function(e){console.log(e)}));return Promise.resolve(n&&n.then?n.then((function(t){return e?t:0})):e?n:0)}catch(e){return Promise.reject(e)}},Oe=function(e){try{return Promise.resolve(this.rpc.get_table_rows({json:!0,code:t.constants.EOSIO,scope:o.encodeName(e,!1),table:"userres",table_key:"",limit:1})).then((function(e){return e.rows[0]}))}catch(e){return Promise.reject(e)}},Ie=function(e){try{var t=this,r=!0,n=[],s=null,c="",a=h((function(){var a=f((function(){return Promise.resolve(t.delegatedBandwidth(e,c)).then((function(e){r=(s=e).more,n=n.concat(s.rows),r&&(c=new i.BN(o.encodeName(n[n.length-1].to,!1)).plus(1).toString())}))}),(function(){return!!r}));if(a&&a.then)return a.then((function(){}))}),(function(e){console.log(e)}));return Promise.resolve(a&&a.then?a.then((function(){return n})):n)}catch(e){return Promise.reject(e)}},Se=function(e,r){try{return Promise.resolve(this.rpc.get_table_rows({json:!0,code:t.constants.EOSIO,scope:o.encodeName(e,!1),table:"delband",table_key:"",limit:-1,lower_bound:r,key_type:"i64",index_position:1}))}catch(e){return Promise.reject(e)}},ke=function(){try{return Promise.resolve(this.rpc.get_table_rows({code:t.constants.EOSIO,scope:0,table:"powup.state",limit:1})).then((function(e){return e.rows[0]}))}catch(e){return Promise.reject(e)}},Ae=function(e,r){void 0===e&&(e=""),void 0===r&&(r="");try{return Promise.resolve(this.rpc.get_table_rows({code:t.constants.EOSIO,scope:t.constants.EOSIO,table:"namebids",key_type:"name",lower_bound:e,upper_bound:r,index_position:2,limit:500}))}catch(e){return Promise.reject(e)}},je=function(e){void 0===e&&(e=500);try{return Promise.resolve(this.lightApi.get_topram(e))}catch(e){return Promise.reject(e)}},Ee=function(e){void 0===e&&(e=500);try{return Promise.resolve(this.lightApi.get_topstake(e))}catch(e){return Promise.reject(e)}},Re=function(){try{var e=De[t.constants.CHAIN];if(e){var r=i.formatDate(i.utcTime()),n=i.formatDate(i.utcTime(i.startDate(i.time(),7)));return Promise.resolve(this.post("https://www.api.bloks.io/graphql/v1alpha1/graphql",{query:"query {\n "+e+'_pricechart(args: {\n from_time: "'+n+'",\n to_time: "'+r+'"\n }) {\n t\n o\n h\n l\n c\n }\n }',variables:null})).then((function(t){var r=t.data;return r?r[e+"_pricechart"]:[]}))}return Promise.resolve({actions:[]})}catch(e){return Promise.reject(e)}},Ne=function(e){void 0===e&&(e="mpr");try{var r=De[t.constants.CHAIN];return r?Promise.resolve(this.post("https://www.api.bloks.io/graphql/v1alpha1/graphql",{query:"query {\n "+r+"_"+e+" {\n "+e+"\n }\n }",variables:null})).then((function(t){var n=t.data;return n?Math.abs(n[r+"_"+e][0][e]):0})):Promise.resolve(0)}catch(e){return Promise.reject(e)}},Te=function(e){try{return Promise.resolve(this.rpc.get_table_rows({code:t.constants.EOSIO,scope:t.constants.EOSIO,table:"rexfund",lower_bound:o.encodeName(e,!1)})).then((function(t){var r=t.rows[0];return r.owner===e?Number(r.balance.split(" ")[0]):0}))}catch(e){return Promise.reject(e)}},xe=function(e){try{return Promise.resolve(this.rpc.get_table_rows({json:!0,code:t.constants.EOSIO,scope:t.constants.EOSIO,table:"netloan",table_key:"byowner",key_type:"i64",limit:100,lower_bound:o.encodeName(e,!1),index_position:3})).then((function(t){return t.rows.filter((function(t){return t.from===e}))}))}catch(e){return Promise.reject(e)}},Fe=function(e){try{return Promise.resolve(this.rpc.get_table_rows({json:!0,code:t.constants.EOSIO,scope:t.constants.EOSIO,table:"cpuloan",table_key:"byowner",key_type:"i64",limit:100,lower_bound:o.encodeName(e,!1),index_position:3})).then((function(t){return t.rows.filter((function(t){return t.from===e}))}))}catch(e){return Promise.reject(e)}},Le=function(e){try{return Promise.resolve(this.rpc.get_table_rows({code:t.constants.EOSIO,scope:t.constants.EOSIO,table:"rexbal",lower_bound:o.encodeName(e,!1)})).then((function(t){var r=t.rows[0];return r.owner===e?r:void 0}))}catch(e){return Promise.reject(e)}},Ce=function(){try{return Promise.resolve(this.rpc.get_table_rows({code:t.constants.EOSIO,scope:t.constants.EOSIO,table:"rexpool"})).then((function(e){var t=e.rows[0],r=function(e){return Number(e.split(" ")[0])},n=r(t.total_lent),o=r(t.total_lendable),s=r(t.total_unlent),c=r(t.total_rex),a=r(t.total_rent),u=i.multiply(i.divide(n,o),100),l=+i.divide(o,c),f=+i.divide(s,a+1);return{version:t.version,namebid_proceeds:r(t.namebid_proceeds),loan_num:t.loan_num,total_lent:n,total_unlent:s,total_rent:a,total_lendable:o,total_rex:c,lent_percent:u,rex_price:l,resource_price:f}}))}catch(e){return Promise.reject(e)}},qe=function(e){try{var r=!1,n=this,i=h((function(){return Promise.resolve(n.rpc.get_table_rows({code:t.constants.EOSIO,scope:t.constants.EOSIO,table:"rexqueue",limit:1,lower_bound:o.encodeName(e,!1)})).then((function(t){var n=t.rows;if(n&&n.length&&n[0].owner===e)return r=!0,n[0]}))}),(function(e){console.log(e)}));return Promise.resolve(i&&i.then?i.then((function(e){return r?e:void 0})):r?i:void 0)}catch(e){return Promise.reject(e)}},De={jungle:"jungle",bos:"bos",eos:"mainnet",telos:"telos"},He=function(e,t){try{var r=this;return Promise.resolve(h((function(){return Promise.resolve(r.rpc.get_currency_stats(e,t)).then((function(e){var r=e[t],n=r.supply,o=r.max_supply;return{supply:n?+n.split(" ")[0]:0,max_supply:o?+o.split(" ")[0]:0}}))}),(function(e){return console.log(e),{supply:0,max_supply:0}})))}catch(e){return Promise.reject(e)}},Me=function(e){var t=this;return Promise.resolve(h((function(){return Promise.resolve(t.hyperion.get_tokens(e)).then((function(e){return e.tokens.map((function(e){return{currency:e.symbol,trx_id:"",deleted:!1,amount:e.amount,contract:e.contract,decimals:e.precision,metadata:{}}}))}))}),(function(){})))},Be=function(e){try{return Promise.resolve(this.lightApi.get_balances(e)).then((function(e){var r=e.balances;return console.log(r),r.map((function(e){return{key:e.contract+"-"+(e.currency?e.currency.toLowerCase():Ue(0,1e7))+"-"+t.constants.CHAIN,currency:e.currency,amount:Number(e.amount),contract:e.contract,decimals:e.decimals,usd_value:0}}))}))}catch(e){return Promise.reject(e)}},Ye=function(e,t,r){try{return Promise.resolve(this.rpc.get_currency_balance(e,t,r).catch((function(e){return console.log(e)}))).then((function(e){return e&&e.length?e[0]:null}))}catch(e){return Promise.reject(e)}},Ge=function(e){try{return Promise.resolve(this.rpc.get_currency_balance(t.constants.EOSIO_TOKEN,e,t.constants.CORE_SYMBOL)).then((function(e){return e[0]}))}catch(e){return Promise.reject(e)}},Ue=function(e,t){return Math.floor(Math.random()*(t-e)+e)},Ke=function(t,r,n){void 0===t&&(t=3e3),void 0===r&&(r=12),void 0===n&&(n=0);try{var o=this;return Promise.resolve(o.rpc.get_info()).then((function(i){function s(){return g({max_net_usage_words:0,max_cpu_usage_ms:0,delay_sec:n,context_free_actions:[],actions:[],transaction_extensions:[]},c)}var c={},a=function(){if(i)return Promise.resolve(o.rpc.get_block(i.head_block_num-r)).then((function(r){c=e.Serialize.transactionHeader(r,t)}))}();return a&&a.then?a.then(s):s()}))}catch(e){return Promise.reject(e)}},Xe=function(e){try{var r,n=function(){if(!r||!r.actions||!r.actions.length)throw new Error("TX not found");return o.hyperionTransformTransaction(r)},i=t.constants.HYPERION_URL?Promise.resolve(this.hyperion.get_transaction(e)).then((function(e){r=e})):Promise.resolve(this.get(o.urlBuilder(t.constants.API_URL,"hyperion",{type:"get_transaction",id:e,options:{}}))).then((function(e){r=e}));return Promise.resolve(i&&i.then?i.then(n):n())}catch(e){return Promise.reject(e)}},Ve=function(e){try{return Promise.resolve(this.rpc.get_scheduled_transactions(!0,e,1)).then((function(t){var r=t.transactions;return r.length>0&&r[0].trx_id.substring(0,6)===e.substring(0,6)?o.historyTransformDeferredTransaction(r[0]):{}}))}catch(e){return Promise.reject(e)}},Je=function(r,n){void 0===n&&(n=0);try{var i=new e.JsonRpc(t.constants.TRANSACTIONS_ENDPOINTS);return Promise.resolve(i.history_get_transaction(r,n)).then((function(e){if(!e)throw new Error("TX not found");return o.historyTransformTransaction(e)}))}catch(e){return Promise.reject(e)}},ze=function(e){try{var t=this,r=[],n=e.map((function(e){try{return Promise.resolve(t.getKeyAccounts(e)).then((function(n){var o=n.map((function(n){try{return Promise.resolve(t.getAccount(n)).then((function(t){for(var o,i=y(t.permissions);!(o=i()).done;){var s=o.value;s.required_auth.keys.find((function(t){return t.key===e}))&&r.push({actor:n,permission:s.perm_name,publicKey:e})}}))}catch(e){return Promise.reject(e)}}));return Promise.resolve(Promise.all(o)).then((function(){}))}))}catch(e){return Promise.reject(e)}}));return Promise.resolve(Promise.all(n)).then((function(){return r}))}catch(e){return Promise.reject(e)}},We=function(e,t,r,n,o){void 0===r&&(r=[]),void 0===n&&(n=1),void 0===o&&(o=2);try{var i=this;return Promise.resolve(i.getAccount(e)).then((function(s){var c=l(s.permissions,(function(s){return function(){if(s.perm_name===t){var c=s.required_auth.accounts;return c.length||r.push({actor:e,permission:t}),l(c,(function(e){var t=function(){if(n<o)return Promise.resolve(i.getRequiredAccounts(e.permission.actor,e.permission.permission,r,++n,o)).then((function(){}));r.push({actor:e.permission.actor,permission:e.permission.permission})}();if(t&&t.then)return t.then((function(){}))}))}}()}));return c&&c.then?c.then((function(){return r})):r}))}catch(e){return Promise.reject(e)}},Qe=function(e){try{var t=this;return Promise.resolve(h((function(){return Promise.resolve(t.lightGetKeyAccountsRaw(e)).then((function(e){var t=e.reduce((function(e,t){return g({},e,t)}),{});return Object.entries(t).reduce((function(e,t){var r=t[0],n=Object.keys(t[1].accounts);return n.length&&e.push({chain:r,accounts:n}),e}),[])}))}),(function(e){return console.log(e),[]})))}catch(e){return Promise.reject(e)}},$e=function(e){try{var r=!1,n=this,o=function(e){return r?e:[]},i=l(t.constants.HISTORY_TYPES,(function(t){return h((function(){return Promise.resolve(n.getKeyAccountsByType(e,t)).then((function(e){if(e)return r=!0,e}))}),(function(e){console.log(e)}))}),(function(){return r}));return Promise.resolve(i&&i.then?i.then(o):o(i))}catch(e){return Promise.reject(e)}},Ze=function(e,r){try{var n=!1,o=this,i=function(r){return n?r:function(){if(t.constants.LIGHT_API)return Promise.resolve(o.lightGetKeyAccounts(e))}()},a=function(e,t){var r,n=-1;e:{for(var o=0;o<t.length;o++){var i=t[o][0];if(i){var a=i();if(a&&a.then)break e;if(a===e){n=o;break}}else n=o}if(-1!==n){do{for(var u=t[n][1];!u;)n++,u=t[n][1];var l=u();if(l&&l.then){r=!0;break e}var f=t[n][2];n++}while(f&&!f());return l}}const h=new s,d=c.bind(null,h,2);return(r?l.then(p):a.then((function r(s){for(;;){if(s===e){n=o;break}if(++o===t.length){if(-1!==n)break;return void c(h,1,u)}if(i=t[o][0]){if((s=i())&&s.then)return void s.then(r).then(void 0,d)}else n=o}do{for(var a=t[n][1];!a;)n++,a=t[n][1];var u=a();if(u&&u.then)return void u.then(p).then(void 0,d);var l=t[n][2];n++}while(l&&!l());c(h,1,u)}))).then(void 0,d),h;function p(e){for(;;){var r=t[n][2];if(!r||r())break;n++;for(var o=t[n][1];!o;)n++,o=t[n][1];if((e=o())&&e.then)return void e.then(p).then(void 0,d)}c(h,1,e)}}(r,[[function(){return"dfuse"},function(){return n=!0,Promise.resolve(o.dfuseGetKeyAccounts(e))}],[function(){return"native"},function(){return n=!0,Promise.resolve(o.nativeGetKeyAccounts(e))}],[function(){return"hyperion"},function(){return n=!0,Promise.resolve(o.hyperionGetKeyAccounts(e))}]]);return Promise.resolve(a&&a.then?a.then(i):i(a))}catch(e){return Promise.reject(e)}},et=function(e){try{var r=t.constants.CHAIN.toLowerCase().replace("-","");return Promise.resolve(this.lightGetKeyAccountsRaw(e)).then((function(e){var t=Object.entries(e).reduce((function(e,t){var n=t[0],o=Object.keys(t[1].accounts);return o.length&&n===r&&(e=e.concat(o)),e}),[]);return[].concat(new Set(t))}))}catch(e){return Promise.reject(e)}},tt=function(e){try{return Promise.resolve(this.lightApi.get_key_accounts(e))}catch(e){return Promise.reject(e)}},rt=function(n){try{var o=new r.JsonRpc(t.constants.HYPERION_URL,{fetch:fetch}),i=e.Key.PublicKey.fromString(n).toLegacyString();return Promise.resolve(o.get_key_accounts(i)).then((function(e){var t=e.account_names;if(t&&t.length)return t;throw new Error("No keys found")}))}catch(e){return Promise.reject(e)}},nt=function(r){try{var n=new e.JsonRpc(t.constants.ACTIONS_ENDPOINTS);return Promise.resolve(h((function(){return Promise.resolve(n.history_get_key_accounts(r)).then((function(n){var i=n.account_names,s=i&&i.length?i:[];if(["fio","fio-test"].includes(t.constants.CHAIN)){var c=o.fioKeyToActor(r,e.Numeric.stringToPublicKey);-1===s.indexOf(c)&&s.push(c)}return s}))}),(function(e){throw console.log(e),e})))}catch(e){return Promise.reject(e)}},ot=function(e){try{var r=this;return Promise.resolve(h((function(){return Promise.resolve(r.get(t.constants.API_URL+"/dfuse?type=state_key_accounts&publicKey="+e)).then((function(e){var t=e.account_names;return t&&t.length?t:[]}))}),(function(t){return console.log(t),console.log("No dfuse accounts found associated with key:",e),[]})))}catch(e){return Promise.reject(e)}},it=function(e){try{var r=!1,n=this,o=function(o){var i=!1;if(r)return o;function s(r){var o=!1;if(i)return r;function s(e){return o?e:(console.log("Permission links not available on chain"),[])}var c=function(){if(t.constants.HISTORY_TYPES.includes("hyperion"))return h((function(){return Promise.resolve(n.hyperion.get_links(e)).then((function(e){return o=!0,e.links.map((function(e){return{action:e.action,contract:e.code,permission_name:e.permission}}))}))}),(function(e){console.log(e)}))}();return c&&c.then?c.then(s):s(c)}var c=function(){if(t.constants.HISTORY_TYPES.includes("dfuse"))return h((function(){return Promise.resolve(n.get(t.constants.API_URL+"/dfuse?type=state_permission_links&account="+e)).then((function(e){var t=e.linked_permissions;if(t)return i=!0,t}))}),(function(e){console.log(e)}))}();return c&&c.then?c.then(s):s(c)},i=function(){if(t.constants.LIGHT_API)return h((function(){return Promise.resolve(n.getAccountLightData(e)).then((function(e){if(e)return r=!0,e.linkauth.map((function(e){return{action:e.type,contract:e.code,permission_name:e.requirement}}))}))}),(function(e){console.log(e)}))}();return Promise.resolve(i&&i.then?i.then(o):o(i))}catch(e){return Promise.reject(e)}};function st(r){return t.constants.HISTORY_TYPES.includes("native")?this.actionsRpc.history_get_controlled_accounts(r):t.constants.HISTORY_TYPES.includes("hyperion")?new e.JsonRpc([t.constants.HYPERION_URL]).history_get_controlled_accounts(r):[]}exports.ApiClass=function(){function o(){this.rpc=void 0,this.actionsRpc=void 0,this.api=void 0,this.hyperion=void 0,this.lightApi=void 0,this.isInitialized=!1,this.get=F,this.post=L,this.getAccount=_,this.getGravatar=m,this.searchAccount=v,this.getParent=p,this.getAccountLightData=d,this.getActionsFromNative=I,this.getActions=O,this.getActionsFromDfuse=w,this.getActionsFromHyperion=b,this.getDappStats=T,this.getDspPackages=N,this.getDapphodlBalance=R,this.getDappBalance=E,this.getDappStakes=j,this.getDapphodlStakes=A,this.getDappUnstakes=k,this.getDapphodlUnstakes=S,this.getFIOVoter=X,this.getFIOAddressByName=K,this.getFIODomainByName=U,this.getDomains=G,this.getAddresses=Y,this.getFIOProducers=B,this.getFIOLockedTokens=M,this.getFIOLocked=V,this.getAllFIOLocked=H,this.getFIOSupplyBreakdown=D,this.getFIOFees=q,this.addFIOFeeToActions=C,this.getFIOAddresses=J,this.getFIODomains=z,this.getFIOAddressesAndDomains=W,this.getControlledAccounts=st,this.getPermissionLinks=it,this.dfuseGetKeyAccounts=ot,this.nativeGetKeyAccounts=nt,this.hyperionGetKeyAccounts=rt,this.lightGetKeyAccounts=et,this.lightGetKeyAccountsRaw=tt,this.getKeyAccountsByType=Ze,this.getKeyAccounts=$e,this.getKeyAccountsForAllChains=Qe,this.getRequiredAccounts=We,this.getUsersFromKeys=ze,this.getAllMsigs=ne,this.parsePackedMsigActions=re,this.parsePackedMsig=te,this.getFullMsigProposal=ee,this.getMsigApprovals=Z,this.getAccountsMsigProposals=$,this.hyperionGetMsig=Q,this.getXprTotalStakedAndApr=be,this.getXprVoter=ye,this.getXprAccountStakes=Pe,this.getXprAccountRefund=ge,this.getXprLongstakePlans=_e,this.getXprLongstakeStakes=ve,this.getXprOracleData=me,this.getAllOracleFeeds=pe,this.getAllOracleData=de,this.getProtonAvatar=he,this.getRentbwState=ke,this.delegatedBandwidth=Se,this.getAccountDelegatedBandwidth=Ie,this.getAccountResources=Oe,this.getRamPriceInEos=we,this.getRexQueued=qe,this.getRexPool=Ce,this.getRexBalance=Le,this.getRexCpuLoans=Fe,this.getRexNetLoans=xe,this.getEosDepositedIntoRex=Te,this.getRexReturnRate=Ne,this.getRexPriceChart=Re,this.getEosTopStakes=Ee,this.getEosTopRams=je,this.getCurrentNameBids=Ae,this.getEosBalance=Ge,this.getTokenBalance=Ye,this.hyperionGetTokensForAccount=Me,this.getTokenSupply=He,this.lightGetTokens=Be,this.getHistoryTransaction=Je,this.getDeferredTransaction=Ve,this.getHyperionTransaction=Xe,this.generateTransactionSettings=Ke,this.getProxies=ue,this.getVoters=ae,this.calculateVoteWeight=fe,this.weightedVoteToNumber=ce,this.getProxyData=se,this.getVoter=le,this.getProducers=ie,this.getChainTable=oe}return o.prototype.initialize=function(o){var i=void 0===o?{}:o,s=i.rpcEndpoints,c=i.actionsRpcEndpoints,a=i.lightEndpoint,u=i.hyperionEndpoint;console.log(s,t.constants.DEFAULT_ENDPOINTS),console.log(c,t.constants.ACTIONS_ENDPOINTS),console.log(a,t.constants.LIGHT_API),console.log(u,t.constants.HYPERION_URL),this.rpc=new e.JsonRpc(s||t.constants.DEFAULT_ENDPOINTS),this.actionsRpc=new e.JsonRpc(c||t.constants.ACTIONS_ENDPOINTS),this.api=new e.Api({rpc:this.rpc});var l=a||t.constants.LIGHT_API;l&&(this.lightApi=new n.JsonRpc(t.constants.CHAIN.toLowerCase().replace("-",""),{fetch:fetch,endpoint:l}));var f=u||t.constants.HYPERION_URL;f&&(this.hyperion=new r.JsonRpc(f)),this.isInitialized=!0},o}();
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("@proton/js"),t=require("@eoscafe/hyperion"),r=require("@eoscafe/light-api"),n=require("@bloks/constants"),o=require("@bloks/utils"),i=require("@bloks/numbers");const s=function(){function e(){}return e.prototype.then=function(t,r){const n=new e,o=this.s;if(o){const e=1&o?t:r;if(e){try{c(n,1,e(this.v))}catch(e){c(n,2,e)}return n}return this}return this.o=function(e){try{const o=e.v;1&e.s?c(n,1,t?t(o):o):r?c(n,1,r(o)):c(n,2,o)}catch(e){c(n,2,e)}},n},e}();function c(e,t,r){if(!e.s){if(r instanceof s){if(!r.s)return void(r.o=c.bind(null,e,t));1&t&&(t=r.s),r=r.v}if(r&&r.then)return void r.then(c.bind(null,e,t),c.bind(null,e,2));e.s=t,e.v=r;const n=e.o;n&&n(e)}}function a(e){return e instanceof s&&1&e.s}const u="undefined"!=typeof Symbol?Symbol.iterator||(Symbol.iterator=Symbol("Symbol.iterator")):"@@iterator";function l(e,t,r){if("function"==typeof e[u]){var n,o,i,l=e[u]();if(function e(u){try{for(;!((n=l.next()).done||r&&r());)if((u=t(n.value))&&u.then){if(!a(u))return void u.then(e,i||(i=c.bind(null,o=new s,2)));u=u.v}o?c(o,1,u):o=u}catch(e){c(o||(o=new s),2,e)}}(),l.return){var f=function(e){try{n.done||l.return()}catch(e){}return e};if(o&&o.then)return o.then(f,(function(e){throw f(e)}));f()}return o}if(!("length"in e))throw new TypeError("Object is not iterable");for(var h=[],d=0;d<e.length;d++)h.push(e[d]);return function(e,t,r){var n,o,i=-1;return function u(l){try{for(;++i<e.length&&(!r||!r());)if((l=t(i))&&l.then){if(!a(l))return void l.then(u,o||(o=c.bind(null,n=new s,2)));l=l.v}n?c(n,1,l):n=l}catch(e){c(n||(n=new s),2,e)}}(),n}(h,(function(e){return t(h[e])}),r)}function f(e,t){var r;do{var n=e();if(n&&n.then){if(!a(n)){r=!0;break}n=n.v}var o=t();if(a(o)&&(o=o.v),!o)return n}while(!o.then);const i=new s,u=c.bind(null,i,2);return(r?n.then(l):o.then(f)).then(void 0,u),i;function l(r){for(n=r;a(o=t())&&(o=o.v),o;){if(o.then)return void o.then(f).then(void 0,u);if((n=e())&&n.then){if(!a(n))return void n.then(l).then(void 0,u);n=n.v}}c(i,1,n)}function f(r){if(r){do{if((n=e())&&n.then){if(!a(n))return void n.then(l).then(void 0,u);n=n.v}if(a(r=t())&&(r=r.v),!r)return void c(i,1,n)}while(!r.then);r.then(f).then(void 0,u)}else c(i,1,n)}}function h(e,t){try{var r=e()}catch(e){return t(e)}return r&&r.then?r.then(void 0,t):r}"undefined"!=typeof Symbol&&(Symbol.asyncIterator||(Symbol.asyncIterator=Symbol("Symbol.asyncIterator")));var d=function(e){try{var t=this;return Promise.resolve(t.lightApi?h((function(){return Promise.resolve(t.lightApi.get_account_info(e))}),(function(e){console.log(e)})):void 0)}catch(e){return Promise.reject(e)}},p=function(e){try{return n.constants.HISTORY_TYPES.includes("hyperion")?Promise.resolve(n.constants.HYPERION_URL?this.hyperion.get_creator(e):this.get(o.urlBuilder(n.constants.API_URL,"hyperion",{type:"get_creator",account:e}))):Promise.resolve(null)}catch(e){return Promise.reject(e)}},m=function(e){try{return"eos"===n.constants.CHAIN?Promise.resolve(this.rpc.get_table_rows({json:!0,code:n.constants.ACCOUNT_INFO,scope:n.constants.ACCOUNT_INFO,table:"accounts",table_key:"",key_type:"name",lower_bound:e,index_position:1,limit:1})).then((function(t){return t.rows.length>0&&t.rows[0].account_name===e?t.rows[0]:void 0})):Promise.resolve(void 0)}catch(e){return Promise.reject(e)}},v=function(e,t){try{var r=this;return e&&/(^[a-zA-Z12345.]+$)/.test(e)?0===e.indexOf(".")?Promise.resolve([]):Promise.resolve(h((function(){return e=e.trim().toLowerCase(),Promise.resolve(r.rpc.get_table_by_scope({json:!0,code:n.constants.EOSIO,limit:t,lower_bound:e,table:"userres",upper_bound:""+e+(e.length<12?"z".repeat(12-e.length):"")})).then((function(e){return e.rows.map((function(e){return e.scope}))}))}),(function(e){return console.log(e),[]}))):Promise.resolve([])}catch(e){return Promise.reject(e)}},_=function(t){try{var r=this;return Promise.resolve(h((function(){return Promise.resolve(r.rpc.get_account(t)).then((function(t){return t.permissions=t.permissions.map((function(t){return t.required_auth.keys=t.required_auth.keys.map((function(t){return-1!==t.key.indexOf(n.constants.KEY_PREFIX)&&(t.key=e.Numeric.convertLegacyPublicKey(t.key,n.constants.KEY_PREFIX)),t})),t})),t}))}),(function(e){console.log(e)})))}catch(e){return Promise.reject(e)}};function g(){return(g=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e}).apply(this,arguments)}function P(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function y(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(r)return(r=r.call(e)).next.bind(r);if(Array.isArray(e)||(r=function(e,t){if(e){if("string"==typeof e)return P(e,void 0);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?P(e,void 0):void 0}}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0;return function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var b=function(e,t){var r=void 0===t?{}:t,i=r.skip,s=r.limit,c=r.sort,a=r.after,u=r.before,l=r.filter,f=r.tokenFilter,h=r.actionFilters,d=r.contractFilter,p=r.actionFilter;try{var m,v=function(){if(!m)throw new Error("Could not retrieve actions");return o.hyperionTransformGetActions(m)},_={filter:l,skip:i,limit:s,sort:c,after:a,before:u};if(console.log("Fetching actions from Hyperion"),console.table(_),f){var g=f.split(" ")[1];_.filter=_.filter?_.filter.replace("*",g):g+":*"}if(h){var P=Object.entries(h).reduce((function(e,t){var r=t[1];return r.isActive?e.concat(r):e}),[]);if(P.length){for(var b,w=y(P);!(b=w()).done;)b.value.hyperionQuery(e,_);console.log(_)}}if(d&&(_.filter=_.filter?_.filter.split(",").map((function(e){return d+":"+e.split(":")[1]})).join(","):d+":*"),p)if(_.filter){var O=Array.from(new Set(_.filter.split(",").map((function(e){return e.split(":")[0]}))));_.filter=O.map((function(e){return e+":"+p})).join(",")}else _.filter="*:"+p;var I=n.constants.HYPERION_URL?Promise.resolve(this.hyperion.get_actions(e,Object.assign({},_))).then((function(e){m=e})):Promise.resolve(this.get(o.urlBuilder(n.constants.API_URL,"hyperion",{type:"get_actions",account:e,options:Object.assign({},_)}))).then((function(e){m=e}));return Promise.resolve(I&&I.then?I.then(v):v())}catch(e){return Promise.reject(e)}},w=function(e,t){var r=void 0===t?{}:t,i=r.before,s=r.after,c=r.limit,a=void 0===c?25:c,u=r.cursor,l=r.query,f=r.direction,h=void 0===f?"desc":f,d=r.tokenFilter,p=r.actionFilters,m=r.contractFilter,v=r.actionFilter,_=r.type,g=void 0===_?"search_transactions_graphql":_;try{var P=l||"(auth:"+e+" OR\n receiver:"+e+" OR\n data.to:"+e+" OR\n data.from:"+e+" OR\n data.receiver:"+e+")";if(d&&(P=P+" account:"+d.split(" ")[1]),p){var y=Object.entries(p).reduce((function(e,t){var r=t[1];return r.isActive?e.concat(r):e}),[]);if(y.length){var b=y.map((function(t){return t.dfuseQuery(e)})).join(" OR ");-1!==b.search("OR")&&(b="("+b+")"),P=P+" "+b}m&&(P=P+" account:"+m),v&&(P=P+" action:"+v)}return Promise.resolve(this.get(o.urlBuilder(n.constants.API_URL,"dfuse",{type:g,q:P,options:Object.assign({},{sort:h,cursor:u,limit:a,withReversible:!0,before:i,after:s,code:1})}))).then((function(t){if(!t)throw new Error("Could not retrieve actions");return o.dfuseTransformGetActions(t,e,n.constants)}))}catch(e){return Promise.reject(e)}},O=function(e,t,r){var o=void 0===r?{}:r,i=o.actionsPerPage,s=void 0===i?100:i,c=o.actionSkip,a=void 0===c?0:c,u=o.sortDirection,l=void 0===u?"desc":u,f=o.dfuseCursorStack,h=void 0===f?[]:f,d=o.tokenFilter,p=o.actionFilters,m=o.contractFilter,v=o.actionFilter,_=o.start,g=void 0===_?n.constants.CHAIN_START_DATE:_,P=o.end;try{var y,b=this;!t&&n.constants.HISTORY_TYPES.length&&(t=n.constants.HISTORY_TYPES[0]),g&&P?(g=g||n.constants.CHAIN_START_DATE?new Date(g||n.constants.CHAIN_START_DATE).toISOString():void 0,P=new Date(P||new Date).toISOString()):(g=void 0,P=void 0);var w=function(){if("dfuse"===t)return Promise.resolve(b.getActionsFromDfuse(e,{limit:s,cursor:h.length>0?h[h.length-1]:"",direction:l,query:"",after:g,before:P,tokenFilter:d,actionFilters:p,contractFilter:m,actionFilter:v})).then((function(e){y=e}));var r="hyperion"===t?Promise.resolve(b.getActionsFromHyperion(e,{skip:Math.abs(a)-1,limit:s,sort:l,after:g,before:P,tokenFilter:d,actionFilters:p,contractFilter:m,actionFilter:v})).then((function(e){y=e})):Promise.resolve(b.getActionsFromNative(e,a,-s,"native")).then((function(e){y=e}));return r&&r.then?r.then((function(){})):void 0}();return Promise.resolve(w&&w.then?w.then((function(){return y})):y)}catch(e){return Promise.reject(e)}},I=function(e,t,r,i){void 0===i&&(i="native");try{return console.log("Fetching actions from:",i),console.log("Fetch Params:","actionSkip",t,"actionsPerPage",r),Promise.resolve(this.actionsRpc.history_get_actions(e,t,r)).then((function(e){if(!e)throw new Error("Could not retrieve actions");return"native"===i?o.nativeTransformGetActions(e,n.constants):[]}))}catch(e){return Promise.reject(e)}},S=function(e){var t=this;return Promise.resolve(h((function(){return Promise.resolve(t.rpc.get_table_rows({code:"dappservices",json:!0,limit:1e3,scope:"dappairhodl1",table:"refunds"})).then((function(r){function n(){return o.filter((function(t){return t.account===e})).map((function(e){return e.scope="dappairhodl1",e}))}if(!r)return[];var o=r.rows,i=function(){if(r.more){var n=o,i=n.concat;return Promise.resolve(t.getDapphodlUnstakes(e)).then((function(e){o=i.call(n,e)}))}}();return i&&i.then?i.then(n):n()}))}),(function(){return[]})))},k=function(e){var t=this;return Promise.resolve(h((function(){return Promise.resolve(t.rpc.get_table_rows({code:"dappservices",json:!0,limit:100,scope:e,table:"refunds"})).then((function(t){return t&&t.rows&&t.rows.length?t.rows.map((function(t){return t.scope=e,t})):[]}))}),(function(){return[]})))},A=function(e,t){var r=this;return void 0===t&&(t=""),Promise.resolve(h((function(){return Promise.resolve(r.rpc.get_table_rows({code:"dappservices",json:!0,limit:1e3,scope:"dappairhodl1",table:"staking",lower_bound:t})).then((function(t){function n(){return o.filter((function(t){return t.account===e})).map((function(e){return e.scope="dappairhodl1",e}))}if(!t)return[];var o=t.rows,i=function(){if(t.more){var n=o,i=n.concat;return Promise.resolve(r.getDapphodlStakes(e,+o[o.length-1].id+1)).then((function(e){o=i.call(n,e)}))}}();return i&&i.then?i.then(n):n()}))}),(function(){return[]})))},j=function(e){var t=this;return Promise.resolve(h((function(){return Promise.resolve(t.rpc.get_table_rows({code:"dappservices",json:!0,limit:100,scope:e,table:"staking"})).then((function(t){return t&&t.rows&&t.rows.length?t.rows.map((function(t){return t.scope=e,t})):[]}))}),(function(){return[]})))},E=function(e){var t=this;return Promise.resolve(h((function(){return Promise.resolve(t.rpc.get_table_rows({code:"dappservices",json:!0,limit:1,scope:e,table:"accounts"})).then((function(e){return e&&e.rows&&e.rows.length?e.rows[0]:{}}))}),(function(){return{}})))},R=function(e){var t=this;return Promise.resolve(h((function(){return Promise.resolve(t.rpc.get_table_rows({code:"dappairhodl1",json:!0,limit:1,scope:e,table:"accounts"})).then((function(e){return e&&e.rows&&e.rows.length?e.rows[0]:{}}))}),(function(){return{}})))},N=function(){try{var e=this;return Promise.resolve(h((function(){return Promise.resolve(e.rpc.get_table_rows({code:"dappservices",json:!0,limit:500,scope:"dappservices",table:"package"})).then((function(e){return e&&e.rows&&e.rows.length?e.rows:[]}))}),(function(e){return console.log(e),[]})))}catch(e){return Promise.reject(e)}},T=function(){try{var e=this;return Promise.resolve(h((function(){return Promise.resolve(e.rpc.get_table_rows({code:"dappservices",json:!0,limit:1,scope:"......2ke1.o4",table:"statext"})).then((function(e){return e&&e.rows&&e.rows.length?e.rows[0]:{}}))}),(function(e){return console.log(e),{}})))}catch(e){return Promise.reject(e)}},x=function(e,t){void 0===t&&(t="json");try{return Promise.resolve(h((function(){return Promise.resolve(fetch(e)).then((function(e){return function(){if(e.ok)return Promise.resolve("arraybuffer"===t?e.arrayBuffer():e.json())}()}))}),(function(e){console.log(e)})))}catch(e){return Promise.reject(e)}},F=function(e,t,r){void 0===t&&(t={method:"get"}),void 0===r&&(r="json");try{return Promise.resolve(x(new Request(e,t),r))}catch(e){return Promise.reject(e)}},L=function(e,t,r){try{return void 0===r&&(r={method:"post",body:JSON.stringify(t)}),Promise.resolve(x(new Request(e,r)))}catch(e){return Promise.reject(e)}},C=function(e,t){try{var r=this,o={"eosio::deleteauth":"auth_delete","eosio::linkauth":"auth_link","eosio::regproducer":"register_producer","eosio::regproxy":"register_proxy","eosio::unregprod":"unregister_producer","eosio::unregproxy":"unregister_proxy","eosio::updateauth":"auth_update","eosio::voteproducer":"vote_producer","eosio::voteproxy":"proxy_vote","fio.token::trnsfiopubky":"transfer_tokens_pub_key","fio.address::addaddress":"add_pub_address","fio.address::regaddress":"register_fio_address","fio.address::regdomain":"register_fio_domain","fio.address::renewaddress":"renew_fio_address","fio.address::renewdomain":"renew_fio_domain","fio.address::setdomainpub":"set_fio_domain_public","eosio.msig::approve":"msig_approve","eosio.msig::cancel":"msig_cancel","eosio.msig::exec":"msig_exec","eosio.msig::invalidate":"msig_invalidate","eosio.msig::propose":"msig_propose","eosio.msig::unapprove":"msig_approve","fio.reqobt::newfundsreq":"new_funds_request","fio.reqobt::rejectfndreq":"reject_funds_request","fio.reqobt::cancelfndreq":"cancelfndreq","fio.reqobt::recordobt":"record_obt_data","fio.reqobt::newpubaddreq":"new_pub_address_request","fio.reqobt::relpubadd":"release_pub_address","fio.reqobt::rejectaddreq":"reject_pub_address_request","fio.reqobt::canceladdreq":"cancel_pub_address_request","fio.lock::trnsloctoks":"transfer_locked_tokens","fio.lock::locktokens":"lock_tokens","fio.address::remaddress":"remove_pub_address","fio.address::remalladdr":"remove_all_pub_addresses","fio.address::burnaddress":"burn_fio_address","fio.address::xferdomain":"transfer_fio_domain","fio.address::xferaddress":"transfer_fio_address"};return Promise.resolve(r.getFIOFees()).then((function(i){var s=[],c=l(e,(function(e){return Promise.resolve(r.api.getCachedAbi(e.account)).then((function(c){var a=c.abi,u=a.structs;function l(){s.push(e)}var f=a.actions.find((function(t){return t.name===e.name})),h=function(){if(f){var s=u.find((function(e){return e.name===f.type})),c=function(){if(s){if(s.fields.find((function(e){return"max_fee"===e.name}))&&void 0===e.data.max_fee){var c=o[e.account+"::"+e.name];if(c){var a=i.find((function(e){return e.end_point===c}));e.data.max_fee=a?a.suf_amount:0}}s.fields.find((function(e){return"actor"===e.name}))&&void 0===e.data.actor&&(e.data.actor=t),s.fields.find((function(e){return"tpid"===e.name}))&&void 0===e.data.tpid&&(e.data.tpid=n.constants.FIO_FEES_ACCOUNT);var u=s.fields.find((function(e){return"fio_address"===e.name})),l=function(){if(u&&void 0===e.data.fio_address)return Promise.resolve(r.getFIOAddresses(t)).then((function(t){t.length&&(e.data.fio_address=t[0].name)}))}();if(l&&l.then)return l.then((function(){}))}}();if(c&&c.then)return c.then((function(){}))}}();return h&&h.then?h.then(l):l()}))}));return c&&c.then?c.then((function(){return s})):s}))}catch(e){return Promise.reject(e)}},q=function(){try{return Promise.resolve(this.rpc.get_table_rows({code:"fio.fee",scope:"fio.fee",table:"fiofees",limit:-1}).then((function(e){return e.rows})).catch((function(e){return[]})))}catch(e){return Promise.reject(e)}},D=function(){try{var e=this;return Promise.resolve(e.rpc.get_table_rows({code:"fio.token",scope:"FIO",table:"stat"})).then((function(t){var r=+t.rows[0].supply.split(" ")[0];return Promise.resolve(e.rpc.get_table_rows({code:"fio.treasury",scope:"fio.treasury",table:"bprewards"})).then((function(t){var o=t.rows[0].rewards/Math.pow(10,n.constants.CORE_PRECISION);return Promise.resolve(e.rpc.get_table_rows({code:"fio.treasury",scope:"fio.treasury",table:"bpbucketpool"})).then((function(e){var t=e.rows[0].rewards/Math.pow(10,n.constants.CORE_PRECISION),i=o+t;return Promise.resolve(fetch("https://fioprotocol.io/circulating").then((function(e){return e.json()}))).then((function(e){return{supply:r,totalLocked:r-e,bpRewards:o,bpBucket:t,totalBp:i,circulating:e}}))}))}))}))}catch(e){return Promise.reject(e)}},H=function(){try{var e=this,t=!0,r=[],n=null,s="",c=f((function(){return Promise.resolve(e.getFIOLocked(s)).then((function(e){t=(n=e).more,r=r.concat(n.rows),t&&(s=new i.BN(o.encodeName(r[r.length-1].owner,!1)).plus(1).toString())}))}),(function(){return!!t}));return Promise.resolve(c&&c.then?c.then((function(){return r})):r)}catch(e){return Promise.reject(e)}},M=function(e){try{var t=this;return Promise.resolve(h((function(){return Promise.resolve(t.rpc.get_table_rows({code:n.constants.EOSIO,scope:n.constants.EOSIO,table:"lockedtokens",lower_bound:o.encodeName(e,!1),limit:1})).then((function(t){var r=t.rows;return r&&r.length&&r[0].owner===e?r[0].remaining_locked_amount/Math.pow(10,n.constants.CORE_PRECISION):0}))}),(function(e){return console.log(e),0})))}catch(e){return Promise.reject(e)}},B=function(e){try{var t=this;return Promise.resolve(h((function(){return Promise.resolve(t.rpc.get_table_rows({code:n.constants.EOSIO,scope:n.constants.EOSIO,table:"producers",reverse:!0,limit:e})).then((function(e){var t=e.rows;return t&&t.length?t:[]}))}),(function(e){return console.log(e),[]})))}catch(e){return Promise.reject(e)}},Y=function(e,t){void 0===e&&(e=-1);try{var r=this;return Promise.resolve(h((function(){return Promise.resolve(r.rpc.get_table_rows({code:"fio.address",scope:"fio.address",table:"fionames",reverse:!0,upper_bound:t,limit:e})).then((function(e){var t=e.rows;return t&&t.length?t:[]}))}),(function(e){return console.log(e),[]})))}catch(e){return Promise.reject(e)}},G=function(e,t){void 0===e&&(e=-1);try{var r=this;return Promise.resolve(h((function(){return Promise.resolve(r.rpc.get_table_rows({code:"fio.address",scope:"fio.address",table:"domains",reverse:!0,upper_bound:t,limit:e})).then((function(e){var t=e.rows;return t&&t.length?t:[]}))}),(function(e){return console.log(e),[]})))}catch(e){return Promise.reject(e)}},U=function(e){try{var t=this;return Promise.resolve(h((function(){var r=t.rpc,n=r.get_table_rows;return Promise.resolve(o.string_to_uint128_hash(e)).then((function(t){return Promise.resolve(n.call(r,{code:"fio.address",scope:"fio.address",table:"domains",lower_bound:"0x"+t,limit:1,key_type:"i128",index_position:4})).then((function(t){var r=t.rows;return r&&r.length&&r[0].name===e?r[0]:void 0}))}))}),(function(e){console.log(e)})))}catch(e){return Promise.reject(e)}},K=function(e){try{var t=this;return Promise.resolve(h((function(){var r=t.rpc,n=r.get_table_rows;return Promise.resolve(o.string_to_uint128_hash(e)).then((function(t){return Promise.resolve(n.call(r,{code:"fio.address",scope:"fio.address",table:"fionames",lower_bound:"0x"+t,limit:1,key_type:"i128",index_position:5})).then((function(t){var r=t.rows;return r&&r.length&&r[0].name===e?r[0]:void 0}))}))}),(function(e){console.log(e)})))}catch(e){return Promise.reject(e)}},X=function(e){try{var t=this;return Promise.resolve(h((function(){return Promise.resolve(t.rpc.get_table_rows({json:!0,code:n.constants.EOSIO,scope:n.constants.EOSIO,lower_bound:o.encodeName(e,!1),upper_bound:o.encodeName(e,!1),table:"voters",key_type:"i64",index_position:3,limit:1})).then((function(e){var t=e.rows;return t.length?t[0]:void 0}))}),(function(e){console.log(e)})))}catch(e){return Promise.reject(e)}};function V(e){return this.rpc.get_table_rows({code:n.constants.EOSIO,scope:n.constants.EOSIO,table:"lockedtokens",lower_bound:e,limit:-1})}function J(e){return this.rpc.get_table_rows({code:"fio.address",scope:"fio.address",table:"fionames",key_type:"i64",limit:-1,lower_bound:o.encodeName(e,!1),upper_bound:new i.BN(o.encodeName(e,!1)).plus(1).toString(),index_position:4}).then((function(t){return t.rows.length>0?t.rows.filter((function(t){return t.owner_account===e})):[]})).catch((function(e){return[]}))}function z(e){return this.rpc.get_table_rows({code:"fio.address",scope:"fio.address",table:"domains",key_type:"i64",limit:-1,lower_bound:o.encodeName(e,!1),upper_bound:new i.BN(o.encodeName(e,!1)).plus(1).toString(),index_position:2}).then((function(t){return t.rows.length>0?t.rows.filter((function(t){return t.account===e})):[]})).catch((function(e){return[]}))}function W(e){return L(n.constants.DEFAULT_ENDPOINTS[0]+"/v1/get_fio_names",{fio_public_key:e})}var Q=function(e){try{var t=this;return t.hyperion?Promise.resolve(t.hyperion.get_proposals(e)).then((function(r){if(r&&r.proposals&&r.proposals.length){var o,i,s=r.proposals[0];return Promise.resolve(Promise.all([t.hyperion.get_actions(n.constants.EOSIO_MSIG,{block_num:s.block_num,limit:1}),t.hyperion.get_deltas(n.constants.EOSIO_MSIG,e.proposer,"proposal",void 0,{block_num:s.block_num})])).then((function(r){var n=r[0],c=r[1];function a(){return{approvals:s,transaction:i,executionTransaction:o}}if(n&&n.actions&&n.actions.length){var u=n.actions.find((function(t){return t.act.data.proposal_name===e.proposal}));u&&(o={payer:u.act.data.executer||u.act.data.canceler,trx_id:u.trx_id,published_at:u.timestamp,cancelled:"cancel"===u.act.name})}var l=function(){if(c&&c.deltas&&c.deltas.length){var e=c.deltas[0].data.transaction;return Promise.resolve(t.parsePackedMsigActions(e.actions)).then((function(t){e.actions=t,i=e}))}}();return l&&l.then?l.then(a):a()}))}})):Promise.resolve(void 0)}catch(e){return Promise.reject(e)}},$=function(e){try{var t=this;return Promise.resolve(h((function(){var r=[t.getMsigApprovals(e,n.constants.EOSIO_MSIG_APPROVALS_TABLE)];return"approvals2"===n.constants.EOSIO_MSIG_APPROVALS_TABLE&&r.push(t.getMsigApprovals(e,"approvals")),Promise.resolve(Promise.all(r)).then((function(e){return e[0].concat(e[1])}))}),(function(e){return console.log(e),[]})))}catch(e){return Promise.reject(e)}},Z=function(e,t){try{var r=this;return Promise.resolve(h((function(){return Promise.resolve(r.rpc.get_table_rows({json:!0,code:n.constants.EOSIO_MSIG,scope:o.encodeName(e,!1),table:t,limit:-1})).then((function(e){return e.rows}))}),(function(e){return console.log(e),[]})))}catch(e){return Promise.reject(e)}},ee=function(e,t){try{var r=this;return Promise.resolve(h((function(){return Promise.resolve(r.rpc.get_table_rows({json:!0,code:n.constants.EOSIO_MSIG,scope:o.encodeName(e,!1),table:n.constants.EOSIO_MSIG_PROPOSALS_TABLE,table_key:"",key_type:"name",lower_bound:t,index_position:1,limit:1})).then((function(e){return function(){if(e&&e.rows&&e.rows.length)return Promise.resolve(r.parsePackedMsig(e.rows[0].packed_transaction))}()}))}),(function(e){console.log(e)})))}catch(e){return Promise.reject(e)}},te=function(e){try{var t=this;return Promise.resolve(h((function(){return Promise.resolve(t.api.deserializeTransactionWithActions(e)).then((function(e){return Promise.resolve(t.parsePackedMsigActions(e.actions)).then((function(t){return e.actions=t,e}))}))}),(function(e){console.log("Error parsing packed msig"),console.log(e)})))}catch(e){return Promise.reject(e)}},re=function(e){try{var t=this,r=function(){return i=i.map((function(e){return{action_trace:{act:e}}}))},i=[],s=l(e,(function(e){function r(){function r(){i.push(e)}var s=function(){if(e.account===n.constants.EOSIO&&"setabi"===e.name)return Promise.resolve(t.api.rawAbiToJson(o.hexToUint8Array(e.data.abi))).then((function(t){e.data.abi=t}))}();return s&&s.then?s.then(r):r()}var s=function(){if(e.account===n.constants.EOSIO_MSIG&&"propose"===e.name)return Promise.resolve(t.api.deserializeActionsSync(e.data.trx.actions)).then((function(t){e.data.trx.actions=t}))}();return s&&s.then?s.then(r):r()}));return Promise.resolve(s&&s.then?s.then(r):r())}catch(e){return Promise.reject(e)}},ne=function(){try{var e=this;if(n.constants.HISTORY_TYPES.includes("dfuse"))return Promise.resolve(e.get(o.urlBuilder(n.constants.API_URL,"dfuse",{type:"state_scope_pipeline",account:n.constants.EOSIO_MSIG,table:n.constants.EOSIO_MSIG_PROPOSALS_TABLE,options:{}}))).then((function(e){return e.tables.map((function(e){return e.rows=e.rows.sort((function(e,t){return t.block-e.block})),e.highestBlock=e.rows[0].block,e})).sort((function(e,t){return t.highestBlock-e.highestBlock}))}));var t=function(){return r.map((function(e){return{scope:e.scope,rows:Array(e.count).fill({key:""})}}))},r=[],i="",s=f((function(){return Promise.resolve(e.rpc.get_table_by_scope({json:!0,code:"eosio.msig",limit:100,lower_bound:i,table:"proposal",upper_bound:""})).then((function(e){i=e.more,r=r.concat(e.rows)}))}),(function(){return!!i}));return Promise.resolve(s&&s.then?s.then(t):t())}catch(e){return Promise.reject(e)}},oe=function(){try{return Promise.resolve(this.rpc.get_table_rows({code:n.constants.EOSIO,scope:n.constants.EOSIO,table:"global",limit:1})).then((function(e){return e.rows[0]}))}catch(e){return Promise.reject(e)}},ie=function(e,t){void 0===e&&(e=1),void 0===t&&(t=50);try{var r=this;if(""!==n.constants.API_URL)return Promise.resolve(r.get(o.urlBuilder(n.constants.API_URL,"producers",{pageNum:e,perPage:t})));var s=!0,c=[],a=null,u=null,l=f((function(){return Promise.resolve(r.rpc.get_table_rows({json:!0,code:n.constants.EOSIO,scope:n.constants.EOSIO,table:"producers",lower_bound:u,index_position:1,key_type:"i64",limit:100})).then((function(e){s=(a=e).more,c=c.concat(a.rows),u=new i.BN(o.encodeName(c[c.length-1].owner,!1)).plus(1).toString()}))}),(function(){return!!s}));return Promise.resolve(l&&l.then?l.then((function(){return c})):c)}catch(e){return Promise.reject(e)}},se=function(e){try{return""!==n.constants.ALOHA_PROXY_URL?Promise.resolve(this.get(n.constants.ALOHA_PROXY_URL+"/"+e+"?output=json")).then((function(e){return e.proxy})):Promise.resolve(void 0)}catch(e){return Promise.reject(e)}},ce=function(e,t){try{return t||(t=this.calculateVoteWeight()),Promise.resolve(+e/t/Math.pow(10,n.constants.CORE_PRECISION))}catch(e){return Promise.reject(e)}},ae=function(e){try{var t=this;return t.hyperion?Promise.resolve(t.hyperion.get_voters({producer:e,limit:100})).then((function(e){var r=e.voters,n=t.calculateVoteWeight();return r.map((function(e){return g({},e,{vote:t.weightedVoteToNumber(e.weight,n)})}))})):Promise.resolve(void 0)}catch(e){return Promise.reject(e)}},ue=function(){try{return""!==n.constants.ALOHA_PROXY_URL?Promise.resolve(this.get(n.constants.ALOHA_PROXY_URL+"?output=json")).then((function(e){return e.proxies})):Promise.resolve(this.hyperion.get_voters({proxy:!0,limit:1e3})).then((function(e){return e.voters.map((function(e,t){return g({},e,{weight:e.weight/Math.pow(10,n.constants.CORE_PRECISION),rank:t+1})}))}))}catch(e){return Promise.reject(e)}},le=function(e){try{var t=this;return Promise.resolve(h((function(){return Promise.resolve(t.rpc.get_table_rows({json:!0,code:n.constants.EOSIO,scope:n.constants.EOSIO,lower_bound:o.encodeName(e,!1),upper_bound:o.encodeName(e,!1),table:"voters",limit:1})).then((function(e){var t=e.rows;return t.length?t[0]:void 0}))}),(function(e){console.log(e)})))}catch(e){return Promise.reject(e)}};function fe(){var e="wax"===n.constants.CHAIN?13:52,t=Date.now()/1e3-946684800,r=Math.floor(t/604800)/e;return Math.pow(2,r)}var he=function(e){try{var t=this;return Promise.resolve(function(){if(-1!==n.constants.CHAIN.indexOf("proton"))return Promise.resolve(t.rpc.get_table_rows({json:!0,code:"eosio.proton",scope:"eosio.proton",table:"usersinfo",table_key:"",key_type:"name",lower_bound:e,index_position:1,limit:1})).then((function(t){return t.rows.length>0&&t.rows[0].acc===e?t.rows[0]:void 0}))}())}catch(e){return Promise.reject(e)}},de=function(e){try{var t=!1,r=this,n=h((function(){return Promise.resolve(r.rpc.get_table_rows({code:"oracles",scope:"oracles",table:"data",limit:-1,lower_bound:e,upper_bound:e})).then((function(r){var n=r.rows;if(n&&n.length&&n[0].feed_index===e)return t=!0,n[0]}))}),(function(e){console.log(e)}));return Promise.resolve(n&&n.then?n.then((function(e){return t?e:void 0})):t?n:void 0)}catch(e){return Promise.reject(e)}},pe=function(e){void 0===e&&(e=void 0);try{var t=this;return Promise.resolve(h((function(){return Promise.resolve(t.rpc.get_table_rows({code:"oracles",scope:"oracles",table:"feeds",limit:-1,lower_bound:e})).then((function(e){var r=e.rows;return e.more?Promise.resolve(t.getAllOracleFeeds(e.next_key)).then((function(e){return r.concat(e)})):r}))}),(function(e){return console.log(e),[]})))}catch(e){return Promise.reject(e)}},me=function(e){try{var t=this;return Promise.resolve(h((function(){return Promise.resolve(t.rpc.get_table_rows({code:"oracles",scope:"oracles",table:"data",limit:1,lower_bound:e,upper_bound:e})).then((function(e){var t=e.rows;return t&&t.length?t[0]:void 0}))}),(function(e){console.log(e)})))}catch(e){return Promise.reject(e)}},ve=function(e){try{var t=this;return Promise.resolve(h((function(){return Promise.resolve(t.rpc.get_table_rows({code:"longstaking",scope:"longstaking",table:"stakes",lower_bound:e,upper_bound:e,key_type:"name",index_position:2,limit:-1})).then((function(e){return e.rows}))}),(function(e){return console.log(e),[]})))}catch(e){return Promise.reject(e)}},_e=function(){try{var e=this;return Promise.resolve(h((function(){return Promise.resolve(e.rpc.get_table_rows({code:"longstaking",scope:"longstaking",table:"plans",limit:-1})).then((function(e){return e.rows.sort((function(e,t){return e.plan_days-t.plan_days}))}))}),(function(e){return console.log(e),[]})))}catch(e){return Promise.reject(e)}},ge=function(e){try{var t,r=this,i=h((function(){return Promise.resolve(r.rpc.get_table_rows({code:n.constants.EOSIO,scope:o.encodeName(e,!1),table:"refundsxpr",limit:-1})).then((function(e){var r=e.rows;r&&r.length&&((t=r[0]).quantity=+t.quantity.split(" ")[0])}))}),(function(e){console.log(e)}));return Promise.resolve(i&&i.then?i.then((function(){return t})):t)}catch(e){return Promise.reject(e)}},Pe=function(e){try{var t=this,r=[],i=h((function(){return Promise.resolve(t.rpc.get_table_rows({code:n.constants.EOSIO,scope:o.encodeName(e,!1),table:"delxpr",limit:-1})).then((function(e){var t=e.rows;t&&t.length&&(r=t)}))}),(function(e){console.log(e)}));return Promise.resolve(i&&i.then?i.then((function(){return r})):r)}catch(e){return Promise.reject(e)}},ye=function(e){try{var t=this;return Promise.resolve(h((function(){return Promise.resolve(t.rpc.get_table_rows({code:n.constants.EOSIO,scope:n.constants.EOSIO,lower_bound:o.encodeName(e,!1),table:"votersxpr",limit:1})).then((function(t){var r=t.rows;return r&&r.length&&r[0].owner===e?r[0]:void 0}))}),(function(e){console.log(e)})))}catch(e){return Promise.reject(e)}},be=function(){try{var e=this;return Promise.resolve(h((function(){return Promise.resolve(Promise.all([e.getTokenSupply(n.constants.EOSIO_TOKEN,n.constants.CORE_SYMBOL),e.rpc.get_table_rows({code:n.constants.EOSIO,scope:n.constants.EOSIO,table:"globalsd",limit:1}).then((function(e){return e.rows[0]})),e.rpc.get_table_rows({code:n.constants.EOSIO,scope:n.constants.EOSIO,table:"global4",limit:1}).then((function(e){return e.rows[0]}))])).then((function(e){var t=e[0].supply,r=e[2],o=r.continuous_rate,i=r.inflation_pay_factor,s=r.votepay_factor,c=+e[1].totalrstaked/Math.pow(10,n.constants.CORE_PRECISION);return{totalStaked:c,apr:t*(+i/(+i+ +s)*+o)/c*100}}))}),(function(e){return console.log(e),0})))}catch(e){return Promise.reject(e)}},we=function(){try{var e=!1,t=this,r=h((function(){return Promise.resolve(t.rpc.get_table_rows({json:!0,code:n.constants.EOSIO,scope:n.constants.EOSIO,table:"rammarket",table_key:"",limit:10})).then((function(t){var r=t.rows[0].base.balance,n=+r.substr(0,r.indexOf(" ")),o=t.rows[0].quote.balance,i=o.substr(0,o.indexOf(" ")),s=1024*Number((i/n).toFixed(8));return e=!0,s}))}),(function(e){console.log(e)}));return Promise.resolve(r&&r.then?r.then((function(t){return e?t:0})):e?r:0)}catch(e){return Promise.reject(e)}},Oe=function(e){try{return Promise.resolve(this.rpc.get_table_rows({json:!0,code:n.constants.EOSIO,scope:o.encodeName(e,!1),table:"userres",table_key:"",limit:1})).then((function(e){return e.rows[0]}))}catch(e){return Promise.reject(e)}},Ie=function(e){try{var t=this,r=!0,n=[],s=null,c="",a=h((function(){var a=f((function(){return Promise.resolve(t.delegatedBandwidth(e,c)).then((function(e){r=(s=e).more,n=n.concat(s.rows),r&&(c=new i.BN(o.encodeName(n[n.length-1].to,!1)).plus(1).toString())}))}),(function(){return!!r}));if(a&&a.then)return a.then((function(){}))}),(function(e){console.log(e)}));return Promise.resolve(a&&a.then?a.then((function(){return n})):n)}catch(e){return Promise.reject(e)}},Se=function(e,t){try{return Promise.resolve(this.rpc.get_table_rows({json:!0,code:n.constants.EOSIO,scope:o.encodeName(e,!1),table:"delband",table_key:"",limit:-1,lower_bound:t,key_type:"i64",index_position:1}))}catch(e){return Promise.reject(e)}},ke=function(){try{return Promise.resolve(this.rpc.get_table_rows({code:n.constants.EOSIO,scope:0,table:"powup.state",limit:1})).then((function(e){return e.rows[0]}))}catch(e){return Promise.reject(e)}},Ae=function(e,t){void 0===e&&(e=""),void 0===t&&(t="");try{return Promise.resolve(this.rpc.get_table_rows({code:n.constants.EOSIO,scope:n.constants.EOSIO,table:"namebids",key_type:"name",lower_bound:e,upper_bound:t,index_position:2,limit:500}))}catch(e){return Promise.reject(e)}},je=function(e){void 0===e&&(e=500);try{return Promise.resolve(this.lightApi.get_topram(e))}catch(e){return Promise.reject(e)}},Ee=function(e){void 0===e&&(e=500);try{return Promise.resolve(this.lightApi.get_topstake(e))}catch(e){return Promise.reject(e)}},Re=function(){try{var e=De[n.constants.CHAIN];if(e){var t=i.formatDate(i.utcTime()),r=i.formatDate(i.utcTime(i.startDate(i.time(),7)));return Promise.resolve(this.post("https://www.api.bloks.io/graphql/v1alpha1/graphql",{query:"query {\n "+e+'_pricechart(args: {\n from_time: "'+r+'",\n to_time: "'+t+'"\n }) {\n t\n o\n h\n l\n c\n }\n }',variables:null})).then((function(t){var r=t.data;return r?r[e+"_pricechart"]:[]}))}return Promise.resolve({actions:[]})}catch(e){return Promise.reject(e)}},Ne=function(e){void 0===e&&(e="mpr");try{var t=De[n.constants.CHAIN];return t?Promise.resolve(this.post("https://www.api.bloks.io/graphql/v1alpha1/graphql",{query:"query {\n "+t+"_"+e+" {\n "+e+"\n }\n }",variables:null})).then((function(r){var n=r.data;return n?Math.abs(n[t+"_"+e][0][e]):0})):Promise.resolve(0)}catch(e){return Promise.reject(e)}},Te=function(e){try{return Promise.resolve(this.rpc.get_table_rows({code:n.constants.EOSIO,scope:n.constants.EOSIO,table:"rexfund",lower_bound:o.encodeName(e,!1)})).then((function(t){var r=t.rows[0];return r.owner===e?Number(r.balance.split(" ")[0]):0}))}catch(e){return Promise.reject(e)}},xe=function(e){try{return Promise.resolve(this.rpc.get_table_rows({json:!0,code:n.constants.EOSIO,scope:n.constants.EOSIO,table:"netloan",table_key:"byowner",key_type:"i64",limit:100,lower_bound:o.encodeName(e,!1),index_position:3})).then((function(t){return t.rows.filter((function(t){return t.from===e}))}))}catch(e){return Promise.reject(e)}},Fe=function(e){try{return Promise.resolve(this.rpc.get_table_rows({json:!0,code:n.constants.EOSIO,scope:n.constants.EOSIO,table:"cpuloan",table_key:"byowner",key_type:"i64",limit:100,lower_bound:o.encodeName(e,!1),index_position:3})).then((function(t){return t.rows.filter((function(t){return t.from===e}))}))}catch(e){return Promise.reject(e)}},Le=function(e){try{return Promise.resolve(this.rpc.get_table_rows({code:n.constants.EOSIO,scope:n.constants.EOSIO,table:"rexbal",lower_bound:o.encodeName(e,!1)})).then((function(t){var r=t.rows[0];return r.owner===e?r:void 0}))}catch(e){return Promise.reject(e)}},Ce=function(){try{return Promise.resolve(this.rpc.get_table_rows({code:n.constants.EOSIO,scope:n.constants.EOSIO,table:"rexpool"})).then((function(e){var t=e.rows[0],r=function(e){return Number(e.split(" ")[0])},n=r(t.total_lent),o=r(t.total_lendable),s=r(t.total_unlent),c=r(t.total_rex),a=r(t.total_rent),u=i.multiply(i.divide(n,o),100),l=+i.divide(o,c),f=+i.divide(s,a+1);return{version:t.version,namebid_proceeds:r(t.namebid_proceeds),loan_num:t.loan_num,total_lent:n,total_unlent:s,total_rent:a,total_lendable:o,total_rex:c,lent_percent:u,rex_price:l,resource_price:f}}))}catch(e){return Promise.reject(e)}},qe=function(e){try{var t=!1,r=this,i=h((function(){return Promise.resolve(r.rpc.get_table_rows({code:n.constants.EOSIO,scope:n.constants.EOSIO,table:"rexqueue",limit:1,lower_bound:o.encodeName(e,!1)})).then((function(r){var n=r.rows;if(n&&n.length&&n[0].owner===e)return t=!0,n[0]}))}),(function(e){console.log(e)}));return Promise.resolve(i&&i.then?i.then((function(e){return t?e:void 0})):t?i:void 0)}catch(e){return Promise.reject(e)}},De={jungle:"jungle",bos:"bos",eos:"mainnet",telos:"telos"},He=function(e,t){try{var r=this;return Promise.resolve(h((function(){return Promise.resolve(r.rpc.get_currency_stats(e,t)).then((function(e){var r=e[t],n=r.supply,o=r.max_supply;return{supply:n?+n.split(" ")[0]:0,max_supply:o?+o.split(" ")[0]:0}}))}),(function(e){return console.log(e),{supply:0,max_supply:0}})))}catch(e){return Promise.reject(e)}},Me=function(e){var t=this;return Promise.resolve(h((function(){return Promise.resolve(t.hyperion.get_tokens(e)).then((function(e){return e.tokens.map((function(e){return{currency:e.symbol,trx_id:"",deleted:!1,amount:e.amount,contract:e.contract,decimals:e.precision,metadata:{}}}))}))}),(function(){})))},Be=function(e){try{return Promise.resolve(this.lightApi.get_balances(e)).then((function(e){var t=e.balances;return console.log(t),t.map((function(e){return{key:e.contract+"-"+(e.currency?e.currency.toLowerCase():Ue(0,1e7))+"-"+n.constants.CHAIN,currency:e.currency,amount:Number(e.amount),contract:e.contract,decimals:e.decimals,usd_value:0}}))}))}catch(e){return Promise.reject(e)}},Ye=function(e,t,r){try{return Promise.resolve(this.rpc.get_currency_balance(e,t,r).catch((function(e){return console.log(e)}))).then((function(e){return e&&e.length?e[0]:null}))}catch(e){return Promise.reject(e)}},Ge=function(e){try{return Promise.resolve(this.rpc.get_currency_balance(n.constants.EOSIO_TOKEN,e,n.constants.CORE_SYMBOL)).then((function(e){return e[0]}))}catch(e){return Promise.reject(e)}},Ue=function(e,t){return Math.floor(Math.random()*(t-e)+e)},Ke=function(t,r,n){void 0===t&&(t=3e3),void 0===r&&(r=12),void 0===n&&(n=0);try{var o=this;return Promise.resolve(o.rpc.get_info()).then((function(i){function s(){return g({max_net_usage_words:0,max_cpu_usage_ms:0,delay_sec:n,context_free_actions:[],actions:[],transaction_extensions:[]},c)}var c={},a=function(){if(i)return Promise.resolve(o.rpc.get_block(i.head_block_num-r)).then((function(r){c=e.Serialize.transactionHeader(r,t)}))}();return a&&a.then?a.then(s):s()}))}catch(e){return Promise.reject(e)}},Xe=function(e){try{var t,r=function(){if(!t||!t.actions||!t.actions.length)throw new Error("TX not found");return o.hyperionTransformTransaction(t)},i=n.constants.HYPERION_URL?Promise.resolve(this.hyperion.get_transaction(e)).then((function(e){t=e})):Promise.resolve(this.get(o.urlBuilder(n.constants.API_URL,"hyperion",{type:"get_transaction",id:e,options:{}}))).then((function(e){t=e}));return Promise.resolve(i&&i.then?i.then(r):r())}catch(e){return Promise.reject(e)}},Ve=function(e){try{return Promise.resolve(this.rpc.get_scheduled_transactions(!0,e,1)).then((function(t){var r=t.transactions;return r.length>0&&r[0].trx_id.substring(0,6)===e.substring(0,6)?o.historyTransformDeferredTransaction(r[0]):{}}))}catch(e){return Promise.reject(e)}},Je=function(t,r){void 0===r&&(r=0);try{var i=new e.JsonRpc(n.constants.TRANSACTIONS_ENDPOINTS);return Promise.resolve(i.history_get_transaction(t,r)).then((function(e){if(!e)throw new Error("TX not found");return o.historyTransformTransaction(e)}))}catch(e){return Promise.reject(e)}},ze=function(e){try{var t=this,r=[],n=e.map((function(e){try{return Promise.resolve(t.getKeyAccounts(e)).then((function(n){var o=n.map((function(n){try{return Promise.resolve(t.getAccount(n)).then((function(t){for(var o,i=y(t.permissions);!(o=i()).done;){var s=o.value;s.required_auth.keys.find((function(t){return t.key===e}))&&r.push({actor:n,permission:s.perm_name,publicKey:e})}}))}catch(e){return Promise.reject(e)}}));return Promise.resolve(Promise.all(o)).then((function(){}))}))}catch(e){return Promise.reject(e)}}));return Promise.resolve(Promise.all(n)).then((function(){return r}))}catch(e){return Promise.reject(e)}},We=function(e,t,r,n,o){void 0===r&&(r=[]),void 0===n&&(n=1),void 0===o&&(o=2);try{var i=this;return Promise.resolve(i.getAccount(e)).then((function(s){var c=l(s.permissions,(function(s){return function(){if(s.perm_name===t){var c=s.required_auth.accounts;return c.length||r.push({actor:e,permission:t}),l(c,(function(e){var t=function(){if(n<o)return Promise.resolve(i.getRequiredAccounts(e.permission.actor,e.permission.permission,r,++n,o)).then((function(){}));r.push({actor:e.permission.actor,permission:e.permission.permission})}();if(t&&t.then)return t.then((function(){}))}))}}()}));return c&&c.then?c.then((function(){return r})):r}))}catch(e){return Promise.reject(e)}},Qe=function(e){try{var t=this;return Promise.resolve(h((function(){return Promise.resolve(t.lightGetKeyAccountsRaw(e)).then((function(e){var t=e.reduce((function(e,t){return g({},e,t)}),{});return Object.entries(t).reduce((function(e,t){var r=t[0],n=Object.keys(t[1].accounts);return n.length&&e.push({chain:r,accounts:n}),e}),[])}))}),(function(e){return console.log(e),[]})))}catch(e){return Promise.reject(e)}},$e=function(e){try{var t=!1,r=this,o=function(e){return t?e:[]},i=l(n.constants.HISTORY_TYPES,(function(n){return h((function(){return Promise.resolve(r.getKeyAccountsByType(e,n)).then((function(e){if(e)return t=!0,e}))}),(function(e){console.log(e)}))}),(function(){return t}));return Promise.resolve(i&&i.then?i.then(o):o(i))}catch(e){return Promise.reject(e)}},Ze=function(e,t){try{var r=!1,o=this,i=function(t){return r?t:function(){if(n.constants.LIGHT_API)return Promise.resolve(o.lightGetKeyAccounts(e))}()},a=function(e,t){var r,n=-1;e:{for(var o=0;o<t.length;o++){var i=t[o][0];if(i){var a=i();if(a&&a.then)break e;if(a===e){n=o;break}}else n=o}if(-1!==n){do{for(var u=t[n][1];!u;)n++,u=t[n][1];var l=u();if(l&&l.then){r=!0;break e}var f=t[n][2];n++}while(f&&!f());return l}}const h=new s,d=c.bind(null,h,2);return(r?l.then(p):a.then((function r(s){for(;;){if(s===e){n=o;break}if(++o===t.length){if(-1!==n)break;return void c(h,1,u)}if(i=t[o][0]){if((s=i())&&s.then)return void s.then(r).then(void 0,d)}else n=o}do{for(var a=t[n][1];!a;)n++,a=t[n][1];var u=a();if(u&&u.then)return void u.then(p).then(void 0,d);var l=t[n][2];n++}while(l&&!l());c(h,1,u)}))).then(void 0,d),h;function p(e){for(;;){var r=t[n][2];if(!r||r())break;n++;for(var o=t[n][1];!o;)n++,o=t[n][1];if((e=o())&&e.then)return void e.then(p).then(void 0,d)}c(h,1,e)}}(t,[[function(){return"dfuse"},function(){return r=!0,Promise.resolve(o.dfuseGetKeyAccounts(e))}],[function(){return"native"},function(){return r=!0,Promise.resolve(o.nativeGetKeyAccounts(e))}],[function(){return"hyperion"},function(){return r=!0,Promise.resolve(o.hyperionGetKeyAccounts(e))}]]);return Promise.resolve(a&&a.then?a.then(i):i(a))}catch(e){return Promise.reject(e)}},et=function(e){try{var t=n.constants.CHAIN.toLowerCase().replace("-","");return Promise.resolve(this.lightGetKeyAccountsRaw(e)).then((function(e){var r=Object.entries(e).reduce((function(e,r){var n=r[0],o=Object.keys(r[1].accounts);return o.length&&n===t&&(e=e.concat(o)),e}),[]);return[].concat(new Set(r))}))}catch(e){return Promise.reject(e)}},tt=function(e){try{return Promise.resolve(this.lightApi.get_key_accounts(e))}catch(e){return Promise.reject(e)}},rt=function(r){try{var o=new t.JsonRpc(n.constants.HYPERION_URL,{fetch:fetch}),i=e.Key.PublicKey.fromString(r).toLegacyString();return Promise.resolve(o.get_key_accounts(i)).then((function(e){var t=e.account_names;if(t&&t.length)return t;throw new Error("No keys found")}))}catch(e){return Promise.reject(e)}},nt=function(t){try{var r=new e.JsonRpc(n.constants.ACTIONS_ENDPOINTS);return Promise.resolve(h((function(){return Promise.resolve(r.history_get_key_accounts(t)).then((function(r){var i=r.account_names,s=i&&i.length?i:[];if(["fio","fio-test"].includes(n.constants.CHAIN)){var c=o.fioKeyToActor(t,e.Numeric.stringToPublicKey);-1===s.indexOf(c)&&s.push(c)}return s}))}),(function(e){throw console.log(e),e})))}catch(e){return Promise.reject(e)}},ot=function(e){try{var t=this;return Promise.resolve(h((function(){return Promise.resolve(t.get(n.constants.API_URL+"/dfuse?type=state_key_accounts&publicKey="+e)).then((function(e){var t=e.account_names;return t&&t.length?t:[]}))}),(function(t){return console.log(t),console.log("No dfuse accounts found associated with key:",e),[]})))}catch(e){return Promise.reject(e)}},it=function(e){try{var t=!1,r=this,o=function(o){var i=!1;if(t)return o;function s(t){var o=!1;if(i)return t;function s(e){return o?e:(console.log("Permission links not available on chain"),[])}var c=function(){if(n.constants.HISTORY_TYPES.includes("hyperion"))return h((function(){return Promise.resolve(r.hyperion.get_links(e)).then((function(e){return o=!0,e.links.map((function(e){return{action:e.action,contract:e.code,permission_name:e.permission}}))}))}),(function(e){console.log(e)}))}();return c&&c.then?c.then(s):s(c)}var c=function(){if(n.constants.HISTORY_TYPES.includes("dfuse"))return h((function(){return Promise.resolve(r.get(n.constants.API_URL+"/dfuse?type=state_permission_links&account="+e)).then((function(e){var t=e.linked_permissions;if(t)return i=!0,t}))}),(function(e){console.log(e)}))}();return c&&c.then?c.then(s):s(c)},i=function(){if(n.constants.LIGHT_API)return h((function(){return Promise.resolve(r.getAccountLightData(e)).then((function(e){if(e)return t=!0,e.linkauth.map((function(e){return{action:e.type,contract:e.code,permission_name:e.requirement}}))}))}),(function(e){console.log(e)}))}();return Promise.resolve(i&&i.then?i.then(o):o(i))}catch(e){return Promise.reject(e)}};function st(t){return n.constants.HISTORY_TYPES.includes("native")?this.actionsRpc.history_get_controlled_accounts(t):n.constants.HISTORY_TYPES.includes("hyperion")?new e.JsonRpc([n.constants.HYPERION_URL]).history_get_controlled_accounts(t):[]}exports.ApiClass=function(n,o){var i=void 0===o?{}:o,s=i.rpcEndpoints,c=i.actionsRpcEndpoints,a=i.lightEndpoint,u=i.hyperionEndpoint;this.rpc=void 0,this.actionsRpc=void 0,this.api=void 0,this.hyperion=void 0,this.lightApi=void 0,this.isInitialized=!1,this.constants=void 0,this.get=F,this.post=L,this.getAccount=_,this.getGravatar=m,this.searchAccount=v,this.getParent=p,this.getAccountLightData=d,this.getActionsFromNative=I,this.getActions=O,this.getActionsFromDfuse=w,this.getActionsFromHyperion=b,this.getDappStats=T,this.getDspPackages=N,this.getDapphodlBalance=R,this.getDappBalance=E,this.getDappStakes=j,this.getDapphodlStakes=A,this.getDappUnstakes=k,this.getDapphodlUnstakes=S,this.getFIOVoter=X,this.getFIOAddressByName=K,this.getFIODomainByName=U,this.getDomains=G,this.getAddresses=Y,this.getFIOProducers=B,this.getFIOLockedTokens=M,this.getFIOLocked=V,this.getAllFIOLocked=H,this.getFIOSupplyBreakdown=D,this.getFIOFees=q,this.addFIOFeeToActions=C,this.getFIOAddresses=J,this.getFIODomains=z,this.getFIOAddressesAndDomains=W,this.getControlledAccounts=st,this.getPermissionLinks=it,this.dfuseGetKeyAccounts=ot,this.nativeGetKeyAccounts=nt,this.hyperionGetKeyAccounts=rt,this.lightGetKeyAccounts=et,this.lightGetKeyAccountsRaw=tt,this.getKeyAccountsByType=Ze,this.getKeyAccounts=$e,this.getKeyAccountsForAllChains=Qe,this.getRequiredAccounts=We,this.getUsersFromKeys=ze,this.getAllMsigs=ne,this.parsePackedMsigActions=re,this.parsePackedMsig=te,this.getFullMsigProposal=ee,this.getMsigApprovals=Z,this.getAccountsMsigProposals=$,this.hyperionGetMsig=Q,this.getXprTotalStakedAndApr=be,this.getXprVoter=ye,this.getXprAccountStakes=Pe,this.getXprAccountRefund=ge,this.getXprLongstakePlans=_e,this.getXprLongstakeStakes=ve,this.getXprOracleData=me,this.getAllOracleFeeds=pe,this.getAllOracleData=de,this.getProtonAvatar=he,this.getRentbwState=ke,this.delegatedBandwidth=Se,this.getAccountDelegatedBandwidth=Ie,this.getAccountResources=Oe,this.getRamPriceInEos=we,this.getRexQueued=qe,this.getRexPool=Ce,this.getRexBalance=Le,this.getRexCpuLoans=Fe,this.getRexNetLoans=xe,this.getEosDepositedIntoRex=Te,this.getRexReturnRate=Ne,this.getRexPriceChart=Re,this.getEosTopStakes=Ee,this.getEosTopRams=je,this.getCurrentNameBids=Ae,this.getEosBalance=Ge,this.getTokenBalance=Ye,this.hyperionGetTokensForAccount=Me,this.getTokenSupply=He,this.lightGetTokens=Be,this.getHistoryTransaction=Je,this.getDeferredTransaction=Ve,this.getHyperionTransaction=Xe,this.generateTransactionSettings=Ke,this.getProxies=ue,this.getVoters=ae,this.calculateVoteWeight=fe,this.weightedVoteToNumber=ce,this.getProxyData=se,this.getVoter=le,this.getProducers=ie,this.getChainTable=oe,this.constants=n,this.rpc=new e.JsonRpc(s||n.DEFAULT_ENDPOINTS),this.actionsRpc=new e.JsonRpc(c||n.ACTIONS_ENDPOINTS),this.api=new e.Api({rpc:this.rpc});var l=a||n.LIGHT_API;l&&(this.lightApi=new r.JsonRpc(n.CHAIN.toLowerCase().replace("-",""),{fetch:fetch,endpoint:l}));var f=u||n.HYPERION_URL;f&&(this.hyperion=new t.JsonRpc(f))};
//# sourceMappingURL=api.cjs.production.min.js.map
import { Api as ProtonApi, JsonRpc } from '@proton/js';
import { Constants } from '@bloks/constants';
import * as LightApi from '@eoscafe/light-api';

@@ -24,3 +25,4 @@ import * as ACCOUNT from './account';

isInitialized: boolean;
initialize({ rpcEndpoints, actionsRpcEndpoints, lightEndpoint, hyperionEndpoint }?: {
constants: Constants;
constructor(constants: Constants, { rpcEndpoints, actionsRpcEndpoints, lightEndpoint, hyperionEndpoint }?: {
rpcEndpoints?: string[];

@@ -30,3 +32,3 @@ actionsRpcEndpoints?: string[];

hyperionEndpoint?: string;
}): void;
});
get: (path: string, args?: RequestInit, responseType?: string) => Promise<any>;

@@ -33,0 +35,0 @@ post: (path: string, body: any, args?: RequestInit) => Promise<any>;

{
"name": "@bloks/api",
"version": "24.0.5",
"version": "24.0.6",
"author": "jafri",

@@ -34,3 +34,3 @@ "module": "dist/api.esm.js",

},
"gitHead": "9693d54787be1e3be2359efadcba85e9a373c120"
"gitHead": "b56ba4939d557df3f502d35b28a020cb6ae9672f"
}

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc