VoltrAdaptor: {
accounts: [
{
discriminator: [174, 110, 39, 119, 82, 106, 169, 102];
name: "strategy";
},
];
address: "aVoLTRCRt3NnnchvLYH6rMYehJHwM5m45RmLBZq7PGz";
errors: [
{ code: 6000; msg: "Invalid amount provided."; name: "invalidAmount" },
{ code: 6001; msg: "Invalid account owner."; name: "invalidAccountOwner" },
{ code: 6002; msg: "Already initialized."; name: "alreadyInitialized" },
{ code: 6003; msg: "Invalid token mint."; name: "invalidTokenMint" },
{ code: 6004; msg: "Invalid account input."; name: "invalidAccountInput" },
{
code: 6005;
msg: "Invalid reserve account.";
name: "invalidReserveAccount";
},
{ code: 6006; msg: "Not rent exempt."; name: "notRentExempt" },
{ code: 6007; msg: "Math overflow."; name: "mathOverflow" },
{
code: 6008;
msg: "Invalid remaining accounts.";
name: "invalidRemainingAccounts";
},
{
code: 6009;
msg: "Invalid protocol program.";
name: "invalidProtocolProgram";
},
{
code: 6010;
msg: "Valid balance not found.";
name: "validBalanceNotFound";
},
{ code: 6011; msg: "Invalid arguments."; name: "invalidArguments" },
];
instructions: [
{
accounts: [
{ name: "payer"; signer: true; writable: true },
{
address: "vxyzZyfd6nJ3v82fTSmuRiKF4owWF9sAXqneu9mne9n";
name: "admin";
signer: true;
},
{ name: "counterpartyAssetTa"; writable: true },
{
name: "strategy";
pda: {
seeds: [
{ kind: "const"; value: [115, 116, 114, 97, 116, 101, 103, 121] },
{ kind: "account"; path: "counterpartyAssetTa" },
];
};
writable: true;
},
{ name: "protocolProgram" },
{ address: "11111111111111111111111111111111"; name: "systemProgram" },
];
args: [
{ name: "name"; type: "string" },
{ name: "description"; type: "string" },
{ name: "strategyType"; type: { defined: { name: "strategyType" } } },
];
discriminator: [152, 160, 107, 148, 245, 190, 127, 224];
name: "createStrategy";
},
{
accounts: [
{ name: "vaultStrategyAuth"; signer: true; writable: true },
{
name: "strategy";
pda: {
seeds: [
{ kind: "const"; value: [115, 116, 114, 97, 116, 101, 103, 121] },
{ kind: "account"; path: "counterpartyAssetTa" },
];
};
},
{ name: "vaultAssetMint"; writable: true },
{
docs: ["The vault's associated token account for asset."];
name: "vaultStrategyAssetAta";
pda: {
program: {
kind: "const";
value: [
140,
151,
37,
143,
78,
36,
137,
241,
187,
61,
16,
41,
20,
142,
13,
131,
11,
90,
19,
153,
218,
255,
16,
132,
4,
142,
123,
216,
219,
233,
248,
89,
];
};
seeds: [
{ kind: "account"; path: "vaultStrategyAuth" },
{ kind: "account"; path: "assetTokenProgram" },
{ kind: "account"; path: "vaultAssetMint" },
];
};
writable: true;
},
{ name: "assetTokenProgram" },
{ name: "counterpartyAssetTa"; writable: true },
{ name: "protocolProgram" },
];
args: [
{ name: "amount"; type: "u64" },
{ name: "additionalArgs"; type: { option: "bytes" } },
];
discriminator: [242, 35, 198, 137, 82, 225, 242, 182];
name: "deposit";
returns: "u64";
},
{
accounts: [
{ name: "payer"; signer: true; writable: true },
{ name: "vaultStrategyAuth"; signer: true; writable: true },
{
name: "strategy";
pda: {
seeds: [
{ kind: "const"; value: [115, 116, 114, 97, 116, 101, 103, 121] },
{ kind: "account"; path: "strategy" },
];
};
},
{ address: "11111111111111111111111111111111"; name: "systemProgram" },
{ name: "protocolProgram" },
];
args: [{ name: "additionalArgs"; type: { option: "bytes" } }];
discriminator: [175, 175, 109, 31, 13, 152, 155, 237];
name: "initialize";
},
{
accounts: [
{ name: "vaultStrategyAuth"; signer: true; writable: true },
{
name: "strategy";
pda: {
seeds: [
{ kind: "const"; value: [115, 116, 114, 97, 116, 101, 103, 121] },
{ kind: "account"; path: "counterpartyAssetTa" },
];
};
},
{ name: "vaultAssetMint"; writable: true },
{
docs: ["The vault's associated token account for asset."];
name: "vaultStrategyAssetAta";
pda: {
program: {
kind: "const";
value: [
140,
151,
37,
143,
78,
36,
137,
241,
187,
61,
16,
41,
20,
142,
13,
131,
11,
90,
19,
153,
218,
255,
16,
132,
4,
142,
123,
216,
219,
233,
248,
89,
];
};
seeds: [
{ kind: "account"; path: "vaultStrategyAuth" },
{ kind: "account"; path: "assetTokenProgram" },
{ kind: "account"; path: "vaultAssetMint" },
];
};
writable: true;
},
{ name: "assetTokenProgram" },
{ name: "counterpartyAssetTaAuth"; writable: true },
{ name: "counterpartyAssetTa"; writable: true },
{ name: "protocolProgram" },
];
args: [
{ name: "amount"; type: "u64" },
{ name: "additionalArgs"; type: { option: "bytes" } },
];
discriminator: [183, 18, 70, 156, 148, 109, 161, 34];
name: "withdraw";
returns: "u64";
},
];
metadata: {
description: "Created with Anchor";
name: "voltrAdaptor";
spec: "0.1.0";
version: "0.1.0";
};
types: [
{
name: "strategy";
repr: { kind: "c" };
serialization: "bytemuckunsafe";
type: {
fields: [
{
docs: ["The name (fixed-length)."];
name: "name";
type: { array: ["u8", 32] };
},
{
docs: ["The description (fixed-length)."];
name: "description";
type: { array: ["u8", 64] };
},
{
docs: ["The counterparty asset token account."];
name: "counterpartyAssetTa";
type: "pubkey";
},
{
docs: ["The protocol’s main program ID."];
name: "protocolProgram";
type: "pubkey";
},
{
docs: [
"A version number to help with migrations or struct upgrades (1 byte).",
];
name: "version";
type: "u8";
},
{ docs: ["The bump for the strategy."]; name: "bump"; type: "u8" },
{
docs: ["The type of strategy (1 byte if < 256 variants)."];
name: "strategyType";
type: { defined: { name: "strategyType" } };
},
{
docs: ["Padding to align the next 8-byte field."];
name: "padding0";
type: { array: ["u8", 5] };
},
{
docs: ["Reserved space for future fields"];
name: "reserved";
type: { array: ["u8", 128] };
},
];
kind: "struct";
};
},
{
docs: ["1-byte enum"];
name: "strategyType";
repr: { kind: "rust" };
type: {
kind: "enum";
variants: [
{ name: "solend" },
{ name: "drift" },
{ name: "marginfi" },
{ name: "kamino" },
];
};
},
];
}
Type declaration
accounts: [{ discriminator: [174, 110, 39, 119, 82, 106, 169, 102]; name: "strategy" }]
address: "aVoLTRCRt3NnnchvLYH6rMYehJHwM5m45RmLBZq7PGz"
errors: [
{ code: 6000; msg: "Invalid amount provided."; name: "invalidAmount" },
{ code: 6001; msg: "Invalid account owner."; name: "invalidAccountOwner" },
{ code: 6002; msg: "Already initialized."; name: "alreadyInitialized" },
{ code: 6003; msg: "Invalid token mint."; name: "invalidTokenMint" },
{ code: 6004; msg: "Invalid account input."; name: "invalidAccountInput" },
{
code: 6005;
msg: "Invalid reserve account.";
name: "invalidReserveAccount";
},
{ code: 6006; msg: "Not rent exempt."; name: "notRentExempt" },
{ code: 6007; msg: "Math overflow."; name: "mathOverflow" },
{
code: 6008;
msg: "Invalid remaining accounts.";
name: "invalidRemainingAccounts";
},
{
code: 6009;
msg: "Invalid protocol program.";
name: "invalidProtocolProgram";
},
{
code: 6010;
msg: "Valid balance not found.";
name: "validBalanceNotFound";
},
{ code: 6011; msg: "Invalid arguments."; name: "invalidArguments" },
]
instructions: [
{
accounts: [
{ name: "payer"; signer: true; writable: true },
{
address: "vxyzZyfd6nJ3v82fTSmuRiKF4owWF9sAXqneu9mne9n";
name: "admin";
signer: true;
},
{ name: "counterpartyAssetTa"; writable: true },
{
name: "strategy";
pda: {
seeds: [
{ kind: "const"; value: [115, 116, 114, 97, 116, 101, 103, 121] },
{ kind: "account"; path: "counterpartyAssetTa" },
];
};
writable: true;
},
{ name: "protocolProgram" },
{ address: "11111111111111111111111111111111"; name: "systemProgram" },
];
args: [
{ name: "name"; type: "string" },
{ name: "description"; type: "string" },
{ name: "strategyType"; type: { defined: { name: "strategyType" } } },
];
discriminator: [152, 160, 107, 148, 245, 190, 127, 224];
name: "createStrategy";
},
{
accounts: [
{ name: "vaultStrategyAuth"; signer: true; writable: true },
{
name: "strategy";
pda: {
seeds: [
{ kind: "const"; value: [115, 116, 114, 97, 116, 101, 103, 121] },
{ kind: "account"; path: "counterpartyAssetTa" },
];
};
},
{ name: "vaultAssetMint"; writable: true },
{
docs: ["The vault's associated token account for asset."];
name: "vaultStrategyAssetAta";
pda: {
program: {
kind: "const";
value: [
140,
151,
37,
143,
78,
36,
137,
241,
187,
61,
16,
41,
20,
142,
13,
131,
11,
90,
19,
153,
218,
255,
16,
132,
4,
142,
123,
216,
219,
233,
248,
89,
];
};
seeds: [
{ kind: "account"; path: "vaultStrategyAuth" },
{ kind: "account"; path: "assetTokenProgram" },
{ kind: "account"; path: "vaultAssetMint" },
];
};
writable: true;
},
{ name: "assetTokenProgram" },
{ name: "counterpartyAssetTa"; writable: true },
{ name: "protocolProgram" },
];
args: [
{ name: "amount"; type: "u64" },
{ name: "additionalArgs"; type: { option: "bytes" } },
];
discriminator: [242, 35, 198, 137, 82, 225, 242, 182];
name: "deposit";
returns: "u64";
},
{
accounts: [
{ name: "payer"; signer: true; writable: true },
{ name: "vaultStrategyAuth"; signer: true; writable: true },
{
name: "strategy";
pda: {
seeds: [
{ kind: "const"; value: [115, 116, 114, 97, 116, 101, 103, 121] },
{ kind: "account"; path: "strategy" },
];
};
},
{ address: "11111111111111111111111111111111"; name: "systemProgram" },
{ name: "protocolProgram" },
];
args: [{ name: "additionalArgs"; type: { option: "bytes" } }];
discriminator: [175, 175, 109, 31, 13, 152, 155, 237];
name: "initialize";
},
{
accounts: [
{ name: "vaultStrategyAuth"; signer: true; writable: true },
{
name: "strategy";
pda: {
seeds: [
{ kind: "const"; value: [115, 116, 114, 97, 116, 101, 103, 121] },
{ kind: "account"; path: "counterpartyAssetTa" },
];
};
},
{ name: "vaultAssetMint"; writable: true },
{
docs: ["The vault's associated token account for asset."];
name: "vaultStrategyAssetAta";
pda: {
program: {
kind: "const";
value: [
140,
151,
37,
143,
78,
36,
137,
241,
187,
61,
16,
41,
20,
142,
13,
131,
11,
90,
19,
153,
218,
255,
16,
132,
4,
142,
123,
216,
219,
233,
248,
89,
];
};
seeds: [
{ kind: "account"; path: "vaultStrategyAuth" },
{ kind: "account"; path: "assetTokenProgram" },
{ kind: "account"; path: "vaultAssetMint" },
];
};
writable: true;
},
{ name: "assetTokenProgram" },
{ name: "counterpartyAssetTaAuth"; writable: true },
{ name: "counterpartyAssetTa"; writable: true },
{ name: "protocolProgram" },
];
args: [
{ name: "amount"; type: "u64" },
{ name: "additionalArgs"; type: { option: "bytes" } },
];
discriminator: [183, 18, 70, 156, 148, 109, 161, 34];
name: "withdraw";
returns: "u64";
},
]
metadata: {
description: "Created with Anchor";
name: "voltrAdaptor";
spec: "0.1.0";
version: "0.1.0";
}
types: [
{
name: "strategy";
repr: { kind: "c" };
serialization: "bytemuckunsafe";
type: {
fields: [
{
docs: ["The name (fixed-length)."];
name: "name";
type: { array: ["u8", 32] };
},
{
docs: ["The description (fixed-length)."];
name: "description";
type: { array: ["u8", 64] };
},
{
docs: ["The counterparty asset token account."];
name: "counterpartyAssetTa";
type: "pubkey";
},
{
docs: ["The protocol’s main program ID."];
name: "protocolProgram";
type: "pubkey";
},
{
docs: [
"A version number to help with migrations or struct upgrades (1 byte).",
];
name: "version";
type: "u8";
},
{ docs: ["The bump for the strategy."]; name: "bump"; type: "u8" },
{
docs: ["The type of strategy (1 byte if < 256 variants)."];
name: "strategyType";
type: { defined: { name: "strategyType" } };
},
{
docs: ["Padding to align the next 8-byte field."];
name: "padding0";
type: { array: ["u8", 5] };
},
{
docs: ["Reserved space for future fields"];
name: "reserved";
type: { array: ["u8", 128] };
},
];
kind: "struct";
};
},
{
docs: ["1-byte enum"];
name: "strategyType";
repr: { kind: "rust" };
type: {
kind: "enum";
variants: [
{ name: "solend" },
{ name: "drift" },
{ name: "marginfi" },
{ name: "kamino" },
];
};
},
]
Program IDL in camelCase format in order to be used in JS/TS.
Note that this is only a type helper and is not the actual IDL. The original IDL can be found at
target/idl/voltr_adaptor.json
.