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

@onflow/sdk

Package Overview
Dependencies
Maintainers
7
Versions
165
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@onflow/sdk - npm Package Compare versions

Comparing version 0.0.16 to 0.0.17

6

CHANGELOG.md

@@ -5,2 +5,8 @@ ### Unreleased

### 0.0.17 -- 2020-05-06
- 2020-05-06 -- VSN `@onflow/send` 0.0.9 -> 0.0.10
- 2020-05-06 -- VSN `@onflow/interaction` 0.0.6 -> 0.0.7
- 2020-05-05 -- Allows params to accept async resolver functions that return a param
### 0.0.16 -- 2020-05-05

@@ -7,0 +13,0 @@

2

dist/sdk.js

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

var e=require("@onflow/interaction"),r=require("@onflow/send"),n=require("@onflow/decode"),t=require("@qvvg/templar"),o=require("@onflow/encode"),i=e.pipe;function u(){return(u=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)}var a={asParam:function(e){return e},asInjection:function(e){return e}},s=function(e){return"function"==typeof e},c=[];const p=function(){function e(){}return e.prototype.then=function(r,n){const t=new e,o=this.s;if(o){const e=1&o?r:n;if(e){try{f(t,1,e(this.v))}catch(e){f(t,2,e)}return t}return this}return this.o=function(e){try{const o=e.v;1&e.s?f(t,1,r?r(o):o):n?f(t,1,n(o)):f(t,2,o)}catch(e){f(t,2,e)}},t},e}();function f(e,r,n){if(!e.s){if(n instanceof p){if(!n.s)return void(n.o=f.bind(null,e,r));1&r&&(r=n.s),n=n.v}if(n&&n.then)return void n.then(f.bind(null,e,r),f.bind(null,e,2));e.s=r,e.v=n;const t=e.o;t&&t(e)}}function d(e){return e instanceof p&&1&e.s}const l="undefined"!=typeof Symbol?Symbol.iterator||(Symbol.iterator=Symbol("Symbol.iterator")):"@@iterator";"undefined"!=typeof Symbol&&(Symbol.asyncIterator||(Symbol.asyncIterator=Symbol("Symbol.asyncIterator")));var m=function(e){return"function"==typeof e},y=function(e){return"number"==typeof e},v=function(e){return"string"==typeof e},g=function(e,r){if(!e){var n,t=new Error("INVARIANT "+r);t.stack=t.stack.split("\n").filter(function(e){return!/at invariant/.test(e)}).join("\n");for(var o=arguments.length,i=new Array(o>2?o-2:0),u=2;u<o;u++)i[u-2]=arguments[u];throw(n=console).error.apply(n,["\n\n---\n\n",t,"\n\n"].concat(i,["\n\n---\n\n"])),t}},k=function(e){return!(e.role.proposer&&!(v(e.addr)&&y(e.keyId)&&y(e.sequenceNum)&&m(e.signingFunction))||e.role.payer&&!(v(e.addr)&&y(e.keyId)&&m(e.signingFunction))||e.role.authorizer&&!(v(e.addr)&&y(e.keyId)&&m(e.signingFunction)))},h=function(e){return void 0===e&&(e=[]),e.filter(Boolean)[0]||null},b=function(e){return void 0===e&&(e=[]),e.find(function(e){return e.role.proposer})||{}},I=e.pipe([function(r){try{var n=function(){return e.Ok(r)};if(!e.isTransaction(r))return Promise.resolve(e.Ok(r));var t=function(e,r,n){if("function"==typeof e[l]){var t,o,i,u=e[l]();if(function e(n){try{for(;!(t=u.next()).done;)if((n=r(t.value))&&n.then){if(!d(n))return void n.then(e,i||(i=f.bind(null,o=new p,2)));n=n.v}o?f(o,1,n):o=n}catch(e){f(o||(o=new p),2,e)}}(),u.return){var a=function(e){try{t.done||u.return()}catch(e){}return e};if(o&&o.then)return o.then(a,function(e){throw a(e)});a()}return o}if(!("length"in e))throw new TypeError("Object is not iterable");for(var s=[],c=0;c<e.length;c++)s.push(e[c]);return function(e,r,n){var t,o,i=-1;return function n(u){try{for(;++i<e.length;)if((u=r(i))&&u.then){if(!d(u))return void u.then(n,o||(o=f.bind(null,t=new p,2)));u=u.v}t?f(t,1,u):t=u}catch(e){f(t||(t=new p),2,e)}}(),t}(s,function(e){return r(s[e])})}(Object.entries(r.accounts),function(e){var n=e[0],t=e[1];function o(){g(k(r.accounts[n]),"Account unable to fulfill role",r.accounts[n])}var i=function(){if(m(t.resolve))return Promise.resolve(t.resolve(t)).then(function(e){r.accounts[n]=e})}();return i&&i.then?i.then(o):o()});return Promise.resolve(t&&t.then?t.then(n):n())}catch(e){return Promise.reject(e)}},function(r){try{if(!e.isTransaction(r))return Promise.resolve(e.Ok(r));for(var n=function(){var e,n,i,a=o[t],s=a.addr+"|"+a.keyId;r.accounts[s]=null!=r.accounts[s]?(e=r.accounts[s],n=u({tempId:s},a),{kind:h([e.kind,n.kind]),tempId:h([e.tempId,n.tempId]),addr:h([e.addr,n.addr]),keyId:(i=[e.keyId,n.keyId],void 0===i&&(i=[]),"number"==typeof i.filter(y)[0]?i.filter(y)[0]:null),sequenceNum:"number"==typeof b([e,n]).sequenceNum?b([e,n]).sequenceNum:e.sequenceNum,signature:h([e.signature,n.signature]),signingFunction:h([e.signingFunction,n.signingFunction]),resolve:h([e.resolve,n.resolve]),role:{proposer:e.role.proposer||n.role.proposer,authorizer:e.role.authorizer||n.role.authorizer,payer:e.role.payer||n.role.payer,param:e.role.param||n.role.param}}):u({tempId:s},a),r.proposer===a.tempId&&(r.proposer=s),r.payer===a.tempId&&(r.payer=s),r.authorizations=r.authorizations.map(function(e){return e===a.tempId?s:e}),delete r.accounts[a.tempId]},t=0,o=Object.values(r.accounts);t<o.length;t++)n();for(var i=0,a=Object.values(r.accounts);i<a.length;i++){var s=a[i];g(k(s),"Account unable to fulfill roles",s)}return Promise.resolve(e.Ok(r))}catch(e){return Promise.reject(e)}}]);Object.defineProperty(exports,"isBad",{enumerable:!0,get:function(){return e.isBad}}),Object.defineProperty(exports,"isOk",{enumerable:!0,get:function(){return e.isOk}}),Object.defineProperty(exports,"pipe",{enumerable:!0,get:function(){return e.pipe}}),Object.defineProperty(exports,"why",{enumerable:!0,get:function(){return e.why}}),Object.defineProperty(exports,"send",{enumerable:!0,get:function(){return r.send}}),Object.defineProperty(exports,"decode",{enumerable:!0,get:function(){return n.decode}}),Object.defineProperty(exports,"decodeResponse",{enumerable:!0,get:function(){return n.decodeResponse}}),exports.authorization=function(e,r,n){return{addr:e,signingFunction:r,keyId:n}},exports.authorizations=function(r){return void 0===r&&(r=[]),e.pipe(r.map(function(r){return e.makeAuthorizer(u({},"function"==typeof r?{resolve:r}:r,{role:{authorizer:!0}}))}))},exports.build=function(r){return void 0===r&&(r=[]),e.pipe(e.interaction(),r)},exports.getAccount=function(r){return e.pipe([e.makeGetAccount,function(n){return n.accountAddr=r,e.Ok(n)}])},exports.getEvents=function(r,n,t){return e.pipe([e.makeGetEvents,function(n){return n.events.eventType=r,e.Ok(n)},function(r){return r.events.start=n,e.Ok(r)},function(r){return r.events.end=t,e.Ok(r)}])},exports.getLatestBlock=function(r){return void 0===r&&(r=!1),e.pipe([e.makeGetLatestBlock,function(n){return n.latestBlock.isSealed=r,e.Ok(n)}])},exports.getTransactionStatus=function(r){return e.pipe([e.makeGetTransactionStatus,function(n){return n.transactionId=r,e.Ok(n)}])},exports.limit=function(r){return e.pipe([function(n){return n.message.computeLimit=r,e.Ok(n)}])},exports.param=function(e,r,n){return void 0===r&&(r=a),void 0===n&&(n=null),{key:n,value:e,xform:r}},exports.params=function(r){return void 0===r&&(r=[]),e.pipe(r.map(e.makeParam))},exports.payer=function(r){return e.makePayer(u({},"function"==typeof r?{resolve:r}:r,{role:{payer:!0}}))},exports.ping=function(){return e.pipe([e.makePing])},exports.proposer=function(){try{for(var r=arguments.length,n=new Array(r),t=0;t<r;t++)n[t]=arguments[t];if(s(n[0]))return Promise.resolve(e.makeProposer({resolve:n[0],role:{proposer:!0}}));var o=n[0],i=n[1],u=n[2];return Promise.resolve(e.makeProposer({addr:o,keyId:i,sequenceNum:u,role:{proposer:!0}}))}catch(e){return Promise.reject(e)}},exports.ref=function(r){return e.pipe([function(n){return n.message.refBlock=r,e.Ok(n)}])},exports.resolve=i,exports.resolveAccounts=I,exports.resolveParams=function(r){if(!e.isTransaction(r)&&!e.isScript(r))return e.Ok(r);var n=e.get(r,"ix.cadence");if("string"==typeof n)return r.message.cadence=n,e.Ok(r);if("function"==typeof n){var t=Object.fromEntries(Object.values(r.params).filter(function(e){return null!=e.key}).map(function(e){return[e.key,e.xform.asInjection(e.value)]}));return r.message.cadence=n(t),e.Ok(r)}throw new Error("Invalid Cadence Value")},exports.resolveSignatures=function(r){try{if(!e.isTransaction(r))return Promise.resolve(e.Ok(r));var n=r.authorizations.map(function(e){return r.accounts[e]}),t=r.accounts[r.payer],i=r.accounts[r.proposer],a=o.encodeTransactionPayload({script:r.message.cadence,refBlock:r.message.refBlock||null,gasLimit:r.message.computeLimit,proposalKey:{address:i.addr,keyId:i.keyId,sequenceNum:i.sequenceNum},payer:t.addr,authorizers:n.map(function(e){return e.addr})}),s=n.map(function(e){try{return e.addr===t.addr?(r.accounts[e.tempId]=u({},r.accounts[e.tempId],{signature:null}),Promise.resolve()):Promise.resolve(e.signingFunction({message:a,addr:e.addr,keyId:e.keyId,roles:{proposer:i.addr===e.addr,authorizer:!0,payer:t.addr===e.addr},interaction:r})).then(function(n){r.accounts[e.tempId]=u({},r.accounts[e.tempId],{signature:n.signature})})}catch(e){return Promise.reject(e)}});return Promise.resolve(Promise.all(s)).then(function(){n=r.authorizations.map(function(e){return r.accounts[e]});var a=o.encodeTransactionEnvelope({script:r.message.cadence,refBlock:r.message.refBlock||null,gasLimit:r.message.computeLimit,proposalKey:{address:i.addr,keyId:i.keyId,sequenceNum:i.sequenceNum},payer:t.addr,authorizers:n.map(function(e){return e.addr}),payloadSigs:n.map(function(e){return null===e.signature?null:{address:e.addr,keyId:e.keyId,sig:e.signature}}).filter(function(e){return null!==e})});return Promise.resolve(t.signingFunction({message:a,addr:t.addr,keyId:t.keyId,roles:{proposer:i.addr===t.addr,authorizer:!1,payer:!0},interaction:r})).then(function(n){return r.accounts[r.payer]=u({},r.accounts[r.payer],{signature:n.signature}),e.Ok(r)})})}catch(e){return Promise.reject(e)}},exports.script=function(){return e.pipe([e.makeScript,e.put("ix.cadence",t.t7l.apply(void 0,arguments))])},exports.transaction=function(){return e.pipe([e.makeTransaction,e.put("ix.cadence",t.t7l.apply(void 0,arguments)),function(r){return r.message.computeLimit=r.message.computeLimit||10,r.message.refBlock=r.message.refBlock||null,r.authorizations=r.authorizations||c,e.Ok(r)}])};
var e=require("@onflow/interaction"),r=require("@onflow/send"),n=require("@onflow/decode"),t=require("@qvvg/templar"),o=require("@onflow/encode"),i=e.pipe;function u(){return(u=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)}var a={asParam:function(e){return e},asInjection:function(e){return e}},s=function(e){return"function"==typeof e},c=[];const p=function(){function e(){}return e.prototype.then=function(r,n){const t=new e,o=this.s;if(o){const e=1&o?r:n;if(e){try{f(t,1,e(this.v))}catch(e){f(t,2,e)}return t}return this}return this.o=function(e){try{const o=e.v;1&e.s?f(t,1,r?r(o):o):n?f(t,1,n(o)):f(t,2,o)}catch(e){f(t,2,e)}},t},e}();function f(e,r,n){if(!e.s){if(n instanceof p){if(!n.s)return void(n.o=f.bind(null,e,r));1&r&&(r=n.s),n=n.v}if(n&&n.then)return void n.then(f.bind(null,e,r),f.bind(null,e,2));e.s=r,e.v=n;const t=e.o;t&&t(e)}}function l(e){return e instanceof p&&1&e.s}const d="undefined"!=typeof Symbol?Symbol.iterator||(Symbol.iterator=Symbol("Symbol.iterator")):"@@iterator";"undefined"!=typeof Symbol&&(Symbol.asyncIterator||(Symbol.asyncIterator=Symbol("Symbol.asyncIterator")));var m=function(e){return"function"==typeof e},y=function(e){return"number"==typeof e},v=function(e){return"string"==typeof e},g=function(e,r){if(!e){var n,t=new Error("INVARIANT "+r);t.stack=t.stack.split("\n").filter(function(e){return!/at invariant/.test(e)}).join("\n");for(var o=arguments.length,i=new Array(o>2?o-2:0),u=2;u<o;u++)i[u-2]=arguments[u];throw(n=console).error.apply(n,["\n\n---\n\n",t,"\n\n"].concat(i,["\n\n---\n\n"])),t}},h=function(e){return!(e.role.proposer&&!(v(e.addr)&&y(e.keyId)&&y(e.sequenceNum)&&m(e.signingFunction))||e.role.payer&&!(v(e.addr)&&y(e.keyId)&&m(e.signingFunction))||e.role.authorizer&&!(v(e.addr)&&y(e.keyId)&&m(e.signingFunction)))},k=function(e){return void 0===e&&(e=[]),e.filter(Boolean)[0]||null},I=function(e){return void 0===e&&(e=[]),e.find(function(e){return e.role.proposer})||{}},b=e.pipe([function(r){try{var n=function(){return e.Ok(r)};if(!e.isTransaction(r))return Promise.resolve(e.Ok(r));var t=function(e,r,n){if("function"==typeof e[d]){var t,o,i,u=e[d]();if(function e(n){try{for(;!(t=u.next()).done;)if((n=r(t.value))&&n.then){if(!l(n))return void n.then(e,i||(i=f.bind(null,o=new p,2)));n=n.v}o?f(o,1,n):o=n}catch(e){f(o||(o=new p),2,e)}}(),u.return){var a=function(e){try{t.done||u.return()}catch(e){}return e};if(o&&o.then)return o.then(a,function(e){throw a(e)});a()}return o}if(!("length"in e))throw new TypeError("Object is not iterable");for(var s=[],c=0;c<e.length;c++)s.push(e[c]);return function(e,r,n){var t,o,i=-1;return function n(u){try{for(;++i<e.length;)if((u=r(i))&&u.then){if(!l(u))return void u.then(n,o||(o=f.bind(null,t=new p,2)));u=u.v}t?f(t,1,u):t=u}catch(e){f(t||(t=new p),2,e)}}(),t}(s,function(e){return r(s[e])})}(Object.entries(r.accounts),function(e){var n=e[0],t=e[1];function o(){g(h(r.accounts[n]),"Account unable to fulfill role",r.accounts[n])}var i=function(){if(m(t.resolve))return Promise.resolve(t.resolve(t)).then(function(e){r.accounts[n]=e})}();return i&&i.then?i.then(o):o()});return Promise.resolve(t&&t.then?t.then(n):n())}catch(e){return Promise.reject(e)}},function(r){try{if(!e.isTransaction(r))return Promise.resolve(e.Ok(r));for(var n=function(){var e,n,i,a=o[t],s=a.addr+"|"+a.keyId;r.accounts[s]=null!=r.accounts[s]?(e=r.accounts[s],n=u({tempId:s},a),{kind:k([e.kind,n.kind]),tempId:k([e.tempId,n.tempId]),addr:k([e.addr,n.addr]),keyId:(i=[e.keyId,n.keyId],void 0===i&&(i=[]),"number"==typeof i.filter(y)[0]?i.filter(y)[0]:null),sequenceNum:"number"==typeof I([e,n]).sequenceNum?I([e,n]).sequenceNum:e.sequenceNum,signature:k([e.signature,n.signature]),signingFunction:k([e.signingFunction,n.signingFunction]),resolve:k([e.resolve,n.resolve]),role:{proposer:e.role.proposer||n.role.proposer,authorizer:e.role.authorizer||n.role.authorizer,payer:e.role.payer||n.role.payer,param:e.role.param||n.role.param}}):u({tempId:s},a),r.proposer===a.tempId&&(r.proposer=s),r.payer===a.tempId&&(r.payer=s),r.authorizations=r.authorizations.map(function(e){return e===a.tempId?s:e}),delete r.accounts[a.tempId]},t=0,o=Object.values(r.accounts);t<o.length;t++)n();for(var i=0,a=Object.values(r.accounts);i<a.length;i++){var s=a[i];g(h(s),"Account unable to fulfill roles",s)}return Promise.resolve(e.Ok(r))}catch(e){return Promise.reject(e)}}]);Object.defineProperty(exports,"isBad",{enumerable:!0,get:function(){return e.isBad}}),Object.defineProperty(exports,"isOk",{enumerable:!0,get:function(){return e.isOk}}),Object.defineProperty(exports,"pipe",{enumerable:!0,get:function(){return e.pipe}}),Object.defineProperty(exports,"why",{enumerable:!0,get:function(){return e.why}}),Object.defineProperty(exports,"send",{enumerable:!0,get:function(){return r.send}}),Object.defineProperty(exports,"decode",{enumerable:!0,get:function(){return n.decode}}),Object.defineProperty(exports,"decodeResponse",{enumerable:!0,get:function(){return n.decodeResponse}}),exports.authorization=function(e,r,n){return{addr:e,signingFunction:r,keyId:n}},exports.authorizations=function(r){return void 0===r&&(r=[]),e.pipe(r.map(function(r){return e.makeAuthorizer(u({},"function"==typeof r?{resolve:r}:r,{role:{authorizer:!0}}))}))},exports.build=function(r){return void 0===r&&(r=[]),e.pipe(e.interaction(),r)},exports.getAccount=function(r){return e.pipe([e.makeGetAccount,function(n){return n.accountAddr=r,e.Ok(n)}])},exports.getEvents=function(r,n,t){return e.pipe([e.makeGetEvents,function(n){return n.events.eventType=r,e.Ok(n)},function(r){return r.events.start=n,e.Ok(r)},function(r){return r.events.end=t,e.Ok(r)}])},exports.getLatestBlock=function(r){return void 0===r&&(r=!1),e.pipe([e.makeGetLatestBlock,function(n){return n.latestBlock.isSealed=r,e.Ok(n)}])},exports.getTransactionStatus=function(r){return e.pipe([e.makeGetTransactionStatus,function(n){return n.transactionId=r,e.Ok(n)}])},exports.limit=function(r){return e.pipe([function(n){return n.message.computeLimit=r,e.Ok(n)}])},exports.param=function(e,r,n){return void 0===r&&(r=a),void 0===n&&(n=null),{key:n,value:e,xform:r}},exports.params=function(r){return void 0===r&&(r=[]),e.pipe(r.map(function(r){return e.makeParam("function"==typeof r?{resolve:r}:r)}))},exports.payer=function(r){return e.makePayer(u({},"function"==typeof r?{resolve:r}:r,{role:{payer:!0}}))},exports.ping=function(){return e.pipe([e.makePing])},exports.proposer=function(){try{for(var r=arguments.length,n=new Array(r),t=0;t<r;t++)n[t]=arguments[t];if(s(n[0]))return Promise.resolve(e.makeProposer({resolve:n[0],role:{proposer:!0}}));var o=n[0],i=n[1],u=n[2],a=n[3];return Promise.resolve(e.makeProposer({addr:o,keyId:i,sequenceNum:u,signingFunction:a,role:{proposer:!0}}))}catch(e){return Promise.reject(e)}},exports.ref=function(r){return e.pipe([function(n){return n.message.refBlock=r,e.Ok(n)}])},exports.resolve=i,exports.resolveAccounts=b,exports.resolveParams=function(r){try{var n=function(e){if(t)return e;throw new Error("Invalid Cadence Value")},t=!1;if(!e.isTransaction(r)&&!e.isScript(r))return Promise.resolve(e.Ok(r));var o=e.get(r,"ix.cadence");if("string"==typeof o)return r.message.cadence=o,Promise.resolve(e.Ok(r));var i=function(){if("function"==typeof o){var n=Object.values(r.params);return Promise.resolve(Promise.all(n.map(function(e){try{var r=!1,n=function(){if("function"==typeof e.resolve)return r=!0,Promise.resolve(e.resolve()).then(function(r){return u({},r,{tempId:e.tempId})})}();return Promise.resolve(n&&n.then?n.then(function(n){return r?n:e}):r?n:e)}catch(e){return Promise.reject(e)}}))).then(function(n){return n.forEach(function(e){r.params[e.tempId]=e}),n=n.filter(function(e){return null!=e.key}).map(function(e){return[e.key,e.xform.asInjection(e.value)]}),r.message.cadence=o(n),t=!0,e.Ok(r)})}}();return Promise.resolve(i&&i.then?i.then(n):n(i))}catch(e){return Promise.reject(e)}},exports.resolveSignatures=function(r){try{if(!e.isTransaction(r))return Promise.resolve(e.Ok(r));var n=r.authorizations.map(function(e){return r.accounts[e]}),t=r.accounts[r.payer],i=r.accounts[r.proposer],a=o.encodeTransactionPayload({script:r.message.cadence,refBlock:r.message.refBlock||null,gasLimit:r.message.computeLimit,proposalKey:{address:i.addr,keyId:i.keyId,sequenceNum:i.sequenceNum},payer:t.addr,authorizers:n.map(function(e){return e.addr})}),s=n.map(function(e){try{return e.addr===t.addr?(r.accounts[e.tempId]=u({},r.accounts[e.tempId],{signature:null}),Promise.resolve()):Promise.resolve(e.signingFunction({message:a,addr:e.addr,keyId:e.keyId,roles:{proposer:i.addr===e.addr,authorizer:!0,payer:t.addr===e.addr},interaction:r})).then(function(n){r.accounts[e.tempId]=u({},r.accounts[e.tempId],{signature:n.signature})})}catch(e){return Promise.reject(e)}});return Promise.resolve(Promise.all(s)).then(function(){n=r.authorizations.map(function(e){return r.accounts[e]});var a=o.encodeTransactionEnvelope({script:r.message.cadence,refBlock:r.message.refBlock||null,gasLimit:r.message.computeLimit,proposalKey:{address:i.addr,keyId:i.keyId,sequenceNum:i.sequenceNum},payer:t.addr,authorizers:n.map(function(e){return e.addr}),payloadSigs:n.map(function(e){return null===e.signature?null:{address:e.addr,keyId:e.keyId,sig:e.signature}}).filter(function(e){return null!==e})});return Promise.resolve(t.signingFunction({message:a,addr:t.addr,keyId:t.keyId,roles:{proposer:i.addr===t.addr,authorizer:!1,payer:!0},interaction:r})).then(function(n){return r.accounts[r.payer]=u({},r.accounts[r.payer],{signature:n.signature}),e.Ok(r)})})}catch(e){return Promise.reject(e)}},exports.script=function(){return e.pipe([e.makeScript,e.put("ix.cadence",t.t7l.apply(void 0,arguments))])},exports.transaction=function(){return e.pipe([e.makeTransaction,e.put("ix.cadence",t.t7l.apply(void 0,arguments)),function(r){return r.message.computeLimit=r.message.computeLimit||10,r.message.refBlock=r.message.refBlock||null,r.authorizations=r.authorizations||c,e.Ok(r)}])};
//# sourceMappingURL=sdk.js.map

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

