@actalink/commonlib 0.0.2 → 0.0.4

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.d.cts CHANGED
@@ -19,14 +19,14 @@ import { KernelSmartAccountImplementation } from '@zerodev/sdk/accounts';
19
19
  import * as viem__types_actions_siwe_verifySiweMessage_js from 'viem/_types/actions/siwe/verifySiweMessage.js';
20
20
 
21
21
  declare enum TokenLogo {
22
- ETH = "https://pay.daimo.com/chain-logos/ethereum.png",
23
- WETH = "https://pay.daimo.com/coin-logos/weth.png",
24
- USDC = "https://pay.daimo.com/coin-logos/usdc.png",
25
- EURC = "https://pay.daimo.com/coin-logos/eurc.png",
26
- USDT = "https://pay.daimo.com/coin-logos/usdt.png",
27
- DAI = "https://pay.daimo.com/coin-logos/dai.png",
28
- POL = "https://pay.daimo.com/coin-logos/pol.png",
29
- BNB = "https://pay.daimo.com/coin-logos/bnb.png"
22
+ ETH = "https://api.acta.link/deposit/v1/logos/ethereum.png",
23
+ WETH = "https://api.acta.link/deposit/v1/logos/weth.png",
24
+ USDC = "https://api.acta.link/deposit/v1/logos/usdc.png",
25
+ EURC = "https://api.acta.link/deposit/v1/logos/eurc.png",
26
+ USDT = "https://api.acta.link/deposit/v1/logos/usdt.png",
27
+ DAI = "https://api.acta.link/deposit/v1/logos/dai.png",
28
+ POL = "https://api.acta.link/deposit/v1/logos/pol.png",
29
+ BNB = "https://api.acta.link/deposit/v1/logos/bnb.png"
30
30
  }
