@actalink/commonlib 0.0.21 → 0.0.23
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 +5 -3
- package/dist/index.d.cts +2 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +5 -3
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -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,6 +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/";
|
|
2884
|
+
var billingServiceTestUrl2 = "https://api.acta.link/billing/test/v1/";
|
|
2883
2885
|
var toSignerId = (signer) => {
|
|
2884
2886
|
return (0, import_viem8.encodeAbiParameters)(
|
|
2885
2887
|
[{ name: "signerData", type: "bytes" }],
|
|
@@ -3219,7 +3221,7 @@ var createBillingCheckoutSession = (serviceSessionparams) => __async(null, null,
|
|
|
3219
3221
|
var _a, _b, _c, _d;
|
|
3220
3222
|
try {
|
|
3221
3223
|
const sessionData = yield createBillingSessionAPICall(
|
|
3222
|
-
`${billingServiceUrl2}paysession/create`,
|
|
3224
|
+
`${serviceSessionparams.env === "mainnet" ? billingServiceUrl2 : billingServiceTestUrl2}paysession/create`,
|
|
3223
3225
|
{
|
|
3224
3226
|
paylinkId: serviceSessionparams.paylinkId,
|
|
3225
3227
|
mode: serviceSessionparams.mode,
|
|
@@ -3244,7 +3246,7 @@ var getBillingPaymentSessionDetails = (serviceSessionparams) => __async(null, nu
|
|
|
3244
3246
|
throw new Error("checkout session ID is required.");
|
|
3245
3247
|
}
|
|
3246
3248
|
const sessionData = yield fetchBillingSessionDetails(
|
|
3247
|
-
`${billingServiceUrl2}paysession?checkoutSessionId=${serviceSessionparams.checkoutSessionId}`
|
|
3249
|
+
`${serviceSessionparams.env === "mainnet" ? billingServiceUrl2 : billingServiceTestUrl2}paysession?checkoutSessionId=${serviceSessionparams.checkoutSessionId}`
|
|
3248
3250
|
);
|
|
3249
3251
|
return sessionData;
|
|
3250
3252
|
});
|
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
|
@@ -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,6 +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/";
|
|
2847
|
+
var billingServiceTestUrl2 = "https://api.acta.link/billing/test/v1/";
|
|
2846
2848
|
var toSignerId = (signer) => {
|
|
2847
2849
|
return encodeAbiParameters(
|
|
2848
2850
|
[{ name: "signerData", type: "bytes" }],
|
|
@@ -3182,7 +3184,7 @@ var createBillingCheckoutSession = (serviceSessionparams) => __async(null, null,
|
|
|
3182
3184
|
var _a, _b, _c, _d;
|
|
3183
3185
|
try {
|
|
3184
3186
|
const sessionData = yield createBillingSessionAPICall(
|
|
3185
|
-
`${billingServiceUrl2}paysession/create`,
|
|
3187
|
+
`${serviceSessionparams.env === "mainnet" ? billingServiceUrl2 : billingServiceTestUrl2}paysession/create`,
|
|
3186
3188
|
{
|
|
3187
3189
|
paylinkId: serviceSessionparams.paylinkId,
|
|
3188
3190
|
mode: serviceSessionparams.mode,
|
|
@@ -3207,7 +3209,7 @@ var getBillingPaymentSessionDetails = (serviceSessionparams) => __async(null, nu
|
|
|
3207
3209
|
throw new Error("checkout session ID is required.");
|
|
3208
3210
|
}
|
|
3209
3211
|
const sessionData = yield fetchBillingSessionDetails(
|
|
3210
|
-
`${billingServiceUrl2}paysession?checkoutSessionId=${serviceSessionparams.checkoutSessionId}`
|
|
3212
|
+
`${serviceSessionparams.env === "mainnet" ? billingServiceUrl2 : billingServiceTestUrl2}paysession?checkoutSessionId=${serviceSessionparams.checkoutSessionId}`
|
|
3211
3213
|
);
|
|
3212
3214
|
return sessionData;
|
|
3213
3215
|
});
|