import{pipe as e,interaction as n,makeAuthorizer as r,makeGetAccount as t,Ok as o,makeGetEvents as u,makeGetLatestBlock as i,makeGetTransactionStatus as a,makeParam as c,makeProposer as s,makePayer as f,makePing as d,makeScript as l,put as p,makeTransaction as m,isTransaction as y,isScript as v,get as h}from"@onflow/interaction";export{isBad,isOk,pipe,why}from"@onflow/interaction";export{send}from"@onflow/send";export{decode,decodeResponse}from"@onflow/decode";import{t7l as g}from"@qvvg/templar";import{encodeTransactionPayload as I,encodeTransactionEnvelope as k}from"@onflow/encode";function b(r){return void 0===r&&(r=[]),e(n(),r)}var w=e;function P(){return(P=Object.assign||function(e){for(var n=1;n<arguments.length;n++){var r=arguments[n];for(var t in r)Object.prototype.hasOwnProperty.call(r,t)&&(e[t]=r[t])}return e}).apply(this,arguments)}function j(n){return void 0===n&&(n=[]),e(n.map(function(e){return r(P({},"function"==typeof e?{resolve:e}:e,{role:{authorizer:!0}}))}))}function z(e,n,r){return{addr:e,signingFunction:n,keyId:r}}function N(n){return e([t,function(e){return e.accountAddr=n,o(e)}])}function S(n,r,t){return e([u,function(e){return e.events.eventType=n,o(e)},function(e){return e.events.start=r,o(e)},function(e){return e.events.end=t,o(e)}])}function q(n){return void 0===n&&(n=!1),e([i,function(e){return e.latestBlock.isSealed=n,o(e)}])}function x(n){return e([a,function(e){return e.transactionId=n,o(e)}])}function B(n){return e([function(e){return e.message.computeLimit=n,o(e)}])}function O(n){return void 0===n&&(n=[]),e(n.map(c))}var F={asParam:function(e){return e},asInjection:function(e){return e}};function A(e,n,r){return void 0===n&&(n=F),void 0===r&&(r=null),{key:r,value:e,xform:n}}var L=function(){try{for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];if(E(n[0]))return Promise.resolve(s({resolve:n[0],role:{proposer:!0}}));var t=n[0],o=n[1],u=n[2];return Promise.resolve(s({addr:t,keyId:o,sequenceNum:u,role:{proposer:!0}}))}catch(e){return Promise.reject(e)}},E=function(e){return"function"==typeof e};function T(e){return f(P({},"function"==typeof e?{resolve:e}:e,{role:{payer:!0}}))}function K(){return e([d])}function R(n){return e([function(e){return e.message.refBlock=n,o(e)}])}function V(){return e([l,p("ix.cadence",g.apply(void 0,arguments))])}var C=[];function D(){return e([m,p("ix.cadence",g.apply(void 0,arguments)),function(e){return e.message.computeLimit=e.message.computeLimit||10,e.message.refBlock=e.message.refBlock||null,e.authorizations=e.authorizations||C,o(e)}])}const G=function(){function e(){}return e.prototype.then=function(n,r){const t=new e,o=this.s;if(o){const e=1&o?n:r;if(e){try{H(t,1,e(this.v))}catch(e){H(t,2,e)}return t}return this}return this.o=function(e){try{const o=e.v;1&e.s?H(t,1,n?n(o):o):r?H(t,1,r(o)):H(t,2,o)}catch(e){H(t,2,e)}},t},e}();function H(e,n,r){if(!e.s){if(r instanceof G){if(!r.s)return void(r.o=H.bind(null,e,n));1&n&&(n=r.s),r=r.v}if(r&&r.then)return void r.then(H.bind(null,e,n),H.bind(null,e,2));e.s=n,e.v=r;const t=e.o;t&&t(e)}}function J(e){return e instanceof G&&1&e.s}const M="undefined"!=typeof Symbol?Symbol.iterator||(Symbol.iterator=Symbol("Symbol.iterator")):"@@iterator";"undefined"!=typeof Symbol&&(Symbol.asyncIterator||(Symbol.asyncIterator=Symbol("Symbol.asyncIterator")));var Q=function(e){return"function"==typeof e},U=function(e){return"number"==typeof e},W=function(e){return"string"==typeof e},X=function(e,n){if(!e){var r,t=new Error("INVARIANT "+n);t.stack=t.stack.split("\n").filter(function(e){return!/at invariant/.test(e)}).join("\n");for(var o=arguments.length,u=new Array(o>2?o-2:0),i=2;i<o;i++)u[i-2]=arguments[i];throw(r=console).error.apply(r,["\n\n---\n\n",t,"\n\n"].concat(u,["\n\n---\n\n"])),t}},Y=function(e){return!(e.role.proposer&&!(W(e.addr)&&U(e.keyId)&&U(e.sequenceNum)&&Q(e.signingFunction))||e.role.payer&&!(W(e.addr)&&U(e.keyId)&&Q(e.signingFunction))||e.role.authorizer&&!(W(e.addr)&&U(e.keyId)&&Q(e.signingFunction)))},Z=function(e){return void 0===e&&(e=[]),e.filter(Boolean)[0]||null},$=function(e){return void 0===e&&(e=[]),e.find(function(e){return e.role.proposer})||{}},_=e([function(e){try{var n=function(){return o(e)};if(!y(e))return Promise.resolve(o(e));var r=function(e,n,r){if("function"==typeof e[M]){var t,o,u,i=e[M]();if(function e(r){try{for(;!(t=i.next()).done;)if((r=n(t.value))&&r.then){if(!J(r))return void r.then(e,u||(u=H.bind(null,o=new G,2)));r=r.v}o?H(o,1,r):o=r}catch(e){H(o||(o=new G),2,e)}}(),i.return){var a=function(e){try{t.done||i.return()}catch(e){}return e};if(o&&o.then)return o.then(a,function(e){throw a(e)});a()}return o}if(!("length"in e))throw new TypeError("Object is not iterable");for(var c=[],s=0;s<e.length;s++)c.push(e[s]);return function(e,n,r){var t,o,u=-1;return function r(i){try{for(;++u<e.length;)if((i=n(u))&&i.then){if(!J(i))return void i.then(r,o||(o=H.bind(null,t=new G,2)));i=i.v}t?H(t,1,i):t=i}catch(e){H(t||(t=new G),2,e)}}(),t}(c,function(e){return n(c[e])})}(Object.entries(e.accounts),function(n){var r=n[0],t=n[1];function o(){X(Y(e.accounts[r]),"Account unable to fulfill role",e.accounts[r])}var u=function(){if(Q(t.resolve))return Promise.resolve(t.resolve(t)).then(function(n){e.accounts[r]=n})}();return u&&u.then?u.then(o):o()});return Promise.resolve(r&&r.then?r.then(n):n())}catch(e){return Promise.reject(e)}},function(e){try{if(!y(e))return Promise.resolve(o(e));for(var n=function(){var n,o,u,i=t[r],a=i.addr+"|"+i.keyId;e.accounts[a]=null!=e.accounts[a]?(n=e.accounts[a],o=P({tempId:a},i),{kind:Z([n.kind,o.kind]),tempId:Z([n.tempId,o.tempId]),addr:Z([n.addr,o.addr]),keyId:(u=[n.keyId,o.keyId],void 0===u&&(u=[]),"number"==typeof u.filter(U)[0]?u.filter(U)[0]:null),sequenceNum:"number"==typeof $([n,o]).sequenceNum?$([n,o]).sequenceNum:n.sequenceNum,signature:Z([n.signature,o.signature]),signingFunction:Z([n.signingFunction,o.signingFunction]),resolve:Z([n.resolve,o.resolve]),role:{proposer:n.role.proposer||o.role.proposer,authorizer:n.role.authorizer||o.role.authorizer,payer:n.role.payer||o.role.payer,param:n.role.param||o.role.param}}):P({tempId:a},i),e.proposer===i.tempId&&(e.proposer=a),e.payer===i.tempId&&(e.payer=a),e.authorizations=e.authorizations.map(function(e){return e===i.tempId?a:e}),delete e.accounts[i.tempId]},r=0,t=Object.values(e.accounts);r<t.length;r++)n();for(var u=0,i=Object.values(e.accounts);u<i.length;u++){var a=i[u];X(Y(a),"Account unable to fulfill roles",a)}return Promise.resolve(o(e))}catch(e){return Promise.reject(e)}}]),ee=function(e){if(!y(e)&&!v(e))return o(e);var n=h(e,"ix.cadence");if("string"==typeof n)return e.message.cadence=n,o(e);if("function"==typeof n){var r=Object.fromEntries(Object.values(e.params).filter(function(e){return null!=e.key}).map(function(e){return[e.key,e.xform.asInjection(e.value)]}));return e.message.cadence=n(r),o(e)}throw new Error("Invalid Cadence Value")},ne=function(e){try{if(!y(e))return Promise.resolve(o(e));var n=e.authorizations.map(function(n){return e.accounts[n]}),r=e.accounts[e.payer],t=e.accounts[e.proposer],u=I({script:e.message.cadence,refBlock:e.message.refBlock||null,gasLimit:e.message.computeLimit,proposalKey:{address:t.addr,keyId:t.keyId,sequenceNum:t.sequenceNum},payer:r.addr,authorizers:n.map(function(e){return e.addr})}),i=n.map(function(n){try{return n.addr===r.addr?(e.accounts[n.tempId]=P({},e.accounts[n.tempId],{signature:null}),Promise.resolve()):Promise.resolve(n.signingFunction({message:u,addr:n.addr,keyId:n.keyId,roles:{proposer:t.addr===n.addr,authorizer:!0,payer:r.addr===n.addr},interaction:e})).then(function(r){e.accounts[n.tempId]=P({},e.accounts[n.tempId],{signature:r.signature})})}catch(e){return Promise.reject(e)}});return Promise.resolve(Promise.all(i)).then(function(){n=e.authorizations.map(function(n){return e.accounts[n]});var u=k({script:e.message.cadence,refBlock:e.message.refBlock||null,gasLimit:e.message.computeLimit,proposalKey:{address:t.addr,keyId:t.keyId,sequenceNum:t.sequenceNum},payer:r.addr,authorizers:n.map(function(e){return e.addr}),payloadSigs:n.map(function(e){return null===e.signature?null:{address:e.addr,keyId:e.keyId,sig:e.signature}}).filter(function(e){return null!==e})});return Promise.resolve(r.signingFunction({message:u,addr:r.addr,keyId:r.keyId,roles:{proposer:t.addr===r.addr,authorizer:!1,payer:!0},interaction:e})).then(function(n){return e.accounts[e.payer]=P({},e.accounts[e.payer],{signature:n.signature}),o(e)})})}catch(e){return Promise.reject(e)}};export{z as authorization,j as authorizations,b as build,N as getAccount,S as getEvents,q as getLatestBlock,x as getTransactionStatus,B as limit,A as param,O as params,T as payer,K as ping,L as proposer,R as ref,w as resolve,_ as resolveAccounts,ee as resolveParams,ne as resolveSignatures,V as script,D as transaction};
import{pipe as e,interaction as n,makeAuthorizer as r,makeGetAccount as t,Ok as o,makeGetEvents as u,makeGetLatestBlock as i,makeGetTransactionStatus as c,makeParam as a,makeProposer as s,makePayer as f,makePing as l,makeScript as d,put as p,makeTransaction as m,isTransaction as v,isScript as y,get as h}from"@onflow/interaction";export{isBad,isOk,pipe,why}from"@onflow/interaction";export{send}from"@onflow/send";export{decode,decodeResponse}from"@onflow/decode";import{t7l as g}from"@qvvg/templar";import{encodeTransactionPayload as I,encodeTransactionEnvelope as k}from"@onflow/encode";function P(r){return void 0===r&&(r=[]),e(n(),r)}var b=e;function w(){return(w=Object.assign||function(e){for(var n=1;n<arguments.length;n++){var r=arguments[n];for(var t in r)Object.prototype.hasOwnProperty.call(r,t)&&(e[t]=r[t])}return e}).apply(this,arguments)}function j(n){return void 0===n&&(n=[]),e(n.map(function(e){return r(w({},"function"==typeof e?{resolve:e}:e,{role:{authorizer:!0}}))}))}function z(e,n,r){return{addr:e,signingFunction:n,keyId:r}}function N(n){return e([t,function(e){return e.accountAddr=n,o(e)}])}function S(n,r,t){return e([u,function(e){return e.events.eventType=n,o(e)},function(e){return e.events.start=r,o(e)},function(e){return e.events.end=t,o(e)}])}function q(n){return void 0===n&&(n=!1),e([i,function(e){return e.latestBlock.isSealed=n,o(e)}])}function x(n){return e([c,function(e){return e.transactionId=n,o(e)}])}function B(n){return e([function(e){return e.message.computeLimit=n,o(e)}])}function F(n){return void 0===n&&(n=[]),e(n.map(function(e){return a("function"==typeof e?{resolve:e}:e)}))}var O={asParam:function(e){return e},asInjection:function(e){return e}};function A(e,n,r){return void 0===n&&(n=O),void 0===r&&(r=null),{key:r,value:e,xform:n}}var L=function(){try{for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];if(E(n[0]))return Promise.resolve(s({resolve:n[0],role:{proposer:!0}}));var t=n[0],o=n[1],u=n[2],i=n[3];return Promise.resolve(s({addr:t,keyId:o,sequenceNum:u,signingFunction:i,role:{proposer:!0}}))}catch(e){return Promise.reject(e)}},E=function(e){return"function"==typeof e};function T(e){return f(w({},"function"==typeof e?{resolve:e}:e,{role:{payer:!0}}))}function K(){return e([l])}function R(n){return e([function(e){return e.message.refBlock=n,o(e)}])}function V(){return e([d,p("ix.cadence",g.apply(void 0,arguments))])}var C=[];function D(){return e([m,p("ix.cadence",g.apply(void 0,arguments)),function(e){return e.message.computeLimit=e.message.computeLimit||10,e.message.refBlock=e.message.refBlock||null,e.authorizations=e.authorizations||C,o(e)}])}const G=function(){function e(){}return e.prototype.then=function(n,r){const t=new e,o=this.s;if(o){const e=1&o?n:r;if(e){try{H(t,1,e(this.v))}catch(e){H(t,2,e)}return t}return this}return this.o=function(e){try{const o=e.v;1&e.s?H(t,1,n?n(o):o):r?H(t,1,r(o)):H(t,2,o)}catch(e){H(t,2,e)}},t},e}();function H(e,n,r){if(!e.s){if(r instanceof G){if(!r.s)return void(r.o=H.bind(null,e,n));1&n&&(n=r.s),r=r.v}if(r&&r.then)return void r.then(H.bind(null,e,n),H.bind(null,e,2));e.s=n,e.v=r;const t=e.o;t&&t(e)}}function J(e){return e instanceof G&&1&e.s}const M="undefined"!=typeof Symbol?Symbol.iterator||(Symbol.iterator=Symbol("Symbol.iterator")):"@@iterator";"undefined"!=typeof Symbol&&(Symbol.asyncIterator||(Symbol.asyncIterator=Symbol("Symbol.asyncIterator")));var Q=function(e){return"function"==typeof e},U=function(e){return"number"==typeof e},W=function(e){return"string"==typeof e},X=function(e,n){if(!e){var r,t=new Error("INVARIANT "+n);t.stack=t.stack.split("\n").filter(function(e){return!/at invariant/.test(e)}).join("\n");for(var o=arguments.length,u=new Array(o>2?o-2:0),i=2;i<o;i++)u[i-2]=arguments[i];throw(r=console).error.apply(r,["\n\n---\n\n",t,"\n\n"].concat(u,["\n\n---\n\n"])),t}},Y=function(e){return!(e.role.proposer&&!(W(e.addr)&&U(e.keyId)&&U(e.sequenceNum)&&Q(e.signingFunction))||e.role.payer&&!(W(e.addr)&&U(e.keyId)&&Q(e.signingFunction))||e.role.authorizer&&!(W(e.addr)&&U(e.keyId)&&Q(e.signingFunction)))},Z=function(e){return void 0===e&&(e=[]),e.filter(Boolean)[0]||null},$=function(e){return void 0===e&&(e=[]),e.find(function(e){return e.role.proposer})||{}},_=e([function(e){try{var n=function(){return o(e)};if(!v(e))return Promise.resolve(o(e));var r=function(e,n,r){if("function"==typeof e[M]){var t,o,u,i=e[M]();if(function e(r){try{for(;!(t=i.next()).done;)if((r=n(t.value))&&r.then){if(!J(r))return void r.then(e,u||(u=H.bind(null,o=new G,2)));r=r.v}o?H(o,1,r):o=r}catch(e){H(o||(o=new G),2,e)}}(),i.return){var c=function(e){try{t.done||i.return()}catch(e){}return e};if(o&&o.then)return o.then(c,function(e){throw c(e)});c()}return o}if(!("length"in e))throw new TypeError("Object is not iterable");for(var a=[],s=0;s<e.length;s++)a.push(e[s]);return function(e,n,r){var t,o,u=-1;return function r(i){try{for(;++u<e.length;)if((i=n(u))&&i.then){if(!J(i))return void i.then(r,o||(o=H.bind(null,t=new G,2)));i=i.v}t?H(t,1,i):t=i}catch(e){H(t||(t=new G),2,e)}}(),t}(a,function(e){return n(a[e])})}(Object.entries(e.accounts),function(n){var r=n[0],t=n[1];function o(){X(Y(e.accounts[r]),"Account unable to fulfill role",e.accounts[r])}var u=function(){if(Q(t.resolve))return Promise.resolve(t.resolve(t)).then(function(n){e.accounts[r]=n})}();return u&&u.then?u.then(o):o()});return Promise.resolve(r&&r.then?r.then(n):n())}catch(e){return Promise.reject(e)}},function(e){try{if(!v(e))return Promise.resolve(o(e));for(var n=function(){var n,o,u,i=t[r],c=i.addr+"|"+i.keyId;e.accounts[c]=null!=e.accounts[c]?(n=e.accounts[c],o=w({tempId:c},i),{kind:Z([n.kind,o.kind]),tempId:Z([n.tempId,o.tempId]),addr:Z([n.addr,o.addr]),keyId:(u=[n.keyId,o.keyId],void 0===u&&(u=[]),"number"==typeof u.filter(U)[0]?u.filter(U)[0]:null),sequenceNum:"number"==typeof $([n,o]).sequenceNum?$([n,o]).sequenceNum:n.sequenceNum,signature:Z([n.signature,o.signature]),signingFunction:Z([n.signingFunction,o.signingFunction]),resolve:Z([n.resolve,o.resolve]),role:{proposer:n.role.proposer||o.role.proposer,authorizer:n.role.authorizer||o.role.authorizer,payer:n.role.payer||o.role.payer,param:n.role.param||o.role.param}}):w({tempId:c},i),e.proposer===i.tempId&&(e.proposer=c),e.payer===i.tempId&&(e.payer=c),e.authorizations=e.authorizations.map(function(e){return e===i.tempId?c:e}),delete e.accounts[i.tempId]},r=0,t=Object.values(e.accounts);r<t.length;r++)n();for(var u=0,i=Object.values(e.accounts);u<i.length;u++){var c=i[u];X(Y(c),"Account unable to fulfill roles",c)}return Promise.resolve(o(e))}catch(e){return Promise.reject(e)}}]),ee=function(e){try{var n=function(e){if(r)return e;throw new Error("Invalid Cadence Value")},r=!1;if(!v(e)&&!y(e))return Promise.resolve(o(e));var t=h(e,"ix.cadence");if("string"==typeof t)return e.message.cadence=t,Promise.resolve(o(e));var u=function(){if("function"==typeof t){var n=Object.values(e.params);return Promise.resolve(Promise.all(n.map(function(e){try{var n=!1,r=function(){if("function"==typeof e.resolve)return n=!0,Promise.resolve(e.resolve()).then(function(n){return w({},n,{tempId:e.tempId})})}();return Promise.resolve(r&&r.then?r.then(function(r){return n?r:e}):n?r:e)}catch(e){return Promise.reject(e)}}))).then(function(n){return n.forEach(function(n){e.params[n.tempId]=n}),n=n.filter(function(e){return null!=e.key}).map(function(e){return[e.key,e.xform.asInjection(e.value)]}),e.message.cadence=t(n),r=!0,o(e)})}}();return Promise.resolve(u&&u.then?u.then(n):n(u))}catch(e){return Promise.reject(e)}},ne=function(e){try{if(!v(e))return Promise.resolve(o(e));var n=e.authorizations.map(function(n){return e.accounts[n]}),r=e.accounts[e.payer],t=e.accounts[e.proposer],u=I({script:e.message.cadence,refBlock:e.message.refBlock||null,gasLimit:e.message.computeLimit,proposalKey:{address:t.addr,keyId:t.keyId,sequenceNum:t.sequenceNum},payer:r.addr,authorizers:n.map(function(e){return e.addr})}),i=n.map(function(n){try{return n.addr===r.addr?(e.accounts[n.tempId]=w({},e.accounts[n.tempId],{signature:null}),Promise.resolve()):Promise.resolve(n.signingFunction({message:u,addr:n.addr,keyId:n.keyId,roles:{proposer:t.addr===n.addr,authorizer:!0,payer:r.addr===n.addr},interaction:e})).then(function(r){e.accounts[n.tempId]=w({},e.accounts[n.tempId],{signature:r.signature})})}catch(e){return Promise.reject(e)}});return Promise.resolve(Promise.all(i)).then(function(){n=e.authorizations.map(function(n){return e.accounts[n]});var u=k({script:e.message.cadence,refBlock:e.message.refBlock||null,gasLimit:e.message.computeLimit,proposalKey:{address:t.addr,keyId:t.keyId,sequenceNum:t.sequenceNum},payer:r.addr,authorizers:n.map(function(e){return e.addr}),payloadSigs:n.map(function(e){return null===e.signature?null:{address:e.addr,keyId:e.keyId,sig:e.signature}}).filter(function(e){return null!==e})});return Promise.resolve(r.signingFunction({message:u,addr:r.addr,keyId:r.keyId,roles:{proposer:t.addr===r.addr,authorizer:!1,payer:!0},interaction:e})).then(function(n){return e.accounts[e.payer]=w({},e.accounts[e.payer],{signature:n.signature}),o(e)})})}catch(e){return Promise.reject(e)}};export{z as authorization,j as authorizations,P as build,N as getAccount,S as getEvents,q as getLatestBlock,x as getTransactionStatus,B as limit,A as param,F as params,T as payer,K as ping,L as proposer,R as ref,b as resolve,_ as resolveAccounts,ee as resolveParams,ne as resolveSignatures,V as script,D as transaction};
//# sourceMappingURL=sdk.modern.js.map

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

