@onflow/sdk-latest-block
Advanced tools
Comparing version 0.0.8 to 0.0.9
@@ -5,2 +5,7 @@ ### Unreleased | ||
### 0.0.9 -- 2022-02-02 | ||
- 2021-02-02 -- Deprecates opts as first argument | ||
- 2021-02-02 -- Adds isSealed flag as first argument | ||
### 0.0.8 -- 2020-12-11 | ||
@@ -7,0 +12,0 @@ |
@@ -1,2 +0,2 @@ | ||
var e=require("@onflow/sdk-send"),o=require("@onflow/sdk-build-get-latest-block"),t=require("@onflow/sdk-decode");exports.latestBlock=function(d){return void 0===d&&(d={}),e.send([o.getLatestBlock()],d).then(t.decode)}; | ||
var e=require("@onflow/sdk-send"),o=require("@onflow/sdk-build-get-block"),n=require("@onflow/sdk-decode");exports.latestBlock=function(){var t=[].slice.call(arguments),a=t[1]||("object"==typeof arg[0]?t[0]:void 0),r="boolean"==typeof arg[0]?arg[0]:void 0;return"object"!=typeof t[0]&&console.warn("\n %cFCL/SDK Deprecation Notice\n ============================\n \n Passing options as the first arguement to the latestBlock function has been deprecated and will be removed in future versions of the Flow JS-SDK/FCL.\n You can learn more (including a guide on common transition paths) here: https://github.com/onflow/flow-js-sdk/blob/master/packages/sdk/TRANSITIONS.md#0007-deprecate-opts-first-arg-latest-block\n \n ============================\n ","font-weight:bold;font-family:monospace;"),e.send([o.getBlock(r)],a).then(n.decode)}; | ||
//# sourceMappingURL=sdk-latest-block.js.map |
@@ -1,2 +0,2 @@ | ||
import{send as o}from"@onflow/sdk-send";import{getLatestBlock as t}from"@onflow/sdk-build-get-latest-block";import{decode as r}from"@onflow/sdk-decode";function e(e={}){return o([t()],e).then(r)}export{e as latestBlock}; | ||
import{send as o}from"@onflow/sdk-send";import{getBlock as e}from"@onflow/sdk-build-get-block";import{decode as t}from"@onflow/sdk-decode";function n(...n){let r=n[1]||("object"==typeof arg[0]?n[0]:void 0),a="boolean"==typeof arg[0]?arg[0]:void 0;return"object"!=typeof n[0]&&console.warn("\n %cFCL/SDK Deprecation Notice\n ============================\n \n Passing options as the first arguement to the latestBlock function has been deprecated and will be removed in future versions of the Flow JS-SDK/FCL.\n You can learn more (including a guide on common transition paths) here: https://github.com/onflow/flow-js-sdk/blob/master/packages/sdk/TRANSITIONS.md#0007-deprecate-opts-first-arg-latest-block\n \n ============================\n ","font-weight:bold;font-family:monospace;"),o([e(a)],r).then(t)}export{n as latestBlock}; | ||
//# sourceMappingURL=sdk-latest-block.modern.js.map |
@@ -1,2 +0,2 @@ | ||
import{send as o}from"@onflow/sdk-send";import{getLatestBlock as t}from"@onflow/sdk-build-get-latest-block";import{decode as r}from"@onflow/sdk-decode";function d(d){return void 0===d&&(d={}),o([t()],d).then(r)}export{d as latestBlock}; | ||
import{send as o}from"@onflow/sdk-send";import{getBlock as e}from"@onflow/sdk-build-get-block";import{decode as t}from"@onflow/sdk-decode";function n(){var n=[].slice.call(arguments),r=n[1]||("object"==typeof arg[0]?n[0]:void 0),a="boolean"==typeof arg[0]?arg[0]:void 0;return"object"!=typeof n[0]&&console.warn("\n %cFCL/SDK Deprecation Notice\n ============================\n \n Passing options as the first arguement to the latestBlock function has been deprecated and will be removed in future versions of the Flow JS-SDK/FCL.\n You can learn more (including a guide on common transition paths) here: https://github.com/onflow/flow-js-sdk/blob/master/packages/sdk/TRANSITIONS.md#0007-deprecate-opts-first-arg-latest-block\n \n ============================\n ","font-weight:bold;font-family:monospace;"),o([e(a)],r).then(t)}export{n as latestBlock}; | ||
//# sourceMappingURL=sdk-latest-block.module.js.map |
@@ -1,2 +0,2 @@ | ||
!function(e,o){"object"==typeof exports&&"undefined"!=typeof module?o(exports,require("@onflow/sdk-send"),require("@onflow/sdk-build-get-latest-block"),require("@onflow/sdk-decode")):"function"==typeof define&&define.amd?define(["exports","@onflow/sdk-send","@onflow/sdk-build-get-latest-block","@onflow/sdk-decode"],o):o((e=e||self).sdkLatestBlock={},e.sdkSend,e.sdkBuildGetLatestBlock,e.sdkDecode)}(this,function(e,o,d,t){e.latestBlock=function(e){return void 0===e&&(e={}),o.send([d.getLatestBlock()],e).then(t.decode)}}); | ||
!function(e,o){"object"==typeof exports&&"undefined"!=typeof module?o(exports,require("@onflow/sdk-send"),require("@onflow/sdk-build-get-block"),require("@onflow/sdk-decode")):"function"==typeof define&&define.amd?define(["exports","@onflow/sdk-send","@onflow/sdk-build-get-block","@onflow/sdk-decode"],o):o((e=e||self).sdkLatestBlock={},e.sdkSend,e.sdkBuildGetBlock,e.sdkDecode)}(this,function(e,o,n,t){e.latestBlock=function(){var e=[].slice.call(arguments),d=e[1]||("object"==typeof arg[0]?e[0]:void 0),s="boolean"==typeof arg[0]?arg[0]:void 0;return"object"!=typeof e[0]&&console.warn("\n %cFCL/SDK Deprecation Notice\n ============================\n \n Passing options as the first arguement to the latestBlock function has been deprecated and will be removed in future versions of the Flow JS-SDK/FCL.\n You can learn more (including a guide on common transition paths) here: https://github.com/onflow/flow-js-sdk/blob/master/packages/sdk/TRANSITIONS.md#0007-deprecate-opts-first-arg-latest-block\n \n ============================\n ","font-weight:bold;font-family:monospace;"),o.send([n.getBlock(s)],d).then(t.decode)}}); | ||
//# sourceMappingURL=sdk-latest-block.umd.js.map |
{ | ||
"name": "@onflow/sdk-latest-block", | ||
"version": "0.0.8", | ||
"version": "0.0.9", | ||
"description": "Flow JS SDK -- Fetch the Latest Block from the Configured Access Node", | ||
@@ -37,6 +37,6 @@ "license": "Apache-2.0", | ||
"dependencies": { | ||
"@onflow/sdk-build-get-latest-block": "0.0.0", | ||
"@onflow/sdk-decode": "0.0.2", | ||
"@onflow/sdk-send": "0.0.10" | ||
"@onflow/sdk-build-get-block": "0.0.1", | ||
"@onflow/sdk-decode": "0.0.3", | ||
"@onflow/sdk-send": "0.0.11" | ||
} | ||
} |
import {send} from "@onflow/sdk-send" | ||
import {getLatestBlock} from "@onflow/sdk-build-get-latest-block" | ||
import {getBlock} from "@onflow/sdk-build-get-block" | ||
import {decode} from "@onflow/sdk-decode" | ||
export function latestBlock(opts = {}) { | ||
return send([getLatestBlock()], opts).then(decode) | ||
export function latestBlock(...args) { | ||
let opts = args[1] || (typeof arg[0] === "object" ? args[0] : undefined) | ||
let isSealed = typeof arg[0] === "boolean" ? arg[0] : undefined | ||
if (typeof args[0] !== "object") { | ||
console.warn( | ||
` | ||
%cFCL/SDK Deprecation Notice | ||
============================ | ||
Passing options as the first arguement to the latestBlock function has been deprecated and will be removed in future versions of the Flow JS-SDK/FCL. | ||
You can learn more (including a guide on common transition paths) here: https://github.com/onflow/flow-js-sdk/blob/master/packages/sdk/TRANSITIONS.md#0007-deprecate-opts-first-arg-latest-block | ||
============================ | ||
`, | ||
"font-weight:bold;font-family:monospace;" | ||
) | ||
} | ||
return send([getBlock(isSealed)], opts).then(decode) | ||
} |
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
Minified code
QualityThis package contains minified code. This may be harmless in some cases where minified code is included in packaged libraries, however packages on npm should not minify code.
Found 2 instances 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
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
Minified code
QualityThis package contains minified code. This may be harmless in some cases where minified code is included in packaged libraries, however packages on npm should not minify code.
Found 1 instance in 1 package
12980
44
0
3
+ Added@onflow/decode@0.0.11(transitive)
+ Added@onflow/interaction@0.0.11(transitive)
+ Added@onflow/sdk-build-get-latest-block@0.0.2(transitive)
+ Added@onflow/sdk-decode@0.0.3(transitive)
+ Added@onflow/sdk-resolve@0.0.11(transitive)
+ Added@onflow/sdk-resolve-accounts@0.0.1(transitive)
+ Added@onflow/sdk-resolve-arguments@0.0.2(transitive)
+ Added@onflow/sdk-resolve-cadence@0.0.2(transitive)
+ Added@onflow/sdk-resolve-ref-block-id@0.0.8(transitive)
+ Added@onflow/sdk-resolve-signatures@0.0.6(transitive)
+ Added@onflow/sdk-resolve-validators@0.0.1(transitive)
+ Added@onflow/sdk-send@0.0.11(transitive)
+ Added@onflow/send@0.0.36(transitive)
- Removed@onflow/decode@0.0.10(transitive)
- Removed@onflow/interaction@0.0.10(transitive)
- Removed@onflow/sdk-build-get-latest-block@0.0.0(transitive)
- Removed@onflow/sdk-decode@0.0.2(transitive)
- Removed@onflow/sdk-resolve@0.0.10(transitive)
- Removed@onflow/sdk-resolve-accounts@0.0.0(transitive)
- Removed@onflow/sdk-resolve-arguments@0.0.1(transitive)
- Removed@onflow/sdk-resolve-cadence@0.0.1(transitive)
- Removed@onflow/sdk-resolve-ref-block-id@0.0.7(transitive)
- Removed@onflow/sdk-resolve-signatures@0.0.5(transitive)
- Removed@onflow/sdk-resolve-validators@0.0.0(transitive)
- Removed@onflow/sdk-send@0.0.10(transitive)
- Removed@onflow/send@0.0.35(transitive)
Updated@onflow/sdk-decode@0.0.3
Updated@onflow/sdk-send@0.0.11