@dfns/sdk 0.8.20 → 0.8.23
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/generated/agreements/types.d.ts +9 -0
- package/generated/allocations/types.d.ts +409 -24
- package/generated/auth/client.d.ts +3 -0
- package/generated/auth/client.js +36 -0
- package/generated/auth/delegatedClient.d.ts +5 -0
- package/generated/auth/delegatedClient.js +66 -0
- package/generated/auth/types.d.ts +996 -39
- package/generated/exchanges/types.d.ts +17 -1
- package/generated/feeSponsors/types.d.ts +6 -6
- package/generated/keys/types.d.ts +73 -61
- package/generated/networks/types.d.ts +39 -3
- package/generated/payouts/types.d.ts +8 -8
- package/generated/permissions/types.d.ts +2 -2
- package/generated/policies/types.d.ts +951 -198
- package/generated/signers/client.d.ts +10 -0
- package/generated/signers/client.js +50 -0
- package/generated/signers/delegatedClient.d.ts +4 -0
- package/generated/signers/delegatedClient.js +54 -0
- package/generated/signers/types.d.ts +216 -112
- package/generated/staking/types.d.ts +451 -5
- package/generated/swaps/types.d.ts +641 -43
- package/generated/wallets/client.d.ts +1 -0
- package/generated/wallets/client.js +12 -0
- package/generated/wallets/delegatedClient.d.ts +1 -0
- package/generated/wallets/delegatedClient.js +12 -0
- package/generated/wallets/types.d.ts +736 -110
- package/package.json +1 -1
|
@@ -1,16 +1,51 @@
|
|
|
1
1
|
export type CreateSwapBody = {
|
|
2
|
+
provider: "UniswapClassic";
|
|
2
3
|
/** Quote to use for this swap. */
|
|
3
4
|
quoteId: string;
|
|
4
5
|
/** An optional reference for this Swap. */
|
|
5
6
|
reference?: string | undefined;
|
|
6
|
-
/** Provided for this swap. Used for attesting that the swap is being created with the same parameters as the quote. */
|
|
7
|
-
provider: "UniswapX" | "UniswapClassic";
|
|
8
7
|
/** Id of the Dfns wallet spending the sourceAsset. Used for attesting that the swap is being created with the same parameters as the quote. */
|
|
9
8
|
walletId: string;
|
|
10
9
|
/** Id of the Dfns wallet receiving the target asset. Currently this value must be the same as the `walletId`. Used for attesting that the swap is being created with the same parameters as the quote. */
|
|
11
10
|
targetWalletId?: string | undefined;
|
|
12
|
-
/** The
|
|
11
|
+
/** The source asset that will be spent on the Swap transaction. Used for attesting that the swap is being created with the same parameters as the quote. */
|
|
12
|
+
sourceAsset: {
|
|
13
|
+
kind: "Native";
|
|
14
|
+
amount: string;
|
|
15
|
+
} | {
|
|
16
|
+
kind: "Erc20";
|
|
17
|
+
contract: string;
|
|
18
|
+
amount: string;
|
|
19
|
+
} | {
|
|
20
|
+
kind: "Spl";
|
|
21
|
+
mint: string;
|
|
22
|
+
amount: string;
|
|
23
|
+
};
|
|
24
|
+
/** The target asset that will be received with the Swap transaction. Used for attesting that the swap is being created with the same parameters as the quote. */
|
|
25
|
+
targetAsset: {
|
|
26
|
+
kind: "Native";
|
|
27
|
+
amount: string;
|
|
28
|
+
} | {
|
|
29
|
+
kind: "Erc20";
|
|
30
|
+
contract: string;
|
|
31
|
+
amount: string;
|
|
32
|
+
} | {
|
|
33
|
+
kind: "Spl";
|
|
34
|
+
mint: string;
|
|
35
|
+
amount: string;
|
|
36
|
+
};
|
|
37
|
+
/** The slippage tolerance for this trade in [basis point](https://en.wikipedia.org/wiki/Basis_point) (BPS). Slippage tolerance defines the maximum price difference you're willing to accept during a trade from the estimated quote, ensuring you still receive at least a minimum number of tokens if the price shifts. One basis point equals one-hundredth of a percentage point, or 0.01%. */
|
|
13
38
|
slippageBps: number;
|
|
39
|
+
} | {
|
|
40
|
+
provider: "UniswapX";
|
|
41
|
+
/** Quote to use for this swap. */
|
|
42
|
+
quoteId: string;
|
|
43
|
+
/** An optional reference for this Swap. */
|
|
44
|
+
reference?: string | undefined;
|
|
45
|
+
/** Id of the Dfns wallet spending the sourceAsset. Used for attesting that the swap is being created with the same parameters as the quote. */
|
|
46
|
+
walletId: string;
|
|
47
|
+
/** Id of the Dfns wallet receiving the target asset. Currently this value must be the same as the `walletId`. Used for attesting that the swap is being created with the same parameters as the quote. */
|
|
48
|
+
targetWalletId?: string | undefined;
|
|
14
49
|
/** The source asset that will be spent on the Swap transaction. Used for attesting that the swap is being created with the same parameters as the quote. */
|
|
15
50
|
sourceAsset: {
|
|
16
51
|
kind: "Native";
|
|
@@ -19,6 +54,10 @@ export type CreateSwapBody = {
|
|
|
19
54
|
kind: "Erc20";
|
|
20
55
|
contract: string;
|
|
21
56
|
amount: string;
|
|
57
|
+
} | {
|
|
58
|
+
kind: "Spl";
|
|
59
|
+
mint: string;
|
|
60
|
+
amount: string;
|
|
22
61
|
};
|
|
23
62
|
/** The target asset that will be received with the Swap transaction. Used for attesting that the swap is being created with the same parameters as the quote. */
|
|
24
63
|
targetAsset: {
|
|
@@ -28,7 +67,51 @@ export type CreateSwapBody = {
|
|
|
28
67
|
kind: "Erc20";
|
|
29
68
|
contract: string;
|
|
30
69
|
amount: string;
|
|
70
|
+
} | {
|
|
71
|
+
kind: "Spl";
|
|
72
|
+
mint: string;
|
|
73
|
+
amount: string;
|
|
74
|
+
};
|
|
75
|
+
/** The slippage tolerance for this trade in [basis point](https://en.wikipedia.org/wiki/Basis_point) (BPS). Slippage tolerance defines the maximum price difference you're willing to accept during a trade from the estimated quote, ensuring you still receive at least a minimum number of tokens if the price shifts. One basis point equals one-hundredth of a percentage point, or 0.01%. */
|
|
76
|
+
slippageBps: number;
|
|
77
|
+
} | {
|
|
78
|
+
provider: "CircleCctp";
|
|
79
|
+
/** Quote to use for this swap. */
|
|
80
|
+
quoteId: string;
|
|
81
|
+
/** An optional reference for this Swap. */
|
|
82
|
+
reference?: string | undefined;
|
|
83
|
+
/** Id of the Dfns wallet spending the sourceAsset. Used for attesting that the swap is being created with the same parameters as the quote. */
|
|
84
|
+
walletId: string;
|
|
85
|
+
/** Id of the Dfns wallet receiving the target asset. Currently this value must be the same as the `walletId`. Used for attesting that the swap is being created with the same parameters as the quote. */
|
|
86
|
+
targetWalletId?: string | undefined;
|
|
87
|
+
/** The source asset that will be spent on the Swap transaction. Used for attesting that the swap is being created with the same parameters as the quote. */
|
|
88
|
+
sourceAsset: {
|
|
89
|
+
kind: "Native";
|
|
90
|
+
amount: string;
|
|
91
|
+
} | {
|
|
92
|
+
kind: "Erc20";
|
|
93
|
+
contract: string;
|
|
94
|
+
amount: string;
|
|
95
|
+
} | {
|
|
96
|
+
kind: "Spl";
|
|
97
|
+
mint: string;
|
|
98
|
+
amount: string;
|
|
31
99
|
};
|
|
100
|
+
/** The target asset that will be received with the Swap transaction. Used for attesting that the swap is being created with the same parameters as the quote. */
|
|
101
|
+
targetAsset: {
|
|
102
|
+
kind: "Native";
|
|
103
|
+
amount: string;
|
|
104
|
+
} | {
|
|
105
|
+
kind: "Erc20";
|
|
106
|
+
contract: string;
|
|
107
|
+
amount: string;
|
|
108
|
+
} | {
|
|
109
|
+
kind: "Spl";
|
|
110
|
+
mint: string;
|
|
111
|
+
amount: string;
|
|
112
|
+
};
|
|
113
|
+
/** The maximum fee you will accept for this CCTP transfer, in [basis points](https://en.wikipedia.org/wiki/Basis_point) (BPS) of the amount. CCTP is burn-and-mint with no price slippage; this caps the bridge/forwarding fee — which varies with chain congestion and Fast vs Standard speed — so the burn does not revert if the fee rises. One basis point equals 0.01%. */
|
|
114
|
+
feeToleranceBps: number;
|
|
32
115
|
};
|
|
33
116
|
export type CreateSwapResponse = {
|
|
34
117
|
/** Swap id. */
|
|
@@ -44,7 +127,7 @@ export type CreateSwapResponse = {
|
|
|
44
127
|
/** Swap status. */
|
|
45
128
|
status: "PendingPolicyApproval" | "InProgress" | "Completed" | "Failed" | "Rejected";
|
|
46
129
|
/** Swap provider. */
|
|
47
|
-
provider: "UniswapX" | "UniswapClassic";
|
|
130
|
+
provider: "UniswapX" | "UniswapClassic" | "CircleCctp";
|
|
48
131
|
/** The source asset for this swap transaction. */
|
|
49
132
|
quotedSourceAsset: ({
|
|
50
133
|
kind: "Native";
|
|
@@ -53,9 +136,13 @@ export type CreateSwapResponse = {
|
|
|
53
136
|
kind: "Erc20";
|
|
54
137
|
contract: string;
|
|
55
138
|
amount: string;
|
|
139
|
+
} | {
|
|
140
|
+
kind: "Spl";
|
|
141
|
+
mint: string;
|
|
142
|
+
amount: string;
|
|
56
143
|
}) & {
|
|
57
144
|
metadata: {
|
|
58
|
-
network: "Algorand" | "AlgorandTestnet" | "Aptos" | "AptosTestnet" | "ArbitrumOne" | "ArbitrumGoerli" | "ArbitrumSepolia" | "ArcTestnet" | "AvalancheC" | "AvalancheCFuji" | "Adi" | "AdiTestnet" | "AdiTestnetAb" | "BabylonGenesis" | "BabylonTestnet5" | "Base" | "BaseGoerli" | "BaseSepolia" | "Berachain" | "BerachainBArtio" | "BerachainBepolia" | "Bitcoin" | "BitcoinSignet" | "BitcoinTestnet3" | "BitcoinCash" | "BitcoinCashTestnet" | "Bob" | "BobSepolia" | "Bsc" | "BscTestnet" | "Canton" | "CantonDevnet" | "CantonTestnet" | "Cardano" | "CardanoPreprod" | "Concordium" | "ConcordiumTestnet" | "Celo" | "CeloAlfajores" | "Codex" | "CodexSepolia" | "CosmosHub4" | "CosmosIcsTestnet" | "Dogecoin" | "DogecoinTestnet" | "Ethereum" | "EthereumClassic" | "EthereumClassicMordor" | "EthereumGoerli" | "EthereumSepolia" | "EthereumHolesky" | "EthereumHoodi" | "FantomOpera" | "FantomTestnet" | "FlareC" | "FlareCCoston2" | "FlowEvm" | "FlowEvmTestnet" | "Hedera" | "HederaTestnet" | "Ink" | "InkSepolia" | "InternetComputer" | "Ion" | "IonTestnet" | "Iota" | "IotaTestnet" | "IotaZodianet" | "Kaspa" | "KaspaTestnet11" | "Kusama" | "KusamaAssetHub" | "Litecoin" | "LitecoinTestnet" | "Near" | "NearTestnet" | "Optimism" | "OptimismGoerli" | "OptimismSepolia" | "Origyn" | "Plasma" | "PlasmaTestnet" | "Plume" | "PlumeSepolia" | "Paseo" | "PaseoAssetHub" | "Polkadot" | "PolkadotAssetHub" | "Polygon" | "PolygonAmoy" | "PolygonMumbai" | "Polymesh" | "PolymeshTestnet" | "Race" | "RaceSepolia" | "SeiAtlantic2" | "SeiPacific1" | "Solana" | "SolanaDevnet" | "Sonic" | "SonicTestnet" | "Starknet" | "StarknetSepolia" | "Stellar" | "StellarTestnet" | "Sui" | "SuiTestnet" | "Tezos" | "TezosGhostnet" | "Tempo" | "TempoAndantino" | "TempoModerato" | "Tsc" | "TscTestnet1" | "Ton" | "TonTestnet" | "Tron" | "TronNile" | "Westend" | "WestendAssetHub" | "Xdc" | "XdcApothem" | "XLayer" | "XLayerSepolia" | "XrpLedger" | "XrpLedgerTestnet";
|
|
145
|
+
network: "Algorand" | "AlgorandTestnet" | "Aptos" | "AptosTestnet" | "ArbitrumOne" | "ArbitrumGoerli" | "ArbitrumSepolia" | "ArcTestnet" | "Areum" | "AvalancheC" | "AvalancheCFuji" | "Adi" | "AdiTestnet" | "AdiTestnetAb" | "BabylonGenesis" | "BabylonTestnet5" | "Base" | "BaseGoerli" | "BaseSepolia" | "Berachain" | "BerachainBArtio" | "BerachainBepolia" | "BesuTestnet" | "Bitcoin" | "BitcoinSignet" | "BitcoinTestnet3" | "BitcoinTestnet4" | "BitcoinCash" | "BitcoinCashTestnet" | "Bob" | "BobSepolia" | "Bsc" | "BscTestnet" | "Canton" | "CantonDevnet" | "CantonTestnet" | "Cardano" | "CardanoPreprod" | "Concordium" | "ConcordiumTestnet" | "Celo" | "CeloAlfajores" | "Codex" | "CodexSepolia" | "CosmosHub4" | "CosmosIcsTestnet" | "Dogecoin" | "DogecoinTestnet" | "Ethereum" | "EthereumClassic" | "EthereumClassicMordor" | "EthereumGoerli" | "EthereumSepolia" | "EthereumHolesky" | "EthereumHoodi" | "FantomOpera" | "FantomTestnet" | "FlareC" | "FlareCCoston2" | "FlowEvm" | "FlowEvmTestnet" | "IconTestnet" | "Hedera" | "HederaTestnet" | "Ink" | "InkSepolia" | "InternetComputer" | "Ion" | "IonTestnet" | "Iota" | "IotaTestnet" | "IotaZodianet" | "Kaspa" | "KaspaTestnet11" | "Kusama" | "KusamaAssetHub" | "Litecoin" | "LitecoinTestnet" | "Movement" | "MovementTestnet" | "Near" | "NearTestnet" | "Optimism" | "OptimismGoerli" | "OptimismSepolia" | "Origyn" | "Plasma" | "PlasmaTestnet" | "Plume" | "PlumeSepolia" | "Paseo" | "PaseoAssetHub" | "Polkadot" | "PolkadotAssetHub" | "Polygon" | "PolygonAmoy" | "PolygonMumbai" | "Polymesh" | "PolymeshTestnet" | "Race" | "RaceSepolia" | "Rayls" | "RaylsTestnet" | "SeiAtlantic2" | "SeiPacific1" | "Solana" | "SolanaDevnet" | "Sonic" | "SonicTestnet" | "Starknet" | "StarknetSepolia" | "Stellar" | "StellarTestnet" | "Sui" | "SuiTestnet" | "Tezos" | "TezosGhostnet" | "TezosShadownet" | "Tempo" | "TempoAndantino" | "TempoModerato" | "Tsc" | "TscTestnet1" | "Ton" | "TonTestnet" | "Tron" | "TronNile" | "Westend" | "WestendAssetHub" | "Xdc" | "XdcApothem" | "XLayer" | "XLayerSepolia" | "XrpLedger" | "XrpLedgerTestnet";
|
|
59
146
|
name?: string | undefined;
|
|
60
147
|
symbol?: string | undefined;
|
|
61
148
|
decimals: number;
|
|
@@ -70,9 +157,13 @@ export type CreateSwapResponse = {
|
|
|
70
157
|
kind: "Erc20";
|
|
71
158
|
contract: string;
|
|
72
159
|
amount: string;
|
|
160
|
+
} | {
|
|
161
|
+
kind: "Spl";
|
|
162
|
+
mint: string;
|
|
163
|
+
amount: string;
|
|
73
164
|
}) & {
|
|
74
165
|
metadata: {
|
|
75
|
-
network: "Algorand" | "AlgorandTestnet" | "Aptos" | "AptosTestnet" | "ArbitrumOne" | "ArbitrumGoerli" | "ArbitrumSepolia" | "ArcTestnet" | "AvalancheC" | "AvalancheCFuji" | "Adi" | "AdiTestnet" | "AdiTestnetAb" | "BabylonGenesis" | "BabylonTestnet5" | "Base" | "BaseGoerli" | "BaseSepolia" | "Berachain" | "BerachainBArtio" | "BerachainBepolia" | "Bitcoin" | "BitcoinSignet" | "BitcoinTestnet3" | "BitcoinCash" | "BitcoinCashTestnet" | "Bob" | "BobSepolia" | "Bsc" | "BscTestnet" | "Canton" | "CantonDevnet" | "CantonTestnet" | "Cardano" | "CardanoPreprod" | "Concordium" | "ConcordiumTestnet" | "Celo" | "CeloAlfajores" | "Codex" | "CodexSepolia" | "CosmosHub4" | "CosmosIcsTestnet" | "Dogecoin" | "DogecoinTestnet" | "Ethereum" | "EthereumClassic" | "EthereumClassicMordor" | "EthereumGoerli" | "EthereumSepolia" | "EthereumHolesky" | "EthereumHoodi" | "FantomOpera" | "FantomTestnet" | "FlareC" | "FlareCCoston2" | "FlowEvm" | "FlowEvmTestnet" | "Hedera" | "HederaTestnet" | "Ink" | "InkSepolia" | "InternetComputer" | "Ion" | "IonTestnet" | "Iota" | "IotaTestnet" | "IotaZodianet" | "Kaspa" | "KaspaTestnet11" | "Kusama" | "KusamaAssetHub" | "Litecoin" | "LitecoinTestnet" | "Near" | "NearTestnet" | "Optimism" | "OptimismGoerli" | "OptimismSepolia" | "Origyn" | "Plasma" | "PlasmaTestnet" | "Plume" | "PlumeSepolia" | "Paseo" | "PaseoAssetHub" | "Polkadot" | "PolkadotAssetHub" | "Polygon" | "PolygonAmoy" | "PolygonMumbai" | "Polymesh" | "PolymeshTestnet" | "Race" | "RaceSepolia" | "SeiAtlantic2" | "SeiPacific1" | "Solana" | "SolanaDevnet" | "Sonic" | "SonicTestnet" | "Starknet" | "StarknetSepolia" | "Stellar" | "StellarTestnet" | "Sui" | "SuiTestnet" | "Tezos" | "TezosGhostnet" | "Tempo" | "TempoAndantino" | "TempoModerato" | "Tsc" | "TscTestnet1" | "Ton" | "TonTestnet" | "Tron" | "TronNile" | "Westend" | "WestendAssetHub" | "Xdc" | "XdcApothem" | "XLayer" | "XLayerSepolia" | "XrpLedger" | "XrpLedgerTestnet";
|
|
166
|
+
network: "Algorand" | "AlgorandTestnet" | "Aptos" | "AptosTestnet" | "ArbitrumOne" | "ArbitrumGoerli" | "ArbitrumSepolia" | "ArcTestnet" | "Areum" | "AvalancheC" | "AvalancheCFuji" | "Adi" | "AdiTestnet" | "AdiTestnetAb" | "BabylonGenesis" | "BabylonTestnet5" | "Base" | "BaseGoerli" | "BaseSepolia" | "Berachain" | "BerachainBArtio" | "BerachainBepolia" | "BesuTestnet" | "Bitcoin" | "BitcoinSignet" | "BitcoinTestnet3" | "BitcoinTestnet4" | "BitcoinCash" | "BitcoinCashTestnet" | "Bob" | "BobSepolia" | "Bsc" | "BscTestnet" | "Canton" | "CantonDevnet" | "CantonTestnet" | "Cardano" | "CardanoPreprod" | "Concordium" | "ConcordiumTestnet" | "Celo" | "CeloAlfajores" | "Codex" | "CodexSepolia" | "CosmosHub4" | "CosmosIcsTestnet" | "Dogecoin" | "DogecoinTestnet" | "Ethereum" | "EthereumClassic" | "EthereumClassicMordor" | "EthereumGoerli" | "EthereumSepolia" | "EthereumHolesky" | "EthereumHoodi" | "FantomOpera" | "FantomTestnet" | "FlareC" | "FlareCCoston2" | "FlowEvm" | "FlowEvmTestnet" | "IconTestnet" | "Hedera" | "HederaTestnet" | "Ink" | "InkSepolia" | "InternetComputer" | "Ion" | "IonTestnet" | "Iota" | "IotaTestnet" | "IotaZodianet" | "Kaspa" | "KaspaTestnet11" | "Kusama" | "KusamaAssetHub" | "Litecoin" | "LitecoinTestnet" | "Movement" | "MovementTestnet" | "Near" | "NearTestnet" | "Optimism" | "OptimismGoerli" | "OptimismSepolia" | "Origyn" | "Plasma" | "PlasmaTestnet" | "Plume" | "PlumeSepolia" | "Paseo" | "PaseoAssetHub" | "Polkadot" | "PolkadotAssetHub" | "Polygon" | "PolygonAmoy" | "PolygonMumbai" | "Polymesh" | "PolymeshTestnet" | "Race" | "RaceSepolia" | "Rayls" | "RaylsTestnet" | "SeiAtlantic2" | "SeiPacific1" | "Solana" | "SolanaDevnet" | "Sonic" | "SonicTestnet" | "Starknet" | "StarknetSepolia" | "Stellar" | "StellarTestnet" | "Sui" | "SuiTestnet" | "Tezos" | "TezosGhostnet" | "TezosShadownet" | "Tempo" | "TempoAndantino" | "TempoModerato" | "Tsc" | "TscTestnet1" | "Ton" | "TonTestnet" | "Tron" | "TronNile" | "Westend" | "WestendAssetHub" | "Xdc" | "XdcApothem" | "XLayer" | "XLayerSepolia" | "XrpLedger" | "XrpLedgerTestnet";
|
|
76
167
|
name?: string | undefined;
|
|
77
168
|
symbol?: string | undefined;
|
|
78
169
|
decimals: number;
|
|
@@ -84,19 +175,92 @@ export type CreateSwapResponse = {
|
|
|
84
175
|
/** [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date (must be UTC). When the swap was initiated. */
|
|
85
176
|
dateCreated: string;
|
|
86
177
|
/** The full request used for initiating this swap. */
|
|
87
|
-
requestBody: {
|
|
178
|
+
requestBody: ({
|
|
179
|
+
provider: "UniswapClassic";
|
|
180
|
+
/** Quote to use for this swap. */
|
|
181
|
+
quoteId: string;
|
|
182
|
+
/** An optional reference for this Swap. */
|
|
183
|
+
reference?: string | undefined;
|
|
184
|
+
/** Id of the Dfns wallet spending the sourceAsset. Used for attesting that the swap is being created with the same parameters as the quote. */
|
|
185
|
+
walletId: string;
|
|
186
|
+
/** Id of the Dfns wallet receiving the target asset. Currently this value must be the same as the `walletId`. Used for attesting that the swap is being created with the same parameters as the quote. */
|
|
187
|
+
targetWalletId?: string | undefined;
|
|
188
|
+
/** The source asset that will be spent on the Swap transaction. Used for attesting that the swap is being created with the same parameters as the quote. */
|
|
189
|
+
sourceAsset: {
|
|
190
|
+
kind: "Native";
|
|
191
|
+
amount: string;
|
|
192
|
+
} | {
|
|
193
|
+
kind: "Erc20";
|
|
194
|
+
contract: string;
|
|
195
|
+
amount: string;
|
|
196
|
+
} | {
|
|
197
|
+
kind: "Spl";
|
|
198
|
+
mint: string;
|
|
199
|
+
amount: string;
|
|
200
|
+
};
|
|
201
|
+
/** The target asset that will be received with the Swap transaction. Used for attesting that the swap is being created with the same parameters as the quote. */
|
|
202
|
+
targetAsset: {
|
|
203
|
+
kind: "Native";
|
|
204
|
+
amount: string;
|
|
205
|
+
} | {
|
|
206
|
+
kind: "Erc20";
|
|
207
|
+
contract: string;
|
|
208
|
+
amount: string;
|
|
209
|
+
} | {
|
|
210
|
+
kind: "Spl";
|
|
211
|
+
mint: string;
|
|
212
|
+
amount: string;
|
|
213
|
+
};
|
|
214
|
+
/** The slippage tolerance for this trade in [basis point](https://en.wikipedia.org/wiki/Basis_point) (BPS). Slippage tolerance defines the maximum price difference you're willing to accept during a trade from the estimated quote, ensuring you still receive at least a minimum number of tokens if the price shifts. One basis point equals one-hundredth of a percentage point, or 0.01%. */
|
|
215
|
+
slippageBps: number;
|
|
216
|
+
} | {
|
|
217
|
+
provider: "UniswapX";
|
|
88
218
|
/** Quote to use for this swap. */
|
|
89
219
|
quoteId: string;
|
|
90
220
|
/** An optional reference for this Swap. */
|
|
91
221
|
reference?: string | undefined;
|
|
92
|
-
/** Provided for this swap. Used for attesting that the swap is being created with the same parameters as the quote. */
|
|
93
|
-
provider: "UniswapX" | "UniswapClassic";
|
|
94
222
|
/** Id of the Dfns wallet spending the sourceAsset. Used for attesting that the swap is being created with the same parameters as the quote. */
|
|
95
223
|
walletId: string;
|
|
96
224
|
/** Id of the Dfns wallet receiving the target asset. Currently this value must be the same as the `walletId`. Used for attesting that the swap is being created with the same parameters as the quote. */
|
|
97
225
|
targetWalletId?: string | undefined;
|
|
98
|
-
/** The
|
|
226
|
+
/** The source asset that will be spent on the Swap transaction. Used for attesting that the swap is being created with the same parameters as the quote. */
|
|
227
|
+
sourceAsset: {
|
|
228
|
+
kind: "Native";
|
|
229
|
+
amount: string;
|
|
230
|
+
} | {
|
|
231
|
+
kind: "Erc20";
|
|
232
|
+
contract: string;
|
|
233
|
+
amount: string;
|
|
234
|
+
} | {
|
|
235
|
+
kind: "Spl";
|
|
236
|
+
mint: string;
|
|
237
|
+
amount: string;
|
|
238
|
+
};
|
|
239
|
+
/** The target asset that will be received with the Swap transaction. Used for attesting that the swap is being created with the same parameters as the quote. */
|
|
240
|
+
targetAsset: {
|
|
241
|
+
kind: "Native";
|
|
242
|
+
amount: string;
|
|
243
|
+
} | {
|
|
244
|
+
kind: "Erc20";
|
|
245
|
+
contract: string;
|
|
246
|
+
amount: string;
|
|
247
|
+
} | {
|
|
248
|
+
kind: "Spl";
|
|
249
|
+
mint: string;
|
|
250
|
+
amount: string;
|
|
251
|
+
};
|
|
252
|
+
/** The slippage tolerance for this trade in [basis point](https://en.wikipedia.org/wiki/Basis_point) (BPS). Slippage tolerance defines the maximum price difference you're willing to accept during a trade from the estimated quote, ensuring you still receive at least a minimum number of tokens if the price shifts. One basis point equals one-hundredth of a percentage point, or 0.01%. */
|
|
99
253
|
slippageBps: number;
|
|
254
|
+
} | {
|
|
255
|
+
provider: "CircleCctp";
|
|
256
|
+
/** Quote to use for this swap. */
|
|
257
|
+
quoteId: string;
|
|
258
|
+
/** An optional reference for this Swap. */
|
|
259
|
+
reference?: string | undefined;
|
|
260
|
+
/** Id of the Dfns wallet spending the sourceAsset. Used for attesting that the swap is being created with the same parameters as the quote. */
|
|
261
|
+
walletId: string;
|
|
262
|
+
/** Id of the Dfns wallet receiving the target asset. Currently this value must be the same as the `walletId`. Used for attesting that the swap is being created with the same parameters as the quote. */
|
|
263
|
+
targetWalletId?: string | undefined;
|
|
100
264
|
/** The source asset that will be spent on the Swap transaction. Used for attesting that the swap is being created with the same parameters as the quote. */
|
|
101
265
|
sourceAsset: {
|
|
102
266
|
kind: "Native";
|
|
@@ -105,6 +269,10 @@ export type CreateSwapResponse = {
|
|
|
105
269
|
kind: "Erc20";
|
|
106
270
|
contract: string;
|
|
107
271
|
amount: string;
|
|
272
|
+
} | {
|
|
273
|
+
kind: "Spl";
|
|
274
|
+
mint: string;
|
|
275
|
+
amount: string;
|
|
108
276
|
};
|
|
109
277
|
/** The target asset that will be received with the Swap transaction. Used for attesting that the swap is being created with the same parameters as the quote. */
|
|
110
278
|
targetAsset: {
|
|
@@ -114,8 +282,14 @@ export type CreateSwapResponse = {
|
|
|
114
282
|
kind: "Erc20";
|
|
115
283
|
contract: string;
|
|
116
284
|
amount: string;
|
|
285
|
+
} | {
|
|
286
|
+
kind: "Spl";
|
|
287
|
+
mint: string;
|
|
288
|
+
amount: string;
|
|
117
289
|
};
|
|
118
|
-
|
|
290
|
+
/** The maximum fee you will accept for this CCTP transfer, in [basis points](https://en.wikipedia.org/wiki/Basis_point) (BPS) of the amount. CCTP is burn-and-mint with no price slippage; this caps the bridge/forwarding fee — which varies with chain congestion and Fast vs Standard speed — so the burn does not revert if the fee rises. One basis point equals 0.01%. */
|
|
291
|
+
feeToleranceBps: number;
|
|
292
|
+
}) | {};
|
|
119
293
|
/** The user who initiated the request. */
|
|
120
294
|
requester: {
|
|
121
295
|
/** User id. */
|
|
@@ -125,13 +299,14 @@ export type CreateSwapResponse = {
|
|
|
125
299
|
};
|
|
126
300
|
/** The failure reason, if any. Only present when status is Failed. */
|
|
127
301
|
failureReason?: string | undefined;
|
|
302
|
+
/** Provider-specific intermediate state, only set while `status` is InProgress. Values are opaque strings — clients map them to progress bars, labels or icons as needed. For CCTP one of: `signing-permit`, `burning-source`, `awaiting-source-finality`, `awaiting-attestation`, `awaiting-forwarder`. Undefined for providers without intermediate sub-states. */
|
|
303
|
+
protocolStatus?: string | undefined;
|
|
128
304
|
};
|
|
129
305
|
export type CreateSwapRequest = {
|
|
130
306
|
body: CreateSwapBody;
|
|
131
307
|
};
|
|
132
308
|
export type CreateSwapQuoteBody = {
|
|
133
|
-
|
|
134
|
-
provider: "UniswapX" | "UniswapClassic";
|
|
309
|
+
provider: "UniswapClassic";
|
|
135
310
|
/** Id of the Dfns wallet spending the sourceAsset. */
|
|
136
311
|
walletId: string;
|
|
137
312
|
/** Id of the Dfns wallet receiving the target asset. Currently this value must be the same as the `walletId`. */
|
|
@@ -144,6 +319,41 @@ export type CreateSwapQuoteBody = {
|
|
|
144
319
|
kind: "Erc20";
|
|
145
320
|
contract: string;
|
|
146
321
|
amount: string;
|
|
322
|
+
} | {
|
|
323
|
+
kind: "Spl";
|
|
324
|
+
mint: string;
|
|
325
|
+
amount: string;
|
|
326
|
+
};
|
|
327
|
+
/** The target asset that will be received with the Swap transaction, follows the same structure as sourceAsset, but doesn't include the amount. */
|
|
328
|
+
targetAsset: {
|
|
329
|
+
kind: "Native";
|
|
330
|
+
} | {
|
|
331
|
+
kind: "Erc20";
|
|
332
|
+
contract: string;
|
|
333
|
+
} | {
|
|
334
|
+
kind: "Spl";
|
|
335
|
+
mint: string;
|
|
336
|
+
};
|
|
337
|
+
/** The slippage tolerance for this trade in [basis point](https://en.wikipedia.org/wiki/Basis_point) (BPS). Slippage tolerance defines the maximum price difference you're willing to accept during a trade from the estimated quote, ensuring you still receive at least a minimum number of tokens if the price shifts. One basis point equals one-hundredth of a percentage point, or 0.01%. */
|
|
338
|
+
slippageBps: number;
|
|
339
|
+
} | {
|
|
340
|
+
provider: "UniswapX";
|
|
341
|
+
/** Id of the Dfns wallet spending the sourceAsset. */
|
|
342
|
+
walletId: string;
|
|
343
|
+
/** Id of the Dfns wallet receiving the target asset. Currently this value must be the same as the `walletId`. */
|
|
344
|
+
targetWalletId?: string | undefined;
|
|
345
|
+
/** The source asset that will be spent on the Swap transaction, following the same stucture as the [transfer API](https://docs.dfns.co/api-reference/wallets/transfer-asset). */
|
|
346
|
+
sourceAsset: {
|
|
347
|
+
kind: "Native";
|
|
348
|
+
amount: string;
|
|
349
|
+
} | {
|
|
350
|
+
kind: "Erc20";
|
|
351
|
+
contract: string;
|
|
352
|
+
amount: string;
|
|
353
|
+
} | {
|
|
354
|
+
kind: "Spl";
|
|
355
|
+
mint: string;
|
|
356
|
+
amount: string;
|
|
147
357
|
};
|
|
148
358
|
/** The target asset that will be received with the Swap transaction, follows the same structure as sourceAsset, but doesn't include the amount. */
|
|
149
359
|
targetAsset: {
|
|
@@ -151,9 +361,47 @@ export type CreateSwapQuoteBody = {
|
|
|
151
361
|
} | {
|
|
152
362
|
kind: "Erc20";
|
|
153
363
|
contract: string;
|
|
364
|
+
} | {
|
|
365
|
+
kind: "Spl";
|
|
366
|
+
mint: string;
|
|
154
367
|
};
|
|
155
368
|
/** The slippage tolerance for this trade in [basis point](https://en.wikipedia.org/wiki/Basis_point) (BPS). Slippage tolerance defines the maximum price difference you're willing to accept during a trade from the estimated quote, ensuring you still receive at least a minimum number of tokens if the price shifts. One basis point equals one-hundredth of a percentage point, or 0.01%. */
|
|
156
369
|
slippageBps: number;
|
|
370
|
+
} | {
|
|
371
|
+
provider: "CircleCctp";
|
|
372
|
+
/** Id of the Dfns wallet spending the sourceAsset. */
|
|
373
|
+
walletId: string;
|
|
374
|
+
/** Id of the Dfns wallet receiving the target asset. Currently this value must be the same as the `walletId`. */
|
|
375
|
+
targetWalletId?: string | undefined;
|
|
376
|
+
/** The source asset that will be spent on the Swap transaction, following the same stucture as the [transfer API](https://docs.dfns.co/api-reference/wallets/transfer-asset). */
|
|
377
|
+
sourceAsset: {
|
|
378
|
+
kind: "Native";
|
|
379
|
+
amount: string;
|
|
380
|
+
} | {
|
|
381
|
+
kind: "Erc20";
|
|
382
|
+
contract: string;
|
|
383
|
+
amount: string;
|
|
384
|
+
} | {
|
|
385
|
+
kind: "Spl";
|
|
386
|
+
mint: string;
|
|
387
|
+
amount: string;
|
|
388
|
+
};
|
|
389
|
+
/** The target asset that will be received with the Swap transaction, follows the same structure as sourceAsset, but doesn't include the amount. */
|
|
390
|
+
targetAsset: {
|
|
391
|
+
kind: "Native";
|
|
392
|
+
} | {
|
|
393
|
+
kind: "Erc20";
|
|
394
|
+
contract: string;
|
|
395
|
+
} | {
|
|
396
|
+
kind: "Spl";
|
|
397
|
+
mint: string;
|
|
398
|
+
};
|
|
399
|
+
/** The maximum fee you will accept for this CCTP transfer, in [basis points](https://en.wikipedia.org/wiki/Basis_point) (BPS) of the amount. CCTP is burn-and-mint with no price slippage; this caps the bridge/forwarding fee — which varies with chain congestion and Fast vs Standard speed — so the burn does not revert if the fee rises. One basis point equals 0.01%. */
|
|
400
|
+
feeToleranceBps: number;
|
|
401
|
+
/** Selects Fast (~8–20s, small fast-burn fee) or Standard (~13–19min, no fast-burn fee). */
|
|
402
|
+
speed?: ("Fast" | "Standard") | undefined;
|
|
403
|
+
/** Solana-source only. Bind the burn to a durable nonce so it survives signing delays. */
|
|
404
|
+
useDurableNonce?: boolean | undefined;
|
|
157
405
|
};
|
|
158
406
|
export type CreateSwapQuoteResponse = {
|
|
159
407
|
/** ID of the Swap Quote. */
|
|
@@ -163,7 +411,7 @@ export type CreateSwapQuoteResponse = {
|
|
|
163
411
|
/** If not provided, the walletId is used as the target wallet. If provided, this field is currently required to be the same as walletId */
|
|
164
412
|
targetWalletId?: string | undefined;
|
|
165
413
|
/** Swap provider. */
|
|
166
|
-
provider: "UniswapX" | "UniswapClassic";
|
|
414
|
+
provider: "UniswapX" | "UniswapClassic" | "CircleCctp";
|
|
167
415
|
/** The source asset that will be spent on the swap transaction. */
|
|
168
416
|
sourceAsset: ({
|
|
169
417
|
kind: "Native";
|
|
@@ -172,9 +420,13 @@ export type CreateSwapQuoteResponse = {
|
|
|
172
420
|
kind: "Erc20";
|
|
173
421
|
contract: string;
|
|
174
422
|
amount: string;
|
|
423
|
+
} | {
|
|
424
|
+
kind: "Spl";
|
|
425
|
+
mint: string;
|
|
426
|
+
amount: string;
|
|
175
427
|
}) & {
|
|
176
428
|
metadata: {
|
|
177
|
-
network: "Algorand" | "AlgorandTestnet" | "Aptos" | "AptosTestnet" | "ArbitrumOne" | "ArbitrumGoerli" | "ArbitrumSepolia" | "ArcTestnet" | "AvalancheC" | "AvalancheCFuji" | "Adi" | "AdiTestnet" | "AdiTestnetAb" | "BabylonGenesis" | "BabylonTestnet5" | "Base" | "BaseGoerli" | "BaseSepolia" | "Berachain" | "BerachainBArtio" | "BerachainBepolia" | "Bitcoin" | "BitcoinSignet" | "BitcoinTestnet3" | "BitcoinCash" | "BitcoinCashTestnet" | "Bob" | "BobSepolia" | "Bsc" | "BscTestnet" | "Canton" | "CantonDevnet" | "CantonTestnet" | "Cardano" | "CardanoPreprod" | "Concordium" | "ConcordiumTestnet" | "Celo" | "CeloAlfajores" | "Codex" | "CodexSepolia" | "CosmosHub4" | "CosmosIcsTestnet" | "Dogecoin" | "DogecoinTestnet" | "Ethereum" | "EthereumClassic" | "EthereumClassicMordor" | "EthereumGoerli" | "EthereumSepolia" | "EthereumHolesky" | "EthereumHoodi" | "FantomOpera" | "FantomTestnet" | "FlareC" | "FlareCCoston2" | "FlowEvm" | "FlowEvmTestnet" | "Hedera" | "HederaTestnet" | "Ink" | "InkSepolia" | "InternetComputer" | "Ion" | "IonTestnet" | "Iota" | "IotaTestnet" | "IotaZodianet" | "Kaspa" | "KaspaTestnet11" | "Kusama" | "KusamaAssetHub" | "Litecoin" | "LitecoinTestnet" | "Near" | "NearTestnet" | "Optimism" | "OptimismGoerli" | "OptimismSepolia" | "Origyn" | "Plasma" | "PlasmaTestnet" | "Plume" | "PlumeSepolia" | "Paseo" | "PaseoAssetHub" | "Polkadot" | "PolkadotAssetHub" | "Polygon" | "PolygonAmoy" | "PolygonMumbai" | "Polymesh" | "PolymeshTestnet" | "Race" | "RaceSepolia" | "SeiAtlantic2" | "SeiPacific1" | "Solana" | "SolanaDevnet" | "Sonic" | "SonicTestnet" | "Starknet" | "StarknetSepolia" | "Stellar" | "StellarTestnet" | "Sui" | "SuiTestnet" | "Tezos" | "TezosGhostnet" | "Tempo" | "TempoAndantino" | "TempoModerato" | "Tsc" | "TscTestnet1" | "Ton" | "TonTestnet" | "Tron" | "TronNile" | "Westend" | "WestendAssetHub" | "Xdc" | "XdcApothem" | "XLayer" | "XLayerSepolia" | "XrpLedger" | "XrpLedgerTestnet";
|
|
429
|
+
network: "Algorand" | "AlgorandTestnet" | "Aptos" | "AptosTestnet" | "ArbitrumOne" | "ArbitrumGoerli" | "ArbitrumSepolia" | "ArcTestnet" | "Areum" | "AvalancheC" | "AvalancheCFuji" | "Adi" | "AdiTestnet" | "AdiTestnetAb" | "BabylonGenesis" | "BabylonTestnet5" | "Base" | "BaseGoerli" | "BaseSepolia" | "Berachain" | "BerachainBArtio" | "BerachainBepolia" | "BesuTestnet" | "Bitcoin" | "BitcoinSignet" | "BitcoinTestnet3" | "BitcoinTestnet4" | "BitcoinCash" | "BitcoinCashTestnet" | "Bob" | "BobSepolia" | "Bsc" | "BscTestnet" | "Canton" | "CantonDevnet" | "CantonTestnet" | "Cardano" | "CardanoPreprod" | "Concordium" | "ConcordiumTestnet" | "Celo" | "CeloAlfajores" | "Codex" | "CodexSepolia" | "CosmosHub4" | "CosmosIcsTestnet" | "Dogecoin" | "DogecoinTestnet" | "Ethereum" | "EthereumClassic" | "EthereumClassicMordor" | "EthereumGoerli" | "EthereumSepolia" | "EthereumHolesky" | "EthereumHoodi" | "FantomOpera" | "FantomTestnet" | "FlareC" | "FlareCCoston2" | "FlowEvm" | "FlowEvmTestnet" | "IconTestnet" | "Hedera" | "HederaTestnet" | "Ink" | "InkSepolia" | "InternetComputer" | "Ion" | "IonTestnet" | "Iota" | "IotaTestnet" | "IotaZodianet" | "Kaspa" | "KaspaTestnet11" | "Kusama" | "KusamaAssetHub" | "Litecoin" | "LitecoinTestnet" | "Movement" | "MovementTestnet" | "Near" | "NearTestnet" | "Optimism" | "OptimismGoerli" | "OptimismSepolia" | "Origyn" | "Plasma" | "PlasmaTestnet" | "Plume" | "PlumeSepolia" | "Paseo" | "PaseoAssetHub" | "Polkadot" | "PolkadotAssetHub" | "Polygon" | "PolygonAmoy" | "PolygonMumbai" | "Polymesh" | "PolymeshTestnet" | "Race" | "RaceSepolia" | "Rayls" | "RaylsTestnet" | "SeiAtlantic2" | "SeiPacific1" | "Solana" | "SolanaDevnet" | "Sonic" | "SonicTestnet" | "Starknet" | "StarknetSepolia" | "Stellar" | "StellarTestnet" | "Sui" | "SuiTestnet" | "Tezos" | "TezosGhostnet" | "TezosShadownet" | "Tempo" | "TempoAndantino" | "TempoModerato" | "Tsc" | "TscTestnet1" | "Ton" | "TonTestnet" | "Tron" | "TronNile" | "Westend" | "WestendAssetHub" | "Xdc" | "XdcApothem" | "XLayer" | "XLayerSepolia" | "XrpLedger" | "XrpLedgerTestnet";
|
|
178
430
|
name?: string | undefined;
|
|
179
431
|
symbol?: string | undefined;
|
|
180
432
|
decimals: number;
|
|
@@ -189,9 +441,13 @@ export type CreateSwapQuoteResponse = {
|
|
|
189
441
|
kind: "Erc20";
|
|
190
442
|
contract: string;
|
|
191
443
|
amount: string;
|
|
444
|
+
} | {
|
|
445
|
+
kind: "Spl";
|
|
446
|
+
mint: string;
|
|
447
|
+
amount: string;
|
|
192
448
|
}) & {
|
|
193
449
|
metadata: {
|
|
194
|
-
network: "Algorand" | "AlgorandTestnet" | "Aptos" | "AptosTestnet" | "ArbitrumOne" | "ArbitrumGoerli" | "ArbitrumSepolia" | "ArcTestnet" | "AvalancheC" | "AvalancheCFuji" | "Adi" | "AdiTestnet" | "AdiTestnetAb" | "BabylonGenesis" | "BabylonTestnet5" | "Base" | "BaseGoerli" | "BaseSepolia" | "Berachain" | "BerachainBArtio" | "BerachainBepolia" | "Bitcoin" | "BitcoinSignet" | "BitcoinTestnet3" | "BitcoinCash" | "BitcoinCashTestnet" | "Bob" | "BobSepolia" | "Bsc" | "BscTestnet" | "Canton" | "CantonDevnet" | "CantonTestnet" | "Cardano" | "CardanoPreprod" | "Concordium" | "ConcordiumTestnet" | "Celo" | "CeloAlfajores" | "Codex" | "CodexSepolia" | "CosmosHub4" | "CosmosIcsTestnet" | "Dogecoin" | "DogecoinTestnet" | "Ethereum" | "EthereumClassic" | "EthereumClassicMordor" | "EthereumGoerli" | "EthereumSepolia" | "EthereumHolesky" | "EthereumHoodi" | "FantomOpera" | "FantomTestnet" | "FlareC" | "FlareCCoston2" | "FlowEvm" | "FlowEvmTestnet" | "Hedera" | "HederaTestnet" | "Ink" | "InkSepolia" | "InternetComputer" | "Ion" | "IonTestnet" | "Iota" | "IotaTestnet" | "IotaZodianet" | "Kaspa" | "KaspaTestnet11" | "Kusama" | "KusamaAssetHub" | "Litecoin" | "LitecoinTestnet" | "Near" | "NearTestnet" | "Optimism" | "OptimismGoerli" | "OptimismSepolia" | "Origyn" | "Plasma" | "PlasmaTestnet" | "Plume" | "PlumeSepolia" | "Paseo" | "PaseoAssetHub" | "Polkadot" | "PolkadotAssetHub" | "Polygon" | "PolygonAmoy" | "PolygonMumbai" | "Polymesh" | "PolymeshTestnet" | "Race" | "RaceSepolia" | "SeiAtlantic2" | "SeiPacific1" | "Solana" | "SolanaDevnet" | "Sonic" | "SonicTestnet" | "Starknet" | "StarknetSepolia" | "Stellar" | "StellarTestnet" | "Sui" | "SuiTestnet" | "Tezos" | "TezosGhostnet" | "Tempo" | "TempoAndantino" | "TempoModerato" | "Tsc" | "TscTestnet1" | "Ton" | "TonTestnet" | "Tron" | "TronNile" | "Westend" | "WestendAssetHub" | "Xdc" | "XdcApothem" | "XLayer" | "XLayerSepolia" | "XrpLedger" | "XrpLedgerTestnet";
|
|
450
|
+
network: "Algorand" | "AlgorandTestnet" | "Aptos" | "AptosTestnet" | "ArbitrumOne" | "ArbitrumGoerli" | "ArbitrumSepolia" | "ArcTestnet" | "Areum" | "AvalancheC" | "AvalancheCFuji" | "Adi" | "AdiTestnet" | "AdiTestnetAb" | "BabylonGenesis" | "BabylonTestnet5" | "Base" | "BaseGoerli" | "BaseSepolia" | "Berachain" | "BerachainBArtio" | "BerachainBepolia" | "BesuTestnet" | "Bitcoin" | "BitcoinSignet" | "BitcoinTestnet3" | "BitcoinTestnet4" | "BitcoinCash" | "BitcoinCashTestnet" | "Bob" | "BobSepolia" | "Bsc" | "BscTestnet" | "Canton" | "CantonDevnet" | "CantonTestnet" | "Cardano" | "CardanoPreprod" | "Concordium" | "ConcordiumTestnet" | "Celo" | "CeloAlfajores" | "Codex" | "CodexSepolia" | "CosmosHub4" | "CosmosIcsTestnet" | "Dogecoin" | "DogecoinTestnet" | "Ethereum" | "EthereumClassic" | "EthereumClassicMordor" | "EthereumGoerli" | "EthereumSepolia" | "EthereumHolesky" | "EthereumHoodi" | "FantomOpera" | "FantomTestnet" | "FlareC" | "FlareCCoston2" | "FlowEvm" | "FlowEvmTestnet" | "IconTestnet" | "Hedera" | "HederaTestnet" | "Ink" | "InkSepolia" | "InternetComputer" | "Ion" | "IonTestnet" | "Iota" | "IotaTestnet" | "IotaZodianet" | "Kaspa" | "KaspaTestnet11" | "Kusama" | "KusamaAssetHub" | "Litecoin" | "LitecoinTestnet" | "Movement" | "MovementTestnet" | "Near" | "NearTestnet" | "Optimism" | "OptimismGoerli" | "OptimismSepolia" | "Origyn" | "Plasma" | "PlasmaTestnet" | "Plume" | "PlumeSepolia" | "Paseo" | "PaseoAssetHub" | "Polkadot" | "PolkadotAssetHub" | "Polygon" | "PolygonAmoy" | "PolygonMumbai" | "Polymesh" | "PolymeshTestnet" | "Race" | "RaceSepolia" | "Rayls" | "RaylsTestnet" | "SeiAtlantic2" | "SeiPacific1" | "Solana" | "SolanaDevnet" | "Sonic" | "SonicTestnet" | "Starknet" | "StarknetSepolia" | "Stellar" | "StellarTestnet" | "Sui" | "SuiTestnet" | "Tezos" | "TezosGhostnet" | "TezosShadownet" | "Tempo" | "TempoAndantino" | "TempoModerato" | "Tsc" | "TscTestnet1" | "Ton" | "TonTestnet" | "Tron" | "TronNile" | "Westend" | "WestendAssetHub" | "Xdc" | "XdcApothem" | "XLayer" | "XLayerSepolia" | "XrpLedger" | "XrpLedgerTestnet";
|
|
195
451
|
name?: string | undefined;
|
|
196
452
|
symbol?: string | undefined;
|
|
197
453
|
decimals: number;
|
|
@@ -200,12 +456,44 @@ export type CreateSwapQuoteResponse = {
|
|
|
200
456
|
};
|
|
201
457
|
/** The slippage tolerance for this trade in [basis point](https://en.wikipedia.org/wiki/Basis_point) (BPS). Slippage tolerance defines the maximum price difference you're willing to accept during a trade from the estimated quote, ensuring you still receive at least a minimum number of tokens if the price shifts. One basis point equals one-hundredth of a percentage point, or 0.01%. */
|
|
202
458
|
slippageBps: number;
|
|
459
|
+
/** Total fee deducted from the source amount to reach the target amount, in the source asset base units. Set for CCTP (the quoted maxFee Circle may deduct); omitted for providers that do not surface a single fee figure. */
|
|
460
|
+
fee?: string | undefined;
|
|
203
461
|
/** [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date (must be UTC). When the quote was created. */
|
|
204
462
|
dateCreated: string;
|
|
205
463
|
/** The full request used for obtaining this quote. */
|
|
206
|
-
requestBody: {
|
|
207
|
-
|
|
208
|
-
|
|
464
|
+
requestBody: ({
|
|
465
|
+
provider: "UniswapClassic";
|
|
466
|
+
/** Id of the Dfns wallet spending the sourceAsset. */
|
|
467
|
+
walletId: string;
|
|
468
|
+
/** Id of the Dfns wallet receiving the target asset. Currently this value must be the same as the `walletId`. */
|
|
469
|
+
targetWalletId?: string | undefined;
|
|
470
|
+
/** The source asset that will be spent on the Swap transaction, following the same stucture as the [transfer API](https://docs.dfns.co/api-reference/wallets/transfer-asset). */
|
|
471
|
+
sourceAsset: {
|
|
472
|
+
kind: "Native";
|
|
473
|
+
amount: string;
|
|
474
|
+
} | {
|
|
475
|
+
kind: "Erc20";
|
|
476
|
+
contract: string;
|
|
477
|
+
amount: string;
|
|
478
|
+
} | {
|
|
479
|
+
kind: "Spl";
|
|
480
|
+
mint: string;
|
|
481
|
+
amount: string;
|
|
482
|
+
};
|
|
483
|
+
/** The target asset that will be received with the Swap transaction, follows the same structure as sourceAsset, but doesn't include the amount. */
|
|
484
|
+
targetAsset: {
|
|
485
|
+
kind: "Native";
|
|
486
|
+
} | {
|
|
487
|
+
kind: "Erc20";
|
|
488
|
+
contract: string;
|
|
489
|
+
} | {
|
|
490
|
+
kind: "Spl";
|
|
491
|
+
mint: string;
|
|
492
|
+
};
|
|
493
|
+
/** The slippage tolerance for this trade in [basis point](https://en.wikipedia.org/wiki/Basis_point) (BPS). Slippage tolerance defines the maximum price difference you're willing to accept during a trade from the estimated quote, ensuring you still receive at least a minimum number of tokens if the price shifts. One basis point equals one-hundredth of a percentage point, or 0.01%. */
|
|
494
|
+
slippageBps: number;
|
|
495
|
+
} | {
|
|
496
|
+
provider: "UniswapX";
|
|
209
497
|
/** Id of the Dfns wallet spending the sourceAsset. */
|
|
210
498
|
walletId: string;
|
|
211
499
|
/** Id of the Dfns wallet receiving the target asset. Currently this value must be the same as the `walletId`. */
|
|
@@ -218,6 +506,10 @@ export type CreateSwapQuoteResponse = {
|
|
|
218
506
|
kind: "Erc20";
|
|
219
507
|
contract: string;
|
|
220
508
|
amount: string;
|
|
509
|
+
} | {
|
|
510
|
+
kind: "Spl";
|
|
511
|
+
mint: string;
|
|
512
|
+
amount: string;
|
|
221
513
|
};
|
|
222
514
|
/** The target asset that will be received with the Swap transaction, follows the same structure as sourceAsset, but doesn't include the amount. */
|
|
223
515
|
targetAsset: {
|
|
@@ -225,10 +517,48 @@ export type CreateSwapQuoteResponse = {
|
|
|
225
517
|
} | {
|
|
226
518
|
kind: "Erc20";
|
|
227
519
|
contract: string;
|
|
520
|
+
} | {
|
|
521
|
+
kind: "Spl";
|
|
522
|
+
mint: string;
|
|
228
523
|
};
|
|
229
524
|
/** The slippage tolerance for this trade in [basis point](https://en.wikipedia.org/wiki/Basis_point) (BPS). Slippage tolerance defines the maximum price difference you're willing to accept during a trade from the estimated quote, ensuring you still receive at least a minimum number of tokens if the price shifts. One basis point equals one-hundredth of a percentage point, or 0.01%. */
|
|
230
525
|
slippageBps: number;
|
|
231
|
-
} | {
|
|
526
|
+
} | {
|
|
527
|
+
provider: "CircleCctp";
|
|
528
|
+
/** Id of the Dfns wallet spending the sourceAsset. */
|
|
529
|
+
walletId: string;
|
|
530
|
+
/** Id of the Dfns wallet receiving the target asset. Currently this value must be the same as the `walletId`. */
|
|
531
|
+
targetWalletId?: string | undefined;
|
|
532
|
+
/** The source asset that will be spent on the Swap transaction, following the same stucture as the [transfer API](https://docs.dfns.co/api-reference/wallets/transfer-asset). */
|
|
533
|
+
sourceAsset: {
|
|
534
|
+
kind: "Native";
|
|
535
|
+
amount: string;
|
|
536
|
+
} | {
|
|
537
|
+
kind: "Erc20";
|
|
538
|
+
contract: string;
|
|
539
|
+
amount: string;
|
|
540
|
+
} | {
|
|
541
|
+
kind: "Spl";
|
|
542
|
+
mint: string;
|
|
543
|
+
amount: string;
|
|
544
|
+
};
|
|
545
|
+
/** The target asset that will be received with the Swap transaction, follows the same structure as sourceAsset, but doesn't include the amount. */
|
|
546
|
+
targetAsset: {
|
|
547
|
+
kind: "Native";
|
|
548
|
+
} | {
|
|
549
|
+
kind: "Erc20";
|
|
550
|
+
contract: string;
|
|
551
|
+
} | {
|
|
552
|
+
kind: "Spl";
|
|
553
|
+
mint: string;
|
|
554
|
+
};
|
|
555
|
+
/** The maximum fee you will accept for this CCTP transfer, in [basis points](https://en.wikipedia.org/wiki/Basis_point) (BPS) of the amount. CCTP is burn-and-mint with no price slippage; this caps the bridge/forwarding fee — which varies with chain congestion and Fast vs Standard speed — so the burn does not revert if the fee rises. One basis point equals 0.01%. */
|
|
556
|
+
feeToleranceBps: number;
|
|
557
|
+
/** Selects Fast (~8–20s, small fast-burn fee) or Standard (~13–19min, no fast-burn fee). */
|
|
558
|
+
speed?: ("Fast" | "Standard") | undefined;
|
|
559
|
+
/** Solana-source only. Bind the burn to a durable nonce so it survives signing delays. */
|
|
560
|
+
useDurableNonce?: boolean | undefined;
|
|
561
|
+
}) | {};
|
|
232
562
|
/** The user who initiated the request. */
|
|
233
563
|
requester: {
|
|
234
564
|
/** User id. */
|
|
@@ -258,7 +588,7 @@ export type GetSwapResponse = {
|
|
|
258
588
|
/** Swap status. */
|
|
259
589
|
status: "PendingPolicyApproval" | "InProgress" | "Completed" | "Failed" | "Rejected";
|
|
260
590
|
/** Swap provider. */
|
|
261
|
-
provider: "UniswapX" | "UniswapClassic";
|
|
591
|
+
provider: "UniswapX" | "UniswapClassic" | "CircleCctp";
|
|
262
592
|
/** The source asset for this swap transaction. */
|
|
263
593
|
quotedSourceAsset: ({
|
|
264
594
|
kind: "Native";
|
|
@@ -267,9 +597,13 @@ export type GetSwapResponse = {
|
|
|
267
597
|
kind: "Erc20";
|
|
268
598
|
contract: string;
|
|
269
599
|
amount: string;
|
|
600
|
+
} | {
|
|
601
|
+
kind: "Spl";
|
|
602
|
+
mint: string;
|
|
603
|
+
amount: string;
|
|
270
604
|
}) & {
|
|
271
605
|
metadata: {
|
|
272
|
-
network: "Algorand" | "AlgorandTestnet" | "Aptos" | "AptosTestnet" | "ArbitrumOne" | "ArbitrumGoerli" | "ArbitrumSepolia" | "ArcTestnet" | "AvalancheC" | "AvalancheCFuji" | "Adi" | "AdiTestnet" | "AdiTestnetAb" | "BabylonGenesis" | "BabylonTestnet5" | "Base" | "BaseGoerli" | "BaseSepolia" | "Berachain" | "BerachainBArtio" | "BerachainBepolia" | "Bitcoin" | "BitcoinSignet" | "BitcoinTestnet3" | "BitcoinCash" | "BitcoinCashTestnet" | "Bob" | "BobSepolia" | "Bsc" | "BscTestnet" | "Canton" | "CantonDevnet" | "CantonTestnet" | "Cardano" | "CardanoPreprod" | "Concordium" | "ConcordiumTestnet" | "Celo" | "CeloAlfajores" | "Codex" | "CodexSepolia" | "CosmosHub4" | "CosmosIcsTestnet" | "Dogecoin" | "DogecoinTestnet" | "Ethereum" | "EthereumClassic" | "EthereumClassicMordor" | "EthereumGoerli" | "EthereumSepolia" | "EthereumHolesky" | "EthereumHoodi" | "FantomOpera" | "FantomTestnet" | "FlareC" | "FlareCCoston2" | "FlowEvm" | "FlowEvmTestnet" | "Hedera" | "HederaTestnet" | "Ink" | "InkSepolia" | "InternetComputer" | "Ion" | "IonTestnet" | "Iota" | "IotaTestnet" | "IotaZodianet" | "Kaspa" | "KaspaTestnet11" | "Kusama" | "KusamaAssetHub" | "Litecoin" | "LitecoinTestnet" | "Near" | "NearTestnet" | "Optimism" | "OptimismGoerli" | "OptimismSepolia" | "Origyn" | "Plasma" | "PlasmaTestnet" | "Plume" | "PlumeSepolia" | "Paseo" | "PaseoAssetHub" | "Polkadot" | "PolkadotAssetHub" | "Polygon" | "PolygonAmoy" | "PolygonMumbai" | "Polymesh" | "PolymeshTestnet" | "Race" | "RaceSepolia" | "SeiAtlantic2" | "SeiPacific1" | "Solana" | "SolanaDevnet" | "Sonic" | "SonicTestnet" | "Starknet" | "StarknetSepolia" | "Stellar" | "StellarTestnet" | "Sui" | "SuiTestnet" | "Tezos" | "TezosGhostnet" | "Tempo" | "TempoAndantino" | "TempoModerato" | "Tsc" | "TscTestnet1" | "Ton" | "TonTestnet" | "Tron" | "TronNile" | "Westend" | "WestendAssetHub" | "Xdc" | "XdcApothem" | "XLayer" | "XLayerSepolia" | "XrpLedger" | "XrpLedgerTestnet";
|
|
606
|
+
network: "Algorand" | "AlgorandTestnet" | "Aptos" | "AptosTestnet" | "ArbitrumOne" | "ArbitrumGoerli" | "ArbitrumSepolia" | "ArcTestnet" | "Areum" | "AvalancheC" | "AvalancheCFuji" | "Adi" | "AdiTestnet" | "AdiTestnetAb" | "BabylonGenesis" | "BabylonTestnet5" | "Base" | "BaseGoerli" | "BaseSepolia" | "Berachain" | "BerachainBArtio" | "BerachainBepolia" | "BesuTestnet" | "Bitcoin" | "BitcoinSignet" | "BitcoinTestnet3" | "BitcoinTestnet4" | "BitcoinCash" | "BitcoinCashTestnet" | "Bob" | "BobSepolia" | "Bsc" | "BscTestnet" | "Canton" | "CantonDevnet" | "CantonTestnet" | "Cardano" | "CardanoPreprod" | "Concordium" | "ConcordiumTestnet" | "Celo" | "CeloAlfajores" | "Codex" | "CodexSepolia" | "CosmosHub4" | "CosmosIcsTestnet" | "Dogecoin" | "DogecoinTestnet" | "Ethereum" | "EthereumClassic" | "EthereumClassicMordor" | "EthereumGoerli" | "EthereumSepolia" | "EthereumHolesky" | "EthereumHoodi" | "FantomOpera" | "FantomTestnet" | "FlareC" | "FlareCCoston2" | "FlowEvm" | "FlowEvmTestnet" | "IconTestnet" | "Hedera" | "HederaTestnet" | "Ink" | "InkSepolia" | "InternetComputer" | "Ion" | "IonTestnet" | "Iota" | "IotaTestnet" | "IotaZodianet" | "Kaspa" | "KaspaTestnet11" | "Kusama" | "KusamaAssetHub" | "Litecoin" | "LitecoinTestnet" | "Movement" | "MovementTestnet" | "Near" | "NearTestnet" | "Optimism" | "OptimismGoerli" | "OptimismSepolia" | "Origyn" | "Plasma" | "PlasmaTestnet" | "Plume" | "PlumeSepolia" | "Paseo" | "PaseoAssetHub" | "Polkadot" | "PolkadotAssetHub" | "Polygon" | "PolygonAmoy" | "PolygonMumbai" | "Polymesh" | "PolymeshTestnet" | "Race" | "RaceSepolia" | "Rayls" | "RaylsTestnet" | "SeiAtlantic2" | "SeiPacific1" | "Solana" | "SolanaDevnet" | "Sonic" | "SonicTestnet" | "Starknet" | "StarknetSepolia" | "Stellar" | "StellarTestnet" | "Sui" | "SuiTestnet" | "Tezos" | "TezosGhostnet" | "TezosShadownet" | "Tempo" | "TempoAndantino" | "TempoModerato" | "Tsc" | "TscTestnet1" | "Ton" | "TonTestnet" | "Tron" | "TronNile" | "Westend" | "WestendAssetHub" | "Xdc" | "XdcApothem" | "XLayer" | "XLayerSepolia" | "XrpLedger" | "XrpLedgerTestnet";
|
|
273
607
|
name?: string | undefined;
|
|
274
608
|
symbol?: string | undefined;
|
|
275
609
|
decimals: number;
|
|
@@ -284,9 +618,13 @@ export type GetSwapResponse = {
|
|
|
284
618
|
kind: "Erc20";
|
|
285
619
|
contract: string;
|
|
286
620
|
amount: string;
|
|
621
|
+
} | {
|
|
622
|
+
kind: "Spl";
|
|
623
|
+
mint: string;
|
|
624
|
+
amount: string;
|
|
287
625
|
}) & {
|
|
288
626
|
metadata: {
|
|
289
|
-
network: "Algorand" | "AlgorandTestnet" | "Aptos" | "AptosTestnet" | "ArbitrumOne" | "ArbitrumGoerli" | "ArbitrumSepolia" | "ArcTestnet" | "AvalancheC" | "AvalancheCFuji" | "Adi" | "AdiTestnet" | "AdiTestnetAb" | "BabylonGenesis" | "BabylonTestnet5" | "Base" | "BaseGoerli" | "BaseSepolia" | "Berachain" | "BerachainBArtio" | "BerachainBepolia" | "Bitcoin" | "BitcoinSignet" | "BitcoinTestnet3" | "BitcoinCash" | "BitcoinCashTestnet" | "Bob" | "BobSepolia" | "Bsc" | "BscTestnet" | "Canton" | "CantonDevnet" | "CantonTestnet" | "Cardano" | "CardanoPreprod" | "Concordium" | "ConcordiumTestnet" | "Celo" | "CeloAlfajores" | "Codex" | "CodexSepolia" | "CosmosHub4" | "CosmosIcsTestnet" | "Dogecoin" | "DogecoinTestnet" | "Ethereum" | "EthereumClassic" | "EthereumClassicMordor" | "EthereumGoerli" | "EthereumSepolia" | "EthereumHolesky" | "EthereumHoodi" | "FantomOpera" | "FantomTestnet" | "FlareC" | "FlareCCoston2" | "FlowEvm" | "FlowEvmTestnet" | "Hedera" | "HederaTestnet" | "Ink" | "InkSepolia" | "InternetComputer" | "Ion" | "IonTestnet" | "Iota" | "IotaTestnet" | "IotaZodianet" | "Kaspa" | "KaspaTestnet11" | "Kusama" | "KusamaAssetHub" | "Litecoin" | "LitecoinTestnet" | "Near" | "NearTestnet" | "Optimism" | "OptimismGoerli" | "OptimismSepolia" | "Origyn" | "Plasma" | "PlasmaTestnet" | "Plume" | "PlumeSepolia" | "Paseo" | "PaseoAssetHub" | "Polkadot" | "PolkadotAssetHub" | "Polygon" | "PolygonAmoy" | "PolygonMumbai" | "Polymesh" | "PolymeshTestnet" | "Race" | "RaceSepolia" | "SeiAtlantic2" | "SeiPacific1" | "Solana" | "SolanaDevnet" | "Sonic" | "SonicTestnet" | "Starknet" | "StarknetSepolia" | "Stellar" | "StellarTestnet" | "Sui" | "SuiTestnet" | "Tezos" | "TezosGhostnet" | "Tempo" | "TempoAndantino" | "TempoModerato" | "Tsc" | "TscTestnet1" | "Ton" | "TonTestnet" | "Tron" | "TronNile" | "Westend" | "WestendAssetHub" | "Xdc" | "XdcApothem" | "XLayer" | "XLayerSepolia" | "XrpLedger" | "XrpLedgerTestnet";
|
|
627
|
+
network: "Algorand" | "AlgorandTestnet" | "Aptos" | "AptosTestnet" | "ArbitrumOne" | "ArbitrumGoerli" | "ArbitrumSepolia" | "ArcTestnet" | "Areum" | "AvalancheC" | "AvalancheCFuji" | "Adi" | "AdiTestnet" | "AdiTestnetAb" | "BabylonGenesis" | "BabylonTestnet5" | "Base" | "BaseGoerli" | "BaseSepolia" | "Berachain" | "BerachainBArtio" | "BerachainBepolia" | "BesuTestnet" | "Bitcoin" | "BitcoinSignet" | "BitcoinTestnet3" | "BitcoinTestnet4" | "BitcoinCash" | "BitcoinCashTestnet" | "Bob" | "BobSepolia" | "Bsc" | "BscTestnet" | "Canton" | "CantonDevnet" | "CantonTestnet" | "Cardano" | "CardanoPreprod" | "Concordium" | "ConcordiumTestnet" | "Celo" | "CeloAlfajores" | "Codex" | "CodexSepolia" | "CosmosHub4" | "CosmosIcsTestnet" | "Dogecoin" | "DogecoinTestnet" | "Ethereum" | "EthereumClassic" | "EthereumClassicMordor" | "EthereumGoerli" | "EthereumSepolia" | "EthereumHolesky" | "EthereumHoodi" | "FantomOpera" | "FantomTestnet" | "FlareC" | "FlareCCoston2" | "FlowEvm" | "FlowEvmTestnet" | "IconTestnet" | "Hedera" | "HederaTestnet" | "Ink" | "InkSepolia" | "InternetComputer" | "Ion" | "IonTestnet" | "Iota" | "IotaTestnet" | "IotaZodianet" | "Kaspa" | "KaspaTestnet11" | "Kusama" | "KusamaAssetHub" | "Litecoin" | "LitecoinTestnet" | "Movement" | "MovementTestnet" | "Near" | "NearTestnet" | "Optimism" | "OptimismGoerli" | "OptimismSepolia" | "Origyn" | "Plasma" | "PlasmaTestnet" | "Plume" | "PlumeSepolia" | "Paseo" | "PaseoAssetHub" | "Polkadot" | "PolkadotAssetHub" | "Polygon" | "PolygonAmoy" | "PolygonMumbai" | "Polymesh" | "PolymeshTestnet" | "Race" | "RaceSepolia" | "Rayls" | "RaylsTestnet" | "SeiAtlantic2" | "SeiPacific1" | "Solana" | "SolanaDevnet" | "Sonic" | "SonicTestnet" | "Starknet" | "StarknetSepolia" | "Stellar" | "StellarTestnet" | "Sui" | "SuiTestnet" | "Tezos" | "TezosGhostnet" | "TezosShadownet" | "Tempo" | "TempoAndantino" | "TempoModerato" | "Tsc" | "TscTestnet1" | "Ton" | "TonTestnet" | "Tron" | "TronNile" | "Westend" | "WestendAssetHub" | "Xdc" | "XdcApothem" | "XLayer" | "XLayerSepolia" | "XrpLedger" | "XrpLedgerTestnet";
|
|
290
628
|
name?: string | undefined;
|
|
291
629
|
symbol?: string | undefined;
|
|
292
630
|
decimals: number;
|
|
@@ -298,19 +636,92 @@ export type GetSwapResponse = {
|
|
|
298
636
|
/** [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date (must be UTC). When the swap was initiated. */
|
|
299
637
|
dateCreated: string;
|
|
300
638
|
/** The full request used for initiating this swap. */
|
|
301
|
-
requestBody: {
|
|
639
|
+
requestBody: ({
|
|
640
|
+
provider: "UniswapClassic";
|
|
302
641
|
/** Quote to use for this swap. */
|
|
303
642
|
quoteId: string;
|
|
304
643
|
/** An optional reference for this Swap. */
|
|
305
644
|
reference?: string | undefined;
|
|
306
|
-
/** Provided for this swap. Used for attesting that the swap is being created with the same parameters as the quote. */
|
|
307
|
-
provider: "UniswapX" | "UniswapClassic";
|
|
308
645
|
/** Id of the Dfns wallet spending the sourceAsset. Used for attesting that the swap is being created with the same parameters as the quote. */
|
|
309
646
|
walletId: string;
|
|
310
647
|
/** Id of the Dfns wallet receiving the target asset. Currently this value must be the same as the `walletId`. Used for attesting that the swap is being created with the same parameters as the quote. */
|
|
311
648
|
targetWalletId?: string | undefined;
|
|
312
|
-
/** The
|
|
649
|
+
/** The source asset that will be spent on the Swap transaction. Used for attesting that the swap is being created with the same parameters as the quote. */
|
|
650
|
+
sourceAsset: {
|
|
651
|
+
kind: "Native";
|
|
652
|
+
amount: string;
|
|
653
|
+
} | {
|
|
654
|
+
kind: "Erc20";
|
|
655
|
+
contract: string;
|
|
656
|
+
amount: string;
|
|
657
|
+
} | {
|
|
658
|
+
kind: "Spl";
|
|
659
|
+
mint: string;
|
|
660
|
+
amount: string;
|
|
661
|
+
};
|
|
662
|
+
/** The target asset that will be received with the Swap transaction. Used for attesting that the swap is being created with the same parameters as the quote. */
|
|
663
|
+
targetAsset: {
|
|
664
|
+
kind: "Native";
|
|
665
|
+
amount: string;
|
|
666
|
+
} | {
|
|
667
|
+
kind: "Erc20";
|
|
668
|
+
contract: string;
|
|
669
|
+
amount: string;
|
|
670
|
+
} | {
|
|
671
|
+
kind: "Spl";
|
|
672
|
+
mint: string;
|
|
673
|
+
amount: string;
|
|
674
|
+
};
|
|
675
|
+
/** The slippage tolerance for this trade in [basis point](https://en.wikipedia.org/wiki/Basis_point) (BPS). Slippage tolerance defines the maximum price difference you're willing to accept during a trade from the estimated quote, ensuring you still receive at least a minimum number of tokens if the price shifts. One basis point equals one-hundredth of a percentage point, or 0.01%. */
|
|
313
676
|
slippageBps: number;
|
|
677
|
+
} | {
|
|
678
|
+
provider: "UniswapX";
|
|
679
|
+
/** Quote to use for this swap. */
|
|
680
|
+
quoteId: string;
|
|
681
|
+
/** An optional reference for this Swap. */
|
|
682
|
+
reference?: string | undefined;
|
|
683
|
+
/** Id of the Dfns wallet spending the sourceAsset. Used for attesting that the swap is being created with the same parameters as the quote. */
|
|
684
|
+
walletId: string;
|
|
685
|
+
/** Id of the Dfns wallet receiving the target asset. Currently this value must be the same as the `walletId`. Used for attesting that the swap is being created with the same parameters as the quote. */
|
|
686
|
+
targetWalletId?: string | undefined;
|
|
687
|
+
/** The source asset that will be spent on the Swap transaction. Used for attesting that the swap is being created with the same parameters as the quote. */
|
|
688
|
+
sourceAsset: {
|
|
689
|
+
kind: "Native";
|
|
690
|
+
amount: string;
|
|
691
|
+
} | {
|
|
692
|
+
kind: "Erc20";
|
|
693
|
+
contract: string;
|
|
694
|
+
amount: string;
|
|
695
|
+
} | {
|
|
696
|
+
kind: "Spl";
|
|
697
|
+
mint: string;
|
|
698
|
+
amount: string;
|
|
699
|
+
};
|
|
700
|
+
/** The target asset that will be received with the Swap transaction. Used for attesting that the swap is being created with the same parameters as the quote. */
|
|
701
|
+
targetAsset: {
|
|
702
|
+
kind: "Native";
|
|
703
|
+
amount: string;
|
|
704
|
+
} | {
|
|
705
|
+
kind: "Erc20";
|
|
706
|
+
contract: string;
|
|
707
|
+
amount: string;
|
|
708
|
+
} | {
|
|
709
|
+
kind: "Spl";
|
|
710
|
+
mint: string;
|
|
711
|
+
amount: string;
|
|
712
|
+
};
|
|
713
|
+
/** The slippage tolerance for this trade in [basis point](https://en.wikipedia.org/wiki/Basis_point) (BPS). Slippage tolerance defines the maximum price difference you're willing to accept during a trade from the estimated quote, ensuring you still receive at least a minimum number of tokens if the price shifts. One basis point equals one-hundredth of a percentage point, or 0.01%. */
|
|
714
|
+
slippageBps: number;
|
|
715
|
+
} | {
|
|
716
|
+
provider: "CircleCctp";
|
|
717
|
+
/** Quote to use for this swap. */
|
|
718
|
+
quoteId: string;
|
|
719
|
+
/** An optional reference for this Swap. */
|
|
720
|
+
reference?: string | undefined;
|
|
721
|
+
/** Id of the Dfns wallet spending the sourceAsset. Used for attesting that the swap is being created with the same parameters as the quote. */
|
|
722
|
+
walletId: string;
|
|
723
|
+
/** Id of the Dfns wallet receiving the target asset. Currently this value must be the same as the `walletId`. Used for attesting that the swap is being created with the same parameters as the quote. */
|
|
724
|
+
targetWalletId?: string | undefined;
|
|
314
725
|
/** The source asset that will be spent on the Swap transaction. Used for attesting that the swap is being created with the same parameters as the quote. */
|
|
315
726
|
sourceAsset: {
|
|
316
727
|
kind: "Native";
|
|
@@ -319,6 +730,10 @@ export type GetSwapResponse = {
|
|
|
319
730
|
kind: "Erc20";
|
|
320
731
|
contract: string;
|
|
321
732
|
amount: string;
|
|
733
|
+
} | {
|
|
734
|
+
kind: "Spl";
|
|
735
|
+
mint: string;
|
|
736
|
+
amount: string;
|
|
322
737
|
};
|
|
323
738
|
/** The target asset that will be received with the Swap transaction. Used for attesting that the swap is being created with the same parameters as the quote. */
|
|
324
739
|
targetAsset: {
|
|
@@ -328,8 +743,14 @@ export type GetSwapResponse = {
|
|
|
328
743
|
kind: "Erc20";
|
|
329
744
|
contract: string;
|
|
330
745
|
amount: string;
|
|
746
|
+
} | {
|
|
747
|
+
kind: "Spl";
|
|
748
|
+
mint: string;
|
|
749
|
+
amount: string;
|
|
331
750
|
};
|
|
332
|
-
|
|
751
|
+
/** The maximum fee you will accept for this CCTP transfer, in [basis points](https://en.wikipedia.org/wiki/Basis_point) (BPS) of the amount. CCTP is burn-and-mint with no price slippage; this caps the bridge/forwarding fee — which varies with chain congestion and Fast vs Standard speed — so the burn does not revert if the fee rises. One basis point equals 0.01%. */
|
|
752
|
+
feeToleranceBps: number;
|
|
753
|
+
}) | {};
|
|
333
754
|
/** The user who initiated the request. */
|
|
334
755
|
requester: {
|
|
335
756
|
/** User id. */
|
|
@@ -339,6 +760,8 @@ export type GetSwapResponse = {
|
|
|
339
760
|
};
|
|
340
761
|
/** The failure reason, if any. Only present when status is Failed. */
|
|
341
762
|
failureReason?: string | undefined;
|
|
763
|
+
/** Provider-specific intermediate state, only set while `status` is InProgress. Values are opaque strings — clients map them to progress bars, labels or icons as needed. For CCTP one of: `signing-permit`, `burning-source`, `awaiting-source-finality`, `awaiting-attestation`, `awaiting-forwarder`. Undefined for providers without intermediate sub-states. */
|
|
764
|
+
protocolStatus?: string | undefined;
|
|
342
765
|
};
|
|
343
766
|
export type GetSwapRequest = GetSwapParams;
|
|
344
767
|
export type GetSwapQuoteParams = {
|
|
@@ -353,7 +776,7 @@ export type GetSwapQuoteResponse = {
|
|
|
353
776
|
/** If not provided, the walletId is used as the target wallet. If provided, this field is currently required to be the same as walletId */
|
|
354
777
|
targetWalletId?: string | undefined;
|
|
355
778
|
/** Swap provider. */
|
|
356
|
-
provider: "UniswapX" | "UniswapClassic";
|
|
779
|
+
provider: "UniswapX" | "UniswapClassic" | "CircleCctp";
|
|
357
780
|
/** The source asset that will be spent on the swap transaction. */
|
|
358
781
|
sourceAsset: ({
|
|
359
782
|
kind: "Native";
|
|
@@ -362,9 +785,13 @@ export type GetSwapQuoteResponse = {
|
|
|
362
785
|
kind: "Erc20";
|
|
363
786
|
contract: string;
|
|
364
787
|
amount: string;
|
|
788
|
+
} | {
|
|
789
|
+
kind: "Spl";
|
|
790
|
+
mint: string;
|
|
791
|
+
amount: string;
|
|
365
792
|
}) & {
|
|
366
793
|
metadata: {
|
|
367
|
-
network: "Algorand" | "AlgorandTestnet" | "Aptos" | "AptosTestnet" | "ArbitrumOne" | "ArbitrumGoerli" | "ArbitrumSepolia" | "ArcTestnet" | "AvalancheC" | "AvalancheCFuji" | "Adi" | "AdiTestnet" | "AdiTestnetAb" | "BabylonGenesis" | "BabylonTestnet5" | "Base" | "BaseGoerli" | "BaseSepolia" | "Berachain" | "BerachainBArtio" | "BerachainBepolia" | "Bitcoin" | "BitcoinSignet" | "BitcoinTestnet3" | "BitcoinCash" | "BitcoinCashTestnet" | "Bob" | "BobSepolia" | "Bsc" | "BscTestnet" | "Canton" | "CantonDevnet" | "CantonTestnet" | "Cardano" | "CardanoPreprod" | "Concordium" | "ConcordiumTestnet" | "Celo" | "CeloAlfajores" | "Codex" | "CodexSepolia" | "CosmosHub4" | "CosmosIcsTestnet" | "Dogecoin" | "DogecoinTestnet" | "Ethereum" | "EthereumClassic" | "EthereumClassicMordor" | "EthereumGoerli" | "EthereumSepolia" | "EthereumHolesky" | "EthereumHoodi" | "FantomOpera" | "FantomTestnet" | "FlareC" | "FlareCCoston2" | "FlowEvm" | "FlowEvmTestnet" | "Hedera" | "HederaTestnet" | "Ink" | "InkSepolia" | "InternetComputer" | "Ion" | "IonTestnet" | "Iota" | "IotaTestnet" | "IotaZodianet" | "Kaspa" | "KaspaTestnet11" | "Kusama" | "KusamaAssetHub" | "Litecoin" | "LitecoinTestnet" | "Near" | "NearTestnet" | "Optimism" | "OptimismGoerli" | "OptimismSepolia" | "Origyn" | "Plasma" | "PlasmaTestnet" | "Plume" | "PlumeSepolia" | "Paseo" | "PaseoAssetHub" | "Polkadot" | "PolkadotAssetHub" | "Polygon" | "PolygonAmoy" | "PolygonMumbai" | "Polymesh" | "PolymeshTestnet" | "Race" | "RaceSepolia" | "SeiAtlantic2" | "SeiPacific1" | "Solana" | "SolanaDevnet" | "Sonic" | "SonicTestnet" | "Starknet" | "StarknetSepolia" | "Stellar" | "StellarTestnet" | "Sui" | "SuiTestnet" | "Tezos" | "TezosGhostnet" | "Tempo" | "TempoAndantino" | "TempoModerato" | "Tsc" | "TscTestnet1" | "Ton" | "TonTestnet" | "Tron" | "TronNile" | "Westend" | "WestendAssetHub" | "Xdc" | "XdcApothem" | "XLayer" | "XLayerSepolia" | "XrpLedger" | "XrpLedgerTestnet";
|
|
794
|
+
network: "Algorand" | "AlgorandTestnet" | "Aptos" | "AptosTestnet" | "ArbitrumOne" | "ArbitrumGoerli" | "ArbitrumSepolia" | "ArcTestnet" | "Areum" | "AvalancheC" | "AvalancheCFuji" | "Adi" | "AdiTestnet" | "AdiTestnetAb" | "BabylonGenesis" | "BabylonTestnet5" | "Base" | "BaseGoerli" | "BaseSepolia" | "Berachain" | "BerachainBArtio" | "BerachainBepolia" | "BesuTestnet" | "Bitcoin" | "BitcoinSignet" | "BitcoinTestnet3" | "BitcoinTestnet4" | "BitcoinCash" | "BitcoinCashTestnet" | "Bob" | "BobSepolia" | "Bsc" | "BscTestnet" | "Canton" | "CantonDevnet" | "CantonTestnet" | "Cardano" | "CardanoPreprod" | "Concordium" | "ConcordiumTestnet" | "Celo" | "CeloAlfajores" | "Codex" | "CodexSepolia" | "CosmosHub4" | "CosmosIcsTestnet" | "Dogecoin" | "DogecoinTestnet" | "Ethereum" | "EthereumClassic" | "EthereumClassicMordor" | "EthereumGoerli" | "EthereumSepolia" | "EthereumHolesky" | "EthereumHoodi" | "FantomOpera" | "FantomTestnet" | "FlareC" | "FlareCCoston2" | "FlowEvm" | "FlowEvmTestnet" | "IconTestnet" | "Hedera" | "HederaTestnet" | "Ink" | "InkSepolia" | "InternetComputer" | "Ion" | "IonTestnet" | "Iota" | "IotaTestnet" | "IotaZodianet" | "Kaspa" | "KaspaTestnet11" | "Kusama" | "KusamaAssetHub" | "Litecoin" | "LitecoinTestnet" | "Movement" | "MovementTestnet" | "Near" | "NearTestnet" | "Optimism" | "OptimismGoerli" | "OptimismSepolia" | "Origyn" | "Plasma" | "PlasmaTestnet" | "Plume" | "PlumeSepolia" | "Paseo" | "PaseoAssetHub" | "Polkadot" | "PolkadotAssetHub" | "Polygon" | "PolygonAmoy" | "PolygonMumbai" | "Polymesh" | "PolymeshTestnet" | "Race" | "RaceSepolia" | "Rayls" | "RaylsTestnet" | "SeiAtlantic2" | "SeiPacific1" | "Solana" | "SolanaDevnet" | "Sonic" | "SonicTestnet" | "Starknet" | "StarknetSepolia" | "Stellar" | "StellarTestnet" | "Sui" | "SuiTestnet" | "Tezos" | "TezosGhostnet" | "TezosShadownet" | "Tempo" | "TempoAndantino" | "TempoModerato" | "Tsc" | "TscTestnet1" | "Ton" | "TonTestnet" | "Tron" | "TronNile" | "Westend" | "WestendAssetHub" | "Xdc" | "XdcApothem" | "XLayer" | "XLayerSepolia" | "XrpLedger" | "XrpLedgerTestnet";
|
|
368
795
|
name?: string | undefined;
|
|
369
796
|
symbol?: string | undefined;
|
|
370
797
|
decimals: number;
|
|
@@ -379,9 +806,13 @@ export type GetSwapQuoteResponse = {
|
|
|
379
806
|
kind: "Erc20";
|
|
380
807
|
contract: string;
|
|
381
808
|
amount: string;
|
|
809
|
+
} | {
|
|
810
|
+
kind: "Spl";
|
|
811
|
+
mint: string;
|
|
812
|
+
amount: string;
|
|
382
813
|
}) & {
|
|
383
814
|
metadata: {
|
|
384
|
-
network: "Algorand" | "AlgorandTestnet" | "Aptos" | "AptosTestnet" | "ArbitrumOne" | "ArbitrumGoerli" | "ArbitrumSepolia" | "ArcTestnet" | "AvalancheC" | "AvalancheCFuji" | "Adi" | "AdiTestnet" | "AdiTestnetAb" | "BabylonGenesis" | "BabylonTestnet5" | "Base" | "BaseGoerli" | "BaseSepolia" | "Berachain" | "BerachainBArtio" | "BerachainBepolia" | "Bitcoin" | "BitcoinSignet" | "BitcoinTestnet3" | "BitcoinCash" | "BitcoinCashTestnet" | "Bob" | "BobSepolia" | "Bsc" | "BscTestnet" | "Canton" | "CantonDevnet" | "CantonTestnet" | "Cardano" | "CardanoPreprod" | "Concordium" | "ConcordiumTestnet" | "Celo" | "CeloAlfajores" | "Codex" | "CodexSepolia" | "CosmosHub4" | "CosmosIcsTestnet" | "Dogecoin" | "DogecoinTestnet" | "Ethereum" | "EthereumClassic" | "EthereumClassicMordor" | "EthereumGoerli" | "EthereumSepolia" | "EthereumHolesky" | "EthereumHoodi" | "FantomOpera" | "FantomTestnet" | "FlareC" | "FlareCCoston2" | "FlowEvm" | "FlowEvmTestnet" | "Hedera" | "HederaTestnet" | "Ink" | "InkSepolia" | "InternetComputer" | "Ion" | "IonTestnet" | "Iota" | "IotaTestnet" | "IotaZodianet" | "Kaspa" | "KaspaTestnet11" | "Kusama" | "KusamaAssetHub" | "Litecoin" | "LitecoinTestnet" | "Near" | "NearTestnet" | "Optimism" | "OptimismGoerli" | "OptimismSepolia" | "Origyn" | "Plasma" | "PlasmaTestnet" | "Plume" | "PlumeSepolia" | "Paseo" | "PaseoAssetHub" | "Polkadot" | "PolkadotAssetHub" | "Polygon" | "PolygonAmoy" | "PolygonMumbai" | "Polymesh" | "PolymeshTestnet" | "Race" | "RaceSepolia" | "SeiAtlantic2" | "SeiPacific1" | "Solana" | "SolanaDevnet" | "Sonic" | "SonicTestnet" | "Starknet" | "StarknetSepolia" | "Stellar" | "StellarTestnet" | "Sui" | "SuiTestnet" | "Tezos" | "TezosGhostnet" | "Tempo" | "TempoAndantino" | "TempoModerato" | "Tsc" | "TscTestnet1" | "Ton" | "TonTestnet" | "Tron" | "TronNile" | "Westend" | "WestendAssetHub" | "Xdc" | "XdcApothem" | "XLayer" | "XLayerSepolia" | "XrpLedger" | "XrpLedgerTestnet";
|
|
815
|
+
network: "Algorand" | "AlgorandTestnet" | "Aptos" | "AptosTestnet" | "ArbitrumOne" | "ArbitrumGoerli" | "ArbitrumSepolia" | "ArcTestnet" | "Areum" | "AvalancheC" | "AvalancheCFuji" | "Adi" | "AdiTestnet" | "AdiTestnetAb" | "BabylonGenesis" | "BabylonTestnet5" | "Base" | "BaseGoerli" | "BaseSepolia" | "Berachain" | "BerachainBArtio" | "BerachainBepolia" | "BesuTestnet" | "Bitcoin" | "BitcoinSignet" | "BitcoinTestnet3" | "BitcoinTestnet4" | "BitcoinCash" | "BitcoinCashTestnet" | "Bob" | "BobSepolia" | "Bsc" | "BscTestnet" | "Canton" | "CantonDevnet" | "CantonTestnet" | "Cardano" | "CardanoPreprod" | "Concordium" | "ConcordiumTestnet" | "Celo" | "CeloAlfajores" | "Codex" | "CodexSepolia" | "CosmosHub4" | "CosmosIcsTestnet" | "Dogecoin" | "DogecoinTestnet" | "Ethereum" | "EthereumClassic" | "EthereumClassicMordor" | "EthereumGoerli" | "EthereumSepolia" | "EthereumHolesky" | "EthereumHoodi" | "FantomOpera" | "FantomTestnet" | "FlareC" | "FlareCCoston2" | "FlowEvm" | "FlowEvmTestnet" | "IconTestnet" | "Hedera" | "HederaTestnet" | "Ink" | "InkSepolia" | "InternetComputer" | "Ion" | "IonTestnet" | "Iota" | "IotaTestnet" | "IotaZodianet" | "Kaspa" | "KaspaTestnet11" | "Kusama" | "KusamaAssetHub" | "Litecoin" | "LitecoinTestnet" | "Movement" | "MovementTestnet" | "Near" | "NearTestnet" | "Optimism" | "OptimismGoerli" | "OptimismSepolia" | "Origyn" | "Plasma" | "PlasmaTestnet" | "Plume" | "PlumeSepolia" | "Paseo" | "PaseoAssetHub" | "Polkadot" | "PolkadotAssetHub" | "Polygon" | "PolygonAmoy" | "PolygonMumbai" | "Polymesh" | "PolymeshTestnet" | "Race" | "RaceSepolia" | "Rayls" | "RaylsTestnet" | "SeiAtlantic2" | "SeiPacific1" | "Solana" | "SolanaDevnet" | "Sonic" | "SonicTestnet" | "Starknet" | "StarknetSepolia" | "Stellar" | "StellarTestnet" | "Sui" | "SuiTestnet" | "Tezos" | "TezosGhostnet" | "TezosShadownet" | "Tempo" | "TempoAndantino" | "TempoModerato" | "Tsc" | "TscTestnet1" | "Ton" | "TonTestnet" | "Tron" | "TronNile" | "Westend" | "WestendAssetHub" | "Xdc" | "XdcApothem" | "XLayer" | "XLayerSepolia" | "XrpLedger" | "XrpLedgerTestnet";
|
|
385
816
|
name?: string | undefined;
|
|
386
817
|
symbol?: string | undefined;
|
|
387
818
|
decimals: number;
|
|
@@ -390,12 +821,44 @@ export type GetSwapQuoteResponse = {
|
|
|
390
821
|
};
|
|
391
822
|
/** The slippage tolerance for this trade in [basis point](https://en.wikipedia.org/wiki/Basis_point) (BPS). Slippage tolerance defines the maximum price difference you're willing to accept during a trade from the estimated quote, ensuring you still receive at least a minimum number of tokens if the price shifts. One basis point equals one-hundredth of a percentage point, or 0.01%. */
|
|
392
823
|
slippageBps: number;
|
|
824
|
+
/** Total fee deducted from the source amount to reach the target amount, in the source asset base units. Set for CCTP (the quoted maxFee Circle may deduct); omitted for providers that do not surface a single fee figure. */
|
|
825
|
+
fee?: string | undefined;
|
|
393
826
|
/** [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date (must be UTC). When the quote was created. */
|
|
394
827
|
dateCreated: string;
|
|
395
828
|
/** The full request used for obtaining this quote. */
|
|
396
|
-
requestBody: {
|
|
397
|
-
|
|
398
|
-
|
|
829
|
+
requestBody: ({
|
|
830
|
+
provider: "UniswapClassic";
|
|
831
|
+
/** Id of the Dfns wallet spending the sourceAsset. */
|
|
832
|
+
walletId: string;
|
|
833
|
+
/** Id of the Dfns wallet receiving the target asset. Currently this value must be the same as the `walletId`. */
|
|
834
|
+
targetWalletId?: string | undefined;
|
|
835
|
+
/** The source asset that will be spent on the Swap transaction, following the same stucture as the [transfer API](https://docs.dfns.co/api-reference/wallets/transfer-asset). */
|
|
836
|
+
sourceAsset: {
|
|
837
|
+
kind: "Native";
|
|
838
|
+
amount: string;
|
|
839
|
+
} | {
|
|
840
|
+
kind: "Erc20";
|
|
841
|
+
contract: string;
|
|
842
|
+
amount: string;
|
|
843
|
+
} | {
|
|
844
|
+
kind: "Spl";
|
|
845
|
+
mint: string;
|
|
846
|
+
amount: string;
|
|
847
|
+
};
|
|
848
|
+
/** The target asset that will be received with the Swap transaction, follows the same structure as sourceAsset, but doesn't include the amount. */
|
|
849
|
+
targetAsset: {
|
|
850
|
+
kind: "Native";
|
|
851
|
+
} | {
|
|
852
|
+
kind: "Erc20";
|
|
853
|
+
contract: string;
|
|
854
|
+
} | {
|
|
855
|
+
kind: "Spl";
|
|
856
|
+
mint: string;
|
|
857
|
+
};
|
|
858
|
+
/** The slippage tolerance for this trade in [basis point](https://en.wikipedia.org/wiki/Basis_point) (BPS). Slippage tolerance defines the maximum price difference you're willing to accept during a trade from the estimated quote, ensuring you still receive at least a minimum number of tokens if the price shifts. One basis point equals one-hundredth of a percentage point, or 0.01%. */
|
|
859
|
+
slippageBps: number;
|
|
860
|
+
} | {
|
|
861
|
+
provider: "UniswapX";
|
|
399
862
|
/** Id of the Dfns wallet spending the sourceAsset. */
|
|
400
863
|
walletId: string;
|
|
401
864
|
/** Id of the Dfns wallet receiving the target asset. Currently this value must be the same as the `walletId`. */
|
|
@@ -408,6 +871,10 @@ export type GetSwapQuoteResponse = {
|
|
|
408
871
|
kind: "Erc20";
|
|
409
872
|
contract: string;
|
|
410
873
|
amount: string;
|
|
874
|
+
} | {
|
|
875
|
+
kind: "Spl";
|
|
876
|
+
mint: string;
|
|
877
|
+
amount: string;
|
|
411
878
|
};
|
|
412
879
|
/** The target asset that will be received with the Swap transaction, follows the same structure as sourceAsset, but doesn't include the amount. */
|
|
413
880
|
targetAsset: {
|
|
@@ -415,10 +882,48 @@ export type GetSwapQuoteResponse = {
|
|
|
415
882
|
} | {
|
|
416
883
|
kind: "Erc20";
|
|
417
884
|
contract: string;
|
|
885
|
+
} | {
|
|
886
|
+
kind: "Spl";
|
|
887
|
+
mint: string;
|
|
418
888
|
};
|
|
419
889
|
/** The slippage tolerance for this trade in [basis point](https://en.wikipedia.org/wiki/Basis_point) (BPS). Slippage tolerance defines the maximum price difference you're willing to accept during a trade from the estimated quote, ensuring you still receive at least a minimum number of tokens if the price shifts. One basis point equals one-hundredth of a percentage point, or 0.01%. */
|
|
420
890
|
slippageBps: number;
|
|
421
|
-
} | {
|
|
891
|
+
} | {
|
|
892
|
+
provider: "CircleCctp";
|
|
893
|
+
/** Id of the Dfns wallet spending the sourceAsset. */
|
|
894
|
+
walletId: string;
|
|
895
|
+
/** Id of the Dfns wallet receiving the target asset. Currently this value must be the same as the `walletId`. */
|
|
896
|
+
targetWalletId?: string | undefined;
|
|
897
|
+
/** The source asset that will be spent on the Swap transaction, following the same stucture as the [transfer API](https://docs.dfns.co/api-reference/wallets/transfer-asset). */
|
|
898
|
+
sourceAsset: {
|
|
899
|
+
kind: "Native";
|
|
900
|
+
amount: string;
|
|
901
|
+
} | {
|
|
902
|
+
kind: "Erc20";
|
|
903
|
+
contract: string;
|
|
904
|
+
amount: string;
|
|
905
|
+
} | {
|
|
906
|
+
kind: "Spl";
|
|
907
|
+
mint: string;
|
|
908
|
+
amount: string;
|
|
909
|
+
};
|
|
910
|
+
/** The target asset that will be received with the Swap transaction, follows the same structure as sourceAsset, but doesn't include the amount. */
|
|
911
|
+
targetAsset: {
|
|
912
|
+
kind: "Native";
|
|
913
|
+
} | {
|
|
914
|
+
kind: "Erc20";
|
|
915
|
+
contract: string;
|
|
916
|
+
} | {
|
|
917
|
+
kind: "Spl";
|
|
918
|
+
mint: string;
|
|
919
|
+
};
|
|
920
|
+
/** The maximum fee you will accept for this CCTP transfer, in [basis points](https://en.wikipedia.org/wiki/Basis_point) (BPS) of the amount. CCTP is burn-and-mint with no price slippage; this caps the bridge/forwarding fee — which varies with chain congestion and Fast vs Standard speed — so the burn does not revert if the fee rises. One basis point equals 0.01%. */
|
|
921
|
+
feeToleranceBps: number;
|
|
922
|
+
/** Selects Fast (~8–20s, small fast-burn fee) or Standard (~13–19min, no fast-burn fee). */
|
|
923
|
+
speed?: ("Fast" | "Standard") | undefined;
|
|
924
|
+
/** Solana-source only. Bind the burn to a durable nonce so it survives signing delays. */
|
|
925
|
+
useDurableNonce?: boolean | undefined;
|
|
926
|
+
}) | {};
|
|
422
927
|
/** The user who initiated the request. */
|
|
423
928
|
requester: {
|
|
424
929
|
/** User id. */
|
|
@@ -450,7 +955,7 @@ export type ListSwapsResponse = {
|
|
|
450
955
|
/** Swap status. */
|
|
451
956
|
status: "PendingPolicyApproval" | "InProgress" | "Completed" | "Failed" | "Rejected";
|
|
452
957
|
/** Swap provider. */
|
|
453
|
-
provider: "UniswapX" | "UniswapClassic";
|
|
958
|
+
provider: "UniswapX" | "UniswapClassic" | "CircleCctp";
|
|
454
959
|
/** The source asset for this swap transaction. */
|
|
455
960
|
quotedSourceAsset: ({
|
|
456
961
|
kind: "Native";
|
|
@@ -459,9 +964,13 @@ export type ListSwapsResponse = {
|
|
|
459
964
|
kind: "Erc20";
|
|
460
965
|
contract: string;
|
|
461
966
|
amount: string;
|
|
967
|
+
} | {
|
|
968
|
+
kind: "Spl";
|
|
969
|
+
mint: string;
|
|
970
|
+
amount: string;
|
|
462
971
|
}) & {
|
|
463
972
|
metadata: {
|
|
464
|
-
network: "Algorand" | "AlgorandTestnet" | "Aptos" | "AptosTestnet" | "ArbitrumOne" | "ArbitrumGoerli" | "ArbitrumSepolia" | "ArcTestnet" | "AvalancheC" | "AvalancheCFuji" | "Adi" | "AdiTestnet" | "AdiTestnetAb" | "BabylonGenesis" | "BabylonTestnet5" | "Base" | "BaseGoerli" | "BaseSepolia" | "Berachain" | "BerachainBArtio" | "BerachainBepolia" | "Bitcoin" | "BitcoinSignet" | "BitcoinTestnet3" | "BitcoinCash" | "BitcoinCashTestnet" | "Bob" | "BobSepolia" | "Bsc" | "BscTestnet" | "Canton" | "CantonDevnet" | "CantonTestnet" | "Cardano" | "CardanoPreprod" | "Concordium" | "ConcordiumTestnet" | "Celo" | "CeloAlfajores" | "Codex" | "CodexSepolia" | "CosmosHub4" | "CosmosIcsTestnet" | "Dogecoin" | "DogecoinTestnet" | "Ethereum" | "EthereumClassic" | "EthereumClassicMordor" | "EthereumGoerli" | "EthereumSepolia" | "EthereumHolesky" | "EthereumHoodi" | "FantomOpera" | "FantomTestnet" | "FlareC" | "FlareCCoston2" | "FlowEvm" | "FlowEvmTestnet" | "Hedera" | "HederaTestnet" | "Ink" | "InkSepolia" | "InternetComputer" | "Ion" | "IonTestnet" | "Iota" | "IotaTestnet" | "IotaZodianet" | "Kaspa" | "KaspaTestnet11" | "Kusama" | "KusamaAssetHub" | "Litecoin" | "LitecoinTestnet" | "Near" | "NearTestnet" | "Optimism" | "OptimismGoerli" | "OptimismSepolia" | "Origyn" | "Plasma" | "PlasmaTestnet" | "Plume" | "PlumeSepolia" | "Paseo" | "PaseoAssetHub" | "Polkadot" | "PolkadotAssetHub" | "Polygon" | "PolygonAmoy" | "PolygonMumbai" | "Polymesh" | "PolymeshTestnet" | "Race" | "RaceSepolia" | "SeiAtlantic2" | "SeiPacific1" | "Solana" | "SolanaDevnet" | "Sonic" | "SonicTestnet" | "Starknet" | "StarknetSepolia" | "Stellar" | "StellarTestnet" | "Sui" | "SuiTestnet" | "Tezos" | "TezosGhostnet" | "Tempo" | "TempoAndantino" | "TempoModerato" | "Tsc" | "TscTestnet1" | "Ton" | "TonTestnet" | "Tron" | "TronNile" | "Westend" | "WestendAssetHub" | "Xdc" | "XdcApothem" | "XLayer" | "XLayerSepolia" | "XrpLedger" | "XrpLedgerTestnet";
|
|
973
|
+
network: "Algorand" | "AlgorandTestnet" | "Aptos" | "AptosTestnet" | "ArbitrumOne" | "ArbitrumGoerli" | "ArbitrumSepolia" | "ArcTestnet" | "Areum" | "AvalancheC" | "AvalancheCFuji" | "Adi" | "AdiTestnet" | "AdiTestnetAb" | "BabylonGenesis" | "BabylonTestnet5" | "Base" | "BaseGoerli" | "BaseSepolia" | "Berachain" | "BerachainBArtio" | "BerachainBepolia" | "BesuTestnet" | "Bitcoin" | "BitcoinSignet" | "BitcoinTestnet3" | "BitcoinTestnet4" | "BitcoinCash" | "BitcoinCashTestnet" | "Bob" | "BobSepolia" | "Bsc" | "BscTestnet" | "Canton" | "CantonDevnet" | "CantonTestnet" | "Cardano" | "CardanoPreprod" | "Concordium" | "ConcordiumTestnet" | "Celo" | "CeloAlfajores" | "Codex" | "CodexSepolia" | "CosmosHub4" | "CosmosIcsTestnet" | "Dogecoin" | "DogecoinTestnet" | "Ethereum" | "EthereumClassic" | "EthereumClassicMordor" | "EthereumGoerli" | "EthereumSepolia" | "EthereumHolesky" | "EthereumHoodi" | "FantomOpera" | "FantomTestnet" | "FlareC" | "FlareCCoston2" | "FlowEvm" | "FlowEvmTestnet" | "IconTestnet" | "Hedera" | "HederaTestnet" | "Ink" | "InkSepolia" | "InternetComputer" | "Ion" | "IonTestnet" | "Iota" | "IotaTestnet" | "IotaZodianet" | "Kaspa" | "KaspaTestnet11" | "Kusama" | "KusamaAssetHub" | "Litecoin" | "LitecoinTestnet" | "Movement" | "MovementTestnet" | "Near" | "NearTestnet" | "Optimism" | "OptimismGoerli" | "OptimismSepolia" | "Origyn" | "Plasma" | "PlasmaTestnet" | "Plume" | "PlumeSepolia" | "Paseo" | "PaseoAssetHub" | "Polkadot" | "PolkadotAssetHub" | "Polygon" | "PolygonAmoy" | "PolygonMumbai" | "Polymesh" | "PolymeshTestnet" | "Race" | "RaceSepolia" | "Rayls" | "RaylsTestnet" | "SeiAtlantic2" | "SeiPacific1" | "Solana" | "SolanaDevnet" | "Sonic" | "SonicTestnet" | "Starknet" | "StarknetSepolia" | "Stellar" | "StellarTestnet" | "Sui" | "SuiTestnet" | "Tezos" | "TezosGhostnet" | "TezosShadownet" | "Tempo" | "TempoAndantino" | "TempoModerato" | "Tsc" | "TscTestnet1" | "Ton" | "TonTestnet" | "Tron" | "TronNile" | "Westend" | "WestendAssetHub" | "Xdc" | "XdcApothem" | "XLayer" | "XLayerSepolia" | "XrpLedger" | "XrpLedgerTestnet";
|
|
465
974
|
name?: string | undefined;
|
|
466
975
|
symbol?: string | undefined;
|
|
467
976
|
decimals: number;
|
|
@@ -476,9 +985,13 @@ export type ListSwapsResponse = {
|
|
|
476
985
|
kind: "Erc20";
|
|
477
986
|
contract: string;
|
|
478
987
|
amount: string;
|
|
988
|
+
} | {
|
|
989
|
+
kind: "Spl";
|
|
990
|
+
mint: string;
|
|
991
|
+
amount: string;
|
|
479
992
|
}) & {
|
|
480
993
|
metadata: {
|
|
481
|
-
network: "Algorand" | "AlgorandTestnet" | "Aptos" | "AptosTestnet" | "ArbitrumOne" | "ArbitrumGoerli" | "ArbitrumSepolia" | "ArcTestnet" | "AvalancheC" | "AvalancheCFuji" | "Adi" | "AdiTestnet" | "AdiTestnetAb" | "BabylonGenesis" | "BabylonTestnet5" | "Base" | "BaseGoerli" | "BaseSepolia" | "Berachain" | "BerachainBArtio" | "BerachainBepolia" | "Bitcoin" | "BitcoinSignet" | "BitcoinTestnet3" | "BitcoinCash" | "BitcoinCashTestnet" | "Bob" | "BobSepolia" | "Bsc" | "BscTestnet" | "Canton" | "CantonDevnet" | "CantonTestnet" | "Cardano" | "CardanoPreprod" | "Concordium" | "ConcordiumTestnet" | "Celo" | "CeloAlfajores" | "Codex" | "CodexSepolia" | "CosmosHub4" | "CosmosIcsTestnet" | "Dogecoin" | "DogecoinTestnet" | "Ethereum" | "EthereumClassic" | "EthereumClassicMordor" | "EthereumGoerli" | "EthereumSepolia" | "EthereumHolesky" | "EthereumHoodi" | "FantomOpera" | "FantomTestnet" | "FlareC" | "FlareCCoston2" | "FlowEvm" | "FlowEvmTestnet" | "Hedera" | "HederaTestnet" | "Ink" | "InkSepolia" | "InternetComputer" | "Ion" | "IonTestnet" | "Iota" | "IotaTestnet" | "IotaZodianet" | "Kaspa" | "KaspaTestnet11" | "Kusama" | "KusamaAssetHub" | "Litecoin" | "LitecoinTestnet" | "Near" | "NearTestnet" | "Optimism" | "OptimismGoerli" | "OptimismSepolia" | "Origyn" | "Plasma" | "PlasmaTestnet" | "Plume" | "PlumeSepolia" | "Paseo" | "PaseoAssetHub" | "Polkadot" | "PolkadotAssetHub" | "Polygon" | "PolygonAmoy" | "PolygonMumbai" | "Polymesh" | "PolymeshTestnet" | "Race" | "RaceSepolia" | "SeiAtlantic2" | "SeiPacific1" | "Solana" | "SolanaDevnet" | "Sonic" | "SonicTestnet" | "Starknet" | "StarknetSepolia" | "Stellar" | "StellarTestnet" | "Sui" | "SuiTestnet" | "Tezos" | "TezosGhostnet" | "Tempo" | "TempoAndantino" | "TempoModerato" | "Tsc" | "TscTestnet1" | "Ton" | "TonTestnet" | "Tron" | "TronNile" | "Westend" | "WestendAssetHub" | "Xdc" | "XdcApothem" | "XLayer" | "XLayerSepolia" | "XrpLedger" | "XrpLedgerTestnet";
|
|
994
|
+
network: "Algorand" | "AlgorandTestnet" | "Aptos" | "AptosTestnet" | "ArbitrumOne" | "ArbitrumGoerli" | "ArbitrumSepolia" | "ArcTestnet" | "Areum" | "AvalancheC" | "AvalancheCFuji" | "Adi" | "AdiTestnet" | "AdiTestnetAb" | "BabylonGenesis" | "BabylonTestnet5" | "Base" | "BaseGoerli" | "BaseSepolia" | "Berachain" | "BerachainBArtio" | "BerachainBepolia" | "BesuTestnet" | "Bitcoin" | "BitcoinSignet" | "BitcoinTestnet3" | "BitcoinTestnet4" | "BitcoinCash" | "BitcoinCashTestnet" | "Bob" | "BobSepolia" | "Bsc" | "BscTestnet" | "Canton" | "CantonDevnet" | "CantonTestnet" | "Cardano" | "CardanoPreprod" | "Concordium" | "ConcordiumTestnet" | "Celo" | "CeloAlfajores" | "Codex" | "CodexSepolia" | "CosmosHub4" | "CosmosIcsTestnet" | "Dogecoin" | "DogecoinTestnet" | "Ethereum" | "EthereumClassic" | "EthereumClassicMordor" | "EthereumGoerli" | "EthereumSepolia" | "EthereumHolesky" | "EthereumHoodi" | "FantomOpera" | "FantomTestnet" | "FlareC" | "FlareCCoston2" | "FlowEvm" | "FlowEvmTestnet" | "IconTestnet" | "Hedera" | "HederaTestnet" | "Ink" | "InkSepolia" | "InternetComputer" | "Ion" | "IonTestnet" | "Iota" | "IotaTestnet" | "IotaZodianet" | "Kaspa" | "KaspaTestnet11" | "Kusama" | "KusamaAssetHub" | "Litecoin" | "LitecoinTestnet" | "Movement" | "MovementTestnet" | "Near" | "NearTestnet" | "Optimism" | "OptimismGoerli" | "OptimismSepolia" | "Origyn" | "Plasma" | "PlasmaTestnet" | "Plume" | "PlumeSepolia" | "Paseo" | "PaseoAssetHub" | "Polkadot" | "PolkadotAssetHub" | "Polygon" | "PolygonAmoy" | "PolygonMumbai" | "Polymesh" | "PolymeshTestnet" | "Race" | "RaceSepolia" | "Rayls" | "RaylsTestnet" | "SeiAtlantic2" | "SeiPacific1" | "Solana" | "SolanaDevnet" | "Sonic" | "SonicTestnet" | "Starknet" | "StarknetSepolia" | "Stellar" | "StellarTestnet" | "Sui" | "SuiTestnet" | "Tezos" | "TezosGhostnet" | "TezosShadownet" | "Tempo" | "TempoAndantino" | "TempoModerato" | "Tsc" | "TscTestnet1" | "Ton" | "TonTestnet" | "Tron" | "TronNile" | "Westend" | "WestendAssetHub" | "Xdc" | "XdcApothem" | "XLayer" | "XLayerSepolia" | "XrpLedger" | "XrpLedgerTestnet";
|
|
482
995
|
name?: string | undefined;
|
|
483
996
|
symbol?: string | undefined;
|
|
484
997
|
decimals: number;
|
|
@@ -490,19 +1003,92 @@ export type ListSwapsResponse = {
|
|
|
490
1003
|
/** [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date (must be UTC). When the swap was initiated. */
|
|
491
1004
|
dateCreated: string;
|
|
492
1005
|
/** The full request used for initiating this swap. */
|
|
493
|
-
requestBody: {
|
|
1006
|
+
requestBody: ({
|
|
1007
|
+
provider: "UniswapClassic";
|
|
494
1008
|
/** Quote to use for this swap. */
|
|
495
1009
|
quoteId: string;
|
|
496
1010
|
/** An optional reference for this Swap. */
|
|
497
1011
|
reference?: string | undefined;
|
|
498
|
-
/** Provided for this swap. Used for attesting that the swap is being created with the same parameters as the quote. */
|
|
499
|
-
provider: "UniswapX" | "UniswapClassic";
|
|
500
1012
|
/** Id of the Dfns wallet spending the sourceAsset. Used for attesting that the swap is being created with the same parameters as the quote. */
|
|
501
1013
|
walletId: string;
|
|
502
1014
|
/** Id of the Dfns wallet receiving the target asset. Currently this value must be the same as the `walletId`. Used for attesting that the swap is being created with the same parameters as the quote. */
|
|
503
1015
|
targetWalletId?: string | undefined;
|
|
504
|
-
/** The
|
|
1016
|
+
/** The source asset that will be spent on the Swap transaction. Used for attesting that the swap is being created with the same parameters as the quote. */
|
|
1017
|
+
sourceAsset: {
|
|
1018
|
+
kind: "Native";
|
|
1019
|
+
amount: string;
|
|
1020
|
+
} | {
|
|
1021
|
+
kind: "Erc20";
|
|
1022
|
+
contract: string;
|
|
1023
|
+
amount: string;
|
|
1024
|
+
} | {
|
|
1025
|
+
kind: "Spl";
|
|
1026
|
+
mint: string;
|
|
1027
|
+
amount: string;
|
|
1028
|
+
};
|
|
1029
|
+
/** The target asset that will be received with the Swap transaction. Used for attesting that the swap is being created with the same parameters as the quote. */
|
|
1030
|
+
targetAsset: {
|
|
1031
|
+
kind: "Native";
|
|
1032
|
+
amount: string;
|
|
1033
|
+
} | {
|
|
1034
|
+
kind: "Erc20";
|
|
1035
|
+
contract: string;
|
|
1036
|
+
amount: string;
|
|
1037
|
+
} | {
|
|
1038
|
+
kind: "Spl";
|
|
1039
|
+
mint: string;
|
|
1040
|
+
amount: string;
|
|
1041
|
+
};
|
|
1042
|
+
/** The slippage tolerance for this trade in [basis point](https://en.wikipedia.org/wiki/Basis_point) (BPS). Slippage tolerance defines the maximum price difference you're willing to accept during a trade from the estimated quote, ensuring you still receive at least a minimum number of tokens if the price shifts. One basis point equals one-hundredth of a percentage point, or 0.01%. */
|
|
1043
|
+
slippageBps: number;
|
|
1044
|
+
} | {
|
|
1045
|
+
provider: "UniswapX";
|
|
1046
|
+
/** Quote to use for this swap. */
|
|
1047
|
+
quoteId: string;
|
|
1048
|
+
/** An optional reference for this Swap. */
|
|
1049
|
+
reference?: string | undefined;
|
|
1050
|
+
/** Id of the Dfns wallet spending the sourceAsset. Used for attesting that the swap is being created with the same parameters as the quote. */
|
|
1051
|
+
walletId: string;
|
|
1052
|
+
/** Id of the Dfns wallet receiving the target asset. Currently this value must be the same as the `walletId`. Used for attesting that the swap is being created with the same parameters as the quote. */
|
|
1053
|
+
targetWalletId?: string | undefined;
|
|
1054
|
+
/** The source asset that will be spent on the Swap transaction. Used for attesting that the swap is being created with the same parameters as the quote. */
|
|
1055
|
+
sourceAsset: {
|
|
1056
|
+
kind: "Native";
|
|
1057
|
+
amount: string;
|
|
1058
|
+
} | {
|
|
1059
|
+
kind: "Erc20";
|
|
1060
|
+
contract: string;
|
|
1061
|
+
amount: string;
|
|
1062
|
+
} | {
|
|
1063
|
+
kind: "Spl";
|
|
1064
|
+
mint: string;
|
|
1065
|
+
amount: string;
|
|
1066
|
+
};
|
|
1067
|
+
/** The target asset that will be received with the Swap transaction. Used for attesting that the swap is being created with the same parameters as the quote. */
|
|
1068
|
+
targetAsset: {
|
|
1069
|
+
kind: "Native";
|
|
1070
|
+
amount: string;
|
|
1071
|
+
} | {
|
|
1072
|
+
kind: "Erc20";
|
|
1073
|
+
contract: string;
|
|
1074
|
+
amount: string;
|
|
1075
|
+
} | {
|
|
1076
|
+
kind: "Spl";
|
|
1077
|
+
mint: string;
|
|
1078
|
+
amount: string;
|
|
1079
|
+
};
|
|
1080
|
+
/** The slippage tolerance for this trade in [basis point](https://en.wikipedia.org/wiki/Basis_point) (BPS). Slippage tolerance defines the maximum price difference you're willing to accept during a trade from the estimated quote, ensuring you still receive at least a minimum number of tokens if the price shifts. One basis point equals one-hundredth of a percentage point, or 0.01%. */
|
|
505
1081
|
slippageBps: number;
|
|
1082
|
+
} | {
|
|
1083
|
+
provider: "CircleCctp";
|
|
1084
|
+
/** Quote to use for this swap. */
|
|
1085
|
+
quoteId: string;
|
|
1086
|
+
/** An optional reference for this Swap. */
|
|
1087
|
+
reference?: string | undefined;
|
|
1088
|
+
/** Id of the Dfns wallet spending the sourceAsset. Used for attesting that the swap is being created with the same parameters as the quote. */
|
|
1089
|
+
walletId: string;
|
|
1090
|
+
/** Id of the Dfns wallet receiving the target asset. Currently this value must be the same as the `walletId`. Used for attesting that the swap is being created with the same parameters as the quote. */
|
|
1091
|
+
targetWalletId?: string | undefined;
|
|
506
1092
|
/** The source asset that will be spent on the Swap transaction. Used for attesting that the swap is being created with the same parameters as the quote. */
|
|
507
1093
|
sourceAsset: {
|
|
508
1094
|
kind: "Native";
|
|
@@ -511,6 +1097,10 @@ export type ListSwapsResponse = {
|
|
|
511
1097
|
kind: "Erc20";
|
|
512
1098
|
contract: string;
|
|
513
1099
|
amount: string;
|
|
1100
|
+
} | {
|
|
1101
|
+
kind: "Spl";
|
|
1102
|
+
mint: string;
|
|
1103
|
+
amount: string;
|
|
514
1104
|
};
|
|
515
1105
|
/** The target asset that will be received with the Swap transaction. Used for attesting that the swap is being created with the same parameters as the quote. */
|
|
516
1106
|
targetAsset: {
|
|
@@ -520,8 +1110,14 @@ export type ListSwapsResponse = {
|
|
|
520
1110
|
kind: "Erc20";
|
|
521
1111
|
contract: string;
|
|
522
1112
|
amount: string;
|
|
1113
|
+
} | {
|
|
1114
|
+
kind: "Spl";
|
|
1115
|
+
mint: string;
|
|
1116
|
+
amount: string;
|
|
523
1117
|
};
|
|
524
|
-
|
|
1118
|
+
/** The maximum fee you will accept for this CCTP transfer, in [basis points](https://en.wikipedia.org/wiki/Basis_point) (BPS) of the amount. CCTP is burn-and-mint with no price slippage; this caps the bridge/forwarding fee — which varies with chain congestion and Fast vs Standard speed — so the burn does not revert if the fee rises. One basis point equals 0.01%. */
|
|
1119
|
+
feeToleranceBps: number;
|
|
1120
|
+
}) | {};
|
|
525
1121
|
/** The user who initiated the request. */
|
|
526
1122
|
requester: {
|
|
527
1123
|
/** User id. */
|
|
@@ -531,6 +1127,8 @@ export type ListSwapsResponse = {
|
|
|
531
1127
|
};
|
|
532
1128
|
/** The failure reason, if any. Only present when status is Failed. */
|
|
533
1129
|
failureReason?: string | undefined;
|
|
1130
|
+
/** Provider-specific intermediate state, only set while `status` is InProgress. Values are opaque strings — clients map them to progress bars, labels or icons as needed. For CCTP one of: `signing-permit`, `burning-source`, `awaiting-source-finality`, `awaiting-attestation`, `awaiting-forwarder`. Undefined for providers without intermediate sub-states. */
|
|
1131
|
+
protocolStatus?: string | undefined;
|
|
534
1132
|
}[];
|
|
535
1133
|
/** token to use as `paginationToken` to request the next page. */
|
|
536
1134
|
nextPageToken?: string | undefined;
|