import{pipe as e,interaction as n,makeAuthorizer as r,makeGetAccount as t,Ok as o,makeGetEvents as u,makeGetLatestBlock as i,makeGetTransactionStatus as a,makeParam as c,makeProposer as s,makePayer as f,makePing as d,makeScript as l,put as p,makeTransaction as m,isTransaction as y,isScript as v,get as h}from"@onflow/interaction";export{isBad,isOk,pipe,why}from"@onflow/interaction";export{send}from"@onflow/send";export{decode,decodeResponse}from"@onflow/decode";import{t7l as g}from"@qvvg/templar";import{encodeTransactionPayload as I,encodeTransactionEnvelope as k}from"@onflow/encode";function b(r){return void 0===r&&(r=[]),e(n(),r)}var w=e;function P(){return(P=Object.assign||function(e){for(var n=1;n<arguments.length;n++){var r=arguments[n];for(var t in r)Object.prototype.hasOwnProperty.call(r,t)&&(e[t]=r[t])}return e}).apply(this,arguments)}function j(n){return void 0===n&&(n=[]),e(n.map(function(e){return r(P({},"function"==typeof e?{resolve:e}:e,{role:{authorizer:!0}}))}))}function z(e,n,r){return{addr:e,signingFunction:n,keyId:r}}function N(n){return e([t,function(e){return e.accountAddr=n,o(e)}])}function S(n,r,t){return e([u,function(e){return e.events.eventType=n,o(e)},function(e){return e.events.start=r,o(e)},function(e){return e.events.end=t,o(e)}])}function q(n){return void 0===n&&(n=!1),e([i,function(e){return e.latestBlock.isSealed=n,o(e)}])}function x(n){return e([a,function(e){return e.transactionId=n,o(e)}])}function B(n){return e([function(e){return e.message.computeLimit=n,o(e)}])}function O(n){return void 0===n&&(n=[]),e(n.map(c))}var F={asParam:function(e){return e},asInjection:function(e){return e}};function A(e,n,r){return void 0===n&&(n=F),void 0===r&&(r=null),{key:r,value:e,xform:n}}var L=function(){try{for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];if(E(n[0]))return Promise.resolve(s({resolve:n[0],role:{proposer:!0}}));var t=n[0],o=n[1],u=n[2];return Promise.resolve(s({addr:t,keyId:o,sequenceNum:u,role:{proposer:!0}}))}catch(e){return Promise.reject(e)}},E=function(e){return"function"==typeof e};function T(e){return f(P({},"function"==typeof e?{resolve:e}:e,{role:{payer:!0}}))}function K(){return e([d])}function R(n){return e([function(e){return e.message.refBlock=n,o(e)}])}function V(){return e([l,p("ix.cadence",g.apply(void 0,arguments))])}var C=[];function D(){return e([m,p("ix.cadence",g.apply(void 0,arguments)),function(e){return e.message.computeLimit=e.message.computeLimit||10,e.message.refBlock=e.message.refBlock||null,e.authorizations=e.authorizations||C,o(e)}])}const G=function(){function e(){}return e.prototype.then=function(n,r){const t=new e,o=this.s;if(o){const e=1&o?n:r;if(e){try{H(t,1,e(this.v))}catch(e){H(t,2,e)}return t}return this}return this.o=function(e){try{const o=e.v;1&e.s?H(t,1,n?n(o):o):r?H(t,1,r(o)):H(t,2,o)}catch(e){H(t,2,e)}},t},e}();function H(e,n,r){if(!e.s){if(r instanceof G){if(!r.s)return void(r.o=H.bind(null,e,n));1&n&&(n=r.s),r=r.v}if(r&&r.then)return void r.then(H.bind(null,e,n),H.bind(null,e,2));e.s=n,e.v=r;const t=e.o;t&&t(e)}}function J(e){return e instanceof G&&1&e.s}const M="undefined"!=typeof Symbol?Symbol.iterator||(Symbol.iterator=Symbol("Symbol.iterator")):"@@iterator";"undefined"!=typeof Symbol&&(Symbol.asyncIterator||(Symbol.asyncIterator=Symbol("Symbol.asyncIterator")));var Q=function(e){return"function"==typeof e},U=function(e){return"number"==typeof e},W=function(e){return"string"==typeof e},X=function(e,n){if(!e){var r,t=new Error("INVARIANT "+n);t.stack=t.stack.split("\n").filter(function(e){return!/at invariant/.test(e)}).join("\n");for(var o=arguments.length,u=new Array(o>2?o-2:0),i=2;i<o;i++)u[i-2]=arguments[i];throw(r=console).error.apply(r,["\n\n---\n\n",t,"\n\n"].concat(u,["\n\n---\n\n"])),t}},Y=function(e){return!(e.role.proposer&&!(W(e.addr)&&U(e.keyId)&&U(e.sequenceNum)&&Q(e.signingFunction))||e.role.payer&&!(W(e.addr)&&U(e.keyId)&&Q(e.signingFunction))||e.role.authorizer&&!(W(e.addr)&&U(e.keyId)&&Q(e.signingFunction)))},Z=function(e){return void 0===e&&(e=[]),e.filter(Boolean)[0]||null},$=function(e){return void 0===e&&(e=[]),e.find(function(e){return e.role.proposer})||{}},_=e([function(e){try{var n=function(){return o(e)};if(!y(e))return Promise.resolve(o(e));var r=function(e,n,r){if("function"==typeof e[M]){var t,o,u,i=e[M]();if(function e(r){try{for(;!(t=i.next()).done;)if((r=n(t.value))&&r.then){if(!J(r))return void r.then(e,u||(u=H.bind(null,o=new G,2)));r=r.v}o?H(o,1,r):o=r}catch(e){H(o||(o=new G),2,e)}}(),i.return){var a=function(e){try{t.done||i.return()}catch(e){}return e};if(o&&o.then)return o.then(a,function(e){throw a(e)});a()}return o}if(!("length"in e))throw new TypeError("Object is not iterable");for(var c=[],s=0;s<e.length;s++)c.push(e[s]);return function(e,n,r){var t,o,u=-1;return function r(i){try{for(;++u<e.length;)if((i=n(u))&&i.then){if(!J(i))return void i.then(r,o||(o=H.bind(null,t=new G,2)));i=i.v}t?H(t,1,i):t=i}catch(e){H(t||(t=new G),2,e)}}(),t}(c,function(e){return n(c[e])})}(Object.entries(e.accounts),function(n){var r=n[0],t=n[1];function o(){X(Y(e.accounts[r]),"Account unable to fulfill role",e.accounts[r])}var u=function(){if(Q(t.resolve))return Promise.resolve(t.resolve(t)).then(function(n){e.accounts[r]=n})}();return u&&u.then?u.then(o):o()});return Promise.resolve(r&&r.then?r.then(n):n())}catch(e){return Promise.reject(e)}},function(e){try{if(!y(e))return Promise.resolve(o(e));for(var n=function(){var n,o,u,i=t[r],a=i.addr+"|"+i.keyId;e.accounts[a]=null!=e.accounts[a]?(n=e.accounts[a],o=P({tempId:a},i),{kind:Z([n.kind,o.kind]),tempId:Z([n.tempId,o.tempId]),addr:Z([n.addr,o.addr]),keyId:(u=[n.keyId,o.keyId],void 0===u&&(u=[]),"number"==typeof u.filter(U)[0]?u.filter(U)[0]:null),sequenceNum:"number"==typeof $([n,o]).sequenceNum?$([n,o]).sequenceNum:n.sequenceNum,signature:Z([n.signature,o.signature]),signingFunction:Z([n.signingFunction,o.signingFunction]),resolve:Z([n.resolve,o.resolve]),role:{proposer:n.role.proposer||o.role.proposer,authorizer:n.role.authorizer||o.role.authorizer,payer:n.role.payer||o.role.payer,param:n.role.param||o.role.param}}):P({tempId:a},i),e.proposer===i.tempId&&(e.proposer=a),e.payer===i.tempId&&(e.payer=a),e.authorizations=e.authorizations.map(function(e){return e===i.tempId?a:e}),delete e.accounts[i.tempId]},r=0,t=Object.values(e.accounts);r<t.length;r++)n();for(var u=0,i=Object.values(e.accounts);u<i.length;u++){var a=i[u];X(Y(a),"Account unable to fulfill roles",a)}return Promise.resolve(o(e))}catch(e){return Promise.reject(e)}}]),ee=function(e){if(!y(e)&&!v(e))return o(e);var n=h(e,"ix.cadence");if("string"==typeof n)return e.message.cadence=n,o(e);if("function"==typeof n){var r=Object.fromEntries(Object.values(e.params).filter(function(e){return null!=e.key}).map(function(e){return[e.key,e.xform.asInjection(e.value)]}));return e.message.cadence=n(r),o(e)}throw new Error("Invalid Cadence Value")},ne=function(e){try{if(!y(e))return Promise.resolve(o(e));var n=e.authorizations.map(function(n){return e.accounts[n]}),r=e.accounts[e.payer],t=e.accounts[e.proposer],u=I({script:e.message.cadence,refBlock:e.message.refBlock||null,gasLimit:e.message.computeLimit,proposalKey:{address:t.addr,keyId:t.keyId,sequenceNum:t.sequenceNum},payer:r.addr,authorizers:n.map(function(e){return e.addr})}),i=n.map(function(n){try{return n.addr===r.addr?(e.accounts[n.tempId]=P({},e.accounts[n.tempId],{signature:null}),Promise.resolve()):Promise.resolve(n.signingFunction({message:u,addr:n.addr,keyId:n.keyId,roles:{proposer:t.addr===n.addr,authorizer:!0,payer:r.addr===n.addr},interaction:e})).then(function(r){e.accounts[n.tempId]=P({},e.accounts[n.tempId],{signature:r.signature})})}catch(e){return Promise.reject(e)}});return Promise.resolve(Promise.all(i)).then(function(){n=e.authorizations.map(function(n){return e.accounts[n]});var u=k({script:e.message.cadence,refBlock:e.message.refBlock||null,gasLimit:e.message.computeLimit,proposalKey:{address:t.addr,keyId:t.keyId,sequenceNum:t.sequenceNum},payer:r.addr,authorizers:n.map(function(e){return e.addr}),payloadSigs:n.map(function(e){return null===e.signature?null:{address:e.addr,keyId:e.keyId,sig:e.signature}}).filter(function(e){return null!==e})});return Promise.resolve(r.signingFunction({message:u,addr:r.addr,keyId:r.keyId,roles:{proposer:t.addr===r.addr,authorizer:!1,payer:!0},interaction:e})).then(function(n){return e.accounts[e.payer]=P({},e.accounts[e.payer],{signature:n.signature}),o(e)})})}catch(e){return Promise.reject(e)}};export{z as authorization,j as authorizations,b as build,N as getAccount,S as getEvents,q as getLatestBlock,x as getTransactionStatus,B as limit,A as param,O as params,T as payer,K as ping,L as proposer,R as ref,w as resolve,_ as resolveAccounts,ee as resolveParams,ne as resolveSignatures,V as script,D as transaction};
import{pipe as e,interaction as n,makeAuthorizer as r,makeGetAccount as t,Ok as o,makeGetEvents as u,makeGetLatestBlock as i,makeGetTransactionStatus as c,makeParam as a,makeProposer as s,makePayer as f,makePing as l,makeScript as d,put as p,makeTransaction as m,isTransaction as v,isScript as y,get as h}from"@onflow/interaction";export{isBad,isOk,pipe,why}from"@onflow/interaction";export{send}from"@onflow/send";export{decode,decodeResponse}from"@onflow/decode";import{t7l as g}from"@qvvg/templar";import{encodeTransactionPayload as I,encodeTransactionEnvelope as k}from"@onflow/encode";function P(r){return void 0===r&&(r=[]),e(n(),r)}var b=e;function w(){return(w=Object.assign||function(e){for(var n=1;n<arguments.length;n++){var r=arguments[n];for(var t in r)Object.prototype.hasOwnProperty.call(r,t)&&(e[t]=r[t])}return e}).apply(this,arguments)}function j(n){return void 0===n&&(n=[]),e(n.map(function(e){return r(w({},"function"==typeof e?{resolve:e}:e,{role:{authorizer:!0}}))}))}function z(e,n,r){return{addr:e,signingFunction:n,keyId:r}}function N(n){return e([t,function(e){return e.accountAddr=n,o(e)}])}function S(n,r,t){return e([u,function(e){return e.events.eventType=n,o(e)},function(e){return e.events.start=r,o(e)},function(e){return e.events.end=t,o(e)}])}function q(n){return void 0===n&&(n=!1),e([i,function(e){return e.latestBlock.isSealed=n,o(e)}])}function x(n){return e([c,function(e){return e.transactionId=n,o(e)}])}function B(n){return e([function(e){return e.message.computeLimit=n,o(e)}])}function F(n){return void 0===n&&(n=[]),e(n.map(function(e){return a("function"==typeof e?{resolve:e}:e)}))}var O={asParam:function(e){return e},asInjection:function(e){return e}};function A(e,n,r){return void 0===n&&(n=O),void 0===r&&(r=null),{key:r,value:e,xform:n}}var L=function(){try{for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];if(E(n[0]))return Promise.resolve(s({resolve:n[0],role:{proposer:!0}}));var t=n[0],o=n[1],u=n[2],i=n[3];return Promise.resolve(s({addr:t,keyId:o,sequenceNum:u,signingFunction:i,role:{proposer:!0}}))}catch(e){return Promise.reject(e)}},E=function(e){return"function"==typeof e};function T(e){return f(w({},"function"==typeof e?{resolve:e}:e,{role:{payer:!0}}))}function K(){return e([l])}function R(n){return e([function(e){return e.message.refBlock=n,o(e)}])}function V(){return e([d,p("ix.cadence",g.apply(void 0,arguments))])}var C=[];function D(){return e([m,p("ix.cadence",g.apply(void 0,arguments)),function(e){return e.message.computeLimit=e.message.computeLimit||10,e.message.refBlock=e.message.refBlock||null,e.authorizations=e.authorizations||C,o(e)}])}const G=function(){function e(){}return e.prototype.then=function(n,r){const t=new e,o=this.s;if(o){const e=1&o?n:r;if(e){try{H(t,1,e(this.v))}catch(e){H(t,2,e)}return t}return this}return this.o=function(e){try{const o=e.v;1&e.s?H(t,1,n?n(o):o):r?H(t,1,r(o)):H(t,2,o)}catch(e){H(t,2,e)}},t},e}();function H(e,n,r){if(!e.s){if(r instanceof G){if(!r.s)return void(r.o=H.bind(null,e,n));1&n&&(n=r.s),r=r.v}if(r&&r.then)return void r.then(H.bind(null,e,n),H.bind(null,e,2));e.s=n,e.v=r;const t=e.o;t&&t(e)}}function J(e){return e instanceof G&&1&e.s}const M="undefined"!=typeof Symbol?Symbol.iterator||(Symbol.iterator=Symbol("Symbol.iterator")):"@@iterator";"undefined"!=typeof Symbol&&(Symbol.asyncIterator||(Symbol.asyncIterator=Symbol("Symbol.asyncIterator")));var Q=function(e){return"function"==typeof e},U=function(e){return"number"==typeof e},W=function(e){return"string"==typeof e},X=function(e,n){if(!e){var r,t=new Error("INVARIANT "+n);t.stack=t.stack.split("\n").filter(function(e){return!/at invariant/.test(e)}).join("\n");for(var o=arguments.length,u=new Array(o>2?o-2:0),i=2;i<o;i++)u[i-2]=arguments[i];throw(r=console).error.apply(r,["\n\n---\n\n",t,"\n\n"].concat(u,["\n\n---\n\n"])),t}},Y=function(e){return!(e.role.proposer&&!(W(e.addr)&&U(e.keyId)&&U(e.sequenceNum)&&Q(e.signingFunction))||e.role.payer&&!(W(e.addr)&&U(e.keyId)&&Q(e.signingFunction))||e.role.authorizer&&!(W(e.addr)&&U(e.keyId)&&Q(e.signingFunction)))},Z=function(e){return void 0===e&&(e=[]),e.filter(Boolean)[0]||null},$=function(e){return void 0===e&&(e=[]),e.find(function(e){return e.role.proposer})||{}},_=e([function(e){try{var n=function(){return o(e)};if(!v(e))return Promise.resolve(o(e));var r=function(e,n,r){if("function"==typeof e[M]){var t,o,u,i=e[M]();if(function e(r){try{for(;!(t=i.next()).done;)if((r=n(t.value))&&r.then){if(!J(r))return void r.then(e,u||(u=H.bind(null,o=new G,2)));r=r.v}o?H(o,1,r):o=r}catch(e){H(o||(o=new G),2,e)}}(),i.return){var c=function(e){try{t.done||i.return()}catch(e){}return e};if(o&&o.then)return o.then(c,function(e){throw c(e)});c()}return o}if(!("length"in e))throw new TypeError("Object is not iterable");for(var a=[],s=0;s<e.length;s++)a.push(e[s]);return function(e,n,r){var t,o,u=-1;return function r(i){try{for(;++u<e.length;)if((i=n(u))&&i.then){if(!J(i))return void i.then(r,o||(o=H.bind(null,t=new G,2)));i=i.v}t?H(t,1,i):t=i}catch(e){H(t||(t=new G),2,e)}}(),t}(a,function(e){return n(a[e])})}(Object.entries(e.accounts),function(n){var r=n[0],t=n[1];function o(){X(Y(e.accounts[r]),"Account unable to fulfill role",e.accounts[r])}var u=function(){if(Q(t.resolve))return Promise.resolve(t.resolve(t)).then(function(n){e.accounts[r]=n})}();return u&&u.then?u.then(o):o()});return Promise.resolve(r&&r.then?r.then(n):n())}catch(e){return Promise.reject(e)}},function(e){try{if(!v(e))return Promise.resolve(o(e));for(var n=function(){var n,o,u,i=t[r],c=i.addr+"|"+i.keyId;e.accounts[c]=null!=e.accounts[c]?(n=e.accounts[c],o=w({tempId:c},i),{kind:Z([n.kind,o.kind]),tempId:Z([n.tempId,o.tempId]),addr:Z([n.addr,o.addr]),keyId:(u=[n.keyId,o.keyId],void 0===u&&(u=[]),"number"==typeof u.filter(U)[0]?u.filter(U)[0]:null),sequenceNum:"number"==typeof $([n,o]).sequenceNum?$([n,o]).sequenceNum:n.sequenceNum,signature:Z([n.signature,o.signature]),signingFunction:Z([n.signingFunction,o.signingFunction]),resolve:Z([n.resolve,o.resolve]),role:{proposer:n.role.proposer||o.role.proposer,authorizer:n.role.authorizer||o.role.authorizer,payer:n.role.payer||o.role.payer,param:n.role.param||o.role.param}}):w({tempId:c},i),e.proposer===i.tempId&&(e.proposer=c),e.payer===i.tempId&&(e.payer=c),e.authorizations=e.authorizations.map(function(e){return e===i.tempId?c:e}),delete e.accounts[i.tempId]},r=0,t=Object.values(e.accounts);r<t.length;r++)n();for(var u=0,i=Object.values(e.accounts);u<i.length;u++){var c=i[u];X(Y(c),"Account unable to fulfill roles",c)}return Promise.resolve(o(e))}catch(e){return Promise.reject(e)}}]),ee=function(e){try{var n=function(e){if(r)return e;throw new Error("Invalid Cadence Value")},r=!1;if(!v(e)&&!y(e))return Promise.resolve(o(e));var t=h(e,"ix.cadence");if("string"==typeof t)return e.message.cadence=t,Promise.resolve(o(e));var u=function(){if("function"==typeof t){var n=Object.values(e.params);return Promise.resolve(Promise.all(n.map(function(e){try{var n=!1,r=function(){if("function"==typeof e.resolve)return n=!0,Promise.resolve(e.resolve()).then(function(n){return w({},n,{tempId:e.tempId})})}();return Promise.resolve(r&&r.then?r.then(function(r){return n?r:e}):n?r:e)}catch(e){return Promise.reject(e)}}))).then(function(n){return n.forEach(function(n){e.params[n.tempId]=n}),n=n.filter(function(e){return null!=e.key}).map(function(e){return[e.key,e.xform.asInjection(e.value)]}),e.message.cadence=t(n),r=!0,o(e)})}}();return Promise.resolve(u&&u.then?u.then(n):n(u))}catch(e){return Promise.reject(e)}},ne=function(e){try{if(!v(e))return Promise.resolve(o(e));var n=e.authorizations.map(function(n){return e.accounts[n]}),r=e.accounts[e.payer],t=e.accounts[e.proposer],u=I({script:e.message.cadence,refBlock:e.message.refBlock||null,gasLimit:e.message.computeLimit,proposalKey:{address:t.addr,keyId:t.keyId,sequenceNum:t.sequenceNum},payer:r.addr,authorizers:n.map(function(e){return e.addr})}),i=n.map(function(n){try{return n.addr===r.addr?(e.accounts[n.tempId]=w({},e.accounts[n.tempId],{signature:null}),Promise.resolve()):Promise.resolve(n.signingFunction({message:u,addr:n.addr,keyId:n.keyId,roles:{proposer:t.addr===n.addr,authorizer:!0,payer:r.addr===n.addr},interaction:e})).then(function(r){e.accounts[n.tempId]=w({},e.accounts[n.tempId],{signature:r.signature})})}catch(e){return Promise.reject(e)}});return Promise.resolve(Promise.all(i)).then(function(){n=e.authorizations.map(function(n){return e.accounts[n]});var u=k({script:e.message.cadence,refBlock:e.message.refBlock||null,gasLimit:e.message.computeLimit,proposalKey:{address:t.addr,keyId:t.keyId,sequenceNum:t.sequenceNum},payer:r.addr,authorizers:n.map(function(e){return e.addr}),payloadSigs:n.map(function(e){return null===e.signature?null:{address:e.addr,keyId:e.keyId,sig:e.signature}}).filter(function(e){return null!==e})});return Promise.resolve(r.signingFunction({message:u,addr:r.addr,keyId:r.keyId,roles:{proposer:t.addr===r.addr,authorizer:!1,payer:!0},interaction:e})).then(function(n){return e.accounts[e.payer]=w({},e.accounts[e.payer],{signature:n.signature}),o(e)})})}catch(e){return Promise.reject(e)}};export{z as authorization,j as authorizations,P as build,N as getAccount,S as getEvents,q as getLatestBlock,x as getTransactionStatus,B as limit,A as param,F as params,T as payer,K as ping,L as proposer,R as ref,b as resolve,_ as resolveAccounts,ee as resolveParams,ne as resolveSignatures,V as script,D as transaction};
//# sourceMappingURL=sdk.module.js.map

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

