@actalink/commonlib 0.0.22 → 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 -4
- package/dist/index.js +5 -4
- 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,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
|
@@ -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
|
});
|