@vostokplatform/voting-contract-api
Advanced tools
Comparing version 0.1.0-RC20 to 0.1.0-RC21
@@ -1,2 +0,2 @@ | ||
!function(t,e){if("object"==typeof exports&&"object"==typeof module)module.exports=e(require("@vostokplatform/waves-api"),require("moment"));else if("function"==typeof define&&define.amd)define(["@vostokplatform/waves-api","moment"],e);else{var r="object"==typeof exports?e(require("@vostokplatform/waves-api"),require("moment")):e(t["@vostokplatform/waves-api"],t.moment);for(var a in r)("object"==typeof exports?exports:t)[a]=r[a]}}(this,(function(t,e){return function(t){var e={};function r(a){if(e[a])return e[a].exports;var n=e[a]={i:a,l:!1,exports:{}};return t[a].call(n.exports,n,n.exports,r),n.l=!0,n.exports}return r.m=t,r.c=e,r.d=function(t,e,a){r.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:a})},r.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},r.t=function(t,e){if(1&e&&(t=r(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var a=Object.create(null);if(r.r(a),Object.defineProperty(a,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var n in t)r.d(a,n,function(e){return t[e]}.bind(null,n));return a},r.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return r.d(e,"a",e),e},r.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},r.p="",r(r.s=2)}([function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),function(t){t.string="string",t.integer="integer",t.boolean="boolean"}(e.ParamType||(e.ParamType={}))},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});class a extends Error{constructor(t){super(`Error. Cannot map contract params. Unknown type for key: ${t}.`),this.name="MapContractParamsError"}}e.MapContractParamsError=a},function(t,e,r){"use strict";var a=this&&this.__awaiter||function(t,e,r,a){return new(r||(r=Promise))((function(n,s){function i(t){try{c(a.next(t))}catch(t){s(t)}}function o(t){try{c(a.throw(t))}catch(t){s(t)}}function c(t){var e;t.done?n(t.value):(e=t.value,e instanceof r?e:new r((function(t){t(e)}))).then(i,o)}c((a=a.apply(t,e||[])).next())}))};Object.defineProperty(e,"__esModule",{value:!0});const n=r(3),s=r(0),i=r(4),o={statusResponseTimeout:2e4};e.VotingContract=class{constructor(t){this.checkStatusTimerId=null,this.checkStatus=t=>a(this,void 0,void 0,(function*(){const e=yield this.fetchInstance(`${this.apiUrl}/contracts/status/${t}`,{method:"GET"}),r=yield e.json();return 200===e.status?Object.assign(Object.assign({},e),{success:!0,data:r}):Object.assign(Object.assign({},e),{success:!1,data:r})})),this.waitStatusResponse=t=>(...e)=>a(this,void 0,void 0,(function*(){const r=yield t(...e);return new Promise(t=>{let e=!1;setTimeout(()=>{null!==this.checkStatusTimerId&&clearTimeout(this.checkStatusTimerId),e=!0,t({success:!1,data:r})},this.STATUS_RESPONSE_TIMEOUT);const n=()=>a(this,void 0,void 0,(function*(){const a=yield this.checkStatus(r.id);a.success&&a.data.some(t=>"Success"===t.status)&&(e=!0,t({success:!0,data:r,status:a.data})),e||(this.checkStatusTimerId=setTimeout(n,1e3))}));n()})})),this.createOperationParam=t=>({type:s.ParamType.string,key:"operation",value:t}),this.callDockerContract=(t,e,r)=>{const{txParams:{contractId:a,fee:n},contractParams:s}=e,i={senderPublicKey:this.keyPair.publicKey,authorPublicKey:this.keyPair.publicKey,contractId:a,timestamp:Date.now(),params:[t,...Object.entries(s).map(r)],fee:n};return this.weApi.API.Node.transactions.broadcastFromClientAddress("dockerCall",i,this.keyPair)},this.initiateVoting=t=>a(this,void 0,void 0,(function*(){const{txParams:{fee:e,contractName:r,image:a,imageHash:n},contractParams:s}=t,o={senderPublicKey:this.keyPair.publicKey,timestamp:Date.now(),image:a,imageHash:n,contractName:r,params:Object.entries(s).map(i.mapCreateContractParams),fee:e};return this.weApi.API.Node.transactions.broadcastFromClientAddress("dockerCreateV2",o,this.keyPair)})),this.vote=t=>this.callDockerContract(this.createOperationParam("vote"),t,i.mapVoteParams),this.updateServerList=t=>this.callDockerContract(this.createOperationParam("updateServerList"),t,i.mapUpdateServerListParams),this.dkgRound=t=>this.callDockerContract(this.createOperationParam("dkgRound"),t,i.mapDkgRoundParams),this.updateAdminList=t=>this.callDockerContract(this.createOperationParam("updateAdminList"),t,i.mapUpdateAdminListParams),this.addMainKey=t=>this.callDockerContract(this.createOperationParam("addMainKey"),t,i.mapAddMainKeyParams),this.results=t=>this.callDockerContract(this.createOperationParam("results"),t,i.mapResultsParams),this.dkgCommit=t=>this.callDockerContract(this.createOperationParam("dkgCommit"),t,i.mapDkgCommitParams),this.dkgScalar=t=>this.callDockerContract(this.createOperationParam("dkgScalar"),t,i.mapDkgScalarParams),this.dkgShadows=t=>this.callDockerContract(this.createOperationParam("dkgShadows"),t,i.mapDkgShadowsParams),this.dkgComplaint=t=>this.callDockerContract(this.createOperationParam("dkgComplaint"),t,i.mapDkgComplaintParams),this.decryption=t=>this.callDockerContract(this.createOperationParam("decryption"),t,i.mapDecryptionParams);const{apiUrl:e,fetchInstance:r,keyPair:c,statusResponseTimeout:u}=Object.assign(Object.assign({},o),t);this.STATUS_RESPONSE_TIMEOUT=u,this.fetchInstance=r,this.apiUrl=e.replace(/\/$/,""),this.keyPair=c,this.weApi=n.create({initialConfiguration:Object.assign(Object.assign({},n.MAINNET_CONFIG),{nodeAddress:e}),fetchInstance:r}),this.initiateVoting=this.waitStatusResponse(this.initiateVoting),this.callDockerContract=this.waitStatusResponse(this.callDockerContract)}}},function(e,r){e.exports=t},function(t,e,r){"use strict";function a(t){for(var r in t)e.hasOwnProperty(r)||(e[r]=t[r])}Object.defineProperty(e,"__esModule",{value:!0}),a(r(5)),a(r(9)),a(r(10)),a(r(11)),a(r(12)),a(r(13)),a(r(14)),a(r(15)),a(r(16)),a(r(17)),a(r(18)),a(r(19))},function(t,e,r){"use strict";var a=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});const n=a(r(6)),s=r(0),i=r(7),o=r(8),c=r(1);e.mapCreateContractParams=t=>{const[e,r]=t;if("string"==typeof r)return{type:s.ParamType.string,key:e,value:r};if(i.isDateInstance(r))return{type:s.ParamType.string,key:e,value:n.default(r).format(o.DateFormat)};if(Array.isArray(r))return"docs"===e?{type:s.ParamType.string,key:e,value:JSON.stringify(r.map(t=>(t.dateUpload=n.default(t.dateUpload).format(o.DateFormat),t)))}:{type:s.ParamType.string,key:e,value:JSON.stringify(r)};if("number"==typeof r)return{type:s.ParamType.integer,key:e,value:r};throw new c.MapContractParamsError(e)}},function(t,r){t.exports=e},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.isDateInstance=function(t){return t instanceof Date&&!isNaN(t.valueOf())}},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DateFormat="DD-MM-YYYY HH:mm:ss"},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});const a=r(0),n=r(1);e.mapUpdateServerListParams=t=>{const[e,r]=t;if("string"==typeof r)return{type:a.ParamType.string,key:e,value:r};if(Array.isArray(r))return{type:a.ParamType.string,key:e,value:JSON.stringify(r)};if("number"==typeof r)return{type:a.ParamType.integer,key:e,value:r};throw new n.MapContractParamsError(e)}},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});const a=r(0),n=r(1);e.mapVoteParams=function(t){const[e,r]=t;if("string"==typeof r)return{type:a.ParamType.string,key:e,value:r};throw new n.MapContractParamsError(e)}},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});const a=r(0),n=r(1);e.mapDkgRoundParams=function(t){const[e,r]=t;if("number"==typeof r)return{type:a.ParamType.integer,key:e,value:r};throw new n.MapContractParamsError(e)}},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});const a=r(0),n=r(1);e.mapUpdateAdminListParams=function(t){const[e,r]=t;if(Array.isArray(r))return{type:a.ParamType.string,key:e,value:JSON.stringify(r)};throw new n.MapContractParamsError(e)}},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});const a=r(0),n=r(1);e.mapAddMainKeyParams=function(t){const[e,r]=t;if("string"==typeof r)return{type:a.ParamType.string,key:e,value:r};if("number"==typeof r)return{type:a.ParamType.integer,key:e,value:r};throw new n.MapContractParamsError(e)}},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});const a=r(0),n=r(1);e.mapResultsParams=function(t){const[e,r]=t;if("string"==typeof r)return{type:a.ParamType.string,key:e,value:r};throw new n.MapContractParamsError(e)}},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});const a=r(0),n=r(1);e.mapDkgCommitParams=function(t){const[e,r]=t;if("number"==typeof r)return{type:a.ParamType.integer,key:e,value:r};if("object"==typeof r)return{type:a.ParamType.string,key:e,value:JSON.stringify(r)};throw new n.MapContractParamsError(e)}},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});const a=r(0),n=r(1);e.mapDkgScalarParams=function(t){const[e,r]=t;if("number"==typeof r)return{type:a.ParamType.integer,key:e,value:r};if("string"==typeof r)return{type:a.ParamType.string,key:e,value:r};throw new n.MapContractParamsError(e)}},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});const a=r(0),n=r(1);e.mapDkgShadowsParams=function(t){const[e,r]=t;if("object"==typeof r)return{type:a.ParamType.string,key:e,value:JSON.stringify(r)};if("number"==typeof r)return{type:a.ParamType.integer,key:e,value:r};throw new n.MapContractParamsError(e)}},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});const a=r(0),n=r(1);e.mapDkgComplaintParams=function(t){const[e,r]=t;if("number"==typeof r)return{type:a.ParamType.integer,key:e,value:r};if("string"==typeof r)return{type:a.ParamType.string,key:e,value:r};throw new n.MapContractParamsError(e)}},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});const a=r(0),n=r(1);e.mapDecryptionParams=function(t){const[e,r]=t;if("string"==typeof r)return{type:a.ParamType.string,key:e,value:r};throw new n.MapContractParamsError(e)}}])})); | ||
!function(t,e){if("object"==typeof exports&&"object"==typeof module)module.exports=e(require("@vostokplatform/waves-api"),require("moment"));else if("function"==typeof define&&define.amd)define(["@vostokplatform/waves-api","moment"],e);else{var r="object"==typeof exports?e(require("@vostokplatform/waves-api"),require("moment")):e(t["@vostokplatform/waves-api"],t.moment);for(var a in r)("object"==typeof exports?exports:t)[a]=r[a]}}(this,(function(t,e){return function(t){var e={};function r(a){if(e[a])return e[a].exports;var n=e[a]={i:a,l:!1,exports:{}};return t[a].call(n.exports,n,n.exports,r),n.l=!0,n.exports}return r.m=t,r.c=e,r.d=function(t,e,a){r.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:a})},r.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},r.t=function(t,e){if(1&e&&(t=r(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var a=Object.create(null);if(r.r(a),Object.defineProperty(a,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var n in t)r.d(a,n,function(e){return t[e]}.bind(null,n));return a},r.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return r.d(e,"a",e),e},r.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},r.p="",r(r.s=2)}([function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),function(t){t.string="string",t.integer="integer",t.boolean="boolean"}(e.ParamType||(e.ParamType={}))},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});class a extends Error{constructor(t){super(`Error. Cannot map contract params. Unknown type for key: ${t}.`),this.name="MapContractParamsError"}}e.MapContractParamsError=a},function(t,e,r){"use strict";var a=this&&this.__awaiter||function(t,e,r,a){return new(r||(r=Promise))((function(n,s){function i(t){try{c(a.next(t))}catch(t){s(t)}}function o(t){try{c(a.throw(t))}catch(t){s(t)}}function c(t){var e;t.done?n(t.value):(e=t.value,e instanceof r?e:new r((function(t){t(e)}))).then(i,o)}c((a=a.apply(t,e||[])).next())}))};Object.defineProperty(e,"__esModule",{value:!0});const n=r(3),s=r(0),i=r(4),o={statusResponseTimeout:2e4};e.VotingContract=class{constructor(t){this.checkStatusTimerId=null,this.checkStatus=t=>a(this,void 0,void 0,(function*(){const e=yield this.fetchInstance(`${this.apiUrl}/contracts/status/${t}`,{method:"GET"}),r=yield e.json();return 200===e.status?Object.assign(Object.assign({},e),{success:!0,data:r}):Object.assign(Object.assign({},e),{success:!1,data:r})})),this.waitStatusResponse=t=>(...e)=>a(this,void 0,void 0,(function*(){const r=yield t(...e);return new Promise(t=>{let e=!1,n=[];setTimeout(()=>{null!==this.checkStatusTimerId&&clearTimeout(this.checkStatusTimerId),e=!0,t({success:!1,data:r,status:n[n.length-1]})},this.STATUS_RESPONSE_TIMEOUT);const s=()=>a(this,void 0,void 0,(function*(){const a=yield this.checkStatus(r.id);n.push(a.data),a.success&&a.data.some(t=>"Success"===t.status)&&(n=[],e=!0,t({success:!0,data:r,status:a.data})),e||(this.checkStatusTimerId=setTimeout(s,1e3))}));s()})})),this.createOperationParam=t=>({type:s.ParamType.string,key:"operation",value:t}),this.callDockerContract=(t,e,r)=>{const{txParams:{contractId:a,fee:n},contractParams:s}=e,i={senderPublicKey:this.keyPair.publicKey,authorPublicKey:this.keyPair.publicKey,contractId:a,timestamp:Date.now(),params:[t,...Object.entries(s).map(r)],fee:n};return this.weApi.API.Node.transactions.broadcastFromClientAddress("dockerCall",i,this.keyPair)},this.initiateVoting=t=>a(this,void 0,void 0,(function*(){const{txParams:{fee:e,contractName:r,image:a,imageHash:n},contractParams:s}=t,o={senderPublicKey:this.keyPair.publicKey,timestamp:Date.now(),image:a,imageHash:n,contractName:r,params:Object.entries(s).map(i.mapCreateContractParams),fee:e};return this.weApi.API.Node.transactions.broadcastFromClientAddress("dockerCreateV2",o,this.keyPair)})),this.vote=t=>this.callDockerContract(this.createOperationParam("vote"),t,i.mapVoteParams),this.updateServerList=t=>this.callDockerContract(this.createOperationParam("updateServerList"),t,i.mapUpdateServerListParams),this.dkgRound=t=>this.callDockerContract(this.createOperationParam("dkgRound"),t,i.mapDkgRoundParams),this.updateAdminList=t=>this.callDockerContract(this.createOperationParam("updateAdminList"),t,i.mapUpdateAdminListParams),this.addMainKey=t=>this.callDockerContract(this.createOperationParam("addMainKey"),t,i.mapAddMainKeyParams),this.results=t=>this.callDockerContract(this.createOperationParam("results"),t,i.mapResultsParams),this.dkgCommit=t=>this.callDockerContract(this.createOperationParam("dkgCommit"),t,i.mapDkgCommitParams),this.dkgScalar=t=>this.callDockerContract(this.createOperationParam("dkgScalar"),t,i.mapDkgScalarParams),this.dkgShadows=t=>this.callDockerContract(this.createOperationParam("dkgShadows"),t,i.mapDkgShadowsParams),this.dkgComplaint=t=>this.callDockerContract(this.createOperationParam("dkgComplaint"),t,i.mapDkgComplaintParams),this.decryption=t=>this.callDockerContract(this.createOperationParam("decryption"),t,i.mapDecryptionParams);const{apiUrl:e,fetchInstance:r,keyPair:c,statusResponseTimeout:u}=Object.assign(Object.assign({},o),t);this.STATUS_RESPONSE_TIMEOUT=u,this.fetchInstance=r,this.apiUrl=e.replace(/\/$/,""),this.keyPair=c,this.weApi=n.create({initialConfiguration:Object.assign(Object.assign({},n.MAINNET_CONFIG),{nodeAddress:e}),fetchInstance:r}),this.initiateVoting=this.waitStatusResponse(this.initiateVoting),this.callDockerContract=this.waitStatusResponse(this.callDockerContract)}}},function(e,r){e.exports=t},function(t,e,r){"use strict";function a(t){for(var r in t)e.hasOwnProperty(r)||(e[r]=t[r])}Object.defineProperty(e,"__esModule",{value:!0}),a(r(5)),a(r(9)),a(r(10)),a(r(11)),a(r(12)),a(r(13)),a(r(14)),a(r(15)),a(r(16)),a(r(17)),a(r(18)),a(r(19))},function(t,e,r){"use strict";var a=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});const n=a(r(6)),s=r(0),i=r(7),o=r(8),c=r(1);e.mapCreateContractParams=t=>{const[e,r]=t;if("string"==typeof r)return{type:s.ParamType.string,key:e,value:r};if(i.isDateInstance(r))return{type:s.ParamType.string,key:e,value:n.default(r).format(o.DateFormat)};if(Array.isArray(r))return"docs"===e?{type:s.ParamType.string,key:e,value:JSON.stringify(r.map(t=>(t.dateUpload=n.default(t.dateUpload).format(o.DateFormat),t)))}:{type:s.ParamType.string,key:e,value:JSON.stringify(r)};if("number"==typeof r)return{type:s.ParamType.integer,key:e,value:r};throw new c.MapContractParamsError(e)}},function(t,r){t.exports=e},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.isDateInstance=function(t){return t instanceof Date&&!isNaN(t.valueOf())}},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DateFormat="DD-MM-YYYY HH:mm:ss"},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});const a=r(0),n=r(1);e.mapUpdateServerListParams=t=>{const[e,r]=t;if("string"==typeof r)return{type:a.ParamType.string,key:e,value:r};if(Array.isArray(r))return{type:a.ParamType.string,key:e,value:JSON.stringify(r)};if("number"==typeof r)return{type:a.ParamType.integer,key:e,value:r};throw new n.MapContractParamsError(e)}},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});const a=r(0),n=r(1);e.mapVoteParams=function(t){const[e,r]=t;if("string"==typeof r)return{type:a.ParamType.string,key:e,value:r};throw new n.MapContractParamsError(e)}},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});const a=r(0),n=r(1);e.mapDkgRoundParams=function(t){const[e,r]=t;if("number"==typeof r)return{type:a.ParamType.integer,key:e,value:r};throw new n.MapContractParamsError(e)}},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});const a=r(0),n=r(1);e.mapUpdateAdminListParams=function(t){const[e,r]=t;if(Array.isArray(r))return{type:a.ParamType.string,key:e,value:JSON.stringify(r)};throw new n.MapContractParamsError(e)}},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});const a=r(0),n=r(1);e.mapAddMainKeyParams=function(t){const[e,r]=t;if("string"==typeof r)return{type:a.ParamType.string,key:e,value:r};if("number"==typeof r)return{type:a.ParamType.integer,key:e,value:r};throw new n.MapContractParamsError(e)}},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});const a=r(0),n=r(1);e.mapResultsParams=function(t){const[e,r]=t;if("string"==typeof r)return{type:a.ParamType.string,key:e,value:r};throw new n.MapContractParamsError(e)}},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});const a=r(0),n=r(1);e.mapDkgCommitParams=function(t){const[e,r]=t;if("number"==typeof r)return{type:a.ParamType.integer,key:e,value:r};if("object"==typeof r)return{type:a.ParamType.string,key:e,value:JSON.stringify(r)};throw new n.MapContractParamsError(e)}},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});const a=r(0),n=r(1);e.mapDkgScalarParams=function(t){const[e,r]=t;if("number"==typeof r)return{type:a.ParamType.integer,key:e,value:r};if("string"==typeof r)return{type:a.ParamType.string,key:e,value:r};throw new n.MapContractParamsError(e)}},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});const a=r(0),n=r(1);e.mapDkgShadowsParams=function(t){const[e,r]=t;if("object"==typeof r)return{type:a.ParamType.string,key:e,value:JSON.stringify(r)};if("number"==typeof r)return{type:a.ParamType.integer,key:e,value:r};throw new n.MapContractParamsError(e)}},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});const a=r(0),n=r(1);e.mapDkgComplaintParams=function(t){const[e,r]=t;if("number"==typeof r)return{type:a.ParamType.integer,key:e,value:r};if("string"==typeof r)return{type:a.ParamType.string,key:e,value:r};throw new n.MapContractParamsError(e)}},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});const a=r(0),n=r(1);e.mapDecryptionParams=function(t){const[e,r]=t;if("string"==typeof r)return{type:a.ParamType.string,key:e,value:r};throw new n.MapContractParamsError(e)}}])})); | ||
//# sourceMappingURL=index.js.map |
import { IWavesApiResponse } from "./IWavesApiResponse"; | ||
interface INodeMinerResponse { | ||
export interface INodeMinerSuccessResponse { | ||
sender: string; | ||
@@ -12,20 +12,17 @@ senderPublicKey: string; | ||
} | ||
export interface INodeErrorResponse { | ||
error: number; | ||
message: string; | ||
} | ||
export declare type IStatusResponse = { | ||
success: true; | ||
data: INodeMinerResponse[]; | ||
data: INodeMinerSuccessResponse[]; | ||
} & Response | { | ||
success: false; | ||
data: { | ||
error: number; | ||
message: string; | ||
}; | ||
data: INodeErrorResponse; | ||
} & Response; | ||
export declare type IModifiedWavesApiResponse = { | ||
success: true; | ||
success: boolean; | ||
data: IWavesApiResponse; | ||
status: INodeMinerResponse[]; | ||
} | { | ||
success: false; | ||
data: IWavesApiResponse; | ||
status: INodeMinerSuccessResponse[] | INodeErrorResponse; | ||
}; | ||
export {}; |
{ | ||
"name": "@vostokplatform/voting-contract-api", | ||
"version": "0.1.0-RC20", | ||
"version": "0.1.0-RC21", | ||
"description": "", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.js", |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
64904
1
376