@spicenet-io/spiceflow-core 0.3.13 → 0.3.15

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/types.d.ts CHANGED
@@ -14,9 +14,9 @@ export interface SwapIntent {
14
14
  }
15
15
  /** A batch entry is either a concrete Call or a declarative SwapIntent. */
16
16
  export type BatchEntry = Call | SwapIntent;
17
- /** Token transfer config for relayer-managed transfers within a batch. */
17
+ /** Token transfer config for solver-managed transfers within a batch. */
18
18
  export interface TokenTransferConfig {
19
- from: Address | "solver" | "escrow";
19
+ from: Address | "solver";
20
20
  to: Address;
21
21
  token: Address;
22
22
  amount: bigint;
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,SAAS,EAAE,IAAI,EAAE,GAAG,EAAE,MAAM,MAAM,CAAC;AAE1D,MAAM,MAAM,IAAI,GAAG;IAAE,EAAE,EAAE,OAAO,CAAC;IAAC,KAAK,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,GAAG,CAAA;CAAE,CAAC;AAE7D,mGAAmG;AACnG,MAAM,WAAW,UAAU;IACzB,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,OAAO,CAAC;IACjB,QAAQ,EAAE,OAAO,CAAC;IAClB,QAAQ,EAAE,MAAM,CAAC;IACjB,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAED,2EAA2E;AAC3E,MAAM,MAAM,UAAU,GAAG,IAAI,GAAG,UAAU,CAAC;AAE3C,0EAA0E;AAC1E,MAAM,WAAW,mBAAmB;IAClC,IAAI,EAAE,OAAO,GAAG,QAAQ,GAAG,QAAQ,CAAC;IACpC,EAAE,EAAE,OAAO,CAAC;IACZ,KAAK,EAAE,OAAO,CAAC;IACf,MAAM,EAAE,MAAM,CAAC;CAChB;AAGD,MAAM,WAAW,UAAU;IACzB,OAAO,EAA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,EAAE,MAAM,CAAC;IAC3B,OAAO,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,WAAW,YAAY;IAC3B,KAAK,EAAE,MAAM,CAAC;IACd,SAAS,EAAE,MAAM,CAAC;IAClB,gBAAgB,EAAE,MAAM,CAAC;IACzB,KAAK,EAAE,IAAI,EAAE,CAAC;CACf;AAED,MAAM,MAAM,aAAa,GAAG;IAC1B,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,MAAM,CAAC;IAChB,KAAK,EAAE,MAAM,CAAC;IACd,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,OAAO,EAAE,MAAM,CAAC;CACjB,CAAC;AAEF,MAAM,WAAW,MAAM;IACrB,aAAa,EAAE,MAAM,CAAC;IACtB,SAAS,EAAE,SAAS,GAAG,GAAG,CAAC;IAC3B,GAAG,EAAE,MAAM,CAAC;IACZ,GAAG,EAAE,MAAM,CAAC;IACZ,YAAY,EAAE,KAAK,CAAC;QAAE,IAAI,EAAE,IAAI,CAAC;QAAC,OAAO,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,IAAI,EAAE,CAAA;KAAE,CAAC,CAAC;CACrE"}
package/dist/utils.d.ts CHANGED
@@ -1,7 +1,7 @@
1
1
  import type { Address } from "viem";
2
2
  export declare const NATIVE_TOKEN_ADDRESS: "0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE";
3
3
  export declare const ZERO_ADDRESS: "0x0000000000000000000000000000000000000000";
4
- export declare function getEscrowContractAddress(chainId: number): Address;
4
+ export declare const ESCROW_ADDRESS: "0xeee2b52e7CFe6e2168341a34cEB783b68FEdf1A2";
5
5
  export declare function isNativeToken(address: string): boolean;
6
6
  export declare function normalizeNativeTokenAddress(address: string): Address;
7
7
  export declare function convertAmountBetweenDecimals(amount: bigint, fromDecimals: number, toDecimals: number): bigint;
@@ -1 +1 @@
1
- {"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../src/utils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M,GAAG,OAAO,CAKpE;AAED,wBAAgB,4BAA4B,CAC1C,MAAM,EAAE,MAAM,EACd,YAAY,EAAE,MAAM,EACpB,UAAU,EAAE,MAAM,GACjB,MAAM,CAMR;AAED,wBAAgB,iBAAiB,CAC/B,MAAM,EAAE,MAAM,EACd,QAAQ,EAAE,MAAM,EAChB,aAAa,GAAE,MAAU,GACxB,MAAM,CASR;AAED,wBAAgB,eAAe,CAC7B,OAAO,EAAE,MAAM,EACf,UAAU,GAAE,MAAU,EACtB,QAAQ,GAAE,MAAU,GACnB,MAAM,CAGR;AAED,wBAAsB,SAAS,CAAC,CAAC,EAC/B,EAAE,EAAE,MAAM,OAAO,CAAC,CAAC,CAAC,EACpB,UAAU,GAAE,MAAU,EACtB,OAAO,GAAE,MAAY,GACpB,OAAO,CAAC,CAAC,CAAC,CAaZ"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@spicenet-io/spiceflow-core",
3
- "version": "0.3.13",
3
+ "version": "0.3.15",
4
4
  "type": "module",
5
5
  "main": "dist/index.cjs",
6
6
  "module": "dist/index.js",
@@ -1,116 +0,0 @@
1
- export declare const spicenetAbi: readonly [{
2
- readonly type: "function";
3
- readonly name: "closeRebalancingRequest";
4
- readonly inputs: readonly [{
5
- readonly name: "args";
6
- readonly type: "tuple";
7
- readonly internalType: "struct Spicenet.CloseRebalancingRequestArgs";
8
- readonly components: readonly [{
9
- readonly name: "idempotenceKey";
10
- readonly type: "bytes32";
11
- readonly internalType: "bytes32";
12
- }, {
13
- readonly name: "repaymentChainTokenAmount";
14
- readonly type: "uint256";
15
- readonly internalType: "uint256";
16
- }];
17
- }];
18
- readonly outputs: readonly [];
19
- readonly stateMutability: "nonpayable";
20
- }, {
21
- readonly type: "function";
22
- readonly name: "createWithdrawalRequest";
23
- readonly inputs: readonly [{
24
- readonly name: "request";
25
- readonly type: "tuple";
26
- readonly internalType: "struct Spicenet.CreateWithdrawalRequestArgs";
27
- readonly components: readonly [{
28
- readonly name: "chainId";
29
- readonly type: "string";
30
- readonly internalType: "string";
31
- }, {
32
- readonly name: "idempotenceKey";
33
- readonly type: "bytes32";
34
- readonly internalType: "bytes32";
35
- }, {
36
- readonly name: "nbf";
37
- readonly type: "uint256";
38
- readonly internalType: "uint256";
39
- }, {
40
- readonly name: "exp";
41
- readonly type: "uint256";
42
- readonly internalType: "uint256";
43
- }, {
44
- readonly name: "metadata";
45
- readonly type: "string";
46
- readonly internalType: "string";
47
- }, {
48
- readonly name: "transfers";
49
- readonly type: "tuple[]";
50
- readonly internalType: "struct Spicenet.CreateTokenTransfer[]";
51
- readonly components: readonly [{
52
- readonly name: "token";
53
- readonly type: "string";
54
- readonly internalType: "string";
55
- }, {
56
- readonly name: "to";
57
- readonly type: "string";
58
- readonly internalType: "string";
59
- }, {
60
- readonly name: "amount";
61
- readonly type: "uint256";
62
- readonly internalType: "uint256";
63
- }];
64
- }];
65
- }];
66
- readonly outputs: readonly [];
67
- readonly stateMutability: "nonpayable";
68
- }, {
69
- readonly type: "function";
70
- readonly name: "createRebalancingRequest";
71
- readonly inputs: readonly [{
72
- readonly name: "request";
73
- readonly type: "tuple";
74
- readonly internalType: "struct Spicenet.CreateRebalancingRequestArgs";
75
- readonly components: readonly [{
76
- readonly name: "idempotenceKey";
77
- readonly type: "bytes32";
78
- readonly internalType: "bytes32";
79
- }, {
80
- readonly name: "nbf";
81
- readonly type: "uint256";
82
- readonly internalType: "uint256";
83
- }, {
84
- readonly name: "exp";
85
- readonly type: "uint256";
86
- readonly internalType: "uint256";
87
- }, {
88
- readonly name: "metadata";
89
- readonly type: "string";
90
- readonly internalType: "string";
91
- }, {
92
- readonly name: "recipient";
93
- readonly type: "string";
94
- readonly internalType: "string";
95
- }, {
96
- readonly name: "fromChainToken";
97
- readonly type: "string";
98
- readonly internalType: "string";
99
- }, {
100
- readonly name: "fromChainTokenAmount";
101
- readonly type: "uint256";
102
- readonly internalType: "uint256";
103
- }, {
104
- readonly name: "toChainToken";
105
- readonly type: "string";
106
- readonly internalType: "string";
107
- }, {
108
- readonly name: "toChainTokenAmountMin";
109
- readonly type: "uint256";
110
- readonly internalType: "uint256";
111
- }];
112
- }];
113
- readonly outputs: readonly [];
114
- readonly stateMutability: "nonpayable";
115
- }];
116
- //# sourceMappingURL=spicenet.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"spicenet.d.ts","sourceRoot":"","sources":["../../src/abis/spicenet.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,WAAW;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAoJA,CAAC"}