@exponent-labs/generic-sy-sdk 0.1.0 → 0.1.5
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/build/index.d.ts +32 -52
- package/build/index.js +472 -43
- package/build/index.js.map +1 -1
- package/build/types.d.ts +0 -1
- package/package.json +8 -8
- package/src/index.ts +546 -48
package/build/index.d.ts
CHANGED
|
@@ -1,8 +1,6 @@
|
|
|
1
|
-
/// <reference types="bn.js" />
|
|
2
1
|
import { BN, web3 } from "@coral-xyz/anchor";
|
|
3
|
-
import {
|
|
2
|
+
import { GenericSyMetaAccount, GenericSyState, Hook, InterfaceTypeGeneric } from "@exponent-labs/exponent-types";
|
|
4
3
|
import { GenericSyPda } from "@exponent-labs/generic-sy-pda";
|
|
5
|
-
import { GenericSyState, GenericSyMetaAccount, InterfaceTypeGeneric, Hook } from "@exponent-labs/exponent-types";
|
|
6
4
|
import { SyInitializeConfig, SyTokenMetadata } from "./types";
|
|
7
5
|
export declare enum InterfaceType {
|
|
8
6
|
Pyth = 0,
|
|
@@ -10,12 +8,19 @@ export declare enum InterfaceType {
|
|
|
10
8
|
One = 2,
|
|
11
9
|
Fragmetric = 3,
|
|
12
10
|
Meteora = 4,
|
|
13
|
-
FragmetricSupportedAsset = 5
|
|
11
|
+
FragmetricSupportedAsset = 5,
|
|
12
|
+
Sanctum = 6,
|
|
13
|
+
JupiterPerps = 7,
|
|
14
|
+
Adrena = 8,
|
|
15
|
+
HyloLpToken = 9,
|
|
16
|
+
JupiterLend = 10,
|
|
17
|
+
KaminoVault = 11,
|
|
18
|
+
Solstice = 12
|
|
14
19
|
}
|
|
15
20
|
export declare function getInterfaceTypeObj(interfaceType: number): InterfaceTypeGeneric;
|
|
16
21
|
export declare function getInterfaceTypeFromString(interfaceType: string): InterfaceTypeGeneric;
|
|
17
22
|
interface GenericSyConfig {
|
|
18
|
-
|
|
23
|
+
skipWrap?: boolean;
|
|
19
24
|
}
|
|
20
25
|
export declare class GenericSySdk {
|
|
21
26
|
state: GenericSyState;
|
|
@@ -58,12 +63,30 @@ export declare class GenericSySdk {
|
|
|
58
63
|
receiptTokenMint: web3.PublicKey;
|
|
59
64
|
wrappedTokenMint: web3.PublicKey;
|
|
60
65
|
};
|
|
66
|
+
get jupiterLendData(): {
|
|
67
|
+
baseTokenMint: web3.PublicKey;
|
|
68
|
+
tokenReservesLiquidity: web3.PublicKey;
|
|
69
|
+
lendingSupplyPosition: web3.PublicKey;
|
|
70
|
+
rewardsRateModel: web3.PublicKey;
|
|
71
|
+
rateModel: web3.PublicKey;
|
|
72
|
+
};
|
|
73
|
+
get kaminoVaultData(): {
|
|
74
|
+
vault: web3.PublicKey;
|
|
75
|
+
reserves: {
|
|
76
|
+
reserveAddress: web3.PublicKey;
|
|
77
|
+
marketAddress: web3.PublicKey;
|
|
78
|
+
}[];
|
|
79
|
+
tokenVault: web3.PublicKey;
|
|
80
|
+
tokenMint: web3.PublicKey;
|
|
81
|
+
baseVaultAuthority: web3.PublicKey;
|
|
82
|
+
sharesMint: web3.PublicKey;
|
|
83
|
+
};
|
|
61
84
|
get remainingAccounts(): {
|
|
62
85
|
pubkey: web3.PublicKey;
|
|
63
86
|
isSigner: boolean;
|
|
64
87
|
isWritable: boolean;
|
|
65
88
|
}[];
|
|
66
|
-
getAccountsWithSigner(signer?: web3.PublicKey): {
|
|
89
|
+
getAccountsWithSigner(signer?: web3.PublicKey, type?: "mint" | "redeem"): {
|
|
67
90
|
pubkey: web3.PublicKey;
|
|
68
91
|
isSigner: boolean;
|
|
69
92
|
isWritable: boolean;
|
|
@@ -80,6 +103,7 @@ export declare class GenericSySdk {
|
|
|
80
103
|
baseDst?: web3.PublicKey;
|
|
81
104
|
sySrc?: web3.PublicKey;
|
|
82
105
|
}): Promise<web3.TransactionInstruction>;
|
|
106
|
+
preInstructions(): any[];
|
|
83
107
|
getSyState(): Promise<web3.TransactionInstruction>;
|
|
84
108
|
ixAddEmission({ signer, emissionMint, emissionTokenAccount, }: {
|
|
85
109
|
signer: web3.PublicKey;
|
|
@@ -89,51 +113,7 @@ export declare class GenericSySdk {
|
|
|
89
113
|
ixModifyHook({ signer, hook }: {
|
|
90
114
|
signer: web3.PublicKey;
|
|
91
115
|
hook: Hook;
|
|
92
|
-
}):
|
|
93
|
-
name: "modifyHook";
|
|
94
|
-
discriminator: [12];
|
|
95
|
-
accounts: [{
|
|
96
|
-
name: "signer";
|
|
97
|
-
signer: true;
|
|
98
|
-
}, {
|
|
99
|
-
name: "feePayer";
|
|
100
|
-
writable: true;
|
|
101
|
-
signer: true;
|
|
102
|
-
}, {
|
|
103
|
-
name: "meta";
|
|
104
|
-
writable: true;
|
|
105
|
-
}, {
|
|
106
|
-
name: "systemProgram";
|
|
107
|
-
docs: ["Needed for realloc'ing the emission tracker"];
|
|
108
|
-
}, {
|
|
109
|
-
name: "adminState";
|
|
110
|
-
}];
|
|
111
|
-
args: [{
|
|
112
|
-
name: "hook";
|
|
113
|
-
type: {
|
|
114
|
-
defined: {
|
|
115
|
-
name: "hook";
|
|
116
|
-
};
|
|
117
|
-
};
|
|
118
|
-
}];
|
|
119
|
-
} & {
|
|
120
|
-
name: "modifyHook";
|
|
121
|
-
}, {
|
|
122
|
-
name: "signer";
|
|
123
|
-
signer: true;
|
|
124
|
-
} | {
|
|
125
|
-
name: "feePayer";
|
|
126
|
-
writable: true;
|
|
127
|
-
signer: true;
|
|
128
|
-
} | {
|
|
129
|
-
name: "meta";
|
|
130
|
-
writable: true;
|
|
131
|
-
} | {
|
|
132
|
-
name: "systemProgram";
|
|
133
|
-
docs: ["Needed for realloc'ing the emission tracker"];
|
|
134
|
-
} | {
|
|
135
|
-
name: "adminState";
|
|
136
|
-
}>;
|
|
116
|
+
}): Promise<web3.TransactionInstruction>;
|
|
137
117
|
}
|
|
138
|
-
export declare function initSy(signer: web3.PublicKey, interfaceAccounts: web3.PublicKey[], yieldBearingMint: web3.PublicKey, interfaceIndex: number, syToken?: SyTokenMetadata, initConfig?: SyInitializeConfig): Promise<web3.TransactionInstruction>;
|
|
118
|
+
export declare function initSy(signer: web3.PublicKey, interfaceAccounts: web3.PublicKey[], yieldBearingMint: web3.PublicKey, interfaceIndex: number, syToken?: SyTokenMetadata, initConfig?: SyInitializeConfig, yieldBearingMintTokenProgram?: web3.PublicKey): Promise<web3.TransactionInstruction>;
|
|
139
119
|
export {};
|