@wormhole-labs/svm-example-executor-quoter-sdk 0.0.0 → 0.0.2-alpha
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/src/generated/executorQuoter/accounts/chainInfo.d.ts +32 -0
- package/dist/src/generated/executorQuoter/accounts/chainInfo.d.ts.map +1 -0
- package/dist/src/generated/executorQuoter/accounts/chainInfo.js +61 -0
- package/dist/src/generated/executorQuoter/accounts/chainInfo.js.map +1 -0
- package/dist/src/generated/executorQuoter/accounts/index.d.ts +10 -0
- package/dist/src/generated/executorQuoter/accounts/index.d.ts.map +1 -0
- package/dist/src/generated/executorQuoter/accounts/index.js +10 -0
- package/dist/src/generated/executorQuoter/accounts/index.js.map +1 -0
- package/dist/src/generated/executorQuoter/accounts/quoteBody.d.ts +42 -0
- package/dist/src/generated/executorQuoter/accounts/quoteBody.d.ts.map +1 -0
- package/dist/src/generated/executorQuoter/accounts/quoteBody.js +63 -0
- package/dist/src/generated/executorQuoter/accounts/quoteBody.js.map +1 -0
- package/dist/src/generated/executorQuoter/errors/executorQuoter.d.ts +33 -0
- package/dist/src/generated/executorQuoter/errors/executorQuoter.d.ts.map +1 -0
- package/dist/src/generated/executorQuoter/errors/executorQuoter.js +50 -0
- package/dist/src/generated/executorQuoter/errors/executorQuoter.js.map +1 -0
- package/dist/src/generated/executorQuoter/errors/index.d.ts +9 -0
- package/dist/src/generated/executorQuoter/errors/index.d.ts.map +1 -0
- package/dist/src/generated/executorQuoter/errors/index.js +9 -0
- package/dist/src/generated/executorQuoter/errors/index.js.map +1 -0
- package/dist/src/generated/executorQuoter/index.d.ts +13 -0
- package/dist/src/generated/executorQuoter/index.d.ts.map +1 -0
- package/dist/src/generated/executorQuoter/index.js +13 -0
- package/dist/src/generated/executorQuoter/index.js.map +1 -0
- package/dist/src/generated/executorQuoter/instructions/index.d.ts +12 -0
- package/dist/src/generated/executorQuoter/instructions/index.d.ts.map +1 -0
- package/dist/src/generated/executorQuoter/instructions/index.js +12 -0
- package/dist/src/generated/executorQuoter/instructions/index.js.map +1 -0
- package/dist/src/generated/executorQuoter/instructions/requestExecutionQuote.d.ts +63 -0
- package/dist/src/generated/executorQuoter/instructions/requestExecutionQuote.d.ts.map +1 -0
- package/dist/src/generated/executorQuoter/instructions/requestExecutionQuote.js +93 -0
- package/dist/src/generated/executorQuoter/instructions/requestExecutionQuote.js.map +1 -0
- package/dist/src/generated/executorQuoter/instructions/requestQuote.d.ts +58 -0
- package/dist/src/generated/executorQuoter/instructions/requestQuote.d.ts.map +1 -0
- package/dist/src/generated/executorQuoter/instructions/requestQuote.js +90 -0
- package/dist/src/generated/executorQuoter/instructions/requestQuote.js.map +1 -0
- package/dist/src/generated/executorQuoter/instructions/updateChainInfo.d.ts +70 -0
- package/dist/src/generated/executorQuoter/instructions/updateChainInfo.d.ts.map +1 -0
- package/dist/src/generated/executorQuoter/instructions/updateChainInfo.js +92 -0
- package/dist/src/generated/executorQuoter/instructions/updateChainInfo.js.map +1 -0
- package/dist/src/generated/executorQuoter/instructions/updateQuote.d.ts +73 -0
- package/dist/src/generated/executorQuoter/instructions/updateQuote.d.ts.map +1 -0
- package/dist/src/generated/executorQuoter/instructions/updateQuote.js +94 -0
- package/dist/src/generated/executorQuoter/instructions/updateQuote.js.map +1 -0
- package/dist/src/generated/executorQuoter/pdas/chainInfoPda.d.ts +15 -0
- package/dist/src/generated/executorQuoter/pdas/chainInfoPda.d.ts.map +1 -0
- package/dist/src/generated/executorQuoter/pdas/chainInfoPda.js +19 -0
- package/dist/src/generated/executorQuoter/pdas/chainInfoPda.js.map +1 -0
- package/dist/src/generated/executorQuoter/pdas/index.d.ts +10 -0
- package/dist/src/generated/executorQuoter/pdas/index.d.ts.map +1 -0
- package/dist/src/generated/executorQuoter/pdas/index.js +10 -0
- package/dist/src/generated/executorQuoter/pdas/index.js.map +1 -0
- package/dist/src/generated/executorQuoter/pdas/quoteBodyPda.d.ts +15 -0
- package/dist/src/generated/executorQuoter/pdas/quoteBodyPda.d.ts.map +1 -0
- package/dist/src/generated/executorQuoter/pdas/quoteBodyPda.js +19 -0
- package/dist/src/generated/executorQuoter/pdas/quoteBodyPda.js.map +1 -0
- package/dist/src/generated/executorQuoter/programs/executorQuoter.d.ts +56 -0
- package/dist/src/generated/executorQuoter/programs/executorQuoter.d.ts.map +1 -0
- package/dist/src/generated/executorQuoter/programs/executorQuoter.js +104 -0
- package/dist/src/generated/executorQuoter/programs/executorQuoter.js.map +1 -0
- package/dist/src/generated/executorQuoter/programs/index.d.ts +9 -0
- package/dist/src/generated/executorQuoter/programs/index.d.ts.map +1 -0
- package/dist/src/generated/executorQuoter/programs/index.js +9 -0
- package/dist/src/generated/executorQuoter/programs/index.js.map +1 -0
- package/dist/src/generated/executorQuoterRouter/accounts/index.d.ts +9 -0
- package/dist/src/generated/executorQuoterRouter/accounts/index.d.ts.map +1 -0
- package/dist/src/generated/executorQuoterRouter/accounts/index.js +9 -0
- package/dist/src/generated/executorQuoterRouter/accounts/index.js.map +1 -0
- package/dist/src/generated/executorQuoterRouter/accounts/quoterRegistration.d.ts +29 -0
- package/dist/src/generated/executorQuoterRouter/accounts/quoterRegistration.d.ts.map +1 -0
- package/dist/src/generated/executorQuoterRouter/accounts/quoterRegistration.js +55 -0
- package/dist/src/generated/executorQuoterRouter/accounts/quoterRegistration.js.map +1 -0
- package/dist/src/generated/executorQuoterRouter/errors/executorQuoterRouter.d.ts +36 -0
- package/dist/src/generated/executorQuoterRouter/errors/executorQuoterRouter.d.ts.map +1 -0
- package/dist/src/generated/executorQuoterRouter/errors/executorQuoterRouter.js +56 -0
- package/dist/src/generated/executorQuoterRouter/errors/executorQuoterRouter.js.map +1 -0
- package/dist/src/generated/executorQuoterRouter/errors/index.d.ts +9 -0
- package/dist/src/generated/executorQuoterRouter/errors/index.d.ts.map +1 -0
- package/dist/src/generated/executorQuoterRouter/errors/index.js +9 -0
- package/dist/src/generated/executorQuoterRouter/errors/index.js.map +1 -0
- package/dist/src/generated/executorQuoterRouter/index.d.ts +13 -0
- package/dist/src/generated/executorQuoterRouter/index.d.ts.map +1 -0
- package/dist/src/generated/executorQuoterRouter/index.js +13 -0
- package/dist/src/generated/executorQuoterRouter/index.js.map +1 -0
- package/dist/src/generated/executorQuoterRouter/instructions/index.d.ts +11 -0
- package/dist/src/generated/executorQuoterRouter/instructions/index.d.ts.map +1 -0
- package/dist/src/generated/executorQuoterRouter/instructions/index.js +11 -0
- package/dist/src/generated/executorQuoterRouter/instructions/index.js.map +1 -0
- package/dist/src/generated/executorQuoterRouter/instructions/quoteExecution.d.ts +66 -0
- package/dist/src/generated/executorQuoterRouter/instructions/quoteExecution.d.ts.map +1 -0
- package/dist/src/generated/executorQuoterRouter/instructions/quoteExecution.js +93 -0
- package/dist/src/generated/executorQuoterRouter/instructions/quoteExecution.js.map +1 -0
- package/dist/src/generated/executorQuoterRouter/instructions/requestExecution.d.ts +104 -0
- package/dist/src/generated/executorQuoterRouter/instructions/requestExecution.d.ts.map +1 -0
- package/dist/src/generated/executorQuoterRouter/instructions/requestExecution.js +124 -0
- package/dist/src/generated/executorQuoterRouter/instructions/requestExecution.js.map +1 -0
- package/dist/src/generated/executorQuoterRouter/instructions/updateQuoterContract.d.ts +63 -0
- package/dist/src/generated/executorQuoterRouter/instructions/updateQuoterContract.d.ts.map +1 -0
- package/dist/src/generated/executorQuoterRouter/instructions/updateQuoterContract.js +93 -0
- package/dist/src/generated/executorQuoterRouter/instructions/updateQuoterContract.js.map +1 -0
- package/dist/src/generated/executorQuoterRouter/pdas/index.d.ts +9 -0
- package/dist/src/generated/executorQuoterRouter/pdas/index.d.ts.map +1 -0
- package/dist/src/generated/executorQuoterRouter/pdas/index.js +9 -0
- package/dist/src/generated/executorQuoterRouter/pdas/index.js.map +1 -0
- package/dist/src/generated/executorQuoterRouter/pdas/quoterRegistrationPda.d.ts +15 -0
- package/dist/src/generated/executorQuoterRouter/pdas/quoterRegistrationPda.d.ts.map +1 -0
- package/dist/src/generated/executorQuoterRouter/pdas/quoterRegistrationPda.js +19 -0
- package/dist/src/generated/executorQuoterRouter/pdas/quoterRegistrationPda.js.map +1 -0
- package/dist/src/generated/executorQuoterRouter/programs/executorQuoterRouter.d.ts +50 -0
- package/dist/src/generated/executorQuoterRouter/programs/executorQuoterRouter.d.ts.map +1 -0
- package/dist/src/generated/executorQuoterRouter/programs/executorQuoterRouter.js +90 -0
- package/dist/src/generated/executorQuoterRouter/programs/executorQuoterRouter.js.map +1 -0
- package/dist/src/generated/executorQuoterRouter/programs/index.d.ts +9 -0
- package/dist/src/generated/executorQuoterRouter/programs/index.d.ts.map +1 -0
- package/dist/src/generated/executorQuoterRouter/programs/index.js +9 -0
- package/dist/src/generated/executorQuoterRouter/programs/index.js.map +1 -0
- package/dist/src/generated/index.d.ts +9 -0
- package/dist/src/generated/index.d.ts.map +1 -0
- package/dist/src/generated/index.js +9 -0
- package/dist/src/generated/index.js.map +1 -0
- package/package.json +34 -3
- package/src/generated/executorQuoter/accounts/chainInfo.ts +132 -0
- package/src/generated/executorQuoter/accounts/index.ts +10 -0
- package/src/generated/executorQuoter/accounts/quoteBody.ts +151 -0
- package/src/generated/executorQuoter/errors/executorQuoter.ts +95 -0
- package/src/generated/executorQuoter/errors/index.ts +9 -0
- package/src/generated/executorQuoter/index.ts +13 -0
- package/src/generated/executorQuoter/instructions/index.ts +12 -0
- package/src/generated/executorQuoter/instructions/requestExecutionQuote.ts +259 -0
- package/src/generated/executorQuoter/instructions/requestQuote.ts +240 -0
- package/src/generated/executorQuoter/instructions/updateChainInfo.ts +269 -0
- package/src/generated/executorQuoter/instructions/updateQuote.ts +280 -0
- package/src/generated/executorQuoter/pdas/chainInfoPda.ts +35 -0
- package/src/generated/executorQuoter/pdas/index.ts +10 -0
- package/src/generated/executorQuoter/pdas/quoteBodyPda.ts +35 -0
- package/src/generated/executorQuoter/programs/executorQuoter.ts +235 -0
- package/src/generated/executorQuoter/programs/index.ts +9 -0
- package/src/generated/executorQuoterRouter/accounts/index.ts +9 -0
- package/src/generated/executorQuoterRouter/accounts/quoterRegistration.ts +144 -0
- package/src/generated/executorQuoterRouter/errors/executorQuoterRouter.ts +107 -0
- package/src/generated/executorQuoterRouter/errors/index.ts +9 -0
- package/src/generated/executorQuoterRouter/index.ts +13 -0
- package/src/generated/executorQuoterRouter/instructions/index.ts +11 -0
- package/src/generated/executorQuoterRouter/instructions/quoteExecution.ts +268 -0
- package/src/generated/executorQuoterRouter/instructions/requestExecution.ts +402 -0
- package/src/generated/executorQuoterRouter/instructions/updateQuoterContract.ts +276 -0
- package/src/generated/executorQuoterRouter/pdas/index.ts +9 -0
- package/src/generated/executorQuoterRouter/pdas/quoterRegistrationPda.ts +37 -0
- package/src/generated/executorQuoterRouter/programs/executorQuoterRouter.ts +206 -0
- package/src/generated/executorQuoterRouter/programs/index.ts +9 -0
- package/src/generated/index.ts +9 -0
- package/index.js +0 -1
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This code was AUTOGENERATED using the Codama library.
|
|
3
|
+
* Please DO NOT EDIT THIS FILE, instead use visitors
|
|
4
|
+
* to add features, then rerun Codama to update it.
|
|
5
|
+
*
|
|
6
|
+
* @see https://github.com/codama-idl/codama
|
|
7
|
+
*/
|
|
8
|
+
import { fetchEncodedAccount, fetchEncodedAccounts, type Account, type Address, type EncodedAccount, type FetchAccountConfig, type FetchAccountsConfig, type FixedSizeCodec, type FixedSizeDecoder, type FixedSizeEncoder, type MaybeAccount, type MaybeEncodedAccount } from "@solana/kit";
|
|
9
|
+
export type ChainInfo = {
|
|
10
|
+
discriminator: number;
|
|
11
|
+
bump: number;
|
|
12
|
+
chainId: number;
|
|
13
|
+
enabled: number;
|
|
14
|
+
gasPriceDecimals: number;
|
|
15
|
+
nativeDecimals: number;
|
|
16
|
+
padding: number;
|
|
17
|
+
};
|
|
18
|
+
export type ChainInfoArgs = ChainInfo;
|
|
19
|
+
/** Gets the encoder for {@link ChainInfoArgs} account data. */
|
|
20
|
+
export declare function getChainInfoEncoder(): FixedSizeEncoder<ChainInfoArgs>;
|
|
21
|
+
/** Gets the decoder for {@link ChainInfo} account data. */
|
|
22
|
+
export declare function getChainInfoDecoder(): FixedSizeDecoder<ChainInfo>;
|
|
23
|
+
/** Gets the codec for {@link ChainInfo} account data. */
|
|
24
|
+
export declare function getChainInfoCodec(): FixedSizeCodec<ChainInfoArgs, ChainInfo>;
|
|
25
|
+
export declare function decodeChainInfo<TAddress extends string = string>(encodedAccount: EncodedAccount<TAddress>): Account<ChainInfo, TAddress>;
|
|
26
|
+
export declare function decodeChainInfo<TAddress extends string = string>(encodedAccount: MaybeEncodedAccount<TAddress>): MaybeAccount<ChainInfo, TAddress>;
|
|
27
|
+
export declare function fetchChainInfo<TAddress extends string = string>(rpc: Parameters<typeof fetchEncodedAccount>[0], address: Address<TAddress>, config?: FetchAccountConfig): Promise<Account<ChainInfo, TAddress>>;
|
|
28
|
+
export declare function fetchMaybeChainInfo<TAddress extends string = string>(rpc: Parameters<typeof fetchEncodedAccount>[0], address: Address<TAddress>, config?: FetchAccountConfig): Promise<MaybeAccount<ChainInfo, TAddress>>;
|
|
29
|
+
export declare function fetchAllChainInfo(rpc: Parameters<typeof fetchEncodedAccounts>[0], addresses: Array<Address>, config?: FetchAccountsConfig): Promise<Account<ChainInfo>[]>;
|
|
30
|
+
export declare function fetchAllMaybeChainInfo(rpc: Parameters<typeof fetchEncodedAccounts>[0], addresses: Array<Address>, config?: FetchAccountsConfig): Promise<MaybeAccount<ChainInfo>[]>;
|
|
31
|
+
export declare function getChainInfoSize(): number;
|
|
32
|
+
//# sourceMappingURL=chainInfo.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"chainInfo.d.ts","sourceRoot":"","sources":["../../../../../src/generated/executorQuoter/accounts/chainInfo.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAKL,mBAAmB,EACnB,oBAAoB,EAOpB,KAAK,OAAO,EACZ,K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kBAAkB,GAC1B,OAAO,CAAC,OAAO,CAAC,SAAS,EAAE,QAAQ,CAAC,CAAC,CAIvC;AAED,wBAAsB,mBAAmB,CAAC,QAAQ,SAAS,MAAM,GAAG,MAAM,EACxE,GAAG,EAAE,UAAU,CAAC,OAAO,mBAAmB,CAAC,CAAC,CAAC,CAAC,EAC9C,OAAO,EAAE,OAAO,CAAC,QAAQ,CAAC,EAC1B,MAAM,CAAC,EAAE,kBAAkB,GAC1B,OAAO,CAAC,YAAY,CAAC,SAAS,EAAE,QAAQ,CAAC,CAAC,CAG5C;AAED,wBAAsB,iBAAiB,CACrC,GAAG,EAAE,UAAU,CAAC,OAAO,oBAAoB,CAAC,CAAC,CAAC,CAAC,EAC/C,SAAS,EAAE,KAAK,CAAC,OAAO,CAAC,EACzB,MAAM,CAAC,EAAE,mBAAmB,GAC3B,OAAO,CAAC,OAAO,CAAC,SAAS,CAAC,EAAE,CAAC,CAI/B;AAED,wBAAsB,sBAAsB,CAC1C,GAAG,EAAE,UAAU,CAAC,OAAO,oBAAoB,CAAC,CAAC,CAAC,CAAC,EAC/C,SAAS,EAAE,KAAK,CAAC,OAAO,CAAC,EACzB,MAAM,CAAC,EAAE,mBAAmB,GAC3B,OAAO,CAAC,YAAY,CAAC,SAAS,CAAC,EAAE,CAAC,CAGpC;AAED,wBAAgB,gBAAgB,IAAI,MAAM,CAEzC"}
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This code was AUTOGENERATED using the Codama library.
|
|
3
|
+
* Please DO NOT EDIT THIS FILE, instead use visitors
|
|
4
|
+
* to add features, then rerun Codama to update it.
|
|
5
|
+
*
|
|
6
|
+
* @see https://github.com/codama-idl/codama
|
|
7
|
+
*/
|
|
8
|
+
import { assertAccountExists, assertAccountsExist, combineCodec, decodeAccount, fetchEncodedAccount, fetchEncodedAccounts, getStructDecoder, getStructEncoder, getU16Decoder, getU16Encoder, getU8Decoder, getU8Encoder, } from "@solana/kit";
|
|
9
|
+
/** Gets the encoder for {@link ChainInfoArgs} account data. */
|
|
10
|
+
export function getChainInfoEncoder() {
|
|
11
|
+
return getStructEncoder([
|
|
12
|
+
["discriminator", getU8Encoder()],
|
|
13
|
+
["bump", getU8Encoder()],
|
|
14
|
+
["chainId", getU16Encoder()],
|
|
15
|
+
["enabled", getU8Encoder()],
|
|
16
|
+
["gasPriceDecimals", getU8Encoder()],
|
|
17
|
+
["nativeDecimals", getU8Encoder()],
|
|
18
|
+
["padding", getU8Encoder()],
|
|
19
|
+
]);
|
|
20
|
+
}
|
|
21
|
+
/** Gets the decoder for {@link ChainInfo} account data. */
|
|
22
|
+
export function getChainInfoDecoder() {
|
|
23
|
+
return getStructDecoder([
|
|
24
|
+
["discriminator", getU8Decoder()],
|
|
25
|
+
["bump", getU8Decoder()],
|
|
26
|
+
["chainId", getU16Decoder()],
|
|
27
|
+
["enabled", getU8Decoder()],
|
|
28
|
+
["gasPriceDecimals", getU8Decoder()],
|
|
29
|
+
["nativeDecimals", getU8Decoder()],
|
|
30
|
+
["padding", getU8Decoder()],
|
|
31
|
+
]);
|
|
32
|
+
}
|
|
33
|
+
/** Gets the codec for {@link ChainInfo} account data. */
|
|
34
|
+
export function getChainInfoCodec() {
|
|
35
|
+
return combineCodec(getChainInfoEncoder(), getChainInfoDecoder());
|
|
36
|
+
}
|
|
37
|
+
export function decodeChainInfo(encodedAccount) {
|
|
38
|
+
return decodeAccount(encodedAccount, getChainInfoDecoder());
|
|
39
|
+
}
|
|
40
|
+
export async function fetchChainInfo(rpc, address, config) {
|
|
41
|
+
const maybeAccount = await fetchMaybeChainInfo(rpc, address, config);
|
|
42
|
+
assertAccountExists(maybeAccount);
|
|
43
|
+
return maybeAccount;
|
|
44
|
+
}
|
|
45
|
+
export async function fetchMaybeChainInfo(rpc, address, config) {
|
|
46
|
+
const maybeAccount = await fetchEncodedAccount(rpc, address, config);
|
|
47
|
+
return decodeChainInfo(maybeAccount);
|
|
48
|
+
}
|
|
49
|
+
export async function fetchAllChainInfo(rpc, addresses, config) {
|
|
50
|
+
const maybeAccounts = await fetchAllMaybeChainInfo(rpc, addresses, config);
|
|
51
|
+
assertAccountsExist(maybeAccounts);
|
|
52
|
+
return maybeAccounts;
|
|
53
|
+
}
|
|
54
|
+
export async function fetchAllMaybeChainInfo(rpc, addresses, config) {
|
|
55
|
+
const maybeAccounts = await fetchEncodedAccounts(rpc, addresses, config);
|
|
56
|
+
return maybeAccounts.map((maybeAccount) => decodeChainInfo(maybeAccount));
|
|
57
|
+
}
|
|
58
|
+
export function getChainInfoSize() {
|
|
59
|
+
return 8;
|
|
60
|
+
}
|
|
61
|
+
//# sourceMappingURL=chainInfo.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"chainInfo.js","sourceRoot":"","sources":["../../../../../src/generated/executorQuoter/accounts/chainInfo.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EACL,mBAAmB,EACnB,mBAAmB,EACnB,YAAY,EACZ,aAAa,EACb,mBAAmB,EACnB,oBAAoB,EACpB,gBAAgB,EAChB,gBAAgB,EAChB,aAAa,EACb,aAAa,EACb,YAAY,EACZ,YAAY,GAWb,MAAM,aAAa,CAAC;AAcrB,+DAA+D;AAC/D,MAAM,UAAU,mBAAmB;IACjC,OAAO,gBAAgB,CAAC;QACtB,CAAC,eAAe,EAAE,YAAY,EAAE,CAAC;QACjC,CAAC,MAAM,EAAE,YAAY,EAAE,CAAC;QACxB,CAAC,SAAS,EAAE,aAAa,EAAE,CAAC;QAC5B,CAAC,SAAS,EAAE,YAAY,EAAE,CAAC;QAC3B,CAAC,kBAAkB,EAAE,YAAY,EAAE,CAAC;QACpC,CAAC,gBAAgB,EAAE,YAAY,EAAE,CAAC;QAClC,CAAC,SAAS,EAAE,YAAY,EAAE,CAAC;KAC5B,CAAC,CAAC;AACL,CAAC;AAED,2DAA2D;AAC3D,MAAM,UAAU,mBAAmB;IACjC,OAAO,gBAAgB,CAAC;QACtB,CAAC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,OAAO,aAAa,CAAC;AACvB,CAAC;AAED,MAAM,CAAC,KAAK,UAAU,sBAAsB,CAC1C,GAA+C,EAC/C,SAAyB,EACzB,MAA4B;IAE5B,MAAM,aAAa,GAAG,MAAM,oBAAoB,CAAC,GAAG,EAAE,SAAS,EAAE,MAAM,CAAC,CAAC;IACzE,OAAO,aAAa,CAAC,GAAG,CAAC,CAAC,YAAY,EAAE,EAAE,CAAC,eAAe,CAAC,YAAY,CAAC,CAAC,CAAC;AAC5E,CAAC;AAED,MAAM,UAAU,gBAAgB;IAC9B,OAAO,CAAC,CAAC;AACX,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This code was AUTOGENERATED using the Codama library.
|
|
3
|
+
* Please DO NOT EDIT THIS FILE, instead use visitors
|
|
4
|
+
* to add features, then rerun Codama to update it.
|
|
5
|
+
*
|
|
6
|
+
* @see https://github.com/codama-idl/codama
|
|
7
|
+
*/
|
|
8
|
+
export * from "./chainInfo";
|
|
9
|
+
export * from "./quoteBody";
|
|
10
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/generated/executorQuoter/accounts/index.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,cAAc,aAAa,CAAC;AAC5B,cAAc,aAAa,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This code was AUTOGENERATED using the Codama library.
|
|
3
|
+
* Please DO NOT EDIT THIS FILE, instead use visitors
|
|
4
|
+
* to add features, then rerun Codama to update it.
|
|
5
|
+
*
|
|
6
|
+
* @see https://github.com/codama-idl/codama
|
|
7
|
+
*/
|
|
8
|
+
export * from "./chainInfo";
|
|
9
|
+
export * from "./quoteBody";
|
|
10
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/generated/executorQuoter/accounts/index.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,cAAc,aAAa,CAAC;AAC5B,cAAc,aAAa,CAAC"}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This code was AUTOGENERATED using the Codama library.
|
|
3
|
+
* Please DO NOT EDIT THIS FILE, instead use visitors
|
|
4
|
+
* to add features, then rerun Codama to update it.
|
|
5
|
+
*
|
|
6
|
+
* @see https://github.com/codama-idl/codama
|
|
7
|
+
*/
|
|
8
|
+
import { fetchEncodedAccount, fetchEncodedAccounts, type Account, type Address, type EncodedAccount, type FetchAccountConfig, type FetchAccountsConfig, type FixedSizeCodec, type FixedSizeDecoder, type FixedSizeEncoder, type MaybeAccount, type MaybeEncodedAccount, type ReadonlyUint8Array } from "@solana/kit";
|
|
9
|
+
export type QuoteBody = {
|
|
10
|
+
discriminator: number;
|
|
11
|
+
bump: number;
|
|
12
|
+
chainId: number;
|
|
13
|
+
padding: ReadonlyUint8Array;
|
|
14
|
+
dstPrice: bigint;
|
|
15
|
+
srcPrice: bigint;
|
|
16
|
+
dstGasPrice: bigint;
|
|
17
|
+
baseFee: bigint;
|
|
18
|
+
};
|
|
19
|
+
export type QuoteBodyArgs = {
|
|
20
|
+
discriminator: number;
|
|
21
|
+
bump: number;
|
|
22
|
+
chainId: number;
|
|
23
|
+
padding: ReadonlyUint8Array;
|
|
24
|
+
dstPrice: number | bigint;
|
|
25
|
+
srcPrice: number | bigint;
|
|
26
|
+
dstGasPrice: number | bigint;
|
|
27
|
+
baseFee: number | bigint;
|
|
28
|
+
};
|
|
29
|
+
/** Gets the encoder for {@link QuoteBodyArgs} account data. */
|
|
30
|
+
export declare function getQuoteBodyEncoder(): FixedSizeEncoder<QuoteBodyArgs>;
|
|
31
|
+
/** Gets the decoder for {@link QuoteBody} account data. */
|
|
32
|
+
export declare function getQuoteBodyDecoder(): FixedSizeDecoder<QuoteBody>;
|
|
33
|
+
/** Gets the codec for {@link QuoteBody} account data. */
|
|
34
|
+
export declare function getQuoteBodyCodec(): FixedSizeCodec<QuoteBodyArgs, QuoteBody>;
|
|
35
|
+
export declare function decodeQuoteBody<TAddress extends string = string>(encodedAccount: EncodedAccount<TAddress>): Account<QuoteBody, TAddress>;
|
|
36
|
+
export declare function decodeQuoteBody<TAddress extends string = string>(encodedAccount: MaybeEncodedAccount<TAddress>): MaybeAccount<QuoteBody, TAddress>;
|
|
37
|
+
export declare function fetchQuoteBody<TAddress extends string = string>(rpc: Parameters<typeof fetchEncodedAccount>[0], address: Address<TAddress>, config?: FetchAccountConfig): Promise<Account<QuoteBody, TAddress>>;
|
|
38
|
+
export declare function fetchMaybeQuoteBody<TAddress extends string = string>(rpc: Parameters<typeof fetchEncodedAccount>[0], address: Address<TAddress>, config?: FetchAccountConfig): Promise<MaybeAccount<QuoteBody, TAddress>>;
|
|
39
|
+
export declare function fetchAllQuoteBody(rpc: Parameters<typeof fetchEncodedAccounts>[0], addresses: Array<Address>, config?: FetchAccountsConfig): Promise<Account<QuoteBody>[]>;
|
|
40
|
+
export declare function fetchAllMaybeQuoteBody(rpc: Parameters<typeof fetchEncodedAccounts>[0], addresses: Array<Address>, config?: FetchAccountsConfig): Promise<MaybeAccount<QuoteBody>[]>;
|
|
41
|
+
export declare function getQuoteBodySize(): number;
|
|
42
|
+
//# sourceMappingURL=quoteBody.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"quoteBody.d.ts","sourceRoot":"","sources":["../../../../../src/generated/executorQuoter/accounts/quoteBody.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAKL,mBAAmB,EACnB,oBAAoB,EAapB,KAAK,OAAO,EACZ,KAAK,OAAO,EACZ,KAAK,cAAc,EACnB,KAAK,kBAAkB,EACvB,KAAK,mBAAmB,EACxB,KAAK,cAAc,EACnB,KAAK,gBAAgB,EACrB,KAAK,gBAAgB,EACrB,KAAK,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+
*
|
|
6
|
+
* @see https://github.com/codama-idl/codama
|
|
7
|
+
*/
|
|
8
|
+
import { assertAccountExists, assertAccountsExist, combineCodec, decodeAccount, fetchEncodedAccount, fetchEncodedAccounts, fixDecoderSize, fixEncoderSize, getBytesDecoder, getBytesEncoder, getStructDecoder, getStructEncoder, getU16Decoder, getU16Encoder, getU64Decoder, getU64Encoder, getU8Decoder, getU8Encoder, } from "@solana/kit";
|
|
9
|
+
/** Gets the encoder for {@link QuoteBodyArgs} account data. */
|
|
10
|
+
export function getQuoteBodyEncoder() {
|
|
11
|
+
return getStructEncoder([
|
|
12
|
+
["discriminator", getU8Encoder()],
|
|
13
|
+
["bump", getU8Encoder()],
|
|
14
|
+
["chainId", getU16Encoder()],
|
|
15
|
+
["padding", fixEncoderSize(getBytesEncoder(), 4)],
|
|
16
|
+
["dstPrice", getU64Encoder()],
|
|
17
|
+
["srcPrice", getU64Encoder()],
|
|
18
|
+
["dstGasPrice", getU64Encoder()],
|
|
19
|
+
["baseFee", getU64Encoder()],
|
|
20
|
+
]);
|
|
21
|
+
}
|
|
22
|
+
/** Gets the decoder for {@link QuoteBody} account data. */
|
|
23
|
+
export function getQuoteBodyDecoder() {
|
|
24
|
+
return getStructDecoder([
|
|
25
|
+
["discriminator", getU8Decoder()],
|
|
26
|
+
["bump", getU8Decoder()],
|
|
27
|
+
["chainId", getU16Decoder()],
|
|
28
|
+
["padding", fixDecoderSize(getBytesDecoder(), 4)],
|
|
29
|
+
["dstPrice", getU64Decoder()],
|
|
30
|
+
["srcPrice", getU64Decoder()],
|
|
31
|
+
["dstGasPrice", getU64Decoder()],
|
|
32
|
+
["baseFee", getU64Decoder()],
|
|
33
|
+
]);
|
|
34
|
+
}
|
|
35
|
+
/** Gets the codec for {@link QuoteBody} account data. */
|
|
36
|
+
export function getQuoteBodyCodec() {
|
|
37
|
+
return combineCodec(getQuoteBodyEncoder(), getQuoteBodyDecoder());
|
|
38
|
+
}
|
|
39
|
+
export function decodeQuoteBody(encodedAccount) {
|
|
40
|
+
return decodeAccount(encodedAccount, getQuoteBodyDecoder());
|
|
41
|
+
}
|
|
42
|
+
export async function fetchQuoteBody(rpc, address, config) {
|
|
43
|
+
const maybeAccount = await fetchMaybeQuoteBody(rpc, address, config);
|
|
44
|
+
assertAccountExists(maybeAccount);
|
|
45
|
+
return maybeAccount;
|
|
46
|
+
}
|
|
47
|
+
export async function fetchMaybeQuoteBody(rpc, address, config) {
|
|
48
|
+
const maybeAccount = await fetchEncodedAccount(rpc, address, config);
|
|
49
|
+
return decodeQuoteBody(maybeAccount);
|
|
50
|
+
}
|
|
51
|
+
export async function fetchAllQuoteBody(rpc, addresses, config) {
|
|
52
|
+
const maybeAccounts = await fetchAllMaybeQuoteBody(rpc, addresses, config);
|
|
53
|
+
assertAccountsExist(maybeAccounts);
|
|
54
|
+
return maybeAccounts;
|
|
55
|
+
}
|
|
56
|
+
export async function fetchAllMaybeQuoteBody(rpc, addresses, config) {
|
|
57
|
+
const maybeAccounts = await fetchEncodedAccounts(rpc, addresses, config);
|
|
58
|
+
return maybeAccounts.map((maybeAccount) => decodeQuoteBody(maybeAccount));
|
|
59
|
+
}
|
|
60
|
+
export function getQuoteBodySize() {
|
|
61
|
+
return 40;
|
|
62
|
+
}
|
|
63
|
+
//# sourceMappingURL=quoteBody.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"quoteBody.js","sourceRoot":"","sources":["../../../../../src/generated/executorQuoter/accounts/quoteBody.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EACL,mBAAmB,EACnB,mBAAmB,EACnB,YAAY,EACZ,aAAa,EACb,mBAAmB,EACnB,oBAAoB,EACpB,cAAc,EACd,cAAc,EACd,eAAe,EACf,eAAe,EACf,gBAAgB,EAChB,gBAAgB,EAChB,aAAa,EACb,aAAa,EACb,aAAa,EACb,aAAa,EACb,YAAY,EACZ,YAAY,GAYb,MAAM,aAAa,CAAC;AAwBrB,+DAA+D;AAC/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B;IAE3B,MAAM,YAAY,GAAG,MAAM,mBAAmB,CAAC,GAAG,EAAE,OAAO,EAAE,MAAM,CAAC,CAAC;IACrE,mBAAmB,CAAC,YAAY,CAAC,CAAC;IAClC,OAAO,YAAY,CAAC;AACtB,CAAC;AAED,MAAM,CAAC,KAAK,UAAU,mBAAmB,CACvC,GAA8C,EAC9C,OAA0B,EAC1B,MAA2B;IAE3B,MAAM,YAAY,GAAG,MAAM,mBAAmB,CAAC,GAAG,EAAE,OAAO,EAAE,MAAM,CAAC,CAAC;IACrE,OAAO,eAAe,CAAC,YAAY,CAAC,CAAC;AACvC,CAAC;AAED,MAAM,CAAC,KAAK,UAAU,iBAAiB,CACrC,GAA+C,EAC/C,SAAyB,EACzB,MAA4B;IAE5B,MAAM,aAAa,GAAG,MAAM,sBAAsB,CAAC,GAAG,EAAE,SAAS,EAAE,MAAM,CAAC,CAAC;IAC3E,mBAAmB,CAAC,aAAa,CAAC,CAAC;IACnC,OAAO,aAAa,CAAC;AACvB,CAAC;AAED,MAAM,CAAC,KAAK,UAAU,sBAAsB,CAC1C,GAA+C,EAC/C,SAAyB,EACzB,MAA4B;IAE5B,MAAM,aAAa,GAAG,MAAM,oBAAoB,CAAC,GAAG,EAAE,SAAS,EAAE,MAAM,CAAC,CAAC;IACzE,OAAO,aAAa,CAAC,GAAG,CAAC,CAAC,YAAY,EAAE,EAAE,CAAC,eAAe,CAAC,YAAY,CAAC,CAAC,CAAC;AAC5E,CAAC;AAED,MAAM,UAAU,gBAAgB;IAC9B,OAAO,EAAE,CAAC;AACZ,CAAC"}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This code was AUTOGENERATED using the Codama library.
|
|
3
|
+
* Please DO NOT EDIT THIS FILE, instead use visitors
|
|
4
|
+
* to add features, then rerun Codama to update it.
|
|
5
|
+
*
|
|
6
|
+
* @see https://github.com/codama-idl/codama
|
|
7
|
+
*/
|
|
8
|
+
import { type Address, type SOLANA_ERROR__INSTRUCTION_ERROR__CUSTOM, type SolanaError } from "@solana/kit";
|
|
9
|
+
export declare const EXECUTOR_QUOTER_ERROR__INVALID_UPDATER = 4096;
|
|
10
|
+
export declare const EXECUTOR_QUOTER_ERROR__CHAIN_DISABLED = 4097;
|
|
11
|
+
export declare const EXECUTOR_QUOTER_ERROR__UNSUPPORTED_INSTRUCTION = 4098;
|
|
12
|
+
export declare const EXECUTOR_QUOTER_ERROR__MORE_THAN_ONE_DROP_OFF = 4099;
|
|
13
|
+
export declare const EXECUTOR_QUOTER_ERROR__MATH_OVERFLOW = 4100;
|
|
14
|
+
export declare const EXECUTOR_QUOTER_ERROR__INVALID_RELAY_INSTRUCTIONS = 4101;
|
|
15
|
+
export declare const EXECUTOR_QUOTER_ERROR__INVALID_PDA = 4102;
|
|
16
|
+
export declare const EXECUTOR_QUOTER_ERROR__ALREADY_INITIALIZED = 4103;
|
|
17
|
+
export declare const EXECUTOR_QUOTER_ERROR__NOT_INITIALIZED = 4104;
|
|
18
|
+
export declare const EXECUTOR_QUOTER_ERROR__INVALID_OWNER = 4105;
|
|
19
|
+
export declare const EXECUTOR_QUOTER_ERROR__INVALID_INSTRUCTION_DATA = 4106;
|
|
20
|
+
export declare const EXECUTOR_QUOTER_ERROR__INVALID_DISCRIMINATOR = 4107;
|
|
21
|
+
export declare const EXECUTOR_QUOTER_ERROR__CHAIN_ID_MISMATCH = 4108;
|
|
22
|
+
export type ExecutorQuoterError = typeof EXECUTOR_QUOTER_ERROR__ALREADY_INITIALIZED | typeof EXECUTOR_QUOTER_ERROR__CHAIN_DISABLED | typeof EXECUTOR_QUOTER_ERROR__CHAIN_ID_MISMATCH | typeof EXECUTOR_QUOTER_ERROR__INVALID_DISCRIMINATOR | typeof EXECUTOR_QUOTER_ERROR__INVALID_INSTRUCTION_DATA | typeof EXECUTOR_QUOTER_ERROR__INVALID_OWNER | typeof EXECUTOR_QUOTER_ERROR__INVALID_PDA | typeof EXECUTOR_QUOTER_ERROR__INVALID_RELAY_INSTRUCTIONS | typeof EXECUTOR_QUOTER_ERROR__INVALID_UPDATER | typeof EXECUTOR_QUOTER_ERROR__MATH_OVERFLOW | typeof EXECUTOR_QUOTER_ERROR__MORE_THAN_ONE_DROP_OFF | typeof EXECUTOR_QUOTER_ERROR__NOT_INITIALIZED | typeof EXECUTOR_QUOTER_ERROR__UNSUPPORTED_INSTRUCTION;
|
|
23
|
+
export declare function getExecutorQuoterErrorMessage(code: ExecutorQuoterError): string;
|
|
24
|
+
export declare function isExecutorQuoterError<TProgramErrorCode extends ExecutorQuoterError>(error: unknown, transactionMessage: {
|
|
25
|
+
instructions: Record<number, {
|
|
26
|
+
programAddress: Address;
|
|
27
|
+
}>;
|
|
28
|
+
}, code?: TProgramErrorCode): error is SolanaError<typeof SOLANA_ERROR__INSTRUCTION_ERROR__CUSTOM> & Readonly<{
|
|
29
|
+
context: Readonly<{
|
|
30
|
+
code: TProgramErrorCode;
|
|
31
|
+
}>;
|
|
32
|
+
}>;
|
|
33
|
+
//# sourceMappingURL=executorQuoter.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"executorQuoter.d.ts","sourceRoot":"","sources":["../../../../../src/generated/executorQuoter/errors/executorQuoter.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAEL,KAAK,OAAO,EACZ,KAAK,uCAAuC,EAC5C,KAAK,WAAW,EACjB,MAAM,aAAa,CAAC;AAGrB,eAAO,MAAM,sCAAsC,OAAS,CAAC;AAC7D,eAAO,MAAM,qCAAqC,OAAS,CAAC;AAC5D,eAAO,MAAM,8CAA8C,OAAS,CAAC;AACrE,eAAO,MAAM,6CAA6C,OAAS,CAAC;AACpE,eAAO,MAAM,oCAAoC,OAAS,CAAC;AAC3D,eAAO,MAAM,iDAAiD,OAAS,CAAC;AACxE,eAAO,MAAM,kCAAkC,OAAS,CAAC;AACzD,eAAO,MAAM,0CAA0C,OAAS,CAAC;AACjE,eAAO,MAAM,sCAAsC,OAAS,CAAC;AAC7D,eAAO,MAAM,oCAAoC,OAAS,CAAC;AAC3D,eAAO,MAAM,+CAA+C,OAAS,CAAC;AACtE,eAAO,MAAM,4CAA4C,OAAS,CAAC;AACnE,eAAO,MAAM,wCAAwC,OAAS,CAAC;AAE/D,MAAM,MAAM,mBAAmB,GAC3B,OAAO,0CAA0C,GACjD,OAAO,qCAAqC,GAC5C,OAAO,wCAAwC,GAC/C,OAAO,4CAA4C,GACnD,OAAO,+CAA+C,GACtD,OAAO,oCAAoC,GAC3C,OAAO,kCAAkC,GACzC,OAAO,iDAAiD,GACxD,OAAO,sCAAsC,GAC7C,OAAO,oCAAoC,GAC3C,OAAO,6CAA6C,GACpD,OAAO,sCAAsC,GAC7C,OAAO,8CAA8C,CAAC;AAuB1D,wBAAgB,6BAA6B,CAC3C,IAAI,EAAE,mBAAmB,GACxB,MAAM,CAQR;AAED,wBAAgB,qBAAqB,CACnC,iBAAiB,SAAS,mBAAmB,EAE7C,KAAK,EAAE,OAAO,EACd,kBAAkB,EAAE;IAClB,YAAY,EAAE,MAAM,CAAC,MAAM,EAAE;QAAE,cAAc,EAAE,OAAO,CAAA;KAAE,CAAC,CAAC;CAC3D,EACD,IAAI,CAAC,EAAE,iBAAiB,GACvB,KAAK,IAAI,WAAW,CAAC,OAAO,uCAAuC,CAAC,GACrE,QAAQ,CAAC;IAAE,OAAO,EAAE,QAAQ,CAAC;QAAE,IAAI,EAAE,iBAAiB,CAAA;KAAE,CAAC,CAAA;CAAE,CAAC,CAO7D"}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This code was AUTOGENERATED using the Codama library.
|
|
3
|
+
* Please DO NOT EDIT THIS FILE, instead use visitors
|
|
4
|
+
* to add features, then rerun Codama to update it.
|
|
5
|
+
*
|
|
6
|
+
* @see https://github.com/codama-idl/codama
|
|
7
|
+
*/
|
|
8
|
+
import { isProgramError, } from "@solana/kit";
|
|
9
|
+
import { EXECUTOR_QUOTER_PROGRAM_ADDRESS } from "../programs";
|
|
10
|
+
export const EXECUTOR_QUOTER_ERROR__INVALID_UPDATER = 0x1000; // 4096
|
|
11
|
+
export const EXECUTOR_QUOTER_ERROR__CHAIN_DISABLED = 0x1001; // 4097
|
|
12
|
+
export const EXECUTOR_QUOTER_ERROR__UNSUPPORTED_INSTRUCTION = 0x1002; // 4098
|
|
13
|
+
export const EXECUTOR_QUOTER_ERROR__MORE_THAN_ONE_DROP_OFF = 0x1003; // 4099
|
|
14
|
+
export const EXECUTOR_QUOTER_ERROR__MATH_OVERFLOW = 0x1004; // 4100
|
|
15
|
+
export const EXECUTOR_QUOTER_ERROR__INVALID_RELAY_INSTRUCTIONS = 0x1005; // 4101
|
|
16
|
+
export const EXECUTOR_QUOTER_ERROR__INVALID_PDA = 0x1006; // 4102
|
|
17
|
+
export const EXECUTOR_QUOTER_ERROR__ALREADY_INITIALIZED = 0x1007; // 4103
|
|
18
|
+
export const EXECUTOR_QUOTER_ERROR__NOT_INITIALIZED = 0x1008; // 4104
|
|
19
|
+
export const EXECUTOR_QUOTER_ERROR__INVALID_OWNER = 0x1009; // 4105
|
|
20
|
+
export const EXECUTOR_QUOTER_ERROR__INVALID_INSTRUCTION_DATA = 0x100a; // 4106
|
|
21
|
+
export const EXECUTOR_QUOTER_ERROR__INVALID_DISCRIMINATOR = 0x100b; // 4107
|
|
22
|
+
export const EXECUTOR_QUOTER_ERROR__CHAIN_ID_MISMATCH = 0x100c; // 4108
|
|
23
|
+
let executorQuoterErrorMessages;
|
|
24
|
+
if (process.env.NODE_ENV !== "production") {
|
|
25
|
+
executorQuoterErrorMessages = {
|
|
26
|
+
[EXECUTOR_QUOTER_ERROR__ALREADY_INITIALIZED]: `Already initialized`,
|
|
27
|
+
[EXECUTOR_QUOTER_ERROR__CHAIN_DISABLED]: `Chain is disabled`,
|
|
28
|
+
[EXECUTOR_QUOTER_ERROR__CHAIN_ID_MISMATCH]: `Chain ID mismatch`,
|
|
29
|
+
[EXECUTOR_QUOTER_ERROR__INVALID_DISCRIMINATOR]: `Invalid discriminator`,
|
|
30
|
+
[EXECUTOR_QUOTER_ERROR__INVALID_INSTRUCTION_DATA]: `Invalid instruction data`,
|
|
31
|
+
[EXECUTOR_QUOTER_ERROR__INVALID_OWNER]: `Invalid owner`,
|
|
32
|
+
[EXECUTOR_QUOTER_ERROR__INVALID_PDA]: `Invalid PDA`,
|
|
33
|
+
[EXECUTOR_QUOTER_ERROR__INVALID_RELAY_INSTRUCTIONS]: `Invalid relay instructions`,
|
|
34
|
+
[EXECUTOR_QUOTER_ERROR__INVALID_UPDATER]: `Invalid updater authority`,
|
|
35
|
+
[EXECUTOR_QUOTER_ERROR__MATH_OVERFLOW]: `Math overflow`,
|
|
36
|
+
[EXECUTOR_QUOTER_ERROR__MORE_THAN_ONE_DROP_OFF]: `More than one drop-off`,
|
|
37
|
+
[EXECUTOR_QUOTER_ERROR__NOT_INITIALIZED]: `Not initialized`,
|
|
38
|
+
[EXECUTOR_QUOTER_ERROR__UNSUPPORTED_INSTRUCTION]: `Unsupported instruction`,
|
|
39
|
+
};
|
|
40
|
+
}
|
|
41
|
+
export function getExecutorQuoterErrorMessage(code) {
|
|
42
|
+
if (process.env.NODE_ENV !== "production") {
|
|
43
|
+
return executorQuoterErrorMessages[code];
|
|
44
|
+
}
|
|
45
|
+
return "Error message not available in production bundles.";
|
|
46
|
+
}
|
|
47
|
+
export function isExecutorQuoterError(error, transactionMessage, code) {
|
|
48
|
+
return isProgramError(error, transactionMessage, EXECUTOR_QUOTER_PROGRAM_ADDRESS, code);
|
|
49
|
+
}
|
|
50
|
+
//# sourceMappingURL=executorQuoter.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"executorQuoter.js","sourceRoot":"","sources":["../../../../../src/generated/executorQuoter/errors/executorQuoter.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EACL,cAAc,GAIf,MAAM,aAAa,CAAC;AACrB,OAAO,EAAE,+BAA+B,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EAAE,aAAa;QACnD,CAAC,iDAAiD,CAAC,EAAE,4BAA4B;QACjF,CAAC,sCAAsC,CAAC,EAAE,2BAA2B;QACrE,CAAC,oCAAoC,CAAC,EAAE,eAAe;QACvD,CAAC,6CAA6C,CAAC,EAAE,wBAAwB;QACzE,CAAC,sCAAsC,CAAC,EAAE,iBAAiB;QAC3D,CAAC,8CAA8C,CAAC,EAAE,yBAAyB;KAC5E,CAAC;AACJ,CAAC;AAED,MAAM,UAAU,6BAA6B,CAC3C,IAAyB;IAEzB,IAAI,OAAO,CAAC,GAAG,CAAC,QAAQ,KAAK,YAAY,EAAE,CAAC;QAC1C,OAAQ,2BAAmE,CACzE,IAAI,CACL,CAAC;IACJ,CAAC;IAED,OAAO,oDAAoD,CAAC;AAC9D,CAAC;AAED,MAAM,UAAU,qBAAqB,CAGnC,KAAc,EACd,kBAEC,EACD,IAAwB;IAGxB,OAAO,cAAc,CACnB,KAAK,EACL,kBAAkB,EAClB,+BAA+B,EAC/B,IAAI,CACL,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This code was AUTOGENERATED using the Codama library.
|
|
3
|
+
* Please DO NOT EDIT THIS FILE, instead use visitors
|
|
4
|
+
* to add features, then rerun Codama to update it.
|
|
5
|
+
*
|
|
6
|
+
* @see https://github.com/codama-idl/codama
|
|
7
|
+
*/
|
|
8
|
+
export * from "./executorQuoter";
|
|
9
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/generated/executorQuoter/errors/index.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,cAAc,kBAAkB,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This code was AUTOGENERATED using the Codama library.
|
|
3
|
+
* Please DO NOT EDIT THIS FILE, instead use visitors
|
|
4
|
+
* to add features, then rerun Codama to update it.
|
|
5
|
+
*
|
|
6
|
+
* @see https://github.com/codama-idl/codama
|
|
7
|
+
*/
|
|
8
|
+
export * from "./executorQuoter";
|
|
9
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/generated/executorQuoter/errors/index.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,cAAc,kBAAkB,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This code was AUTOGENERATED using the Codama library.
|
|
3
|
+
* Please DO NOT EDIT THIS FILE, instead use visitors
|
|
4
|
+
* to add features, then rerun Codama to update it.
|
|
5
|
+
*
|
|
6
|
+
* @see https://github.com/codama-idl/codama
|
|
7
|
+
*/
|
|
8
|
+
export * from "./accounts";
|
|
9
|
+
export * from "./errors";
|
|
10
|
+
export * from "./instructions";
|
|
11
|
+
export * from "./pdas";
|
|
12
|
+
export * from "./programs";
|
|
13
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/generated/executorQuoter/index.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,cAAc,YAAY,CAAC;AAC3B,cAAc,UAAU,CAAC;AACzB,cAAc,gBAAgB,CAAC;AAC/B,cAAc,QAAQ,CAAC;AACvB,cAAc,YAAY,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This code was AUTOGENERATED using the Codama library.
|
|
3
|
+
* Please DO NOT EDIT THIS FILE, instead use visitors
|
|
4
|
+
* to add features, then rerun Codama to update it.
|
|
5
|
+
*
|
|
6
|
+
* @see https://github.com/codama-idl/codama
|
|
7
|
+
*/
|
|
8
|
+
export * from "./accounts";
|
|
9
|
+
export * from "./errors";
|
|
10
|
+
export * from "./instructions";
|
|
11
|
+
export * from "./pdas";
|
|
12
|
+
export * from "./programs";
|
|
13
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/generated/executorQuoter/index.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,cAAc,YAAY,CAAC;AAC3B,cAAc,UAAU,CAAC;AACzB,cAAc,gBAAgB,CAAC;AAC/B,cAAc,QAAQ,CAAC;AACvB,cAAc,YAAY,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This code was AUTOGENERATED using the Codama library.
|
|
3
|
+
* Please DO NOT EDIT THIS FILE, instead use visitors
|
|
4
|
+
* to add features, then rerun Codama to update it.
|
|
5
|
+
*
|
|
6
|
+
* @see https://github.com/codama-idl/codama
|
|
7
|
+
*/
|
|
8
|
+
export * from "./requestExecutionQuote";
|
|
9
|
+
export * from "./requestQuote";
|
|
10
|
+
export * from "./updateChainInfo";
|
|
11
|
+
export * from "./updateQuote";
|
|
12
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/generated/executorQuoter/instructions/index.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,cAAc,yBAAyB,CAAC;AACxC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,mBAAmB,CAAC;AAClC,cAAc,eAAe,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This code was AUTOGENERATED using the Codama library.
|
|
3
|
+
* Please DO NOT EDIT THIS FILE, instead use visitors
|
|
4
|
+
* to add features, then rerun Codama to update it.
|
|
5
|
+
*
|
|
6
|
+
* @see https://github.com/codama-idl/codama
|
|
7
|
+
*/
|
|
8
|
+
export * from "./requestExecutionQuote";
|
|
9
|
+
export * from "./requestQuote";
|
|
10
|
+
export * from "./updateChainInfo";
|
|
11
|
+
export * from "./updateQuote";
|
|
12
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/generated/executorQuoter/instructions/index.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,cAAc,yBAAyB,CAAC;AACxC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,mBAAmB,CAAC;AAClC,cAAc,eAAe,CAAC"}
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This code was AUTOGENERATED using the Codama library.
|
|
3
|
+
* Please DO NOT EDIT THIS FILE, instead use visitors
|
|
4
|
+
* to add features, then rerun Codama to update it.
|
|
5
|
+
*
|
|
6
|
+
* @see https://github.com/codama-idl/codama
|
|
7
|
+
*/
|
|
8
|
+
import { type AccountMeta, type Address, type Codec, type Decoder, type Encoder, type Instruction, type InstructionWithAccounts, type InstructionWithData, type ReadonlyAccount, type ReadonlyUint8Array } from "@solana/kit";
|
|
9
|
+
import { EXECUTOR_QUOTER_PROGRAM_ADDRESS } from "../programs";
|
|
10
|
+
export declare const REQUEST_EXECUTION_QUOTE_DISCRIMINATOR: Uint8Array<ArrayBuffer>;
|
|
11
|
+
export declare function getRequestExecutionQuoteDiscriminatorBytes(): ReadonlyUint8Array<ArrayBuffer>;
|
|
12
|
+
export type RequestExecutionQuoteInstruction<TProgram extends string = typeof EXECUTOR_QUOTER_PROGRAM_ADDRESS, TAccountConfig extends string | AccountMeta<string> = string, TAccountChainInfo extends string | AccountMeta<string> = string, TAccountQuoteBody extends string | AccountMeta<string> = string, TAccountEventCpi extends string | AccountMeta<string> = string, TRemainingAccounts extends readonly AccountMeta<string>[] = []> = Instruction<TProgram> & InstructionWithData<ReadonlyUint8Array> & InstructionWithAccounts<[
|
|
13
|
+
TAccountConfig extends string ? ReadonlyAccount<TAccountConfig> : TAccountConfig,
|
|
14
|
+
TAccountChainInfo extends string ? ReadonlyAccount<TAccountChainInfo> : TAccountChainInfo,
|
|
15
|
+
TAccountQuoteBody extends string ? ReadonlyAccount<TAccountQuoteBody> : TAccountQuoteBody,
|
|
16
|
+
TAccountEventCpi extends string ? ReadonlyAccount<TAccountEventCpi> : TAccountEventCpi,
|
|
17
|
+
...TRemainingAccounts
|
|
18
|
+
]>;
|
|
19
|
+
export type RequestExecutionQuoteInstructionData = {
|
|
20
|
+
dstChain: number;
|
|
21
|
+
dstAddr: ReadonlyUint8Array;
|
|
22
|
+
refundAddr: ReadonlyUint8Array;
|
|
23
|
+
requestBytes: ReadonlyUint8Array;
|
|
24
|
+
relayInstructions: ReadonlyUint8Array;
|
|
25
|
+
};
|
|
26
|
+
export type RequestExecutionQuoteInstructionDataArgs = RequestExecutionQuoteInstructionData;
|
|
27
|
+
export declare function getRequestExecutionQuoteInstructionDataEncoder(): Encoder<RequestExecutionQuoteInstructionDataArgs>;
|
|
28
|
+
export declare function getRequestExecutionQuoteInstructionDataDecoder(): Decoder<RequestExecutionQuoteInstructionData>;
|
|
29
|
+
export declare function getRequestExecutionQuoteInstructionDataCodec(): Codec<RequestExecutionQuoteInstructionDataArgs, RequestExecutionQuoteInstructionData>;
|
|
30
|
+
export type RequestExecutionQuoteInput<TAccountConfig extends string = string, TAccountChainInfo extends string = string, TAccountQuoteBody extends string = string, TAccountEventCpi extends string = string> = {
|
|
31
|
+
/** Program config (reserved for CPI compatibility) */
|
|
32
|
+
config: Address<TAccountConfig>;
|
|
33
|
+
/** ChainInfo PDA for destination chain */
|
|
34
|
+
chainInfo: Address<TAccountChainInfo>;
|
|
35
|
+
/** QuoteBody PDA for destination chain */
|
|
36
|
+
quoteBody: Address<TAccountQuoteBody>;
|
|
37
|
+
/** Event CPI account (reserved for CPI compatibility) */
|
|
38
|
+
eventCpi: Address<TAccountEventCpi>;
|
|
39
|
+
dstChain: RequestExecutionQuoteInstructionDataArgs["dstChain"];
|
|
40
|
+
dstAddr: RequestExecutionQuoteInstructionDataArgs["dstAddr"];
|
|
41
|
+
refundAddr: RequestExecutionQuoteInstructionDataArgs["refundAddr"];
|
|
42
|
+
requestBytes: RequestExecutionQuoteInstructionDataArgs["requestBytes"];
|
|
43
|
+
relayInstructions: RequestExecutionQuoteInstructionDataArgs["relayInstructions"];
|
|
44
|
+
};
|
|
45
|
+
export declare function getRequestExecutionQuoteInstruction<TAccountConfig extends string, TAccountChainInfo extends string, TAccountQuoteBody extends string, TAccountEventCpi extends string, TProgramAddress extends Address = typeof EXECUTOR_QUOTER_PROGRAM_ADDRESS>(input: RequestExecutionQuoteInput<TAccountConfig, TAccountChainInfo, TAccountQuoteBody, TAccountEventCpi>, config?: {
|
|
46
|
+
programAddress?: TProgramAddress;
|
|
47
|
+
}): RequestExecutionQuoteInstruction<TProgramAddress, TAccountConfig, TAccountChainInfo, TAccountQuoteBody, TAccountEventCpi>;
|
|
48
|
+
export type ParsedRequestExecutionQuoteInstruction<TProgram extends string = typeof EXECUTOR_QUOTER_PROGRAM_ADDRESS, TAccountMetas extends readonly AccountMeta[] = readonly AccountMeta[]> = {
|
|
49
|
+
programAddress: Address<TProgram>;
|
|
50
|
+
accounts: {
|
|
51
|
+
/** Program config (reserved for CPI compatibility) */
|
|
52
|
+
config: TAccountMetas[0];
|
|
53
|
+
/** ChainInfo PDA for destination chain */
|
|
54
|
+
chainInfo: TAccountMetas[1];
|
|
55
|
+
/** QuoteBody PDA for destination chain */
|
|
56
|
+
quoteBody: TAccountMetas[2];
|
|
57
|
+
/** Event CPI account (reserved for CPI compatibility) */
|
|
58
|
+
eventCpi: TAccountMetas[3];
|
|
59
|
+
};
|
|
60
|
+
data: RequestExecutionQuoteInstructionData;
|
|
61
|
+
};
|
|
62
|
+
export declare function parseRequestExecutionQuoteInstruction<TProgram extends string, TAccountMetas extends readonly AccountMeta[]>(instruction: Instruction<TProgram> & InstructionWithAccounts<TAccountMetas> & InstructionWithData<ReadonlyUint8Array>): ParsedRequestExecutionQuoteInstruction<TProgram, TAccountMetas>;
|
|
63
|
+
//# sourceMappingURL=requestExecutionQuote.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"requestExecutionQuote.d.ts","sourceRoot":"","sources":["../../../../../src/generated/executorQuoter/instructions/requestExecutionQuote.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAgBL,KAAK,WAAW,EAChB,KAAK,OAAO,EACZ,KAAK,KAAK,EACV,KAAK,OAAO,EACZ,KAAK,OAAO,EACZ,KAAK,WAAW,EAChB,KAAK,uBAAuB,EAC5B,KAAK,mBAAmB,EACxB,KAAK,eAAe,EACpB,KAAK,kBAAkB,EACxB,MAAM,aAAa,CAAC;AAKrB,OAAO,EAAE,+BAA+B,EAAE,MAAM,aAAa,CAAC;AAE9D,eAAO,MAAM,qCAAqC,yBAEhD,CAAC;AAEH,wBAAgB,0CAA0C,oCAEzD;AAED,MAAM,MAAM,gCAAgC,CAC1C,QAAQ,SAAS,MAAM,GAAG,OAAO,+BAA+B,EAChE,cAAc,SAAS,MAAM,GAAG,WAAW,CAAC,MAAM,CAAC,GAAG,MAAM,EAC5D,iBAAiB,SAAS,MAAM,GAAG,WAAW,CAAC,MAAM,CAAC,GAAG,MAAM,EAC/D,iBAAiB,SAAS,MAAM,GAAG,WAAW,CAAC,MAAM,CAAC,GAAG,MAAM,EAC/D,gBAAgB,SAAS,MAAM,GAAG,WAAW,CAAC,MAAM,CAAC,GAAG,MAAM,EAC9D,kBAAkB,SAAS,SAAS,WAAW,CAAC,MAAM,CAAC,EAAE,GAAG,EAAE,IAC5D,WAAW,CAAC,QAAQ,CAAC,GACvB,mBAAmB,CAAC,kBAAkB,CAAC,GACvC,uBAAuB,CACrB;IACE,cAAc,SAAS,MAAM,GACzB,eAAe,CAAC,cAAc,CAAC,GAC/B,cAAc;IAClB,iBAAiB,SAAS,MAAM,GAC5B,eAAe,CAAC,iBAAiB,CAAC,GAClC,iBAAiB;IACrB,iBAAiB,SAAS,MAAM,GAC5B,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C,sCAAsC,CAAC,QAAQ,EAAE,aAAa,CAAC,CA4BjE"}
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This code was AUTOGENERATED using the Codama library.
|
|
3
|
+
* Please DO NOT EDIT THIS FILE, instead use visitors
|
|
4
|
+
* to add features, then rerun Codama to update it.
|
|
5
|
+
*
|
|
6
|
+
* @see https://github.com/codama-idl/codama
|
|
7
|
+
*/
|
|
8
|
+
import { addDecoderSizePrefix, addEncoderSizePrefix, combineCodec, fixDecoderSize, fixEncoderSize, getBytesDecoder, getBytesEncoder, getStructDecoder, getStructEncoder, getU16Decoder, getU16Encoder, getU32Decoder, getU32Encoder, SOLANA_ERROR__PROGRAM_CLIENTS__INSUFFICIENT_ACCOUNT_METAS, SolanaError, } from "@solana/kit";
|
|
9
|
+
import { getAccountMetaFactory, } from "@solana/program-client-core";
|
|
10
|
+
import { EXECUTOR_QUOTER_PROGRAM_ADDRESS } from "../programs";
|
|
11
|
+
export const REQUEST_EXECUTION_QUOTE_DISCRIMINATOR = new Uint8Array([
|
|
12
|
+
3, 0, 0, 0, 0, 0, 0, 0,
|
|
13
|
+
]);
|
|
14
|
+
export function getRequestExecutionQuoteDiscriminatorBytes() {
|
|
15
|
+
return getBytesEncoder().encode(REQUEST_EXECUTION_QUOTE_DISCRIMINATOR);
|
|
16
|
+
}
|
|
17
|
+
export function getRequestExecutionQuoteInstructionDataEncoder() {
|
|
18
|
+
return getStructEncoder([
|
|
19
|
+
["dstChain", getU16Encoder()],
|
|
20
|
+
["dstAddr", fixEncoderSize(getBytesEncoder(), 32)],
|
|
21
|
+
["refundAddr", fixEncoderSize(getBytesEncoder(), 32)],
|
|
22
|
+
["requestBytes", addEncoderSizePrefix(getBytesEncoder(), getU32Encoder())],
|
|
23
|
+
[
|
|
24
|
+
"relayInstructions",
|
|
25
|
+
addEncoderSizePrefix(getBytesEncoder(), getU32Encoder()),
|
|
26
|
+
],
|
|
27
|
+
]);
|
|
28
|
+
}
|
|
29
|
+
export function getRequestExecutionQuoteInstructionDataDecoder() {
|
|
30
|
+
return getStructDecoder([
|
|
31
|
+
["dstChain", getU16Decoder()],
|
|
32
|
+
["dstAddr", fixDecoderSize(getBytesDecoder(), 32)],
|
|
33
|
+
["refundAddr", fixDecoderSize(getBytesDecoder(), 32)],
|
|
34
|
+
["requestBytes", addDecoderSizePrefix(getBytesDecoder(), getU32Decoder())],
|
|
35
|
+
[
|
|
36
|
+
"relayInstructions",
|
|
37
|
+
addDecoderSizePrefix(getBytesDecoder(), getU32Decoder()),
|
|
38
|
+
],
|
|
39
|
+
]);
|
|
40
|
+
}
|
|
41
|
+
export function getRequestExecutionQuoteInstructionDataCodec() {
|
|
42
|
+
return combineCodec(getRequestExecutionQuoteInstructionDataEncoder(), getRequestExecutionQuoteInstructionDataDecoder());
|
|
43
|
+
}
|
|
44
|
+
export function getRequestExecutionQuoteInstruction(input, config) {
|
|
45
|
+
// Program address.
|
|
46
|
+
const programAddress = config?.programAddress ?? EXECUTOR_QUOTER_PROGRAM_ADDRESS;
|
|
47
|
+
// Original accounts.
|
|
48
|
+
const originalAccounts = {
|
|
49
|
+
config: { value: input.config ?? null, isWritable: false },
|
|
50
|
+
chainInfo: { value: input.chainInfo ?? null, isWritable: false },
|
|
51
|
+
quoteBody: { value: input.quoteBody ?? null, isWritable: false },
|
|
52
|
+
eventCpi: { value: input.eventCpi ?? null, isWritable: false },
|
|
53
|
+
};
|
|
54
|
+
const accounts = originalAccounts;
|
|
55
|
+
// Original args.
|
|
56
|
+
const args = { ...input };
|
|
57
|
+
const getAccountMeta = getAccountMetaFactory(programAddress, "programId");
|
|
58
|
+
return Object.freeze({
|
|
59
|
+
accounts: [
|
|
60
|
+
getAccountMeta("config", accounts.config),
|
|
61
|
+
getAccountMeta("chainInfo", accounts.chainInfo),
|
|
62
|
+
getAccountMeta("quoteBody", accounts.quoteBody),
|
|
63
|
+
getAccountMeta("eventCpi", accounts.eventCpi),
|
|
64
|
+
],
|
|
65
|
+
data: getRequestExecutionQuoteInstructionDataEncoder().encode(args),
|
|
66
|
+
programAddress,
|
|
67
|
+
});
|
|
68
|
+
}
|
|
69
|
+
export function parseRequestExecutionQuoteInstruction(instruction) {
|
|
70
|
+
if (instruction.accounts.length < 4) {
|
|
71
|
+
throw new SolanaError(SOLANA_ERROR__PROGRAM_CLIENTS__INSUFFICIENT_ACCOUNT_METAS, {
|
|
72
|
+
actualAccountMetas: instruction.accounts.length,
|
|
73
|
+
expectedAccountMetas: 4,
|
|
74
|
+
});
|
|
75
|
+
}
|
|
76
|
+
let accountIndex = 0;
|
|
77
|
+
const getNextAccount = () => {
|
|
78
|
+
const accountMeta = instruction.accounts[accountIndex];
|
|
79
|
+
accountIndex += 1;
|
|
80
|
+
return accountMeta;
|
|
81
|
+
};
|
|
82
|
+
return {
|
|
83
|
+
programAddress: instruction.programAddress,
|
|
84
|
+
accounts: {
|
|
85
|
+
config: getNextAccount(),
|
|
86
|
+
chainInfo: getNextAccount(),
|
|
87
|
+
quoteBody: getNextAccount(),
|
|
88
|
+
eventCpi: getNextAccount(),
|
|
89
|
+
},
|
|
90
|
+
data: getRequestExecutionQuoteInstructionDataDecoder().decode(instruction.data),
|
|
91
|
+
};
|
|
92
|
+
}
|
|
93
|
+
//# sourceMappingURL=requestExecutionQuote.js.map
|