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

@onflow/sdk-resolve-signatures

Package Overview
Dependencies
Maintainers
8
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@onflow/sdk-resolve-signatures - npm Package Compare versions

Comparing version 0.0.1 to 0.0.2

6

CHANGELOG.md

@@ -5,5 +5,9 @@ ### Unreleased

### 0.0.2 -- 2020-10-28
- 2020-10-28 -- VSN `@onflow/encode` 0.0.5 -> 0.0.6
### 0.0.1 -- 2020-10-07
- 2020-10-07 -- Bump `@onflow/encode` 0.0.4 -> 0.0.5
- 2020-10-07 -- VSN `@onflow/encode` 0.0.4 -> 0.0.5

@@ -10,0 +14,0 @@ ### 0.0.0 -- 2020-09-29

2

dist/sdk-resolve-signatures.js

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

var r=require("@onflow/interaction"),e=require("@onflow/encode");function n(){return(n=Object.assign||function(r){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var t in n)Object.prototype.hasOwnProperty.call(n,t)&&(r[t]=n[t])}return r}).apply(this,arguments)}function t(r,e){(null==e||e>r.length)&&(e=r.length);for(var n=0,t=new Array(e);n<e;n++)t[n]=r[n];return t}function o(r){return{script:r.message.cadence,refBlock:r.message.refBlock||null,gasLimit:r.message.computeLimit,arguments:r.message.arguments.map(function(e){return r.arguments[e].asArgument}),proposalKey:{address:r.accounts[r.proposer].addr,keyId:r.accounts[r.proposer].keyId,sequenceNum:r.accounts[r.proposer].sequenceNum},payer:r.accounts[r.payer].addr,authorizers:r.authorizations.map(function(e){return r.accounts[e].addr})}}var a=function(r,e,n){void 0===e&&(e=[]);try{return Promise.all(e.map(function(e){try{return Promise.resolve(r.accounts[e].signingFunction({message:n,addr:r.accounts[e].addr,keyId:r.accounts[e].keyId,roles:r.accounts[e].role,interaction:r})).then(function(n){if(n.cid=e,r.accounts[e].addr!==n.addr)throw new Error(e+" — mismatching address in composite signature");if(r.accounts[e].keyId!==n.keyId)throw new Error(e+" — mismatching keyId in composite signature");return n.sig=n.signature,n.address=n.addr,n})}catch(r){return Promise.reject(r)}}))}catch(r){return Promise.reject(r)}};function i(r,e){for(var n,o=function(r,e){var n;if("undefined"==typeof Symbol||null==r[Symbol.iterator]){if(Array.isArray(r)||(n=function(r,e){if(r){if("string"==typeof r)return t(r,void 0);var n=Object.prototype.toString.call(r).slice(8,-1);return"Object"===n&&r.constructor&&(n=r.constructor.name),"Map"===n||"Set"===n?Array.from(r):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?t(r,void 0):void 0}}(r))){n&&(r=n);var o=0;return function(){return o>=r.length?{done:!0}:{done:!1,value:r[o++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}return(n=r[Symbol.iterator]()).next.bind(n)}(e);!(n=o()).done;){var a=n.value;r.accounts[a.cid].signature=a.signature}return e}exports.resolveSignatures=function(t){try{if(!r.isTransaction(t))return Promise.resolve(t);var s=function(r){var e=new Set(r.authorizations);e.add(r.proposer),e.delete(r.payer),e=Array.from(e);var n=new Set([r.payer]);return{insideSigners:e,outsideSigners:n=Array.from(n)}}(t),c=s.outsideSigners;return Promise.resolve(a(t,s.insideSigners,e.encodeTransactionPayload(o(t)))).then(function(r){var s=i(t,r);return Promise.resolve(a(t,c,e.encodeTransactionEnvelope(n({},o(t),{payloadSigs:s})))).then(function(r){return i(t,r),t})})}catch(r){return Promise.reject(r)}};
var r=require("@onflow/interaction"),e=require("@onflow/encode");function n(){return(n=Object.assign||function(r){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var t in n)Object.prototype.hasOwnProperty.call(n,t)&&(r[t]=n[t])}return r}).apply(this,arguments)}function t(r,e){(null==e||e>r.length)&&(e=r.length);for(var n=0,t=new Array(e);n<e;n++)t[n]=r[n];return t}function o(r){return{script:r.message.cadence,refBlock:r.message.refBlock||null,gasLimit:r.message.computeLimit,arguments:r.message.arguments.map(function(e){return r.arguments[e].asArgument}),proposalKey:{address:r.accounts[r.proposer].addr,keyId:r.accounts[r.proposer].keyId,sequenceNum:r.accounts[r.proposer].sequenceNum},payer:r.accounts[r.payer].addr,authorizers:r.authorizations.map(function(e){return r.accounts[e].addr}).reduce(function(r,e){return r.find(function(r){return r===e})?r:[].concat(r,[e])},[])}}var a=function(r,e,n){void 0===e&&(e=[]);try{return Promise.all(e.map(function(e){try{return Promise.resolve(r.accounts[e].signingFunction({message:n,addr:r.accounts[e].addr,keyId:r.accounts[e].keyId,roles:r.accounts[e].role,interaction:r})).then(function(n){if(n.cid=e,r.accounts[e].addr!==n.addr)throw new Error(e+" — mismatching address in composite signature");if(r.accounts[e].keyId!==n.keyId)throw new Error(e+" — mismatching keyId in composite signature");return n.sig=n.signature,n.address=n.addr,n})}catch(r){return Promise.reject(r)}}))}catch(r){return Promise.reject(r)}};function i(r,e){for(var n,o=function(r,e){var n;if("undefined"==typeof Symbol||null==r[Symbol.iterator]){if(Array.isArray(r)||(n=function(r,e){if(r){if("string"==typeof r)return t(r,void 0);var n=Object.prototype.toString.call(r).slice(8,-1);return"Object"===n&&r.constructor&&(n=r.constructor.name),"Map"===n||"Set"===n?Array.from(r):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?t(r,void 0):void 0}}(r))){n&&(r=n);var o=0;return function(){return o>=r.length?{done:!0}:{done:!1,value:r[o++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}return(n=r[Symbol.iterator]()).next.bind(n)}(e);!(n=o()).done;){var a=n.value;r.accounts[a.cid].signature=a.signature}return e}exports.resolveSignatures=function(t){try{if(!r.isTransaction(t))return Promise.resolve(t);var s=function(r){var e=new Set(r.authorizations);e.add(r.proposer),e.delete(r.payer),e=Array.from(e);var n=new Set([r.payer]);return{insideSigners:e,outsideSigners:n=Array.from(n)}}(t),c=s.outsideSigners;return Promise.resolve(a(t,s.insideSigners,e.encodeTransactionPayload(o(t)))).then(function(r){var s=i(t,r);return Promise.resolve(a(t,c,e.encodeTransactionEnvelope(n({},o(t),{payloadSigs:s})))).then(function(r){return i(t,r),t})})}catch(r){return Promise.reject(r)}};
//# sourceMappingURL=sdk-resolve-signatures.js.map

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

import{isTransaction as r}from"@onflow/interaction";import{encodeTransactionPayload as e,encodeTransactionEnvelope as n}from"@onflow/encode";function t(){return(t=Object.assign||function(r){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var t in n)Object.prototype.hasOwnProperty.call(n,t)&&(r[t]=n[t])}return r}).apply(this,arguments)}function a(r){return{script:r.message.cadence,refBlock:r.message.refBlock||null,gasLimit:r.message.computeLimit,arguments:r.message.arguments.map(e=>r.arguments[e].asArgument),proposalKey:{address:r.accounts[r.proposer].addr,keyId:r.accounts[r.proposer].keyId,sequenceNum:r.accounts[r.proposer].sequenceNum},payer:r.accounts[r.payer].addr,authorizers:r.authorizations.map(e=>r.accounts[e].addr)}}async function o(r,e=[],n){return Promise.all(e.map(async e=>{const t=await r.accounts[e].signingFunction({message:n,addr:r.accounts[e].addr,keyId:r.accounts[e].keyId,roles:r.accounts[e].role,interaction:r});if(t.cid=e,r.accounts[e].addr!==t.addr)throw new Error(e+" — mismatching address in composite signature");if(r.accounts[e].keyId!==t.keyId)throw new Error(e+" — mismatching keyId in composite signature");return t.sig=t.signature,t.address=t.addr,t}))}function s(r,e){for(let{cid:n,signature:t}of e)r.accounts[n].signature=t;return e}async function i(i){if(!r(i))return i;const{insideSigners:c,outsideSigners:u}=function(r){let e=new Set(r.authorizations);e.add(r.proposer),e.delete(r.payer),e=Array.from(e);let n=new Set([r.payer]);return n=Array.from(n),{insideSigners:e,outsideSigners:n}}(i),d=s(i,await o(i,c,e(a(i))));return s(i,await o(i,u,n(t({},a(i),{payloadSigs:d})))),i}export{i as resolveSignatures};
import{isTransaction as e}from"@onflow/interaction";import{encodeTransactionPayload as r,encodeTransactionEnvelope as n}from"@onflow/encode";function t(){return(t=Object.assign||function(e){for(var r=1;r<arguments.length;r++){var n=arguments[r];for(var t in n)Object.prototype.hasOwnProperty.call(n,t)&&(e[t]=n[t])}return e}).apply(this,arguments)}function a(e){return{script:e.message.cadence,refBlock:e.message.refBlock||null,gasLimit:e.message.computeLimit,arguments:e.message.arguments.map(r=>e.arguments[r].asArgument),proposalKey:{address:e.accounts[e.proposer].addr,keyId:e.accounts[e.proposer].keyId,sequenceNum:e.accounts[e.proposer].sequenceNum},payer:e.accounts[e.payer].addr,authorizers:e.authorizations.map(r=>e.accounts[r].addr).reduce((e,r)=>e.find(e=>e===r)?e:[...e,r],[])}}async function o(e,r=[],n){return Promise.all(r.map(async r=>{const t=await e.accounts[r].signingFunction({message:n,addr:e.accounts[r].addr,keyId:e.accounts[r].keyId,roles:e.accounts[r].role,interaction:e});if(t.cid=r,e.accounts[r].addr!==t.addr)throw new Error(r+" — mismatching address in composite signature");if(e.accounts[r].keyId!==t.keyId)throw new Error(r+" — mismatching keyId in composite signature");return t.sig=t.signature,t.address=t.addr,t}))}function s(e,r){for(let{cid:n,signature:t}of r)e.accounts[n].signature=t;return r}async function i(i){if(!e(i))return i;const{insideSigners:c,outsideSigners:u}=function(e){let r=new Set(e.authorizations);r.add(e.proposer),r.delete(e.payer),r=Array.from(r);let n=new Set([e.payer]);return n=Array.from(n),{insideSigners:r,outsideSigners:n}}(i),d=s(i,await o(i,c,r(a(i))));return s(i,await o(i,u,n(t({},a(i),{payloadSigs:d})))),i}export{i as resolveSignatures};
//# sourceMappingURL=sdk-resolve-signatures.modern.js.map

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

import{isTransaction as r}from"@onflow/interaction";import{encodeTransactionPayload as e,encodeTransactionEnvelope as t}from"@onflow/encode";function n(){return(n=Object.assign||function(r){for(var e=1;e<arguments.length;e++){var t=arguments[e];for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(r[n]=t[n])}return r}).apply(this,arguments)}function o(r,e){(null==e||e>r.length)&&(e=r.length);for(var t=0,n=new Array(e);t<e;t++)n[t]=r[t];return n}function a(r){return{script:r.message.cadence,refBlock:r.message.refBlock||null,gasLimit:r.message.computeLimit,arguments:r.message.arguments.map(function(e){return r.arguments[e].asArgument}),proposalKey:{address:r.accounts[r.proposer].addr,keyId:r.accounts[r.proposer].keyId,sequenceNum:r.accounts[r.proposer].sequenceNum},payer:r.accounts[r.payer].addr,authorizers:r.authorizations.map(function(e){return r.accounts[e].addr})}}var i=function(o){try{if(!r(o))return Promise.resolve(o);var i=function(r){var e=new Set(r.authorizations);e.add(r.proposer),e.delete(r.payer),e=Array.from(e);var t=new Set([r.payer]);return{insideSigners:e,outsideSigners:t=Array.from(t)}}(o),c=i.outsideSigners;return Promise.resolve(s(o,i.insideSigners,e(a(o)))).then(function(r){var e=u(o,r);return Promise.resolve(s(o,c,t(n({},a(o),{payloadSigs:e})))).then(function(r){return u(o,r),o})})}catch(r){return Promise.reject(r)}},s=function(r,e,t){void 0===e&&(e=[]);try{return Promise.all(e.map(function(e){try{return Promise.resolve(r.accounts[e].signingFunction({message:t,addr:r.accounts[e].addr,keyId:r.accounts[e].keyId,roles:r.accounts[e].role,interaction:r})).then(function(t){if(t.cid=e,r.accounts[e].addr!==t.addr)throw new Error(e+" — mismatching address in composite signature");if(r.accounts[e].keyId!==t.keyId)throw new Error(e+" — mismatching keyId in composite signature");return t.sig=t.signature,t.address=t.addr,t})}catch(r){return Promise.reject(r)}}))}catch(r){return Promise.reject(r)}};function u(r,e){for(var t,n=function(r,e){var t;if("undefined"==typeof Symbol||null==r[Symbol.iterator]){if(Array.isArray(r)||(t=function(r,e){if(r){if("string"==typeof r)return o(r,void 0);var t=Object.prototype.toString.call(r).slice(8,-1);return"Object"===t&&r.constructor&&(t=r.constructor.name),"Map"===t||"Set"===t?Array.from(r):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?o(r,void 0):void 0}}(r))){t&&(r=t);var n=0;return function(){return n>=r.length?{done:!0}:{done:!1,value:r[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.")}return(t=r[Symbol.iterator]()).next.bind(t)}(e);!(t=n()).done;){var a=t.value;r.accounts[a.cid].signature=a.signature}return e}export{i as resolveSignatures};
import{isTransaction as r}from"@onflow/interaction";import{encodeTransactionPayload as e,encodeTransactionEnvelope as t}from"@onflow/encode";function n(){return(n=Object.assign||function(r){for(var e=1;e<arguments.length;e++){var t=arguments[e];for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(r[n]=t[n])}return r}).apply(this,arguments)}function o(r,e){(null==e||e>r.length)&&(e=r.length);for(var t=0,n=new Array(e);t<e;t++)n[t]=r[t];return n}function a(r){return{script:r.message.cadence,refBlock:r.message.refBlock||null,gasLimit:r.message.computeLimit,arguments:r.message.arguments.map(function(e){return r.arguments[e].asArgument}),proposalKey:{address:r.accounts[r.proposer].addr,keyId:r.accounts[r.proposer].keyId,sequenceNum:r.accounts[r.proposer].sequenceNum},payer:r.accounts[r.payer].addr,authorizers:r.authorizations.map(function(e){return r.accounts[e].addr}).reduce(function(r,e){return r.find(function(r){return r===e})?r:[].concat(r,[e])},[])}}var i=function(o){try{if(!r(o))return Promise.resolve(o);var i=function(r){var e=new Set(r.authorizations);e.add(r.proposer),e.delete(r.payer),e=Array.from(e);var t=new Set([r.payer]);return{insideSigners:e,outsideSigners:t=Array.from(t)}}(o),c=i.outsideSigners;return Promise.resolve(s(o,i.insideSigners,e(a(o)))).then(function(r){var e=u(o,r);return Promise.resolve(s(o,c,t(n({},a(o),{payloadSigs:e})))).then(function(r){return u(o,r),o})})}catch(r){return Promise.reject(r)}},s=function(r,e,t){void 0===e&&(e=[]);try{return Promise.all(e.map(function(e){try{return Promise.resolve(r.accounts[e].signingFunction({message:t,addr:r.accounts[e].addr,keyId:r.accounts[e].keyId,roles:r.accounts[e].role,interaction:r})).then(function(t){if(t.cid=e,r.accounts[e].addr!==t.addr)throw new Error(e+" — mismatching address in composite signature");if(r.accounts[e].keyId!==t.keyId)throw new Error(e+" — mismatching keyId in composite signature");return t.sig=t.signature,t.address=t.addr,t})}catch(r){return Promise.reject(r)}}))}catch(r){return Promise.reject(r)}};function u(r,e){for(var t,n=function(r,e){var t;if("undefined"==typeof Symbol||null==r[Symbol.iterator]){if(Array.isArray(r)||(t=function(r,e){if(r){if("string"==typeof r)return o(r,void 0);var t=Object.prototype.toString.call(r).slice(8,-1);return"Object"===t&&r.constructor&&(t=r.constructor.name),"Map"===t||"Set"===t?Array.from(r):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?o(r,void 0):void 0}}(r))){t&&(r=t);var n=0;return function(){return n>=r.length?{done:!0}:{done:!1,value:r[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.")}return(t=r[Symbol.iterator]()).next.bind(t)}(e);!(t=n()).done;){var a=t.value;r.accounts[a.cid].signature=a.signature}return e}export{i as resolveSignatures};
//# sourceMappingURL=sdk-resolve-signatures.module.js.map

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

!function(e,r){"object"==typeof exports&&"undefined"!=typeof module?r(exports,require("@onflow/interaction"),require("@onflow/encode")):"function"==typeof define&&define.amd?define(["exports","@onflow/interaction","@onflow/encode"],r):r((e=e||self).sdkResolveSignatures={},e.interaction,e.encode)}(this,function(e,r,n){function t(){return(t=Object.assign||function(e){for(var r=1;r<arguments.length;r++){var n=arguments[r];for(var t in n)Object.prototype.hasOwnProperty.call(n,t)&&(e[t]=n[t])}return e}).apply(this,arguments)}function o(e,r){(null==r||r>e.length)&&(r=e.length);for(var n=0,t=new Array(r);n<r;n++)t[n]=e[n];return t}function a(e){return{script:e.message.cadence,refBlock:e.message.refBlock||null,gasLimit:e.message.computeLimit,arguments:e.message.arguments.map(function(r){return e.arguments[r].asArgument}),proposalKey:{address:e.accounts[e.proposer].addr,keyId:e.accounts[e.proposer].keyId,sequenceNum:e.accounts[e.proposer].sequenceNum},payer:e.accounts[e.payer].addr,authorizers:e.authorizations.map(function(r){return e.accounts[r].addr})}}var i=function(e,r,n){void 0===r&&(r=[]);try{return Promise.all(r.map(function(r){try{return Promise.resolve(e.accounts[r].signingFunction({message:n,addr:e.accounts[r].addr,keyId:e.accounts[r].keyId,roles:e.accounts[r].role,interaction:e})).then(function(n){if(n.cid=r,e.accounts[r].addr!==n.addr)throw new Error(r+" — mismatching address in composite signature");if(e.accounts[r].keyId!==n.keyId)throw new Error(r+" — mismatching keyId in composite signature");return n.sig=n.signature,n.address=n.addr,n})}catch(e){return Promise.reject(e)}}))}catch(e){return Promise.reject(e)}};function s(e,r){for(var n,t=function(e,r){var n;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(n=function(e,r){if(e){if("string"==typeof e)return o(e,void 0);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?o(e,void 0):void 0}}(e))){n&&(e=n);var t=0;return function(){return t>=e.length?{done:!0}:{done:!1,value:e[t++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}return(n=e[Symbol.iterator]()).next.bind(n)}(r);!(n=t()).done;){var a=n.value;e.accounts[a.cid].signature=a.signature}return r}e.resolveSignatures=function(e){try{if(!r.isTransaction(e))return Promise.resolve(e);var o=function(e){var r=new Set(e.authorizations);r.add(e.proposer),r.delete(e.payer),r=Array.from(r);var n=new Set([e.payer]);return{insideSigners:r,outsideSigners:n=Array.from(n)}}(e),c=o.outsideSigners;return Promise.resolve(i(e,o.insideSigners,n.encodeTransactionPayload(a(e)))).then(function(r){var o=s(e,r);return Promise.resolve(i(e,c,n.encodeTransactionEnvelope(t({},a(e),{payloadSigs:o})))).then(function(r){return s(e,r),e})})}catch(e){return Promise.reject(e)}}});
!function(e,r){"object"==typeof exports&&"undefined"!=typeof module?r(exports,require("@onflow/interaction"),require("@onflow/encode")):"function"==typeof define&&define.amd?define(["exports","@onflow/interaction","@onflow/encode"],r):r((e=e||self).sdkResolveSignatures={},e.interaction,e.encode)}(this,function(e,r,n){function t(){return(t=Object.assign||function(e){for(var r=1;r<arguments.length;r++){var n=arguments[r];for(var t in n)Object.prototype.hasOwnProperty.call(n,t)&&(e[t]=n[t])}return e}).apply(this,arguments)}function o(e,r){(null==r||r>e.length)&&(r=e.length);for(var n=0,t=new Array(r);n<r;n++)t[n]=e[n];return t}function a(e){return{script:e.message.cadence,refBlock:e.message.refBlock||null,gasLimit:e.message.computeLimit,arguments:e.message.arguments.map(function(r){return e.arguments[r].asArgument}),proposalKey:{address:e.accounts[e.proposer].addr,keyId:e.accounts[e.proposer].keyId,sequenceNum:e.accounts[e.proposer].sequenceNum},payer:e.accounts[e.payer].addr,authorizers:e.authorizations.map(function(r){return e.accounts[r].addr}).reduce(function(e,r){return e.find(function(e){return e===r})?e:[].concat(e,[r])},[])}}var i=function(e,r,n){void 0===r&&(r=[]);try{return Promise.all(r.map(function(r){try{return Promise.resolve(e.accounts[r].signingFunction({message:n,addr:e.accounts[r].addr,keyId:e.accounts[r].keyId,roles:e.accounts[r].role,interaction:e})).then(function(n){if(n.cid=r,e.accounts[r].addr!==n.addr)throw new Error(r+" — mismatching address in composite signature");if(e.accounts[r].keyId!==n.keyId)throw new Error(r+" — mismatching keyId in composite signature");return n.sig=n.signature,n.address=n.addr,n})}catch(e){return Promise.reject(e)}}))}catch(e){return Promise.reject(e)}};function s(e,r){for(var n,t=function(e,r){var n;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(n=function(e,r){if(e){if("string"==typeof e)return o(e,void 0);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?o(e,void 0):void 0}}(e))){n&&(e=n);var t=0;return function(){return t>=e.length?{done:!0}:{done:!1,value:e[t++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}return(n=e[Symbol.iterator]()).next.bind(n)}(r);!(n=t()).done;){var a=n.value;e.accounts[a.cid].signature=a.signature}return r}e.resolveSignatures=function(e){try{if(!r.isTransaction(e))return Promise.resolve(e);var o=function(e){var r=new Set(e.authorizations);r.add(e.proposer),r.delete(e.payer),r=Array.from(r);var n=new Set([e.payer]);return{insideSigners:r,outsideSigners:n=Array.from(n)}}(e),c=o.outsideSigners;return Promise.resolve(i(e,o.insideSigners,n.encodeTransactionPayload(a(e)))).then(function(r){var o=s(e,r);return Promise.resolve(i(e,c,n.encodeTransactionEnvelope(t({},a(e),{payloadSigs:o})))).then(function(r){return s(e,r),e})})}catch(e){return Promise.reject(e)}}});
//# sourceMappingURL=sdk-resolve-signatures.umd.js.map
{
"name": "@onflow/sdk-resolve-signatures",
"version": "0.0.1",
"version": "0.0.2",
"description": "Flow JS SDK Resolver -- Signatures",

@@ -27,3 +27,3 @@ "license": "Apache-2.0",

"dependencies": {
"@onflow/encode": "0.0.5",
"@onflow/encode": "0.0.6",
"@onflow/interaction": "0.0.10"

@@ -30,0 +30,0 @@ },

@@ -19,3 +19,9 @@ import {isTransaction} from "@onflow/interaction"

payer: ix.accounts[ix.payer].addr,
authorizers: ix.authorizations.map(cid => ix.accounts[cid].addr),
authorizers: ix.authorizations
.map(cid => ix.accounts[cid].addr)
.reduce((prev, current) => {
return prev.find(item => item === current)
? prev
: [...prev, current]
}, []),
}

@@ -22,0 +28,0 @@ }

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 not supported yet

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