Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PKG -- [fcl] Remove deprecated block methods and interaction types #1115

Merged
merged 8 commits into from
Apr 25, 2022
8 changes: 8 additions & 0 deletions .changeset/rich-cheetahs-occur.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
---
"@onflow/fcl": patch
"@onflow/sdk": patch
"@onflow/transport-grpc": patch
"@onflow/transport-http": patch
---

**BREAKING** Remove deprecated block builders, interaction types and send methods.
4 changes: 0 additions & 4 deletions packages/fcl/src/fcl.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@ export {send} from "@onflow/sdk"
export {decode} from "@onflow/sdk"
export {account} from "@onflow/sdk"
export {block} from "@onflow/sdk"
export {latestBlock} from "@onflow/sdk"
export {isOk, isBad, why, pipe, build} from "@onflow/sdk"
export {withPrefix, sansPrefix, display} from "@onflow/util-address"
export {template as cadence} from "@onflow/util-template"
Expand All @@ -58,11 +57,8 @@ export {getAccount} from "@onflow/sdk"
export {getEvents} from "@onflow/sdk"
export {getEventsAtBlockHeightRange} from "@onflow/sdk"
export {getEventsAtBlockIds} from "@onflow/sdk"
export {getLatestBlock} from "@onflow/sdk"
export {getBlock} from "@onflow/sdk"
export {getBlockHeader} from "@onflow/sdk"
export {getBlockById} from "@onflow/sdk"
export {getBlockByHeight} from "@onflow/sdk"
export {getCollection} from "@onflow/sdk"
export {getTransactionStatus} from "@onflow/sdk"
export {getTransaction} from "@onflow/sdk"
Expand Down
2 changes: 0 additions & 2 deletions packages/sdk/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
## Unreleased

## 1.0.0-alpha.0

### Major Changes
Expand Down
25 changes: 0 additions & 25 deletions packages/sdk/src/build/build-get-block-by-height.js

This file was deleted.

4 changes: 0 additions & 4 deletions packages/sdk/src/build/build-get-block-by-height.test.js

This file was deleted.

25 changes: 0 additions & 25 deletions packages/sdk/src/build/build-get-block-by-id.js

This file was deleted.

4 changes: 0 additions & 4 deletions packages/sdk/src/build/build-get-block-by-id.test.js

This file was deleted.

