@0dotxyz/p0-ts-sdk 2.5.3 → 2.6.0-alpha.1
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 +6124 -458
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +125 -31
- package/dist/index.d.ts +125 -31
- package/dist/index.js +6115 -457
- package/dist/index.js.map +1 -1
- package/dist/jupiter.d.cts +0 -7
- package/dist/jupiter.d.ts +0 -7
- package/dist/types-DLZaKA17.d.cts +88 -0
- package/dist/types-DLZaKA17.d.ts +88 -0
- package/dist/vendor.cjs +5398 -0
- package/dist/vendor.cjs.map +1 -1
- package/dist/vendor.d.cts +5324 -2
- package/dist/vendor.d.ts +5324 -2
- package/dist/vendor.js +5381 -1
- package/dist/vendor.js.map +1 -1
- package/package.json +1 -1
- package/dist/index-BDDVBMdM.d.cts +0 -48
- package/dist/index-BDDVBMdM.d.ts +0 -48
package/dist/jupiter.d.cts
CHANGED
|
@@ -117,13 +117,6 @@ interface BuildGetRequest {
|
|
|
117
117
|
payer?: string;
|
|
118
118
|
wrapAndUnwrapSol?: boolean;
|
|
119
119
|
destinationTokenAccount?: string;
|
|
120
|
-
/**
|
|
121
|
-
* Set to true if the transaction will be submitted as part of a Jito bundle.
|
|
122
|
-
* Excludes DEXes that are incompatible with Jito bundles (their routes can
|
|
123
|
-
* lock vote accounts, which Jito rejects with "bundles cannot lock any vote
|
|
124
|
-
* accounts"). Defaults to false on the API side.
|
|
125
|
-
*/
|
|
126
|
-
forJitoBundle?: boolean;
|
|
127
120
|
}
|
|
128
121
|
/** Response from `GET /swap/v2/build`. */
|
|
129
122
|
interface BuildResponse {
|
package/dist/jupiter.d.ts
CHANGED
|
@@ -117,13 +117,6 @@ interface BuildGetRequest {
|
|
|
117
117
|
payer?: string;
|
|
118
118
|
wrapAndUnwrapSol?: boolean;
|
|
119
119
|
destinationTokenAccount?: string;
|
|
120
|
-
/**
|
|
121
|
-
* Set to true if the transaction will be submitted as part of a Jito bundle.
|
|
122
|
-
* Excludes DEXes that are incompatible with Jito bundles (their routes can
|
|
123
|
-
* lock vote accounts, which Jito rejects with "bundles cannot lock any vote
|
|
124
|
-
* accounts"). Defaults to false on the API side.
|
|
125
|
-
*/
|
|
126
|
-
forJitoBundle?: boolean;
|
|
127
120
|
}
|
|
128
121
|
/** Response from `GET /swap/v2/build`. */
|
|
129
122
|
interface BuildResponse {
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
import { BorshCoder, Provider, Program } from '@coral-xyz/anchor';
|
|
2
|
+
import BN from 'bn.js';
|
|
3
|
+
import { PublicKey } from '@solana/web3.js';
|
|
4
|
+
|
|
5
|
+
declare const SWITCHBOARD_ONDEMANDE_PRICE_PRECISION = 18;
|
|
6
|
+
interface CurrentResult {
|
|
7
|
+
value: BN;
|
|
8
|
+
std_dev: BN;
|
|
9
|
+
mean: BN;
|
|
10
|
+
range: BN;
|
|
11
|
+
min_value: BN;
|
|
12
|
+
max_vaalue: BN;
|
|
13
|
+
slot: BN;
|
|
14
|
+
min_slot: BN;
|
|
15
|
+
max_slot: BN;
|
|
16
|
+
}
|
|
17
|
+
interface OracleSubmission {
|
|
18
|
+
oracle: PublicKey;
|
|
19
|
+
slot: BN;
|
|
20
|
+
value: BN;
|
|
21
|
+
}
|
|
22
|
+
interface PullFeedAccountData {
|
|
23
|
+
submissions: OracleSubmission[];
|
|
24
|
+
authority: PublicKey;
|
|
25
|
+
queue: PublicKey;
|
|
26
|
+
feed_hash: Buffer;
|
|
27
|
+
initialized_at: BN;
|
|
28
|
+
permissions: BN;
|
|
29
|
+
max_variance: BN;
|
|
30
|
+
min_responses: number;
|
|
31
|
+
name: Buffer;
|
|
32
|
+
sample_size: number;
|
|
33
|
+
last_update_timestamp: BN;
|
|
34
|
+
lut_slot: BN;
|
|
35
|
+
result: CurrentResult;
|
|
36
|
+
max_staleness: number;
|
|
37
|
+
min_sample_size: number;
|
|
38
|
+
}
|
|
39
|
+
type CrossbarSimulatePayload = FeedResponse[];
|
|
40
|
+
interface FeedResponse {
|
|
41
|
+
feedHash: string;
|
|
42
|
+
results: number[];
|
|
43
|
+
}
|
|
44
|
+
declare const switchboardAccountCoder: BorshCoder<string, string>;
|
|
45
|
+
declare function getSwitchboardProgram(provider: Provider): Program;
|
|
46
|
+
declare function decodeSwitchboardPullFeedData(data: Buffer): PullFeedAccountData;
|
|
47
|
+
|
|
48
|
+
/**
|
|
49
|
+
* Decoded Gamma `LpVault` account (raw on-chain representation).
|
|
50
|
+
* Pubkeys as {@link PublicKey}, u64/i64 numeric fields as {@link BN}.
|
|
51
|
+
*/
|
|
52
|
+
interface GammaLpVaultRaw {
|
|
53
|
+
pubkey: PublicKey;
|
|
54
|
+
assetsAccount: PublicKey;
|
|
55
|
+
pendingSharesAccount: PublicKey;
|
|
56
|
+
sharesMint: PublicKey;
|
|
57
|
+
assetsMint: PublicKey;
|
|
58
|
+
fundAuthority: PublicKey;
|
|
59
|
+
nav: BN;
|
|
60
|
+
totalShares: BN;
|
|
61
|
+
navUpdatedAt: BN;
|
|
62
|
+
navMaxStaleness: BN;
|
|
63
|
+
bump: number;
|
|
64
|
+
vaultName: string;
|
|
65
|
+
pendingWithdrawalValue: BN;
|
|
66
|
+
feeRecipient: PublicKey;
|
|
67
|
+
performanceFeeBps: number;
|
|
68
|
+
assessmentIntervalSecs: BN;
|
|
69
|
+
lastAssessmentTimestamp: BN;
|
|
70
|
+
pricePerShareAtLastAssessment: BN;
|
|
71
|
+
keeperAuthority: PublicKey;
|
|
72
|
+
}
|
|
73
|
+
/**
|
|
74
|
+
* Decoded Gamma `WithdrawReceipt` account — tracks a user's queued withdrawal
|
|
75
|
+
* against a vault (pending → claimable).
|
|
76
|
+
*/
|
|
77
|
+
interface GammaWithdrawReceiptRaw {
|
|
78
|
+
pubkey: PublicKey;
|
|
79
|
+
user: PublicKey;
|
|
80
|
+
lpVault: PublicKey;
|
|
81
|
+
pendingShares: BN;
|
|
82
|
+
claimableShares: BN;
|
|
83
|
+
claimableAssets: BN;
|
|
84
|
+
oldestPendingAt: BN;
|
|
85
|
+
bump: number;
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
export { type CurrentResult as C, type FeedResponse as F, type GammaLpVaultRaw as G, type OracleSubmission as O, type PullFeedAccountData as P, SWITCHBOARD_ONDEMANDE_PRICE_PRECISION as S, type GammaWithdrawReceiptRaw as a, type CrossbarSimulatePayload as b, decodeSwitchboardPullFeedData as d, getSwitchboardProgram as g, switchboardAccountCoder as s };
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
import { BorshCoder, Provider, Program } from '@coral-xyz/anchor';
|
|
2
|
+
import BN from 'bn.js';
|
|
3
|
+
import { PublicKey } from '@solana/web3.js';
|
|
4
|
+
|
|
5
|
+
declare const SWITCHBOARD_ONDEMANDE_PRICE_PRECISION = 18;
|
|
6
|
+
interface CurrentResult {
|
|
7
|
+
value: BN;
|
|
8
|
+
std_dev: BN;
|
|
9
|
+
mean: BN;
|
|
10
|
+
range: BN;
|
|
11
|
+
min_value: BN;
|
|
12
|
+
max_vaalue: BN;
|
|
13
|
+
slot: BN;
|
|
14
|
+
min_slot: BN;
|
|
15
|
+
max_slot: BN;
|
|
16
|
+
}
|
|
17
|
+
interface OracleSubmission {
|
|
18
|
+
oracle: PublicKey;
|
|
19
|
+
slot: BN;
|
|
20
|
+
value: BN;
|
|
21
|
+
}
|
|
22
|
+
interface PullFeedAccountData {
|
|
23
|
+
submissions: OracleSubmission[];
|
|
24
|
+
authority: PublicKey;
|
|
25
|
+
queue: PublicKey;
|
|
26
|
+
feed_hash: Buffer;
|
|
27
|
+
initialized_at: BN;
|
|
28
|
+
permissions: BN;
|
|
29
|
+
max_variance: BN;
|
|
30
|
+
min_responses: number;
|
|
31
|
+
name: Buffer;
|
|
32
|
+
sample_size: number;
|
|
33
|
+
last_update_timestamp: BN;
|
|
34
|
+
lut_slot: BN;
|
|
35
|
+
result: CurrentResult;
|
|
36
|
+
max_staleness: number;
|
|
37
|
+
min_sample_size: number;
|
|
38
|
+
}
|
|
39
|
+
type CrossbarSimulatePayload = FeedResponse[];
|
|
40
|
+
interface FeedResponse {
|
|
41
|
+
feedHash: string;
|
|
42
|
+
results: number[];
|
|
43
|
+
}
|
|
44
|
+
declare const switchboardAccountCoder: BorshCoder<string, string>;
|
|
45
|
+
declare function getSwitchboardProgram(provider: Provider): Program;
|
|
46
|
+
declare function decodeSwitchboardPullFeedData(data: Buffer): PullFeedAccountData;
|
|
47
|
+
|
|
48
|
+
/**
|
|
49
|
+
* Decoded Gamma `LpVault` account (raw on-chain representation).
|
|
50
|
+
* Pubkeys as {@link PublicKey}, u64/i64 numeric fields as {@link BN}.
|
|
51
|
+
*/
|
|
52
|
+
interface GammaLpVaultRaw {
|
|
53
|
+
pubkey: PublicKey;
|
|
54
|
+
assetsAccount: PublicKey;
|
|
55
|
+
pendingSharesAccount: PublicKey;
|
|
56
|
+
sharesMint: PublicKey;
|
|
57
|
+
assetsMint: PublicKey;
|
|
58
|
+
fundAuthority: PublicKey;
|
|
59
|
+
nav: BN;
|
|
60
|
+
totalShares: BN;
|
|
61
|
+
navUpdatedAt: BN;
|
|
62
|
+
navMaxStaleness: BN;
|
|
63
|
+
bump: number;
|
|
64
|
+
vaultName: string;
|
|
65
|
+
pendingWithdrawalValue: BN;
|
|
66
|
+
feeRecipient: PublicKey;
|
|
67
|
+
performanceFeeBps: number;
|
|
68
|
+
assessmentIntervalSecs: BN;
|
|
69
|
+
lastAssessmentTimestamp: BN;
|
|
70
|
+
pricePerShareAtLastAssessment: BN;
|
|
71
|
+
keeperAuthority: PublicKey;
|
|
72
|
+
}
|
|
73
|
+
/**
|
|
74
|
+
* Decoded Gamma `WithdrawReceipt` account — tracks a user's queued withdrawal
|
|
75
|
+
* against a vault (pending → claimable).
|
|
76
|
+
*/
|
|
77
|
+
interface GammaWithdrawReceiptRaw {
|
|
78
|
+
pubkey: PublicKey;
|
|
79
|
+
user: PublicKey;
|
|
80
|
+
lpVault: PublicKey;
|
|
81
|
+
pendingShares: BN;
|
|
82
|
+
claimableShares: BN;
|
|
83
|
+
claimableAssets: BN;
|
|
84
|
+
oldestPendingAt: BN;
|
|
85
|
+
bump: number;
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
export { type CurrentResult as C, type FeedResponse as F, type GammaLpVaultRaw as G, type OracleSubmission as O, type PullFeedAccountData as P, SWITCHBOARD_ONDEMANDE_PRICE_PRECISION as S, type GammaWithdrawReceiptRaw as a, type CrossbarSimulatePayload as b, decodeSwitchboardPullFeedData as d, getSwitchboardProgram as g, switchboardAccountCoder as s };
|