Differences between js and go SDK

Does the JS sdk have all the capabilities of the Go sdk at this point?

Easy to see how it’s done with Go, but it’s unclear how to deploy a contract in the JS sdk. Does deploying a smart contract use the same API as the transaction?

Tagging @qvvg

Hey. @dennisdang As abilities go, I believe the Go and JS sdks are equal for now, but the use-cases for both sdks may require a much more divergent path/approach in the future.

Just as we think it would be unfair to make GO people write their code using JavaScript concepts and paradigms, we also believe it to be unfair to make JavaScript developers to write their JavaScript as if it were GO.

On the topic of deploying code. The JS SDK treats the deployment of code as it does any other transaction and doesn’t currently have a special function that lets you specifically do that. We also probably won’t have a specific function you can just call and deploy code, instead opting into a more composable solution called Stored Interactions.

We do have a story/issue for the stored interaction that allows you to set code on the account, you can find it here: https://github.com/onflow/flow-js-sdk/issues/191

It will most likely be a paired down and slightly different version of the Stored Interaction - Create Account, which also happens to deploy code.

Why is it called “setting code” on an account?

In the playground, we “deploy” a “contract” to an account. Is this terminology more familiar unless their interactions are particular nuanced and different still?

@dennisdang Please keep in mind that we will soon move the AuthAccount from single contract, to multiple contracts, and this interface will change and be different in the future.

But, every aspect of Cadence is discussed and debated and thought about at great length. As a general rule I would probably take the Cadence lexicon over other aspects given a choice.