pinpet-sdk 2.1.34 → 2.2.0

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.ts CHANGED
@@ -5,8 +5,12 @@ import { BN, Wallet, Program } from '@coral-xyz/anchor';
5
5
 
6
6
  export type DataSourceType = 'fast' | 'chain';
7
7
 
8
+ export type NetworkType = 'mainnet' | 'localnet';
9
+
8
10
  export interface NetworkConfig {
9
11
  name: string;
12
+ network: NetworkType;
13
+ programId: string;
10
14
  defaultDataSource: DataSourceType;
11
15
  solanaEndpoint: string;
12
16
  pinPetFastApiUrl: string;
@@ -16,6 +20,7 @@ export interface NetworkConfig {
16
20
  }
17
21
 
18
22
  export interface PinPetSdkOptions {
23
+ network?: NetworkType;
19
24
  defaultDataSource?: DataSourceType;
20
25
  solanaEndpoint?: string;
21
26
  pinPetFastApiUrl?: string;
@@ -362,7 +367,9 @@ export declare class CurveAMM {
362
367
 
363
368
  // ========================= 常量和函数导出 =========================
364
369
 
365
- export declare const SPINPET_PROGRAM_ID: string;
370
+ export declare const SPINPET_PROGRAM_ID: PublicKey;
371
+
372
+ export declare function getProgramId(network?: NetworkType): PublicKey;
366
373
 
367
374
  export declare function getDefaultOptions(networkName?: 'MAINNET' | 'DEVNET' | 'LOCALNET'): NetworkConfig;
368
375