@lavarage/sdk 8.0.13 → 8.0.15
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.mts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +5 -10
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +5 -10
- package/dist/index.mjs.map +1 -1
- package/idl/lavarageUSDC.json +1 -1
- package/idl/userVault.json +1 -1
- package/idl/userVault.ts +1 -1
- package/index.ts +0 -1
- package/package.json +1 -1
- package/utils.ts +5 -11
package/idl/lavarageUSDC.json
CHANGED
package/idl/userVault.json
CHANGED
package/idl/userVault.ts
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* IDL can be found at `target/idl/user_vault.json`.
|
|
6
6
|
*/
|
|
7
7
|
export type UserVault = {
|
|
8
|
-
"address": "
|
|
8
|
+
"address": "FFe8xWs9iBdWB6vsxg8yBLirZHsbACFNbXqAM4K3fPPB",
|
|
9
9
|
"metadata": {
|
|
10
10
|
"name": "userVault",
|
|
11
11
|
"version": "0.1.0",
|
package/index.ts
CHANGED
|
@@ -57,7 +57,6 @@ type OptionalRPCResults = {
|
|
|
57
57
|
tokenAccountConfirmCreatedAddresses?: PublicKey[];
|
|
58
58
|
quoteMintAccountInfo?: AccountInfo<Buffer>;
|
|
59
59
|
}
|
|
60
|
-
const REFFERAL_VAULT_PROGRAM_ID = new PublicKey("FFe8xWs9iBdWB6vsxg8yBLirZHsbACFNbXqAM4K3fPPB");
|
|
61
60
|
|
|
62
61
|
const LAVARAGE_LOOKUP_TABLE = "CDPmKb5VggsHABwDCTaxiw5XXLjcgkqSJMNKRTzHWXwK";
|
|
63
62
|
|
package/package.json
CHANGED
package/utils.ts
CHANGED
|
@@ -43,18 +43,12 @@ export function stringToU8Array(input: string): number[] {
|
|
|
43
43
|
}
|
|
44
44
|
|
|
45
45
|
export function u8ArrayToString(input: number[]): string {
|
|
46
|
-
//
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
const decoder = new TextDecoder("utf-8", { fatal: true });
|
|
50
|
-
try {
|
|
51
|
-
return decoder.decode(bytes);
|
|
52
|
-
} catch {
|
|
53
|
-
// Not valid UTF-8 (e.g. raw binary/hash); return hex
|
|
54
|
-
return '0x' + Array.from(bytes)
|
|
55
|
-
.map((b) => b.toString(16).padStart(2, "0"))
|
|
56
|
-
.join("");
|
|
46
|
+
// validate that input has no more than 32 bytes
|
|
47
|
+
if (input.length > 32) {
|
|
48
|
+
throw new Error('Input has more than 32 bytes');
|
|
57
49
|
}
|
|
50
|
+
|
|
51
|
+
return '0x' + Buffer.from(input).toString('hex');
|
|
58
52
|
}
|
|
59
53
|
|
|
60
54
|
export function isSolProgram(program: Program<any>): boolean {
|