Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion samples/ethers-v5/config-overrides.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,12 @@ module.exports = override(
crypto: 'crypto-browserify',
stream: 'stream-browserify',
vm: false,
process: require.resolve('process/browser.js'), // Add .js extension
}
}),
addWebpackPlugin(
new webpack.ProvidePlugin({
process: 'process/browser',
process: 'process/browser.js', // Add .js extension
Buffer: ['buffer', 'Buffer']
})
)
Expand Down
4 changes: 3 additions & 1 deletion samples/ethers-v5/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
"version": "0.1.0",
"private": true,
"dependencies": {
"@bel2labs/sdk": "^0.0.1",
"@emotion/react": "^11.11.4",
"@emotion/styled": "^11.11.5",
"@mui/material": "^5.16.0",
Expand All @@ -16,6 +17,7 @@
"buffer": "^6.0.3",
"crypto-browserify": "^3.12.0",
"ethers": "5",
"process": "^0.11.10",
"react": "^18.3.1",
"react-dom": "^18.3.1",
"react-scripts": "5.0.1",
Expand Down Expand Up @@ -52,4 +54,4 @@
"node-polyfill-webpack-plugin": "^4.0.0",
"react-app-rewired": "^2.2.1"
}
}
}
1,945 changes: 1,079 additions & 866 deletions samples/ethers-v5/yarn.lock

Large diffs are not rendered by default.

7 changes: 4 additions & 3 deletions samples/ethers-v6/config-overrides.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,15 @@ const webpack = require('webpack');
module.exports = override(
addWebpackResolve({
fallback: {
crypto: 'crypto-browserify',
stream: 'stream-browserify',
crypto: require.resolve('crypto-browserify'),
stream: require.resolve('stream-browserify'),
vm: false,
process: require.resolve('process/browser.js'),
}
}),
addWebpackPlugin(
new webpack.ProvidePlugin({
process: 'process/browser',
process: 'process/browser.js',
Buffer: ['buffer', 'Buffer']
})
)
Expand Down
8 changes: 6 additions & 2 deletions samples/ethers-v6/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
"version": "0.1.0",
"private": true,
"dependencies": {
"@bel2labs/sdk": "^0.0.1",
"@emotion/react": "^11.11.4",
"@emotion/styled": "^11.11.5",
"@mui/material": "^5.16.0",
Expand All @@ -13,15 +14,18 @@
"@types/node": "^16.7.13",
"@types/react": "^18.0.0",
"@types/react-dom": "^18.0.0",
"add": "^2.0.6",
"buffer": "^6.0.3",
"crypto-browserify": "^3.12.0",
"ethers": "6",
"ethers": "^6.x.x",
"process": "^0.11.10",
"react": "^18.3.1",
"react-dom": "^18.3.1",
"react-scripts": "5.0.1",
"stream-browserify": "^3.0.0",
"typescript": "^4.4.2",
"web-vitals": "^2.1.0"
"web-vitals": "^2.1.0",
"yarn": "^1.22.22"
},
"scripts": {
"start": "PORT=2123 react-app-rewired start",
Expand Down
2,292 changes: 1,429 additions & 863 deletions samples/ethers-v6/yarn.lock

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { ContractTransactionResponse, JsonRpcProvider, JsonRpcSigner } from "ethersv6";
import { ContractTransactionResponse, JsonRpcProvider, JsonRpcSigner, Wallet } from "ethersv6";
import { getEVMRPCProvider } from "src/services/evm/providers/ethers-v6/read-only-provider";
import { prepareZKPProofParams } from "../../proof-params";
import { TransactionVerification } from "../../transaction-verification";
Expand Down Expand Up @@ -45,7 +45,7 @@ export class EthersV6TransactionVerification extends TransactionVerification {
*
* @param scriptHex If you want ZKP to ensure that a script output matches transaction outputs, pass the script HEX used by the transaction. This is optional.
*/
public async submitVerificationRequest(signer: JsonRpcSigner, scriptHex?: string): Promise<ContractTransactionResponse> {
public async submitVerificationRequest(signer: JsonRpcSigner|Wallet, scriptHex?: string): Promise<ContractTransactionResponse> {
// fetch all data required to construct the tx, store in memory
this.zkpProofParams = await prepareZKPProofParams(this.btcTxId);
if (!this.zkpProofParams)
Expand Down