!function(e,n){"object"==typeof exports&&"undefined"!=typeof module?n(exports,require("@onflow/interaction"),require("@onflow/send"),require("@onflow/decode"),require("@qvvg/templar"),require("@onflow/encode")):"function"==typeof define&&define.amd?define(["exports","@onflow/interaction","@onflow/send","@onflow/decode","@qvvg/templar","@onflow/encode"],n):n((e=e||self).sdk={},e.interaction,e.send,e.decode,e.templar,e.encode)}(this,function(e,n,r,t,o,i){var u=n.pipe;function a(){return(a=Object.assign||function(e){for(var n=1;n<arguments.length;n++){var r=arguments[n];for(var t in r)Object.prototype.hasOwnProperty.call(r,t)&&(e[t]=r[t])}return e}).apply(this,arguments)}var c={asParam:function(e){return e},asInjection:function(e){return e}},s=function(e){return"function"==typeof e},f=[];const d=function(){function e(){}return e.prototype.then=function(n,r){const t=new e,o=this.s;if(o){const e=1&o?n:r;if(e){try{l(t,1,e(this.v))}catch(e){l(t,2,e)}return t}return this}return this.o=function(e){try{const o=e.v;1&e.s?l(t,1,n?n(o):o):r?l(t,1,r(o)):l(t,2,o)}catch(e){l(t,2,e)}},t},e}();function l(e,n,r){if(!e.s){if(r instanceof d){if(!r.s)return void(r.o=l.bind(null,e,n));1&n&&(n=r.s),r=r.v}if(r&&r.then)return void r.then(l.bind(null,e,n),l.bind(null,e,2));e.s=n,e.v=r;const t=e.o;t&&t(e)}}function p(e){return e instanceof d&&1&e.s}const m="undefined"!=typeof Symbol?Symbol.iterator||(Symbol.iterator=Symbol("Symbol.iterator")):"@@iterator";"undefined"!=typeof Symbol&&(Symbol.asyncIterator||(Symbol.asyncIterator=Symbol("Symbol.asyncIterator")));var y=function(e){return"function"==typeof e},v=function(e){return"number"==typeof e},g=function(e){return"string"==typeof e},k=function(e,n){if(!e){var r,t=new Error("INVARIANT "+n);t.stack=t.stack.split("\n").filter(function(e){return!/at invariant/.test(e)}).join("\n");for(var o=arguments.length,i=new Array(o>2?o-2:0),u=2;u<o;u++)i[u-2]=arguments[u];throw(r=console).error.apply(r,["\n\n---\n\n",t,"\n\n"].concat(i,["\n\n---\n\n"])),t}},h=function(e){return!(e.role.proposer&&!(g(e.addr)&&v(e.keyId)&&v(e.sequenceNum)&&y(e.signingFunction))||e.role.payer&&!(g(e.addr)&&v(e.keyId)&&y(e.signingFunction))||e.role.authorizer&&!(g(e.addr)&&v(e.keyId)&&y(e.signingFunction)))},b=function(e){return void 0===e&&(e=[]),e.filter(Boolean)[0]||null},I=function(e){return void 0===e&&(e=[]),e.find(function(e){return e.role.proposer})||{}},O=n.pipe([function(e){try{var r=function(){return n.Ok(e)};if(!n.isTransaction(e))return Promise.resolve(n.Ok(e));var t=function(e,n,r){if("function"==typeof e[m]){var t,o,i,u=e[m]();if(function e(r){try{for(;!(t=u.next()).done;)if((r=n(t.value))&&r.then){if(!p(r))return void r.then(e,i||(i=l.bind(null,o=new d,2)));r=r.v}o?l(o,1,r):o=r}catch(e){l(o||(o=new d),2,e)}}(),u.return){var a=function(e){try{t.done||u.return()}catch(e){}return e};if(o&&o.then)return o.then(a,function(e){throw a(e)});a()}return o}if(!("length"in e))throw new TypeError("Object is not iterable");for(var c=[],s=0;s<e.length;s++)c.push(e[s]);return function(e,n,r){var t,o,i=-1;return function r(u){try{for(;++i<e.length;)if((u=n(i))&&u.then){if(!p(u))return void u.then(r,o||(o=l.bind(null,t=new d,2)));u=u.v}t?l(t,1,u):t=u}catch(e){l(t||(t=new d),2,e)}}(),t}(c,function(e){return n(c[e])})}(Object.entries(e.accounts),function(n){var r=n[0],t=n[1];function o(){k(h(e.accounts[r]),"Account unable to fulfill role",e.accounts[r])}var i=function(){if(y(t.resolve))return Promise.resolve(t.resolve(t)).then(function(n){e.accounts[r]=n})}();return i&&i.then?i.then(o):o()});return Promise.resolve(t&&t.then?t.then(r):r())}catch(e){return Promise.reject(e)}},function(e){try{if(!n.isTransaction(e))return Promise.resolve(n.Ok(e));for(var r=function(){var n,r,i,u=o[t],c=u.addr+"|"+u.keyId;e.accounts[c]=null!=e.accounts[c]?(n=e.accounts[c],r=a({tempId:c},u),{kind:b([n.kind,r.kind]),tempId:b([n.tempId,r.tempId]),addr:b([n.addr,r.addr]),keyId:(i=[n.keyId,r.keyId],void 0===i&&(i=[]),"number"==typeof i.filter(v)[0]?i.filter(v)[0]:null),sequenceNum:"number"==typeof I([n,r]).sequenceNum?I([n,r]).sequenceNum:n.sequenceNum,signature:b([n.signature,r.signature]),signingFunction:b([n.signingFunction,r.signingFunction]),resolve:b([n.resolve,r.resolve]),role:{proposer:n.role.proposer||r.role.proposer,authorizer:n.role.authorizer||r.role.authorizer,payer:n.role.payer||r.role.payer,param:n.role.param||r.role.param}}):a({tempId:c},u),e.proposer===u.tempId&&(e.proposer=c),e.payer===u.tempId&&(e.payer=c),e.authorizations=e.authorizations.map(function(e){return e===u.tempId?c:e}),delete e.accounts[u.tempId]},t=0,o=Object.values(e.accounts);t<o.length;t++)r();for(var i=0,u=Object.values(e.accounts);i<u.length;i++){var c=u[i];k(h(c),"Account unable to fulfill roles",c)}return Promise.resolve(n.Ok(e))}catch(e){return Promise.reject(e)}}]);Object.defineProperty(e,"isBad",{enumerable:!0,get:function(){return n.isBad}}),Object.defineProperty(e,"isOk",{enumerable:!0,get:function(){return n.isOk}}),Object.defineProperty(e,"pipe",{enumerable:!0,get:function(){return n.pipe}}),Object.defineProperty(e,"why",{enumerable:!0,get:function(){return n.why}}),Object.defineProperty(e,"send",{enumerable:!0,get:function(){return r.send}}),Object.defineProperty(e,"decode",{enumerable:!0,get:function(){return t.decode}}),Object.defineProperty(e,"decodeResponse",{enumerable:!0,get:function(){return t.decodeResponse}}),e.authorization=function(e,n,r){return{addr:e,signingFunction:n,keyId:r}},e.authorizations=function(e){return void 0===e&&(e=[]),n.pipe(e.map(function(e){return n.makeAuthorizer(a({},"function"==typeof e?{resolve:e}:e,{role:{authorizer:!0}}))}))},e.build=function(e){return void 0===e&&(e=[]),n.pipe(n.interaction(),e)},e.getAccount=function(e){return n.pipe([n.makeGetAccount,function(r){return r.accountAddr=e,n.Ok(r)}])},e.getEvents=function(e,r,t){return n.pipe([n.makeGetEvents,function(r){return r.events.eventType=e,n.Ok(r)},function(e){return e.events.start=r,n.Ok(e)},function(e){return e.events.end=t,n.Ok(e)}])},e.getLatestBlock=function(e){return void 0===e&&(e=!1),n.pipe([n.makeGetLatestBlock,function(r){return r.latestBlock.isSealed=e,n.Ok(r)}])},e.getTransactionStatus=function(e){return n.pipe([n.makeGetTransactionStatus,function(r){return r.transactionId=e,n.Ok(r)}])},e.limit=function(e){return n.pipe([function(r){return r.message.computeLimit=e,n.Ok(r)}])},e.param=function(e,n,r){return void 0===n&&(n=c),void 0===r&&(r=null),{key:r,value:e,xform:n}},e.params=function(e){return void 0===e&&(e=[]),n.pipe(e.map(n.makeParam))},e.payer=function(e){return n.makePayer(a({},"function"==typeof e?{resolve:e}:e,{role:{payer:!0}}))},e.ping=function(){return n.pipe([n.makePing])},e.proposer=function(){try{for(var e=arguments.length,r=new Array(e),t=0;t<e;t++)r[t]=arguments[t];if(s(r[0]))return Promise.resolve(n.makeProposer({resolve:r[0],role:{proposer:!0}}));var o=r[0],i=r[1],u=r[2];return Promise.resolve(n.makeProposer({addr:o,keyId:i,sequenceNum:u,role:{proposer:!0}}))}catch(e){return Promise.reject(e)}},e.ref=function(e){return n.pipe([function(r){return r.message.refBlock=e,n.Ok(r)}])},e.resolve=u,e.resolveAccounts=O,e.resolveParams=function(e){if(!n.isTransaction(e)&&!n.isScript(e))return n.Ok(e);var r=n.get(e,"ix.cadence");if("string"==typeof r)return e.message.cadence=r,n.Ok(e);if("function"==typeof r){var t=Object.fromEntries(Object.values(e.params).filter(function(e){return null!=e.key}).map(function(e){return[e.key,e.xform.asInjection(e.value)]}));return e.message.cadence=r(t),n.Ok(e)}throw new Error("Invalid Cadence Value")},e.resolveSignatures=function(e){try{if(!n.isTransaction(e))return Promise.resolve(n.Ok(e));var r=e.authorizations.map(function(n){return e.accounts[n]}),t=e.accounts[e.payer],o=e.accounts[e.proposer],u=i.encodeTransactionPayload({script:e.message.cadence,refBlock:e.message.refBlock||null,gasLimit:e.message.computeLimit,proposalKey:{address:o.addr,keyId:o.keyId,sequenceNum:o.sequenceNum},payer:t.addr,authorizers:r.map(function(e){return e.addr})}),c=r.map(function(n){try{return n.addr===t.addr?(e.accounts[n.tempId]=a({},e.accounts[n.tempId],{signature:null}),Promise.resolve()):Promise.resolve(n.signingFunction({message:u,addr:n.addr,keyId:n.keyId,roles:{proposer:o.addr===n.addr,authorizer:!0,payer:t.addr===n.addr},interaction:e})).then(function(r){e.accounts[n.tempId]=a({},e.accounts[n.tempId],{signature:r.signature})})}catch(e){return Promise.reject(e)}});return Promise.resolve(Promise.all(c)).then(function(){r=e.authorizations.map(function(n){return e.accounts[n]});var u=i.encodeTransactionEnvelope({script:e.message.cadence,refBlock:e.message.refBlock||null,gasLimit:e.message.computeLimit,proposalKey:{address:o.addr,keyId:o.keyId,sequenceNum:o.sequenceNum},payer:t.addr,authorizers:r.map(function(e){return e.addr}),payloadSigs:r.map(function(e){return null===e.signature?null:{address:e.addr,keyId:e.keyId,sig:e.signature}}).filter(function(e){return null!==e})});return Promise.resolve(t.signingFunction({message:u,addr:t.addr,keyId:t.keyId,roles:{proposer:o.addr===t.addr,authorizer:!1,payer:!0},interaction:e})).then(function(r){return e.accounts[e.payer]=a({},e.accounts[e.payer],{signature:r.signature}),n.Ok(e)})})}catch(e){return Promise.reject(e)}},e.script=function(){return n.pipe([n.makeScript,n.put("ix.cadence",o.t7l.apply(void 0,arguments))])},e.transaction=function(){return n.pipe([n.makeTransaction,n.put("ix.cadence",o.t7l.apply(void 0,arguments)),function(e){return e.message.computeLimit=e.message.computeLimit||10,e.message.refBlock=e.message.refBlock||null,e.authorizations=e.authorizations||f,n.Ok(e)}])}});
!function(e,n){"object"==typeof exports&&"undefined"!=typeof module?n(exports,require("@onflow/interaction"),require("@onflow/send"),require("@onflow/decode"),require("@qvvg/templar"),require("@onflow/encode")):"function"==typeof define&&define.amd?define(["exports","@onflow/interaction","@onflow/send","@onflow/decode","@qvvg/templar","@onflow/encode"],n):n((e=e||self).sdk={},e.interaction,e.send,e.decode,e.templar,e.encode)}(this,function(e,n,r,t,o,i){var u=n.pipe;function a(){return(a=Object.assign||function(e){for(var n=1;n<arguments.length;n++){var r=arguments[n];for(var t in r)Object.prototype.hasOwnProperty.call(r,t)&&(e[t]=r[t])}return e}).apply(this,arguments)}var c={asParam:function(e){return e},asInjection:function(e){return e}},s=function(e){return"function"==typeof e},f=[];const d=function(){function e(){}return e.prototype.then=function(n,r){const t=new e,o=this.s;if(o){const e=1&o?n:r;if(e){try{l(t,1,e(this.v))}catch(e){l(t,2,e)}return t}return this}return this.o=function(e){try{const o=e.v;1&e.s?l(t,1,n?n(o):o):r?l(t,1,r(o)):l(t,2,o)}catch(e){l(t,2,e)}},t},e}();function l(e,n,r){if(!e.s){if(r instanceof d){if(!r.s)return void(r.o=l.bind(null,e,n));1&n&&(n=r.s),r=r.v}if(r&&r.then)return void r.then(l.bind(null,e,n),l.bind(null,e,2));e.s=n,e.v=r;const t=e.o;t&&t(e)}}function p(e){return e instanceof d&&1&e.s}const m="undefined"!=typeof Symbol?Symbol.iterator||(Symbol.iterator=Symbol("Symbol.iterator")):"@@iterator";"undefined"!=typeof Symbol&&(Symbol.asyncIterator||(Symbol.asyncIterator=Symbol("Symbol.asyncIterator")));var y=function(e){return"function"==typeof e},v=function(e){return"number"==typeof e},g=function(e){return"string"==typeof e},h=function(e,n){if(!e){var r,t=new Error("INVARIANT "+n);t.stack=t.stack.split("\n").filter(function(e){return!/at invariant/.test(e)}).join("\n");for(var o=arguments.length,i=new Array(o>2?o-2:0),u=2;u<o;u++)i[u-2]=arguments[u];throw(r=console).error.apply(r,["\n\n---\n\n",t,"\n\n"].concat(i,["\n\n---\n\n"])),t}},k=function(e){return!(e.role.proposer&&!(g(e.addr)&&v(e.keyId)&&v(e.sequenceNum)&&y(e.signingFunction))||e.role.payer&&!(g(e.addr)&&v(e.keyId)&&y(e.signingFunction))||e.role.authorizer&&!(g(e.addr)&&v(e.keyId)&&y(e.signingFunction)))},b=function(e){return void 0===e&&(e=[]),e.filter(Boolean)[0]||null},I=function(e){return void 0===e&&(e=[]),e.find(function(e){return e.role.proposer})||{}},P=n.pipe([function(e){try{var r=function(){return n.Ok(e)};if(!n.isTransaction(e))return Promise.resolve(n.Ok(e));var t=function(e,n,r){if("function"==typeof e[m]){var t,o,i,u=e[m]();if(function e(r){try{for(;!(t=u.next()).done;)if((r=n(t.value))&&r.then){if(!p(r))return void r.then(e,i||(i=l.bind(null,o=new d,2)));r=r.v}o?l(o,1,r):o=r}catch(e){l(o||(o=new d),2,e)}}(),u.return){var a=function(e){try{t.done||u.return()}catch(e){}return e};if(o&&o.then)return o.then(a,function(e){throw a(e)});a()}return o}if(!("length"in e))throw new TypeError("Object is not iterable");for(var c=[],s=0;s<e.length;s++)c.push(e[s]);return function(e,n,r){var t,o,i=-1;return function r(u){try{for(;++i<e.length;)if((u=n(i))&&u.then){if(!p(u))return void u.then(r,o||(o=l.bind(null,t=new d,2)));u=u.v}t?l(t,1,u):t=u}catch(e){l(t||(t=new d),2,e)}}(),t}(c,function(e){return n(c[e])})}(Object.entries(e.accounts),function(n){var r=n[0],t=n[1];function o(){h(k(e.accounts[r]),"Account unable to fulfill role",e.accounts[r])}var i=function(){if(y(t.resolve))return Promise.resolve(t.resolve(t)).then(function(n){e.accounts[r]=n})}();return i&&i.then?i.then(o):o()});return Promise.resolve(t&&t.then?t.then(r):r())}catch(e){return Promise.reject(e)}},function(e){try{if(!n.isTransaction(e))return Promise.resolve(n.Ok(e));for(var r=function(){var n,r,i,u=o[t],c=u.addr+"|"+u.keyId;e.accounts[c]=null!=e.accounts[c]?(n=e.accounts[c],r=a({tempId:c},u),{kind:b([n.kind,r.kind]),tempId:b([n.tempId,r.tempId]),addr:b([n.addr,r.addr]),keyId:(i=[n.keyId,r.keyId],void 0===i&&(i=[]),"number"==typeof i.filter(v)[0]?i.filter(v)[0]:null),sequenceNum:"number"==typeof I([n,r]).sequenceNum?I([n,r]).sequenceNum:n.sequenceNum,signature:b([n.signature,r.signature]),signingFunction:b([n.signingFunction,r.signingFunction]),resolve:b([n.resolve,r.resolve]),role:{proposer:n.role.proposer||r.role.proposer,authorizer:n.role.authorizer||r.role.authorizer,payer:n.role.payer||r.role.payer,param:n.role.param||r.role.param}}):a({tempId:c},u),e.proposer===u.tempId&&(e.proposer=c),e.payer===u.tempId&&(e.payer=c),e.authorizations=e.authorizations.map(function(e){return e===u.tempId?c:e}),delete e.accounts[u.tempId]},t=0,o=Object.values(e.accounts);t<o.length;t++)r();for(var i=0,u=Object.values(e.accounts);i<u.length;i++){var c=u[i];h(k(c),"Account unable to fulfill roles",c)}return Promise.resolve(n.Ok(e))}catch(e){return Promise.reject(e)}}]);Object.defineProperty(e,"isBad",{enumerable:!0,get:function(){return n.isBad}}),Object.defineProperty(e,"isOk",{enumerable:!0,get:function(){return n.isOk}}),Object.defineProperty(e,"pipe",{enumerable:!0,get:function(){return n.pipe}}),Object.defineProperty(e,"why",{enumerable:!0,get:function(){return n.why}}),Object.defineProperty(e,"send",{enumerable:!0,get:function(){return r.send}}),Object.defineProperty(e,"decode",{enumerable:!0,get:function(){return t.decode}}),Object.defineProperty(e,"decodeResponse",{enumerable:!0,get:function(){return t.decodeResponse}}),e.authorization=function(e,n,r){return{addr:e,signingFunction:n,keyId:r}},e.authorizations=function(e){return void 0===e&&(e=[]),n.pipe(e.map(function(e){return n.makeAuthorizer(a({},"function"==typeof e?{resolve:e}:e,{role:{authorizer:!0}}))}))},e.build=function(e){return void 0===e&&(e=[]),n.pipe(n.interaction(),e)},e.getAccount=function(e){return n.pipe([n.makeGetAccount,function(r){return r.accountAddr=e,n.Ok(r)}])},e.getEvents=function(e,r,t){return n.pipe([n.makeGetEvents,function(r){return r.events.eventType=e,n.Ok(r)},function(e){return e.events.start=r,n.Ok(e)},function(e){return e.events.end=t,n.Ok(e)}])},e.getLatestBlock=function(e){return void 0===e&&(e=!1),n.pipe([n.makeGetLatestBlock,function(r){return r.latestBlock.isSealed=e,n.Ok(r)}])},e.getTransactionStatus=function(e){return n.pipe([n.makeGetTransactionStatus,function(r){return r.transactionId=e,n.Ok(r)}])},e.limit=function(e){return n.pipe([function(r){return r.message.computeLimit=e,n.Ok(r)}])},e.param=function(e,n,r){return void 0===n&&(n=c),void 0===r&&(r=null),{key:r,value:e,xform:n}},e.params=function(e){return void 0===e&&(e=[]),n.pipe(e.map(function(e){return n.makeParam("function"==typeof e?{resolve:e}:e)}))},e.payer=function(e){return n.makePayer(a({},"function"==typeof e?{resolve:e}:e,{role:{payer:!0}}))},e.ping=function(){return n.pipe([n.makePing])},e.proposer=function(){try{for(var e=arguments.length,r=new Array(e),t=0;t<e;t++)r[t]=arguments[t];if(s(r[0]))return Promise.resolve(n.makeProposer({resolve:r[0],role:{proposer:!0}}));var o=r[0],i=r[1],u=r[2],a=r[3];return Promise.resolve(n.makeProposer({addr:o,keyId:i,sequenceNum:u,signingFunction:a,role:{proposer:!0}}))}catch(e){return Promise.reject(e)}},e.ref=function(e){return n.pipe([function(r){return r.message.refBlock=e,n.Ok(r)}])},e.resolve=u,e.resolveAccounts=P,e.resolveParams=function(e){try{var r=function(e){if(t)return e;throw new Error("Invalid Cadence Value")},t=!1;if(!n.isTransaction(e)&&!n.isScript(e))return Promise.resolve(n.Ok(e));var o=n.get(e,"ix.cadence");if("string"==typeof o)return e.message.cadence=o,Promise.resolve(n.Ok(e));var i=function(){if("function"==typeof o){var r=Object.values(e.params);return Promise.resolve(Promise.all(r.map(function(e){try{var n=!1,r=function(){if("function"==typeof e.resolve)return n=!0,Promise.resolve(e.resolve()).then(function(n){return a({},n,{tempId:e.tempId})})}();return Promise.resolve(r&&r.then?r.then(function(r){return n?r:e}):n?r:e)}catch(e){return Promise.reject(e)}}))).then(function(r){return r.forEach(function(n){e.params[n.tempId]=n}),r=r.filter(function(e){return null!=e.key}).map(function(e){return[e.key,e.xform.asInjection(e.value)]}),e.message.cadence=o(r),t=!0,n.Ok(e)})}}();return Promise.resolve(i&&i.then?i.then(r):r(i))}catch(e){return Promise.reject(e)}},e.resolveSignatures=function(e){try{if(!n.isTransaction(e))return Promise.resolve(n.Ok(e));var r=e.authorizations.map(function(n){return e.accounts[n]}),t=e.accounts[e.payer],o=e.accounts[e.proposer],u=i.encodeTransactionPayload({script:e.message.cadence,refBlock:e.message.refBlock||null,gasLimit:e.message.computeLimit,proposalKey:{address:o.addr,keyId:o.keyId,sequenceNum:o.sequenceNum},payer:t.addr,authorizers:r.map(function(e){return e.addr})}),c=r.map(function(n){try{return n.addr===t.addr?(e.accounts[n.tempId]=a({},e.accounts[n.tempId],{signature:null}),Promise.resolve()):Promise.resolve(n.signingFunction({message:u,addr:n.addr,keyId:n.keyId,roles:{proposer:o.addr===n.addr,authorizer:!0,payer:t.addr===n.addr},interaction:e})).then(function(r){e.accounts[n.tempId]=a({},e.accounts[n.tempId],{signature:r.signature})})}catch(e){return Promise.reject(e)}});return Promise.resolve(Promise.all(c)).then(function(){r=e.authorizations.map(function(n){return e.accounts[n]});var u=i.encodeTransactionEnvelope({script:e.message.cadence,refBlock:e.message.refBlock||null,gasLimit:e.message.computeLimit,proposalKey:{address:o.addr,keyId:o.keyId,sequenceNum:o.sequenceNum},payer:t.addr,authorizers:r.map(function(e){return e.addr}),payloadSigs:r.map(function(e){return null===e.signature?null:{address:e.addr,keyId:e.keyId,sig:e.signature}}).filter(function(e){return null!==e})});return Promise.resolve(t.signingFunction({message:u,addr:t.addr,keyId:t.keyId,roles:{proposer:o.addr===t.addr,authorizer:!1,payer:!0},interaction:e})).then(function(r){return e.accounts[e.payer]=a({},e.accounts[e.payer],{signature:r.signature}),n.Ok(e)})})}catch(e){return Promise.reject(e)}},e.script=function(){return n.pipe([n.makeScript,n.put("ix.cadence",o.t7l.apply(void 0,arguments))])},e.transaction=function(){return n.pipe([n.makeTransaction,n.put("ix.cadence",o.t7l.apply(void 0,arguments)),function(e){return e.message.computeLimit=e.message.computeLimit||10,e.message.refBlock=e.message.refBlock||null,e.authorizations=e.authorizations||f,n.Ok(e)}])}});
//# sourceMappingURL=sdk.umd.js.map
{
"name": "@onflow/sdk",
"version": "0.0.16",
"version": "0.0.17",
"description": "Flow SDK",

@@ -39,6 +39,6 @@ "license": "Apache-2.0",

"@onflow/encode": "0.0.2",
"@onflow/interaction": "0.0.6",
"@onflow/send": "0.0.9",
"@onflow/interaction": "0.0.7",
"@onflow/send": "0.0.10",
"@qvvg/templar": "0.0.0"
}
}
import {pipe, makeParam} from "@onflow/interaction"
const isFn = d => typeof d === "function"
export function params(px = []) {
return pipe(px.map(makeParam))
return pipe(
px.map(param => {
const p = isFn(param)
? { resolve: param }
: param
return makeParam(p)
}
))
}

