Skip to content

Releases: onflow/flow-go-sdk

v0.14.1

03 Feb 00:19
Compare
Choose a tag to compare

⭐ Features

🛠 Improvements

📝 Documentation & Maintenance

🐛 Bug Fixes

  • Fix the decoding of Flow type IDs by importing Cadence's type ID decoder (#136) @turbolent

v0.12.3

12 Jan 21:49
Compare
Choose a tag to compare

🛠 Improvements

v0.14.0

08 Jan 22:05
Compare
Choose a tag to compare

🛠 Improvements

🐛 Bug Fixes

Version 0.13.1

12 Dec 00:13
Compare
Choose a tag to compare
Emulator v0.10.0 (CLI v0.9.0) Emulator v0.12.0 (CLI v0.11.0) Devnet 17 Mainnet 3

🛠 Improvements

📝 Documentation & Maintenance

Version 0.12.2

30 Nov 06:00
Compare
Choose a tag to compare

Network Compatibility

Emulator v0.10.0 (CLI v0.9.0) Emulator v0.12.0 (CLI v0.11.0) Testnet Mainnet

💥 Breaking Changes

Multiple contracts per account (#106)

By @janezpodhostnik

The Flow protocol now supports multiple contracts per account. This SDK has been updated with additional functionality to create and manage multiple contracts on the same account.

  • The flow.Account struct now contains a Contracts field that maps contractName => contractSource (map[string][]byte). Code is preserved for backwards compatibility.
  • The templates.CreateAccount function has changed to accept a list of contracts rather than a single code parameter. This list allows multiple contracts to be deployed upon account creation.
  • templates.UpdateAccountContract function replaces templates.UpdateAccountCode. This function updates a single contract by name.
  • The templates.AddAccountContract function was added, allowing a contract to be deployed to an existing account.

Reduce transaction template size

By @janezpodhostnik

Byte array values ([UInt8]) used in Cadence templates (CreateAccount, UpdateAccountContract, AddAccountContract) are now typed as String and passed as hexadecimal strings. This was done to reduce the size of the accompanying transaction argument values; hexadecimal strings are much more compact in JSON-CDC than array literals.

This is a breaking change because it alters the deterministic template formats, on which some applications may depend.

⭐ Enhancements

  • Example and documentation cleanup (#108, #109) @qq976739120

Version 0.11.0

30 Nov 05:33
Compare
Choose a tag to compare

Network Compatibility

Emulator v0.10.0 (CLI v0.9.0) Emulator v0.12.0 (CLI v0.11) Testnet Mainnet

💥 Breaking Changes

⭐ Enhancements

Version 0.10.0

18 Sep 22:15
Compare
Choose a tag to compare

Network Compatibility

Emulator v0.7.0 Emulator v0.8.0 Emulator v0.9.0 Emulator v0.10.0 Testnet Mainnet

💥 Breaking Changes

🐛 Bug Fixes

  • Add missing EXPIRED value to flow.TransactionStatus enum (#90) @rrrkren
  • Do not deploy empty code string on account creation (#97) @psiemens

⭐ Enhancements

  • Add transaction example that uses 2 authorizers (#89) @bjartek
  • Improve ECDSA documentation (#94) @tarakby
  • Improve documentation for the flow.Transaction fields (#91) @turbolent

Version 0.9.0

10 Aug 23:36
Compare
Choose a tag to compare

Network Compatibility

Emulator v0.5.0 Emulator v0.6.0 Emulator v0.7.0 Testnet Mainnet

💥 Breaking Changes

Upgrade to Cadence v0.8.0: https://github.com/onflow/cadence/releases/tag/v0.8.0

  • Arguments passed to cadence.Value#WithType are now typed as pointers (*cadence.Type) rather than values (cadence.Type).

Example:

myEventType := cadence.EventType{...})

// this 👇 
myEvent := cadence.NewEvent(...).WithType(myEventType)

// changes to this 👇 
myEvent := cadence.NewEvent(...).WithType(&myEventType)

Version 0.8.0

15 Jul 00:57
Compare
Choose a tag to compare

Network Compatibility

Emulator v0.4.0 Emulator v0.5.0 Emulator v0.6.0 Testnet Mainnet

💥 Breaking Changes

GetAccountAtLatestBlock (#85)

The GetAccount Access API RPC method has been renamed to GetAccountAtLatestBlock to better reflect its functionality and differentiate it from the upcoming GetAccountAtBlockHeight method.

Version 0.7.0

08 Jul 20:16
Compare
Choose a tag to compare

Network Compatibility

Emulator v0.4.0 Emulator v0.5.0 Testnet Mainnet

💥 Breaking Changes

Transaction arguments (#67)

Due to a bug that was causing transaction arguments to be encoded in an inconsistent manner (#66), the flow.Transaction#Arguments field has been updated to be typed as [][]byte rather than []cadence.Value.

This in turn necessitated a change to the flow.Transaction#AddArgument function:

  • AddArgument function signature changed to func (tx *Transaction) AddArgument(arg cadence.Value) error
    • This function performs JSON-CDC encoding of the provided argument, and therefore has the potential to produce an error.
  • AddRawArgument function introduced: func (tx *Transaction) AddRawArgument(arg []byte) *Transaction
    • This is a chainable function that can be used to add pre-encoded arguments.

Transaction templates (#78)

The helpers defined in the templates package have changed to use parameterized transactions and arguments rather than naive string templates. This approach is more flexible and will allow templates to be easily shared between different SDK implementations.

This change breaks the old API by changing the return type of each template function to *flow.Transaction.

For example, this is the signature for templates.CreateAccount:

// CreateAccount generates a transaction that creates a new account.
//
// This template accepts a list of public keys and a code argument, both of which are optional.
//
// The final argument is the address of the account that will pay the account creation fee.
// This account is added as a transaction authorizer and therefore must sign the resulting transaction.
func CreateAccount(accountKeys []*flow.AccountKey, code []byte, payer flow.Address) *flow.Transaction

The partial transactions returned by these helpers functions can later be signed and sent to the Access API.

Cadence v0.5.0 (#77)

The Go SDK has been upgraded to use the latest Cadence release. Please view the Cadence release notes for an overview of the features and changes introduced in this release: https://github.com/onflow/cadence/releases/tag/v0.5.0

🐛 Bug Fixes

  • See transaction arguments change above

⭐ Features

  • Added flow.SignUserMessage function to support signing of user messages (#76). Example usage