@actalink/commonlib 0.0.9 → 0.0.11

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 CHANGED
@@ -1690,7 +1690,7 @@ var ActaDeposit = class {
1690
1690
 
1691
1691
  // src/billing.ts
1692
1692
  var import_viem6 = require("viem");
1693
- var transactionServiceUrl2 = "http://localhost:8000/transaction/v1/";
1693
+ var transactionServiceUrl2 = "https://api.acta.link/transaction/v1/";
1694
1694
  var ActaBilling = class {
1695
1695
  constructor(parameters) {
1696
1696
  this.count = 0;
@@ -1917,9 +1917,9 @@ var import_account_abstraction2 = require("viem/account-abstraction");
1917
1917
  var import_policies2 = require("@zerodev/permissions/policies");
1918
1918
  var import_semver = require("semver");
1919
1919
  var ECDSA_SIGNER_CONTRACT = "0x6A6F069E2a08c2468e7724Ab3250CdBFBA14D4FF";
1920
- var billingServiceUrl = "http://localhost:4000/billing/v1/";
1921
- var depositServiceUrl2 = "http://localhost:4000/deposit/v1/";
1922
- var transactionServiceUrl3 = "http://localhost:8000/transaction/v1/";
1920
+ var billingServiceUrl = "https://api.acta.link/billing/v1/";
1921
+ var depositServiceUrl2 = "https://api.acta.link/deposit/v1/";
1922
+ var transactionServiceUrl3 = "https://api.acta.link/transaction/v1/";
1923
1923
  var toSignerId = (signer) => {
1924
1924
  return (0, import_viem7.encodeAbiParameters)(
1925
1925
  [{ name: "signerData", type: "bytes" }],
@@ -2256,15 +2256,21 @@ var getPeriodInterval = (periodUnit) => {
2256
2256
  }
2257
2257
  };
2258
2258
  var createBillingCheckoutSession = (serviceSessionparams) => __async(null, null, function* () {
2259
+ var _a, _b, _c, _d;
2259
2260
  try {
2260
2261
  const sessionData = yield createBillingSessionAPICall(
2261
2262
  `${billingServiceUrl}paysession/create`,
2262
2263
  {
2263
- paylinkId: serviceSessionparams.paylinkId
2264
+ paylinkId: serviceSessionparams.paylinkId,
2265
+ mode: serviceSessionparams.mode,
2266
+ successUrl: (_a = serviceSessionparams.successUrl) != null ? _a : void 0,
2267
+ cancelUrl: (_b = serviceSessionparams.cancelUrl) != null ? _b : void 0,
2268
+ failureUrl: (_c = serviceSessionparams.failureUrl) != null ? _c : void 0,
2269
+ metadata: (_d = serviceSessionparams.metadata) != null ? _d : void 0
2264
2270
  }
2265
2271
  );
2266
2272
  if (sessionData) {
2267
- return sessionData.checkoutSessionId;
2273
+ return sessionData;
2268
2274
  }
2269
2275
  } catch (error) {
2270
2276
  if (error instanceof Error) {
package/dist/index.d.cts CHANGED
@@ -3749,7 +3749,12 @@ declare const decodeParamsFromInitCode: (initCode: Hex, kernelVersion: KERNEL_VE
3749
3749
  declare const getPeriodInterval: (periodUnit: string) => number;
3750
3750
  declare const createBillingCheckoutSession: (serviceSessionparams: {
3751
3751
  paylinkId: string;
3752
- }) => Promise<string | undefined>;
3752
+ mode: "paylink";
3753
+ successUrl?: string;
3754
+ cancelUrl?: string;
3755
+ failureUrl?: string;
3756
+ metadata?: Record<string, string>;
3757
+ }) => Promise<any>;
3753
3758
  declare const getBillingPaymentSessionDetails: (serviceSessionparams: {
3754
3759
  checkoutSessionId: string;
3755
3760
  }) => Promise<any>;
@@ -7442,6 +7447,11 @@ declare function scheduleRecurringPaymentsAPICall(url: string, params: {
7442
7447
  }): Promise<any>;
7443
7448
  declare function createBillingSessionAPICall(url: string, sessionBodyParams: {
7444
7449
  paylinkId: string;
7450
+ mode: "paylink";
7451
+ successUrl?: string;
7452
+ cancelUrl?: string;
7453
+ failureUrl?: string;
7454
+ metadata?: Record<string, string>;
7445
7455
  }): Promise<any>;
7446
7456
  declare function fetchBillingSessionDetails(url: string): Promise<any>;
7447
7457
  declare function executeSinglePaymentAPICall(url: string, userOperation: RpcUserOperation$1<"0.7">, paymentParams: {
package/dist/index.d.ts CHANGED
@@ -3749,7 +3749,12 @@ declare const decodeParamsFromInitCode: (initCode: Hex, kernelVersion: KERNEL_VE
3749
3749
  declare const getPeriodInterval: (periodUnit: string) => number;
3750
3750
  declare const createBillingCheckoutSession: (serviceSessionparams: {
3751
3751
  paylinkId: string;
3752
- }) => Promise<string | undefined>;
3752
+ mode: "paylink";
3753
+ successUrl?: string;
3754
+ cancelUrl?: string;
3755
+ failureUrl?: string;
3756
+ metadata?: Record<string, string>;
3757
+ }) => Promise<any>;
3753
3758
  declare const getBillingPaymentSessionDetails: (serviceSessionparams: {
3754
3759
  checkoutSessionId: string;
3755
3760
  }) => Promise<any>;
@@ -7442,6 +7447,11 @@ declare function scheduleRecurringPaymentsAPICall(url: string, params: {
7442
7447
  }): Promise<any>;
7443
7448
  declare function createBillingSessionAPICall(url: string, sessionBodyParams: {
7444
7449
  paylinkId: string;
7450
+ mode: "paylink";
7451
+ successUrl?: string;
7452
+ cancelUrl?: string;
7453
+ failureUrl?: string;
7454
+ metadata?: Record<string, string>;
7445
7455
  }): Promise<any>;
7446
7456
  declare function fetchBillingSessionDetails(url: string): Promise<any>;
7447
7457
  declare function executeSinglePaymentAPICall(url: string, userOperation: RpcUserOperation$1<"0.7">, paymentParams: {
package/dist/index.js CHANGED
@@ -1624,7 +1624,7 @@ var ActaDeposit = class {
1624
1624
 
1625
1625
  // src/billing.ts
1626
1626
  import { toHex as toHex3 } from "viem";
1627
- var transactionServiceUrl2 = "http://localhost:8000/transaction/v1/";
1627
+ var transactionServiceUrl2 = "https://api.acta.link/transaction/v1/";
1628
1628
  var ActaBilling = class {
1629
1629
  constructor(parameters) {
1630
1630
  this.count = 0;
@@ -1882,9 +1882,9 @@ import {
1882
1882
  } from "@zerodev/permissions/policies";
1883
1883
  import { coerce, gt } from "semver";
1884
1884
  var ECDSA_SIGNER_CONTRACT = "0x6A6F069E2a08c2468e7724Ab3250CdBFBA14D4FF";
1885
- var billingServiceUrl = "http://localhost:4000/billing/v1/";
1886
- var depositServiceUrl2 = "http://localhost:4000/deposit/v1/";
1887
- var transactionServiceUrl3 = "http://localhost:8000/transaction/v1/";
1885
+ var billingServiceUrl = "https://api.acta.link/billing/v1/";
1886
+ var depositServiceUrl2 = "https://api.acta.link/deposit/v1/";
1887
+ var transactionServiceUrl3 = "https://api.acta.link/transaction/v1/";
1888
1888
  var toSignerId = (signer) => {
1889
1889
  return encodeAbiParameters(
1890
1890
  [{ name: "signerData", type: "bytes" }],
@@ -2221,15 +2221,21 @@ var getPeriodInterval = (periodUnit) => {
2221
2221
  }
2222
2222
  };
2223
2223
  var createBillingCheckoutSession = (serviceSessionparams) => __async(null, null, function* () {
2224
+ var _a, _b, _c, _d;
2224
2225
  try {
2225
2226
  const sessionData = yield createBillingSessionAPICall(
2226
2227
  `${billingServiceUrl}paysession/create`,
2227
2228
  {
2228
- paylinkId: serviceSessionparams.paylinkId
2229
+ paylinkId: serviceSessionparams.paylinkId,
2230
+ mode: serviceSessionparams.mode,
2231
+ successUrl: (_a = serviceSessionparams.successUrl) != null ? _a : void 0,
2232
+ cancelUrl: (_b = serviceSessionparams.cancelUrl) != null ? _b : void 0,
2233
+ failureUrl: (_c = serviceSessionparams.failureUrl) != null ? _c : void 0,
2234
+ metadata: (_d = serviceSessionparams.metadata) != null ? _d : void 0
2229
2235
  }
2230
2236
  );
2231
2237
  if (sessionData) {
2232
- return sessionData.checkoutSessionId;
2238
+ return sessionData;
2233
2239
  }
2234
2240
  } catch (error) {
2235
2241
  if (error instanceof Error) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@actalink/commonlib",
3
- "version": "0.0.9",
3
+ "version": "0.0.11",
4
4
  "author": "Actalink",
5
5
  "license": "MIT license",
6
6
  "publishConfig": {