Skip to content

Commit 1553967

Browse files
authored
PKG -- [sdk] Fixed return types (#1721)
* PKG -- [sdk] Fixed return types * VSN -- [sdk] changeset
1 parent 3b01243 commit 1553967

13 files changed

+17
-12
lines changed

.changeset/wild-days-kiss.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@onflow/sdk": patch
3+
---
4+
5+
Fixed return types

packages/sdk/src/build/build-arguments.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import {pipe, makeArgument} from "../interaction/interaction.js"
33
/**
44
* @description - A utility builder to be used with other builders to pass in arguments with a value and supported type
55
* @param {Array.<*>} ax - An array of arguments
6-
* @returns {object} - An interaction object
6+
* @returns {Function} - An interaction object
77
*/
88
export function args(ax = []) {
99
return pipe(ax.map(makeArgument))

packages/sdk/src/build/build-at-block-height.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import {validator} from "./build-validator.js"
44
/**
55
* @description - A builder function that returns a partial interaction to a block at a specific height
66
* @param {number} height - The height of the block to get
7-
* @returns {object} - A partial interaction object
7+
* @returns {Function} - A partial interaction object
88
*/
99
export function atBlockHeight(height) {
1010
return pipe([

packages/sdk/src/build/build-get-account.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import {sansPrefix} from "@onflow/util-address"
44
/**
55
* @description - A builder function that returns the interaction to get an account by address
66
* @param {string} addr - The address of the account to getq
7-
* @returns {object} - An interaction object
7+
* @returns {Function} - An interaction object
88
*/
99
export function getAccount(addr) {
1010
return pipe([

packages/sdk/src/build/build-get-block-header.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import {pipe, Ok, makeGetBlockHeader} from "../interaction/interaction.js"
33
/**
44
* @description - A builder function that returns the interaction to get a block header
55
* @param {boolean} [isSealed] - Whether or not the block should be sealed
6-
* @returns {object} - An interaction object
6+
* @returns {Function} - An interaction object
77
*/
88
export function getBlockHeader(isSealed = null) {
99
return pipe([

packages/sdk/src/build/build-get-block.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import {pipe, Ok, makeGetBlock} from "../interaction/interaction.js"
33
/**
44
* @description - A builder function that returns the interaction to get the latest block
55
* @param {boolean} [isSealed] - Whether or not the block should be sealed
6-
* @returns {object} - An interaction object
6+
* @returns {Function} - An interaction object
77
*/
88
export function getBlock(isSealed = null) {
99
return pipe([

packages/sdk/src/build/build-get-collection.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import {pipe, makeGetCollection} from "../interaction/interaction.js"
55
* NOTE:
66
* - The block range provided must be from the current spork. All events emitted during past sporks is current unavailable.
77
* @param {string} [id] - The id of the collection to get
8-
* @returns {object} - An interaction object
8+
* @returns {Function} - An interaction object
99
*/
1010
export function getCollection(id = null) {
1111
return pipe([

packages/sdk/src/build/build-get-events-at-block-height-range.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import {pipe, Ok, makeGetEvents} from "../interaction/interaction.js"
88
* @param {string} eventName - The name of the event to get
99
* @param {number} fromBlockHeight - The height of the block to start looking for events (inclusive)
1010
* @param {number} toBlockHeight - The height of the block to stop looking for events (inclusive)
11-
* @returns {object} - An interaction object
11+
* @returns {Function} - An interaction object
1212
*/
1313
export function getEventsAtBlockHeightRange(eventName, fromBlockHeight, toBlockHeight) {
1414
return pipe([

packages/sdk/src/build/build-get-events-at-block-ids.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import {pipe, Ok, makeGetEvents} from "../interaction/interaction.js"
66
* - The block range provided must be from the current spork.
77
* @param {string} eventName - The name of the event to get
88
* @param {number[]} blockIds - The ids of the blocks to look for events
9-
* @returns {object} - An interaction object
9+
* @returns {Function} - An interaction object
1010
*/
1111
export function getEventsAtBlockIds(eventName, blockIds = []) {
1212
return pipe([

packages/sdk/src/build/build-get-transaction-status.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import {pipe, Ok, makeGetTransactionStatus} from "../interaction/interaction.js"
44
* @description - A builder function that returns the status of transaction
55
* NOTE: The transactionID provided must be from the current spork.
66
* @param {string} transactionId - The id of the transaction to get status
7-
* @returns {object} - An interaction object
7+
* @returns {Function} - An interaction object
88
*/
99
export function getTransactionStatus(transactionId) {
1010
return pipe([

0 commit comments

Comments
 (0)