@actalink/commonlib 0.0.24 → 0.0.26
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 +12 -37
- package/dist/index.d.cts +1 -2
- package/dist/index.d.ts +1 -2
- package/dist/index.js +18 -42
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -112,7 +112,6 @@ __export(index_exports, {
|
|
|
112
112
|
getChainById: () => getChainById,
|
|
113
113
|
getChainExplorerByChainId: () => getChainExplorerByChainId,
|
|
114
114
|
getPeriodInterval: () => getPeriodInterval,
|
|
115
|
-
getPimlicoRpcByChainId: () => getPimlicoRpcByChainId,
|
|
116
115
|
getRpcByChainId: () => getRpcByChainId,
|
|
117
116
|
getTokenByChainIdAndAddress: () => getTokenByChainIdAndAddress,
|
|
118
117
|
getTokenByChainIdAndSymbol: () => getTokenByChainIdAndSymbol,
|
|
@@ -682,6 +681,9 @@ var import_ecdsa_validator = require("@zerodev/ecdsa-validator");
|
|
|
682
681
|
var import_permissionless = require("permissionless");
|
|
683
682
|
var import_pimlico = require("permissionless/clients/pimlico");
|
|
684
683
|
|
|
684
|
+
// src/viemClient.ts
|
|
685
|
+
var import_viem2 = require("viem");
|
|
686
|
+
|
|
685
687
|
// src/rpc.ts
|
|
686
688
|
function getRpcByChainId(chainId) {
|
|
687
689
|
switch (chainId) {
|
|
@@ -709,35 +711,8 @@ function getRpcByChainId(chainId) {
|
|
|
709
711
|
return void 0;
|
|
710
712
|
}
|
|
711
713
|
}
|
|
712
|
-
function getPimlicoRpcByChainId(chainId) {
|
|
713
|
-
switch (chainId) {
|
|
714
|
-
case 1:
|
|
715
|
-
return `https://api.pimlico.io/v2/${chainId}/rpc?apikey=pim_89hjqCpssGqr5sBrcSLBfV`;
|
|
716
|
-
case 10:
|
|
717
|
-
return `https://api.pimlico.io/v2/${chainId}/rpc?apikey=pim_89hjqCpssGqr5sBrcSLBfV`;
|
|
718
|
-
case 56:
|
|
719
|
-
return `https://api.pimlico.io/v2/${chainId}/rpc?apikey=pim_89hjqCpssGqr5sBrcSLBfV`;
|
|
720
|
-
case 137:
|
|
721
|
-
return `https://api.pimlico.io/v2/${chainId}/rpc?apikey=pim_89hjqCpssGqr5sBrcSLBfV`;
|
|
722
|
-
case 8453:
|
|
723
|
-
return `https://api.pimlico.io/v2/${chainId}/rpc?apikey=pim_89hjqCpssGqr5sBrcSLBfV`;
|
|
724
|
-
case 42161:
|
|
725
|
-
return `https://api.pimlico.io/v2/${chainId}/rpc?apikey=pim_89hjqCpssGqr5sBrcSLBfV`;
|
|
726
|
-
case 59144:
|
|
727
|
-
return `https://api.pimlico.io/v2/${chainId}/rpc?apikey=pim_89hjqCpssGqr5sBrcSLBfV`;
|
|
728
|
-
case 80002:
|
|
729
|
-
return `https://api.pimlico.io/v2/${chainId}/rpc?apikey=pim_89hjqCpssGqr5sBrcSLBfV`;
|
|
730
|
-
case 84532:
|
|
731
|
-
return `https://api.pimlico.io/v2/${chainId}/rpc?apikey=pim_89hjqCpssGqr5sBrcSLBfV`;
|
|
732
|
-
case 11155111:
|
|
733
|
-
return `https://api.pimlico.io/v2/${chainId}/rpc?apikey=pim_89hjqCpssGqr5sBrcSLBfV`;
|
|
734
|
-
default:
|
|
735
|
-
return void 0;
|
|
736
|
-
}
|
|
737
|
-
}
|
|
738
714
|
|
|
739
715
|
// src/viemClient.ts
|
|
740
|
-
var import_viem2 = require("viem");
|
|
741
716
|
var ViemClient = class {
|
|
742
717
|
constructor(chainId, walletClient) {
|
|
743
718
|
this.chainId = chainId;
|
|
@@ -805,6 +780,7 @@ var ViemClient = class {
|
|
|
805
780
|
var import_signers = require("@zerodev/permissions/signers");
|
|
806
781
|
var import_permissions = require("@zerodev/permissions");
|
|
807
782
|
var import_policies = require("@zerodev/permissions/policies");
|
|
783
|
+
var proxyUrl = `https://api.acta.link/proxy/v1`;
|
|
808
784
|
var ActaAccount = class {
|
|
809
785
|
constructor(chainId, publicClient, signer) {
|
|
810
786
|
this.chainId = chainId;
|
|
@@ -835,18 +811,18 @@ var ActaAccount = class {
|
|
|
835
811
|
const account = yield this.createAccount();
|
|
836
812
|
const entryPoint = (0, import_constants.getEntryPoint)("0.7");
|
|
837
813
|
const paymasterClient = (0, import_account_abstraction.createPaymasterClient)({
|
|
838
|
-
transport: (0, import_viem3.http)(
|
|
814
|
+
transport: (0, import_viem3.http)(`${proxyUrl}/rpc?chainId=${this.chainId}`)
|
|
839
815
|
});
|
|
840
816
|
const pimlicoClient = (0, import_pimlico.createPimlicoClient)({
|
|
841
817
|
chain: getChainById(this.chainId),
|
|
842
|
-
transport: (0, import_viem3.http)(
|
|
818
|
+
transport: (0, import_viem3.http)(`${proxyUrl}/rpc?chainId=${this.chainId}`),
|
|
843
819
|
entryPoint
|
|
844
820
|
});
|
|
845
821
|
const accountClient = (0, import_permissionless.createSmartAccountClient)({
|
|
846
822
|
account,
|
|
847
823
|
chain: getChainById(this.chainId),
|
|
848
824
|
paymaster: paymasterClient,
|
|
849
|
-
bundlerTransport: (0, import_viem3.http)(
|
|
825
|
+
bundlerTransport: (0, import_viem3.http)(`${proxyUrl}/rpc?chainId=${this.chainId}`),
|
|
850
826
|
userOperation: {
|
|
851
827
|
estimateFeesPerGas: () => __async(this, null, function* () {
|
|
852
828
|
return (yield pimlicoClient.getUserOperationGasPrice()).fast;
|
|
@@ -857,7 +833,7 @@ var ActaAccount = class {
|
|
|
857
833
|
account,
|
|
858
834
|
chain: getChainById(this.chainId),
|
|
859
835
|
paymaster: paymasterClient,
|
|
860
|
-
bundlerTransport: (0, import_viem3.http)(
|
|
836
|
+
bundlerTransport: (0, import_viem3.http)(`${proxyUrl}/rpc?chainId=${this.chainId}`),
|
|
861
837
|
userOperation: {
|
|
862
838
|
estimateFeesPerGas: () => __async(this, null, function* () {
|
|
863
839
|
return (yield pimlicoClient.getUserOperationGasPrice()).fast;
|
|
@@ -2160,9 +2136,9 @@ var ActaDeposit = class {
|
|
|
2160
2136
|
// src/billing.ts
|
|
2161
2137
|
var import_viem6 = require("viem");
|
|
2162
2138
|
var transactionServiceUrl2 = "https://api.acta.link/transaction/v1/";
|
|
2163
|
-
var billingServiceUrl = "https://api.acta.link/
|
|
2139
|
+
var billingServiceUrl = "https://api.acta.link/pay/v1/";
|
|
2164
2140
|
var transactionServiceTestUrl2 = "https://api.acta.link/transaction/test/v1/";
|
|
2165
|
-
var billingServiceTestUrl = "https://api.acta.link/
|
|
2141
|
+
var billingServiceTestUrl = "https://api.acta.link/pay/test/v1/";
|
|
2166
2142
|
var returnEnvUrl2 = (chainId) => {
|
|
2167
2143
|
const mainnetChain = mainnetChains.find((c) => c.id === chainId);
|
|
2168
2144
|
const testnetChain = testnetChains.find((c) => c.id === chainId);
|
|
@@ -2878,10 +2854,10 @@ var import_account_abstraction2 = require("viem/account-abstraction");
|
|
|
2878
2854
|
var import_policies2 = require("@zerodev/permissions/policies");
|
|
2879
2855
|
var import_semver = require("semver");
|
|
2880
2856
|
var ECDSA_SIGNER_CONTRACT = "0x6A6F069E2a08c2468e7724Ab3250CdBFBA14D4FF";
|
|
2881
|
-
var billingServiceUrl2 = "https://api.acta.link/
|
|
2857
|
+
var billingServiceUrl2 = "https://api.acta.link/pay/v1/";
|
|
2882
2858
|
var depositServiceUrl2 = "https://api.acta.link/deposit/v1/";
|
|
2883
2859
|
var transactionServiceUrl4 = "https://api.acta.link/transaction/v1/";
|
|
2884
|
-
var billingServiceTestUrl2 = "https://api.acta.link/
|
|
2860
|
+
var billingServiceTestUrl2 = "https://api.acta.link/pay/test/v1/";
|
|
2885
2861
|
var toSignerId = (signer) => {
|
|
2886
2862
|
return (0, import_viem8.encodeAbiParameters)(
|
|
2887
2863
|
[{ name: "signerData", type: "bytes" }],
|
|
@@ -3351,7 +3327,6 @@ var cancelRecurringTransaction = (_0) => __async(null, [_0], function* ({
|
|
|
3351
3327
|
getChainById,
|
|
3352
3328
|
getChainExplorerByChainId,
|
|
3353
3329
|
getPeriodInterval,
|
|
3354
|
-
getPimlicoRpcByChainId,
|
|
3355
3330
|
getRpcByChainId,
|
|
3356
3331
|
getTokenByChainIdAndAddress,
|
|
3357
3332
|
getTokenByChainIdAndSymbol,
|
package/dist/index.d.cts
CHANGED
|
@@ -11962,7 +11962,6 @@ declare class ViemClient {
|
|
|
11962
11962
|
}
|
|
11963
11963
|
|
|
11964
11964
|
declare function getRpcByChainId(chainId: number): string | undefined;
|
|
11965
|
-
declare function getPimlicoRpcByChainId(chainId: number): string | undefined;
|
|
11966
11965
|
|
|
11967
11966
|
declare enum HttpMethod {
|
|
11968
11967
|
Get = "get",
|
|
@@ -12064,4 +12063,4 @@ declare function createBatchSessionAPICall(url: string, APIKey: string, params:
|
|
|
12064
12063
|
}): Promise<any>;
|
|
12065
12064
|
declare function fetchBatchInstructionDetails(url: string, APIKey: string): Promise<any>;
|
|
12066
12065
|
|
|
12067
|
-
export { type AbstractPaymentParams, ActaAccount, ActaBatch, ActaBilling, ActaDeposit, type BatchClassParams, type BillingClassParams, type CalculateSingleBatchPaymentGasParameters, ConnectorType, type DepositClassParams, type EstimateSingleBatchPaymentGasParameters, type EstimateSinglePaymentGasParameters, type ExportPermissionAccountParams, HttpMethod, type ModularSigner, type PermissionAccountParams, type PermissionData, type PermissionPlugin, type PermissionPluginParams, type Policy, PolicyFlags, type PolicyParams, type RecurringPaymentParamsType, type ScheduleBatchPaymentClassParamsType, type ScheduleBatchPaymentWithoutKeyClassParamsType, type ScheduleOrRecurringBatchPaymentParamsType, type SingleBatchPaymentClassParamsType, type SingleBatchPaymentParamsType, type SingleBatchPaymentWithoutKeyClassParamsType, type SinglePaymentParamsType, type Token, TokenLogo, ViemClient, arbitrumDAI, arbitrumETH, arbitrumUSDC, arbitrumUSDCe, arbitrumUSDT, arbitrumWETH, base64ToBytes, baseDAI, baseETH, baseEURC, baseSepoliaUSDC, baseUSDC, baseUSDT, baseUSDbC, baseWETH, bscBNB, bscUSDC, bscUSDT, bscWBNB, bytesToBase64, cancelRecurringPaymentAPICall, cancelRecurringTransaction, createBatchSessionAPICall, createBillingCheckoutSession, createBillingSessionAPICall, createPolicyFromParams, createSessionAPICall, decodeParamsFromInitCode, deserializePermissionAccount, deserializePermissionAccountParams, ethereumDAI, ethereumETH, ethereumEURC, ethereumUSDC, ethereumUSDT, ethereumWETH, executeScheduleBatchPaymentAPICall, executeSingleBatchPaymentAPICall, executeSinglePaymentAPICall, fetchBatchInstructionDetails, fetchBillingSessionDetails, fetchRecurringTransactionWithId, getBillingPaymentSessionDetails, getChainById, getChainExplorerByChainId, getPeriodInterval,
|
|
12066
|
+
export { type AbstractPaymentParams, ActaAccount, ActaBatch, ActaBilling, ActaDeposit, type BatchClassParams, type BillingClassParams, type CalculateSingleBatchPaymentGasParameters, ConnectorType, type DepositClassParams, type EstimateSingleBatchPaymentGasParameters, type EstimateSinglePaymentGasParameters, type ExportPermissionAccountParams, HttpMethod, type ModularSigner, type PermissionAccountParams, type PermissionData, type PermissionPlugin, type PermissionPluginParams, type Policy, PolicyFlags, type PolicyParams, type RecurringPaymentParamsType, type ScheduleBatchPaymentClassParamsType, type ScheduleBatchPaymentWithoutKeyClassParamsType, type ScheduleOrRecurringBatchPaymentParamsType, type SingleBatchPaymentClassParamsType, type SingleBatchPaymentParamsType, type SingleBatchPaymentWithoutKeyClassParamsType, type SinglePaymentParamsType, type Token, TokenLogo, ViemClient, arbitrumDAI, arbitrumETH, arbitrumUSDC, arbitrumUSDCe, arbitrumUSDT, arbitrumWETH, base64ToBytes, baseDAI, baseETH, baseEURC, baseSepoliaUSDC, baseUSDC, baseUSDT, baseUSDbC, baseWETH, bscBNB, bscUSDC, bscUSDT, bscWBNB, bytesToBase64, cancelRecurringPaymentAPICall, cancelRecurringTransaction, createBatchSessionAPICall, createBillingCheckoutSession, createBillingSessionAPICall, createPolicyFromParams, createSessionAPICall, decodeParamsFromInitCode, deserializePermissionAccount, deserializePermissionAccountParams, ethereumDAI, ethereumETH, ethereumEURC, ethereumUSDC, ethereumUSDT, ethereumWETH, executeScheduleBatchPaymentAPICall, executeSingleBatchPaymentAPICall, executeSinglePaymentAPICall, fetchBatchInstructionDetails, fetchBillingSessionDetails, fetchRecurringTransactionWithId, getBillingPaymentSessionDetails, getChainById, getChainExplorerByChainId, getPeriodInterval, getRpcByChainId, getTokenByChainIdAndAddress, getTokenByChainIdAndSymbol, isKernelVersionAfter, isPermissionValidatorPlugin, lineaDAI, lineaETH, lineaUSDC, lineaWETH, mainnetChains, optimismDAI, optimismETH, optimismUSDC, optimismUSDCe, optimismUSDT, optimismWETH, polygonAmoyUSDC, polygonDAI, polygonPOL, polygonUSDC, polygonUSDCe, polygonUSDT, polygonWETH, polygonWPOL, scheduleRecurringPaymentsAPICall, sendRequest, sepoliaUSDC, serializePermissionAccountParams, supportedChains, supportedTokensByChain, testnetChains, toECDSASigner, toPermissionValidator, toPolicyId, toSignerId, token, tokensCommonSymbols, verifySessionAPICall };
|
package/dist/index.d.ts
CHANGED
|
@@ -11962,7 +11962,6 @@ declare class ViemClient {
|
|
|
11962
11962
|
}
|
|
11963
11963
|
|
|
11964
11964
|
declare function getRpcByChainId(chainId: number): string | undefined;
|
|
11965
|
-
declare function getPimlicoRpcByChainId(chainId: number): string | undefined;
|
|
11966
11965
|
|
|
11967
11966
|
declare enum HttpMethod {
|
|
11968
11967
|
Get = "get",
|
|
@@ -12064,4 +12063,4 @@ declare function createBatchSessionAPICall(url: string, APIKey: string, params:
|
|
|
12064
12063
|
}): Promise<any>;
|
|
12065
12064
|
declare function fetchBatchInstructionDetails(url: string, APIKey: string): Promise<any>;
|
|
12066
12065
|
|
|
12067
|
-
export { type AbstractPaymentParams, ActaAccount, ActaBatch, ActaBilling, ActaDeposit, type BatchClassParams, type BillingClassParams, type CalculateSingleBatchPaymentGasParameters, ConnectorType, type DepositClassParams, type EstimateSingleBatchPaymentGasParameters, type EstimateSinglePaymentGasParameters, type ExportPermissionAccountParams, HttpMethod, type ModularSigner, type PermissionAccountParams, type PermissionData, type PermissionPlugin, type PermissionPluginParams, type Policy, PolicyFlags, type PolicyParams, type RecurringPaymentParamsType, type ScheduleBatchPaymentClassParamsType, type ScheduleBatchPaymentWithoutKeyClassParamsType, type ScheduleOrRecurringBatchPaymentParamsType, type SingleBatchPaymentClassParamsType, type SingleBatchPaymentParamsType, type SingleBatchPaymentWithoutKeyClassParamsType, type SinglePaymentParamsType, type Token, TokenLogo, ViemClient, arbitrumDAI, arbitrumETH, arbitrumUSDC, arbitrumUSDCe, arbitrumUSDT, arbitrumWETH, base64ToBytes, baseDAI, baseETH, baseEURC, baseSepoliaUSDC, baseUSDC, baseUSDT, baseUSDbC, baseWETH, bscBNB, bscUSDC, bscUSDT, bscWBNB, bytesToBase64, cancelRecurringPaymentAPICall, cancelRecurringTransaction, createBatchSessionAPICall, createBillingCheckoutSession, createBillingSessionAPICall, createPolicyFromParams, createSessionAPICall, decodeParamsFromInitCode, deserializePermissionAccount, deserializePermissionAccountParams, ethereumDAI, ethereumETH, ethereumEURC, ethereumUSDC, ethereumUSDT, ethereumWETH, executeScheduleBatchPaymentAPICall, executeSingleBatchPaymentAPICall, executeSinglePaymentAPICall, fetchBatchInstructionDetails, fetchBillingSessionDetails, fetchRecurringTransactionWithId, getBillingPaymentSessionDetails, getChainById, getChainExplorerByChainId, getPeriodInterval,
|
|
12066
|
+
export { type AbstractPaymentParams, ActaAccount, ActaBatch, ActaBilling, ActaDeposit, type BatchClassParams, type BillingClassParams, type CalculateSingleBatchPaymentGasParameters, ConnectorType, type DepositClassParams, type EstimateSingleBatchPaymentGasParameters, type EstimateSinglePaymentGasParameters, type ExportPermissionAccountParams, HttpMethod, type ModularSigner, type PermissionAccountParams, type PermissionData, type PermissionPlugin, type PermissionPluginParams, type Policy, PolicyFlags, type PolicyParams, type RecurringPaymentParamsType, type ScheduleBatchPaymentClassParamsType, type ScheduleBatchPaymentWithoutKeyClassParamsType, type ScheduleOrRecurringBatchPaymentParamsType, type SingleBatchPaymentClassParamsType, type SingleBatchPaymentParamsType, type SingleBatchPaymentWithoutKeyClassParamsType, type SinglePaymentParamsType, type Token, TokenLogo, ViemClient, arbitrumDAI, arbitrumETH, arbitrumUSDC, arbitrumUSDCe, arbitrumUSDT, arbitrumWETH, base64ToBytes, baseDAI, baseETH, baseEURC, baseSepoliaUSDC, baseUSDC, baseUSDT, baseUSDbC, baseWETH, bscBNB, bscUSDC, bscUSDT, bscWBNB, bytesToBase64, cancelRecurringPaymentAPICall, cancelRecurringTransaction, createBatchSessionAPICall, createBillingCheckoutSession, createBillingSessionAPICall, createPolicyFromParams, createSessionAPICall, decodeParamsFromInitCode, deserializePermissionAccount, deserializePermissionAccountParams, ethereumDAI, ethereumETH, ethereumEURC, ethereumUSDC, ethereumUSDT, ethereumWETH, executeScheduleBatchPaymentAPICall, executeSingleBatchPaymentAPICall, executeSinglePaymentAPICall, fetchBatchInstructionDetails, fetchBillingSessionDetails, fetchRecurringTransactionWithId, getBillingPaymentSessionDetails, getChainById, getChainExplorerByChainId, getPeriodInterval, getRpcByChainId, getTokenByChainIdAndAddress, getTokenByChainIdAndSymbol, isKernelVersionAfter, isPermissionValidatorPlugin, lineaDAI, lineaETH, lineaUSDC, lineaWETH, mainnetChains, optimismDAI, optimismETH, optimismUSDC, optimismUSDCe, optimismUSDT, optimismWETH, polygonAmoyUSDC, polygonDAI, polygonPOL, polygonUSDC, polygonUSDCe, polygonUSDT, polygonWETH, polygonWPOL, scheduleRecurringPaymentsAPICall, sendRequest, sepoliaUSDC, serializePermissionAccountParams, supportedChains, supportedTokensByChain, testnetChains, toECDSASigner, toPermissionValidator, toPolicyId, toSignerId, token, tokensCommonSymbols, verifySessionAPICall };
|
package/dist/index.js
CHANGED
|
@@ -596,6 +596,15 @@ import { signerToEcdsaValidator } from "@zerodev/ecdsa-validator";
|
|
|
596
596
|
import { createSmartAccountClient, getRequiredPrefund } from "permissionless";
|
|
597
597
|
import { createPimlicoClient } from "permissionless/clients/pimlico";
|
|
598
598
|
|
|
599
|
+
// src/viemClient.ts
|
|
600
|
+
import {
|
|
601
|
+
http,
|
|
602
|
+
createPublicClient,
|
|
603
|
+
parseAbi,
|
|
604
|
+
encodeFunctionData,
|
|
605
|
+
maxUint256
|
|
606
|
+
} from "viem";
|
|
607
|
+
|
|
599
608
|
// src/rpc.ts
|
|
600
609
|
function getRpcByChainId(chainId) {
|
|
601
610
|
switch (chainId) {
|
|
@@ -623,41 +632,8 @@ function getRpcByChainId(chainId) {
|
|
|
623
632
|
return void 0;
|
|
624
633
|
}
|
|
625
634
|
}
|
|
626
|
-
function getPimlicoRpcByChainId(chainId) {
|
|
627
|
-
switch (chainId) {
|
|
628
|
-
case 1:
|
|
629
|
-
return `https://api.pimlico.io/v2/${chainId}/rpc?apikey=pim_89hjqCpssGqr5sBrcSLBfV`;
|
|
630
|
-
case 10:
|
|
631
|
-
return `https://api.pimlico.io/v2/${chainId}/rpc?apikey=pim_89hjqCpssGqr5sBrcSLBfV`;
|
|
632
|
-
case 56:
|
|
633
|
-
return `https://api.pimlico.io/v2/${chainId}/rpc?apikey=pim_89hjqCpssGqr5sBrcSLBfV`;
|
|
634
|
-
case 137:
|
|
635
|
-
return `https://api.pimlico.io/v2/${chainId}/rpc?apikey=pim_89hjqCpssGqr5sBrcSLBfV`;
|
|
636
|
-
case 8453:
|
|
637
|
-
return `https://api.pimlico.io/v2/${chainId}/rpc?apikey=pim_89hjqCpssGqr5sBrcSLBfV`;
|
|
638
|
-
case 42161:
|
|
639
|
-
return `https://api.pimlico.io/v2/${chainId}/rpc?apikey=pim_89hjqCpssGqr5sBrcSLBfV`;
|
|
640
|
-
case 59144:
|
|
641
|
-
return `https://api.pimlico.io/v2/${chainId}/rpc?apikey=pim_89hjqCpssGqr5sBrcSLBfV`;
|
|
642
|
-
case 80002:
|
|
643
|
-
return `https://api.pimlico.io/v2/${chainId}/rpc?apikey=pim_89hjqCpssGqr5sBrcSLBfV`;
|
|
644
|
-
case 84532:
|
|
645
|
-
return `https://api.pimlico.io/v2/${chainId}/rpc?apikey=pim_89hjqCpssGqr5sBrcSLBfV`;
|
|
646
|
-
case 11155111:
|
|
647
|
-
return `https://api.pimlico.io/v2/${chainId}/rpc?apikey=pim_89hjqCpssGqr5sBrcSLBfV`;
|
|
648
|
-
default:
|
|
649
|
-
return void 0;
|
|
650
|
-
}
|
|
651
|
-
}
|
|
652
635
|
|
|
653
636
|
// src/viemClient.ts
|
|
654
|
-
import {
|
|
655
|
-
http,
|
|
656
|
-
createPublicClient,
|
|
657
|
-
parseAbi,
|
|
658
|
-
encodeFunctionData,
|
|
659
|
-
maxUint256
|
|
660
|
-
} from "viem";
|
|
661
637
|
var ViemClient = class {
|
|
662
638
|
constructor(chainId, walletClient) {
|
|
663
639
|
this.chainId = chainId;
|
|
@@ -732,6 +708,7 @@ import {
|
|
|
732
708
|
CallPolicyVersion,
|
|
733
709
|
ParamCondition
|
|
734
710
|
} from "@zerodev/permissions/policies";
|
|
711
|
+
var proxyUrl = `https://api.acta.link/proxy/v1`;
|
|
735
712
|
var ActaAccount = class {
|
|
736
713
|
constructor(chainId, publicClient, signer) {
|
|
737
714
|
this.chainId = chainId;
|
|
@@ -762,18 +739,18 @@ var ActaAccount = class {
|
|
|
762
739
|
const account = yield this.createAccount();
|
|
763
740
|
const entryPoint = getEntryPoint("0.7");
|
|
764
741
|
const paymasterClient = createPaymasterClient({
|
|
765
|
-
transport: http2(
|
|
742
|
+
transport: http2(`${proxyUrl}/rpc?chainId=${this.chainId}`)
|
|
766
743
|
});
|
|
767
744
|
const pimlicoClient = createPimlicoClient({
|
|
768
745
|
chain: getChainById(this.chainId),
|
|
769
|
-
transport: http2(
|
|
746
|
+
transport: http2(`${proxyUrl}/rpc?chainId=${this.chainId}`),
|
|
770
747
|
entryPoint
|
|
771
748
|
});
|
|
772
749
|
const accountClient = createSmartAccountClient({
|
|
773
750
|
account,
|
|
774
751
|
chain: getChainById(this.chainId),
|
|
775
752
|
paymaster: paymasterClient,
|
|
776
|
-
bundlerTransport: http2(
|
|
753
|
+
bundlerTransport: http2(`${proxyUrl}/rpc?chainId=${this.chainId}`),
|
|
777
754
|
userOperation: {
|
|
778
755
|
estimateFeesPerGas: () => __async(this, null, function* () {
|
|
779
756
|
return (yield pimlicoClient.getUserOperationGasPrice()).fast;
|
|
@@ -784,7 +761,7 @@ var ActaAccount = class {
|
|
|
784
761
|
account,
|
|
785
762
|
chain: getChainById(this.chainId),
|
|
786
763
|
paymaster: paymasterClient,
|
|
787
|
-
bundlerTransport: http2(
|
|
764
|
+
bundlerTransport: http2(`${proxyUrl}/rpc?chainId=${this.chainId}`),
|
|
788
765
|
userOperation: {
|
|
789
766
|
estimateFeesPerGas: () => __async(this, null, function* () {
|
|
790
767
|
return (yield pimlicoClient.getUserOperationGasPrice()).fast;
|
|
@@ -2087,9 +2064,9 @@ var ActaDeposit = class {
|
|
|
2087
2064
|
// src/billing.ts
|
|
2088
2065
|
import { toHex as toHex3 } from "viem";
|
|
2089
2066
|
var transactionServiceUrl2 = "https://api.acta.link/transaction/v1/";
|
|
2090
|
-
var billingServiceUrl = "https://api.acta.link/
|
|
2067
|
+
var billingServiceUrl = "https://api.acta.link/pay/v1/";
|
|
2091
2068
|
var transactionServiceTestUrl2 = "https://api.acta.link/transaction/test/v1/";
|
|
2092
|
-
var billingServiceTestUrl = "https://api.acta.link/
|
|
2069
|
+
var billingServiceTestUrl = "https://api.acta.link/pay/test/v1/";
|
|
2093
2070
|
var returnEnvUrl2 = (chainId) => {
|
|
2094
2071
|
const mainnetChain = mainnetChains.find((c) => c.id === chainId);
|
|
2095
2072
|
const testnetChain = testnetChains.find((c) => c.id === chainId);
|
|
@@ -2841,10 +2818,10 @@ import {
|
|
|
2841
2818
|
} from "@zerodev/permissions/policies";
|
|
2842
2819
|
import { coerce, gt } from "semver";
|
|
2843
2820
|
var ECDSA_SIGNER_CONTRACT = "0x6A6F069E2a08c2468e7724Ab3250CdBFBA14D4FF";
|
|
2844
|
-
var billingServiceUrl2 = "https://api.acta.link/
|
|
2821
|
+
var billingServiceUrl2 = "https://api.acta.link/pay/v1/";
|
|
2845
2822
|
var depositServiceUrl2 = "https://api.acta.link/deposit/v1/";
|
|
2846
2823
|
var transactionServiceUrl4 = "https://api.acta.link/transaction/v1/";
|
|
2847
|
-
var billingServiceTestUrl2 = "https://api.acta.link/
|
|
2824
|
+
var billingServiceTestUrl2 = "https://api.acta.link/pay/test/v1/";
|
|
2848
2825
|
var toSignerId = (signer) => {
|
|
2849
2826
|
return encodeAbiParameters(
|
|
2850
2827
|
[{ name: "signerData", type: "bytes" }],
|
|
@@ -3313,7 +3290,6 @@ export {
|
|
|
3313
3290
|
getChainById,
|
|
3314
3291
|
getChainExplorerByChainId,
|
|
3315
3292
|
getPeriodInterval,
|
|
3316
|
-
getPimlicoRpcByChainId,
|
|
3317
3293
|
getRpcByChainId,
|
|
3318
3294
|
getTokenByChainIdAndAddress,
|
|
3319
3295
|
getTokenByChainIdAndSymbol,
|