@actalink/sdkv2 0.1.2 → 0.1.4

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.cjs CHANGED
@@ -90,7 +90,6 @@ __export(index_exports, {
90
90
  fetchRecurringTransactionWithId: () => fetchRecurringTransactionWithId,
91
91
  getChainById: () => getChainById,
92
92
  getChainExplorerByChainId: () => getChainExplorerByChainId,
93
- getPimlicoRpcByChainId: () => getPimlicoRpcByChainId,
94
93
  getTokenByChainIdAndAddress: () => getTokenByChainIdAndAddress,
95
94
  getTokenByChainIdAndSymbol: () => getTokenByChainIdAndSymbol,
96
95
  lineaDAI: () => lineaDAI,
@@ -744,34 +743,6 @@ var import_ecdsa_validator = require("@zerodev/ecdsa-validator");
744
743
  var import_permissionless = require("permissionless");
745
744
  var import_pimlico = require("permissionless/clients/pimlico");
746
745
 
747
- // src/rpc.ts
748
- function getPimlicoRpcByChainId(chainId) {
749
- switch (chainId) {
750
- case 1:
751
- return `https://api.pimlico.io/v2/${chainId}/rpc?apikey=pim_89hjqCpssGqr5sBrcSLBfV`;
752
- case 10:
753
- return `https://api.pimlico.io/v2/${chainId}/rpc?apikey=pim_89hjqCpssGqr5sBrcSLBfV`;
754
- case 56:
755
- return `https://api.pimlico.io/v2/${chainId}/rpc?apikey=pim_89hjqCpssGqr5sBrcSLBfV`;
756
- case 137:
757
- return `https://api.pimlico.io/v2/${chainId}/rpc?apikey=pim_89hjqCpssGqr5sBrcSLBfV`;
758
- case 8453:
759
- return `https://api.pimlico.io/v2/${chainId}/rpc?apikey=pim_89hjqCpssGqr5sBrcSLBfV`;
760
- case 42161:
761
- return `https://api.pimlico.io/v2/${chainId}/rpc?apikey=pim_89hjqCpssGqr5sBrcSLBfV`;
762
- case 59144:
763
- return `https://api.pimlico.io/v2/${chainId}/rpc?apikey=pim_89hjqCpssGqr5sBrcSLBfV`;
764
- case 80002:
765
- return `https://api.pimlico.io/v2/${chainId}/rpc?apikey=pim_89hjqCpssGqr5sBrcSLBfV`;
766
- case 84532:
767
- return `https://api.pimlico.io/v2/${chainId}/rpc?apikey=pim_89hjqCpssGqr5sBrcSLBfV`;
768
- case 11155111:
769
- return `https://api.pimlico.io/v2/${chainId}/rpc?apikey=pim_89hjqCpssGqr5sBrcSLBfV`;
770
- default:
771
- return void 0;
772
- }
773
- }
774
-
775
746
  // src/viemClient.ts
776
747
  var import_viem3 = require("viem");
777
748
  var ViemClient = class {
@@ -834,6 +805,13 @@ var ViemClient = class {
834
805
  var import_signers = require("@zerodev/permissions/signers");
835
806
  var import_permissions = require("@zerodev/permissions");
836
807
  var import_policies = require("@zerodev/permissions/policies");
808
+
809
+ // src/constants.ts
810
+ var ACCESS_URL = "https://flex.acta.link/flex/deposit";
811
+ var ACCESS_TESTNET_URL = "https://flex.acta.link/flex/deposit/test";
812
+ var PROXY_URL = `https://api.acta.link/proxy/v1`;
813
+
814
+ // src/account.ts
837
815
  var ActaAccount = class {
838
816
  constructor(publicClient, signer) {
839
817
  this.signer = signer;
@@ -868,18 +846,18 @@ var ActaAccount = class {
868
846
  const account = yield this.createAccount();
869
847
  const entryPoint = (0, import_constants.getEntryPoint)("0.7");
870
848
  const paymasterClient = (0, import_account_abstraction.createPaymasterClient)({
871
- transport: (0, import_viem4.http)(getPimlicoRpcByChainId(chainId))
849
+ transport: (0, import_viem4.http)(`${PROXY_URL}/rpc?chainId=${chainId}`)
872
850
  });
873
851
  const pimlicoClient = (0, import_pimlico.createPimlicoClient)({
874
852
  chain: getChainById(chainId),
875
- transport: (0, import_viem4.http)(getPimlicoRpcByChainId(chainId)),
853
+ transport: (0, import_viem4.http)(`${PROXY_URL}/rpc?chainId=${chainId}`),
876
854
  entryPoint
877
855
  });
878
856
  const accountClient = (0, import_permissionless.createSmartAccountClient)({
879
857
  account,
880
858
  chain: getChainById(chainId),
881
859
  paymaster: paymasterClient,
882
- bundlerTransport: (0, import_viem4.http)(getPimlicoRpcByChainId(chainId)),
860
+ bundlerTransport: (0, import_viem4.http)(`${PROXY_URL}/rpc?chainId=${chainId}`),
883
861
  userOperation: {
884
862
  estimateFeesPerGas: () => __async(this, null, function* () {
885
863
  return (yield pimlicoClient.getUserOperationGasPrice()).fast;
@@ -890,7 +868,7 @@ var ActaAccount = class {
890
868
  account,
891
869
  chain: getChainById(chainId),
892
870
  paymaster: paymasterClient,
893
- bundlerTransport: (0, import_viem4.http)(getPimlicoRpcByChainId(chainId)),
871
+ bundlerTransport: (0, import_viem4.http)(`${PROXY_URL}/rpc?chainId=${chainId}`),
894
872
  userOperation: {
895
873
  estimateFeesPerGas: () => __async(this, null, function* () {
896
874
  return (yield pimlicoClient.getUserOperationGasPrice()).fast;
@@ -1320,12 +1298,6 @@ function waitForPaymentStatus(url, id, intervalMs = 2e3) {
1320
1298
 
1321
1299
  // src/execution/access.ts
1322
1300
  var import_viem5 = require("viem");
1323
-
1324
- // src/constants.ts
1325
- var ACCESS_URL = "https://api.acta.link/deposit";
1326
- var ACCESS_TESTNET_URL = "https://api.acta.link/deposit/test";
1327
-
1328
- // src/execution/access.ts
1329
1301
  var returnEnvUrl = (chainId) => {
1330
1302
  const mainnetChain = mainnetChains.find((c) => c.id === chainId);
1331
1303
  const testnetChain = testnetChains.find((c) => c.id === chainId);
@@ -1596,7 +1568,6 @@ var ActaAccessSDK = class {
1596
1568
  fetchRecurringTransactionWithId,
1597
1569
  getChainById,
1598
1570
  getChainExplorerByChainId,
1599
- getPimlicoRpcByChainId,
1600
1571
  getTokenByChainIdAndAddress,
1601
1572
  getTokenByChainIdAndSymbol,
1602
1573
  lineaDAI,
package/dist/index.d.cts CHANGED
@@ -21,7 +21,7 @@ declare const ActaAccessConfigSchema: z.ZodObject<{
21
21
  projectId: z.ZodString;
22
22
  }, z.core.$strip>;
23
23
  declare const CreateSinglePaymentSchema: z.ZodObject<{
24
- signerAddress: z.ZodPipe<z.ZodString, z.ZodTransform<`0x${string}`, string>>;
24
+ signerAddress: z.ZodPipe<z.ZodString & z.ZodType<`0x${string}`, string, z.core.$ZodTypeInternals<`0x${string}`, string>>, z.ZodTransform<`0x${string}`, `0x${string}`>>;
25
25
  chainId: z.ZodUnion<readonly [z.ZodLiteral<1>, z.ZodLiteral<42161>, z.ZodLiteral<8453>, z.ZodLiteral<59144>, z.ZodLiteral<56>, z.ZodLiteral<10>, z.ZodLiteral<137>, z.ZodLiteral<84532>, z.ZodLiteral<11155111>, z.ZodLiteral<80002>]>;
26
26
  publicClient: z.ZodCustom<{
27
27
  account: undefined;
@@ -16092,11 +16092,11 @@ declare const CreateSinglePaymentSchema: z.ZodObject<{
16092
16092
  USDT: "USDT";
16093
16093
  }>;
16094
16094
  amount: z.ZodBigInt;
16095
- receiver: z.ZodPipe<z.ZodString, z.ZodTransform<`0x${string}`, string>>;
16095
+ receiver: z.ZodPipe<z.ZodString & z.ZodType<`0x${string}`, string, z.core.$ZodTypeInternals<`0x${string}`, string>>, z.ZodTransform<`0x${string}`, `0x${string}`>>;
16096
16096
  allowMaxTokenApproval: z.ZodBoolean;
16097
16097
  }, z.core.$strip>;
16098
16098
  declare const CreateRecurringPaymentSchema: z.ZodObject<{
16099
- signerAddress: z.ZodPipe<z.ZodString, z.ZodTransform<`0x${string}`, string>>;
16099
+ signerAddress: z.ZodPipe<z.ZodString & z.ZodType<`0x${string}`, string, z.core.$ZodTypeInternals<`0x${string}`, string>>, z.ZodTransform<`0x${string}`, `0x${string}`>>;
16100
16100
  chainId: z.ZodUnion<readonly [z.ZodLiteral<1>, z.ZodLiteral<42161>, z.ZodLiteral<8453>, z.ZodLiteral<59144>, z.ZodLiteral<56>, z.ZodLiteral<10>, z.ZodLiteral<137>, z.ZodLiteral<84532>, z.ZodLiteral<11155111>, z.ZodLiteral<80002>]>;
16101
16101
  publicClient: z.ZodCustom<{
16102
16102
  account: undefined;
@@ -32167,7 +32167,7 @@ declare const CreateRecurringPaymentSchema: z.ZodObject<{
32167
32167
  USDT: "USDT";
32168
32168
  }>;
32169
32169
  amount: z.ZodBigInt;
32170
- receiver: z.ZodPipe<z.ZodString, z.ZodTransform<`0x${string}`, string>>;
32170
+ receiver: z.ZodPipe<z.ZodString & z.ZodType<`0x${string}`, string, z.core.$ZodTypeInternals<`0x${string}`, string>>, z.ZodTransform<`0x${string}`, `0x${string}`>>;
32171
32171
  allowMaxTokenApproval: z.ZodBoolean;
32172
32172
  count: z.ZodNumber;
32173
32173
  intervalUnit: z.ZodEnum<{
@@ -32178,7 +32178,7 @@ declare const CreateRecurringPaymentSchema: z.ZodObject<{
32178
32178
  }>;
32179
32179
  }, z.core.$strip>;
32180
32180
  declare const EstimateSinglePaymentGasSchema: z.ZodObject<{
32181
- signerAddress: z.ZodPipe<z.ZodString, z.ZodTransform<`0x${string}`, string>>;
32181
+ signerAddress: z.ZodPipe<z.ZodString & z.ZodType<`0x${string}`, string, z.core.$ZodTypeInternals<`0x${string}`, string>>, z.ZodTransform<`0x${string}`, `0x${string}`>>;
32182
32182
  chainId: z.ZodUnion<readonly [z.ZodLiteral<1>, z.ZodLiteral<42161>, z.ZodLiteral<8453>, z.ZodLiteral<59144>, z.ZodLiteral<56>, z.ZodLiteral<10>, z.ZodLiteral<137>, z.ZodLiteral<84532>, z.ZodLiteral<11155111>, z.ZodLiteral<80002>]>;
32183
32183
  publicClient: z.ZodCustom<{
32184
32184
  account: undefined;
@@ -48249,7 +48249,7 @@ declare const EstimateSinglePaymentGasSchema: z.ZodObject<{
48249
48249
  USDT: "USDT";
48250
48250
  }>;
48251
48251
  amount: z.ZodBigInt;
48252
- receiver: z.ZodPipe<z.ZodString, z.ZodTransform<`0x${string}`, string>>;
48252
+ receiver: z.ZodPipe<z.ZodString & z.ZodType<`0x${string}`, string, z.core.$ZodTypeInternals<`0x${string}`, string>>, z.ZodTransform<`0x${string}`, `0x${string}`>>;
48253
48253
  }, z.core.$strip>;
48254
48254
  declare const PaymentStatusSchema: z.ZodObject<{
48255
48255
  id: z.ZodString;
@@ -52913,8 +52913,6 @@ declare class ViemClient {
52913
52913
  checkAndApproveToken(token: Token, spender: Address, amount: bigint, allowMaxTokenApproval: boolean): Promise<bigint>;
52914
52914
  }
52915
52915
 
52916
- declare function getPimlicoRpcByChainId(chainId: number): string | undefined;
52917
-
52918
52916
  declare enum HttpMethod {
52919
52917
  GET = "GET",
52920
52918
  POST = "POST",
@@ -52978,4 +52976,4 @@ declare class ActaAccessSDK {
52978
52976
  waitForPaymentStatus(id: string, intervalMs?: number): Promise<PaymentStatus>;
52979
52977
  }
52980
52978
 
52981
- export { ActaAccessSDK, ActaAccount, HttpMethod, type HttpRequest, type JsonResponse, ViemClient, arbitrumDAI, arbitrumETH, arbitrumUSDC, arbitrumUSDCe, arbitrumUSDT, arbitrumWETH, baseDAI, baseETH, baseEURC, baseSepoliaUSDC, baseUSDC, baseUSDT, baseUSDbC, baseWETH, bscBNB, bscUSDC, bscUSDT, bscWBNB, ethereumDAI, ethereumETH, ethereumEURC, ethereumUSDC, ethereumUSDT, ethereumWETH, executeSinglePaymentAPICall, fetchPaymentStatus, fetchRecurringTransactionWithId, getChainById, getChainExplorerByChainId, getPimlicoRpcByChainId, getTokenByChainIdAndAddress, getTokenByChainIdAndSymbol, lineaDAI, lineaETH, lineaUSDC, lineaWETH, mainnetChains, optimismDAI, optimismETH, optimismUSDC, optimismUSDCe, optimismUSDT, optimismWETH, polygonAmoyUSDC, polygonDAI, polygonPOL, polygonUSDC, polygonUSDCe, polygonUSDT, polygonWETH, polygonWPOL, scheduleRecurringPaymentsAPICall, sendRequest, sepoliaUSDC, supportedChains, supportedTokensByChain, testnetChains, token, tokensCommonSymbols, waitForPaymentStatus };
52979
+ export { ActaAccessSDK, ActaAccount, HttpMethod, type HttpRequest, type JsonResponse, ViemClient, arbitrumDAI, arbitrumETH, arbitrumUSDC, arbitrumUSDCe, arbitrumUSDT, arbitrumWETH, baseDAI, baseETH, baseEURC, baseSepoliaUSDC, baseUSDC, baseUSDT, baseUSDbC, baseWETH, bscBNB, bscUSDC, bscUSDT, bscWBNB, ethereumDAI, ethereumETH, ethereumEURC, ethereumUSDC, ethereumUSDT, ethereumWETH, executeSinglePaymentAPICall, fetchPaymentStatus, fetchRecurringTransactionWithId, getChainById, getChainExplorerByChainId, getTokenByChainIdAndAddress, getTokenByChainIdAndSymbol, lineaDAI, lineaETH, lineaUSDC, lineaWETH, mainnetChains, optimismDAI, optimismETH, optimismUSDC, optimismUSDCe, optimismUSDT, optimismWETH, polygonAmoyUSDC, polygonDAI, polygonPOL, polygonUSDC, polygonUSDCe, polygonUSDT, polygonWETH, polygonWPOL, scheduleRecurringPaymentsAPICall, sendRequest, sepoliaUSDC, supportedChains, supportedTokensByChain, testnetChains, token, tokensCommonSymbols, waitForPaymentStatus };
package/dist/index.d.ts CHANGED
@@ -21,7 +21,7 @@ declare const ActaAccessConfigSchema: z.ZodObject<{
21
21
  projectId: z.ZodString;
22
22
  }, z.core.$strip>;
23
23
  declare const CreateSinglePaymentSchema: z.ZodObject<{
24
- signerAddress: z.ZodPipe<z.ZodString, z.ZodTransform<`0x${string}`, string>>;
24
+ signerAddress: z.ZodPipe<z.ZodString & z.ZodType<`0x${string}`, string, z.core.$ZodTypeInternals<`0x${string}`, string>>, z.ZodTransform<`0x${string}`, `0x${string}`>>;
25
25
  chainId: z.ZodUnion<readonly [z.ZodLiteral<1>, z.ZodLiteral<42161>, z.ZodLiteral<8453>, z.ZodLiteral<59144>, z.ZodLiteral<56>, z.ZodLiteral<10>, z.ZodLiteral<137>, z.ZodLiteral<84532>, z.ZodLiteral<11155111>, z.ZodLiteral<80002>]>;
26
26
  publicClient: z.ZodCustom<{
27
27
  account: undefined;
@@ -16092,11 +16092,11 @@ declare const CreateSinglePaymentSchema: z.ZodObject<{
16092
16092
  USDT: "USDT";
16093
16093
  }>;
16094
16094
  amount: z.ZodBigInt;
16095
- receiver: z.ZodPipe<z.ZodString, z.ZodTransform<`0x${string}`, string>>;
16095
+ receiver: z.ZodPipe<z.ZodString & z.ZodType<`0x${string}`, string, z.core.$ZodTypeInternals<`0x${string}`, string>>, z.ZodTransform<`0x${string}`, `0x${string}`>>;
16096
16096
  allowMaxTokenApproval: z.ZodBoolean;
16097
16097
  }, z.core.$strip>;
16098
16098
  declare const CreateRecurringPaymentSchema: z.ZodObject<{
16099
- signerAddress: z.ZodPipe<z.ZodString, z.ZodTransform<`0x${string}`, string>>;
16099
+ signerAddress: z.ZodPipe<z.ZodString & z.ZodType<`0x${string}`, string, z.core.$ZodTypeInternals<`0x${string}`, string>>, z.ZodTransform<`0x${string}`, `0x${string}`>>;
16100
16100
  chainId: z.ZodUnion<readonly [z.ZodLiteral<1>, z.ZodLiteral<42161>, z.ZodLiteral<8453>, z.ZodLiteral<59144>, z.ZodLiteral<56>, z.ZodLiteral<10>, z.ZodLiteral<137>, z.ZodLiteral<84532>, z.ZodLiteral<11155111>, z.ZodLiteral<80002>]>;
16101
16101
  publicClient: z.ZodCustom<{
16102
16102
  account: undefined;
@@ -32167,7 +32167,7 @@ declare const CreateRecurringPaymentSchema: z.ZodObject<{
32167
32167
  USDT: "USDT";
32168
32168
  }>;
32169
32169
  amount: z.ZodBigInt;
32170
- receiver: z.ZodPipe<z.ZodString, z.ZodTransform<`0x${string}`, string>>;
32170
+ receiver: z.ZodPipe<z.ZodString & z.ZodType<`0x${string}`, string, z.core.$ZodTypeInternals<`0x${string}`, string>>, z.ZodTransform<`0x${string}`, `0x${string}`>>;
32171
32171
  allowMaxTokenApproval: z.ZodBoolean;
32172
32172
  count: z.ZodNumber;
32173
32173
  intervalUnit: z.ZodEnum<{
@@ -32178,7 +32178,7 @@ declare const CreateRecurringPaymentSchema: z.ZodObject<{
32178
32178
  }>;
32179
32179
  }, z.core.$strip>;
32180
32180
  declare const EstimateSinglePaymentGasSchema: z.ZodObject<{
32181
- signerAddress: z.ZodPipe<z.ZodString, z.ZodTransform<`0x${string}`, string>>;
32181
+ signerAddress: z.ZodPipe<z.ZodString & z.ZodType<`0x${string}`, string, z.core.$ZodTypeInternals<`0x${string}`, string>>, z.ZodTransform<`0x${string}`, `0x${string}`>>;
32182
32182
  chainId: z.ZodUnion<readonly [z.ZodLiteral<1>, z.ZodLiteral<42161>, z.ZodLiteral<8453>, z.ZodLiteral<59144>, z.ZodLiteral<56>, z.ZodLiteral<10>, z.ZodLiteral<137>, z.ZodLiteral<84532>, z.ZodLiteral<11155111>, z.ZodLiteral<80002>]>;
32183
32183
  publicClient: z.ZodCustom<{
32184
32184
  account: undefined;
@@ -48249,7 +48249,7 @@ declare const EstimateSinglePaymentGasSchema: z.ZodObject<{
48249
48249
  USDT: "USDT";
48250
48250
  }>;
48251
48251
  amount: z.ZodBigInt;
48252
- receiver: z.ZodPipe<z.ZodString, z.ZodTransform<`0x${string}`, string>>;
48252
+ receiver: z.ZodPipe<z.ZodString & z.ZodType<`0x${string}`, string, z.core.$ZodTypeInternals<`0x${string}`, string>>, z.ZodTransform<`0x${string}`, `0x${string}`>>;
48253
48253
  }, z.core.$strip>;
48254
48254
  declare const PaymentStatusSchema: z.ZodObject<{
48255
48255
  id: z.ZodString;
@@ -52913,8 +52913,6 @@ declare class ViemClient {
52913
52913
  checkAndApproveToken(token: Token, spender: Address, amount: bigint, allowMaxTokenApproval: boolean): Promise<bigint>;
52914
52914
  }
52915
52915
 
52916
- declare function getPimlicoRpcByChainId(chainId: number): string | undefined;
52917
-
52918
52916
  declare enum HttpMethod {
52919
52917
  GET = "GET",
52920
52918
  POST = "POST",
@@ -52978,4 +52976,4 @@ declare class ActaAccessSDK {
52978
52976
  waitForPaymentStatus(id: string, intervalMs?: number): Promise<PaymentStatus>;
52979
52977
  }
52980
52978
 
52981
- export { ActaAccessSDK, ActaAccount, HttpMethod, type HttpRequest, type JsonResponse, ViemClient, arbitrumDAI, arbitrumETH, arbitrumUSDC, arbitrumUSDCe, arbitrumUSDT, arbitrumWETH, baseDAI, baseETH, baseEURC, baseSepoliaUSDC, baseUSDC, baseUSDT, baseUSDbC, baseWETH, bscBNB, bscUSDC, bscUSDT, bscWBNB, ethereumDAI, ethereumETH, ethereumEURC, ethereumUSDC, ethereumUSDT, ethereumWETH, executeSinglePaymentAPICall, fetchPaymentStatus, fetchRecurringTransactionWithId, getChainById, getChainExplorerByChainId, getPimlicoRpcByChainId, getTokenByChainIdAndAddress, getTokenByChainIdAndSymbol, lineaDAI, lineaETH, lineaUSDC, lineaWETH, mainnetChains, optimismDAI, optimismETH, optimismUSDC, optimismUSDCe, optimismUSDT, optimismWETH, polygonAmoyUSDC, polygonDAI, polygonPOL, polygonUSDC, polygonUSDCe, polygonUSDT, polygonWETH, polygonWPOL, scheduleRecurringPaymentsAPICall, sendRequest, sepoliaUSDC, supportedChains, supportedTokensByChain, testnetChains, token, tokensCommonSymbols, waitForPaymentStatus };
52979
+ export { ActaAccessSDK, ActaAccount, HttpMethod, type HttpRequest, type JsonResponse, ViemClient, arbitrumDAI, arbitrumETH, arbitrumUSDC, arbitrumUSDCe, arbitrumUSDT, arbitrumWETH, baseDAI, baseETH, baseEURC, baseSepoliaUSDC, baseUSDC, baseUSDT, baseUSDbC, baseWETH, bscBNB, bscUSDC, bscUSDT, bscWBNB, ethereumDAI, ethereumETH, ethereumEURC, ethereumUSDC, ethereumUSDT, ethereumWETH, executeSinglePaymentAPICall, fetchPaymentStatus, fetchRecurringTransactionWithId, getChainById, getChainExplorerByChainId, getTokenByChainIdAndAddress, getTokenByChainIdAndSymbol, lineaDAI, lineaETH, lineaUSDC, lineaWETH, mainnetChains, optimismDAI, optimismETH, optimismUSDC, optimismUSDCe, optimismUSDT, optimismWETH, polygonAmoyUSDC, polygonDAI, polygonPOL, polygonUSDC, polygonUSDCe, polygonUSDT, polygonWETH, polygonWPOL, scheduleRecurringPaymentsAPICall, sendRequest, sepoliaUSDC, supportedChains, supportedTokensByChain, testnetChains, token, tokensCommonSymbols, waitForPaymentStatus };
package/dist/index.js CHANGED
@@ -680,34 +680,6 @@ import { signerToEcdsaValidator } from "@zerodev/ecdsa-validator";
680
680
  import { createSmartAccountClient, getRequiredPrefund } from "permissionless";
681
681
  import { createPimlicoClient } from "permissionless/clients/pimlico";
682
682
 
683
- // src/rpc.ts
684
- function getPimlicoRpcByChainId(chainId) {
685
- switch (chainId) {
686
- case 1:
687
- return `https://api.pimlico.io/v2/${chainId}/rpc?apikey=pim_89hjqCpssGqr5sBrcSLBfV`;
688
- case 10:
689
- return `https://api.pimlico.io/v2/${chainId}/rpc?apikey=pim_89hjqCpssGqr5sBrcSLBfV`;
690
- case 56:
691
- return `https://api.pimlico.io/v2/${chainId}/rpc?apikey=pim_89hjqCpssGqr5sBrcSLBfV`;
692
- case 137:
693
- return `https://api.pimlico.io/v2/${chainId}/rpc?apikey=pim_89hjqCpssGqr5sBrcSLBfV`;
694
- case 8453:
695
- return `https://api.pimlico.io/v2/${chainId}/rpc?apikey=pim_89hjqCpssGqr5sBrcSLBfV`;
696
- case 42161:
697
- return `https://api.pimlico.io/v2/${chainId}/rpc?apikey=pim_89hjqCpssGqr5sBrcSLBfV`;
698
- case 59144:
699
- return `https://api.pimlico.io/v2/${chainId}/rpc?apikey=pim_89hjqCpssGqr5sBrcSLBfV`;
700
- case 80002:
701
- return `https://api.pimlico.io/v2/${chainId}/rpc?apikey=pim_89hjqCpssGqr5sBrcSLBfV`;
702
- case 84532:
703
- return `https://api.pimlico.io/v2/${chainId}/rpc?apikey=pim_89hjqCpssGqr5sBrcSLBfV`;
704
- case 11155111:
705
- return `https://api.pimlico.io/v2/${chainId}/rpc?apikey=pim_89hjqCpssGqr5sBrcSLBfV`;
706
- default:
707
- return void 0;
708
- }
709
- }
710
-
711
683
  // src/viemClient.ts
712
684
  import {
713
685
  parseAbi,
@@ -781,6 +753,13 @@ import {
781
753
  CallPolicyVersion,
782
754
  ParamCondition
783
755
  } from "@zerodev/permissions/policies";
756
+
757
+ // src/constants.ts
758
+ var ACCESS_URL = "https://flex.acta.link/flex/deposit";
759
+ var ACCESS_TESTNET_URL = "https://flex.acta.link/flex/deposit/test";
760
+ var PROXY_URL = `https://api.acta.link/proxy/v1`;
761
+
762
+ // src/account.ts
784
763
  var ActaAccount = class {
785
764
  constructor(publicClient, signer) {
786
765
  this.signer = signer;
@@ -815,18 +794,18 @@ var ActaAccount = class {
815
794
  const account = yield this.createAccount();
816
795
  const entryPoint = getEntryPoint("0.7");
817
796
  const paymasterClient = createPaymasterClient({
818
- transport: http(getPimlicoRpcByChainId(chainId))
797
+ transport: http(`${PROXY_URL}/rpc?chainId=${chainId}`)
819
798
  });
820
799
  const pimlicoClient = createPimlicoClient({
821
800
  chain: getChainById(chainId),
822
- transport: http(getPimlicoRpcByChainId(chainId)),
801
+ transport: http(`${PROXY_URL}/rpc?chainId=${chainId}`),
823
802
  entryPoint
824
803
  });
825
804
  const accountClient = createSmartAccountClient({
826
805
  account,
827
806
  chain: getChainById(chainId),
828
807
  paymaster: paymasterClient,
829
- bundlerTransport: http(getPimlicoRpcByChainId(chainId)),
808
+ bundlerTransport: http(`${PROXY_URL}/rpc?chainId=${chainId}`),
830
809
  userOperation: {
831
810
  estimateFeesPerGas: () => __async(this, null, function* () {
832
811
  return (yield pimlicoClient.getUserOperationGasPrice()).fast;
@@ -837,7 +816,7 @@ var ActaAccount = class {
837
816
  account,
838
817
  chain: getChainById(chainId),
839
818
  paymaster: paymasterClient,
840
- bundlerTransport: http(getPimlicoRpcByChainId(chainId)),
819
+ bundlerTransport: http(`${PROXY_URL}/rpc?chainId=${chainId}`),
841
820
  userOperation: {
842
821
  estimateFeesPerGas: () => __async(this, null, function* () {
843
822
  return (yield pimlicoClient.getUserOperationGasPrice()).fast;
@@ -1267,12 +1246,6 @@ function waitForPaymentStatus(url, id, intervalMs = 2e3) {
1267
1246
 
1268
1247
  // src/execution/access.ts
1269
1248
  import { toHex } from "viem";
1270
-
1271
- // src/constants.ts
1272
- var ACCESS_URL = "https://api.acta.link/deposit";
1273
- var ACCESS_TESTNET_URL = "https://api.acta.link/deposit/test";
1274
-
1275
- // src/execution/access.ts
1276
1249
  var returnEnvUrl = (chainId) => {
1277
1250
  const mainnetChain = mainnetChains.find((c) => c.id === chainId);
1278
1251
  const testnetChain = testnetChains.find((c) => c.id === chainId);
@@ -1542,7 +1515,6 @@ export {
1542
1515
  fetchRecurringTransactionWithId,
1543
1516
  getChainById,
1544
1517
  getChainExplorerByChainId,
1545
- getPimlicoRpcByChainId,
1546
1518
  getTokenByChainIdAndAddress,
1547
1519
  getTokenByChainIdAndSymbol,
1548
1520
  lineaDAI,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@actalink/sdkv2",
3
- "version": "0.1.2",
3
+ "version": "0.1.4",
4
4
  "author": "Actalink",
5
5
  "license": "MIT license",
6
6
  "publishConfig": {