@actalink/commonlib 0.0.22 → 0.0.24
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 +15 -14
- package/dist/index.js +15 -14
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -712,25 +712,25 @@ function getRpcByChainId(chainId) {
|
|
|
712
712
|
function getPimlicoRpcByChainId(chainId) {
|
|
713
713
|
switch (chainId) {
|
|
714
714
|
case 1:
|
|
715
|
-
return `https://api.pimlico.io/v2/${chainId}/rpc?apikey=
|
|
715
|
+
return `https://api.pimlico.io/v2/${chainId}/rpc?apikey=pim_89hjqCpssGqr5sBrcSLBfV`;
|
|
716
716
|
case 10:
|
|
717
|
-
return `https://api.pimlico.io/v2/${chainId}/rpc?apikey=
|
|
717
|
+
return `https://api.pimlico.io/v2/${chainId}/rpc?apikey=pim_89hjqCpssGqr5sBrcSLBfV`;
|
|
718
718
|
case 56:
|
|
719
|
-
return `https://api.pimlico.io/v2/${chainId}/rpc?apikey=
|
|
719
|
+
return `https://api.pimlico.io/v2/${chainId}/rpc?apikey=pim_89hjqCpssGqr5sBrcSLBfV`;
|
|
720
720
|
case 137:
|
|
721
|
-
return `https://api.pimlico.io/v2/${chainId}/rpc?apikey=
|
|
721
|
+
return `https://api.pimlico.io/v2/${chainId}/rpc?apikey=pim_89hjqCpssGqr5sBrcSLBfV`;
|
|
722
722
|
case 8453:
|
|
723
|
-
return `https://api.pimlico.io/v2/${chainId}/rpc?apikey=
|
|
723
|
+
return `https://api.pimlico.io/v2/${chainId}/rpc?apikey=pim_89hjqCpssGqr5sBrcSLBfV`;
|
|
724
724
|
case 42161:
|
|
725
|
-
return `https://api.pimlico.io/v2/${chainId}/rpc?apikey=
|
|
725
|
+
return `https://api.pimlico.io/v2/${chainId}/rpc?apikey=pim_89hjqCpssGqr5sBrcSLBfV`;
|
|
726
726
|
case 59144:
|
|
727
|
-
return `https://api.pimlico.io/v2/${chainId}/rpc?apikey=
|
|
727
|
+
return `https://api.pimlico.io/v2/${chainId}/rpc?apikey=pim_89hjqCpssGqr5sBrcSLBfV`;
|
|
728
728
|
case 80002:
|
|
729
|
-
return `https://api.pimlico.io/v2/${chainId}/rpc?apikey=
|
|
729
|
+
return `https://api.pimlico.io/v2/${chainId}/rpc?apikey=pim_89hjqCpssGqr5sBrcSLBfV`;
|
|
730
730
|
case 84532:
|
|
731
|
-
return `https://api.pimlico.io/v2/${chainId}/rpc?apikey=
|
|
731
|
+
return `https://api.pimlico.io/v2/${chainId}/rpc?apikey=pim_89hjqCpssGqr5sBrcSLBfV`;
|
|
732
732
|
case 11155111:
|
|
733
|
-
return `https://api.pimlico.io/v2/${chainId}/rpc?apikey=
|
|
733
|
+
return `https://api.pimlico.io/v2/${chainId}/rpc?apikey=pim_89hjqCpssGqr5sBrcSLBfV`;
|
|
734
734
|
default:
|
|
735
735
|
return void 0;
|
|
736
736
|
}
|
|
@@ -2162,6 +2162,7 @@ var import_viem6 = require("viem");
|
|
|
2162
2162
|
var transactionServiceUrl2 = "https://api.acta.link/transaction/v1/";
|
|
2163
2163
|
var billingServiceUrl = "https://api.acta.link/billing/v1/";
|
|
2164
2164
|
var transactionServiceTestUrl2 = "https://api.acta.link/transaction/test/v1/";
|
|
2165
|
+
var billingServiceTestUrl = "https://api.acta.link/billing/test/v1/";
|
|
2165
2166
|
var returnEnvUrl2 = (chainId) => {
|
|
2166
2167
|
const mainnetChain = mainnetChains.find((c) => c.id === chainId);
|
|
2167
2168
|
const testnetChain = testnetChains.find((c) => c.id === chainId);
|
|
@@ -2176,7 +2177,7 @@ var returnEnvUrl2 = (chainId) => {
|
|
|
2176
2177
|
} else {
|
|
2177
2178
|
return {
|
|
2178
2179
|
envTransactionServiceUrl: transactionServiceTestUrl2,
|
|
2179
|
-
envBillingServiceUrl:
|
|
2180
|
+
envBillingServiceUrl: billingServiceTestUrl
|
|
2180
2181
|
};
|
|
2181
2182
|
}
|
|
2182
2183
|
};
|
|
@@ -2880,7 +2881,7 @@ var ECDSA_SIGNER_CONTRACT = "0x6A6F069E2a08c2468e7724Ab3250CdBFBA14D4FF";
|
|
|
2880
2881
|
var billingServiceUrl2 = "https://api.acta.link/billing/v1/";
|
|
2881
2882
|
var depositServiceUrl2 = "https://api.acta.link/deposit/v1/";
|
|
2882
2883
|
var transactionServiceUrl4 = "https://api.acta.link/transaction/v1/";
|
|
2883
|
-
var
|
|
2884
|
+
var billingServiceTestUrl2 = "https://api.acta.link/billing/test/v1/";
|
|
2884
2885
|
var toSignerId = (signer) => {
|
|
2885
2886
|
return (0, import_viem8.encodeAbiParameters)(
|
|
2886
2887
|
[{ name: "signerData", type: "bytes" }],
|
|
@@ -3220,7 +3221,7 @@ var createBillingCheckoutSession = (serviceSessionparams) => __async(null, null,
|
|
|
3220
3221
|
var _a, _b, _c, _d;
|
|
3221
3222
|
try {
|
|
3222
3223
|
const sessionData = yield createBillingSessionAPICall(
|
|
3223
|
-
`${serviceSessionparams.env === "mainnet" ? billingServiceUrl2 :
|
|
3224
|
+
`${serviceSessionparams.env === "mainnet" ? billingServiceUrl2 : billingServiceTestUrl2}paysession/create`,
|
|
3224
3225
|
{
|
|
3225
3226
|
paylinkId: serviceSessionparams.paylinkId,
|
|
3226
3227
|
mode: serviceSessionparams.mode,
|
|
@@ -3245,7 +3246,7 @@ var getBillingPaymentSessionDetails = (serviceSessionparams) => __async(null, nu
|
|
|
3245
3246
|
throw new Error("checkout session ID is required.");
|
|
3246
3247
|
}
|
|
3247
3248
|
const sessionData = yield fetchBillingSessionDetails(
|
|
3248
|
-
`${serviceSessionparams.env === "mainnet" ? billingServiceUrl2 :
|
|
3249
|
+
`${serviceSessionparams.env === "mainnet" ? billingServiceUrl2 : billingServiceTestUrl2}paysession?checkoutSessionId=${serviceSessionparams.checkoutSessionId}`
|
|
3249
3250
|
);
|
|
3250
3251
|
return sessionData;
|
|
3251
3252
|
});
|
package/dist/index.js
CHANGED
|
@@ -626,25 +626,25 @@ function getRpcByChainId(chainId) {
|
|
|
626
626
|
function getPimlicoRpcByChainId(chainId) {
|
|
627
627
|
switch (chainId) {
|
|
628
628
|
case 1:
|
|
629
|
-
return `https://api.pimlico.io/v2/${chainId}/rpc?apikey=
|
|
629
|
+
return `https://api.pimlico.io/v2/${chainId}/rpc?apikey=pim_89hjqCpssGqr5sBrcSLBfV`;
|
|
630
630
|
case 10:
|
|
631
|
-
return `https://api.pimlico.io/v2/${chainId}/rpc?apikey=
|
|
631
|
+
return `https://api.pimlico.io/v2/${chainId}/rpc?apikey=pim_89hjqCpssGqr5sBrcSLBfV`;
|
|
632
632
|
case 56:
|
|
633
|
-
return `https://api.pimlico.io/v2/${chainId}/rpc?apikey=
|
|
633
|
+
return `https://api.pimlico.io/v2/${chainId}/rpc?apikey=pim_89hjqCpssGqr5sBrcSLBfV`;
|
|
634
634
|
case 137:
|
|
635
|
-
return `https://api.pimlico.io/v2/${chainId}/rpc?apikey=
|
|
635
|
+
return `https://api.pimlico.io/v2/${chainId}/rpc?apikey=pim_89hjqCpssGqr5sBrcSLBfV`;
|
|
636
636
|
case 8453:
|
|
637
|
-
return `https://api.pimlico.io/v2/${chainId}/rpc?apikey=
|
|
637
|
+
return `https://api.pimlico.io/v2/${chainId}/rpc?apikey=pim_89hjqCpssGqr5sBrcSLBfV`;
|
|
638
638
|
case 42161:
|
|
639
|
-
return `https://api.pimlico.io/v2/${chainId}/rpc?apikey=
|
|
639
|
+
return `https://api.pimlico.io/v2/${chainId}/rpc?apikey=pim_89hjqCpssGqr5sBrcSLBfV`;
|
|
640
640
|
case 59144:
|
|
641
|
-
return `https://api.pimlico.io/v2/${chainId}/rpc?apikey=
|
|
641
|
+
return `https://api.pimlico.io/v2/${chainId}/rpc?apikey=pim_89hjqCpssGqr5sBrcSLBfV`;
|
|
642
642
|
case 80002:
|
|
643
|
-
return `https://api.pimlico.io/v2/${chainId}/rpc?apikey=
|
|
643
|
+
return `https://api.pimlico.io/v2/${chainId}/rpc?apikey=pim_89hjqCpssGqr5sBrcSLBfV`;
|
|
644
644
|
case 84532:
|
|
645
|
-
return `https://api.pimlico.io/v2/${chainId}/rpc?apikey=
|
|
645
|
+
return `https://api.pimlico.io/v2/${chainId}/rpc?apikey=pim_89hjqCpssGqr5sBrcSLBfV`;
|
|
646
646
|
case 11155111:
|
|
647
|
-
return `https://api.pimlico.io/v2/${chainId}/rpc?apikey=
|
|
647
|
+
return `https://api.pimlico.io/v2/${chainId}/rpc?apikey=pim_89hjqCpssGqr5sBrcSLBfV`;
|
|
648
648
|
default:
|
|
649
649
|
return void 0;
|
|
650
650
|
}
|
|
@@ -2089,6 +2089,7 @@ import { toHex as toHex3 } from "viem";
|
|
|
2089
2089
|
var transactionServiceUrl2 = "https://api.acta.link/transaction/v1/";
|
|
2090
2090
|
var billingServiceUrl = "https://api.acta.link/billing/v1/";
|
|
2091
2091
|
var transactionServiceTestUrl2 = "https://api.acta.link/transaction/test/v1/";
|
|
2092
|
+
var billingServiceTestUrl = "https://api.acta.link/billing/test/v1/";
|
|
2092
2093
|
var returnEnvUrl2 = (chainId) => {
|
|
2093
2094
|
const mainnetChain = mainnetChains.find((c) => c.id === chainId);
|
|
2094
2095
|
const testnetChain = testnetChains.find((c) => c.id === chainId);
|
|
@@ -2103,7 +2104,7 @@ var returnEnvUrl2 = (chainId) => {
|
|
|
2103
2104
|
} else {
|
|
2104
2105
|
return {
|
|
2105
2106
|
envTransactionServiceUrl: transactionServiceTestUrl2,
|
|
2106
|
-
envBillingServiceUrl:
|
|
2107
|
+
envBillingServiceUrl: billingServiceTestUrl
|
|
2107
2108
|
};
|
|
2108
2109
|
}
|
|
2109
2110
|
};
|
|
@@ -2843,7 +2844,7 @@ var ECDSA_SIGNER_CONTRACT = "0x6A6F069E2a08c2468e7724Ab3250CdBFBA14D4FF";
|
|
|
2843
2844
|
var billingServiceUrl2 = "https://api.acta.link/billing/v1/";
|
|
2844
2845
|
var depositServiceUrl2 = "https://api.acta.link/deposit/v1/";
|
|
2845
2846
|
var transactionServiceUrl4 = "https://api.acta.link/transaction/v1/";
|
|
2846
|
-
var
|
|
2847
|
+
var billingServiceTestUrl2 = "https://api.acta.link/billing/test/v1/";
|
|
2847
2848
|
var toSignerId = (signer) => {
|
|
2848
2849
|
return encodeAbiParameters(
|
|
2849
2850
|
[{ name: "signerData", type: "bytes" }],
|
|
@@ -3183,7 +3184,7 @@ var createBillingCheckoutSession = (serviceSessionparams) => __async(null, null,
|
|
|
3183
3184
|
var _a, _b, _c, _d;
|
|
3184
3185
|
try {
|
|
3185
3186
|
const sessionData = yield createBillingSessionAPICall(
|
|
3186
|
-
`${serviceSessionparams.env === "mainnet" ? billingServiceUrl2 :
|
|
3187
|
+
`${serviceSessionparams.env === "mainnet" ? billingServiceUrl2 : billingServiceTestUrl2}paysession/create`,
|
|
3187
3188
|
{
|
|
3188
3189
|
paylinkId: serviceSessionparams.paylinkId,
|
|
3189
3190
|
mode: serviceSessionparams.mode,
|
|
@@ -3208,7 +3209,7 @@ var getBillingPaymentSessionDetails = (serviceSessionparams) => __async(null, nu
|
|
|
3208
3209
|
throw new Error("checkout session ID is required.");
|
|
3209
3210
|
}
|
|
3210
3211
|
const sessionData = yield fetchBillingSessionDetails(
|
|
3211
|
-
`${serviceSessionparams.env === "mainnet" ? billingServiceUrl2 :
|
|
3212
|
+
`${serviceSessionparams.env === "mainnet" ? billingServiceUrl2 : billingServiceTestUrl2}paysession?checkoutSessionId=${serviceSessionparams.checkoutSessionId}`
|
|
3212
3213
|
);
|
|
3213
3214
|
return sessionData;
|
|
3214
3215
|
});
|