Skip to content

Releases: onflow/flow-cadut

@onflow/[email protected]

05 Aug 21:34
caa550a
Compare
Choose a tag to compare

Major Changes

  • @onflow/flow-cadut has been converted to a monorepo and partitioned into the following packages:

    • @onflow/flow-cadut
    • @onflow/flow-cadut-generator (previously @onflow/flow-cadut/generator)
    • @onflow/flow-cadut-plugin-find (previously @onflow/flow-cadut/plugins/find)
    • @onflow/flow-cadut-plugin-flowns (previously @onflow/flow-cadut/plugins/flowns)
    • @onflow/flow-cadut-views (previously @onflow/flow-cadut/views)

    For prior changelogs regarding this package, please see the README of @onflow/flow-cadut.

Minor Changes

  • #111 e4f08c0 Thanks @jribbink! - Add named exports to index files generated by flow-cadut-generator

Patch Changes

@onflow/[email protected]

05 Aug 21:34
caa550a
Compare
Choose a tag to compare
Pre-release

Major Changes

  • #102 477d3df Thanks @jribbink! - BREAKING Bumped @onflow/fcl to 1.1.1-alpha.1

    Developers should note that [U]Int* and Word* types are now decoded into strings by @onflow/fcl and no longer implicitly decoded into numbers. This means that these types will need to be explicitly converted to JavaScript Number types if required.

    This potentially affects the following flow-cadut features:

    • sendTransaction (where event data is [U]Int* or Word*)
    • executeScript (where return value is [U]Int* or Word*)
    • any generated script templates with [U]Int* or Word* return values
    • any generated transaction templates which emit [U]Int* or Word* event data

    See more here

    Additionally, passing in Number as value for Int is deprecated and will cease to work in future releases of @onflow/types. Going forward, use String as value for Int.

    This could potentially affect the following functions in the future:

    • sendTransaction (where integer arguments are passed)
    • executeScript (where integer arguments are passed)
    • any generated script templates with integer arguments passed
    • any generated transaction templates with integer arguments passed

    You can learn more (including a guide on common transition paths) here.

  • #104 c5d3a23 Thanks @jribbink! - BREAKING @onflow/flow-cadut has been converted to a monorepo and partitioned into the following packages:

    • @onflow/flow-cadut
    • @onflow/flow-cadut-generator (previously @onflow/flow-cadut/generator)
    • @onflow/flow-cadut-plugin-find (previously @onflow/flow-cadut/plugins/find)
    • @onflow/flow-cadut-plugin-flowns (previously @onflow/flow-cadut/plugins/flowns)
    • @onflow/flow-cadut-views (previously @onflow/flow-cadut/views)

    Note - The @onflow/flow-cadut generator CLI has also been moved to @onflow/flow-cadut-generator.

    In order to use the flow-generate command, you must install the generator package via:

    npm install -D @onflow/flow-cadut-generator

    The generator command may now be used via npx flow-generate on the command line. See complete installation instructions here.

Patch Changes

  • #97 7a09ae7 Thanks @MaxStalker! - Fix contract parser to properly process contracts, which implements some interface

  • #107 663f0fc Thanks @jribbink! - Verify that provided domain is valid for provided argument type when mapping path arguments

  • #113 8315ee1 Thanks @jribbink! - Adds support for optional complex types

v0.2.0-alpha.7

08 Jul 22:26
981d992
Compare
Choose a tag to compare
v0.2.0-alpha.7 Pre-release
Pre-release

Patch Changes

  • #95 972b96a Thanks @jribbink! - Remove residual references to flow-cadut and replace with @onflow/flow-cadut

v0.2.0-alpha.6

08 Jul 18:38
13b15d8
Compare
Choose a tag to compare
v0.2.0-alpha.6 Pre-release
Pre-release

Minor Changes

  • #66 c901f5a Thanks @hotrungnhan! - Add support for PublicPath/StoragePath/PrivatePath/CapabilityPath arguments

v0.1.16-alpha.5

04 Jul 17:48
7f1745d
Compare
Choose a tag to compare
v0.1.16-alpha.5 Pre-release
Pre-release

Patch Changes

  • 7c5ee7d: Strip strings from templates in parser to prevent bugs related to cadence keywords existing in strings

Custom Signers and Events Handling

25 Apr 09:20
6b6e7fd
Compare
Choose a tag to compare

⭐ Custom Signers

mutate and sendTransaction methods now can accept object for signers. This will allow you to use private keys directly and not through FCL popup. We will provide updated documentation to showcase how it can be used.

⭐ Basic Event Handler Implemented

We've added multiple methods, so it will be easier to look for specific event on chain.
Stay tuned for documentation on this feature.

📔 Goated Goats View

Goated Goats view was added allowing to easily fetch list of goats and traits for a specific address.

📔 Updated Tests for Flowns

One of the tests for Flowns resolver was outdated - it was fixed.

Path Arguments

22 Nov 22:55
a29dfe4
Compare
Choose a tag to compare

Path arguments are now supported by argument resolver.

Flowns Support

20 Nov 12:58
Compare
Choose a tag to compare

⭐ Native Flowns Support

Flowns decentralized domain service is now supported via respective plugin.
Below you can find an example how you can use it with flow-cadut:

import { setEnvironment, registerPlugin, executeScript } from "flow-cadut";
import { FLOWNS } from "flow-cadut/plugins/FLOWNS";

const resolveAddress = (name) => {
  const code = `
    pub fun main(address: Address): Address{
      return address
    }
  `;
  const args = [name];
  return executeScript({ code, args });
};

(async () => {
  await setEnvironment("testnet");
  await registerPlugin(FLOWNS);

  const [singular] = await resolveAddress("flowns.fn");
  const [plural] = await resolveAddress("flowns.fns");
  console.log({ singular, plural });
})();

You can run this example on [CodeSandbox](https://codesandbox.io/s/cadut-plugins-flowns-tzm7g?file=/src/index.js:0-705)

Plugin System is here!

19 Nov 13:27
7f5b31c
Compare
Choose a tag to compare

⭐ Plugin System

This release introduces Plugin System, which would ease integration with third-party libraries for additional functionality.
If you are developer, please refer to README file in plugins folder.

⭐ FIND Resolver

We have bundled FIND address resolver plugin into the package.
In order to use it you need to import plugin and register it with flow-cadut

Example

import { executeScript, setEnvironment, registerPlugin } from "flow-cadut";
import { FIND } from "flow-cadut/plugins/FIND";

(async () => {
  await setEnvironment("testnet");
  await registerPlugin(FIND);

  // Let's create some basic Cadence script, which will accept Address argument and return it's value
  const code = `
    pub fun main(addressBook: [Address]): [Address]{
      return address
    }
  `;
  const args = [
    // FIND address can be in prefixed "find:name"
    "find:bjarte",
    // or suffixed "name.find" form
    "bjarte.find",
  ];
  const [bjarte, err] = await executeScript({ code, args });
  if (!err) {
    console.log({ bjarte });
  }
})();

You can run aforementioned example in this CodeSandbox

Updated Build Process

01 Nov 16:12
41fca98
Compare
Choose a tag to compare

Updated Build Process

With new build process it should be possible to properly import flow-cadut for node and web environment.
Generator related files were moved into inner private package, so it shall not interfere with bundling anymore.