koilib 5.2.0 → 5.2.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 +16 -2
- package/dist/koinos.min.js +1 -1
- package/lib/Contract.d.ts +1 -1
- package/lib/Contract.js +16 -2
- package/lib/Contract.js.map +1 -1
- package/lib/browser/Contract.d.ts +1 -1
- package/lib/browser/Contract.js +16 -2
- package/lib/browser/Contract.js.map +1 -1
- package/lib/browser/interface.d.ts +20 -0
- package/lib/interface.d.ts +20 -0
- package/package.json +1 -1
package/dist/koinos.js
CHANGED
|
@@ -10029,6 +10029,9 @@ class Contract {
|
|
|
10029
10029
|
args = argu;
|
|
10030
10030
|
}
|
|
10031
10031
|
const operation = await this.encodeOperation({ name, args });
|
|
10032
|
+
if (opts.onlyOperation) {
|
|
10033
|
+
return { operation };
|
|
10034
|
+
}
|
|
10032
10035
|
if (readOnly) {
|
|
10033
10036
|
if (!output)
|
|
10034
10037
|
throw new Error(`No output defined for ${name}`);
|
|
@@ -10054,7 +10057,11 @@ class Contract {
|
|
|
10054
10057
|
...(opts.payer && { payer: opts.payer }),
|
|
10055
10058
|
...(opts.payee && { payee: opts.payee }),
|
|
10056
10059
|
},
|
|
10057
|
-
operations: [
|
|
10060
|
+
operations: [
|
|
10061
|
+
...(opts.previousOperations ? opts.previousOperations : []),
|
|
10062
|
+
operation,
|
|
10063
|
+
...(opts.nextOperations ? opts.nextOperations : []),
|
|
10064
|
+
],
|
|
10058
10065
|
});
|
|
10059
10066
|
const optsSend = {
|
|
10060
10067
|
broadcast: opts.broadcast,
|
|
@@ -10160,6 +10167,9 @@ class Contract {
|
|
|
10160
10167
|
}),
|
|
10161
10168
|
},
|
|
10162
10169
|
};
|
|
10170
|
+
if (opts.onlyOperation) {
|
|
10171
|
+
return { operation };
|
|
10172
|
+
}
|
|
10163
10173
|
let tx = await this.signer.prepareTransaction({
|
|
10164
10174
|
header: {
|
|
10165
10175
|
...(opts.chainId && { chain_id: opts.chainId }),
|
|
@@ -10168,7 +10178,11 @@ class Contract {
|
|
|
10168
10178
|
...(opts.payer && { payer: opts.payer }),
|
|
10169
10179
|
...(opts.payee && { payee: opts.payee }),
|
|
10170
10180
|
},
|
|
10171
|
-
operations: [
|
|
10181
|
+
operations: [
|
|
10182
|
+
...(opts.previousOperations ? opts.previousOperations : []),
|
|
10183
|
+
operation,
|
|
10184
|
+
...(opts.nextOperations ? opts.nextOperations : []),
|
|
10185
|
+
],
|
|
10172
10186
|
});
|
|
10173
10187
|
const optsSend = {
|
|
10174
10188
|
broadcast: opts.broadcast,
|