I found in TS SDK docs that I have to use forc build for predicate sway code to get bin code, but after running this command I have in out folder these files
What is best practice to I need to use with saving this bin project ?
In case where I provide just import/export of this file and provide it to new Provider entity it fails with next error
@sway if you’re using the abi typegen command to interact with the predicate, then within the autogenerated typescript files, you will already have the hexlified binary that can be passed to a provider. You should be able to access it like so:
import { MyPredicateFactory } from "./predicates";
const bin = MyPredicateFactory.bin;
However, I can appreciate that accessing static properties on a factory class also doesn’t feel like appropriate user experience, we should probably be exporting those from "./predicates/index.ts" also .
As @danielbate said, you can use the generated factory class for your Predicate (if you’re using Typegen), or you can also do it manually, as described here: