koilib 4.1.1 → 4.1.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 +8 -8
- package/dist/koinos.min.js +1 -1
- package/lib/Provider.d.ts +5 -2
- package/lib/Provider.js +7 -1
- package/lib/Provider.js.map +1 -1
- package/lib/Signer.js +1 -7
- package/lib/Signer.js.map +1 -1
- package/lib/browser/Provider.d.ts +5 -2
- package/lib/browser/Provider.js +7 -1
- package/lib/browser/Provider.js.map +1 -1
- package/lib/browser/Signer.js +1 -7
- package/lib/browser/Signer.js.map +1 -1
- package/package.json +1 -1
package/dist/koinos.js
CHANGED
|
@@ -10391,9 +10391,15 @@ class Provider {
|
|
|
10391
10391
|
/**
|
|
10392
10392
|
* Function to call "chain.submit_transaction" to send a signed
|
|
10393
10393
|
* transaction to the blockchain.
|
|
10394
|
+
* @returns It returns the receipt received from the RPC node
|
|
10395
|
+
* and the transaction with the arrow function "wait" (see [[wait]])
|
|
10394
10396
|
*/
|
|
10395
10397
|
async sendTransaction(transaction) {
|
|
10396
|
-
|
|
10398
|
+
const response = await this.call("chain.submit_transaction", { transaction });
|
|
10399
|
+
transaction.wait = async (type = "byBlock", timeout = 60000) => {
|
|
10400
|
+
return this.wait(transaction.id, type, timeout);
|
|
10401
|
+
};
|
|
10402
|
+
return { ...response, transaction: transaction };
|
|
10397
10403
|
}
|
|
10398
10404
|
/**
|
|
10399
10405
|
* Function to call "chain.submit_block" to send a signed
|
|
@@ -10957,13 +10963,7 @@ class Signer {
|
|
|
10957
10963
|
tx = await this.signTransaction(tx);
|
|
10958
10964
|
if (!this.provider)
|
|
10959
10965
|
throw new Error("provider is undefined");
|
|
10960
|
-
|
|
10961
|
-
tx.wait = async (type = "byBlock", timeout = 60000) => {
|
|
10962
|
-
if (!this.provider)
|
|
10963
|
-
throw new Error("provider is undefined");
|
|
10964
|
-
return this.provider.wait(tx.id, type, timeout);
|
|
10965
|
-
};
|
|
10966
|
-
return { receipt, transaction: tx };
|
|
10966
|
+
return this.provider.sendTransaction(tx);
|
|
10967
10967
|
}
|
|
10968
10968
|
/**
|
|
10969
10969
|
* Function to recover the public key from hash and signature
|