@atxp/polygon 0.10.8 → 0.10.10

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atxp/polygon",
3
- "version": "0.10.8",
3
+ "version": "0.10.10",
4
4
  "description": "ATXP for Polygon",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -35,8 +35,8 @@
35
35
  "pack:dry": "npm pack --dry-run"
36
36
  },
37
37
  "dependencies": {
38
- "@atxp/client": "0.10.8",
39
- "@atxp/common": "0.10.8",
38
+ "@atxp/client": "0.10.10",
39
+ "@atxp/common": "0.10.10",
40
40
  "bignumber.js": "^9.3.0",
41
41
  "viem": "^2.34.0"
42
42
  },
@@ -1,35 +0,0 @@
1
- import BigNumber from 'bignumber.js';
2
- import { Logger, Currency, PaymentMaker, AccountId, PaymentIdentifier, Destination } from '@atxp/common';
3
- export type MainWalletProvider = {
4
- request: (params: {
5
- method: string;
6
- params?: any[];
7
- }) => Promise<any>;
8
- };
9
- /**
10
- * Browser-based payment maker using direct wallet signing.
11
- * Each transaction requires user approval in their wallet.
12
- * User pays gas fees in POL.
13
- */
14
- export declare class DirectWalletPaymentMaker implements PaymentMaker {
15
- private walletAddress;
16
- private provider;
17
- private logger;
18
- private chainId;
19
- private usdcAddress;
20
- constructor(walletAddress: string, provider: MainWalletProvider, logger?: Logger, chainId?: number);
21
- getSourceAddress(_params: {
22
- amount: BigNumber;
23
- currency: Currency;
24
- receiver: string;
25
- memo: string;
26
- }): string;
27
- generateJWT(payload: {
28
- paymentRequestId: string;
29
- codeChallenge: string;
30
- accountId?: AccountId | null;
31
- }): Promise<string>;
32
- makePayment(destinations: Destination[], _memo: string, _paymentRequestId?: string): Promise<PaymentIdentifier | null>;
33
- private waitForTransactionConfirmations;
34
- }
35
- //# sourceMappingURL=directWalletPaymentMaker.d.ts.map
@@ -1,29 +0,0 @@
1
- import type { PaymentMaker } from '@atxp/common';
2
- import { Logger, Currency, AccountId, PaymentIdentifier, Destination } from '@atxp/common';
3
- import { WalletClient, PublicActions } from "viem";
4
- type ExtendedWalletClient = WalletClient & PublicActions;
5
- /**
6
- * Server-side Polygon payment maker for CLI/backend usage
7
- * Uses direct private key signing without browser providers.
8
- * Similar to BasePaymentMaker but for Polygon network.
9
- */
10
- export declare class ServerPaymentMaker implements PaymentMaker {
11
- protected signingClient: ExtendedWalletClient;
12
- protected logger: Logger;
13
- protected chainId: number;
14
- constructor(polygonRPCUrl: string, walletClient: WalletClient, chainId: number, logger?: Logger);
15
- getSourceAddress(_params: {
16
- amount: BigNumber;
17
- currency: Currency;
18
- receiver: string;
19
- memo: string;
20
- }): string;
21
- generateJWT({ paymentRequestId, codeChallenge, accountId }: {
22
- paymentRequestId: string;
23
- codeChallenge: string;
24
- accountId?: AccountId | null;
25
- }): Promise<string>;
26
- makePayment(destinations: Destination[], _memo: string, _paymentRequestId?: string): Promise<PaymentIdentifier | null>;
27
- }
28
- export {};
29
- //# sourceMappingURL=serverPaymentMaker.d.ts.map
@@ -1,17 +0,0 @@
1
- import type { Mock } from 'vitest';
2
- import type { Eip1193Provider } from './types.js';
3
- import type { Hex } from 'viem';
4
- export type MockEip1193Provider = Eip1193Provider & {
5
- request: Mock;
6
- };
7
- export declare const TEST_WALLET_ADDRESS: Hex;
8
- export declare const TEST_RECEIVER_ADDRESS: Hex;
9
- export declare const TEST_PRIVATE_KEY: Hex;
10
- export declare function mockLogger(): {
11
- info: Mock<import("@vitest/spy").Procedure>;
12
- warn: Mock<import("@vitest/spy").Procedure>;
13
- error: Mock<import("@vitest/spy").Procedure>;
14
- debug: Mock<import("@vitest/spy").Procedure>;
15
- };
16
- export declare function mockProvider(overrides?: Partial<MockEip1193Provider>): MockEip1193Provider;
17
- //# sourceMappingURL=testHelpers.d.ts.map
package/dist/types.d.ts DELETED
@@ -1,11 +0,0 @@
1
- /**
2
- * EIP-1193 compliant Ethereum provider interface
3
- * Used for browser wallet integrations
4
- */
5
- export type Eip1193Provider = {
6
- request: (params: {
7
- method: string;
8
- params?: unknown[];
9
- }) => Promise<unknown>;
10
- };
11
- //# sourceMappingURL=types.d.ts.map