koilib 5.5.0 → 5.5.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/koinos.js CHANGED
@@ -22783,10 +22783,16 @@ class Contract {
22783
22783
  return (0, utils_1.encodeBase58)(this.id);
22784
22784
  }
22785
22785
  /**
22786
- * Fetch the ABI from the contract meta store. The provider must
22787
- * have contract_meta_store microservice enabled.
22786
+ * Fetch the ABI from the contract meta store and save it in the
22787
+ * abi of the contract. The provider must have contract_meta_store
22788
+ * microservice enabled.
22789
+ * @param opts - options object with 2 boolean: 1) updateFunctions to
22790
+ * specify if the contract functions should be regenerated based on
22791
+ * the new ABI, and 2) updateSerializer to determine if the serializer
22792
+ * should be updated with the types in the new ABI.
22793
+ * @returns the new ABI saved in the contract
22788
22794
  */
22789
- async fetcthAbi(opts = {
22795
+ async fetchAbi(opts = {
22790
22796
  updateFunctions: true,
22791
22797
  updateSerializer: true,
22792
22798
  }) {
@@ -23592,7 +23598,7 @@ class Serializer {
23592
23598
  };
23593
23599
  this.types = types;
23594
23600
  if (typeof types === "string") {
23595
- const protos = koinosPbToProto.convert(types);
23601
+ const protos = koinosPbToProto.convert((0, utils_1.decodeBase64)(types));
23596
23602
  this.root = new protobufjs_1.Root();
23597
23603
  for (const proto of protos) {
23598
23604
  (0, protobufjs_1.parse)(proto.definition, this.root, { keepCase: true });