@onflow/sdk-resolve-ref-block-id
Advanced tools
Comparing version 0.0.0 to 0.0.1
@@ -5,4 +5,4 @@ ### Unreleased | ||
### 0.0.0 -- 2020-10-07 | ||
### 0.0.1 -- 2020-10-07 | ||
- 2020-10-07 -- Initial port from sdk. |
@@ -1,2 +0,2 @@ | ||
var e=require("@onflow/interaction"),r=require("@onflow/send"),o=require("@onflow/decode"),n=require("@onflow/sdk-build-get-latest-block");exports.resolveBlockId=function(t){return function(s){try{return e.isTransaction(s)?s.message.refBlock?Promise.resolve(e.Ok(s)):Promise.resolve(function(t){try{var s;return Promise.resolve(e.pipe(e.interaction(),[n.getLatestBlock()])).then(function(e){return s=e,Promise.resolve(r.send(s,t)).then(function(e){return s=e,Promise.resolve(o.decodeResponse(s)).then(function(e){return(s=e).id})})})}catch(e){return Promise.reject(e)}}(t)).then(function(r){return s.message.refBlock=r,e.Ok(s)}):Promise.resolve(e.Ok(s))}catch(e){return Promise.reject(e)}}}; | ||
var e=require("@onflow/interaction"),r=require("@onflow/send"),o=require("@onflow/decode"),n=require("@onflow/sdk-build-get-latest-block");exports.resolveRefBlockId=function(t){return function(s){try{return e.isTransaction(s)?s.message.refBlock?Promise.resolve(e.Ok(s)):Promise.resolve(function(t){try{var s;return Promise.resolve(e.pipe(e.interaction(),[n.getLatestBlock()])).then(function(e){return s=e,Promise.resolve(r.send(s,t)).then(function(e){return s=e,Promise.resolve(o.decodeResponse(s)).then(function(e){return(s=e).id})})})}catch(e){return Promise.reject(e)}}(t)).then(function(r){return s.message.refBlock=r,e.Ok(s)}):Promise.resolve(e.Ok(s))}catch(e){return Promise.reject(e)}}}; | ||
//# sourceMappingURL=sdk-resolve-ref-block-id.js.map |
@@ -1,2 +0,2 @@ | ||
import{isTransaction as o,Ok as t,pipe as r,interaction as a}from"@onflow/interaction";import{send as e}from"@onflow/send";import{decodeResponse as n}from"@onflow/decode";import{getLatestBlock as i}from"@onflow/sdk-build-get-latest-block";function f(f){return async m=>o(m)?(m.message.refBlock||(m.message.refBlock=await async function(o){var t;return t=await r(a(),[i()]),t=await e(t,o),(t=await n(t)).id}(f)),t(m)):t(m)}export{f as resolveBlockId}; | ||
import{isTransaction as o,Ok as t,pipe as r,interaction as a}from"@onflow/interaction";import{send as e}from"@onflow/send";import{decodeResponse as n}from"@onflow/decode";import{getLatestBlock as i}from"@onflow/sdk-build-get-latest-block";function f(f){return async m=>o(m)?(m.message.refBlock||(m.message.refBlock=await async function(o){var t;return t=await r(a(),[i()]),t=await e(t,o),(t=await n(t)).id}(f)),t(m)):t(m)}export{f as resolveRefBlockId}; | ||
//# sourceMappingURL=sdk-resolve-ref-block-id.modern.js.map |
@@ -1,2 +0,2 @@ | ||
import{isTransaction as e,Ok as r,pipe as o,interaction as t}from"@onflow/interaction";import{send as n}from"@onflow/send";import{decodeResponse as i}from"@onflow/decode";import{getLatestBlock as s}from"@onflow/sdk-build-get-latest-block";function c(c){return function(m){try{return e(m)?m.message.refBlock?Promise.resolve(r(m)):Promise.resolve(function(e){try{var r;return Promise.resolve(o(t(),[s()])).then(function(o){return r=o,Promise.resolve(n(r,e)).then(function(e){return r=e,Promise.resolve(i(r)).then(function(e){return(r=e).id})})})}catch(e){return Promise.reject(e)}}(c)).then(function(e){return m.message.refBlock=e,r(m)}):Promise.resolve(r(m))}catch(e){return Promise.reject(e)}}}export{c as resolveBlockId}; | ||
import{isTransaction as e,Ok as r,pipe as o,interaction as t}from"@onflow/interaction";import{send as n}from"@onflow/send";import{decodeResponse as i}from"@onflow/decode";import{getLatestBlock as s}from"@onflow/sdk-build-get-latest-block";function c(c){return function(m){try{return e(m)?m.message.refBlock?Promise.resolve(r(m)):Promise.resolve(function(e){try{var r;return Promise.resolve(o(t(),[s()])).then(function(o){return r=o,Promise.resolve(n(r,e)).then(function(e){return r=e,Promise.resolve(i(r)).then(function(e){return(r=e).id})})})}catch(e){return Promise.reject(e)}}(c)).then(function(e){return m.message.refBlock=e,r(m)}):Promise.resolve(r(m))}catch(e){return Promise.reject(e)}}}export{c as resolveRefBlockId}; | ||
//# sourceMappingURL=sdk-resolve-ref-block-id.module.js.map |
@@ -1,2 +0,2 @@ | ||
!function(e,o){"object"==typeof exports&&"undefined"!=typeof module?o(exports,require("@onflow/interaction"),require("@onflow/send"),require("@onflow/decode"),require("@onflow/sdk-build-get-latest-block")):"function"==typeof define&&define.amd?define(["exports","@onflow/interaction","@onflow/send","@onflow/decode","@onflow/sdk-build-get-latest-block"],o):o((e=e||self).sdkResolveRefBlockId={},e.interaction,e.send,e.decode,e.sdkBuildGetLatestBlock)}(this,function(e,o,n,t,r){e.resolveBlockId=function(e){return function(i){try{return o.isTransaction(i)?i.message.refBlock?Promise.resolve(o.Ok(i)):Promise.resolve(function(e){try{var i;return Promise.resolve(o.pipe(o.interaction(),[r.getLatestBlock()])).then(function(o){return i=o,Promise.resolve(n.send(i,e)).then(function(e){return i=e,Promise.resolve(t.decodeResponse(i)).then(function(e){return(i=e).id})})})}catch(e){return Promise.reject(e)}}(e)).then(function(e){return i.message.refBlock=e,o.Ok(i)}):Promise.resolve(o.Ok(i))}catch(e){return Promise.reject(e)}}}}); | ||
!function(e,o){"object"==typeof exports&&"undefined"!=typeof module?o(exports,require("@onflow/interaction"),require("@onflow/send"),require("@onflow/decode"),require("@onflow/sdk-build-get-latest-block")):"function"==typeof define&&define.amd?define(["exports","@onflow/interaction","@onflow/send","@onflow/decode","@onflow/sdk-build-get-latest-block"],o):o((e=e||self).sdkResolveRefBlockId={},e.interaction,e.send,e.decode,e.sdkBuildGetLatestBlock)}(this,function(e,o,n,t,r){e.resolveRefBlockId=function(e){return function(i){try{return o.isTransaction(i)?i.message.refBlock?Promise.resolve(o.Ok(i)):Promise.resolve(function(e){try{var i;return Promise.resolve(o.pipe(o.interaction(),[r.getLatestBlock()])).then(function(o){return i=o,Promise.resolve(n.send(i,e)).then(function(e){return i=e,Promise.resolve(t.decodeResponse(i)).then(function(e){return(i=e).id})})})}catch(e){return Promise.reject(e)}}(e)).then(function(e){return i.message.refBlock=e,o.Ok(i)}):Promise.resolve(o.Ok(i))}catch(e){return Promise.reject(e)}}}}); | ||
//# sourceMappingURL=sdk-resolve-ref-block-id.umd.js.map |
{ | ||
"name": "@onflow/sdk-resolve-ref-block-id", | ||
"version": "0.0.0", | ||
"version": "0.0.1", | ||
"description": "Flow JS SDK Resolver -- Ref Block Id", | ||
@@ -5,0 +5,0 @@ "license": "Apache-2.0", |
@@ -14,3 +14,3 @@ import {isTransaction, Ok, interaction, pipe} from "@onflow/interaction" | ||
export function resolveBlockId(opts) { | ||
export function resolveRefBlockId(opts) { | ||
return async ix => { | ||
@@ -17,0 +17,0 @@ if (!isTransaction(ix)) return Ok(ix) |
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
9789