@sodax/types 2.1.0-rc.2 → 2.1.0-rc.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -257,6 +257,13 @@ export interface AllowanceCheckResponseV2 {
257
257
  export interface ApproveResponseV2 {
258
258
  /** Unsigned approval transaction — the `RawTxReturnType` variant for the request's `srcChainKey`. */
259
259
  tx: RawTxReturnType;
260
+ /**
261
+ * Present only when the source token rejects an allowance change from one non-zero value to
262
+ * another — the 2017 TetherToken lineage. Broadcast this first and wait for it to be mined, then
263
+ * broadcast `tx`; the second approve is only valid once the allowance has been zeroed on-chain.
264
+ * Absent for every other token, and for a wallet with nothing approved yet.
265
+ */
266
+ resetTx?: RawTxReturnType;
260
267
  }
261
268
  /** POST /swaps/intents — response body. */
262
269
  export interface CreateIntentResponseV2 {
@@ -7,6 +7,12 @@ import type { SpokeChainKey } from '../chains/chains.js';
7
7
  export declare const HookKind: {
8
8
  /** Deposits delivered USDC into the recipient's HyperCore perps account (HyperEVM). */
9
9
  readonly HYPERCORE_DEPOSIT: "hyperCoreDeposit";
10
+ /**
11
+ * Requests an ERC-7540 deposit of delivered USDC into the Flint RWA vault (Ethereum), with the
12
+ * recipient as the request's controller. Asynchronous: the request mints no shares — Flint's
13
+ * curator settles a NAV and then claims the shares on the controller's behalf.
14
+ */
15
+ readonly FLINT_DEPOSIT: "flintDeposit";
10
16
  };
11
17
  export type HookKind = (typeof HookKind)[keyof typeof HookKind];
12
18
  export type SpokeHookConfig = {
@@ -13,6 +13,12 @@ import { ChainKeys, spokeChainConfig } from '../chains/chains.js';
13
13
  export const HookKind = {
14
14
  /** Deposits delivered USDC into the recipient's HyperCore perps account (HyperEVM). */
15
15
  HYPERCORE_DEPOSIT: 'hyperCoreDeposit',
16
+ /**
17
+ * Requests an ERC-7540 deposit of delivered USDC into the Flint RWA vault (Ethereum), with the
18
+ * recipient as the request's controller. Asynchronous: the request mints no shares — Flint's
19
+ * curator settles a NAV and then claims the shares on the controller's behalf.
20
+ */
21
+ FLINT_DEPOSIT: 'flintDeposit',
16
22
  };
17
23
  /**
18
24
  * Deployed delivery hooks, keyed by the chain they live on. Many hooks per chain and many chains
@@ -26,6 +32,20 @@ export const spokeHooks = {
26
32
  supportedTokens: [spokeChainConfig[ChainKeys.HYPEREVM_MAINNET].supportedTokens.USDC.address], // USDC on HyperEVM
27
33
  },
28
34
  ],
35
+ // HookKind.FLINT_DEPOSIT is not registered yet: FlintDepositHook is not deployed to Ethereum
36
+ // mainnet (icon-project/sodax-contracts#693). Registering it with a placeholder address would
37
+ // route real intent output to that address, so the entry lands with the deployment:
38
+ //
39
+ // [ChainKeys.ETHEREUM_MAINNET]: [
40
+ // {
41
+ // kind: HookKind.FLINT_DEPOSIT,
42
+ // address: '0x…',
43
+ // supportedTokens: [spokeChainConfig[ChainKeys.ETHEREUM_MAINNET].supportedTokens.USDC.address],
44
+ // },
45
+ // ],
46
+ //
47
+ // Until then `getSpokeHook` returns undefined and `resolveDeliveryHook` throws, which is the
48
+ // correct behaviour for a hook that does not exist on chain.
29
49
  };
30
50
  /** Returns the deployed hook of the given kind on `chainKey`, or `undefined` if none is registered. */
31
51
  export const getSpokeHook = (chainKey, kind) => spokeHooks[chainKey]?.find(h => h.kind === kind);
package/dist/index.d.ts CHANGED
@@ -19,4 +19,4 @@ export * from './sui/index.js';
19
19
  export * from './swap/index.js';
20
20
  export * from './utils/index.js';
21
21
  export * from './wallet/index.js';
22
- export declare const CONFIG_VERSION = 222;
22
+ export declare const CONFIG_VERSION = 223;
package/dist/index.js CHANGED
@@ -19,4 +19,4 @@ export * from './sui/index.js';
19
19
  export * from './swap/index.js';
20
20
  export * from './utils/index.js';
21
21
  export * from './wallet/index.js';
22
- export const CONFIG_VERSION = 222; // this value should be incremented (inside release/sdk branch) each time @sodax/types package is updated
22
+ export const CONFIG_VERSION = 223; // this value should be incremented (inside release/sdk branch) each time @sodax/types package is updated
package/package.json CHANGED
@@ -4,7 +4,7 @@
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
7
- "version": "2.1.0-rc.2",
7
+ "version": "2.1.0-rc.3",
8
8
  "description": "Sodax Common Types",
9
9
  "main": "dist/index.js",
10
10
  "homepage": "https://github.com/icon-project/sodax-sdks/tree/main/packages/types",