@@ -6,0 +16,0 @@

@@ -14,3 +14,3 @@ import {pipe, makeProposer} from "@onflow/interaction"

} else {
const [addr, keyId, sequenceNum] = args
const [addr, keyId, sequenceNum, signingFunction] = args
return makeProposer(

@@ -21,2 +21,3 @@ {

sequenceNum,
signingFunction,
role: {proposer: true},

@@ -23,0 +24,0 @@ }

@@ -6,3 +6,3 @@ import {isTransaction, isScript, get, Ok} from "@onflow/interaction"

export const resolveParams = (ix) => {
export const resolveParams = async (ix) => {
if (!(isTransaction(ix) || isScript(ix))) return Ok(ix)

@@ -15,6 +15,19 @@ const cadence = get(ix, 'ix.cadence')

if (isFn(cadence)) {
const params = Object.fromEntries(Object
let unresolvedParams = Object
.values(ix.params)
let params = await Promise.all(unresolvedParams.map(
async function resParam(up) {
if (typeof up.resolve === "function") return ({
...await up.resolve(),
tempId: up.tempId
})
return up
}
))
params.forEach(p => {
ix.params[p.tempId] = p
})
params = params
.filter(param => param.key != null)
.map(param => [param.key, param.xform.asInjection(param.value)]))
.map(param => [param.key, param.xform.asInjection(param.value)])

@@ -21,0 +34,0 @@ ix.message.cadence = cadence(params)

import assert from "assert"
import {build, resolve, transaction, limit, proposer} from "./sdk"
import {build, resolve, transaction, limit, proposer, params, param, resolveParams} from "./sdk"

@@ -27,5 +27,25 @@ describe("build", () => {

it("placeholder test", async () => {
expect(1).toBe(1)
})
// TODO: Uncomment once interaction params have resolve field
// it("accepts an async function as a param", async () => {
// const identity = {
// asParam: v => v,
// asInjection: v => v,
// }
// const ix = await resolve(await build([
// transaction``,
// params([ async () => {
// return {
// key: "my_param", value: 1, xform: identity
// }
// } ])
// ]), [ resolveParams ])
// const ixParams = Object.values(ix.params)
// const p = ixParams.find(p => p.key === "my_param")
// assert.deepEqual(p.key, "my_param")
// assert.deepEqual(p.value, 1)
// })
})

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