Skip to content

Commit

Permalink
PRO-1968 - Updated Examples with ARKA public key (#71) [skip ci]
Browse files Browse the repository at this point in the history
  • Loading branch information
vignesha22 authored Nov 17, 2023
1 parent 61db48b commit 7b7bbdf
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 7 deletions.
5 changes: 4 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
# Changelog
## [1.3.11] - 2023-11-08
### Breaking Changes
- Removed api_key from estimate function on the sdk and added the same on the queryString, please refer examples/13-paymaster.ts for more info

### Bug Fixes
- Updated paymaster url to accept arka api_key and chainId as queryString
- Updated paymaster url to accept arka apiKey and chainId as queryString
- Added optional parameters such as entryPointAddress and Factory walletAddress for custom chain interaction
- Bug fixes for handling errors on connecting with custom chain interaction

Expand Down
4 changes: 2 additions & 2 deletions examples/13-paymaster.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ dotenv.config();

const recipient = '0x80a1874E1046B1cc5deFdf4D3153838B72fF94Ac'; // recipient wallet address
const value = '0.01'; // transfer value
const api_key = '';
const api_key = 'arka_public_key'; // Only testnets are available, if you need further assistance in setting up a paymaster service for your dapp, please reach out to us on discord or https://etherspot.fyi/arka/intro

async function main() {
// initializating sdk...
Expand All @@ -35,7 +35,7 @@ async function main() {
console.log('balances: ', balance);

// estimate transactions added to the batch and get the fee data for the UserOp
const op = await primeSdk.estimate({ url: `https://arka.etherspot.io?api_key=${api_key}&chainId=${Number(process.env.CHAIN_ID)}`, context: { mode: 'sponsor' } });
const op = await primeSdk.estimate({ url: `https://arka.etherspot.io?apiKey=${api_key}&chainId=${Number(process.env.CHAIN_ID)}`, context: { mode: 'sponsor' } });
console.log(`Estimate UserOp: ${await printOp(op)}`);

// sign the UserOp and sending to the bundler...
Expand Down
4 changes: 2 additions & 2 deletions examples/16-paymaster-arka.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ dotenv.config();
const recipient = '0x80a1874E1046B1cc5deFdf4D3153838B72fF94Ac'; // recipient wallet address
const value = '0.0001'; // transfer value

const arka_api_key = '';
const arka_url = '';
const arka_api_key = 'arka_public_key';
const arka_url = 'https://arka.etherspot.io'; // Only testnets are available, if you need further assistance in setting up a paymaster service for your dapp, please reach out to us on discord or https://etherspot.fyi/arka/intro
const queryString = `?apiKey=${arka_api_key}&chainId=${Number(process.env.CHAIN_ID)}`;

async function main() {
Expand Down
4 changes: 2 additions & 2 deletions examples/19-paymaster-validUntil-validAfter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ dotenv.config();
const recipient = '0x80a1874E1046B1cc5deFdf4D3153838B72fF94Ac'; // recipient wallet address
const value = '0.0001'; // transfer value

const arka_api_key = '';
const arka_url = '';
const arka_api_key = 'arka_public_key'; // Only testnets are available, if you need further assistance in setting up a paymaster service for your dapp, please reach out to us on discord or https://etherspot.fyi/arka/intro
const arka_url = 'https://arka.etherspot.io';
const queryString = `?apiKey=${arka_api_key}&chainId=${Number(process.env.CHAIN_ID)}`;

async function main() {
Expand Down

0 comments on commit 7b7bbdf

Please sign in to comment.