koilib 5.5.0 → 5.5.2
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 +11 -5
- package/dist/koinos.min.js +1 -1
- package/lib/Contract.d.ts +9 -3
- package/lib/Contract.js +9 -3
- package/lib/Contract.js.map +1 -1
- package/lib/Serializer.js +1 -1
- package/lib/Serializer.js.map +1 -1
- package/lib/Transaction.js +1 -1
- package/lib/Transaction.js.map +1 -1
- package/lib/browser/Contract.d.ts +9 -3
- package/lib/browser/Contract.js +9 -3
- package/lib/browser/Contract.js.map +1 -1
- package/lib/browser/Serializer.js +1 -1
- package/lib/browser/Serializer.js.map +1 -1
- package/lib/browser/Transaction.js +1 -1
- package/lib/browser/Transaction.js.map +1 -1
- package/package.json +1 -1
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
|
|
22787
|
-
*
|
|
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
|
|
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 });
|
|
@@ -24598,7 +24604,7 @@ class Transaction {
|
|
|
24598
24604
|
async send(options) {
|
|
24599
24605
|
const opts = {
|
|
24600
24606
|
...this.options,
|
|
24601
|
-
options,
|
|
24607
|
+
...options,
|
|
24602
24608
|
};
|
|
24603
24609
|
if (!this.transaction.id)
|
|
24604
24610
|
await this.prepare();
|