@rsksmart/powpeg-sdk 2.0.0-beta.0 → 2.0.0-beta.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/index.d.mts +3 -3
- package/dist/index.d.ts +3 -3
- package/dist/index.js +3 -3
- package/dist/index.mjs +3 -3
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -399,15 +399,15 @@ declare class PowPegSDK {
|
|
|
399
399
|
}>;
|
|
400
400
|
/**
|
|
401
401
|
* Sends a peg-out transaction (as returned by {@link createPegout}) using the given ethers signer
|
|
402
|
-
* and waits for it to be mined.
|
|
402
|
+
* and waits for it to be mined on the SDK's RSK RPC node.
|
|
403
403
|
* @param {UnsignedPegout} tx - The peg-out transaction request, as returned by {@link createPegout}. Forwarded to the signer as given, so gas, nonce and fee fields set by the caller are honoured; only an absent chain id is filled in.
|
|
404
404
|
* @param {ethers.Signer} signer - Ethers signer used to send the transaction.
|
|
405
|
-
* @returns The mined transaction receipt
|
|
405
|
+
* @returns The mined transaction receipt.
|
|
406
406
|
* @throws {WrongNetworkError} If the transaction's chain id, or the signer's chain, doesn't match the network the SDK was configured for.
|
|
407
407
|
* @throws {TransactionRevertedError} If the transaction was mined but reverted.
|
|
408
408
|
* @throws {PegoutRejectedError} If the transaction was mined but the Bridge rejected and refunded the release request.
|
|
409
409
|
*/
|
|
410
|
-
signAndBroadcastPegout(tx: UnsignedPegout, signer: ethers.Signer): Promise<ethers.providers.TransactionReceipt
|
|
410
|
+
signAndBroadcastPegout(tx: UnsignedPegout, signer: ethers.Signer): Promise<ethers.providers.TransactionReceipt>;
|
|
411
411
|
/**
|
|
412
412
|
* Fetches the current status of a peg-in or peg-out transaction from the configured API.
|
|
413
413
|
* @param {string} txHash - The Bitcoin or Rootstock transaction hash to look up.
|
package/dist/index.d.ts
CHANGED
|
@@ -399,15 +399,15 @@ declare class PowPegSDK {
|
|
|
399
399
|
}>;
|
|
400
400
|
/**
|
|
401
401
|
* Sends a peg-out transaction (as returned by {@link createPegout}) using the given ethers signer
|
|
402
|
-
* and waits for it to be mined.
|
|
402
|
+
* and waits for it to be mined on the SDK's RSK RPC node.
|
|
403
403
|
* @param {UnsignedPegout} tx - The peg-out transaction request, as returned by {@link createPegout}. Forwarded to the signer as given, so gas, nonce and fee fields set by the caller are honoured; only an absent chain id is filled in.
|
|
404
404
|
* @param {ethers.Signer} signer - Ethers signer used to send the transaction.
|
|
405
|
-
* @returns The mined transaction receipt
|
|
405
|
+
* @returns The mined transaction receipt.
|
|
406
406
|
* @throws {WrongNetworkError} If the transaction's chain id, or the signer's chain, doesn't match the network the SDK was configured for.
|
|
407
407
|
* @throws {TransactionRevertedError} If the transaction was mined but reverted.
|
|
408
408
|
* @throws {PegoutRejectedError} If the transaction was mined but the Bridge rejected and refunded the release request.
|
|
409
409
|
*/
|
|
410
|
-
signAndBroadcastPegout(tx: UnsignedPegout, signer: ethers.Signer): Promise<ethers.providers.TransactionReceipt
|
|
410
|
+
signAndBroadcastPegout(tx: UnsignedPegout, signer: ethers.Signer): Promise<ethers.providers.TransactionReceipt>;
|
|
411
411
|
/**
|
|
412
412
|
* Fetches the current status of a peg-in or peg-out transaction from the configured API.
|
|
413
413
|
* @param {string} txHash - The Bitcoin or Rootstock transaction hash to look up.
|
package/dist/index.js
CHANGED
|
@@ -1132,10 +1132,10 @@ var PowPegSDK = class {
|
|
|
1132
1132
|
}
|
|
1133
1133
|
/**
|
|
1134
1134
|
* Sends a peg-out transaction (as returned by {@link createPegout}) using the given ethers signer
|
|
1135
|
-
* and waits for it to be mined.
|
|
1135
|
+
* and waits for it to be mined on the SDK's RSK RPC node.
|
|
1136
1136
|
* @param {UnsignedPegout} tx - The peg-out transaction request, as returned by {@link createPegout}. Forwarded to the signer as given, so gas, nonce and fee fields set by the caller are honoured; only an absent chain id is filled in.
|
|
1137
1137
|
* @param {ethers.Signer} signer - Ethers signer used to send the transaction.
|
|
1138
|
-
* @returns The mined transaction receipt
|
|
1138
|
+
* @returns The mined transaction receipt.
|
|
1139
1139
|
* @throws {WrongNetworkError} If the transaction's chain id, or the signer's chain, doesn't match the network the SDK was configured for.
|
|
1140
1140
|
* @throws {TransactionRevertedError} If the transaction was mined but reverted.
|
|
1141
1141
|
* @throws {PegoutRejectedError} If the transaction was mined but the Bridge rejected and refunded the release request.
|
|
@@ -1159,7 +1159,7 @@ var PowPegSDK = class {
|
|
|
1159
1159
|
throw new WrongNetworkError(`Signer is on chain ${signerChainId}, but the SDK is configured for ${this.network} (chain ${expectedChainId}).`);
|
|
1160
1160
|
}
|
|
1161
1161
|
const { hash } = await signer.sendTransaction(request);
|
|
1162
|
-
const receipt = await
|
|
1162
|
+
const receipt = await this.rskProvider.waitForTransaction(hash);
|
|
1163
1163
|
if (receipt) {
|
|
1164
1164
|
if (receipt.status === 0) {
|
|
1165
1165
|
throw new TransactionRevertedError(hash, receipt, `The peg-out transaction ${hash} was mined but reverted; no BTC release was requested.`);
|
package/dist/index.mjs
CHANGED
|
@@ -1079,10 +1079,10 @@ var PowPegSDK = class {
|
|
|
1079
1079
|
}
|
|
1080
1080
|
/**
|
|
1081
1081
|
* Sends a peg-out transaction (as returned by {@link createPegout}) using the given ethers signer
|
|
1082
|
-
* and waits for it to be mined.
|
|
1082
|
+
* and waits for it to be mined on the SDK's RSK RPC node.
|
|
1083
1083
|
* @param {UnsignedPegout} tx - The peg-out transaction request, as returned by {@link createPegout}. Forwarded to the signer as given, so gas, nonce and fee fields set by the caller are honoured; only an absent chain id is filled in.
|
|
1084
1084
|
* @param {ethers.Signer} signer - Ethers signer used to send the transaction.
|
|
1085
|
-
* @returns The mined transaction receipt
|
|
1085
|
+
* @returns The mined transaction receipt.
|
|
1086
1086
|
* @throws {WrongNetworkError} If the transaction's chain id, or the signer's chain, doesn't match the network the SDK was configured for.
|
|
1087
1087
|
* @throws {TransactionRevertedError} If the transaction was mined but reverted.
|
|
1088
1088
|
* @throws {PegoutRejectedError} If the transaction was mined but the Bridge rejected and refunded the release request.
|
|
@@ -1106,7 +1106,7 @@ var PowPegSDK = class {
|
|
|
1106
1106
|
throw new WrongNetworkError(`Signer is on chain ${signerChainId}, but the SDK is configured for ${this.network} (chain ${expectedChainId}).`);
|
|
1107
1107
|
}
|
|
1108
1108
|
const { hash } = await signer.sendTransaction(request);
|
|
1109
|
-
const receipt = await
|
|
1109
|
+
const receipt = await this.rskProvider.waitForTransaction(hash);
|
|
1110
1110
|
if (receipt) {
|
|
1111
1111
|
if (receipt.status === 0) {
|
|
1112
1112
|
throw new TransactionRevertedError(hash, receipt, `The peg-out transaction ${hash} was mined but reverted; no BTC release was requested.`);
|
package/package.json
CHANGED