@across-protocol/contracts 4.0.1 → 4.0.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/dist/deploy/consts.d.ts +1 -1
- package/dist/deploy/consts.js +9 -13
- package/dist/deployments/deployments.json +24 -1
- package/dist/hardhat.config.js +17 -1
- package/dist/scripts/svm/fakeFillWithRandomDistribution.js +2 -2
- package/dist/scripts/svm/queryEvents.js +1 -1
- package/dist/scripts/svm/simpleDeposit.js +3 -3
- package/dist/scripts/svm/simpleFakeRelayerRepayment.js +1 -1
- package/dist/scripts/svm/simpleFill.js +19 -6
- package/dist/src/svm/assets/idl/svm_spoke.json +388 -388
- package/dist/src/svm/assets/svm_spoke.d.ts +388 -388
- package/dist/src/svm/clients/SvmSpoke/accounts/executeSlowRelayLeafParams.d.ts +31 -0
- package/dist/src/svm/clients/SvmSpoke/accounts/executeSlowRelayLeafParams.js +70 -0
- package/dist/src/svm/clients/SvmSpoke/accounts/fillRelayParams.d.ts +31 -0
- package/dist/src/svm/clients/SvmSpoke/accounts/fillRelayParams.js +67 -0
- package/dist/src/svm/clients/SvmSpoke/accounts/index.d.ts +3 -3
- package/dist/src/svm/clients/SvmSpoke/accounts/index.js +3 -3
- package/dist/src/svm/clients/SvmSpoke/accounts/requestSlowFillParams.d.ts +27 -0
- package/dist/src/svm/clients/SvmSpoke/accounts/requestSlowFillParams.js +66 -0
- package/dist/src/svm/clients/SvmSpoke/instructions/deposit.d.ts +123 -0
- package/dist/src/svm/clients/SvmSpoke/instructions/{depositV3.js → deposit.js} +23 -23
- package/dist/src/svm/clients/SvmSpoke/instructions/depositNow.d.ts +119 -0
- package/dist/src/svm/clients/SvmSpoke/instructions/{depositV3Now.js → depositNow.js} +23 -23
- package/dist/src/svm/clients/SvmSpoke/instructions/executeSlowRelayLeaf.d.ts +104 -0
- package/dist/src/svm/clients/SvmSpoke/instructions/{executeV3SlowRelayLeaf.js → executeSlowRelayLeaf.js} +26 -26
- package/dist/src/svm/clients/SvmSpoke/instructions/fillRelay.d.ts +104 -0
- package/dist/src/svm/clients/SvmSpoke/instructions/{fillV3Relay.js → fillRelay.js} +26 -26
- package/dist/src/svm/clients/SvmSpoke/instructions/index.d.ts +6 -6
- package/dist/src/svm/clients/SvmSpoke/instructions/index.js +6 -6
- package/dist/src/svm/clients/SvmSpoke/instructions/requestSlowFill.d.ts +76 -0
- package/dist/src/svm/clients/SvmSpoke/instructions/{requestV3SlowFill.js → requestSlowFill.js} +25 -25
- package/dist/src/svm/clients/SvmSpoke/instructions/unsafeDeposit.d.ts +127 -0
- package/dist/src/svm/clients/SvmSpoke/instructions/{unsafeDepositV3.js → unsafeDeposit.js} +23 -23
- package/dist/src/svm/clients/SvmSpoke/programs/svmSpoke.d.ts +23 -23
- package/dist/src/svm/clients/SvmSpoke/programs/svmSpoke.js +29 -29
- package/dist/src/svm/clients/SvmSpoke/types/{filledV3Relay.d.ts → filledRelay.d.ts} +8 -8
- package/dist/src/svm/clients/SvmSpoke/types/{filledV3Relay.js → filledRelay.js} +9 -9
- package/dist/src/svm/clients/SvmSpoke/types/{v3FundsDeposited.d.ts → fundsDeposited.d.ts} +5 -5
- package/dist/src/svm/clients/SvmSpoke/types/{v3FundsDeposited.js → fundsDeposited.js} +7 -7
- package/dist/src/svm/clients/SvmSpoke/types/index.d.ts +6 -6
- package/dist/src/svm/clients/SvmSpoke/types/index.js +6 -6
- package/dist/src/svm/clients/SvmSpoke/types/{v3RelayData.d.ts → relayData.d.ts} +5 -5
- package/dist/src/svm/clients/SvmSpoke/types/{v3RelayData.js → relayData.js} +7 -7
- package/dist/src/svm/clients/SvmSpoke/types/{v3RelayExecutionEventInfo.d.ts → relayExecutionEventInfo.d.ts} +5 -5
- package/dist/src/svm/clients/SvmSpoke/types/{v3RelayExecutionEventInfo.js → relayExecutionEventInfo.js} +7 -7
- package/dist/src/svm/clients/SvmSpoke/types/{requestedV3SlowFill.d.ts → requestedSlowFill.d.ts} +5 -5
- package/dist/src/svm/clients/SvmSpoke/types/{requestedV3SlowFill.js → requestedSlowFill.js} +7 -7
- package/dist/src/svm/clients/SvmSpoke/types/{v3SlowFill.d.ts → slowFill.d.ts} +8 -8
- package/dist/src/svm/clients/SvmSpoke/types/{v3SlowFill.js → slowFill.js} +9 -9
- package/dist/src/svm/web3-v1/instructionParamsUtils.d.ts +8 -8
- package/dist/src/svm/web3-v1/instructionParamsUtils.js +16 -16
- package/dist/src/types/svm.d.ts +6 -6
- package/dist/target/types/svm_spoke.d.ts +388 -388
- package/dist/tasks/enableL1TokenAcrossEcosystem.js +14 -10
- package/dist/test/svm/SvmSpoke.Deposit.js +48 -47
- package/dist/test/svm/SvmSpoke.Fill.AcrossPlus.js +2 -2
- package/dist/test/svm/SvmSpoke.Fill.js +28 -56
- package/dist/test/svm/SvmSpoke.SlowFill.AcrossPlus.js +13 -13
- package/dist/test/svm/SvmSpoke.SlowFill.js +40 -40
- package/dist/utils/constants.d.ts +1 -1
- package/dist/utils/constants.js +3 -1
- package/package.json +2 -2
- package/dist/src/svm/clients/SvmSpoke/accounts/executeV3SlowRelayLeafParams.d.ts +0 -31
- package/dist/src/svm/clients/SvmSpoke/accounts/executeV3SlowRelayLeafParams.js +0 -70
- package/dist/src/svm/clients/SvmSpoke/accounts/fillV3RelayParams.d.ts +0 -31
- package/dist/src/svm/clients/SvmSpoke/accounts/fillV3RelayParams.js +0 -67
- package/dist/src/svm/clients/SvmSpoke/accounts/requestV3SlowFillParams.d.ts +0 -27
- package/dist/src/svm/clients/SvmSpoke/accounts/requestV3SlowFillParams.js +0 -66
- package/dist/src/svm/clients/SvmSpoke/instructions/depositV3.d.ts +0 -123
- package/dist/src/svm/clients/SvmSpoke/instructions/depositV3Now.d.ts +0 -119
- package/dist/src/svm/clients/SvmSpoke/instructions/executeV3SlowRelayLeaf.d.ts +0 -104
- package/dist/src/svm/clients/SvmSpoke/instructions/fillV3Relay.d.ts +0 -104
- package/dist/src/svm/clients/SvmSpoke/instructions/requestV3SlowFill.d.ts +0 -76
- package/dist/src/svm/clients/SvmSpoke/instructions/unsafeDepositV3.d.ts +0 -127
|
@@ -6,15 +6,15 @@
|
|
|
6
6
|
* @see https://github.com/codama-idl/codama
|
|
7
7
|
*/
|
|
8
8
|
import { type Address, type ReadonlyUint8Array } from '@solana/web3-v2.js';
|
|
9
|
-
import { type ParsedBridgeTokensToHubPoolInstruction, type ParsedClaimRelayerRefundInstruction, type ParsedCloseClaimAccountInstruction, type ParsedCloseFillPdaInstruction, type ParsedCloseInstructionParamsInstruction, type ParsedCreateTokenAccountsInstruction, type
|
|
9
|
+
import { type ParsedBridgeTokensToHubPoolInstruction, type ParsedClaimRelayerRefundInstruction, type ParsedCloseClaimAccountInstruction, type ParsedCloseFillPdaInstruction, type ParsedCloseInstructionParamsInstruction, type ParsedCreateTokenAccountsInstruction, type ParsedDepositInstruction, type ParsedDepositNowInstruction, type ParsedEmergencyDeleteRootBundleInstruction, type ParsedExecuteRelayerRefundLeafDeferredInstruction, type ParsedExecuteRelayerRefundLeafInstruction, type ParsedExecuteSlowRelayLeafInstruction, type ParsedFillRelayInstruction, type ParsedGetUnsafeDepositIdInstruction, type ParsedHandleReceiveMessageInstruction, type ParsedInitializeClaimAccountInstruction, type ParsedInitializeInstruction, type ParsedInitializeInstructionParamsInstruction, type ParsedPauseDepositsInstruction, type ParsedPauseFillsInstruction, type ParsedRelayRootBundleInstruction, type ParsedRequestSlowFillInstruction, type ParsedSetCrossDomainAdminInstruction, type ParsedSetCurrentTimeInstruction, type ParsedSetEnableRouteInstruction, type ParsedTransferOwnershipInstruction, type ParsedUnsafeDepositInstruction, type ParsedWriteInstructionParamsFragmentInstruction } from '../instructions';
|
|
10
10
|
export declare const SVM_SPOKE_PROGRAM_ADDRESS: Address<"D1WcTLKRyN4TuqnfMBGPvc16nACHfNhFPbgWNExb1aur">;
|
|
11
11
|
export declare enum SvmSpokeAccount {
|
|
12
12
|
ClaimAccount = 0,
|
|
13
13
|
ExecuteRelayerRefundLeafParams = 1,
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
14
|
+
ExecuteSlowRelayLeafParams = 2,
|
|
15
|
+
FillRelayParams = 3,
|
|
16
|
+
FillStatusAccount = 4,
|
|
17
|
+
RequestSlowFillParams = 5,
|
|
18
18
|
RootBundle = 6,
|
|
19
19
|
Route = 7,
|
|
20
20
|
State = 8,
|
|
@@ -30,13 +30,13 @@ export declare enum SvmSpokeInstruction {
|
|
|
30
30
|
CloseFillPda = 3,
|
|
31
31
|
CloseInstructionParams = 4,
|
|
32
32
|
CreateTokenAccounts = 5,
|
|
33
|
-
|
|
34
|
-
|
|
33
|
+
Deposit = 6,
|
|
34
|
+
DepositNow = 7,
|
|
35
35
|
EmergencyDeleteRootBundle = 8,
|
|
36
36
|
ExecuteRelayerRefundLeaf = 9,
|
|
37
37
|
ExecuteRelayerRefundLeafDeferred = 10,
|
|
38
|
-
|
|
39
|
-
|
|
38
|
+
ExecuteSlowRelayLeaf = 11,
|
|
39
|
+
FillRelay = 12,
|
|
40
40
|
GetUnsafeDepositId = 13,
|
|
41
41
|
HandleReceiveMessage = 14,
|
|
42
42
|
Initialize = 15,
|
|
@@ -45,12 +45,12 @@ export declare enum SvmSpokeInstruction {
|
|
|
45
45
|
PauseDeposits = 18,
|
|
46
46
|
PauseFills = 19,
|
|
47
47
|
RelayRootBundle = 20,
|
|
48
|
-
|
|
48
|
+
RequestSlowFill = 21,
|
|
49
49
|
SetCrossDomainAdmin = 22,
|
|
50
50
|
SetCurrentTime = 23,
|
|
51
51
|
SetEnableRoute = 24,
|
|
52
52
|
TransferOwnership = 25,
|
|
53
|
-
|
|
53
|
+
UnsafeDeposit = 26,
|
|
54
54
|
WriteInstructionParamsFragment = 27
|
|
55
55
|
}
|
|
56
56
|
export declare function identifySvmSpokeInstruction(instruction: {
|
|
@@ -69,20 +69,20 @@ export type ParsedSvmSpokeInstruction<TProgram extends string = 'D1WcTLKRyN4Tuqn
|
|
|
69
69
|
} & ParsedCloseInstructionParamsInstruction<TProgram>) | ({
|
|
70
70
|
instructionType: SvmSpokeInstruction.CreateTokenAccounts;
|
|
71
71
|
} & ParsedCreateTokenAccountsInstruction<TProgram>) | ({
|
|
72
|
-
instructionType: SvmSpokeInstruction.
|
|
73
|
-
} &
|
|
74
|
-
instructionType: SvmSpokeInstruction.
|
|
75
|
-
} &
|
|
72
|
+
instructionType: SvmSpokeInstruction.Deposit;
|
|
73
|
+
} & ParsedDepositInstruction<TProgram>) | ({
|
|
74
|
+
instructionType: SvmSpokeInstruction.DepositNow;
|
|
75
|
+
} & ParsedDepositNowInstruction<TProgram>) | ({
|
|
76
76
|
instructionType: SvmSpokeInstruction.EmergencyDeleteRootBundle;
|
|
77
77
|
} & ParsedEmergencyDeleteRootBundleInstruction<TProgram>) | ({
|
|
78
78
|
instructionType: SvmSpokeInstruction.ExecuteRelayerRefundLeaf;
|
|
79
79
|
} & ParsedExecuteRelayerRefundLeafInstruction<TProgram>) | ({
|
|
80
80
|
instructionType: SvmSpokeInstruction.ExecuteRelayerRefundLeafDeferred;
|
|
81
81
|
} & ParsedExecuteRelayerRefundLeafDeferredInstruction<TProgram>) | ({
|
|
82
|
-
instructionType: SvmSpokeInstruction.
|
|
83
|
-
} &
|
|
84
|
-
instructionType: SvmSpokeInstruction.
|
|
85
|
-
} &
|
|
82
|
+
instructionType: SvmSpokeInstruction.ExecuteSlowRelayLeaf;
|
|
83
|
+
} & ParsedExecuteSlowRelayLeafInstruction<TProgram>) | ({
|
|
84
|
+
instructionType: SvmSpokeInstruction.FillRelay;
|
|
85
|
+
} & ParsedFillRelayInstruction<TProgram>) | ({
|
|
86
86
|
instructionType: SvmSpokeInstruction.GetUnsafeDepositId;
|
|
87
87
|
} & ParsedGetUnsafeDepositIdInstruction<TProgram>) | ({
|
|
88
88
|
instructionType: SvmSpokeInstruction.HandleReceiveMessage;
|
|
@@ -99,8 +99,8 @@ export type ParsedSvmSpokeInstruction<TProgram extends string = 'D1WcTLKRyN4Tuqn
|
|
|
99
99
|
} & ParsedPauseFillsInstruction<TProgram>) | ({
|
|
100
100
|
instructionType: SvmSpokeInstruction.RelayRootBundle;
|
|
101
101
|
} & ParsedRelayRootBundleInstruction<TProgram>) | ({
|
|
102
|
-
instructionType: SvmSpokeInstruction.
|
|
103
|
-
} &
|
|
102
|
+
instructionType: SvmSpokeInstruction.RequestSlowFill;
|
|
103
|
+
} & ParsedRequestSlowFillInstruction<TProgram>) | ({
|
|
104
104
|
instructionType: SvmSpokeInstruction.SetCrossDomainAdmin;
|
|
105
105
|
} & ParsedSetCrossDomainAdminInstruction<TProgram>) | ({
|
|
106
106
|
instructionType: SvmSpokeInstruction.SetCurrentTime;
|
|
@@ -109,7 +109,7 @@ export type ParsedSvmSpokeInstruction<TProgram extends string = 'D1WcTLKRyN4Tuqn
|
|
|
109
109
|
} & ParsedSetEnableRouteInstruction<TProgram>) | ({
|
|
110
110
|
instructionType: SvmSpokeInstruction.TransferOwnership;
|
|
111
111
|
} & ParsedTransferOwnershipInstruction<TProgram>) | ({
|
|
112
|
-
instructionType: SvmSpokeInstruction.
|
|
113
|
-
} &
|
|
112
|
+
instructionType: SvmSpokeInstruction.UnsafeDeposit;
|
|
113
|
+
} & ParsedUnsafeDepositInstruction<TProgram>) | ({
|
|
114
114
|
instructionType: SvmSpokeInstruction.WriteInstructionParamsFragment;
|
|
115
115
|
} & ParsedWriteInstructionParamsFragmentInstruction<TProgram>);
|
|
@@ -16,10 +16,10 @@ 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["
|
|
19
|
+
SvmSpokeAccount[SvmSpokeAccount["ExecuteSlowRelayLeafParams"] = 2] = "ExecuteSlowRelayLeafParams";
|
|
20
|
+
SvmSpokeAccount[SvmSpokeAccount["FillRelayParams"] = 3] = "FillRelayParams";
|
|
21
|
+
SvmSpokeAccount[SvmSpokeAccount["FillStatusAccount"] = 4] = "FillStatusAccount";
|
|
22
|
+
SvmSpokeAccount[SvmSpokeAccount["RequestSlowFillParams"] = 5] = "RequestSlowFillParams";
|
|
23
23
|
SvmSpokeAccount[SvmSpokeAccount["RootBundle"] = 6] = "RootBundle";
|
|
24
24
|
SvmSpokeAccount[SvmSpokeAccount["Route"] = 7] = "Route";
|
|
25
25
|
SvmSpokeAccount[SvmSpokeAccount["State"] = 8] = "State";
|
|
@@ -33,17 +33,17 @@ function identifySvmSpokeAccount(account) {
|
|
|
33
33
|
if ((0, web3_v2_js_1.containsBytes)(data, (0, web3_v2_js_1.fixEncoderSize)((0, web3_v2_js_1.getBytesEncoder)(), 8).encode(new Uint8Array([192, 59, 93, 9, 171, 77, 28, 250])), 0)) {
|
|
34
34
|
return SvmSpokeAccount.ExecuteRelayerRefundLeafParams;
|
|
35
35
|
}
|
|
36
|
-
if ((0, web3_v2_js_1.containsBytes)(data, (0, web3_v2_js_1.fixEncoderSize)((0, web3_v2_js_1.getBytesEncoder)(), 8).encode(new Uint8Array([
|
|
37
|
-
return SvmSpokeAccount.
|
|
36
|
+
if ((0, web3_v2_js_1.containsBytes)(data, (0, web3_v2_js_1.fixEncoderSize)((0, web3_v2_js_1.getBytesEncoder)(), 8).encode(new Uint8Array([135, 208, 119, 251, 14, 222, 66, 155])), 0)) {
|
|
37
|
+
return SvmSpokeAccount.ExecuteSlowRelayLeafParams;
|
|
38
|
+
}
|
|
39
|
+
if ((0, web3_v2_js_1.containsBytes)(data, (0, web3_v2_js_1.fixEncoderSize)((0, web3_v2_js_1.getBytesEncoder)(), 8).encode(new Uint8Array([50, 243, 51, 185, 89, 60, 43, 202])), 0)) {
|
|
40
|
+
return SvmSpokeAccount.FillRelayParams;
|
|
38
41
|
}
|
|
39
42
|
if ((0, web3_v2_js_1.containsBytes)(data, (0, web3_v2_js_1.fixEncoderSize)((0, web3_v2_js_1.getBytesEncoder)(), 8).encode(new Uint8Array([105, 89, 88, 35, 24, 147, 178, 137])), 0)) {
|
|
40
43
|
return SvmSpokeAccount.FillStatusAccount;
|
|
41
44
|
}
|
|
42
|
-
if ((0, web3_v2_js_1.containsBytes)(data, (0, web3_v2_js_1.fixEncoderSize)((0, web3_v2_js_1.getBytesEncoder)(), 8).encode(new Uint8Array([
|
|
43
|
-
return SvmSpokeAccount.
|
|
44
|
-
}
|
|
45
|
-
if ((0, web3_v2_js_1.containsBytes)(data, (0, web3_v2_js_1.fixEncoderSize)((0, web3_v2_js_1.getBytesEncoder)(), 8).encode(new Uint8Array([62, 245, 2, 87, 82, 84, 51, 225])), 0)) {
|
|
46
|
-
return SvmSpokeAccount.RequestV3SlowFillParams;
|
|
45
|
+
if ((0, web3_v2_js_1.containsBytes)(data, (0, web3_v2_js_1.fixEncoderSize)((0, web3_v2_js_1.getBytesEncoder)(), 8).encode(new Uint8Array([5, 54, 214, 89, 197, 37, 118, 28])), 0)) {
|
|
46
|
+
return SvmSpokeAccount.RequestSlowFillParams;
|
|
47
47
|
}
|
|
48
48
|
if ((0, web3_v2_js_1.containsBytes)(data, (0, web3_v2_js_1.fixEncoderSize)((0, web3_v2_js_1.getBytesEncoder)(), 8).encode(new Uint8Array([66, 221, 214, 231, 25, 222, 184, 219])), 0)) {
|
|
49
49
|
return SvmSpokeAccount.RootBundle;
|
|
@@ -67,13 +67,13 @@ var SvmSpokeInstruction;
|
|
|
67
67
|
SvmSpokeInstruction[SvmSpokeInstruction["CloseFillPda"] = 3] = "CloseFillPda";
|
|
68
68
|
SvmSpokeInstruction[SvmSpokeInstruction["CloseInstructionParams"] = 4] = "CloseInstructionParams";
|
|
69
69
|
SvmSpokeInstruction[SvmSpokeInstruction["CreateTokenAccounts"] = 5] = "CreateTokenAccounts";
|
|
70
|
-
SvmSpokeInstruction[SvmSpokeInstruction["
|
|
71
|
-
SvmSpokeInstruction[SvmSpokeInstruction["
|
|
70
|
+
SvmSpokeInstruction[SvmSpokeInstruction["Deposit"] = 6] = "Deposit";
|
|
71
|
+
SvmSpokeInstruction[SvmSpokeInstruction["DepositNow"] = 7] = "DepositNow";
|
|
72
72
|
SvmSpokeInstruction[SvmSpokeInstruction["EmergencyDeleteRootBundle"] = 8] = "EmergencyDeleteRootBundle";
|
|
73
73
|
SvmSpokeInstruction[SvmSpokeInstruction["ExecuteRelayerRefundLeaf"] = 9] = "ExecuteRelayerRefundLeaf";
|
|
74
74
|
SvmSpokeInstruction[SvmSpokeInstruction["ExecuteRelayerRefundLeafDeferred"] = 10] = "ExecuteRelayerRefundLeafDeferred";
|
|
75
|
-
SvmSpokeInstruction[SvmSpokeInstruction["
|
|
76
|
-
SvmSpokeInstruction[SvmSpokeInstruction["
|
|
75
|
+
SvmSpokeInstruction[SvmSpokeInstruction["ExecuteSlowRelayLeaf"] = 11] = "ExecuteSlowRelayLeaf";
|
|
76
|
+
SvmSpokeInstruction[SvmSpokeInstruction["FillRelay"] = 12] = "FillRelay";
|
|
77
77
|
SvmSpokeInstruction[SvmSpokeInstruction["GetUnsafeDepositId"] = 13] = "GetUnsafeDepositId";
|
|
78
78
|
SvmSpokeInstruction[SvmSpokeInstruction["HandleReceiveMessage"] = 14] = "HandleReceiveMessage";
|
|
79
79
|
SvmSpokeInstruction[SvmSpokeInstruction["Initialize"] = 15] = "Initialize";
|
|
@@ -82,12 +82,12 @@ var SvmSpokeInstruction;
|
|
|
82
82
|
SvmSpokeInstruction[SvmSpokeInstruction["PauseDeposits"] = 18] = "PauseDeposits";
|
|
83
83
|
SvmSpokeInstruction[SvmSpokeInstruction["PauseFills"] = 19] = "PauseFills";
|
|
84
84
|
SvmSpokeInstruction[SvmSpokeInstruction["RelayRootBundle"] = 20] = "RelayRootBundle";
|
|
85
|
-
SvmSpokeInstruction[SvmSpokeInstruction["
|
|
85
|
+
SvmSpokeInstruction[SvmSpokeInstruction["RequestSlowFill"] = 21] = "RequestSlowFill";
|
|
86
86
|
SvmSpokeInstruction[SvmSpokeInstruction["SetCrossDomainAdmin"] = 22] = "SetCrossDomainAdmin";
|
|
87
87
|
SvmSpokeInstruction[SvmSpokeInstruction["SetCurrentTime"] = 23] = "SetCurrentTime";
|
|
88
88
|
SvmSpokeInstruction[SvmSpokeInstruction["SetEnableRoute"] = 24] = "SetEnableRoute";
|
|
89
89
|
SvmSpokeInstruction[SvmSpokeInstruction["TransferOwnership"] = 25] = "TransferOwnership";
|
|
90
|
-
SvmSpokeInstruction[SvmSpokeInstruction["
|
|
90
|
+
SvmSpokeInstruction[SvmSpokeInstruction["UnsafeDeposit"] = 26] = "UnsafeDeposit";
|
|
91
91
|
SvmSpokeInstruction[SvmSpokeInstruction["WriteInstructionParamsFragment"] = 27] = "WriteInstructionParamsFragment";
|
|
92
92
|
})(SvmSpokeInstruction || (exports.SvmSpokeInstruction = SvmSpokeInstruction = {}));
|
|
93
93
|
function identifySvmSpokeInstruction(instruction) {
|
|
@@ -110,11 +110,11 @@ function identifySvmSpokeInstruction(instruction) {
|
|
|
110
110
|
if ((0, web3_v2_js_1.containsBytes)(data, (0, web3_v2_js_1.fixEncoderSize)((0, web3_v2_js_1.getBytesEncoder)(), 8).encode(new Uint8Array([163, 216, 49, 204, 97, 16, 80, 167])), 0)) {
|
|
111
111
|
return SvmSpokeInstruction.CreateTokenAccounts;
|
|
112
112
|
}
|
|
113
|
-
if ((0, web3_v2_js_1.containsBytes)(data, (0, web3_v2_js_1.fixEncoderSize)((0, web3_v2_js_1.getBytesEncoder)(), 8).encode(new Uint8Array([
|
|
114
|
-
return SvmSpokeInstruction.
|
|
113
|
+
if ((0, web3_v2_js_1.containsBytes)(data, (0, web3_v2_js_1.fixEncoderSize)((0, web3_v2_js_1.getBytesEncoder)(), 8).encode(new Uint8Array([242, 35, 198, 137, 82, 225, 242, 182])), 0)) {
|
|
114
|
+
return SvmSpokeInstruction.Deposit;
|
|
115
115
|
}
|
|
116
|
-
if ((0, web3_v2_js_1.containsBytes)(data, (0, web3_v2_js_1.fixEncoderSize)((0, web3_v2_js_1.getBytesEncoder)(), 8).encode(new Uint8Array([
|
|
117
|
-
return SvmSpokeInstruction.
|
|
116
|
+
if ((0, web3_v2_js_1.containsBytes)(data, (0, web3_v2_js_1.fixEncoderSize)((0, web3_v2_js_1.getBytesEncoder)(), 8).encode(new Uint8Array([75, 228, 135, 221, 200, 25, 148, 26])), 0)) {
|
|
117
|
+
return SvmSpokeInstruction.DepositNow;
|
|
118
118
|
}
|
|
119
119
|
if ((0, web3_v2_js_1.containsBytes)(data, (0, web3_v2_js_1.fixEncoderSize)((0, web3_v2_js_1.getBytesEncoder)(), 8).encode(new Uint8Array([226, 158, 1, 74, 84, 113, 24, 152])), 0)) {
|
|
120
120
|
return SvmSpokeInstruction.EmergencyDeleteRootBundle;
|
|
@@ -125,11 +125,11 @@ function identifySvmSpokeInstruction(instruction) {
|
|
|
125
125
|
if ((0, web3_v2_js_1.containsBytes)(data, (0, web3_v2_js_1.fixEncoderSize)((0, web3_v2_js_1.getBytesEncoder)(), 8).encode(new Uint8Array([110, 112, 89, 208, 38, 116, 93, 10])), 0)) {
|
|
126
126
|
return SvmSpokeInstruction.ExecuteRelayerRefundLeafDeferred;
|
|
127
127
|
}
|
|
128
|
-
if ((0, web3_v2_js_1.containsBytes)(data, (0, web3_v2_js_1.fixEncoderSize)((0, web3_v2_js_1.getBytesEncoder)(), 8).encode(new Uint8Array([
|
|
129
|
-
return SvmSpokeInstruction.
|
|
128
|
+
if ((0, web3_v2_js_1.containsBytes)(data, (0, web3_v2_js_1.fixEncoderSize)((0, web3_v2_js_1.getBytesEncoder)(), 8).encode(new Uint8Array([26, 207, 3, 168, 193, 252, 59, 127])), 0)) {
|
|
129
|
+
return SvmSpokeInstruction.ExecuteSlowRelayLeaf;
|
|
130
130
|
}
|
|
131
|
-
if ((0, web3_v2_js_1.containsBytes)(data, (0, web3_v2_js_1.fixEncoderSize)((0, web3_v2_js_1.getBytesEncoder)(), 8).encode(new Uint8Array([
|
|
132
|
-
return SvmSpokeInstruction.
|
|
131
|
+
if ((0, web3_v2_js_1.containsBytes)(data, (0, web3_v2_js_1.fixEncoderSize)((0, web3_v2_js_1.getBytesEncoder)(), 8).encode(new Uint8Array([100, 84, 222, 90, 106, 209, 58, 222])), 0)) {
|
|
132
|
+
return SvmSpokeInstruction.FillRelay;
|
|
133
133
|
}
|
|
134
134
|
if ((0, web3_v2_js_1.containsBytes)(data, (0, web3_v2_js_1.fixEncoderSize)((0, web3_v2_js_1.getBytesEncoder)(), 8).encode(new Uint8Array([118, 10, 135, 0, 168, 243, 223, 117])), 0)) {
|
|
135
135
|
return SvmSpokeInstruction.GetUnsafeDepositId;
|
|
@@ -155,8 +155,8 @@ function identifySvmSpokeInstruction(instruction) {
|
|
|
155
155
|
if ((0, web3_v2_js_1.containsBytes)(data, (0, web3_v2_js_1.fixEncoderSize)((0, web3_v2_js_1.getBytesEncoder)(), 8).encode(new Uint8Array([69, 13, 223, 204, 251, 61, 105, 6])), 0)) {
|
|
156
156
|
return SvmSpokeInstruction.RelayRootBundle;
|
|
157
157
|
}
|
|
158
|
-
if ((0, web3_v2_js_1.containsBytes)(data, (0, web3_v2_js_1.fixEncoderSize)((0, web3_v2_js_1.getBytesEncoder)(), 8).encode(new Uint8Array([
|
|
159
|
-
return SvmSpokeInstruction.
|
|
158
|
+
if ((0, web3_v2_js_1.containsBytes)(data, (0, web3_v2_js_1.fixEncoderSize)((0, web3_v2_js_1.getBytesEncoder)(), 8).encode(new Uint8Array([39, 157, 165, 187, 88, 217, 207, 98])), 0)) {
|
|
159
|
+
return SvmSpokeInstruction.RequestSlowFill;
|
|
160
160
|
}
|
|
161
161
|
if ((0, web3_v2_js_1.containsBytes)(data, (0, web3_v2_js_1.fixEncoderSize)((0, web3_v2_js_1.getBytesEncoder)(), 8).encode(new Uint8Array([102, 206, 237, 106, 63, 141, 42, 248])), 0)) {
|
|
162
162
|
return SvmSpokeInstruction.SetCrossDomainAdmin;
|
|
@@ -170,8 +170,8 @@ function identifySvmSpokeInstruction(instruction) {
|
|
|
170
170
|
if ((0, web3_v2_js_1.containsBytes)(data, (0, web3_v2_js_1.fixEncoderSize)((0, web3_v2_js_1.getBytesEncoder)(), 8).encode(new Uint8Array([65, 177, 215, 73, 53, 45, 99, 47])), 0)) {
|
|
171
171
|
return SvmSpokeInstruction.TransferOwnership;
|
|
172
172
|
}
|
|
173
|
-
if ((0, web3_v2_js_1.containsBytes)(data, (0, web3_v2_js_1.fixEncoderSize)((0, web3_v2_js_1.getBytesEncoder)(), 8).encode(new Uint8Array([
|
|
174
|
-
return SvmSpokeInstruction.
|
|
173
|
+
if ((0, web3_v2_js_1.containsBytes)(data, (0, web3_v2_js_1.fixEncoderSize)((0, web3_v2_js_1.getBytesEncoder)(), 8).encode(new Uint8Array([196, 187, 166, 179, 3, 146, 150, 246])), 0)) {
|
|
174
|
+
return SvmSpokeInstruction.UnsafeDeposit;
|
|
175
175
|
}
|
|
176
176
|
if ((0, web3_v2_js_1.containsBytes)(data, (0, web3_v2_js_1.fixEncoderSize)((0, web3_v2_js_1.getBytesEncoder)(), 8).encode(new Uint8Array([238, 182, 109, 113, 124, 255, 72, 18])), 0)) {
|
|
177
177
|
return SvmSpokeInstruction.WriteInstructionParamsFragment;
|
|
@@ -6,8 +6,8 @@
|
|
|
6
6
|
* @see https://github.com/codama-idl/codama
|
|
7
7
|
*/
|
|
8
8
|
import { type Address, type Codec, type Decoder, type Encoder, type ReadonlyUint8Array } from '@solana/web3-v2.js';
|
|
9
|
-
import { type
|
|
10
|
-
export type
|
|
9
|
+
import { type RelayExecutionEventInfo, type RelayExecutionEventInfoArgs } from '.';
|
|
10
|
+
export type FilledRelay = {
|
|
11
11
|
inputToken: Address;
|
|
12
12
|
outputToken: Address;
|
|
13
13
|
inputAmount: bigint;
|
|
@@ -22,9 +22,9 @@ export type FilledV3Relay = {
|
|
|
22
22
|
depositor: Address;
|
|
23
23
|
recipient: Address;
|
|
24
24
|
messageHash: ReadonlyUint8Array;
|
|
25
|
-
relayExecutionInfo:
|
|
25
|
+
relayExecutionInfo: RelayExecutionEventInfo;
|
|
26
26
|
};
|
|
27
|
-
export type
|
|
27
|
+
export type FilledRelayArgs = {
|
|
28
28
|
inputToken: Address;
|
|
29
29
|
outputToken: Address;
|
|
30
30
|
inputAmount: number | bigint;
|
|
@@ -39,8 +39,8 @@ export type FilledV3RelayArgs = {
|
|
|
39
39
|
depositor: Address;
|
|
40
40
|
recipient: Address;
|
|
41
41
|
messageHash: ReadonlyUint8Array;
|
|
42
|
-
relayExecutionInfo:
|
|
42
|
+
relayExecutionInfo: RelayExecutionEventInfoArgs;
|
|
43
43
|
};
|
|
44
|
-
export declare function
|
|
45
|
-
export declare function
|
|
46
|
-
export declare function
|
|
44
|
+
export declare function getFilledRelayEncoder(): Encoder<FilledRelayArgs>;
|
|
45
|
+
export declare function getFilledRelayDecoder(): Decoder<FilledRelay>;
|
|
46
|
+
export declare function getFilledRelayCodec(): Codec<FilledRelayArgs, FilledRelay>;
|
|
@@ -7,12 +7,12 @@
|
|
|
7
7
|
* @see https://github.com/codama-idl/codama
|
|
8
8
|
*/
|
|
9
9
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10
|
-
exports.
|
|
11
|
-
exports.
|
|
12
|
-
exports.
|
|
10
|
+
exports.getFilledRelayEncoder = getFilledRelayEncoder;
|
|
11
|
+
exports.getFilledRelayDecoder = getFilledRelayDecoder;
|
|
12
|
+
exports.getFilledRelayCodec = getFilledRelayCodec;
|
|
13
13
|
const web3_v2_js_1 = require("@solana/web3-v2.js");
|
|
14
14
|
const _1 = require(".");
|
|
15
|
-
function
|
|
15
|
+
function getFilledRelayEncoder() {
|
|
16
16
|
return (0, web3_v2_js_1.getStructEncoder)([
|
|
17
17
|
['inputToken', (0, web3_v2_js_1.getAddressEncoder)()],
|
|
18
18
|
['outputToken', (0, web3_v2_js_1.getAddressEncoder)()],
|
|
@@ -28,10 +28,10 @@ function getFilledV3RelayEncoder() {
|
|
|
28
28
|
['depositor', (0, web3_v2_js_1.getAddressEncoder)()],
|
|
29
29
|
['recipient', (0, web3_v2_js_1.getAddressEncoder)()],
|
|
30
30
|
['messageHash', (0, web3_v2_js_1.fixEncoderSize)((0, web3_v2_js_1.getBytesEncoder)(), 32)],
|
|
31
|
-
['relayExecutionInfo', (0, _1.
|
|
31
|
+
['relayExecutionInfo', (0, _1.getRelayExecutionEventInfoEncoder)()],
|
|
32
32
|
]);
|
|
33
33
|
}
|
|
34
|
-
function
|
|
34
|
+
function getFilledRelayDecoder() {
|
|
35
35
|
return (0, web3_v2_js_1.getStructDecoder)([
|
|
36
36
|
['inputToken', (0, web3_v2_js_1.getAddressDecoder)()],
|
|
37
37
|
['outputToken', (0, web3_v2_js_1.getAddressDecoder)()],
|
|
@@ -47,9 +47,9 @@ function getFilledV3RelayDecoder() {
|
|
|
47
47
|
['depositor', (0, web3_v2_js_1.getAddressDecoder)()],
|
|
48
48
|
['recipient', (0, web3_v2_js_1.getAddressDecoder)()],
|
|
49
49
|
['messageHash', (0, web3_v2_js_1.fixDecoderSize)((0, web3_v2_js_1.getBytesDecoder)(), 32)],
|
|
50
|
-
['relayExecutionInfo', (0, _1.
|
|
50
|
+
['relayExecutionInfo', (0, _1.getRelayExecutionEventInfoDecoder)()],
|
|
51
51
|
]);
|
|
52
52
|
}
|
|
53
|
-
function
|
|
54
|
-
return (0, web3_v2_js_1.combineCodec)(
|
|
53
|
+
function getFilledRelayCodec() {
|
|
54
|
+
return (0, web3_v2_js_1.combineCodec)(getFilledRelayEncoder(), getFilledRelayDecoder());
|
|
55
55
|
}
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
* @see https://github.com/codama-idl/codama
|
|
7
7
|
*/
|
|
8
8
|
import { type Address, type Codec, type Decoder, type Encoder, type ReadonlyUint8Array } from '@solana/web3-v2.js';
|
|
9
|
-
export type
|
|
9
|
+
export type FundsDeposited = {
|
|
10
10
|
inputToken: Address;
|
|
11
11
|
outputToken: Address;
|
|
12
12
|
inputAmount: bigint;
|
|
@@ -21,7 +21,7 @@ export type V3FundsDeposited = {
|
|
|
21
21
|
exclusiveRelayer: Address;
|
|
22
22
|
message: ReadonlyUint8Array;
|
|
23
23
|
};
|
|
24
|
-
export type
|
|
24
|
+
export type FundsDepositedArgs = {
|
|
25
25
|
inputToken: Address;
|
|
26
26
|
outputToken: Address;
|
|
27
27
|
inputAmount: number | bigint;
|
|
@@ -36,6 +36,6 @@ export type V3FundsDepositedArgs = {
|
|
|
36
36
|
exclusiveRelayer: Address;
|
|
37
37
|
message: ReadonlyUint8Array;
|
|
38
38
|
};
|
|
39
|
-
export declare function
|
|
40
|
-
export declare function
|
|
41
|
-
export declare function
|
|
39
|
+
export declare function getFundsDepositedEncoder(): Encoder<FundsDepositedArgs>;
|
|
40
|
+
export declare function getFundsDepositedDecoder(): Decoder<FundsDeposited>;
|
|
41
|
+
export declare function getFundsDepositedCodec(): Codec<FundsDepositedArgs, FundsDeposited>;
|
|
@@ -7,11 +7,11 @@
|
|
|
7
7
|
* @see https://github.com/codama-idl/codama
|
|
8
8
|
*/
|
|
9
9
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10
|
-
exports.
|
|
11
|
-
exports.
|
|
12
|
-
exports.
|
|
10
|
+
exports.getFundsDepositedEncoder = getFundsDepositedEncoder;
|
|
11
|
+
exports.getFundsDepositedDecoder = getFundsDepositedDecoder;
|
|
12
|
+
exports.getFundsDepositedCodec = getFundsDepositedCodec;
|
|
13
13
|
const web3_v2_js_1 = require("@solana/web3-v2.js");
|
|
14
|
-
function
|
|
14
|
+
function getFundsDepositedEncoder() {
|
|
15
15
|
return (0, web3_v2_js_1.getStructEncoder)([
|
|
16
16
|
['inputToken', (0, web3_v2_js_1.getAddressEncoder)()],
|
|
17
17
|
['outputToken', (0, web3_v2_js_1.getAddressEncoder)()],
|
|
@@ -28,7 +28,7 @@ function getV3FundsDepositedEncoder() {
|
|
|
28
28
|
['message', (0, web3_v2_js_1.addEncoderSizePrefix)((0, web3_v2_js_1.getBytesEncoder)(), (0, web3_v2_js_1.getU32Encoder)())],
|
|
29
29
|
]);
|
|
30
30
|
}
|
|
31
|
-
function
|
|
31
|
+
function getFundsDepositedDecoder() {
|
|
32
32
|
return (0, web3_v2_js_1.getStructDecoder)([
|
|
33
33
|
['inputToken', (0, web3_v2_js_1.getAddressDecoder)()],
|
|
34
34
|
['outputToken', (0, web3_v2_js_1.getAddressDecoder)()],
|
|
@@ -45,6 +45,6 @@ function getV3FundsDepositedDecoder() {
|
|
|
45
45
|
['message', (0, web3_v2_js_1.addDecoderSizePrefix)((0, web3_v2_js_1.getBytesDecoder)(), (0, web3_v2_js_1.getU32Decoder)())],
|
|
46
46
|
]);
|
|
47
47
|
}
|
|
48
|
-
function
|
|
49
|
-
return (0, web3_v2_js_1.combineCodec)(
|
|
48
|
+
function getFundsDepositedCodec() {
|
|
49
|
+
return (0, web3_v2_js_1.combineCodec)(getFundsDepositedEncoder(), getFundsDepositedDecoder());
|
|
50
50
|
}
|
|
@@ -10,18 +10,18 @@ export * from './claimedRelayerRefund';
|
|
|
10
10
|
export * from './emergencyDeletedRootBundle';
|
|
11
11
|
export * from './enabledDepositRoute';
|
|
12
12
|
export * from './executedRelayerRefundRoot';
|
|
13
|
-
export * from './
|
|
13
|
+
export * from './filledRelay';
|
|
14
14
|
export * from './fillStatus';
|
|
15
15
|
export * from './fillType';
|
|
16
|
+
export * from './fundsDeposited';
|
|
16
17
|
export * from './pausedDeposits';
|
|
17
18
|
export * from './pausedFills';
|
|
19
|
+
export * from './relayData';
|
|
18
20
|
export * from './relayedRootBundle';
|
|
19
21
|
export * from './relayerRefundLeaf';
|
|
20
|
-
export * from './
|
|
22
|
+
export * from './relayExecutionEventInfo';
|
|
23
|
+
export * from './requestedSlowFill';
|
|
21
24
|
export * from './setXDomainAdmin';
|
|
25
|
+
export * from './slowFill';
|
|
22
26
|
export * from './tokensBridged';
|
|
23
27
|
export * from './transferredOwnership';
|
|
24
|
-
export * from './v3FundsDeposited';
|
|
25
|
-
export * from './v3RelayData';
|
|
26
|
-
export * from './v3RelayExecutionEventInfo';
|
|
27
|
-
export * from './v3SlowFill';
|
|
@@ -26,18 +26,18 @@ __exportStar(require("./claimedRelayerRefund"), exports);
|
|
|
26
26
|
__exportStar(require("./emergencyDeletedRootBundle"), exports);
|
|
27
27
|
__exportStar(require("./enabledDepositRoute"), exports);
|
|
28
28
|
__exportStar(require("./executedRelayerRefundRoot"), exports);
|
|
29
|
-
__exportStar(require("./
|
|
29
|
+
__exportStar(require("./filledRelay"), exports);
|
|
30
30
|
__exportStar(require("./fillStatus"), exports);
|
|
31
31
|
__exportStar(require("./fillType"), exports);
|
|
32
|
+
__exportStar(require("./fundsDeposited"), exports);
|
|
32
33
|
__exportStar(require("./pausedDeposits"), exports);
|
|
33
34
|
__exportStar(require("./pausedFills"), exports);
|
|
35
|
+
__exportStar(require("./relayData"), exports);
|
|
34
36
|
__exportStar(require("./relayedRootBundle"), exports);
|
|
35
37
|
__exportStar(require("./relayerRefundLeaf"), exports);
|
|
36
|
-
__exportStar(require("./
|
|
38
|
+
__exportStar(require("./relayExecutionEventInfo"), exports);
|
|
39
|
+
__exportStar(require("./requestedSlowFill"), exports);
|
|
37
40
|
__exportStar(require("./setXDomainAdmin"), exports);
|
|
41
|
+
__exportStar(require("./slowFill"), exports);
|
|
38
42
|
__exportStar(require("./tokensBridged"), exports);
|
|
39
43
|
__exportStar(require("./transferredOwnership"), exports);
|
|
40
|
-
__exportStar(require("./v3FundsDeposited"), exports);
|
|
41
|
-
__exportStar(require("./v3RelayData"), exports);
|
|
42
|
-
__exportStar(require("./v3RelayExecutionEventInfo"), exports);
|
|
43
|
-
__exportStar(require("./v3SlowFill"), exports);
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
* @see https://github.com/codama-idl/codama
|
|
7
7
|
*/
|
|
8
8
|
import { type Address, type Codec, type Decoder, type Encoder, type ReadonlyUint8Array } from '@solana/web3-v2.js';
|
|
9
|
-
export type
|
|
9
|
+
export type RelayData = {
|
|
10
10
|
depositor: Address;
|
|
11
11
|
recipient: Address;
|
|
12
12
|
exclusiveRelayer: Address;
|
|
@@ -20,7 +20,7 @@ export type V3RelayData = {
|
|
|
20
20
|
exclusivityDeadline: number;
|
|
21
21
|
message: ReadonlyUint8Array;
|
|
22
22
|
};
|
|
23
|
-
export type
|
|
23
|
+
export type RelayDataArgs = {
|
|
24
24
|
depositor: Address;
|
|
25
25
|
recipient: Address;
|
|
26
26
|
exclusiveRelayer: Address;
|
|
@@ -34,6 +34,6 @@ export type V3RelayDataArgs = {
|
|
|
34
34
|
exclusivityDeadline: number;
|
|
35
35
|
message: ReadonlyUint8Array;
|
|
36
36
|
};
|
|
37
|
-
export declare function
|
|
38
|
-
export declare function
|
|
39
|
-
export declare function
|
|
37
|
+
export declare function getRelayDataEncoder(): Encoder<RelayDataArgs>;
|
|
38
|
+
export declare function getRelayDataDecoder(): Decoder<RelayData>;
|
|
39
|
+
export declare function getRelayDataCodec(): Codec<RelayDataArgs, RelayData>;
|
|
@@ -7,11 +7,11 @@
|
|
|
7
7
|
* @see https://github.com/codama-idl/codama
|
|
8
8
|
*/
|
|
9
9
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10
|
-
exports.
|
|
11
|
-
exports.
|
|
12
|
-
exports.
|
|
10
|
+
exports.getRelayDataEncoder = getRelayDataEncoder;
|
|
11
|
+
exports.getRelayDataDecoder = getRelayDataDecoder;
|
|
12
|
+
exports.getRelayDataCodec = getRelayDataCodec;
|
|
13
13
|
const web3_v2_js_1 = require("@solana/web3-v2.js");
|
|
14
|
-
function
|
|
14
|
+
function getRelayDataEncoder() {
|
|
15
15
|
return (0, web3_v2_js_1.getStructEncoder)([
|
|
16
16
|
['depositor', (0, web3_v2_js_1.getAddressEncoder)()],
|
|
17
17
|
['recipient', (0, web3_v2_js_1.getAddressEncoder)()],
|
|
@@ -27,7 +27,7 @@ function getV3RelayDataEncoder() {
|
|
|
27
27
|
['message', (0, web3_v2_js_1.addEncoderSizePrefix)((0, web3_v2_js_1.getBytesEncoder)(), (0, web3_v2_js_1.getU32Encoder)())],
|
|
28
28
|
]);
|
|
29
29
|
}
|
|
30
|
-
function
|
|
30
|
+
function getRelayDataDecoder() {
|
|
31
31
|
return (0, web3_v2_js_1.getStructDecoder)([
|
|
32
32
|
['depositor', (0, web3_v2_js_1.getAddressDecoder)()],
|
|
33
33
|
['recipient', (0, web3_v2_js_1.getAddressDecoder)()],
|
|
@@ -43,6 +43,6 @@ function getV3RelayDataDecoder() {
|
|
|
43
43
|
['message', (0, web3_v2_js_1.addDecoderSizePrefix)((0, web3_v2_js_1.getBytesDecoder)(), (0, web3_v2_js_1.getU32Decoder)())],
|
|
44
44
|
]);
|
|
45
45
|
}
|
|
46
|
-
function
|
|
47
|
-
return (0, web3_v2_js_1.combineCodec)(
|
|
46
|
+
function getRelayDataCodec() {
|
|
47
|
+
return (0, web3_v2_js_1.combineCodec)(getRelayDataEncoder(), getRelayDataDecoder());
|
|
48
48
|
}
|
|
@@ -7,18 +7,18 @@
|
|
|
7
7
|
*/
|
|
8
8
|
import { type Address, type Codec, type Decoder, type Encoder, type ReadonlyUint8Array } from '@solana/web3-v2.js';
|
|
9
9
|
import { type FillType, type FillTypeArgs } from '.';
|
|
10
|
-
export type
|
|
10
|
+
export type RelayExecutionEventInfo = {
|
|
11
11
|
updatedRecipient: Address;
|
|
12
12
|
updatedMessageHash: ReadonlyUint8Array;
|
|
13
13
|
updatedOutputAmount: bigint;
|
|
14
14
|
fillType: FillType;
|
|
15
15
|
};
|
|
16
|
-
export type
|
|
16
|
+
export type RelayExecutionEventInfoArgs = {
|
|
17
17
|
updatedRecipient: Address;
|
|
18
18
|
updatedMessageHash: ReadonlyUint8Array;
|
|
19
19
|
updatedOutputAmount: number | bigint;
|
|
20
20
|
fillType: FillTypeArgs;
|
|
21
21
|
};
|
|
22
|
-
export declare function
|
|
23
|
-
export declare function
|
|
24
|
-
export declare function
|
|
22
|
+
export declare function getRelayExecutionEventInfoEncoder(): Encoder<RelayExecutionEventInfoArgs>;
|
|
23
|
+
export declare function getRelayExecutionEventInfoDecoder(): Decoder<RelayExecutionEventInfo>;
|
|
24
|
+
export declare function getRelayExecutionEventInfoCodec(): Codec<RelayExecutionEventInfoArgs, RelayExecutionEventInfo>;
|
|
@@ -7,12 +7,12 @@
|
|
|
7
7
|
* @see https://github.com/codama-idl/codama
|
|
8
8
|
*/
|
|
9
9
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10
|
-
exports.
|
|
11
|
-
exports.
|
|
12
|
-
exports.
|
|
10
|
+
exports.getRelayExecutionEventInfoEncoder = getRelayExecutionEventInfoEncoder;
|
|
11
|
+
exports.getRelayExecutionEventInfoDecoder = getRelayExecutionEventInfoDecoder;
|
|
12
|
+
exports.getRelayExecutionEventInfoCodec = getRelayExecutionEventInfoCodec;
|
|
13
13
|
const web3_v2_js_1 = require("@solana/web3-v2.js");
|
|
14
14
|
const _1 = require(".");
|
|
15
|
-
function
|
|
15
|
+
function getRelayExecutionEventInfoEncoder() {
|
|
16
16
|
return (0, web3_v2_js_1.getStructEncoder)([
|
|
17
17
|
['updatedRecipient', (0, web3_v2_js_1.getAddressEncoder)()],
|
|
18
18
|
['updatedMessageHash', (0, web3_v2_js_1.fixEncoderSize)((0, web3_v2_js_1.getBytesEncoder)(), 32)],
|
|
@@ -20,7 +20,7 @@ function getV3RelayExecutionEventInfoEncoder() {
|
|
|
20
20
|
['fillType', (0, _1.getFillTypeEncoder)()],
|
|
21
21
|
]);
|
|
22
22
|
}
|
|
23
|
-
function
|
|
23
|
+
function getRelayExecutionEventInfoDecoder() {
|
|
24
24
|
return (0, web3_v2_js_1.getStructDecoder)([
|
|
25
25
|
['updatedRecipient', (0, web3_v2_js_1.getAddressDecoder)()],
|
|
26
26
|
['updatedMessageHash', (0, web3_v2_js_1.fixDecoderSize)((0, web3_v2_js_1.getBytesDecoder)(), 32)],
|
|
@@ -28,6 +28,6 @@ function getV3RelayExecutionEventInfoDecoder() {
|
|
|
28
28
|
['fillType', (0, _1.getFillTypeDecoder)()],
|
|
29
29
|
]);
|
|
30
30
|
}
|
|
31
|
-
function
|
|
32
|
-
return (0, web3_v2_js_1.combineCodec)(
|
|
31
|
+
function getRelayExecutionEventInfoCodec() {
|
|
32
|
+
return (0, web3_v2_js_1.combineCodec)(getRelayExecutionEventInfoEncoder(), getRelayExecutionEventInfoDecoder());
|
|
33
33
|
}
|
package/dist/src/svm/clients/SvmSpoke/types/{requestedV3SlowFill.d.ts → requestedSlowFill.d.ts}
RENAMED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
* @see https://github.com/codama-idl/codama
|
|
7
7
|
*/
|
|
8
8
|
import { type Address, type Codec, type Decoder, type Encoder, type ReadonlyUint8Array } from '@solana/web3-v2.js';
|
|
9
|
-
export type
|
|
9
|
+
export type RequestedSlowFill = {
|
|
10
10
|
inputToken: Address;
|
|
11
11
|
outputToken: Address;
|
|
12
12
|
inputAmount: bigint;
|
|
@@ -20,7 +20,7 @@ export type RequestedV3SlowFill = {
|
|
|
20
20
|
recipient: Address;
|
|
21
21
|
messageHash: ReadonlyUint8Array;
|
|
22
22
|
};
|
|
23
|
-
export type
|
|
23
|
+
export type RequestedSlowFillArgs = {
|
|
24
24
|
inputToken: Address;
|
|
25
25
|
outputToken: Address;
|
|
26
26
|
inputAmount: number | bigint;
|
|
@@ -34,6 +34,6 @@ export type RequestedV3SlowFillArgs = {
|
|
|
34
34
|
recipient: Address;
|
|
35
35
|
messageHash: ReadonlyUint8Array;
|
|
36
36
|
};
|
|
37
|
-
export declare function
|
|
38
|
-
export declare function
|
|
39
|
-
export declare function
|
|
37
|
+
export declare function getRequestedSlowFillEncoder(): Encoder<RequestedSlowFillArgs>;
|
|
38
|
+
export declare function getRequestedSlowFillDecoder(): Decoder<RequestedSlowFill>;
|
|
39
|
+
export declare function getRequestedSlowFillCodec(): Codec<RequestedSlowFillArgs, RequestedSlowFill>;
|
|
@@ -7,11 +7,11 @@
|
|
|
7
7
|
* @see https://github.com/codama-idl/codama
|
|
8
8
|
*/
|
|
9
9
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10
|
-
exports.
|
|
11
|
-
exports.
|
|
12
|
-
exports.
|
|
10
|
+
exports.getRequestedSlowFillEncoder = getRequestedSlowFillEncoder;
|
|
11
|
+
exports.getRequestedSlowFillDecoder = getRequestedSlowFillDecoder;
|
|
12
|
+
exports.getRequestedSlowFillCodec = getRequestedSlowFillCodec;
|
|
13
13
|
const web3_v2_js_1 = require("@solana/web3-v2.js");
|
|
14
|
-
function
|
|
14
|
+
function getRequestedSlowFillEncoder() {
|
|
15
15
|
return (0, web3_v2_js_1.getStructEncoder)([
|
|
16
16
|
['inputToken', (0, web3_v2_js_1.getAddressEncoder)()],
|
|
17
17
|
['outputToken', (0, web3_v2_js_1.getAddressEncoder)()],
|
|
@@ -27,7 +27,7 @@ function getRequestedV3SlowFillEncoder() {
|
|
|
27
27
|
['messageHash', (0, web3_v2_js_1.fixEncoderSize)((0, web3_v2_js_1.getBytesEncoder)(), 32)],
|
|
28
28
|
]);
|
|
29
29
|
}
|
|
30
|
-
function
|
|
30
|
+
function getRequestedSlowFillDecoder() {
|
|
31
31
|
return (0, web3_v2_js_1.getStructDecoder)([
|
|
32
32
|
['inputToken', (0, web3_v2_js_1.getAddressDecoder)()],
|
|
33
33
|
['outputToken', (0, web3_v2_js_1.getAddressDecoder)()],
|
|
@@ -43,6 +43,6 @@ function getRequestedV3SlowFillDecoder() {
|
|
|
43
43
|
['messageHash', (0, web3_v2_js_1.fixDecoderSize)((0, web3_v2_js_1.getBytesDecoder)(), 32)],
|
|
44
44
|
]);
|
|
45
45
|
}
|
|
46
|
-
function
|
|
47
|
-
return (0, web3_v2_js_1.combineCodec)(
|
|
46
|
+
function getRequestedSlowFillCodec() {
|
|
47
|
+
return (0, web3_v2_js_1.combineCodec)(getRequestedSlowFillEncoder(), getRequestedSlowFillDecoder());
|
|
48
48
|
}
|