@across-protocol/contracts 6.0.0-beta.2 → 6.0.0-beta.4
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 +195 -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/index.d.ts +5 -7
- package/dist/src/svm/assets/idl/index.js +6 -14
- 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/index.d.ts +2 -3
- package/dist/src/svm/assets/index.js +0 -1
- 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 +51 -65
- 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 +28 -13
- package/svm/idl/multicall_handler.json +31 -0
- package/svm/idl/sponsored_cctp_src_periphery.json +1982 -0
- package/svm/idl/svm_spoke.json +3930 -0
- package/dist/src/svm/assets/idl/test.json +0 -243
- package/dist/src/svm/assets/test.d.ts +0 -249
- package/dist/src/svm/assets/test.js +0 -2
- 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
|
@@ -21,6 +21,9 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
21
21
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
22
22
|
};
|
|
23
23
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
24
|
+
__exportStar(require("./acrossDepositInput"), exports);
|
|
25
|
+
__exportStar(require("./acrossDepositJitParams"), exports);
|
|
26
|
+
__exportStar(require("./acrossDepositParams"), exports);
|
|
24
27
|
__exportStar(require("./claimedRelayerRefund"), exports);
|
|
25
28
|
__exportStar(require("./emergencyDeletedRootBundle"), exports);
|
|
26
29
|
__exportStar(require("./executedRelayerRefundRoot"), exports);
|
|
@@ -36,5 +39,10 @@ __exportStar(require("./relayerRefundLeaf"), exports);
|
|
|
36
39
|
__exportStar(require("./relayExecutionEventInfo"), exports);
|
|
37
40
|
__exportStar(require("./requestedSlowFill"), exports);
|
|
38
41
|
__exportStar(require("./setXDomainAdmin"), exports);
|
|
39
|
-
__exportStar(require("./slowFill"), exports);
|
|
40
42
|
__exportStar(require("./transferredOwnership"), exports);
|
|
43
|
+
__exportStar(require("./v5AdapterInput"), exports);
|
|
44
|
+
__exportStar(require("./v5DepositModificationRules"), exports);
|
|
45
|
+
__exportStar(require("./v5FillFloatWithdrawn"), exports);
|
|
46
|
+
__exportStar(require("./v5FillInput"), exports);
|
|
47
|
+
__exportStar(require("./v5FillJit"), exports);
|
|
48
|
+
__exportStar(require("./v5InputAmountMode"), exports);
|
|
@@ -0,0 +1,39 @@
|
|
|
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 GetDiscriminatedUnionVariant, type GetDiscriminatedUnionVariantContent } from '@solana/kit';
|
|
9
|
+
import { type AcrossDepositInput, type AcrossDepositInputArgs, type V5FillInput, type V5FillInputArgs } from '.';
|
|
10
|
+
/**
|
|
11
|
+
* Committed input for an Across V5 adapter call.
|
|
12
|
+
*
|
|
13
|
+
* `V5` is the Across protocol generation; each variant's `V1` is its SVM wire-schema revision. Borsh discriminants
|
|
14
|
+
* are frozen as `DepositV1 = 0` and `FillV1 = 1`. Append a new versioned variant when one payload changes; never
|
|
15
|
+
* reorder existing variants. A safe old variant may remain accepted while in-flight inputs drain, while an unsafe
|
|
16
|
+
* variant can be rejected immediately.
|
|
17
|
+
*/
|
|
18
|
+
export type V5AdapterInput = {
|
|
19
|
+
__kind: 'DepositV1';
|
|
20
|
+
fields: readonly [AcrossDepositInput];
|
|
21
|
+
} | {
|
|
22
|
+
__kind: 'FillV1';
|
|
23
|
+
fields: readonly [V5FillInput];
|
|
24
|
+
};
|
|
25
|
+
export type V5AdapterInputArgs = {
|
|
26
|
+
__kind: 'DepositV1';
|
|
27
|
+
fields: readonly [AcrossDepositInputArgs];
|
|
28
|
+
} | {
|
|
29
|
+
__kind: 'FillV1';
|
|
30
|
+
fields: readonly [V5FillInputArgs];
|
|
31
|
+
};
|
|
32
|
+
export declare function getV5AdapterInputEncoder(): Encoder<V5AdapterInputArgs>;
|
|
33
|
+
export declare function getV5AdapterInputDecoder(): Decoder<V5AdapterInput>;
|
|
34
|
+
export declare function getV5AdapterInputCodec(): Codec<V5AdapterInputArgs, V5AdapterInput>;
|
|
35
|
+
export declare function v5AdapterInput(kind: 'DepositV1', data: GetDiscriminatedUnionVariantContent<V5AdapterInputArgs, '__kind', 'DepositV1'>['fields']): GetDiscriminatedUnionVariant<V5AdapterInputArgs, '__kind', 'DepositV1'>;
|
|
36
|
+
export declare function v5AdapterInput(kind: 'FillV1', data: GetDiscriminatedUnionVariantContent<V5AdapterInputArgs, '__kind', 'FillV1'>['fields']): GetDiscriminatedUnionVariant<V5AdapterInputArgs, '__kind', 'FillV1'>;
|
|
37
|
+
export declare function isV5AdapterInput<K extends V5AdapterInput['__kind']>(kind: K, value: V5AdapterInput): value is V5AdapterInput & {
|
|
38
|
+
__kind: K;
|
|
39
|
+
};
|
|
@@ -0,0 +1,59 @@
|
|
|
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.getV5AdapterInputEncoder = getV5AdapterInputEncoder;
|
|
11
|
+
exports.getV5AdapterInputDecoder = getV5AdapterInputDecoder;
|
|
12
|
+
exports.getV5AdapterInputCodec = getV5AdapterInputCodec;
|
|
13
|
+
exports.v5AdapterInput = v5AdapterInput;
|
|
14
|
+
exports.isV5AdapterInput = isV5AdapterInput;
|
|
15
|
+
const kit_1 = require("@solana/kit");
|
|
16
|
+
const _1 = require(".");
|
|
17
|
+
function getV5AdapterInputEncoder() {
|
|
18
|
+
return (0, kit_1.getDiscriminatedUnionEncoder)([
|
|
19
|
+
[
|
|
20
|
+
'DepositV1',
|
|
21
|
+
(0, kit_1.getStructEncoder)([
|
|
22
|
+
['fields', (0, kit_1.getTupleEncoder)([(0, _1.getAcrossDepositInputEncoder)()])],
|
|
23
|
+
]),
|
|
24
|
+
],
|
|
25
|
+
[
|
|
26
|
+
'FillV1',
|
|
27
|
+
(0, kit_1.getStructEncoder)([
|
|
28
|
+
['fields', (0, kit_1.getTupleEncoder)([(0, _1.getV5FillInputEncoder)()])],
|
|
29
|
+
]),
|
|
30
|
+
],
|
|
31
|
+
]);
|
|
32
|
+
}
|
|
33
|
+
function getV5AdapterInputDecoder() {
|
|
34
|
+
return (0, kit_1.getDiscriminatedUnionDecoder)([
|
|
35
|
+
[
|
|
36
|
+
'DepositV1',
|
|
37
|
+
(0, kit_1.getStructDecoder)([
|
|
38
|
+
['fields', (0, kit_1.getTupleDecoder)([(0, _1.getAcrossDepositInputDecoder)()])],
|
|
39
|
+
]),
|
|
40
|
+
],
|
|
41
|
+
[
|
|
42
|
+
'FillV1',
|
|
43
|
+
(0, kit_1.getStructDecoder)([
|
|
44
|
+
['fields', (0, kit_1.getTupleDecoder)([(0, _1.getV5FillInputDecoder)()])],
|
|
45
|
+
]),
|
|
46
|
+
],
|
|
47
|
+
]);
|
|
48
|
+
}
|
|
49
|
+
function getV5AdapterInputCodec() {
|
|
50
|
+
return (0, kit_1.combineCodec)(getV5AdapterInputEncoder(), getV5AdapterInputDecoder());
|
|
51
|
+
}
|
|
52
|
+
function v5AdapterInput(kind, data) {
|
|
53
|
+
return Array.isArray(data)
|
|
54
|
+
? { __kind: kind, fields: data }
|
|
55
|
+
: { __kind: kind, ...(data ?? {}) };
|
|
56
|
+
}
|
|
57
|
+
function isV5AdapterInput(kind, value) {
|
|
58
|
+
return value.__kind === kind;
|
|
59
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
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
|
+
export type V5DepositModificationRules = {
|
|
10
|
+
authority: ReadonlyUint8Array;
|
|
11
|
+
allowOutputAmount: boolean;
|
|
12
|
+
allowExclusiveRelayer: boolean;
|
|
13
|
+
};
|
|
14
|
+
export type V5DepositModificationRulesArgs = V5DepositModificationRules;
|
|
15
|
+
export declare function getV5DepositModificationRulesEncoder(): Encoder<V5DepositModificationRulesArgs>;
|
|
16
|
+
export declare function getV5DepositModificationRulesDecoder(): Decoder<V5DepositModificationRules>;
|
|
17
|
+
export declare function getV5DepositModificationRulesCodec(): Codec<V5DepositModificationRulesArgs, V5DepositModificationRules>;
|
|
@@ -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.getV5DepositModificationRulesEncoder = getV5DepositModificationRulesEncoder;
|
|
11
|
+
exports.getV5DepositModificationRulesDecoder = getV5DepositModificationRulesDecoder;
|
|
12
|
+
exports.getV5DepositModificationRulesCodec = getV5DepositModificationRulesCodec;
|
|
13
|
+
const kit_1 = require("@solana/kit");
|
|
14
|
+
function getV5DepositModificationRulesEncoder() {
|
|
15
|
+
return (0, kit_1.getStructEncoder)([
|
|
16
|
+
['authority', (0, kit_1.fixEncoderSize)((0, kit_1.getBytesEncoder)(), 20)],
|
|
17
|
+
['allowOutputAmount', (0, kit_1.getBooleanEncoder)()],
|
|
18
|
+
['allowExclusiveRelayer', (0, kit_1.getBooleanEncoder)()],
|
|
19
|
+
]);
|
|
20
|
+
}
|
|
21
|
+
function getV5DepositModificationRulesDecoder() {
|
|
22
|
+
return (0, kit_1.getStructDecoder)([
|
|
23
|
+
['authority', (0, kit_1.fixDecoderSize)((0, kit_1.getBytesDecoder)(), 20)],
|
|
24
|
+
['allowOutputAmount', (0, kit_1.getBooleanDecoder)()],
|
|
25
|
+
['allowExclusiveRelayer', (0, kit_1.getBooleanDecoder)()],
|
|
26
|
+
]);
|
|
27
|
+
}
|
|
28
|
+
function getV5DepositModificationRulesCodec() {
|
|
29
|
+
return (0, kit_1.combineCodec)(getV5DepositModificationRulesEncoder(), getV5DepositModificationRulesDecoder());
|
|
30
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
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 } from '@solana/kit';
|
|
9
|
+
export type V5FillFloatWithdrawn = {
|
|
10
|
+
submitter: Address;
|
|
11
|
+
amount: bigint;
|
|
12
|
+
};
|
|
13
|
+
export type V5FillFloatWithdrawnArgs = {
|
|
14
|
+
submitter: Address;
|
|
15
|
+
amount: number | bigint;
|
|
16
|
+
};
|
|
17
|
+
export declare function getV5FillFloatWithdrawnEncoder(): Encoder<V5FillFloatWithdrawnArgs>;
|
|
18
|
+
export declare function getV5FillFloatWithdrawnDecoder(): Decoder<V5FillFloatWithdrawn>;
|
|
19
|
+
export declare function getV5FillFloatWithdrawnCodec(): Codec<V5FillFloatWithdrawnArgs, V5FillFloatWithdrawn>;
|
|
@@ -0,0 +1,28 @@
|
|
|
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.getV5FillFloatWithdrawnEncoder = getV5FillFloatWithdrawnEncoder;
|
|
11
|
+
exports.getV5FillFloatWithdrawnDecoder = getV5FillFloatWithdrawnDecoder;
|
|
12
|
+
exports.getV5FillFloatWithdrawnCodec = getV5FillFloatWithdrawnCodec;
|
|
13
|
+
const kit_1 = require("@solana/kit");
|
|
14
|
+
function getV5FillFloatWithdrawnEncoder() {
|
|
15
|
+
return (0, kit_1.getStructEncoder)([
|
|
16
|
+
['submitter', (0, kit_1.getAddressEncoder)()],
|
|
17
|
+
['amount', (0, kit_1.getU64Encoder)()],
|
|
18
|
+
]);
|
|
19
|
+
}
|
|
20
|
+
function getV5FillFloatWithdrawnDecoder() {
|
|
21
|
+
return (0, kit_1.getStructDecoder)([
|
|
22
|
+
['submitter', (0, kit_1.getAddressDecoder)()],
|
|
23
|
+
['amount', (0, kit_1.getU64Decoder)()],
|
|
24
|
+
]);
|
|
25
|
+
}
|
|
26
|
+
function getV5FillFloatWithdrawnCodec() {
|
|
27
|
+
return (0, kit_1.combineCodec)(getV5FillFloatWithdrawnEncoder(), getV5FillFloatWithdrawnDecoder());
|
|
28
|
+
}
|
|
@@ -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 Address, type Codec, type Decoder, type Encoder } from '@solana/kit';
|
|
9
|
+
/**
|
|
10
|
+
* Destination acceptance bounds. Unlike the EVM executor-mode input, the SVM adapter omits a callback message
|
|
11
|
+
* because V5 adapter fills do not execute recipient callbacks.
|
|
12
|
+
*/
|
|
13
|
+
export type V5FillInput = {
|
|
14
|
+
recipient: Address;
|
|
15
|
+
outputToken: Address;
|
|
16
|
+
minOutputAmount: bigint;
|
|
17
|
+
};
|
|
18
|
+
export type V5FillInputArgs = {
|
|
19
|
+
recipient: Address;
|
|
20
|
+
outputToken: Address;
|
|
21
|
+
minOutputAmount: number | bigint;
|
|
22
|
+
};
|
|
23
|
+
export declare function getV5FillInputEncoder(): Encoder<V5FillInputArgs>;
|
|
24
|
+
export declare function getV5FillInputDecoder(): Decoder<V5FillInput>;
|
|
25
|
+
export declare function getV5FillInputCodec(): Codec<V5FillInputArgs, V5FillInput>;
|
|
@@ -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.getV5FillInputEncoder = getV5FillInputEncoder;
|
|
11
|
+
exports.getV5FillInputDecoder = getV5FillInputDecoder;
|
|
12
|
+
exports.getV5FillInputCodec = getV5FillInputCodec;
|
|
13
|
+
const kit_1 = require("@solana/kit");
|
|
14
|
+
function getV5FillInputEncoder() {
|
|
15
|
+
return (0, kit_1.getStructEncoder)([
|
|
16
|
+
['recipient', (0, kit_1.getAddressEncoder)()],
|
|
17
|
+
['outputToken', (0, kit_1.getAddressEncoder)()],
|
|
18
|
+
['minOutputAmount', (0, kit_1.getU64Encoder)()],
|
|
19
|
+
]);
|
|
20
|
+
}
|
|
21
|
+
function getV5FillInputDecoder() {
|
|
22
|
+
return (0, kit_1.getStructDecoder)([
|
|
23
|
+
['recipient', (0, kit_1.getAddressDecoder)()],
|
|
24
|
+
['outputToken', (0, kit_1.getAddressDecoder)()],
|
|
25
|
+
['minOutputAmount', (0, kit_1.getU64Decoder)()],
|
|
26
|
+
]);
|
|
27
|
+
}
|
|
28
|
+
function getV5FillInputCodec() {
|
|
29
|
+
return (0, kit_1.combineCodec)(getV5FillInputEncoder(), getV5FillInputDecoder());
|
|
30
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
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 } from '@solana/kit';
|
|
9
|
+
import { type RelayData, type RelayDataArgs } from '.';
|
|
10
|
+
export type V5FillJit = {
|
|
11
|
+
relayData: RelayData;
|
|
12
|
+
repaymentChainId: bigint;
|
|
13
|
+
repaymentAddress: Address;
|
|
14
|
+
};
|
|
15
|
+
export type V5FillJitArgs = {
|
|
16
|
+
relayData: RelayDataArgs;
|
|
17
|
+
repaymentChainId: number | bigint;
|
|
18
|
+
repaymentAddress: Address;
|
|
19
|
+
};
|
|
20
|
+
export declare function getV5FillJitEncoder(): Encoder<V5FillJitArgs>;
|
|
21
|
+
export declare function getV5FillJitDecoder(): Decoder<V5FillJit>;
|
|
22
|
+
export declare function getV5FillJitCodec(): Codec<V5FillJitArgs, V5FillJit>;
|
|
@@ -7,25 +7,25 @@
|
|
|
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.getV5FillJitEncoder = getV5FillJitEncoder;
|
|
11
|
+
exports.getV5FillJitDecoder = getV5FillJitDecoder;
|
|
12
|
+
exports.getV5FillJitCodec = getV5FillJitCodec;
|
|
13
13
|
const kit_1 = require("@solana/kit");
|
|
14
14
|
const _1 = require(".");
|
|
15
|
-
function
|
|
15
|
+
function getV5FillJitEncoder() {
|
|
16
16
|
return (0, kit_1.getStructEncoder)([
|
|
17
17
|
['relayData', (0, _1.getRelayDataEncoder)()],
|
|
18
|
-
['
|
|
19
|
-
['
|
|
18
|
+
['repaymentChainId', (0, kit_1.getU64Encoder)()],
|
|
19
|
+
['repaymentAddress', (0, kit_1.getAddressEncoder)()],
|
|
20
20
|
]);
|
|
21
21
|
}
|
|
22
|
-
function
|
|
22
|
+
function getV5FillJitDecoder() {
|
|
23
23
|
return (0, kit_1.getStructDecoder)([
|
|
24
24
|
['relayData', (0, _1.getRelayDataDecoder)()],
|
|
25
|
-
['
|
|
26
|
-
['
|
|
25
|
+
['repaymentChainId', (0, kit_1.getU64Decoder)()],
|
|
26
|
+
['repaymentAddress', (0, kit_1.getAddressDecoder)()],
|
|
27
27
|
]);
|
|
28
28
|
}
|
|
29
|
-
function
|
|
30
|
-
return (0, kit_1.combineCodec)(
|
|
29
|
+
function getV5FillJitCodec() {
|
|
30
|
+
return (0, kit_1.combineCodec)(getV5FillJitEncoder(), getV5FillJitDecoder());
|
|
31
31
|
}
|
|
@@ -0,0 +1,29 @@
|
|
|
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 GetDiscriminatedUnionVariant, type GetDiscriminatedUnionVariantContent } from '@solana/kit';
|
|
9
|
+
/**
|
|
10
|
+
* Literal uses the committed `input_amount`. Balance-relative mode resolves `bips` of the canonical Gateway input
|
|
11
|
+
* vault's live token amount, rounded down, and later enforces the committed amount as a floor. Gateway vaults are
|
|
12
|
+
* shared per mint, not isolated per execution, so the continuing tape must leave no residual balance; Gateway does
|
|
13
|
+
* not currently enforce that net-zero settlement invariant.
|
|
14
|
+
*/
|
|
15
|
+
export type V5InputAmountMode = {
|
|
16
|
+
__kind: 'Literal';
|
|
17
|
+
} | {
|
|
18
|
+
__kind: 'InputVaultBalance';
|
|
19
|
+
bips: number;
|
|
20
|
+
};
|
|
21
|
+
export type V5InputAmountModeArgs = V5InputAmountMode;
|
|
22
|
+
export declare function getV5InputAmountModeEncoder(): Encoder<V5InputAmountModeArgs>;
|
|
23
|
+
export declare function getV5InputAmountModeDecoder(): Decoder<V5InputAmountMode>;
|
|
24
|
+
export declare function getV5InputAmountModeCodec(): Codec<V5InputAmountModeArgs, V5InputAmountMode>;
|
|
25
|
+
export declare function v5InputAmountMode(kind: 'Literal'): GetDiscriminatedUnionVariant<V5InputAmountModeArgs, '__kind', 'Literal'>;
|
|
26
|
+
export declare function v5InputAmountMode(kind: 'InputVaultBalance', data: GetDiscriminatedUnionVariantContent<V5InputAmountModeArgs, '__kind', 'InputVaultBalance'>): GetDiscriminatedUnionVariant<V5InputAmountModeArgs, '__kind', 'InputVaultBalance'>;
|
|
27
|
+
export declare function isV5InputAmountMode<K extends V5InputAmountMode['__kind']>(kind: K, value: V5InputAmountMode): value is V5InputAmountMode & {
|
|
28
|
+
__kind: K;
|
|
29
|
+
};
|
|
@@ -0,0 +1,38 @@
|
|
|
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.getV5InputAmountModeEncoder = getV5InputAmountModeEncoder;
|
|
11
|
+
exports.getV5InputAmountModeDecoder = getV5InputAmountModeDecoder;
|
|
12
|
+
exports.getV5InputAmountModeCodec = getV5InputAmountModeCodec;
|
|
13
|
+
exports.v5InputAmountMode = v5InputAmountMode;
|
|
14
|
+
exports.isV5InputAmountMode = isV5InputAmountMode;
|
|
15
|
+
const kit_1 = require("@solana/kit");
|
|
16
|
+
function getV5InputAmountModeEncoder() {
|
|
17
|
+
return (0, kit_1.getDiscriminatedUnionEncoder)([
|
|
18
|
+
['Literal', (0, kit_1.getUnitEncoder)()],
|
|
19
|
+
['InputVaultBalance', (0, kit_1.getStructEncoder)([['bips', (0, kit_1.getU16Encoder)()]])],
|
|
20
|
+
]);
|
|
21
|
+
}
|
|
22
|
+
function getV5InputAmountModeDecoder() {
|
|
23
|
+
return (0, kit_1.getDiscriminatedUnionDecoder)([
|
|
24
|
+
['Literal', (0, kit_1.getUnitDecoder)()],
|
|
25
|
+
['InputVaultBalance', (0, kit_1.getStructDecoder)([['bips', (0, kit_1.getU16Decoder)()]])],
|
|
26
|
+
]);
|
|
27
|
+
}
|
|
28
|
+
function getV5InputAmountModeCodec() {
|
|
29
|
+
return (0, kit_1.combineCodec)(getV5InputAmountModeEncoder(), getV5InputAmountModeDecoder());
|
|
30
|
+
}
|
|
31
|
+
function v5InputAmountMode(kind, data) {
|
|
32
|
+
return Array.isArray(data)
|
|
33
|
+
? { __kind: kind, fields: data }
|
|
34
|
+
: { __kind: kind, ...(data ?? {}) };
|
|
35
|
+
}
|
|
36
|
+
function isV5InputAmountMode(kind, value) {
|
|
37
|
+
return value.__kind === kind;
|
|
38
|
+
}
|