4 changes: 2 additions & 2 deletions packages/sdk/src/contract.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ interfaceContract("export", root)`
build resolve send
decode
isOk isBad why pipe
getAccount getEvents getLatestBlock getTransactionStatus
getAccount getEvents getTransactionStatus
authorizations authorization
params param
proposer payer
Expand All @@ -44,7 +44,7 @@ describe("consume", () => {
interaction
pipe Ok isOk isBad why
put get update
makeGetAccount makeGetEvents makeGetLatestBlock
makeGetAccount makeGetEvents
makeGetTransactionStatus makePing
makeScript makeTransaction
isTransaction isScript
Expand Down
11 changes: 1 addition & 10 deletions packages/sdk/src/interaction/interaction.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,8 @@ export const TRANSACTION /* */ = "TRANSACTION"
export const GET_TRANSACTION_STATUS /* */ = "GET_TRANSACTION_STATUS"
export const GET_ACCOUNT /* */ = "GET_ACCOUNT"
export const GET_EVENTS /* */ = "GET_EVENTS"
export const GET_LATEST_BLOCK /* */ = "GET_LATEST_BLOCK"
export const PING /* */ = "PING"
export const GET_TRANSACTION /* */ = "GET_TRANSACTION"
export const GET_BLOCK_BY_ID /* */ = "GET_BLOCK_BY_ID"
export const GET_BLOCK_BY_HEIGHT /* */ = "GET_BLOCK_BY_HEIGHT"
export const GET_BLOCK /* */ = "GET_BLOCK"
export const GET_BLOCK_HEADER /* */ = "GET_BLOCK_HEADER"
export const GET_COLLECTION /* */ = "GET_COLLECTION"
Expand Down Expand Up @@ -217,9 +214,6 @@ export const makeGetTransactionStatus /* */ = makeIx(GET_TRANSACTION_STATUS)
export const makeGetTransaction /* */ = makeIx(GET_TRANSACTION)
export const makeGetAccount /* */ = makeIx(GET_ACCOUNT)
export const makeGetEvents /* */ = makeIx(GET_EVENTS)
export const makeGetLatestBlock /* */ = makeIx(GET_LATEST_BLOCK)
export const makeGetBlockById /* */ = makeIx(GET_BLOCK_BY_ID)
export const makeGetBlockByHeight /* */ = makeIx(GET_BLOCK_BY_HEIGHT)
export const makePing /* */ = makeIx(PING)
export const makeGetBlock /* */ = makeIx(GET_BLOCK)
export const makeGetBlockHeader /* */ = makeIx(GET_BLOCK_HEADER)
Expand All @@ -234,9 +228,6 @@ export const isGetTransactionStatus /* */ = is(GET_TRANSACTION_STATUS)
export const isGetTransaction /* */ = is(GET_TRANSACTION)
export const isGetAccount /* */ = is(GET_ACCOUNT)
export const isGetEvents /* */ = is(GET_EVENTS)
export const isGetLatestBlock /* */ = is(GET_LATEST_BLOCK)
export const isGetBlockById /* */ = is(GET_BLOCK_BY_ID)
export const isGetBlockByHeight /* */ = is(GET_BLOCK_BY_HEIGHT)
export const isPing /* */ = is(PING)
export const isGetBlock /* */ = is(GET_BLOCK)
export const isGetBlockHeader /* */ = is(GET_BLOCK_HEADER)
Expand Down Expand Up @@ -299,4 +290,4 @@ export const update = (key, fn = identity) => ix => {
export const destroy = key => ix => {
delete ix.assigns[key]
return Ok(ix)
}
}
20 changes: 0 additions & 20 deletions packages/sdk/src/latest-block/latest-block.js

This file was deleted.

4 changes: 0 additions & 4 deletions packages/sdk/src/latest-block/latest-block.test.js

This file was deleted.

7 changes: 0 additions & 7 deletions packages/sdk/src/sdk.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,6 @@ export {
isGetTransactionStatus,
isGetAccount,
isGetEvents,
isGetLatestBlock,
isGetBlockById,
isGetBlockByHeight,
isPing,
isGetBlock,
isGetBlockHeader,
Expand All @@ -37,7 +34,6 @@ export {template as cadence} from "@onflow/util-template"
export {template as cdc} from "@onflow/util-template"

// Helpers
export {latestBlock} from "./latest-block/latest-block.js"
export {account} from "./account/account.js"
export {block} from "./block/block.js"

Expand All @@ -51,9 +47,6 @@ export {getEventsAtBlockHeightRange} from "./build/build-get-events-at-block-hei
export {getEventsAtBlockIds} from "./build/build-get-events-at-block-ids"
export {getBlock} from "./build/build-get-block.js"
export {getBlockHeader} from "./build/build-get-block-header.js"
export {getLatestBlock} from "./build/build-get-latest-block.js"
export {getBlockById} from "./build/build-get-block-by-id.js"
export {getBlockByHeight} from "./build/build-get-block-by-height"
export {getCollection} from "./build/build-get-collection"
export {getTransactionStatus} from "./build/build-get-transaction-status.js"
export {getTransaction} from "./build/build-get-transaction.js"
Expand Down
1 change: 0 additions & 1 deletion packages/transport-grpc/src/sdk-send-grpc.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ export {sendGetBlockHeader} from "./send-get-block-header.js"
export {sendGetBlock} from "./send-get-block.js"
export {sendGetCollection} from "./send-get-collection.js"
export {sendGetEvents} from "./send-get-events.js"
export {sendGetLatestBlock} from "./send-get-latest-block.js"
export {sendGetTransaction} from "./send-get-transaction.js"
export {sendGetTransactionStatus} from "./send-get-transaction-status.js"
export {sendPing} from "./send-ping.js"
Expand Down
46 changes: 0 additions & 46 deletions packages/transport-grpc/src/send-get-block-by-height.js

This file was deleted.

47 changes: 0 additions & 47 deletions packages/transport-grpc/src/send-get-block-by-id.js

This file was deleted.

71 changes: 0 additions & 71 deletions packages/transport-grpc/src/send-get-latest-block.js

This file was deleted.

Loading