@atxp/client 0.10.8 → 0.10.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/_virtual/index10.js +2 -2
- package/dist/_virtual/index11.js +2 -2
- package/dist/_virtual/index14.js +2 -2
- package/dist/_virtual/index15.js +2 -2
- package/dist/_virtual/index17.js +2 -2
- package/dist/_virtual/index18.js +2 -2
- package/dist/_virtual/index19.js +2 -2
- package/dist/_virtual/index3.js +2 -2
- package/dist/_virtual/index4.js +2 -2
- package/dist/node_modules/@modelcontextprotocol/sdk/node_modules/ajv/dist/compile/validate/index.js +1 -1
- package/dist/node_modules/@modelcontextprotocol/sdk/node_modules/ajv/dist/vocabularies/applicator/index.js +1 -1
- package/dist/node_modules/@modelcontextprotocol/sdk/node_modules/ajv/dist/vocabularies/discriminator/index.js +1 -1
- package/dist/node_modules/@modelcontextprotocol/sdk/node_modules/ajv/dist/vocabularies/format/index.js +1 -1
- package/dist/node_modules/ajv-formats/node_modules/ajv/dist/vocabularies/applicator/index.js +1 -1
- package/dist/node_modules/ajv-formats/node_modules/ajv/dist/vocabularies/core/index.js +1 -1
- package/dist/node_modules/ajv-formats/node_modules/ajv/dist/vocabularies/discriminator/index.js +1 -1
- package/dist/node_modules/ajv-formats/node_modules/ajv/dist/vocabularies/validation/index.js +1 -1
- package/dist/node_modules/fast-uri/index.js +1 -1
- package/package.json +2 -2
- package/dist/atxpLocalAccount.d.ts +0 -50
- package/dist/clientTestHelpers.d.ts +0 -6
- package/dist/destinationMakers/atxpDestinationMaker.d.ts +0 -15
- package/dist/destinationMakers/index.d.ts +0 -9
- package/dist/destinationMakers/passthroughDestinationMaker.d.ts +0 -8
- package/dist/errors.d.ts +0 -117
- package/dist/polygonConstants.d.ts +0 -53
- package/dist/setup.expo.d.ts +0 -2
- package/dist/worldConstants.d.ts +0 -53
package/dist/_virtual/index10.js
CHANGED
package/dist/_virtual/index11.js
CHANGED
package/dist/_virtual/index14.js
CHANGED
package/dist/_virtual/index15.js
CHANGED
package/dist/_virtual/index17.js
CHANGED
package/dist/_virtual/index18.js
CHANGED
package/dist/_virtual/index19.js
CHANGED
package/dist/_virtual/index3.js
CHANGED
package/dist/_virtual/index4.js
CHANGED
package/dist/node_modules/@modelcontextprotocol/sdk/node_modules/ajv/dist/compile/validate/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { __exports as validate } from '../../../../../../../../_virtual/
|
|
1
|
+
import { __exports as validate } from '../../../../../../../../_virtual/index4.js';
|
|
2
2
|
import { __require as requireBoolSchema } from './boolSchema.js';
|
|
3
3
|
import { __require as requireDataType } from './dataType.js';
|
|
4
4
|
import { __require as requireApplicability } from './applicability.js';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { __exports as applicator } from '../../../../../../../../_virtual/
|
|
1
|
+
import { __exports as applicator } from '../../../../../../../../_virtual/index11.js';
|
|
2
2
|
import { __require as requireAdditionalItems } from './additionalItems.js';
|
|
3
3
|
import { __require as requirePrefixItems } from './prefixItems.js';
|
|
4
4
|
import { __require as requireItems } from './items.js';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { __exports as discriminator } from '../../../../../../../../_virtual/
|
|
1
|
+
import { __exports as discriminator } from '../../../../../../../../_virtual/index3.js';
|
|
2
2
|
import { __require as requireCodegen } from '../../compile/codegen/index.js';
|
|
3
3
|
import { __require as requireTypes } from './types.js';
|
|
4
4
|
import { __require as requireCompile } from '../../compile/index.js';
|
package/dist/node_modules/ajv-formats/node_modules/ajv/dist/vocabularies/applicator/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { __exports as applicator } from '../../../../../../../_virtual/
|
|
1
|
+
import { __exports as applicator } from '../../../../../../../_virtual/index18.js';
|
|
2
2
|
import { __require as requireAdditionalItems } from './additionalItems.js';
|
|
3
3
|
import { __require as requirePrefixItems } from './prefixItems.js';
|
|
4
4
|
import { __require as requireItems } from './items.js';
|
package/dist/node_modules/ajv-formats/node_modules/ajv/dist/vocabularies/discriminator/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { __exports as discriminator } from '../../../../../../../_virtual/
|
|
1
|
+
import { __exports as discriminator } from '../../../../../../../_virtual/index15.js';
|
|
2
2
|
import { __require as requireCodegen } from '../../compile/codegen/index.js';
|
|
3
3
|
import { __require as requireTypes } from './types.js';
|
|
4
4
|
import { __require as requireCompile } from '../../compile/index.js';
|
package/dist/node_modules/ajv-formats/node_modules/ajv/dist/vocabularies/validation/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { __exports as validation } from '../../../../../../../_virtual/
|
|
1
|
+
import { __exports as validation } from '../../../../../../../_virtual/index19.js';
|
|
2
2
|
import { __require as requireLimitNumber } from './limitNumber.js';
|
|
3
3
|
import { __require as requireMultipleOf } from './multipleOf.js';
|
|
4
4
|
import { __require as requireLimitLength } from './limitLength.js';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atxp/client",
|
|
3
|
-
"version": "0.10.
|
|
3
|
+
"version": "0.10.11",
|
|
4
4
|
"description": "ATXP Client - MCP client with OAuth authentication and payment processing",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
@@ -33,7 +33,7 @@
|
|
|
33
33
|
"pack:dry": "npm pack --dry-run"
|
|
34
34
|
},
|
|
35
35
|
"dependencies": {
|
|
36
|
-
"@atxp/common": "0.10.
|
|
36
|
+
"@atxp/common": "0.10.11",
|
|
37
37
|
"@atxp/mpp": "0.10.7",
|
|
38
38
|
"@modelcontextprotocol/sdk": "^1.15.0",
|
|
39
39
|
"bignumber.js": "^9.3.0",
|
|
@@ -1,50 +0,0 @@
|
|
|
1
|
-
import { Hex, Address, LocalAccount, SignableMessage, TypedData, TransactionSerializable } from 'viem';
|
|
2
|
-
import { FetchLike } from '@atxp/common';
|
|
3
|
-
/**
|
|
4
|
-
* ATXP implementation of viem's LocalAccount interface.
|
|
5
|
-
* Delegates signing operations to the accounts-x402 API.
|
|
6
|
-
* Includes properties needed by x402 library for wallet client compatibility.
|
|
7
|
-
*/
|
|
8
|
-
export declare class ATXPLocalAccount implements LocalAccount {
|
|
9
|
-
readonly address: Address;
|
|
10
|
-
private origin;
|
|
11
|
-
private token;
|
|
12
|
-
private fetchFn;
|
|
13
|
-
readonly type: "local";
|
|
14
|
-
readonly account: LocalAccount;
|
|
15
|
-
readonly chain: {
|
|
16
|
-
id: number;
|
|
17
|
-
};
|
|
18
|
-
readonly transport: object;
|
|
19
|
-
constructor(address: Address, origin: string, token: string, fetchFn?: FetchLike);
|
|
20
|
-
/**
|
|
21
|
-
* Fetch the wallet address from the /address endpoint
|
|
22
|
-
*/
|
|
23
|
-
static create(origin: string, token: string, fetchFn?: FetchLike): Promise<ATXPLocalAccount>;
|
|
24
|
-
/**
|
|
25
|
-
* Sign a typed data structure using EIP-712
|
|
26
|
-
* This is what x402 library will call for EIP-3009 authorization
|
|
27
|
-
*/
|
|
28
|
-
signTypedData<const TTypedData extends TypedData | {
|
|
29
|
-
[key: string]: unknown;
|
|
30
|
-
}>(typedData: TTypedData): Promise<Hex>;
|
|
31
|
-
/**
|
|
32
|
-
* Sign a message - required by LocalAccount interface but not used for X402
|
|
33
|
-
*/
|
|
34
|
-
signMessage(_: {
|
|
35
|
-
message: SignableMessage;
|
|
36
|
-
}): Promise<Hex>;
|
|
37
|
-
/**
|
|
38
|
-
* Sign a transaction - required by LocalAccount interface but not used for X402
|
|
39
|
-
*/
|
|
40
|
-
signTransaction(_transaction: TransactionSerializable, _args?: unknown): Promise<Hex>;
|
|
41
|
-
/**
|
|
42
|
-
* Get public key - required by LocalAccount interface
|
|
43
|
-
*/
|
|
44
|
-
readonly publicKey: Hex;
|
|
45
|
-
/**
|
|
46
|
-
* Source - required by LocalAccount interface (set to 'custom')
|
|
47
|
-
*/
|
|
48
|
-
readonly source: "custom";
|
|
49
|
-
}
|
|
50
|
-
//# sourceMappingURL=atxpLocalAccount.d.ts.map
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import { FetchMock } from 'fetch-mock';
|
|
2
|
-
export declare function mockResourceServer(mock: FetchMock, baseUrl?: string, resourcePath?: string, authServerUrl?: string): FetchMock;
|
|
3
|
-
export declare function mockAuthorizationServer(mock: FetchMock, baseUrl?: string, paymentRequests?: {
|
|
4
|
-
[key: string]: BigNumber;
|
|
5
|
-
}): FetchMock;
|
|
6
|
-
//# sourceMappingURL=clientTestHelpers.d.ts.map
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { FetchLike, Logger, Source } from '@atxp/common';
|
|
2
|
-
import { Destination, PaymentRequestOption, DestinationMaker } from '@atxp/common';
|
|
3
|
-
/**
|
|
4
|
-
* Destination mapper for ATXP network destinations.
|
|
5
|
-
* Converts destinations with network='atxp' to actual blockchain network destinations
|
|
6
|
-
* by resolving the account ID to its associated blockchain addresses.
|
|
7
|
-
*/
|
|
8
|
-
export declare class ATXPDestinationMaker implements DestinationMaker {
|
|
9
|
-
private accountsServiceUrl;
|
|
10
|
-
private fetchFn;
|
|
11
|
-
constructor(accountsServiceUrl: string, fetchFn?: FetchLike);
|
|
12
|
-
makeDestinations(option: PaymentRequestOption, logger: Logger, paymentRequestId: string, sources: Source[]): Promise<Destination[]>;
|
|
13
|
-
private getDestinations;
|
|
14
|
-
}
|
|
15
|
-
//# sourceMappingURL=atxpDestinationMaker.d.ts.map
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { Network, DestinationMaker, FetchLike } from '@atxp/common';
|
|
2
|
-
export { ATXPDestinationMaker } from './atxpDestinationMaker.js';
|
|
3
|
-
export { PassthroughDestinationMaker } from './passthroughDestinationMaker.js';
|
|
4
|
-
export interface DestinationMakerFactoryConfig {
|
|
5
|
-
atxpAccountsServer: string;
|
|
6
|
-
fetchFn?: FetchLike;
|
|
7
|
-
}
|
|
8
|
-
export declare function createDestinationMakers(config: DestinationMakerFactoryConfig): Map<Network, DestinationMaker>;
|
|
9
|
-
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { Logger, Source } from '@atxp/common';
|
|
2
|
-
import { Network, Destination, PaymentRequestOption, DestinationMaker } from '@atxp/common';
|
|
3
|
-
export declare class PassthroughDestinationMaker implements DestinationMaker {
|
|
4
|
-
private network;
|
|
5
|
-
constructor(network: Network);
|
|
6
|
-
makeDestinations(option: PaymentRequestOption, _logger: Logger, _paymentRequestId: string, _sources: Source[]): Promise<Destination[]>;
|
|
7
|
-
}
|
|
8
|
-
//# sourceMappingURL=passthroughDestinationMaker.d.ts.map
|
package/dist/errors.d.ts
DELETED
|
@@ -1,117 +0,0 @@
|
|
|
1
|
-
import { Currency } from "@atxp/common";
|
|
2
|
-
/**
|
|
3
|
-
* Base class for all ATXP payment errors with structured error codes and actionable guidance
|
|
4
|
-
*/
|
|
5
|
-
export declare abstract class ATXPPaymentError extends Error {
|
|
6
|
-
readonly context?: Record<string, unknown> | undefined;
|
|
7
|
-
abstract readonly code: string;
|
|
8
|
-
abstract readonly retryable: boolean;
|
|
9
|
-
abstract readonly actionableMessage: string;
|
|
10
|
-
constructor(message: string, context?: Record<string, unknown> | undefined);
|
|
11
|
-
}
|
|
12
|
-
/**
|
|
13
|
-
* Thrown when the user's wallet has insufficient funds for a payment
|
|
14
|
-
*/
|
|
15
|
-
export declare class InsufficientFundsError extends ATXPPaymentError {
|
|
16
|
-
readonly currency: Currency;
|
|
17
|
-
readonly required: BigNumber;
|
|
18
|
-
readonly available?: BigNumber | undefined;
|
|
19
|
-
readonly network?: string | undefined;
|
|
20
|
-
readonly code = "INSUFFICIENT_FUNDS";
|
|
21
|
-
readonly retryable = true;
|
|
22
|
-
readonly actionableMessage: string;
|
|
23
|
-
constructor(currency: Currency, required: BigNumber, available?: BigNumber | undefined, network?: string | undefined);
|
|
24
|
-
}
|
|
25
|
-
/**
|
|
26
|
-
* Thrown when a blockchain transaction is reverted
|
|
27
|
-
*/
|
|
28
|
-
export declare class TransactionRevertedError extends ATXPPaymentError {
|
|
29
|
-
readonly transactionHash: string;
|
|
30
|
-
readonly network: string;
|
|
31
|
-
readonly revertReason?: string | undefined;
|
|
32
|
-
readonly code = "TRANSACTION_REVERTED";
|
|
33
|
-
readonly retryable = false;
|
|
34
|
-
readonly actionableMessage: string;
|
|
35
|
-
constructor(transactionHash: string, network: string, revertReason?: string | undefined);
|
|
36
|
-
}
|
|
37
|
-
/**
|
|
38
|
-
* Thrown when an unsupported currency is requested
|
|
39
|
-
*/
|
|
40
|
-
export declare class UnsupportedCurrencyError extends ATXPPaymentError {
|
|
41
|
-
readonly currency: string;
|
|
42
|
-
readonly network: string;
|
|
43
|
-
readonly supportedCurrencies: string[];
|
|
44
|
-
readonly code = "UNSUPPORTED_CURRENCY";
|
|
45
|
-
readonly retryable = false;
|
|
46
|
-
readonly actionableMessage: string;
|
|
47
|
-
constructor(currency: string, network: string, supportedCurrencies: string[]);
|
|
48
|
-
}
|
|
49
|
-
/**
|
|
50
|
-
* Thrown when gas estimation fails for a transaction
|
|
51
|
-
*/
|
|
52
|
-
export declare class GasEstimationError extends ATXPPaymentError {
|
|
53
|
-
readonly network: string;
|
|
54
|
-
readonly reason?: string | undefined;
|
|
55
|
-
readonly code = "GAS_ESTIMATION_FAILED";
|
|
56
|
-
readonly retryable = true;
|
|
57
|
-
readonly actionableMessage = "Unable to estimate gas for this transaction. Ensure you have sufficient funds for both the payment amount and gas fees, then try again.";
|
|
58
|
-
constructor(network: string, reason?: string | undefined);
|
|
59
|
-
}
|
|
60
|
-
/**
|
|
61
|
-
* Thrown when RPC/network connectivity fails
|
|
62
|
-
*/
|
|
63
|
-
export declare class RpcError extends ATXPPaymentError {
|
|
64
|
-
readonly network: string;
|
|
65
|
-
readonly rpcUrl?: string | undefined;
|
|
66
|
-
readonly originalError?: Error | undefined;
|
|
67
|
-
readonly code = "RPC_ERROR";
|
|
68
|
-
readonly retryable = true;
|
|
69
|
-
readonly actionableMessage = "Unable to connect to the blockchain network. Please check your internet connection and try again.";
|
|
70
|
-
constructor(network: string, rpcUrl?: string | undefined, originalError?: Error | undefined);
|
|
71
|
-
}
|
|
72
|
-
/**
|
|
73
|
-
* Thrown when the user rejects a transaction in their wallet
|
|
74
|
-
*/
|
|
75
|
-
export declare class UserRejectedError extends ATXPPaymentError {
|
|
76
|
-
readonly network: string;
|
|
77
|
-
readonly code = "USER_REJECTED";
|
|
78
|
-
readonly retryable = true;
|
|
79
|
-
readonly actionableMessage = "You cancelled the transaction. To complete the payment, please approve the transaction in your wallet.";
|
|
80
|
-
constructor(network: string);
|
|
81
|
-
}
|
|
82
|
-
/**
|
|
83
|
-
* Thrown when the payment server returns an error
|
|
84
|
-
*/
|
|
85
|
-
export declare class PaymentServerError extends ATXPPaymentError {
|
|
86
|
-
readonly statusCode: number;
|
|
87
|
-
readonly endpoint: string;
|
|
88
|
-
readonly serverMessage?: string | undefined;
|
|
89
|
-
readonly details?: unknown | undefined;
|
|
90
|
-
readonly code: string;
|
|
91
|
-
readonly retryable = true;
|
|
92
|
-
readonly actionableMessage = "The payment server encountered an error. Please try again in a few moments.";
|
|
93
|
-
constructor(statusCode: number, endpoint: string, serverMessage?: string | undefined, errorCode?: string, details?: unknown | undefined);
|
|
94
|
-
}
|
|
95
|
-
/**
|
|
96
|
-
* Thrown when a payment request has expired
|
|
97
|
-
*/
|
|
98
|
-
export declare class PaymentExpiredError extends ATXPPaymentError {
|
|
99
|
-
readonly paymentRequestId: string;
|
|
100
|
-
readonly expiresAt?: Date | undefined;
|
|
101
|
-
readonly code = "PAYMENT_EXPIRED";
|
|
102
|
-
readonly retryable = false;
|
|
103
|
-
readonly actionableMessage = "This payment request has expired. Please make a new request to the service.";
|
|
104
|
-
constructor(paymentRequestId: string, expiresAt?: Date | undefined);
|
|
105
|
-
}
|
|
106
|
-
/**
|
|
107
|
-
* Generic network error for backward compatibility and uncategorized errors
|
|
108
|
-
*/
|
|
109
|
-
export declare class PaymentNetworkError extends ATXPPaymentError {
|
|
110
|
-
readonly network: string;
|
|
111
|
-
readonly originalError?: Error | undefined;
|
|
112
|
-
readonly code = "NETWORK_ERROR";
|
|
113
|
-
readonly retryable = true;
|
|
114
|
-
readonly actionableMessage = "A network error occurred during payment processing. Please try again.";
|
|
115
|
-
constructor(network: string, message: string, originalError?: Error | undefined);
|
|
116
|
-
}
|
|
117
|
-
//# sourceMappingURL=errors.d.ts.map
|
|
@@ -1,53 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Polygon Chain configuration type, compatible with viem's Chain interface
|
|
3
|
-
*/
|
|
4
|
-
export type PolygonChain = {
|
|
5
|
-
readonly id: number;
|
|
6
|
-
readonly name: string;
|
|
7
|
-
readonly nativeCurrency: {
|
|
8
|
-
readonly name: string;
|
|
9
|
-
readonly symbol: string;
|
|
10
|
-
readonly decimals: number;
|
|
11
|
-
};
|
|
12
|
-
readonly rpcUrls: {
|
|
13
|
-
readonly default: {
|
|
14
|
-
readonly http: readonly string[];
|
|
15
|
-
};
|
|
16
|
-
};
|
|
17
|
-
readonly blockExplorers: {
|
|
18
|
-
readonly default: {
|
|
19
|
-
readonly name: string;
|
|
20
|
-
readonly url: string;
|
|
21
|
-
};
|
|
22
|
-
};
|
|
23
|
-
readonly testnet?: boolean;
|
|
24
|
-
};
|
|
25
|
-
export declare const USDC_CONTRACT_ADDRESS_POLYGON_MAINNET = "0x3c499c542cEF5E3811e1192ce70d8cC03d5c3359";
|
|
26
|
-
export declare const USDC_CONTRACT_ADDRESS_POLYGON_AMOY = "0x41E94Eb019C0762f9Bfcf9Fb1E58725BfB0e7582";
|
|
27
|
-
export declare const POLYGON_MAINNET: PolygonChain;
|
|
28
|
-
export declare const POLYGON_AMOY: PolygonChain;
|
|
29
|
-
/**
|
|
30
|
-
* Get Polygon Mainnet configuration with custom RPC URL (e.g., with API key)
|
|
31
|
-
* @param rpcUrl - Custom RPC URL, e.g., 'https://polygon-mainnet.g.alchemy.com/v2/YOUR_API_KEY'
|
|
32
|
-
*/
|
|
33
|
-
export declare const getPolygonMainnetWithRPC: (rpcUrl: string) => PolygonChain;
|
|
34
|
-
/**
|
|
35
|
-
* Get Polygon Amoy Testnet configuration with custom RPC URL (e.g., with API key)
|
|
36
|
-
* @param rpcUrl - Custom RPC URL, e.g., 'https://polygon-amoy.g.alchemy.com/v2/YOUR_API_KEY'
|
|
37
|
-
*/
|
|
38
|
-
export declare const getPolygonAmoyWithRPC: (rpcUrl: string) => PolygonChain;
|
|
39
|
-
/**
|
|
40
|
-
* Get Polygon Chain configuration by chain ID
|
|
41
|
-
* @param chainId - Chain ID (137 for mainnet, 80002 for Amoy testnet)
|
|
42
|
-
* @returns Polygon Chain configuration
|
|
43
|
-
* @throws Error if chain ID is not supported
|
|
44
|
-
*/
|
|
45
|
-
export declare const getPolygonByChainId: (chainId: number) => PolygonChain;
|
|
46
|
-
/**
|
|
47
|
-
* Get USDC contract address for Polygon by chain ID
|
|
48
|
-
* @param chainId - Chain ID (137 for mainnet, 80002 for Amoy testnet)
|
|
49
|
-
* @returns USDC contract address
|
|
50
|
-
* @throws Error if chain ID is not supported
|
|
51
|
-
*/
|
|
52
|
-
export declare const getPolygonUSDCAddress: (chainId: number) => string;
|
|
53
|
-
//# sourceMappingURL=polygonConstants.d.ts.map
|
package/dist/setup.expo.d.ts
DELETED
package/dist/worldConstants.d.ts
DELETED
|
@@ -1,53 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* World Chain configuration type, compatible with viem's Chain interface
|
|
3
|
-
*/
|
|
4
|
-
export type WorldChain = {
|
|
5
|
-
readonly id: number;
|
|
6
|
-
readonly name: string;
|
|
7
|
-
readonly nativeCurrency: {
|
|
8
|
-
readonly name: string;
|
|
9
|
-
readonly symbol: string;
|
|
10
|
-
readonly decimals: number;
|
|
11
|
-
};
|
|
12
|
-
readonly rpcUrls: {
|
|
13
|
-
readonly default: {
|
|
14
|
-
readonly http: readonly string[];
|
|
15
|
-
};
|
|
16
|
-
};
|
|
17
|
-
readonly blockExplorers: {
|
|
18
|
-
readonly default: {
|
|
19
|
-
readonly name: string;
|
|
20
|
-
readonly url: string;
|
|
21
|
-
};
|
|
22
|
-
};
|
|
23
|
-
readonly testnet?: boolean;
|
|
24
|
-
};
|
|
25
|
-
export declare const USDC_CONTRACT_ADDRESS_WORLD_MAINNET = "0x79A02482A880bCE3F13e09Da970dC34db4CD24d1";
|
|
26
|
-
export declare const USDC_CONTRACT_ADDRESS_WORLD_SEPOLIA = "0x79A02482A880bCE3F13e09Da970dC34db4CD24d1";
|
|
27
|
-
export declare const WORLD_CHAIN_MAINNET: WorldChain;
|
|
28
|
-
export declare const WORLD_CHAIN_SEPOLIA: WorldChain;
|
|
29
|
-
/**
|
|
30
|
-
* Get World Chain Mainnet configuration with custom RPC URL (e.g., with API key)
|
|
31
|
-
* @param rpcUrl - Custom RPC URL, e.g., 'https://worldchain-mainnet.g.alchemy.com/v2/YOUR_API_KEY'
|
|
32
|
-
*/
|
|
33
|
-
export declare const getWorldChainMainnetWithRPC: (rpcUrl: string) => WorldChain;
|
|
34
|
-
/**
|
|
35
|
-
* Get World Chain Sepolia configuration with custom RPC URL (e.g., with API key)
|
|
36
|
-
* @param rpcUrl - Custom RPC URL, e.g., 'https://worldchain-sepolia.g.alchemy.com/v2/YOUR_API_KEY'
|
|
37
|
-
*/
|
|
38
|
-
export declare const getWorldChainSepoliaWithRPC: (rpcUrl: string) => WorldChain;
|
|
39
|
-
/**
|
|
40
|
-
* Get World Chain configuration by chain ID
|
|
41
|
-
* @param chainId - Chain ID (480 for mainnet, 4801 for sepolia)
|
|
42
|
-
* @returns World Chain configuration
|
|
43
|
-
* @throws Error if chain ID is not supported
|
|
44
|
-
*/
|
|
45
|
-
export declare const getWorldChainByChainId: (chainId: number) => WorldChain;
|
|
46
|
-
/**
|
|
47
|
-
* Get USDC contract address for World Chain by chain ID
|
|
48
|
-
* @param chainId - Chain ID (480 for mainnet, 4801 for sepolia)
|
|
49
|
-
* @returns USDC contract address
|
|
50
|
-
* @throws Error if chain ID is not supported
|
|
51
|
-
*/
|
|
52
|
-
export declare const getWorldChainUSDCAddress: (chainId: number) => string;
|
|
53
|
-
//# sourceMappingURL=worldConstants.d.ts.map
|