31
31
  type Token = {
32
32
  chainId: number;
@@ -60,6 +60,7 @@ interface AbstractPaymentParams {
60
60
  }
61
61
  interface DepositClassParams extends AbstractPaymentParams {
62
62
  depositSessionId?: string;
63
+ allowMaxTokenApproval?: boolean;
63
64
  }
64
65
  type EstimateSinglePaymentGasParameters = Omit<AbstractPaymentParams, "connectorType" | "signer" | "walletClient" | "serviceType" | "paymentType" | "count" | "intervalUnit" | "startDate" | "endDate" | "serviceUrl" | "serviceParams" | "serviceSessionParams">;
65
66
  type ModularSigner = {
@@ -120,9 +121,12 @@ type PermissionAccountParams = {
120
121
  privateKey?: Hex;
121
122
  eip7702Auth?: SignAuthorizationReturnType;
122
123
  };
123
- type SinglePaymentParamsType = Omit<AbstractPaymentParams, "connectorType" | "signer" | "walletClient" | "serviceType" | "serviceUrl" | "serviceSessionParams" | "count" | "intervalUnit" | "startDate" | "endDate" | "paymentType">;
124
+ type SinglePaymentParamsType = Omit<AbstractPaymentParams, "connectorType" | "signer" | "walletClient" | "serviceType" | "serviceUrl" | "serviceSessionParams" | "count" | "intervalUnit" | "startDate" | "endDate" | "paymentType"> & {
125
+ allowMaxTokenApproval?: boolean;
126
+ };
124
127
  type RecurringPaymentParamsType = Omit<AbstractPaymentParams, "connectorType" | "signer" | "walletClient" | "serviceType" | "paymentType" | "serviceUrl" | "serviceSessionParams"> & {
125
128
  endDate?: number;
129
+ allowMaxTokenApproval?: boolean;
126
130
  };
127
131
 
128
132
  declare const arbitrumETH: Token;
@@ -203,6 +207,7 @@ declare class ActaDeposit {
203
207
  private readonly account;
204
208
  private readonly viemClient;
205
209
  private readonly serviceType;
210
+ private readonly allowMaxTokenApproval;
206
211
  constructor(parameters: DepositClassParams);
207
212
  createSession(serviceSessionparams: {
208
213
  projectId: string;
@@ -236,6 +241,7 @@ declare class ActaDeposit {
236
241
  createPayment(servicePaymentParams?: any): Promise<any>;
237
242
  createSinglePayment(servicePaymentParams?: any): Promise<any>;
238
243
  createRecurringPayments(servicePaymentParams?: any): Promise<any>;
244
+ getPaymentSteps(): Promise<string[]>;
239
245
  }
240
246
 
241
247
  declare class ActaAccount {
@@ -9181,7 +9187,7 @@ declare class ViemClient {
9181
9187
  } & viem.ExactPartial<Pick<viem.PublicActions<viem.HttpTransport<undefined, false>, viem.Chain | undefined, undefined>, "call" | "getChainId" | "prepareTransactionRequest" | "sendRawTransaction" | "createContractEventFilter" | "createEventFilter" | "estimateContractGas" | "estimateGas" | "getBlock" | "getBlockNumber" | "getContractEvents" | "getEnsText" | "getFilterChanges" | "getGasPrice" | "getLogs" | "getTransaction" | "getTransactionCount" | "getTransactionReceipt" | "readContract" | "simulateContract" | "uninstallFilter" | "watchBlockNumber" | "watchContractEvent"> & Pick<viem.WalletActions<viem.Chain | undefined, undefined>, "sendTransaction" | "writeContract">>>(fn: (client: viem.Client<viem.HttpTransport<undefined, false>, viem.Chain | undefined, undefined, viem.PublicRpcSchema, viem.PublicActions<viem.HttpTransport<undefined, false>, viem.Chain | undefined>>) => client) => viem.Client<viem.HttpTransport<undefined, false>, viem.Chain | undefined, undefined, viem.PublicRpcSchema, { [K in keyof client]: client[K]; } & viem.PublicActions<viem.HttpTransport<undefined, false>, viem.Chain | undefined>>;
9182
9188
  };
9183
9189
  checkTokenAllowance(token: Token, owner: Address, spender: Address): Promise<bigint>;
9184
- checkAndApproveToken(token: Token, spender: Address, amount: bigint): Promise<bigint>;
9190
+ checkAndApproveToken(token: Token, spender: Address, amount: bigint, allowMaxTokenApproval: boolean): Promise<bigint>;
9185
9191
  }
9186
9192
 
9187
9193
  declare function getRpcByChainId(chainId: number): string | undefined;
package/dist/index.d.ts CHANGED
@@ -19,14 +19,14 @@ import { KernelSmartAccountImplementation } from '@zerodev/sdk/accounts';
19
19
  import * as viem__types_actions_siwe_verifySiweMessage_js from 'viem/_types/actions/siwe/verifySiweMessage.js';
20
20
 
21
21
  declare enum TokenLogo {
22
- ETH = "https://pay.daimo.com/chain-logos/ethereum.png",
23
- WETH = "https://pay.daimo.com/coin-logos/weth.png",
24
- USDC = "https://pay.daimo.com/coin-logos/usdc.png",
25
- EURC = "https://pay.daimo.com/coin-logos/eurc.png",
26
- USDT = "https://pay.daimo.com/coin-logos/usdt.png",
27
- DAI = "https://pay.daimo.com/coin-logos/dai.png",
28
- POL = "https://pay.daimo.com/coin-logos/pol.png",
29
- BNB = "https://pay.daimo.com/coin-logos/bnb.png"
22
+ ETH = "https://api.acta.link/deposit/v1/logos/ethereum.png",
23
+ WETH = "https://api.acta.link/deposit/v1/logos/weth.png",
24
+ USDC = "https://api.acta.link/deposit/v1/logos/usdc.png",
25
+ EURC = "https://api.acta.link/deposit/v1/logos/eurc.png",
26
+ USDT = "https://api.acta.link/deposit/v1/logos/usdt.png",
27
+ DAI = "https://api.acta.link/deposit/v1/logos/dai.png",
28
+ POL = "https://api.acta.link/deposit/v1/logos/pol.png",
29
+ BNB = "https://api.acta.link/deposit/v1/logos/bnb.png"
30
30
  }
31
31
  type Token = {
32
32
  chainId: number;
@@ -60,6 +60,7 @@ interface AbstractPaymentParams {
60
60
  }
61
61
  interface DepositClassParams extends AbstractPaymentParams {
62
62
  depositSessionId?: string;
63
+ allowMaxTokenApproval?: boolean;
63
64
  }
64
65
  type EstimateSinglePaymentGasParameters = Omit<AbstractPaymentParams, "connectorType" | "signer" | "walletClient" | "serviceType" | "paymentType" | "count" | "intervalUnit" | "startDate" | "endDate" | "serviceUrl" | "serviceParams" | "serviceSessionParams">;
65
66
  type ModularSigner = {
@@ -120,9 +121,12 @@ type PermissionAccountParams = {
120
121
  privateKey?: Hex;
121
122
  eip7702Auth?: SignAuthorizationReturnType;
122
123
  };
123
- type SinglePaymentParamsType = Omit<AbstractPaymentParams, "connectorType" | "signer" | "walletClient" | "serviceType" | "serviceUrl" | "serviceSessionParams" | "count" | "intervalUnit" | "startDate" | "endDate" | "paymentType">;
124
+ type SinglePaymentParamsType = Omit<AbstractPaymentParams, "connectorType" | "signer" | "walletClient" | "serviceType" | "serviceUrl" | "serviceSessionParams" | "count" | "intervalUnit" | "startDate" | "endDate" | "paymentType"> & {
125
+ allowMaxTokenApproval?: boolean;
126
+ };
124
127
  type RecurringPaymentParamsType = Omit<AbstractPaymentParams, "connectorType" | "signer" | "walletClient" | "serviceType" | "paymentType" | "serviceUrl" | "serviceSessionParams"> & {
125
128
  endDate?: number;
129
+ allowMaxTokenApproval?: boolean;
126
130
  };
127
131
 
128
132
  declare const arbitrumETH: Token;
@@ -203,6 +207,7 @@ declare class ActaDeposit {
203
207
  private readonly account;
204
208
  private readonly viemClient;
205
209
  private readonly serviceType;
210
+ private readonly allowMaxTokenApproval;
206
211
  constructor(parameters: DepositClassParams);
207
212
  createSession(serviceSessionparams: {
208
213
  projectId: string;
@@ -236,6 +241,7 @@ declare class ActaDeposit {
236
241
  createPayment(servicePaymentParams?: any): Promise<any>;
237
242
  createSinglePayment(servicePaymentParams?: any): Promise<any>;
238
243
  createRecurringPayments(servicePaymentParams?: any): Promise<any>;
244
+ getPaymentSteps(): Promise<string[]>;
239
245
  }
240
246
 
241
247
  declare class ActaAccount {
@@ -9181,7 +9187,7 @@ declare class ViemClient {
9181
9187
  } & viem.ExactPartial<Pick<viem.PublicActions<viem.HttpTransport<undefined, false>, viem.Chain | undefined, undefined>, "call" | "getChainId" | "prepareTransactionRequest" | "sendRawTransaction" | "createContractEventFilter" | "createEventFilter" | "estimateContractGas" | "estimateGas" | "getBlock" | "getBlockNumber" | "getContractEvents" | "getEnsText" | "getFilterChanges" | "getGasPrice" | "getLogs" | "getTransaction" | "getTransactionCount" | "getTransactionReceipt" | "readContract" | "simulateContract" | "uninstallFilter" | "watchBlockNumber" | "watchContractEvent"> & Pick<viem.WalletActions<viem.Chain | undefined, undefined>, "sendTransaction" | "writeContract">>>(fn: (client: viem.Client<viem.HttpTransport<undefined, false>, viem.Chain | undefined, undefined, viem.PublicRpcSchema, viem.PublicActions<viem.HttpTransport<undefined, false>, viem.Chain | undefined>>) => client) => viem.Client<viem.HttpTransport<undefined, false>, viem.Chain | undefined, undefined, viem.PublicRpcSchema, { [K in keyof client]: client[K]; } & viem.PublicActions<viem.HttpTransport<undefined, false>, viem.Chain | undefined>>;
9182
9188
  };
9183
9189
  checkTokenAllowance(token: Token, owner: Address, spender: Address): Promise<bigint>;
9184
- checkAndApproveToken(token: Token, spender: Address, amount: bigint): Promise<bigint>;
9190
+ checkAndApproveToken(token: Token, spender: Address, amount: bigint, allowMaxTokenApproval: boolean): Promise<bigint>;
9185
9191
  }
9186
9192
 
9187
9193
  declare function getRpcByChainId(chainId: number): string | undefined;