@across-protocol/contracts 6.0.0-beta.2 → 6.0.0-beta.3
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/README.md +138 -34
- package/contracts/chain-adapters/Solana_Adapter.sol +4 -7
- package/contracts/handlers/HyperliquidDepositHandler.sol +2 -2
- package/contracts/interfaces/SpokePoolPeripheryInterface.sol +16 -4
- package/contracts/libraries/HyperCoreLib.sol +113 -20
- package/contracts/libraries/PeripherySigningLib.sol +56 -0
- package/contracts/periphery/SpokePoolPeriphery.sol +58 -10
- package/dist/broadcast/deployed-addresses.json +19 -0
- package/dist/evm/artifacts/Constants.sol/Constants.json +1 -1
- package/dist/evm/artifacts/DeploymentUtils.sol/DeploymentUtils.json +1 -1
- package/dist/evm/artifacts/DstOFTHandler.sol/DstOFTHandler.json +1 -1
- package/dist/evm/artifacts/HubPoolTestBase.sol/MockAddressWhitelist.json +1 -1
- package/dist/evm/artifacts/HubPoolTestBase.sol/MockFinder.json +1 -1
- package/dist/evm/artifacts/HubPoolTestBase.sol/MockIdentifierWhitelist.json +1 -1
- package/dist/evm/artifacts/HubPoolTestBase.sol/MockLpTokenFactory.json +1 -1
- package/dist/evm/artifacts/HubPoolTestBase.sol/MockOptimisticOracle.json +1 -1
- package/dist/evm/artifacts/HubPoolTestBase.sol/MockStore.json +1 -1
- package/dist/evm/artifacts/HyperCoreFlowExecutor.sol/HyperCoreFlowExecutor.json +1 -1
- package/dist/evm/artifacts/HyperCoreLib.sol/HyperCoreLib.json +1 -1
- package/dist/evm/artifacts/HyperliquidDepositHandler.sol/HyperliquidDepositHandler.json +1 -1
- package/dist/evm/artifacts/PeripherySigningLib.sol/PeripherySigningLib.json +1 -1
- package/dist/evm/artifacts/Solana_Adapter.sol/Solana_Adapter.json +1 -1
- package/dist/evm/artifacts/SpokePoolPeriphery.sol/SpokePoolPeriphery.json +1 -1
- package/dist/evm/artifacts/SpokePoolPeriphery.sol/SwapProxy.json +1 -1
- package/dist/evm/artifacts/SponsoredCCTPDstPeriphery.sol/SponsoredCCTPDstPeriphery.json +1 -1
- package/dist/evm/artifacts/SponsoredCCTPSrcPeriphery.sol/SponsoredCCTPSrcPeriphery.json +1 -1
- package/dist/evm/artifacts/SponsoredOFTSrcPeriphery.sol/SponsoredOFTSrcPeriphery.json +1 -1
- package/dist/evm/artifacts/SwapHandler.sol/SwapHandler.json +1 -1
- package/dist/evm/artifacts/Tron_SpokePoolPeriphery.sol/Tron_SpokePoolPeriphery.json +1 -1
- package/dist/evm/artifacts/Tron_SpokePoolPeriphery.sol/Tron_SwapProxy.json +1 -1
- package/dist/src/consts.js +1 -0
- package/dist/src/svm/assets/idl/sponsored_cctp_src_periphery.json +41 -24
- package/dist/src/svm/assets/idl/svm_spoke.json +1001 -2171
- package/dist/src/svm/assets/sponsored_cctp_src_periphery.d.ts +41 -24
- package/dist/src/svm/assets/svm_spoke.d.ts +996 -2166
- package/dist/src/svm/assets/token_messenger_minter_v2.d.ts +18 -18
- package/dist/src/svm/clients/SponsoredCctpSrcPeriphery/accounts/index.d.ts +0 -1
- package/dist/src/svm/clients/SponsoredCctpSrcPeriphery/accounts/index.js +0 -1
- package/dist/src/svm/clients/SponsoredCctpSrcPeriphery/errors/sponsoredCctpSrcPeriphery.d.ts +24 -12
- package/dist/src/svm/clients/SponsoredCctpSrcPeriphery/errors/sponsoredCctpSrcPeriphery.js +30 -12
- package/dist/src/svm/clients/SponsoredCctpSrcPeriphery/programs/sponsoredCctpSrcPeriphery.d.ts +4 -5
- package/dist/src/svm/clients/SponsoredCctpSrcPeriphery/programs/sponsoredCctpSrcPeriphery.js +4 -8
- package/dist/src/svm/clients/SponsoredCctpSrcPeriphery/types/index.d.ts +1 -0
- package/dist/src/svm/clients/SponsoredCctpSrcPeriphery/types/index.js +1 -0
- package/dist/src/svm/clients/SponsoredCctpSrcPeriphery/types/messageSent.d.ts +21 -0
- package/dist/src/svm/clients/SponsoredCctpSrcPeriphery/types/messageSent.js +30 -0
- package/dist/src/svm/clients/SvmSpoke/accounts/fillStatusAccount.d.ts +2 -2
- package/dist/src/svm/clients/SvmSpoke/accounts/fillStatusAccount.js +2 -2
- package/dist/src/svm/clients/SvmSpoke/accounts/index.d.ts +0 -3
- package/dist/src/svm/clients/SvmSpoke/accounts/index.js +0 -3
- package/dist/src/svm/clients/SvmSpoke/errors/svmSpoke.d.ts +94 -22
- package/dist/src/svm/clients/SvmSpoke/errors/svmSpoke.js +133 -24
- package/dist/src/svm/clients/SvmSpoke/instructions/adapterExecuteAcrossV5.d.ts +75 -0
- package/dist/src/svm/clients/SvmSpoke/instructions/adapterExecuteAcrossV5.js +144 -0
- package/dist/src/svm/clients/SvmSpoke/instructions/closeFillPda.d.ts +16 -8
- package/dist/src/svm/clients/SvmSpoke/instructions/closeFillPda.js +3 -3
- package/dist/src/svm/clients/SvmSpoke/instructions/index.d.ts +2 -7
- package/dist/src/svm/clients/SvmSpoke/instructions/index.js +2 -7
- package/dist/src/svm/clients/SvmSpoke/instructions/withdrawV5FillPayer.d.ts +58 -0
- package/dist/src/svm/clients/SvmSpoke/instructions/withdrawV5FillPayer.js +134 -0
- package/dist/src/svm/clients/SvmSpoke/programs/svmSpoke.d.ts +29 -47
- package/dist/src/svm/clients/SvmSpoke/programs/svmSpoke.js +29 -61
- package/dist/src/svm/clients/SvmSpoke/types/acrossDepositInput.d.ts +25 -0
- package/dist/src/svm/clients/SvmSpoke/types/acrossDepositInput.js +33 -0
- package/dist/src/svm/clients/SvmSpoke/types/acrossDepositJitParams.d.ts +18 -0
- package/dist/src/svm/clients/SvmSpoke/types/acrossDepositJitParams.js +30 -0
- package/dist/src/svm/clients/SvmSpoke/types/acrossDepositParams.d.ts +43 -0
- package/dist/src/svm/clients/SvmSpoke/types/acrossDepositParams.js +48 -0
- package/dist/src/svm/clients/SvmSpoke/types/index.d.ts +9 -1
- package/dist/src/svm/clients/SvmSpoke/types/index.js +9 -1
- package/dist/src/svm/clients/SvmSpoke/types/v5AdapterInput.d.ts +39 -0
- package/dist/src/svm/clients/SvmSpoke/types/v5AdapterInput.js +59 -0
- package/dist/src/svm/clients/SvmSpoke/types/v5DepositModificationRules.d.ts +17 -0
- package/dist/src/svm/clients/SvmSpoke/types/v5DepositModificationRules.js +30 -0
- package/dist/src/svm/clients/SvmSpoke/types/v5FillFloatWithdrawn.d.ts +19 -0
- package/dist/src/svm/clients/SvmSpoke/types/v5FillFloatWithdrawn.js +28 -0
- package/dist/src/svm/clients/SvmSpoke/types/v5FillInput.d.ts +25 -0
- package/dist/src/svm/clients/SvmSpoke/types/v5FillInput.js +30 -0
- package/dist/src/svm/clients/SvmSpoke/types/v5FillJit.d.ts +22 -0
- package/dist/src/svm/clients/SvmSpoke/types/{slowFill.js → v5FillJit.js} +11 -11
- package/dist/src/svm/clients/SvmSpoke/types/v5InputAmountMode.d.ts +29 -0
- package/dist/src/svm/clients/SvmSpoke/types/v5InputAmountMode.js +38 -0
- package/dist/src/svm/web3-v1/cctpV2Helpers.d.ts +83 -97
- package/dist/src/svm/web3-v1/cctpV2Helpers.js +1 -1
- package/dist/src/svm/web3-v1/coders.d.ts +1 -1
- package/dist/src/svm/web3-v1/coders.js +4 -4
- package/dist/src/svm/web3-v1/conversionUtils.d.ts +1 -1
- package/dist/src/svm/web3-v1/conversionUtils.js +3 -3
- package/dist/src/svm/web3-v1/helpers.d.ts +1 -114
- package/dist/src/svm/web3-v1/helpers.js +1 -179
- package/dist/src/svm/web3-v1/instructionParamsUtils.d.ts +11 -26
- package/dist/src/svm/web3-v1/instructionParamsUtils.js +5 -90
- package/dist/src/svm/web3-v1/programConnectors.d.ts +1 -1
- package/dist/src/svm/web3-v1/programConnectors.js +2 -2
- package/dist/src/svm/web3-v1/relayHashUtils.d.ts +2 -6
- package/dist/src/svm/web3-v1/relayHashUtils.js +5 -66
- package/dist/src/svm/web3-v1/solanaProgramUtils.d.ts +1 -1
- package/dist/src/svm/web3-v1/solanaProgramUtils.js +7 -7
- package/dist/src/svm/web3-v1/transactionUtils.js +3 -3
- package/dist/src/svm/web3-v2/solanaProgramUtils.d.ts +1 -1
- package/dist/src/svm/web3-v2/solanaProgramUtils.js +4 -4
- package/dist/src/types/svm.d.ts +1 -46
- package/package.json +17 -6
- package/dist/src/svm/clients/SponsoredCctpSrcPeriphery/accounts/messageSent.d.ts +0 -30
- package/dist/src/svm/clients/SponsoredCctpSrcPeriphery/accounts/messageSent.js +0 -66
- package/dist/src/svm/clients/SvmSpoke/accounts/executeSlowRelayLeafParams.d.ts +0 -31
- package/dist/src/svm/clients/SvmSpoke/accounts/executeSlowRelayLeafParams.js +0 -70
- package/dist/src/svm/clients/SvmSpoke/accounts/fillRelayParams.d.ts +0 -31
- package/dist/src/svm/clients/SvmSpoke/accounts/fillRelayParams.js +0 -67
- package/dist/src/svm/clients/SvmSpoke/accounts/requestSlowFillParams.d.ts +0 -27
- package/dist/src/svm/clients/SvmSpoke/accounts/requestSlowFillParams.js +0 -66
- package/dist/src/svm/clients/SvmSpoke/instructions/deposit.d.ts +0 -131
- package/dist/src/svm/clients/SvmSpoke/instructions/deposit.js +0 -241
- package/dist/src/svm/clients/SvmSpoke/instructions/depositNow.d.ts +0 -127
- package/dist/src/svm/clients/SvmSpoke/instructions/depositNow.js +0 -239
- package/dist/src/svm/clients/SvmSpoke/instructions/executeSlowRelayLeaf.d.ts +0 -104
- package/dist/src/svm/clients/SvmSpoke/instructions/executeSlowRelayLeaf.js +0 -259
- package/dist/src/svm/clients/SvmSpoke/instructions/fillRelay.d.ts +0 -108
- package/dist/src/svm/clients/SvmSpoke/instructions/fillRelay.js +0 -265
- package/dist/src/svm/clients/SvmSpoke/instructions/getUnsafeDepositId.d.ts +0 -39
- package/dist/src/svm/clients/SvmSpoke/instructions/getUnsafeDepositId.js +0 -63
- package/dist/src/svm/clients/SvmSpoke/instructions/requestSlowFill.d.ts +0 -76
- package/dist/src/svm/clients/SvmSpoke/instructions/requestSlowFill.js +0 -187
- package/dist/src/svm/clients/SvmSpoke/instructions/unsafeDeposit.d.ts +0 -135
- package/dist/src/svm/clients/SvmSpoke/instructions/unsafeDeposit.js +0 -243
- package/dist/src/svm/clients/SvmSpoke/types/slowFill.d.ts +0 -22
- package/dist/target/types/svm_spoke.d.ts +0 -5106
- package/dist/target/types/svm_spoke.js +0 -2
|
@@ -0,0 +1,134 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* This code was AUTOGENERATED using the codama library.
|
|
4
|
+
* Please DO NOT EDIT THIS FILE, instead use visitors
|
|
5
|
+
* to add features, then rerun codama to update it.
|
|
6
|
+
*
|
|
7
|
+
* @see https://github.com/codama-idl/codama
|
|
8
|
+
*/
|
|
9
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10
|
+
exports.WITHDRAW_V5_FILL_PAYER_DISCRIMINATOR = void 0;
|
|
11
|
+
exports.getWithdrawV5FillPayerDiscriminatorBytes = getWithdrawV5FillPayerDiscriminatorBytes;
|
|
12
|
+
exports.getWithdrawV5FillPayerInstructionDataEncoder = getWithdrawV5FillPayerInstructionDataEncoder;
|
|
13
|
+
exports.getWithdrawV5FillPayerInstructionDataDecoder = getWithdrawV5FillPayerInstructionDataDecoder;
|
|
14
|
+
exports.getWithdrawV5FillPayerInstructionDataCodec = getWithdrawV5FillPayerInstructionDataCodec;
|
|
15
|
+
exports.getWithdrawV5FillPayerInstructionAsync = getWithdrawV5FillPayerInstructionAsync;
|
|
16
|
+
exports.getWithdrawV5FillPayerInstruction = getWithdrawV5FillPayerInstruction;
|
|
17
|
+
exports.parseWithdrawV5FillPayerInstruction = parseWithdrawV5FillPayerInstruction;
|
|
18
|
+
const kit_1 = require("@solana/kit");
|
|
19
|
+
const programs_1 = require("../programs");
|
|
20
|
+
const shared_1 = require("../shared");
|
|
21
|
+
exports.WITHDRAW_V5_FILL_PAYER_DISCRIMINATOR = new Uint8Array([
|
|
22
|
+
160, 125, 152, 107, 21, 37, 181, 144,
|
|
23
|
+
]);
|
|
24
|
+
function getWithdrawV5FillPayerDiscriminatorBytes() {
|
|
25
|
+
return (0, kit_1.fixEncoderSize)((0, kit_1.getBytesEncoder)(), 8).encode(exports.WITHDRAW_V5_FILL_PAYER_DISCRIMINATOR);
|
|
26
|
+
}
|
|
27
|
+
function getWithdrawV5FillPayerInstructionDataEncoder() {
|
|
28
|
+
return (0, kit_1.transformEncoder)((0, kit_1.getStructEncoder)([
|
|
29
|
+
['discriminator', (0, kit_1.fixEncoderSize)((0, kit_1.getBytesEncoder)(), 8)],
|
|
30
|
+
['amount', (0, kit_1.getU64Encoder)()],
|
|
31
|
+
]), (value) => ({
|
|
32
|
+
...value,
|
|
33
|
+
discriminator: exports.WITHDRAW_V5_FILL_PAYER_DISCRIMINATOR,
|
|
34
|
+
}));
|
|
35
|
+
}
|
|
36
|
+
function getWithdrawV5FillPayerInstructionDataDecoder() {
|
|
37
|
+
return (0, kit_1.getStructDecoder)([
|
|
38
|
+
['discriminator', (0, kit_1.fixDecoderSize)((0, kit_1.getBytesDecoder)(), 8)],
|
|
39
|
+
['amount', (0, kit_1.getU64Decoder)()],
|
|
40
|
+
]);
|
|
41
|
+
}
|
|
42
|
+
function getWithdrawV5FillPayerInstructionDataCodec() {
|
|
43
|
+
return (0, kit_1.combineCodec)(getWithdrawV5FillPayerInstructionDataEncoder(), getWithdrawV5FillPayerInstructionDataDecoder());
|
|
44
|
+
}
|
|
45
|
+
async function getWithdrawV5FillPayerInstructionAsync(input, config) {
|
|
46
|
+
// Program address.
|
|
47
|
+
const programAddress = config?.programAddress ?? programs_1.SVM_SPOKE_PROGRAM_ADDRESS;
|
|
48
|
+
// Original accounts.
|
|
49
|
+
const originalAccounts = {
|
|
50
|
+
submitter: { value: input.submitter ?? null, isWritable: true },
|
|
51
|
+
payer: { value: input.payer ?? null, isWritable: true },
|
|
52
|
+
systemProgram: { value: input.systemProgram ?? null, isWritable: false },
|
|
53
|
+
};
|
|
54
|
+
const accounts = originalAccounts;
|
|
55
|
+
// Original args.
|
|
56
|
+
const args = { ...input };
|
|
57
|
+
// Resolve default values.
|
|
58
|
+
if (!accounts.payer.value) {
|
|
59
|
+
accounts.payer.value = await (0, kit_1.getProgramDerivedAddress)({
|
|
60
|
+
programAddress,
|
|
61
|
+
seeds: [
|
|
62
|
+
(0, kit_1.getBytesEncoder)().encode(new Uint8Array([
|
|
63
|
+
118, 53, 95, 102, 105, 108, 108, 95, 112, 97, 121, 101, 114,
|
|
64
|
+
])),
|
|
65
|
+
(0, kit_1.getAddressEncoder)().encode((0, shared_1.expectAddress)(accounts.submitter.value)),
|
|
66
|
+
],
|
|
67
|
+
});
|
|
68
|
+
}
|
|
69
|
+
if (!accounts.systemProgram.value) {
|
|
70
|
+
accounts.systemProgram.value =
|
|
71
|
+
'11111111111111111111111111111111';
|
|
72
|
+
}
|
|
73
|
+
const getAccountMeta = (0, shared_1.getAccountMetaFactory)(programAddress, 'programId');
|
|
74
|
+
const instruction = {
|
|
75
|
+
accounts: [
|
|
76
|
+
getAccountMeta(accounts.submitter),
|
|
77
|
+
getAccountMeta(accounts.payer),
|
|
78
|
+
getAccountMeta(accounts.systemProgram),
|
|
79
|
+
],
|
|
80
|
+
programAddress,
|
|
81
|
+
data: getWithdrawV5FillPayerInstructionDataEncoder().encode(args),
|
|
82
|
+
};
|
|
83
|
+
return instruction;
|
|
84
|
+
}
|
|
85
|
+
function getWithdrawV5FillPayerInstruction(input, config) {
|
|
86
|
+
// Program address.
|
|
87
|
+
const programAddress = config?.programAddress ?? programs_1.SVM_SPOKE_PROGRAM_ADDRESS;
|
|
88
|
+
// Original accounts.
|
|
89
|
+
const originalAccounts = {
|
|
90
|
+
submitter: { value: input.submitter ?? null, isWritable: true },
|
|
91
|
+
payer: { value: input.payer ?? null, isWritable: true },
|
|
92
|
+
systemProgram: { value: input.systemProgram ?? null, isWritable: false },
|
|
93
|
+
};
|
|
94
|
+
const accounts = originalAccounts;
|
|
95
|
+
// Original args.
|
|
96
|
+
const args = { ...input };
|
|
97
|
+
// Resolve default values.
|
|
98
|
+
if (!accounts.systemProgram.value) {
|
|
99
|
+
accounts.systemProgram.value =
|
|
100
|
+
'11111111111111111111111111111111';
|
|
101
|
+
}
|
|
102
|
+
const getAccountMeta = (0, shared_1.getAccountMetaFactory)(programAddress, 'programId');
|
|
103
|
+
const instruction = {
|
|
104
|
+
accounts: [
|
|
105
|
+
getAccountMeta(accounts.submitter),
|
|
106
|
+
getAccountMeta(accounts.payer),
|
|
107
|
+
getAccountMeta(accounts.systemProgram),
|
|
108
|
+
],
|
|
109
|
+
programAddress,
|
|
110
|
+
data: getWithdrawV5FillPayerInstructionDataEncoder().encode(args),
|
|
111
|
+
};
|
|
112
|
+
return instruction;
|
|
113
|
+
}
|
|
114
|
+
function parseWithdrawV5FillPayerInstruction(instruction) {
|
|
115
|
+
if (instruction.accounts.length < 3) {
|
|
116
|
+
// TODO: Coded error.
|
|
117
|
+
throw new Error('Not enough accounts');
|
|
118
|
+
}
|
|
119
|
+
let accountIndex = 0;
|
|
120
|
+
const getNextAccount = () => {
|
|
121
|
+
const accountMeta = instruction.accounts[accountIndex];
|
|
122
|
+
accountIndex += 1;
|
|
123
|
+
return accountMeta;
|
|
124
|
+
};
|
|
125
|
+
return {
|
|
126
|
+
programAddress: instruction.programAddress,
|
|
127
|
+
accounts: {
|
|
128
|
+
submitter: getNextAccount(),
|
|
129
|
+
payer: getNextAccount(),
|
|
130
|
+
systemProgram: getNextAccount(),
|
|
131
|
+
},
|
|
132
|
+
data: getWithdrawV5FillPayerInstructionDataDecoder().decode(instruction.data),
|
|
133
|
+
};
|
|
134
|
+
}
|
|
@@ -6,53 +6,47 @@
|
|
|
6
6
|
* @see https://github.com/codama-idl/codama
|
|
7
7
|
*/
|
|
8
8
|
import { type Address, type ReadonlyUint8Array } from '@solana/kit';
|
|
9
|
-
import { type ParsedClaimRelayerRefundInstruction, type ParsedCloseClaimAccountInstruction, type ParsedCloseFillPdaInstruction, type ParsedCloseInstructionParamsInstruction, type ParsedCreateTokenAccountsInstruction, type
|
|
9
|
+
import { type ParsedAdapterExecuteAcrossV5Instruction, type ParsedClaimRelayerRefundInstruction, type ParsedCloseClaimAccountInstruction, type ParsedCloseFillPdaInstruction, type ParsedCloseInstructionParamsInstruction, type ParsedCreateTokenAccountsInstruction, type ParsedEmergencyDeleteRootBundleInstruction, type ParsedExecuteRelayerRefundLeafDeferredInstruction, type ParsedExecuteRelayerRefundLeafInstruction, type ParsedHandleReceiveFinalizedMessageInstruction, type ParsedInitializeClaimAccountInstruction, type ParsedInitializeInstruction, type ParsedInitializeInstructionParamsInstruction, type ParsedPauseDepositsInstruction, type ParsedPauseFillsInstruction, type ParsedRelayRootBundleInstruction, type ParsedSetCrossDomainAdminInstruction, type ParsedSetCurrentTimeInstruction, type ParsedTransferOwnershipInstruction, type ParsedWithdrawV5FillPayerInstruction, type ParsedWriteInstructionParamsFragmentInstruction } from '../instructions';
|
|
10
10
|
export declare const SVM_SPOKE_PROGRAM_ADDRESS: Address<"DLv3NggMiSaef97YCkew5xKUHDh13tVGZ7tydt3ZeAru">;
|
|
11
11
|
export declare enum SvmSpokeAccount {
|
|
12
12
|
ClaimAccount = 0,
|
|
13
13
|
ExecuteRelayerRefundLeafParams = 1,
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
RequestSlowFillParams = 5,
|
|
18
|
-
RootBundle = 6,
|
|
19
|
-
State = 7
|
|
14
|
+
FillStatusAccount = 2,
|
|
15
|
+
RootBundle = 3,
|
|
16
|
+
State = 4
|
|
20
17
|
}
|
|
21
18
|
export declare function identifySvmSpokeAccount(account: {
|
|
22
19
|
data: ReadonlyUint8Array;
|
|
23
20
|
} | ReadonlyUint8Array): SvmSpokeAccount;
|
|
24
21
|
export declare enum SvmSpokeInstruction {
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
SetCrossDomainAdmin = 21,
|
|
47
|
-
SetCurrentTime = 22,
|
|
48
|
-
TransferOwnership = 23,
|
|
49
|
-
UnsafeDeposit = 24,
|
|
50
|
-
WriteInstructionParamsFragment = 25
|
|
22
|
+
AdapterExecuteAcrossV5 = 0,
|
|
23
|
+
ClaimRelayerRefund = 1,
|
|
24
|
+
CloseClaimAccount = 2,
|
|
25
|
+
CloseFillPda = 3,
|
|
26
|
+
CloseInstructionParams = 4,
|
|
27
|
+
CreateTokenAccounts = 5,
|
|
28
|
+
EmergencyDeleteRootBundle = 6,
|
|
29
|
+
ExecuteRelayerRefundLeaf = 7,
|
|
30
|
+
ExecuteRelayerRefundLeafDeferred = 8,
|
|
31
|
+
HandleReceiveFinalizedMessage = 9,
|
|
32
|
+
Initialize = 10,
|
|
33
|
+
InitializeClaimAccount = 11,
|
|
34
|
+
InitializeInstructionParams = 12,
|
|
35
|
+
PauseDeposits = 13,
|
|
36
|
+
PauseFills = 14,
|
|
37
|
+
RelayRootBundle = 15,
|
|
38
|
+
SetCrossDomainAdmin = 16,
|
|
39
|
+
SetCurrentTime = 17,
|
|
40
|
+
TransferOwnership = 18,
|
|
41
|
+
WithdrawV5FillPayer = 19,
|
|
42
|
+
WriteInstructionParamsFragment = 20
|
|
51
43
|
}
|
|
52
44
|
export declare function identifySvmSpokeInstruction(instruction: {
|
|
53
45
|
data: ReadonlyUint8Array;
|
|
54
46
|
} | ReadonlyUint8Array): SvmSpokeInstruction;
|
|
55
47
|
export type ParsedSvmSpokeInstruction<TProgram extends string = 'DLv3NggMiSaef97YCkew5xKUHDh13tVGZ7tydt3ZeAru'> = ({
|
|
48
|
+
instructionType: SvmSpokeInstruction.AdapterExecuteAcrossV5;
|
|
49
|
+
} & ParsedAdapterExecuteAcrossV5Instruction<TProgram>) | ({
|
|
56
50
|
instructionType: SvmSpokeInstruction.ClaimRelayerRefund;
|
|
57
51
|
} & ParsedClaimRelayerRefundInstruction<TProgram>) | ({
|
|
58
52
|
instructionType: SvmSpokeInstruction.CloseClaimAccount;
|
|
@@ -63,22 +57,12 @@ export type ParsedSvmSpokeInstruction<TProgram extends string = 'DLv3NggMiSaef97
|
|
|
63
57
|
} & ParsedCloseInstructionParamsInstruction<TProgram>) | ({
|
|
64
58
|
instructionType: SvmSpokeInstruction.CreateTokenAccounts;
|
|
65
59
|
} & ParsedCreateTokenAccountsInstruction<TProgram>) | ({
|
|
66
|
-
instructionType: SvmSpokeInstruction.Deposit;
|
|
67
|
-
} & ParsedDepositInstruction<TProgram>) | ({
|
|
68
|
-
instructionType: SvmSpokeInstruction.DepositNow;
|
|
69
|
-
} & ParsedDepositNowInstruction<TProgram>) | ({
|
|
70
60
|
instructionType: SvmSpokeInstruction.EmergencyDeleteRootBundle;
|
|
71
61
|
} & ParsedEmergencyDeleteRootBundleInstruction<TProgram>) | ({
|
|
72
62
|
instructionType: SvmSpokeInstruction.ExecuteRelayerRefundLeaf;
|
|
73
63
|
} & ParsedExecuteRelayerRefundLeafInstruction<TProgram>) | ({
|
|
74
64
|
instructionType: SvmSpokeInstruction.ExecuteRelayerRefundLeafDeferred;
|
|
75
65
|
} & ParsedExecuteRelayerRefundLeafDeferredInstruction<TProgram>) | ({
|
|
76
|
-
instructionType: SvmSpokeInstruction.ExecuteSlowRelayLeaf;
|
|
77
|
-
} & ParsedExecuteSlowRelayLeafInstruction<TProgram>) | ({
|
|
78
|
-
instructionType: SvmSpokeInstruction.FillRelay;
|
|
79
|
-
} & ParsedFillRelayInstruction<TProgram>) | ({
|
|
80
|
-
instructionType: SvmSpokeInstruction.GetUnsafeDepositId;
|
|
81
|
-
} & ParsedGetUnsafeDepositIdInstruction<TProgram>) | ({
|
|
82
66
|
instructionType: SvmSpokeInstruction.HandleReceiveFinalizedMessage;
|
|
83
67
|
} & ParsedHandleReceiveFinalizedMessageInstruction<TProgram>) | ({
|
|
84
68
|
instructionType: SvmSpokeInstruction.Initialize;
|
|
@@ -93,15 +77,13 @@ export type ParsedSvmSpokeInstruction<TProgram extends string = 'DLv3NggMiSaef97
|
|
|
93
77
|
} & ParsedPauseFillsInstruction<TProgram>) | ({
|
|
94
78
|
instructionType: SvmSpokeInstruction.RelayRootBundle;
|
|
95
79
|
} & ParsedRelayRootBundleInstruction<TProgram>) | ({
|
|
96
|
-
instructionType: SvmSpokeInstruction.RequestSlowFill;
|
|
97
|
-
} & ParsedRequestSlowFillInstruction<TProgram>) | ({
|
|
98
80
|
instructionType: SvmSpokeInstruction.SetCrossDomainAdmin;
|
|
99
81
|
} & ParsedSetCrossDomainAdminInstruction<TProgram>) | ({
|
|
100
82
|
instructionType: SvmSpokeInstruction.SetCurrentTime;
|
|
101
83
|
} & ParsedSetCurrentTimeInstruction<TProgram>) | ({
|
|
102
84
|
instructionType: SvmSpokeInstruction.TransferOwnership;
|
|
103
85
|
} & ParsedTransferOwnershipInstruction<TProgram>) | ({
|
|
104
|
-
instructionType: SvmSpokeInstruction.
|
|
105
|
-
} &
|
|
86
|
+
instructionType: SvmSpokeInstruction.WithdrawV5FillPayer;
|
|
87
|
+
} & ParsedWithdrawV5FillPayerInstruction<TProgram>) | ({
|
|
106
88
|
instructionType: SvmSpokeInstruction.WriteInstructionParamsFragment;
|
|
107
89
|
} & ParsedWriteInstructionParamsFragmentInstruction<TProgram>);
|
|
@@ -16,12 +16,9 @@ var SvmSpokeAccount;
|
|
|
16
16
|
(function (SvmSpokeAccount) {
|
|
17
17
|
SvmSpokeAccount[SvmSpokeAccount["ClaimAccount"] = 0] = "ClaimAccount";
|
|
18
18
|
SvmSpokeAccount[SvmSpokeAccount["ExecuteRelayerRefundLeafParams"] = 1] = "ExecuteRelayerRefundLeafParams";
|
|
19
|
-
SvmSpokeAccount[SvmSpokeAccount["
|
|
20
|
-
SvmSpokeAccount[SvmSpokeAccount["
|
|
21
|
-
SvmSpokeAccount[SvmSpokeAccount["
|
|
22
|
-
SvmSpokeAccount[SvmSpokeAccount["RequestSlowFillParams"] = 5] = "RequestSlowFillParams";
|
|
23
|
-
SvmSpokeAccount[SvmSpokeAccount["RootBundle"] = 6] = "RootBundle";
|
|
24
|
-
SvmSpokeAccount[SvmSpokeAccount["State"] = 7] = "State";
|
|
19
|
+
SvmSpokeAccount[SvmSpokeAccount["FillStatusAccount"] = 2] = "FillStatusAccount";
|
|
20
|
+
SvmSpokeAccount[SvmSpokeAccount["RootBundle"] = 3] = "RootBundle";
|
|
21
|
+
SvmSpokeAccount[SvmSpokeAccount["State"] = 4] = "State";
|
|
25
22
|
})(SvmSpokeAccount || (exports.SvmSpokeAccount = SvmSpokeAccount = {}));
|
|
26
23
|
function identifySvmSpokeAccount(account) {
|
|
27
24
|
const data = 'data' in account ? account.data : account;
|
|
@@ -31,18 +28,9 @@ function identifySvmSpokeAccount(account) {
|
|
|
31
28
|
if ((0, kit_1.containsBytes)(data, (0, kit_1.fixEncoderSize)((0, kit_1.getBytesEncoder)(), 8).encode(new Uint8Array([192, 59, 93, 9, 171, 77, 28, 250])), 0)) {
|
|
32
29
|
return SvmSpokeAccount.ExecuteRelayerRefundLeafParams;
|
|
33
30
|
}
|
|
34
|
-
if ((0, kit_1.containsBytes)(data, (0, kit_1.fixEncoderSize)((0, kit_1.getBytesEncoder)(), 8).encode(new Uint8Array([135, 208, 119, 251, 14, 222, 66, 155])), 0)) {
|
|
35
|
-
return SvmSpokeAccount.ExecuteSlowRelayLeafParams;
|
|
36
|
-
}
|
|
37
|
-
if ((0, kit_1.containsBytes)(data, (0, kit_1.fixEncoderSize)((0, kit_1.getBytesEncoder)(), 8).encode(new Uint8Array([50, 243, 51, 185, 89, 60, 43, 202])), 0)) {
|
|
38
|
-
return SvmSpokeAccount.FillRelayParams;
|
|
39
|
-
}
|
|
40
31
|
if ((0, kit_1.containsBytes)(data, (0, kit_1.fixEncoderSize)((0, kit_1.getBytesEncoder)(), 8).encode(new Uint8Array([105, 89, 88, 35, 24, 147, 178, 137])), 0)) {
|
|
41
32
|
return SvmSpokeAccount.FillStatusAccount;
|
|
42
33
|
}
|
|
43
|
-
if ((0, kit_1.containsBytes)(data, (0, kit_1.fixEncoderSize)((0, kit_1.getBytesEncoder)(), 8).encode(new Uint8Array([5, 54, 214, 89, 197, 37, 118, 28])), 0)) {
|
|
44
|
-
return SvmSpokeAccount.RequestSlowFillParams;
|
|
45
|
-
}
|
|
46
34
|
if ((0, kit_1.containsBytes)(data, (0, kit_1.fixEncoderSize)((0, kit_1.getBytesEncoder)(), 8).encode(new Uint8Array([66, 221, 214, 231, 25, 222, 184, 219])), 0)) {
|
|
47
35
|
return SvmSpokeAccount.RootBundle;
|
|
48
36
|
}
|
|
@@ -53,35 +41,33 @@ function identifySvmSpokeAccount(account) {
|
|
|
53
41
|
}
|
|
54
42
|
var SvmSpokeInstruction;
|
|
55
43
|
(function (SvmSpokeInstruction) {
|
|
56
|
-
SvmSpokeInstruction[SvmSpokeInstruction["
|
|
57
|
-
SvmSpokeInstruction[SvmSpokeInstruction["
|
|
58
|
-
SvmSpokeInstruction[SvmSpokeInstruction["
|
|
59
|
-
SvmSpokeInstruction[SvmSpokeInstruction["
|
|
60
|
-
SvmSpokeInstruction[SvmSpokeInstruction["
|
|
61
|
-
SvmSpokeInstruction[SvmSpokeInstruction["
|
|
62
|
-
SvmSpokeInstruction[SvmSpokeInstruction["
|
|
63
|
-
SvmSpokeInstruction[SvmSpokeInstruction["
|
|
64
|
-
SvmSpokeInstruction[SvmSpokeInstruction["
|
|
65
|
-
SvmSpokeInstruction[SvmSpokeInstruction["
|
|
66
|
-
SvmSpokeInstruction[SvmSpokeInstruction["
|
|
67
|
-
SvmSpokeInstruction[SvmSpokeInstruction["
|
|
68
|
-
SvmSpokeInstruction[SvmSpokeInstruction["
|
|
69
|
-
SvmSpokeInstruction[SvmSpokeInstruction["
|
|
70
|
-
SvmSpokeInstruction[SvmSpokeInstruction["
|
|
71
|
-
SvmSpokeInstruction[SvmSpokeInstruction["
|
|
72
|
-
SvmSpokeInstruction[SvmSpokeInstruction["
|
|
73
|
-
SvmSpokeInstruction[SvmSpokeInstruction["
|
|
74
|
-
SvmSpokeInstruction[SvmSpokeInstruction["
|
|
75
|
-
SvmSpokeInstruction[SvmSpokeInstruction["
|
|
76
|
-
SvmSpokeInstruction[SvmSpokeInstruction["
|
|
77
|
-
SvmSpokeInstruction[SvmSpokeInstruction["SetCrossDomainAdmin"] = 21] = "SetCrossDomainAdmin";
|
|
78
|
-
SvmSpokeInstruction[SvmSpokeInstruction["SetCurrentTime"] = 22] = "SetCurrentTime";
|
|
79
|
-
SvmSpokeInstruction[SvmSpokeInstruction["TransferOwnership"] = 23] = "TransferOwnership";
|
|
80
|
-
SvmSpokeInstruction[SvmSpokeInstruction["UnsafeDeposit"] = 24] = "UnsafeDeposit";
|
|
81
|
-
SvmSpokeInstruction[SvmSpokeInstruction["WriteInstructionParamsFragment"] = 25] = "WriteInstructionParamsFragment";
|
|
44
|
+
SvmSpokeInstruction[SvmSpokeInstruction["AdapterExecuteAcrossV5"] = 0] = "AdapterExecuteAcrossV5";
|
|
45
|
+
SvmSpokeInstruction[SvmSpokeInstruction["ClaimRelayerRefund"] = 1] = "ClaimRelayerRefund";
|
|
46
|
+
SvmSpokeInstruction[SvmSpokeInstruction["CloseClaimAccount"] = 2] = "CloseClaimAccount";
|
|
47
|
+
SvmSpokeInstruction[SvmSpokeInstruction["CloseFillPda"] = 3] = "CloseFillPda";
|
|
48
|
+
SvmSpokeInstruction[SvmSpokeInstruction["CloseInstructionParams"] = 4] = "CloseInstructionParams";
|
|
49
|
+
SvmSpokeInstruction[SvmSpokeInstruction["CreateTokenAccounts"] = 5] = "CreateTokenAccounts";
|
|
50
|
+
SvmSpokeInstruction[SvmSpokeInstruction["EmergencyDeleteRootBundle"] = 6] = "EmergencyDeleteRootBundle";
|
|
51
|
+
SvmSpokeInstruction[SvmSpokeInstruction["ExecuteRelayerRefundLeaf"] = 7] = "ExecuteRelayerRefundLeaf";
|
|
52
|
+
SvmSpokeInstruction[SvmSpokeInstruction["ExecuteRelayerRefundLeafDeferred"] = 8] = "ExecuteRelayerRefundLeafDeferred";
|
|
53
|
+
SvmSpokeInstruction[SvmSpokeInstruction["HandleReceiveFinalizedMessage"] = 9] = "HandleReceiveFinalizedMessage";
|
|
54
|
+
SvmSpokeInstruction[SvmSpokeInstruction["Initialize"] = 10] = "Initialize";
|
|
55
|
+
SvmSpokeInstruction[SvmSpokeInstruction["InitializeClaimAccount"] = 11] = "InitializeClaimAccount";
|
|
56
|
+
SvmSpokeInstruction[SvmSpokeInstruction["InitializeInstructionParams"] = 12] = "InitializeInstructionParams";
|
|
57
|
+
SvmSpokeInstruction[SvmSpokeInstruction["PauseDeposits"] = 13] = "PauseDeposits";
|
|
58
|
+
SvmSpokeInstruction[SvmSpokeInstruction["PauseFills"] = 14] = "PauseFills";
|
|
59
|
+
SvmSpokeInstruction[SvmSpokeInstruction["RelayRootBundle"] = 15] = "RelayRootBundle";
|
|
60
|
+
SvmSpokeInstruction[SvmSpokeInstruction["SetCrossDomainAdmin"] = 16] = "SetCrossDomainAdmin";
|
|
61
|
+
SvmSpokeInstruction[SvmSpokeInstruction["SetCurrentTime"] = 17] = "SetCurrentTime";
|
|
62
|
+
SvmSpokeInstruction[SvmSpokeInstruction["TransferOwnership"] = 18] = "TransferOwnership";
|
|
63
|
+
SvmSpokeInstruction[SvmSpokeInstruction["WithdrawV5FillPayer"] = 19] = "WithdrawV5FillPayer";
|
|
64
|
+
SvmSpokeInstruction[SvmSpokeInstruction["WriteInstructionParamsFragment"] = 20] = "WriteInstructionParamsFragment";
|
|
82
65
|
})(SvmSpokeInstruction || (exports.SvmSpokeInstruction = SvmSpokeInstruction = {}));
|
|
83
66
|
function identifySvmSpokeInstruction(instruction) {
|
|
84
67
|
const data = 'data' in instruction ? instruction.data : instruction;
|
|
68
|
+
if ((0, kit_1.containsBytes)(data, (0, kit_1.fixEncoderSize)((0, kit_1.getBytesEncoder)(), 8).encode(new Uint8Array([23, 161, 69, 148, 150, 128, 173, 220])), 0)) {
|
|
69
|
+
return SvmSpokeInstruction.AdapterExecuteAcrossV5;
|
|
70
|
+
}
|
|
85
71
|
if ((0, kit_1.containsBytes)(data, (0, kit_1.fixEncoderSize)((0, kit_1.getBytesEncoder)(), 8).encode(new Uint8Array([205, 34, 34, 224, 204, 103, 81, 176])), 0)) {
|
|
86
72
|
return SvmSpokeInstruction.ClaimRelayerRefund;
|
|
87
73
|
}
|
|
@@ -97,12 +83,6 @@ function identifySvmSpokeInstruction(instruction) {
|
|
|
97
83
|
if ((0, kit_1.containsBytes)(data, (0, kit_1.fixEncoderSize)((0, kit_1.getBytesEncoder)(), 8).encode(new Uint8Array([163, 216, 49, 204, 97, 16, 80, 167])), 0)) {
|
|
98
84
|
return SvmSpokeInstruction.CreateTokenAccounts;
|
|
99
85
|
}
|
|
100
|
-
if ((0, kit_1.containsBytes)(data, (0, kit_1.fixEncoderSize)((0, kit_1.getBytesEncoder)(), 8).encode(new Uint8Array([242, 35, 198, 137, 82, 225, 242, 182])), 0)) {
|
|
101
|
-
return SvmSpokeInstruction.Deposit;
|
|
102
|
-
}
|
|
103
|
-
if ((0, kit_1.containsBytes)(data, (0, kit_1.fixEncoderSize)((0, kit_1.getBytesEncoder)(), 8).encode(new Uint8Array([75, 228, 135, 221, 200, 25, 148, 26])), 0)) {
|
|
104
|
-
return SvmSpokeInstruction.DepositNow;
|
|
105
|
-
}
|
|
106
86
|
if ((0, kit_1.containsBytes)(data, (0, kit_1.fixEncoderSize)((0, kit_1.getBytesEncoder)(), 8).encode(new Uint8Array([226, 158, 1, 74, 84, 113, 24, 152])), 0)) {
|
|
107
87
|
return SvmSpokeInstruction.EmergencyDeleteRootBundle;
|
|
108
88
|
}
|
|
@@ -112,15 +92,6 @@ function identifySvmSpokeInstruction(instruction) {
|
|
|
112
92
|
if ((0, kit_1.containsBytes)(data, (0, kit_1.fixEncoderSize)((0, kit_1.getBytesEncoder)(), 8).encode(new Uint8Array([110, 112, 89, 208, 38, 116, 93, 10])), 0)) {
|
|
113
93
|
return SvmSpokeInstruction.ExecuteRelayerRefundLeafDeferred;
|
|
114
94
|
}
|
|
115
|
-
if ((0, kit_1.containsBytes)(data, (0, kit_1.fixEncoderSize)((0, kit_1.getBytesEncoder)(), 8).encode(new Uint8Array([26, 207, 3, 168, 193, 252, 59, 127])), 0)) {
|
|
116
|
-
return SvmSpokeInstruction.ExecuteSlowRelayLeaf;
|
|
117
|
-
}
|
|
118
|
-
if ((0, kit_1.containsBytes)(data, (0, kit_1.fixEncoderSize)((0, kit_1.getBytesEncoder)(), 8).encode(new Uint8Array([100, 84, 222, 90, 106, 209, 58, 222])), 0)) {
|
|
119
|
-
return SvmSpokeInstruction.FillRelay;
|
|
120
|
-
}
|
|
121
|
-
if ((0, kit_1.containsBytes)(data, (0, kit_1.fixEncoderSize)((0, kit_1.getBytesEncoder)(), 8).encode(new Uint8Array([118, 10, 135, 0, 168, 243, 223, 117])), 0)) {
|
|
122
|
-
return SvmSpokeInstruction.GetUnsafeDepositId;
|
|
123
|
-
}
|
|
124
95
|
if ((0, kit_1.containsBytes)(data, (0, kit_1.fixEncoderSize)((0, kit_1.getBytesEncoder)(), 8).encode(new Uint8Array([186, 252, 239, 70, 86, 180, 110, 95])), 0)) {
|
|
125
96
|
return SvmSpokeInstruction.HandleReceiveFinalizedMessage;
|
|
126
97
|
}
|
|
@@ -142,9 +113,6 @@ function identifySvmSpokeInstruction(instruction) {
|
|
|
142
113
|
if ((0, kit_1.containsBytes)(data, (0, kit_1.fixEncoderSize)((0, kit_1.getBytesEncoder)(), 8).encode(new Uint8Array([69, 13, 223, 204, 251, 61, 105, 6])), 0)) {
|
|
143
114
|
return SvmSpokeInstruction.RelayRootBundle;
|
|
144
115
|
}
|
|
145
|
-
if ((0, kit_1.containsBytes)(data, (0, kit_1.fixEncoderSize)((0, kit_1.getBytesEncoder)(), 8).encode(new Uint8Array([39, 157, 165, 187, 88, 217, 207, 98])), 0)) {
|
|
146
|
-
return SvmSpokeInstruction.RequestSlowFill;
|
|
147
|
-
}
|
|
148
116
|
if ((0, kit_1.containsBytes)(data, (0, kit_1.fixEncoderSize)((0, kit_1.getBytesEncoder)(), 8).encode(new Uint8Array([102, 206, 237, 106, 63, 141, 42, 248])), 0)) {
|
|
149
117
|
return SvmSpokeInstruction.SetCrossDomainAdmin;
|
|
150
118
|
}
|
|
@@ -154,8 +122,8 @@ function identifySvmSpokeInstruction(instruction) {
|
|
|
154
122
|
if ((0, kit_1.containsBytes)(data, (0, kit_1.fixEncoderSize)((0, kit_1.getBytesEncoder)(), 8).encode(new Uint8Array([65, 177, 215, 73, 53, 45, 99, 47])), 0)) {
|
|
155
123
|
return SvmSpokeInstruction.TransferOwnership;
|
|
156
124
|
}
|
|
157
|
-
if ((0, kit_1.containsBytes)(data, (0, kit_1.fixEncoderSize)((0, kit_1.getBytesEncoder)(), 8).encode(new Uint8Array([
|
|
158
|
-
return SvmSpokeInstruction.
|
|
125
|
+
if ((0, kit_1.containsBytes)(data, (0, kit_1.fixEncoderSize)((0, kit_1.getBytesEncoder)(), 8).encode(new Uint8Array([160, 125, 152, 107, 21, 37, 181, 144])), 0)) {
|
|
126
|
+
return SvmSpokeInstruction.WithdrawV5FillPayer;
|
|
159
127
|
}
|
|
160
128
|
if ((0, kit_1.containsBytes)(data, (0, kit_1.fixEncoderSize)((0, kit_1.getBytesEncoder)(), 8).encode(new Uint8Array([238, 182, 109, 113, 124, 255, 72, 18])), 0)) {
|
|
161
129
|
return SvmSpokeInstruction.WriteInstructionParamsFragment;
|
|
@@ -0,0 +1,25 @@
|
|
|
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 Codec, type Decoder, type Encoder, type ReadonlyUint8Array } from '@solana/kit';
|
|
9
|
+
import { type AcrossDepositParams, type AcrossDepositParamsArgs, type V5DepositModificationRules, type V5DepositModificationRulesArgs, type V5InputAmountMode, type V5InputAmountModeArgs } from '.';
|
|
10
|
+
/** Path-committed source-deposit input, shaped like the EVM `AcrossDepositInput` compatibility surface. */
|
|
11
|
+
export type AcrossDepositInput = {
|
|
12
|
+
depositParams: AcrossDepositParams;
|
|
13
|
+
dstStepId: ReadonlyUint8Array;
|
|
14
|
+
inputAmountMode: V5InputAmountMode;
|
|
15
|
+
modificationRules: V5DepositModificationRules;
|
|
16
|
+
};
|
|
17
|
+
export type AcrossDepositInputArgs = {
|
|
18
|
+
depositParams: AcrossDepositParamsArgs;
|
|
19
|
+
dstStepId: ReadonlyUint8Array;
|
|
20
|
+
inputAmountMode: V5InputAmountModeArgs;
|
|
21
|
+
modificationRules: V5DepositModificationRulesArgs;
|
|
22
|
+
};
|
|
23
|
+
export declare function getAcrossDepositInputEncoder(): Encoder<AcrossDepositInputArgs>;
|
|
24
|
+
export declare function getAcrossDepositInputDecoder(): Decoder<AcrossDepositInput>;
|
|
25
|
+
export declare function getAcrossDepositInputCodec(): Codec<AcrossDepositInputArgs, AcrossDepositInput>;
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* This code was AUTOGENERATED using the codama library.
|
|
4
|
+
* Please DO NOT EDIT THIS FILE, instead use visitors
|
|
5
|
+
* to add features, then rerun codama to update it.
|
|
6
|
+
*
|
|
7
|
+
* @see https://github.com/codama-idl/codama
|
|
8
|
+
*/
|
|
9
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10
|
+
exports.getAcrossDepositInputEncoder = getAcrossDepositInputEncoder;
|
|
11
|
+
exports.getAcrossDepositInputDecoder = getAcrossDepositInputDecoder;
|
|
12
|
+
exports.getAcrossDepositInputCodec = getAcrossDepositInputCodec;
|
|
13
|
+
const kit_1 = require("@solana/kit");
|
|
14
|
+
const _1 = require(".");
|
|
15
|
+
function getAcrossDepositInputEncoder() {
|
|
16
|
+
return (0, kit_1.getStructEncoder)([
|
|
17
|
+
['depositParams', (0, _1.getAcrossDepositParamsEncoder)()],
|
|
18
|
+
['dstStepId', (0, kit_1.fixEncoderSize)((0, kit_1.getBytesEncoder)(), 32)],
|
|
19
|
+
['inputAmountMode', (0, _1.getV5InputAmountModeEncoder)()],
|
|
20
|
+
['modificationRules', (0, _1.getV5DepositModificationRulesEncoder)()],
|
|
21
|
+
]);
|
|
22
|
+
}
|
|
23
|
+
function getAcrossDepositInputDecoder() {
|
|
24
|
+
return (0, kit_1.getStructDecoder)([
|
|
25
|
+
['depositParams', (0, _1.getAcrossDepositParamsDecoder)()],
|
|
26
|
+
['dstStepId', (0, kit_1.fixDecoderSize)((0, kit_1.getBytesDecoder)(), 32)],
|
|
27
|
+
['inputAmountMode', (0, _1.getV5InputAmountModeDecoder)()],
|
|
28
|
+
['modificationRules', (0, _1.getV5DepositModificationRulesDecoder)()],
|
|
29
|
+
]);
|
|
30
|
+
}
|
|
31
|
+
function getAcrossDepositInputCodec() {
|
|
32
|
+
return (0, kit_1.combineCodec)(getAcrossDepositInputEncoder(), getAcrossDepositInputDecoder());
|
|
33
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
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 Codec, type Decoder, type Encoder, type ReadonlyUint8Array } from '@solana/kit';
|
|
9
|
+
/** JIT payload for Deposit mode. The signature is fixed `r[32] || s[32] || v[1]` rather than a length-prefixed vec. */
|
|
10
|
+
export type AcrossDepositJitParams = {
|
|
11
|
+
newOutputAmount: ReadonlyUint8Array;
|
|
12
|
+
newExclusiveRelayer: Address;
|
|
13
|
+
signature: ReadonlyUint8Array;
|
|
14
|
+
};
|
|
15
|
+
export type AcrossDepositJitParamsArgs = AcrossDepositJitParams;
|
|
16
|
+
export declare function getAcrossDepositJitParamsEncoder(): Encoder<AcrossDepositJitParamsArgs>;
|
|
17
|
+
export declare function getAcrossDepositJitParamsDecoder(): Decoder<AcrossDepositJitParams>;
|
|
18
|
+
export declare function getAcrossDepositJitParamsCodec(): Codec<AcrossDepositJitParamsArgs, AcrossDepositJitParams>;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* This code was AUTOGENERATED using the codama library.
|
|
4
|
+
* Please DO NOT EDIT THIS FILE, instead use visitors
|
|
5
|
+
* to add features, then rerun codama to update it.
|
|
6
|
+
*
|
|
7
|
+
* @see https://github.com/codama-idl/codama
|
|
8
|
+
*/
|
|
9
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10
|
+
exports.getAcrossDepositJitParamsEncoder = getAcrossDepositJitParamsEncoder;
|
|
11
|
+
exports.getAcrossDepositJitParamsDecoder = getAcrossDepositJitParamsDecoder;
|
|
12
|
+
exports.getAcrossDepositJitParamsCodec = getAcrossDepositJitParamsCodec;
|
|
13
|
+
const kit_1 = require("@solana/kit");
|
|
14
|
+
function getAcrossDepositJitParamsEncoder() {
|
|
15
|
+
return (0, kit_1.getStructEncoder)([
|
|
16
|
+
['newOutputAmount', (0, kit_1.fixEncoderSize)((0, kit_1.getBytesEncoder)(), 32)],
|
|
17
|
+
['newExclusiveRelayer', (0, kit_1.getAddressEncoder)()],
|
|
18
|
+
['signature', (0, kit_1.fixEncoderSize)((0, kit_1.getBytesEncoder)(), 65)],
|
|
19
|
+
]);
|
|
20
|
+
}
|
|
21
|
+
function getAcrossDepositJitParamsDecoder() {
|
|
22
|
+
return (0, kit_1.getStructDecoder)([
|
|
23
|
+
['newOutputAmount', (0, kit_1.fixDecoderSize)((0, kit_1.getBytesDecoder)(), 32)],
|
|
24
|
+
['newExclusiveRelayer', (0, kit_1.getAddressDecoder)()],
|
|
25
|
+
['signature', (0, kit_1.fixDecoderSize)((0, kit_1.getBytesDecoder)(), 65)],
|
|
26
|
+
]);
|
|
27
|
+
}
|
|
28
|
+
function getAcrossDepositJitParamsCodec() {
|
|
29
|
+
return (0, kit_1.combineCodec)(getAcrossDepositJitParamsEncoder(), getAcrossDepositJitParamsDecoder());
|
|
30
|
+
}
|
|
@@ -0,0 +1,43 @@
|
|
|
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 Codec, type Decoder, type Encoder, type ReadonlyUint8Array } from '@solana/kit';
|
|
9
|
+
/**
|
|
10
|
+
* Canonical Across deposit fields. `output_amount` remains an EVM uint256 word; SVM-native amounts and non-EVM
|
|
11
|
+
* chain IDs are width-bounded to u64.
|
|
12
|
+
*/
|
|
13
|
+
export type AcrossDepositParams = {
|
|
14
|
+
depositor: Address;
|
|
15
|
+
recipient: Address;
|
|
16
|
+
inputToken: Address;
|
|
17
|
+
outputToken: Address;
|
|
18
|
+
inputAmount: bigint;
|
|
19
|
+
outputAmount: ReadonlyUint8Array;
|
|
20
|
+
destinationChainId: bigint;
|
|
21
|
+
exclusiveRelayer: Address;
|
|
22
|
+
depositNonce: bigint;
|
|
23
|
+
quoteTimestamp: number;
|
|
24
|
+
fillDeadline: number;
|
|
25
|
+
exclusivityParameter: number;
|
|
26
|
+
};
|
|
27
|
+
export type AcrossDepositParamsArgs = {
|
|
28
|
+
depositor: Address;
|
|
29
|
+
recipient: Address;
|
|
30
|
+
inputToken: Address;
|
|
31
|
+
outputToken: Address;
|
|
32
|
+
inputAmount: number | bigint;
|
|
33
|
+
outputAmount: ReadonlyUint8Array;
|
|
34
|
+
destinationChainId: number | bigint;
|
|
35
|
+
exclusiveRelayer: Address;
|
|
36
|
+
depositNonce: number | bigint;
|
|
37
|
+
quoteTimestamp: number;
|
|
38
|
+
fillDeadline: number;
|
|
39
|
+
exclusivityParameter: number;
|
|
40
|
+
};
|
|
41
|
+
export declare function getAcrossDepositParamsEncoder(): Encoder<AcrossDepositParamsArgs>;
|
|
42
|
+
export declare function getAcrossDepositParamsDecoder(): Decoder<AcrossDepositParams>;
|
|
43
|
+
export declare function getAcrossDepositParamsCodec(): Codec<AcrossDepositParamsArgs, AcrossDepositParams>;
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* This code was AUTOGENERATED using the codama library.
|
|
4
|
+
* Please DO NOT EDIT THIS FILE, instead use visitors
|
|
5
|
+
* to add features, then rerun codama to update it.
|
|
6
|
+
*
|
|
7
|
+
* @see https://github.com/codama-idl/codama
|
|
8
|
+
*/
|
|
9
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10
|
+
exports.getAcrossDepositParamsEncoder = getAcrossDepositParamsEncoder;
|
|
11
|
+
exports.getAcrossDepositParamsDecoder = getAcrossDepositParamsDecoder;
|
|
12
|
+
exports.getAcrossDepositParamsCodec = getAcrossDepositParamsCodec;
|
|
13
|
+
const kit_1 = require("@solana/kit");
|
|
14
|
+
function getAcrossDepositParamsEncoder() {
|
|
15
|
+
return (0, kit_1.getStructEncoder)([
|
|
16
|
+
['depositor', (0, kit_1.getAddressEncoder)()],
|
|
17
|
+
['recipient', (0, kit_1.getAddressEncoder)()],
|
|
18
|
+
['inputToken', (0, kit_1.getAddressEncoder)()],
|
|
19
|
+
['outputToken', (0, kit_1.getAddressEncoder)()],
|
|
20
|
+
['inputAmount', (0, kit_1.getU64Encoder)()],
|
|
21
|
+
['outputAmount', (0, kit_1.fixEncoderSize)((0, kit_1.getBytesEncoder)(), 32)],
|
|
22
|
+
['destinationChainId', (0, kit_1.getU64Encoder)()],
|
|
23
|
+
['exclusiveRelayer', (0, kit_1.getAddressEncoder)()],
|
|
24
|
+
['depositNonce', (0, kit_1.getU64Encoder)()],
|
|
25
|
+
['quoteTimestamp', (0, kit_1.getU32Encoder)()],
|
|
26
|
+
['fillDeadline', (0, kit_1.getU32Encoder)()],
|
|
27
|
+
['exclusivityParameter', (0, kit_1.getU32Encoder)()],
|
|
28
|
+
]);
|
|
29
|
+
}
|
|
30
|
+
function getAcrossDepositParamsDecoder() {
|
|
31
|
+
return (0, kit_1.getStructDecoder)([
|
|
32
|
+
['depositor', (0, kit_1.getAddressDecoder)()],
|
|
33
|
+
['recipient', (0, kit_1.getAddressDecoder)()],
|
|
34
|
+
['inputToken', (0, kit_1.getAddressDecoder)()],
|
|
35
|
+
['outputToken', (0, kit_1.getAddressDecoder)()],
|
|
36
|
+
['inputAmount', (0, kit_1.getU64Decoder)()],
|
|
37
|
+
['outputAmount', (0, kit_1.fixDecoderSize)((0, kit_1.getBytesDecoder)(), 32)],
|
|
38
|
+
['destinationChainId', (0, kit_1.getU64Decoder)()],
|
|
39
|
+
['exclusiveRelayer', (0, kit_1.getAddressDecoder)()],
|
|
40
|
+
['depositNonce', (0, kit_1.getU64Decoder)()],
|
|
41
|
+
['quoteTimestamp', (0, kit_1.getU32Decoder)()],
|
|
42
|
+
['fillDeadline', (0, kit_1.getU32Decoder)()],
|
|
43
|
+
['exclusivityParameter', (0, kit_1.getU32Decoder)()],
|
|
44
|
+
]);
|
|
45
|
+
}
|
|
46
|
+
function getAcrossDepositParamsCodec() {
|
|
47
|
+
return (0, kit_1.combineCodec)(getAcrossDepositParamsEncoder(), getAcrossDepositParamsDecoder());
|
|
48
|
+
}
|
|
@@ -5,6 +5,9 @@
|
|
|
5
5
|
*
|
|
6
6
|
* @see https://github.com/codama-idl/codama
|
|
7
7
|
*/
|
|
8
|
+
export * from './acrossDepositInput';
|
|
9
|
+
export * from './acrossDepositJitParams';
|
|
10
|
+
export * from './acrossDepositParams';
|
|
8
11
|
export * from './claimedRelayerRefund';
|
|
9
12
|
export * from './emergencyDeletedRootBundle';
|
|
10
13
|
export * from './executedRelayerRefundRoot';
|
|
@@ -20,5 +23,10 @@ export * from './relayerRefundLeaf';
|
|
|
20
23
|
export * from './relayExecutionEventInfo';
|
|
21
24
|
export * from './requestedSlowFill';
|
|
22
25
|
export * from './setXDomainAdmin';
|
|
23
|
-
export * from './slowFill';
|
|
24
26
|
export * from './transferredOwnership';
|
|
27
|
+
export * from './v5AdapterInput';
|
|
28
|
+
export * from './v5DepositModificationRules';
|
|
29
|
+
export * from './v5FillFloatWithdrawn';
|
|
30
|
+
export * from './v5FillInput';
|
|
31
|
+
export * from './v5FillJit';
|
|
32
|
+
export * from './v5InputAmountMode';
|