@onflow/sdk-build-authorizations
Advanced tools
Comparing version 0.0.0 to 0.0.1
@@ -5,4 +5,8 @@ ### Unreleased | ||
### 0.0.1 -- 2020-10-28 | ||
- 2020-10-28 -- FIX typo | ||
### 0.0.0 -- 2020-09-29 | ||
- 2020-09-29 -- Initial port from sdk. |
@@ -1,2 +0,2 @@ | ||
var r=require("@onflow/interaction");function n(){return(n=Object.assign||function(r){for(var n=1;n<arguments.length;n++){var o=arguments[n];for(var t in o)Object.prototype.hasOwnProperty.call(o,t)&&(r[t]=o[t])}return r}).apply(this,arguments)}var o={authorizer:!0};exports.authorization=function(r,n,o,t){return{addr:r,signingFunction:n,keyId:o,sequenceNum:t}},exports.authorizations=function(t){return void 0===t&&(t=[]),r.pipe(t.map(function(r){return"function"==typeof r?makeAuthorization({resolve:r,role:o,roles:o}):makeAuthorization(n({},r,{role:o,roles:o}))}))}; | ||
var r=require("@onflow/interaction");function n(){return(n=Object.assign||function(r){for(var n=1;n<arguments.length;n++){var e=arguments[n];for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(r[o]=e[o])}return r}).apply(this,arguments)}var e={authorizer:!0};exports.authorization=function(r,n,e,o){return{addr:r,signingFunction:n,keyId:e,sequenceNum:o}},exports.authorizations=function(o){return void 0===o&&(o=[]),r.pipe(o.map(function(o){return r.makeAuthorizer("function"==typeof o?{resolve:o,role:e,roles:e}:n({},o,{role:e,roles:e}))}))}; | ||
//# sourceMappingURL=sdk-build-authorizations.js.map |
@@ -1,2 +0,2 @@ | ||
import{pipe as r}from"@onflow/interaction";function n(){return(n=Object.assign||function(r){for(var n=1;n<arguments.length;n++){var o=arguments[n];for(var t in o)Object.prototype.hasOwnProperty.call(o,t)&&(r[t]=o[t])}return r}).apply(this,arguments)}const o={authorizer:!0};function t(t=[]){return r(t.map(r=>"function"==typeof r?makeAuthorization({resolve:r,role:o,roles:o}):makeAuthorization(n({},r,{role:o,roles:o}))))}function e(r,n,o,t){return{addr:r,signingFunction:n,keyId:o,sequenceNum:t}}export{e as authorization,t as authorizations}; | ||
import{pipe as r,makeAuthorizer as n}from"@onflow/interaction";function o(){return(o=Object.assign||function(r){for(var n=1;n<arguments.length;n++){var o=arguments[n];for(var t in o)Object.prototype.hasOwnProperty.call(o,t)&&(r[t]=o[t])}return r}).apply(this,arguments)}const t={authorizer:!0};function e(e=[]){return r(e.map(r=>n("function"==typeof r?{resolve:r,role:t,roles:t}:o({},r,{role:t,roles:t}))))}function i(r,n,o,t){return{addr:r,signingFunction:n,keyId:o,sequenceNum:t}}export{i as authorization,e as authorizations}; | ||
//# sourceMappingURL=sdk-build-authorizations.modern.js.map |
@@ -1,2 +0,2 @@ | ||
import{pipe as r}from"@onflow/interaction";function n(){return(n=Object.assign||function(r){for(var n=1;n<arguments.length;n++){var o=arguments[n];for(var t in o)Object.prototype.hasOwnProperty.call(o,t)&&(r[t]=o[t])}return r}).apply(this,arguments)}var o={authorizer:!0};function t(t){return void 0===t&&(t=[]),r(t.map(function(r){return"function"==typeof r?makeAuthorization({resolve:r,role:o,roles:o}):makeAuthorization(n({},r,{role:o,roles:o}))}))}function e(r,n,o,t){return{addr:r,signingFunction:n,keyId:o,sequenceNum:t}}export{e as authorization,t as authorizations}; | ||
import{pipe as r,makeAuthorizer as n}from"@onflow/interaction";function o(){return(o=Object.assign||function(r){for(var n=1;n<arguments.length;n++){var o=arguments[n];for(var t in o)Object.prototype.hasOwnProperty.call(o,t)&&(r[t]=o[t])}return r}).apply(this,arguments)}var t={authorizer:!0};function e(e){return void 0===e&&(e=[]),r(e.map(function(r){return n("function"==typeof r?{resolve:r,role:t,roles:t}:o({},r,{role:t,roles:t}))}))}function i(r,n,o,t){return{addr:r,signingFunction:n,keyId:o,sequenceNum:t}}export{i as authorization,e as authorizations}; | ||
//# sourceMappingURL=sdk-build-authorizations.module.js.map |
@@ -1,2 +0,2 @@ | ||
!function(n,o){"object"==typeof exports&&"undefined"!=typeof module?o(exports,require("@onflow/interaction")):"function"==typeof define&&define.amd?define(["exports","@onflow/interaction"],o):o((n=n||self).sdkBuildAuthorizations={},n.interaction)}(this,function(n,o){function t(){return(t=Object.assign||function(n){for(var o=1;o<arguments.length;o++){var t=arguments[o];for(var e in t)Object.prototype.hasOwnProperty.call(t,e)&&(n[e]=t[e])}return n}).apply(this,arguments)}var e={authorizer:!0};n.authorization=function(n,o,t,e){return{addr:n,signingFunction:o,keyId:t,sequenceNum:e}},n.authorizations=function(n){return void 0===n&&(n=[]),o.pipe(n.map(function(n){return"function"==typeof n?makeAuthorization({resolve:n,role:e,roles:e}):makeAuthorization(t({},n,{role:e,roles:e}))}))}}); | ||
!function(n,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("@onflow/interaction")):"function"==typeof define&&define.amd?define(["exports","@onflow/interaction"],e):e((n=n||self).sdkBuildAuthorizations={},n.interaction)}(this,function(n,e){function o(){return(o=Object.assign||function(n){for(var e=1;e<arguments.length;e++){var o=arguments[e];for(var t in o)Object.prototype.hasOwnProperty.call(o,t)&&(n[t]=o[t])}return n}).apply(this,arguments)}var t={authorizer:!0};n.authorization=function(n,e,o,t){return{addr:n,signingFunction:e,keyId:o,sequenceNum:t}},n.authorizations=function(n){return void 0===n&&(n=[]),e.pipe(n.map(function(n){return e.makeAuthorizer("function"==typeof n?{resolve:n,role:t,roles:t}:o({},n,{role:t,roles:t}))}))}}); | ||
//# sourceMappingURL=sdk-build-authorizations.umd.js.map |
{ | ||
"name": "@onflow/sdk-build-authorizations", | ||
"version": "0.0.0", | ||
"version": "0.0.1", | ||
"description": "Flow JS SDK Builder -- Authorizations", | ||
@@ -5,0 +5,0 @@ "license": "Apache-2.0", |
import {pipe, makeAuthorizer} from "@onflow/interaction" | ||
const roles = { | ||
authorizer: true | ||
authorizer: true, | ||
} | ||
export function authorizations(ax = []) { | ||
return pipe(ax.map(authz => { | ||
return typeof authz === "function" | ||
? makeAuthorization({ resolve: authz, role: roles, roles }) | ||
: makeAuthorization({ ...authz, role: roles, roles }) | ||
})) | ||
return pipe( | ||
ax.map((authz) => { | ||
return typeof authz === "function" | ||
? makeAuthorizer({resolve: authz, role: roles, roles}) | ||
: makeAuthorizer({...authz, role: roles, roles}) | ||
}) | ||
) | ||
} | ||
@@ -14,0 +16,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
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
8634