@zoralabs/coins-sdk 0.2.5 → 0.2.7
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/CHANGELOG.md +12 -0
- package/dist/actions/tradeCoin.d.ts +58 -0
- package/dist/actions/tradeCoin.d.ts.map +1 -0
- package/dist/client/sdk.gen.d.ts +77 -1
- package/dist/client/sdk.gen.d.ts.map +1 -1
- package/dist/client/types.gen.d.ts +156 -0
- package/dist/client/types.gen.d.ts.map +1 -1
- package/dist/index.cjs +177 -4
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +2 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +173 -0
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/src/actions/tradeCoin.ts +243 -0
- package/src/client/sdk.gen.ts +26 -0
- package/src/client/types.gen.ts +161 -0
- package/src/index.ts +3 -0
|
@@ -0,0 +1,243 @@
|
|
|
1
|
+
import { permit2ABI, permit2Address } from "@zoralabs/protocol-deployments";
|
|
2
|
+
import { postQuote, PostQuoteResponse } from "src/client";
|
|
3
|
+
import { GenericPublicClient } from "src/utils/genericPublicClient";
|
|
4
|
+
import {
|
|
5
|
+
Account,
|
|
6
|
+
Address,
|
|
7
|
+
erc20Abi,
|
|
8
|
+
WalletClient,
|
|
9
|
+
maxUint256,
|
|
10
|
+
Hex,
|
|
11
|
+
} from "viem";
|
|
12
|
+
import { base } from "viem/chains";
|
|
13
|
+
|
|
14
|
+
type TradeERC20 = {
|
|
15
|
+
type: "erc20";
|
|
16
|
+
address: Address;
|
|
17
|
+
};
|
|
18
|
+
|
|
19
|
+
type TradeETH = {
|
|
20
|
+
type: "eth";
|
|
21
|
+
};
|
|
22
|
+
|
|
23
|
+
type PermitDetails = {
|
|
24
|
+
token: Address;
|
|
25
|
+
amount: bigint;
|
|
26
|
+
expiration: number;
|
|
27
|
+
nonce: number;
|
|
28
|
+
};
|
|
29
|
+
|
|
30
|
+
type Permit = {
|
|
31
|
+
details: PermitDetails;
|
|
32
|
+
spender: Address;
|
|
33
|
+
sigDeadline: bigint;
|
|
34
|
+
};
|
|
35
|
+
|
|
36
|
+
type PermitDetailsStringAmounts = {
|
|
37
|
+
token: Address;
|
|
38
|
+
amount: string;
|
|
39
|
+
expiration: number;
|
|
40
|
+
nonce: number;
|
|
41
|
+
};
|
|
42
|
+
|
|
43
|
+
type PermitStringAmounts = {
|
|
44
|
+
details: PermitDetailsStringAmounts;
|
|
45
|
+
spender: Address;
|
|
46
|
+
sigDeadline: string;
|
|
47
|
+
};
|
|
48
|
+
|
|
49
|
+
type SignatureWithPermit<TPermit = Permit> = {
|
|
50
|
+
signature: Hex;
|
|
51
|
+
permit: TPermit;
|
|
52
|
+
};
|
|
53
|
+
|
|
54
|
+
function convertBigIntToString(permit: Permit): PermitStringAmounts {
|
|
55
|
+
return {
|
|
56
|
+
...permit,
|
|
57
|
+
details: {
|
|
58
|
+
...permit.details,
|
|
59
|
+
amount: `${permit.details.amount}`,
|
|
60
|
+
},
|
|
61
|
+
sigDeadline: `${permit.sigDeadline}`,
|
|
62
|
+
};
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
const PERMIT_SINGLE_TYPES = {
|
|
66
|
+
PermitSingle: [
|
|
67
|
+
{ name: "details", type: "PermitDetails" },
|
|
68
|
+
{ name: "spender", type: "address" },
|
|
69
|
+
{ name: "sigDeadline", type: "uint256" },
|
|
70
|
+
],
|
|
71
|
+
PermitDetails: [
|
|
72
|
+
{ name: "token", type: "address" },
|
|
73
|
+
{ name: "amount", type: "uint160" },
|
|
74
|
+
{ name: "expiration", type: "uint48" },
|
|
75
|
+
{ name: "nonce", type: "uint48" },
|
|
76
|
+
],
|
|
77
|
+
};
|
|
78
|
+
|
|
79
|
+
type TradeCurrency = TradeERC20 | TradeETH;
|
|
80
|
+
|
|
81
|
+
export type TradeParameters = {
|
|
82
|
+
sell: TradeCurrency;
|
|
83
|
+
buy: TradeCurrency;
|
|
84
|
+
amountIn: bigint;
|
|
85
|
+
slippage?: number;
|
|
86
|
+
// can be smart wallet or EOA here.
|
|
87
|
+
sender: Address;
|
|
88
|
+
// needs to be EOA, if signer is blank assumes EOA in sender.
|
|
89
|
+
signer?: Address;
|
|
90
|
+
recipient?: Address;
|
|
91
|
+
signatures?: SignatureWithPermit<PermitStringAmounts>[];
|
|
92
|
+
permitActiveSeconds?: number;
|
|
93
|
+
};
|
|
94
|
+
|
|
95
|
+
export async function tradeCoin({
|
|
96
|
+
tradeParameters,
|
|
97
|
+
walletClient,
|
|
98
|
+
account,
|
|
99
|
+
publicClient,
|
|
100
|
+
validateTransaction = true,
|
|
101
|
+
}: {
|
|
102
|
+
tradeParameters: TradeParameters;
|
|
103
|
+
walletClient: WalletClient;
|
|
104
|
+
account: Account;
|
|
105
|
+
publicClient: GenericPublicClient;
|
|
106
|
+
validateTransaction?: boolean;
|
|
107
|
+
}) {
|
|
108
|
+
const quote = await createTradeCall(tradeParameters);
|
|
109
|
+
|
|
110
|
+
// Set default recipient to wallet sender address if not provided
|
|
111
|
+
if (!tradeParameters.recipient) {
|
|
112
|
+
tradeParameters.recipient = account.address;
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
// todo replace any
|
|
116
|
+
const signatures: { signature: Hex; permit: any }[] = [];
|
|
117
|
+
if (quote.permits) {
|
|
118
|
+
for (const permit of quote.permits) {
|
|
119
|
+
// return values: amount, expiration, nonce
|
|
120
|
+
const [, , nonce] = await publicClient.readContract({
|
|
121
|
+
abi: permit2ABI,
|
|
122
|
+
address: permit2Address[base.id],
|
|
123
|
+
functionName: "allowance",
|
|
124
|
+
args: [
|
|
125
|
+
permit.permit.details.token as Address,
|
|
126
|
+
account.address,
|
|
127
|
+
permit.permit.spender as Address,
|
|
128
|
+
],
|
|
129
|
+
});
|
|
130
|
+
const permitToken = permit.permit.details.token as Address;
|
|
131
|
+
const allowance = await publicClient.readContract({
|
|
132
|
+
abi: erc20Abi,
|
|
133
|
+
address: permitToken,
|
|
134
|
+
functionName: "allowance",
|
|
135
|
+
args: [account.address, permit2Address[base.id]],
|
|
136
|
+
});
|
|
137
|
+
if (allowance < BigInt(permit.permit.details.amount)) {
|
|
138
|
+
const approvalTx = await walletClient.writeContract({
|
|
139
|
+
abi: erc20Abi,
|
|
140
|
+
address: permitToken,
|
|
141
|
+
functionName: "approve",
|
|
142
|
+
chain: base,
|
|
143
|
+
args: [permit2Address[base.id], maxUint256],
|
|
144
|
+
account,
|
|
145
|
+
});
|
|
146
|
+
await publicClient.waitForTransactionReceipt({
|
|
147
|
+
hash: approvalTx,
|
|
148
|
+
});
|
|
149
|
+
}
|
|
150
|
+
const message = {
|
|
151
|
+
details: {
|
|
152
|
+
token: permit.permit.details.token as Address,
|
|
153
|
+
amount: BigInt(permit.permit.details.amount!),
|
|
154
|
+
expiration: Number(permit.permit.details.expiration!),
|
|
155
|
+
nonce: nonce,
|
|
156
|
+
},
|
|
157
|
+
spender: permit.permit.spender as Address,
|
|
158
|
+
sigDeadline: BigInt(permit.permit.sigDeadline!),
|
|
159
|
+
};
|
|
160
|
+
const signature = await walletClient.signTypedData({
|
|
161
|
+
domain: {
|
|
162
|
+
name: "Permit2",
|
|
163
|
+
chainId: base.id,
|
|
164
|
+
verifyingContract: permit2Address[base.id],
|
|
165
|
+
},
|
|
166
|
+
primaryType: "PermitSingle",
|
|
167
|
+
types: PERMIT_SINGLE_TYPES,
|
|
168
|
+
message,
|
|
169
|
+
account,
|
|
170
|
+
});
|
|
171
|
+
signatures.push({
|
|
172
|
+
signature,
|
|
173
|
+
permit: convertBigIntToString(message),
|
|
174
|
+
});
|
|
175
|
+
}
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
const newQuote = await createTradeCall({
|
|
179
|
+
...tradeParameters,
|
|
180
|
+
signatures,
|
|
181
|
+
});
|
|
182
|
+
|
|
183
|
+
const call = {
|
|
184
|
+
to: newQuote.call.target as Address,
|
|
185
|
+
data: newQuote.call.data as Hex,
|
|
186
|
+
value: BigInt(newQuote.call.value),
|
|
187
|
+
chain: base,
|
|
188
|
+
account,
|
|
189
|
+
};
|
|
190
|
+
|
|
191
|
+
// simulate call
|
|
192
|
+
if (validateTransaction) {
|
|
193
|
+
await publicClient.call(call);
|
|
194
|
+
}
|
|
195
|
+
|
|
196
|
+
const gasEstimate = validateTransaction
|
|
197
|
+
? await publicClient.estimateGas(call)
|
|
198
|
+
: 10_000_000n;
|
|
199
|
+
const gasPrice = await publicClient.getGasPrice();
|
|
200
|
+
|
|
201
|
+
const tx = await walletClient.sendTransaction({
|
|
202
|
+
...call,
|
|
203
|
+
gasPrice,
|
|
204
|
+
gas: gasEstimate,
|
|
205
|
+
});
|
|
206
|
+
|
|
207
|
+
const receipt = await publicClient.waitForTransactionReceipt({
|
|
208
|
+
hash: tx,
|
|
209
|
+
});
|
|
210
|
+
|
|
211
|
+
return receipt;
|
|
212
|
+
}
|
|
213
|
+
|
|
214
|
+
export async function createTradeCall(
|
|
215
|
+
tradeParameters: TradeParameters,
|
|
216
|
+
): Promise<PostQuoteResponse> {
|
|
217
|
+
if (tradeParameters.slippage && tradeParameters.slippage > 1) {
|
|
218
|
+
throw new Error("Slippage must be less than 1, max 0.99");
|
|
219
|
+
}
|
|
220
|
+
if (tradeParameters.amountIn === BigInt(0)) {
|
|
221
|
+
throw new Error("Amount in must be greater than 0");
|
|
222
|
+
}
|
|
223
|
+
|
|
224
|
+
const quote = await postQuote({
|
|
225
|
+
body: {
|
|
226
|
+
tokenIn: tradeParameters.sell,
|
|
227
|
+
tokenOut: tradeParameters.buy,
|
|
228
|
+
amountIn: tradeParameters.amountIn.toString(),
|
|
229
|
+
slippage: tradeParameters.slippage,
|
|
230
|
+
chainId: base.id,
|
|
231
|
+
sender: tradeParameters.sender,
|
|
232
|
+
recipient: tradeParameters.recipient || tradeParameters.sender,
|
|
233
|
+
signatures: tradeParameters.signatures,
|
|
234
|
+
},
|
|
235
|
+
});
|
|
236
|
+
|
|
237
|
+
if (!quote.data) {
|
|
238
|
+
console.error(quote);
|
|
239
|
+
throw new Error("Quote failed");
|
|
240
|
+
}
|
|
241
|
+
|
|
242
|
+
return quote.data;
|
|
243
|
+
}
|
package/src/client/sdk.gen.ts
CHANGED
|
@@ -24,6 +24,9 @@ import type {
|
|
|
24
24
|
GetProfileBalancesResponse,
|
|
25
25
|
GetProfileCoinsData,
|
|
26
26
|
GetProfileCoinsResponse,
|
|
27
|
+
PostQuoteData,
|
|
28
|
+
PostQuoteResponse,
|
|
29
|
+
PostQuoteError,
|
|
27
30
|
} from "./types.gen";
|
|
28
31
|
import { client as _heyApiClient } from "./client.gen";
|
|
29
32
|
|
|
@@ -245,3 +248,26 @@ export const getProfileCoins = <ThrowOnError extends boolean = false>(
|
|
|
245
248
|
...options,
|
|
246
249
|
});
|
|
247
250
|
};
|
|
251
|
+
|
|
252
|
+
export const postQuote = <ThrowOnError extends boolean = false>(
|
|
253
|
+
options?: Options<PostQuoteData, ThrowOnError>,
|
|
254
|
+
) => {
|
|
255
|
+
return (options?.client ?? _heyApiClient).post<
|
|
256
|
+
PostQuoteResponse,
|
|
257
|
+
PostQuoteError,
|
|
258
|
+
ThrowOnError
|
|
259
|
+
>({
|
|
260
|
+
security: [
|
|
261
|
+
{
|
|
262
|
+
name: "api-key",
|
|
263
|
+
type: "apiKey",
|
|
264
|
+
},
|
|
265
|
+
],
|
|
266
|
+
url: "/quote",
|
|
267
|
+
...options,
|
|
268
|
+
headers: {
|
|
269
|
+
"Content-Type": "application/json",
|
|
270
|
+
...options?.headers,
|
|
271
|
+
},
|
|
272
|
+
});
|
|
273
|
+
};
|
package/src/client/types.gen.ts
CHANGED
|
@@ -204,6 +204,20 @@ export type GetCoinResponses = {
|
|
|
204
204
|
* The `Int` scalar type represents non-fractional signed whole numeric values. Int can represent values between -(2^31) and 2^31 - 1.
|
|
205
205
|
*/
|
|
206
206
|
uniqueHolders: number;
|
|
207
|
+
uniswapV4PoolKey: {
|
|
208
|
+
token0Address: string;
|
|
209
|
+
token1Address: string;
|
|
210
|
+
/**
|
|
211
|
+
* The `Int` scalar type represents non-fractional signed whole numeric values. Int can represent values between -(2^31) and 2^31 - 1.
|
|
212
|
+
*/
|
|
213
|
+
fee: number;
|
|
214
|
+
/**
|
|
215
|
+
* The `Int` scalar type represents non-fractional signed whole numeric values. Int can represent values between -(2^31) and 2^31 - 1.
|
|
216
|
+
*/
|
|
217
|
+
tickSpacing: number;
|
|
218
|
+
hookAddress: string;
|
|
219
|
+
};
|
|
220
|
+
uniswapV3PoolAddress: string;
|
|
207
221
|
zoraComments: {
|
|
208
222
|
pageInfo: {
|
|
209
223
|
/**
|
|
@@ -582,6 +596,20 @@ export type GetCoinsResponses = {
|
|
|
582
596
|
* The `Int` scalar type represents non-fractional signed whole numeric values. Int can represent values between -(2^31) and 2^31 - 1.
|
|
583
597
|
*/
|
|
584
598
|
uniqueHolders: number;
|
|
599
|
+
uniswapV4PoolKey: {
|
|
600
|
+
token0Address: string;
|
|
601
|
+
token1Address: string;
|
|
602
|
+
/**
|
|
603
|
+
* The `Int` scalar type represents non-fractional signed whole numeric values. Int can represent values between -(2^31) and 2^31 - 1.
|
|
604
|
+
*/
|
|
605
|
+
fee: number;
|
|
606
|
+
/**
|
|
607
|
+
* The `Int` scalar type represents non-fractional signed whole numeric values. Int can represent values between -(2^31) and 2^31 - 1.
|
|
608
|
+
*/
|
|
609
|
+
tickSpacing: number;
|
|
610
|
+
hookAddress: string;
|
|
611
|
+
};
|
|
612
|
+
uniswapV3PoolAddress: string;
|
|
585
613
|
zoraComments: {
|
|
586
614
|
pageInfo: {
|
|
587
615
|
/**
|
|
@@ -858,6 +886,20 @@ export type GetExploreResponses = {
|
|
|
858
886
|
* The `Int` scalar type represents non-fractional signed whole numeric values. Int can represent values between -(2^31) and 2^31 - 1.
|
|
859
887
|
*/
|
|
860
888
|
uniqueHolders: number;
|
|
889
|
+
uniswapV4PoolKey: {
|
|
890
|
+
token0Address: string;
|
|
891
|
+
token1Address: string;
|
|
892
|
+
/**
|
|
893
|
+
* The `Int` scalar type represents non-fractional signed whole numeric values. Int can represent values between -(2^31) and 2^31 - 1.
|
|
894
|
+
*/
|
|
895
|
+
fee: number;
|
|
896
|
+
/**
|
|
897
|
+
* The `Int` scalar type represents non-fractional signed whole numeric values. Int can represent values between -(2^31) and 2^31 - 1.
|
|
898
|
+
*/
|
|
899
|
+
tickSpacing: number;
|
|
900
|
+
hookAddress: string;
|
|
901
|
+
};
|
|
902
|
+
uniswapV3PoolAddress: string;
|
|
861
903
|
};
|
|
862
904
|
/**
|
|
863
905
|
* The `String` scalar type represents textual data, represented as UTF-8 character sequences. The String type is most often used by GraphQL to represent free-form human-readable text.
|
|
@@ -1187,6 +1229,20 @@ export type GetProfileBalancesResponses = {
|
|
|
1187
1229
|
* The `Int` scalar type represents non-fractional signed whole numeric values. Int can represent values between -(2^31) and 2^31 - 1.
|
|
1188
1230
|
*/
|
|
1189
1231
|
uniqueHolders: number;
|
|
1232
|
+
uniswapV4PoolKey: {
|
|
1233
|
+
token0Address: string;
|
|
1234
|
+
token1Address: string;
|
|
1235
|
+
/**
|
|
1236
|
+
* The `Int` scalar type represents non-fractional signed whole numeric values. Int can represent values between -(2^31) and 2^31 - 1.
|
|
1237
|
+
*/
|
|
1238
|
+
fee: number;
|
|
1239
|
+
/**
|
|
1240
|
+
* The `Int` scalar type represents non-fractional signed whole numeric values. Int can represent values between -(2^31) and 2^31 - 1.
|
|
1241
|
+
*/
|
|
1242
|
+
tickSpacing: number;
|
|
1243
|
+
hookAddress: string;
|
|
1244
|
+
};
|
|
1245
|
+
uniswapV3PoolAddress: string;
|
|
1190
1246
|
};
|
|
1191
1247
|
};
|
|
1192
1248
|
}>;
|
|
@@ -1406,6 +1462,20 @@ export type GetProfileCoinsResponses = {
|
|
|
1406
1462
|
* The `Int` scalar type represents non-fractional signed whole numeric values. Int can represent values between -(2^31) and 2^31 - 1.
|
|
1407
1463
|
*/
|
|
1408
1464
|
uniqueHolders: number;
|
|
1465
|
+
uniswapV4PoolKey: {
|
|
1466
|
+
token0Address: string;
|
|
1467
|
+
token1Address: string;
|
|
1468
|
+
/**
|
|
1469
|
+
* The `Int` scalar type represents non-fractional signed whole numeric values. Int can represent values between -(2^31) and 2^31 - 1.
|
|
1470
|
+
*/
|
|
1471
|
+
fee: number;
|
|
1472
|
+
/**
|
|
1473
|
+
* The `Int` scalar type represents non-fractional signed whole numeric values. Int can represent values between -(2^31) and 2^31 - 1.
|
|
1474
|
+
*/
|
|
1475
|
+
tickSpacing: number;
|
|
1476
|
+
hookAddress: string;
|
|
1477
|
+
};
|
|
1478
|
+
uniswapV3PoolAddress: string;
|
|
1409
1479
|
zoraComments: {
|
|
1410
1480
|
pageInfo: {
|
|
1411
1481
|
/**
|
|
@@ -1485,6 +1555,97 @@ export type GetProfileCoinsResponses = {
|
|
|
1485
1555
|
export type GetProfileCoinsResponse =
|
|
1486
1556
|
GetProfileCoinsResponses[keyof GetProfileCoinsResponses];
|
|
1487
1557
|
|
|
1558
|
+
export type PostQuoteData = {
|
|
1559
|
+
body?: {
|
|
1560
|
+
signatures?: Array<{
|
|
1561
|
+
permit: {
|
|
1562
|
+
details: {
|
|
1563
|
+
token: string;
|
|
1564
|
+
amount: string;
|
|
1565
|
+
expiration: number;
|
|
1566
|
+
nonce: number;
|
|
1567
|
+
};
|
|
1568
|
+
spender: string;
|
|
1569
|
+
sigDeadline: string;
|
|
1570
|
+
};
|
|
1571
|
+
signature: string;
|
|
1572
|
+
}>;
|
|
1573
|
+
permitActiveSeconds?: number;
|
|
1574
|
+
chainId?: number;
|
|
1575
|
+
tokenOut?: {
|
|
1576
|
+
type: "eth" | "erc20";
|
|
1577
|
+
address?: string;
|
|
1578
|
+
};
|
|
1579
|
+
tokenIn?: {
|
|
1580
|
+
type: "eth" | "erc20";
|
|
1581
|
+
address?: string;
|
|
1582
|
+
};
|
|
1583
|
+
amountIn?: string;
|
|
1584
|
+
slippage?: number;
|
|
1585
|
+
recipient?: string;
|
|
1586
|
+
sender?: string;
|
|
1587
|
+
};
|
|
1588
|
+
path?: never;
|
|
1589
|
+
query?: never;
|
|
1590
|
+
url: "/quote";
|
|
1591
|
+
};
|
|
1592
|
+
|
|
1593
|
+
export type PostQuoteErrors = {
|
|
1594
|
+
/**
|
|
1595
|
+
* Error
|
|
1596
|
+
*/
|
|
1597
|
+
500: {
|
|
1598
|
+
error?: string;
|
|
1599
|
+
};
|
|
1600
|
+
};
|
|
1601
|
+
|
|
1602
|
+
export type PostQuoteError = PostQuoteErrors[keyof PostQuoteErrors];
|
|
1603
|
+
|
|
1604
|
+
export type PostQuoteResponses = {
|
|
1605
|
+
/**
|
|
1606
|
+
* Success
|
|
1607
|
+
*/
|
|
1608
|
+
200: {
|
|
1609
|
+
success: boolean;
|
|
1610
|
+
call: {
|
|
1611
|
+
data: string;
|
|
1612
|
+
value: string;
|
|
1613
|
+
target: string;
|
|
1614
|
+
};
|
|
1615
|
+
/**
|
|
1616
|
+
* The approval information for the token
|
|
1617
|
+
*/
|
|
1618
|
+
permits?: Array<{
|
|
1619
|
+
signature: string;
|
|
1620
|
+
permit: {
|
|
1621
|
+
sigDeadline: string;
|
|
1622
|
+
spender: string;
|
|
1623
|
+
details: {
|
|
1624
|
+
token: string;
|
|
1625
|
+
amount: string;
|
|
1626
|
+
expiration: number;
|
|
1627
|
+
nonce: number;
|
|
1628
|
+
};
|
|
1629
|
+
};
|
|
1630
|
+
}>;
|
|
1631
|
+
trade?: {
|
|
1632
|
+
commands: Array<string>;
|
|
1633
|
+
value: string;
|
|
1634
|
+
inputs: Array<string>;
|
|
1635
|
+
};
|
|
1636
|
+
quote: {
|
|
1637
|
+
amountOut: string;
|
|
1638
|
+
slippage: number;
|
|
1639
|
+
tokenIn?: {
|
|
1640
|
+
type?: string;
|
|
1641
|
+
address?: string;
|
|
1642
|
+
};
|
|
1643
|
+
};
|
|
1644
|
+
};
|
|
1645
|
+
};
|
|
1646
|
+
|
|
1647
|
+
export type PostQuoteResponse = PostQuoteResponses[keyof PostQuoteResponses];
|
|
1648
|
+
|
|
1488
1649
|
export type ClientOptions = {
|
|
1489
1650
|
baseUrl:
|
|
1490
1651
|
| "https://api-sdk.zora.engineering/"
|
package/src/index.ts
CHANGED
|
@@ -23,6 +23,9 @@ export {
|
|
|
23
23
|
} from "./actions/updatePayoutRecipient";
|
|
24
24
|
export type { UpdatePayoutRecipientArgs } from "./actions/updatePayoutRecipient";
|
|
25
25
|
|
|
26
|
+
export { tradeCoin, createTradeCall } from "./actions/tradeCoin";
|
|
27
|
+
export type { TradeParameters } from "./actions/tradeCoin";
|
|
28
|
+
|
|
26
29
|
// API Read Actions
|
|
27
30
|
export * from "./api/queries";
|
|
28
31
|
export type * from "./api/queries";
|