@actalink/commonlib 0.0.21 → 0.0.22
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 +3 -2
- package/dist/index.d.cts +2 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +3 -2
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -2880,6 +2880,7 @@ var ECDSA_SIGNER_CONTRACT = "0x6A6F069E2a08c2468e7724Ab3250CdBFBA14D4FF";
|
|
|
2880
2880
|
var billingServiceUrl2 = "https://api.acta.link/billing/v1/";
|
|
2881
2881
|
var depositServiceUrl2 = "https://api.acta.link/deposit/v1/";
|
|
2882
2882
|
var transactionServiceUrl4 = "https://api.acta.link/transaction/v1/";
|
|
2883
|
+
var billingServiceTestUrl = "https://api.acta.link/billing/test/v1/";
|
|
2883
2884
|
var toSignerId = (signer) => {
|
|
2884
2885
|
return (0, import_viem8.encodeAbiParameters)(
|
|
2885
2886
|
[{ name: "signerData", type: "bytes" }],
|
|
@@ -3219,7 +3220,7 @@ var createBillingCheckoutSession = (serviceSessionparams) => __async(null, null,
|
|
|
3219
3220
|
var _a, _b, _c, _d;
|
|
3220
3221
|
try {
|
|
3221
3222
|
const sessionData = yield createBillingSessionAPICall(
|
|
3222
|
-
`${billingServiceUrl2}paysession/create`,
|
|
3223
|
+
`${serviceSessionparams.env === "mainnet" ? billingServiceUrl2 : billingServiceTestUrl}paysession/create`,
|
|
3223
3224
|
{
|
|
3224
3225
|
paylinkId: serviceSessionparams.paylinkId,
|
|
3225
3226
|
mode: serviceSessionparams.mode,
|
|
@@ -3244,7 +3245,7 @@ var getBillingPaymentSessionDetails = (serviceSessionparams) => __async(null, nu
|
|
|
3244
3245
|
throw new Error("checkout session ID is required.");
|
|
3245
3246
|
}
|
|
3246
3247
|
const sessionData = yield fetchBillingSessionDetails(
|
|
3247
|
-
`${billingServiceUrl2}paysession?checkoutSessionId=${serviceSessionparams.checkoutSessionId}`
|
|
3248
|
+
`${serviceSessionparams.env === "mainnet" ? billingServiceUrl2 : billingServiceTestUrl}paysession?checkoutSessionId=${serviceSessionparams.checkoutSessionId}`
|
|
3248
3249
|
);
|
|
3249
3250
|
return sessionData;
|
|
3250
3251
|
});
|
package/dist/index.d.cts
CHANGED
|
@@ -5067,9 +5067,11 @@ declare const createBillingCheckoutSession: (serviceSessionparams: {
|
|
|
5067
5067
|
cancelUrl?: string;
|
|
5068
5068
|
failureUrl?: string;
|
|
5069
5069
|
metadata?: Record<string, string>;
|
|
5070
|
+
env: "mainnet" | "testnet";
|
|
5070
5071
|
}) => Promise<any>;
|
|
5071
5072
|
declare const getBillingPaymentSessionDetails: (serviceSessionparams: {
|
|
5072
5073
|
checkoutSessionId: string;
|
|
5074
|
+
env: "mainnet" | "testnet";
|
|
5073
5075
|
}) => Promise<any>;
|
|
5074
5076
|
declare const cancelRecurringTransaction: ({ serviceType, paymentId, chainId, walletClient, }: {
|
|
5075
5077
|
serviceType: "deposit" | "billing";
|
package/dist/index.d.ts
CHANGED
|
@@ -5067,9 +5067,11 @@ declare const createBillingCheckoutSession: (serviceSessionparams: {
|
|
|
5067
5067
|
cancelUrl?: string;
|
|
5068
5068
|
failureUrl?: string;
|
|
5069
5069
|
metadata?: Record<string, string>;
|
|
5070
|
+
env: "mainnet" | "testnet";
|
|
5070
5071
|
}) => Promise<any>;
|
|
5071
5072
|
declare const getBillingPaymentSessionDetails: (serviceSessionparams: {
|
|
5072
5073
|
checkoutSessionId: string;
|
|
5074
|
+
env: "mainnet" | "testnet";
|
|
5073
5075
|
}) => Promise<any>;
|
|
5074
5076
|
declare const cancelRecurringTransaction: ({ serviceType, paymentId, chainId, walletClient, }: {
|
|
5075
5077
|
serviceType: "deposit" | "billing";
|
package/dist/index.js
CHANGED
|
@@ -2843,6 +2843,7 @@ var ECDSA_SIGNER_CONTRACT = "0x6A6F069E2a08c2468e7724Ab3250CdBFBA14D4FF";
|
|
|
2843
2843
|
var billingServiceUrl2 = "https://api.acta.link/billing/v1/";
|
|
2844
2844
|
var depositServiceUrl2 = "https://api.acta.link/deposit/v1/";
|
|
2845
2845
|
var transactionServiceUrl4 = "https://api.acta.link/transaction/v1/";
|
|
2846
|
+
var billingServiceTestUrl = "https://api.acta.link/billing/test/v1/";
|
|
2846
2847
|
var toSignerId = (signer) => {
|
|
2847
2848
|
return encodeAbiParameters(
|
|
2848
2849
|
[{ name: "signerData", type: "bytes" }],
|
|
@@ -3182,7 +3183,7 @@ var createBillingCheckoutSession = (serviceSessionparams) => __async(null, null,
|
|
|
3182
3183
|
var _a, _b, _c, _d;
|
|
3183
3184
|
try {
|
|
3184
3185
|
const sessionData = yield createBillingSessionAPICall(
|
|
3185
|
-
`${billingServiceUrl2}paysession/create`,
|
|
3186
|
+
`${serviceSessionparams.env === "mainnet" ? billingServiceUrl2 : billingServiceTestUrl}paysession/create`,
|
|
3186
3187
|
{
|
|
3187
3188
|
paylinkId: serviceSessionparams.paylinkId,
|
|
3188
3189
|
mode: serviceSessionparams.mode,
|
|
@@ -3207,7 +3208,7 @@ var getBillingPaymentSessionDetails = (serviceSessionparams) => __async(null, nu
|
|
|
3207
3208
|
throw new Error("checkout session ID is required.");
|
|
3208
3209
|
}
|
|
3209
3210
|
const sessionData = yield fetchBillingSessionDetails(
|
|
3210
|
-
`${billingServiceUrl2}paysession?checkoutSessionId=${serviceSessionparams.checkoutSessionId}`
|
|
3211
|
+
`${serviceSessionparams.env === "mainnet" ? billingServiceUrl2 : billingServiceTestUrl}paysession?checkoutSessionId=${serviceSessionparams.checkoutSessionId}`
|
|
3211
3212
|
);
|
|
3212
3213
|
return sessionData;
|
|
3213
3214
|
});
|