@zoralabs/coins-sdk 0.5.2 → 0.7.0
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 +21 -0
- package/dist/actions/createCoin.d.ts +92 -7
- package/dist/actions/createCoin.d.ts.map +1 -1
- package/dist/actions/tradeCoin.d.ts +27 -2
- package/dist/actions/tradeCoin.d.ts.map +1 -1
- package/dist/actions/updateCoinURI.d.ts +35 -1
- package/dist/actions/updateCoinURI.d.ts.map +1 -1
- package/dist/actions/updatePayoutRecipient.d.ts +41 -1
- package/dist/actions/updatePayoutRecipient.d.ts.map +1 -1
- package/dist/api/api-raw.d.ts +1 -0
- package/dist/api/api-raw.d.ts.map +1 -1
- package/dist/api/index.d.ts +2 -0
- package/dist/api/index.d.ts.map +1 -1
- package/dist/api/queries.d.ts +9 -1
- package/dist/api/queries.d.ts.map +1 -1
- package/dist/api/social.d.ts +8 -0
- package/dist/api/social.d.ts.map +1 -0
- package/dist/client/sdk.gen.d.ts +144 -1
- package/dist/client/sdk.gen.d.ts.map +1 -1
- package/dist/client/types.gen.d.ts +411 -1
- package/dist/client/types.gen.d.ts.map +1 -1
- package/dist/index.cjs +724 -250
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +11 -5
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +701 -227
- package/dist/index.js.map +1 -1
- package/dist/metadata/validateMetadataURIContent.d.ts.map +1 -1
- package/dist/utils/calls.d.ts +61 -0
- package/dist/utils/calls.d.ts.map +1 -0
- package/dist/utils/userOperation.d.ts +44 -0
- package/dist/utils/userOperation.d.ts.map +1 -0
- package/package.json +1 -1
- package/src/actions/createCoin.ts +314 -60
- package/src/actions/tradeCoin.ts +237 -72
- package/src/actions/updateCoinURI.ts +84 -6
- package/src/actions/updatePayoutRecipient.ts +92 -5
- package/src/api/api-raw.test.ts +61 -0
- package/src/api/api-raw.ts +9 -0
- package/src/api/index.ts +4 -0
- package/src/api/queries.ts +36 -0
- package/src/api/social.ts +23 -0
- package/src/client/sdk.gen.ts +48 -0
- package/src/client/types.gen.ts +421 -1
- package/src/index.ts +45 -3
- package/src/metadata/validateMetadataURIContent.ts +17 -2
- package/src/utils/calls.ts +129 -0
- package/src/utils/userOperation.test.ts +84 -0
- package/src/utils/userOperation.ts +124 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,26 @@
|
|
|
1
1
|
# @zoralabs/coins-sdk
|
|
2
2
|
|
|
3
|
+
## 0.7.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- c8374a6a7: Add smart wallet variants for all four SDK actions — createCoinSmartWallet, tradeCoinSmartWallet, updateCoinURISmartWallet, and updatePayoutRecipientSmartWallet — alongside a new enableSmartWalletRouting flag on CreateCoinArgs
|
|
8
|
+
- 663820551: handle bundler client gas errors explicitly so they can be surfaced to users and become actionable
|
|
9
|
+
- 1121bfefe: Move action validation into explicit validation helpers and export them from the sdk, add a consolidated GenericCall type to support future user operation execution flow.
|
|
10
|
+
- e1fa9e73c: Add `apiUrl` helper to allow consumers to construct full api urls.
|
|
11
|
+
|
|
12
|
+
## 0.6.0
|
|
13
|
+
|
|
14
|
+
### Minor Changes
|
|
15
|
+
|
|
16
|
+
- 8baf100b2: Add getCoinPriceHistory and getCreatorLivestreamComments query functions
|
|
17
|
+
- getCoinPriceHistory retrieves historical price data across multiple time periods
|
|
18
|
+
- getCreatorLivestreamComments fetches paginated comments from creator livestreams
|
|
19
|
+
|
|
20
|
+
### Patch Changes
|
|
21
|
+
|
|
22
|
+
- bcfc04153: Add `getWalletTradeActivity` query to fetch trade activity for a wallet address
|
|
23
|
+
|
|
3
24
|
## 0.5.2
|
|
4
25
|
|
|
5
26
|
### Patch Changes
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import { coinFactoryABI as zoraFactoryImplABI } from "@zoralabs/protocol-deployments";
|
|
2
|
-
import {
|
|
2
|
+
import { Account, Address, ContractEventArgsFromTopics, Hex, TransactionReceipt, WalletClient } from "viem";
|
|
3
|
+
import { BundlerClient } from "viem/account-abstraction";
|
|
4
|
+
import { GenericCall } from "../utils/calls";
|
|
3
5
|
import { GenericPublicClient } from "../utils/genericPublicClient";
|
|
4
6
|
export type CoinDeploymentLogArgs = ContractEventArgsFromTopics<typeof zoraFactoryImplABI, "CoinCreatedV4">;
|
|
5
7
|
declare const STARTING_MARKET_CAPS: {
|
|
@@ -42,6 +44,13 @@ export type CreateCoinArgs = {
|
|
|
42
44
|
additionalOwners?: Address[];
|
|
43
45
|
payoutRecipientOverride?: Address;
|
|
44
46
|
skipMetadataValidation?: boolean;
|
|
47
|
+
/**
|
|
48
|
+
* Enable smart wallet routing. When true, the API resolves the creator's
|
|
49
|
+
* linked smart wallet and returns a single call wrapped in the smart wallet's
|
|
50
|
+
* `execute`, so the coin is deployed and owned by the smart wallet (executed by
|
|
51
|
+
* an owner EOA). Used by {@link createCoinSmartWallet}. Defaults to false.
|
|
52
|
+
*/
|
|
53
|
+
enableSmartWalletRouting?: boolean;
|
|
45
54
|
};
|
|
46
55
|
type TransactionParameters = {
|
|
47
56
|
to: Address;
|
|
@@ -51,23 +60,52 @@ type TransactionParameters = {
|
|
|
51
60
|
type CreateCoinCallResponse = {
|
|
52
61
|
calls: TransactionParameters[];
|
|
53
62
|
predictedCoinAddress: Address;
|
|
63
|
+
/**
|
|
64
|
+
* Whether the API applied smart wallet routing. False (or undefined) means the
|
|
65
|
+
* call targets the factory directly (EOA creation); true means it is wrapped in
|
|
66
|
+
* the smart wallet's `execute`.
|
|
67
|
+
*/
|
|
68
|
+
usedSmartWalletRouting?: boolean;
|
|
54
69
|
};
|
|
55
|
-
export declare function createCoinCall({ creator, name, symbol, metadata, currency, chainId, payoutRecipientOverride, additionalOwners, platformReferrer, skipMetadataValidation, }: CreateCoinArgs): Promise<CreateCoinCallResponse>;
|
|
70
|
+
export declare function createCoinCall({ creator, name, symbol, metadata, currency, chainId, payoutRecipientOverride, additionalOwners, platformReferrer, skipMetadataValidation, enableSmartWalletRouting, }: CreateCoinArgs): Promise<CreateCoinCallResponse>;
|
|
71
|
+
/**
|
|
72
|
+
* Validates the assembled calls for creating a coin.
|
|
73
|
+
*
|
|
74
|
+
* Asserts the invariants this SDK version supports: a single call, targeting the
|
|
75
|
+
* coin factory for the given chain, with no attached value (no buy-on-create).
|
|
76
|
+
* Shared by both the EOA execution path (`createCoin`) and the user-operation
|
|
77
|
+
* path so both validate identically.
|
|
78
|
+
*/
|
|
79
|
+
export declare function validateCreateCoinCalls(calls: GenericCall[], chainId: number): void;
|
|
80
|
+
/**
|
|
81
|
+
* Validates the assembled calls for creating a coin via smart wallet routing.
|
|
82
|
+
*
|
|
83
|
+
* Unlike {@link validateCreateCoinCalls}, the call targets the creator's smart
|
|
84
|
+
* wallet (its `execute` method), not the factory — so the factory-target check
|
|
85
|
+
* does not apply. The key guard is that the API actually applied routing:
|
|
86
|
+
* `enableSmartWalletRouting` is best-effort and silently falls back to EOA
|
|
87
|
+
* creation when the creator has no linked smart wallet, which must not be
|
|
88
|
+
* mistaken for a smart wallet creation.
|
|
89
|
+
*/
|
|
90
|
+
export declare function validateCreateCoinSmartWalletCalls(calls: GenericCall[], { usedSmartWalletRouting }: {
|
|
91
|
+
usedSmartWalletRouting?: boolean;
|
|
92
|
+
}): void;
|
|
56
93
|
/**
|
|
57
94
|
* Gets the deployed coin address from transaction receipt logs
|
|
58
95
|
* @param receipt Transaction receipt containing the CoinCreated event
|
|
59
96
|
* @returns The deployment information if found
|
|
60
97
|
*/
|
|
61
98
|
export declare function getCoinCreateFromLogs(receipt: TransactionReceipt): CoinDeploymentLogArgs | undefined;
|
|
99
|
+
type CreateCoinOptions = {
|
|
100
|
+
gasMultiplier?: number;
|
|
101
|
+
account?: Account | Address;
|
|
102
|
+
skipValidateTransaction?: boolean;
|
|
103
|
+
};
|
|
62
104
|
export declare function createCoin({ call, walletClient, publicClient, options, }: {
|
|
63
105
|
call: CreateCoinArgs;
|
|
64
106
|
walletClient: WalletClient;
|
|
65
107
|
publicClient: GenericPublicClient;
|
|
66
|
-
options?:
|
|
67
|
-
gasMultiplier?: number;
|
|
68
|
-
account?: Account | Address;
|
|
69
|
-
skipValidateTransaction?: boolean;
|
|
70
|
-
};
|
|
108
|
+
options?: CreateCoinOptions;
|
|
71
109
|
}): Promise<{
|
|
72
110
|
hash: `0x${string}`;
|
|
73
111
|
receipt: any;
|
|
@@ -93,5 +131,52 @@ export declare function createCoin({ call, walletClient, publicClient, options,
|
|
|
93
131
|
} | undefined;
|
|
94
132
|
chain: import("viem").Chain;
|
|
95
133
|
}>;
|
|
134
|
+
/**
|
|
135
|
+
* Creates a coin owned by the caller's smart wallet via a user operation.
|
|
136
|
+
*
|
|
137
|
+
* Requests smart wallet routing from the API, which resolves the creator's
|
|
138
|
+
* linked smart wallet and returns the deploy wrapped in the smart wallet's
|
|
139
|
+
* `execute`. That wrapped call is unwrapped to its inner factory call and
|
|
140
|
+
* submitted as a user operation through `bundlerClient` — so the smart wallet
|
|
141
|
+
* deploys and owns the coin while gas is paid from the smart wallet's
|
|
142
|
+
* user-operation prefund (rather than from an owner EOA). The bundler/account
|
|
143
|
+
* re-wraps the inner call in `execute` itself, and the smart wallet remains
|
|
144
|
+
* `msg.sender`, so the deployed coin's CREATE2 address matches the API's
|
|
145
|
+
* prediction.
|
|
146
|
+
*
|
|
147
|
+
* Mirrors {@link createCoin}'s return shape. Throws if the API did not apply
|
|
148
|
+
* routing (e.g. the creator has no linked smart wallet) — use {@link createCoin}
|
|
149
|
+
* for EOA creation in that case.
|
|
150
|
+
*/
|
|
151
|
+
export declare function createCoinSmartWallet({ call, bundlerClient, publicClient, }: {
|
|
152
|
+
call: CreateCoinArgs;
|
|
153
|
+
bundlerClient: BundlerClient;
|
|
154
|
+
publicClient: GenericPublicClient;
|
|
155
|
+
options?: CreateCoinOptions;
|
|
156
|
+
}): Promise<{
|
|
157
|
+
hash: `0x${string}`;
|
|
158
|
+
receipt: TransactionReceipt<bigint, number, "success" | "reverted">;
|
|
159
|
+
address: `0x${string}` | undefined;
|
|
160
|
+
deployment: {
|
|
161
|
+
caller: `0x${string}`;
|
|
162
|
+
payoutRecipient: `0x${string}`;
|
|
163
|
+
platformReferrer: `0x${string}`;
|
|
164
|
+
currency: `0x${string}`;
|
|
165
|
+
uri: string;
|
|
166
|
+
name: string;
|
|
167
|
+
symbol: string;
|
|
168
|
+
coin: `0x${string}`;
|
|
169
|
+
poolKey: {
|
|
170
|
+
currency0: `0x${string}`;
|
|
171
|
+
currency1: `0x${string}`;
|
|
172
|
+
fee: number;
|
|
173
|
+
tickSpacing: number;
|
|
174
|
+
hooks: `0x${string}`;
|
|
175
|
+
};
|
|
176
|
+
poolKeyHash: `0x${string}`;
|
|
177
|
+
version: string;
|
|
178
|
+
} | undefined;
|
|
179
|
+
chain: import("viem").Chain;
|
|
180
|
+
}>;
|
|
96
181
|
export {};
|
|
97
182
|
//# sourceMappingURL=createCoin.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"createCoin.d.ts","sourceRoot":"","sources":["../../src/actions/createCoin.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,cAAc,IAAI,kBAAkB,EACrC,MAAM,gCAAgC,CAAC;AACxC,OAAO,EACL,OAAO,EACP,kBAAkB,EAClB,YAAY,
|
|
1
|
+
{"version":3,"file":"createCoin.d.ts","sourceRoot":"","sources":["../../src/actions/createCoin.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,cAAc,IAAI,kBAAkB,EACrC,MAAM,gCAAgC,CAAC;AACxC,OAAO,EACL,OAAO,EACP,OAAO,EACP,2BAA2B,EAE3B,GAAG,EAGH,kBAAkB,EAClB,YAAY,EACb,MAAM,MAAM,CAAC;AACd,OAAO,EAAE,aAAa,EAAE,MAAM,0BAA0B,CAAC;AAKzD,OAAO,EAAE,WAAW,EAAwB,MAAM,gBAAgB,CAAC;AACnE,OAAO,EAAE,mBAAmB,EAAE,MAAM,8B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CAAC,EAAE,iBAAiB,CAAC;CAC7B;;;;;;;;;;;;;;;;;;;;;;;;GAyDA"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import { Account, Address,
|
|
1
|
+
import { Account, Address, Hex, TransactionReceipt, WalletClient } from "viem";
|
|
2
|
+
import { BundlerClient, SmartAccount } from "viem/account-abstraction";
|
|
2
3
|
import { PostQuoteResponse } from "../client";
|
|
3
4
|
import { GenericPublicClient } from "../utils/genericPublicClient";
|
|
4
5
|
type TradeERC20 = {
|
|
@@ -52,7 +53,31 @@ export declare function tradeCoin({ tradeParameters, walletClient, account, publ
|
|
|
52
53
|
account?: Account | Address;
|
|
53
54
|
publicClient: GenericPublicClient;
|
|
54
55
|
validateTransaction?: boolean;
|
|
55
|
-
}): Promise<
|
|
56
|
+
}): Promise<TransactionReceipt>;
|
|
57
|
+
/**
|
|
58
|
+
* Executes a trade from the caller's smart wallet via a user operation.
|
|
59
|
+
*
|
|
60
|
+
* Mirrors {@link tradeCoin} but routes through a bundler client: the smart
|
|
61
|
+
* account is both the token holder and the permit2 signer (ERC-1271), and any
|
|
62
|
+
* required permit2 approval is batched into the same user operation as the trade
|
|
63
|
+
* (rather than sent as a prior transaction). Returns the settled transaction
|
|
64
|
+
* receipt.
|
|
65
|
+
*/
|
|
66
|
+
export declare function tradeCoinSmartWallet({ tradeParameters, bundlerClient, account, publicClient, }: {
|
|
67
|
+
tradeParameters: TradeParameters;
|
|
68
|
+
bundlerClient: BundlerClient;
|
|
69
|
+
account?: SmartAccount;
|
|
70
|
+
publicClient: GenericPublicClient;
|
|
71
|
+
}): Promise<TransactionReceipt<bigint, number, "success" | "reverted">>;
|
|
72
|
+
/**
|
|
73
|
+
* Validates the parameters for a trade.
|
|
74
|
+
*
|
|
75
|
+
* Asserts slippage is within bounds and a non-zero input amount is provided.
|
|
76
|
+
* Shared by the quote builder (`createTradeCall`) and the user-operation path so
|
|
77
|
+
* both validate identically before any network request is made.
|
|
78
|
+
*/
|
|
79
|
+
export declare function validateTradeParameters(tradeParameters: TradeParameters): void;
|
|
56
80
|
export declare function createTradeCall(tradeParameters: TradeParameters): Promise<PostQuoteResponse>;
|
|
81
|
+
export declare function createQuote(tradeParameters: TradeParameters): Promise<PostQuoteResponse>;
|
|
57
82
|
export {};
|
|
58
83
|
//# sourceMappingURL=tradeCoin.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tradeCoin.d.ts","sourceRoot":"","sources":["../../src/actions/tradeCoin.ts"],"names":[],"mappings":"AACA,OAAO,EACL,OAAO,EACP,OAAO,
|
|
1
|
+
{"version":3,"file":"tradeCoin.d.ts","sourceRoot":"","sources":["../../src/actions/tradeCoin.ts"],"names":[],"mappings":"AACA,OAAO,EACL,OAAO,EACP,OAAO,EAGP,GAAG,EAEH,kBAAkB,EAClB,YAAY,EACb,MAAM,MAAM,CAAC;AACd,OAAO,EAAE,aAAa,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAEvE,OAAO,EAAa,iBAAiB,EAAE,MAAM,WAAW,CAAC;AAEzD,OAAO,EAAE,mBAAmB,EAAE,MAAM,8BAA8B,CAAC;AAMnE,KAAK,UAAU,GAAG;IAChB,IAAI,EAAE,OAAO,CAAC;IACd,OAAO,EAAE,OAAO,CAAC;CAClB,CAAC;AAEF,KAAK,QAAQ,GAAG;IACd,IAAI,EAAE,KAAK,CAAC;CACb,CAAC;AAEF,KAAK,aAAa,GAAG;IACnB,KAAK,EAAE,OAAO,CAAC;IACf,MAAM,EAAE,MAAM,CAAC;IACf,UAAU,EAAE,MAAM,CAAC;IACnB,KAAK,EAAE,MAAM,CAAC;CACf,CAAC;AAEF,KAAK,MAAM,GAAG;IACZ,OAAO,EAAE,aAAa,CAAC;IACvB,OAAO,EAAE,OAAO,CAAC;IACjB,WAAW,EAAE,MAAM,CAAC;CACrB,CAAC;AAEF,KAAK,0BAA0B,GAAG;IAChC,KAAK,EAAE,OAAO,CAAC;IACf,MAAM,EAAE,MAAM,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Aa,EAAE,aAAa,CAAC;IAC7B,OAAO,CAAC,EAAE,YAAY,CAAC;IACvB,YAAY,EAAE,mBAAmB,CAAC;CACnC,uEAyDA;AAED;;;;;;GAMG;AACH,wBAAgB,uBAAuB,CACrC,eAAe,EAAE,eAAe,GAC/B,IAAI,CAON;AAED,wBAAsB,eAAe,CACnC,eAAe,EAAE,eAAe,GAC/B,OAAO,CAAC,iBAAiB,CAAC,CAE5B;AAED,wBAAsB,WAAW,CAC/B,eAAe,EAAE,eAAe,GAC/B,OAAO,CAAC,iBAAiB,CAAC,CA6B5B"}
|
|
@@ -1,10 +1,18 @@
|
|
|
1
1
|
import { Account, Address, SimulateContractParameters, WalletClient } from "viem";
|
|
2
|
+
import { BundlerClient, SmartAccount } from "viem/account-abstraction";
|
|
2
3
|
import { GenericPublicClient } from "../utils/genericPublicClient";
|
|
3
4
|
export type UpdateCoinURIArgs = {
|
|
4
5
|
coin: Address;
|
|
5
6
|
newURI: string;
|
|
6
7
|
};
|
|
7
|
-
|
|
8
|
+
/**
|
|
9
|
+
* Validates the arguments for updating a coin's URI.
|
|
10
|
+
*
|
|
11
|
+
* Asserts the new URI is an `ipfs://` URI. Shared by the contract-call builder
|
|
12
|
+
* (`updateCoinURICall`) and the user-operation path so both validate identically.
|
|
13
|
+
*/
|
|
14
|
+
export declare function validateUpdateCoinURI({ newURI }: UpdateCoinURIArgs): void;
|
|
15
|
+
export declare function updateCoinURICall(args: UpdateCoinURIArgs): SimulateContractParameters;
|
|
8
16
|
export declare function updateCoinURI(args: UpdateCoinURIArgs, walletClient: WalletClient, publicClient: GenericPublicClient, account?: Account | Address): Promise<{
|
|
9
17
|
hash: `0x${string}`;
|
|
10
18
|
receipt: any;
|
|
@@ -23,4 +31,30 @@ export declare function updateCoinURI(args: UpdateCoinURIArgs, walletClient: Wal
|
|
|
23
31
|
topics: [`0x${string}`];
|
|
24
32
|
}) | undefined;
|
|
25
33
|
}>;
|
|
34
|
+
/**
|
|
35
|
+
* Updates a coin's URI from the caller's smart wallet via a user operation.
|
|
36
|
+
*
|
|
37
|
+
* Builds the `setContractURI` call, submits it through the bundler client (which
|
|
38
|
+
* wraps it in the smart wallet's `execute`), and parses the result. Mirrors
|
|
39
|
+
* {@link updateCoinURI}'s return shape (`hash` is the settled transaction hash,
|
|
40
|
+
* `receipt` the underlying transaction receipt).
|
|
41
|
+
*/
|
|
42
|
+
export declare function updateCoinURISmartWallet(args: UpdateCoinURIArgs, bundlerClient: BundlerClient, publicClient: GenericPublicClient, account?: SmartAccount): Promise<{
|
|
43
|
+
hash: `0x${string}`;
|
|
44
|
+
receipt: import("viem").TransactionReceipt<bigint, number, "success" | "reverted">;
|
|
45
|
+
uriUpdated: ({
|
|
46
|
+
address: Address;
|
|
47
|
+
blockHash: `0x${string}`;
|
|
48
|
+
blockNumber: bigint;
|
|
49
|
+
data: import("viem").Hex;
|
|
50
|
+
logIndex: number;
|
|
51
|
+
transactionHash: `0x${string}`;
|
|
52
|
+
transactionIndex: number;
|
|
53
|
+
removed: boolean;
|
|
54
|
+
} & {
|
|
55
|
+
args: readonly [];
|
|
56
|
+
eventName: "ContractURIUpdated";
|
|
57
|
+
topics: [`0x${string}`];
|
|
58
|
+
}) | undefined;
|
|
59
|
+
}>;
|
|
26
60
|
//# sourceMappingURL=updateCoinURI.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"updateCoinURI.d.ts","sourceRoot":"","sources":["../../src/actions/updateCoinURI.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"updateCoinURI.d.ts","sourceRoot":"","sources":["../../src/actions/updateCoinURI.ts"],"names":[],"mappings":"AACA,OAAO,EACL,OAAO,EACP,OAAO,EAEP,0BAA0B,EAC1B,YAAY,EACb,MAAM,MAAM,CAAC;AACd,OAAO,EAAE,aAAa,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAGvE,OAAO,EAAE,mBAAmB,EAAE,MAAM,8BAA8B,CAAC;AAOnE,MAAM,MAAM,iBAAiB,GAAG;IAC9B,IAAI,EAAE,OAAO,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;CAChB,CAAC;AAEF;;;;;GAKG;AACH,wBAAgB,qBAAqB,CAAC,EAAE,MAAM,EAAE,EAAE,iBAAiB,GAAG,IAAI,CAIzE;AAED,wBAAgB,iBAAiB,CAC/B,IAAI,EAAE,iBAAiB,GACtB,0BAA0B,CAY5B;AAED,wBAAsB,aAAa,CACjC,IAAI,EAAE,iBAAiB,EACvB,YAAY,EAAE,YAAY,EAC1B,YAAY,EAAE,mBAAmB,EACjC,OAAO,CAAC,EAAE,OAAO,GAAG,OAAO;;;;;;;;;;;;;;;;;GAqB5B;AAED;;;;;;;GAOG;AACH,wBAAsB,wBAAwB,CAC5C,IAAI,EAAE,iBAAiB,EACvB,aAAa,EAAE,aAAa,EAC5B,YAAY,EAAE,mBAAmB,EACjC,OAAO,CAAC,EAAE,YAAY;;;;;;;;;;;;;;;;;GA0CvB"}
|
|
@@ -1,10 +1,19 @@
|
|
|
1
1
|
import { Account, Address, SimulateContractParameters, WalletClient } from "viem";
|
|
2
|
+
import { BundlerClient, SmartAccount } from "viem/account-abstraction";
|
|
2
3
|
import { GenericPublicClient } from "../utils/genericPublicClient";
|
|
3
4
|
export type UpdatePayoutRecipientArgs = {
|
|
4
5
|
coin: Address;
|
|
5
6
|
newPayoutRecipient: string;
|
|
6
7
|
};
|
|
7
|
-
|
|
8
|
+
/**
|
|
9
|
+
* Validates the arguments for updating a coin's payout recipient.
|
|
10
|
+
*
|
|
11
|
+
* Asserts the new payout recipient is a valid address. Shared by the
|
|
12
|
+
* contract-call builder (`updatePayoutRecipientCall`) and the user-operation path
|
|
13
|
+
* so both validate identically.
|
|
14
|
+
*/
|
|
15
|
+
export declare function validateUpdatePayoutRecipient({ newPayoutRecipient, }: UpdatePayoutRecipientArgs): void;
|
|
16
|
+
export declare function updatePayoutRecipientCall(args: UpdatePayoutRecipientArgs): SimulateContractParameters;
|
|
8
17
|
export declare function updatePayoutRecipient(args: UpdatePayoutRecipientArgs, walletClient: WalletClient, publicClient: GenericPublicClient, account?: Account | Address): Promise<{
|
|
9
18
|
hash: `0x${string}`;
|
|
10
19
|
receipt: any;
|
|
@@ -27,4 +36,35 @@ export declare function updatePayoutRecipient(args: UpdatePayoutRecipientArgs, w
|
|
|
27
36
|
topics: [`0x${string}`, `0x${string}`, `0x${string}`, `0x${string}`];
|
|
28
37
|
}) | undefined;
|
|
29
38
|
}>;
|
|
39
|
+
/**
|
|
40
|
+
* Updates a coin's payout recipient from the caller's smart wallet via a user
|
|
41
|
+
* operation.
|
|
42
|
+
*
|
|
43
|
+
* Builds the `setPayoutRecipient` call, submits it through the bundler client
|
|
44
|
+
* (which wraps it in the smart wallet's `execute`), and parses the result.
|
|
45
|
+
* Mirrors {@link updatePayoutRecipient}'s return shape (`hash` is the settled
|
|
46
|
+
* transaction hash, `receipt` the underlying transaction receipt).
|
|
47
|
+
*/
|
|
48
|
+
export declare function updatePayoutRecipientSmartWallet(args: UpdatePayoutRecipientArgs, bundlerClient: BundlerClient, publicClient: GenericPublicClient, account?: SmartAccount): Promise<{
|
|
49
|
+
hash: `0x${string}`;
|
|
50
|
+
receipt: import("viem").TransactionReceipt<bigint, number, "success" | "reverted">;
|
|
51
|
+
payoutRecipientUpdated: ({
|
|
52
|
+
address: Address;
|
|
53
|
+
blockHash: `0x${string}`;
|
|
54
|
+
blockNumber: bigint;
|
|
55
|
+
data: import("viem").Hex;
|
|
56
|
+
logIndex: number;
|
|
57
|
+
transactionHash: `0x${string}`;
|
|
58
|
+
transactionIndex: number;
|
|
59
|
+
removed: boolean;
|
|
60
|
+
} & {
|
|
61
|
+
args: {
|
|
62
|
+
caller: `0x${string}`;
|
|
63
|
+
prevRecipient: `0x${string}`;
|
|
64
|
+
newRecipient: `0x${string}`;
|
|
65
|
+
};
|
|
66
|
+
eventName: "CoinPayoutRecipientUpdated";
|
|
67
|
+
topics: [`0x${string}`, `0x${string}`, `0x${string}`, `0x${string}`];
|
|
68
|
+
}) | undefined;
|
|
69
|
+
}>;
|
|
30
70
|
//# sourceMappingURL=updatePayoutRecipient.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"updatePayoutRecipient.d.ts","sourceRoot":"","sources":["../../src/actions/updatePayoutRecipient.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"updatePayoutRecipient.d.ts","sourceRoot":"","sources":["../../src/actions/updatePayoutRecipient.ts"],"names":[],"mappings":"AACA,OAAO,EACL,OAAO,EACP,OAAO,EAGP,0BAA0B,EAC1B,YAAY,EACb,MAAM,MAAM,CAAC;AACd,OAAO,EAAE,aAAa,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAGvE,OAAO,EAAE,mBAAmB,EAAE,MAAM,8BAA8B,CAAC;AAOnE,MAAM,MAAM,yBAAyB,GAAG;IACtC,IAAI,EAAE,OAAO,CAAC;IACd,kBAAkB,EAAE,MAAM,CAAC;CAC5B,CAAC;AAEF;;;;;;GAMG;AACH,wBAAgB,6BAA6B,CAAC,EAC5C,kBAAkB,GACnB,EAAE,yBAAyB,GAAG,IAAI,CAIlC;AAED,wBAAgB,yBAAyB,CACvC,IAAI,EAAE,yBAAyB,GAC9B,0BAA0B,CAY5B;AAED,wBAAsB,qBAAqB,CACzC,IAAI,EAAE,yBAAyB,EAC/B,YAAY,EAAE,YAAY,EAC1B,YAAY,EAAE,mBAAmB,EACjC,OAAO,CAAC,EAAE,OAAO,GAAG,OAAO;;;;;;;;;;;;;;;;;;;;;GAqB5B;AAED;;;;;;;;GAQG;AACH,wBAAsB,gCAAgC,CACpD,IAAI,EAAE,yBAAyB,EAC/B,aAAa,EAAE,aAAa,EAC5B,YAAY,EAAE,mBAAmB,EACjC,OAAO,CAAC,EAAE,YAAY;;;;;;;;;;;;;;;;;;;;;GA0CvB"}
|
package/dist/api/api-raw.d.ts
CHANGED
|
@@ -18,5 +18,6 @@ export declare const apiPost: (path: string, data?: Record<string, unknown>) =>
|
|
|
18
18
|
request: Request;
|
|
19
19
|
response: Response;
|
|
20
20
|
}>;
|
|
21
|
+
export declare const apiUrl: (path: string) => string;
|
|
21
22
|
export declare const setApiBaseUrl: (baseUrl: string) => void;
|
|
22
23
|
//# sourceMappingURL=api-raw.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"api-raw.d.ts","sourceRoot":"","sources":["../../src/api/api-raw.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,MAAM,GAAI,MAAM,MAAM,EAAE,OAAO,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;;;;;;;;;EACP,CAAC;AAE7D,eAAO,MAAM,OAAO,GAAI,MAAM,MAAM,EAAE,OAAO,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;;;;;;;;;EACR,CAAC;AAE7D,eAAO,MAAM,aAAa,GAAI,SAAS,MAAM,SAE5C,CAAC"}
|
|
1
|
+
{"version":3,"file":"api-raw.d.ts","sourceRoot":"","sources":["../../src/api/api-raw.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,MAAM,GAAI,MAAM,MAAM,EAAE,OAAO,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;;;;;;;;;EACP,CAAC;AAE7D,eAAO,MAAM,OAAO,GAAI,MAAM,MAAM,EAAE,OAAO,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;;;;;;;;;EACR,CAAC;AAE7D,eAAO,MAAM,MAAM,GAAI,MAAM,MAAM,WAOlC,CAAC;AAEF,eAAO,MAAM,aAAa,GAAI,SAAS,MAAM,SAE5C,CAAC"}
|
package/dist/api/index.d.ts
CHANGED
package/dist/api/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/api/index.ts"],"names":[],"mappings":"AACA,cAAc,WAAW,CAAC;AAC1B,mBAAmB,WAAW,CAAC;AAG/B,cAAc,WAAW,CAAC;AAC1B,mBAAmB,WAAW,CAAC;AAG/B,cAAc,UAAU,CAAC;AACzB,mBAAmB,UAAU,CAAC;AAI9B,OAAO,EAAE,SAAS,EAAE,MAAM,WAAW,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/api/index.ts"],"names":[],"mappings":"AACA,cAAc,WAAW,CAAC;AAC1B,mBAAmB,WAAW,CAAC;AAG/B,cAAc,WAAW,CAAC;AAC1B,mBAAmB,WAAW,CAAC;AAG/B,cAAc,UAAU,CAAC;AACzB,mBAAmB,UAAU,CAAC;AAG9B,cAAc,UAAU,CAAC;AACzB,mBAAmB,UAAU,CAAC;AAI9B,OAAO,EAAE,SAAS,EAAE,MAAM,WAAW,CAAC"}
|
package/dist/api/queries.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { GetCoinCommentsData, GetCoinCommentsResponse, GetCoinData, GetCoinHoldersData, GetCoinHoldersResponse, GetCoinResponse, GetCoinsData, GetCoinsResponse, GetCoinSwapsData, GetCoinSwapsResponse, GetProfileBalancesData, GetProfileBalancesResponse, GetProfileCoinsData, GetProfileCoinsResponse, GetProfileData, GetProfileResponse, GetFeaturedCreatorsData, GetFeaturedCreatorsResponse, GetTraderLeaderboardData, GetTraderLeaderboardResponse, GetProfileSocialResponse, GetProfileSocialData, GetTokenInfoData, GetTokenInfoResponse, GetContentCoinPoolConfigData, GetContentCoinPoolConfigResponse, GetCreatorCoinPoolConfigData, GetCreatorCoinPoolConfigResponse, GetCreatorLivestreamCommentsData, GetCreatorLivestreamCommentsResponse } from "../client/types.gen";
|
|
1
|
+
import { GetCoinCommentsData, GetCoinCommentsResponse, GetCoinData, GetCoinHoldersData, GetCoinHoldersResponse, GetCoinPriceHistoryData, GetCoinPriceHistoryResponse, GetCoinResponse, GetCoinsData, GetCoinsResponse, GetCoinSwapsData, GetCoinSwapsResponse, GetProfileBalancesData, GetProfileBalancesResponse, GetProfileCoinsData, GetProfileCoinsResponse, GetProfileData, GetProfileResponse, GetFeaturedCreatorsData, GetFeaturedCreatorsResponse, GetTraderLeaderboardData, GetTraderLeaderboardResponse, GetProfileSocialResponse, GetProfileSocialData, GetTokenInfoData, GetTokenInfoResponse, GetContentCoinPoolConfigData, GetContentCoinPoolConfigResponse, GetCreatorCoinPoolConfigData, GetCreatorCoinPoolConfigResponse, GetCreatorLivestreamCommentsData, GetCreatorLivestreamCommentsResponse, GetWalletTradeActivityData, GetWalletTradeActivityResponse } from "../client/types.gen";
|
|
2
2
|
import { RequestOptionsType } from "./query-types";
|
|
3
3
|
import { RequestResult } from "@hey-api/client-fetch";
|
|
4
4
|
export type { RequestResult };
|
|
@@ -15,6 +15,10 @@ type GetCoinHoldersQuery = GetCoinHoldersData["query"];
|
|
|
15
15
|
export type { GetCoinHoldersQuery, GetCoinHoldersData };
|
|
16
16
|
export type { GetCoinHoldersResponse } from "../client/types.gen";
|
|
17
17
|
export declare const getCoinHolders: (query: GetCoinHoldersQuery, options?: RequestOptionsType<GetCoinHoldersData>) => Promise<RequestResult<GetCoinHoldersResponse>>;
|
|
18
|
+
type GetCoinPriceHistoryQuery = GetCoinPriceHistoryData["query"];
|
|
19
|
+
export type { GetCoinPriceHistoryQuery, GetCoinPriceHistoryData };
|
|
20
|
+
export type { GetCoinPriceHistoryResponse } from "../client/types.gen";
|
|
21
|
+
export declare const getCoinPriceHistory: (query: GetCoinPriceHistoryQuery, options?: RequestOptionsType<GetCoinPriceHistoryData>) => Promise<RequestResult<GetCoinPriceHistoryResponse>>;
|
|
18
22
|
type GetCoinSwapsQuery = GetCoinSwapsData["query"];
|
|
19
23
|
export type { GetCoinSwapsQuery, GetCoinSwapsData };
|
|
20
24
|
export type { GetCoinSwapsResponse } from "../client/types.gen";
|
|
@@ -63,4 +67,8 @@ type GetCreatorLivestreamCommentsQuery = GetCreatorLivestreamCommentsData["query
|
|
|
63
67
|
export type { GetCreatorLivestreamCommentsQuery, GetCreatorLivestreamCommentsData, };
|
|
64
68
|
export type { GetCreatorLivestreamCommentsResponse } from "../client/types.gen";
|
|
65
69
|
export declare const getCreatorLivestreamComments: (query: GetCreatorLivestreamCommentsQuery, options?: RequestOptionsType<GetCreatorLivestreamCommentsData>) => Promise<RequestResult<GetCreatorLivestreamCommentsResponse>>;
|
|
70
|
+
type GetWalletTradeActivityQuery = GetWalletTradeActivityData["query"];
|
|
71
|
+
export type { GetWalletTradeActivityQuery, GetWalletTradeActivityData };
|
|
72
|
+
export type { GetWalletTradeActivityResponse } from "../client/types.gen";
|
|
73
|
+
export declare const getWalletTradeActivity: (query: GetWalletTradeActivityQuery, options?: RequestOptionsType<GetWalletTradeActivityData>) => Promise<RequestResult<GetWalletTradeActivityResponse>>;
|
|
66
74
|
//# sourceMappingURL=queries.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"queries.d.ts","sourceRoot":"","sources":["../../src/api/queries.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,mBAAmB,EACnB,uBAAuB,EACvB,WAAW,EACX,kBAAkB,EAClB,sBAAsB,EACtB,eAAe,EACf,YAAY,EACZ,gBAAgB,EAChB,gBAAgB,EAChB,oBAAoB,EACpB,sBAAsB,EACtB,0BAA0B,EAC1B,mBAAmB,EACnB,uBAAuB,EACvB,cAAc,EACd,kBAAkB,EAClB,uBAAuB,EACvB,2BAA2B,EAC3B,wBAAwB,EACxB,4BAA4B,EAC5B,wBAAwB,EACxB,oBAAoB,EACpB,gBAAgB,EAChB,oBAAoB,EACpB,4BAA4B,EAC5B,gCAAgC,EAChC,4BAA4B,EAC5B,gCAAgC,EAChC,gCAAgC,EAChC,oCAAoC,
|
|
1
|
+
{"version":3,"file":"queries.d.ts","sourceRoot":"","sources":["../../src/api/queries.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,mBAAmB,EACnB,uBAAuB,EACvB,WAAW,EACX,kBAAkB,EAClB,sBAAsB,EACtB,uBAAuB,EACvB,2BAA2B,EAC3B,eAAe,EACf,YAAY,EACZ,gBAAgB,EA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EF,KAAK,6BAA6B,GAAG,4BAA4B,CAAC,OAAO,CAAC,CAAC;AAC3E,YAAY,EAAE,6BAA6B,EAAE,4BAA4B,EAAE,CAAC;AAC5E,YAAY,EAAE,gCAAgC,EAAE,MAAM,qBAAqB,CAAC;AAE5E,eAAO,MAAM,wBAAwB,GACnC,OAAO,6BAA6B,EACpC,UAAU,kBAAkB,CAAC,4BAA4B,CAAC,KACzD,OAAO,CAAC,aAAa,CAAC,gCAAgC,CAAC,CAMzD,CAAC;AAEF,KAAK,iCAAiC,GACpC,gCAAgC,CAAC,OAAO,CAAC,CAAC;AAC5C,YAAY,EACV,iCAAiC,EACjC,gCAAgC,GACjC,CAAC;AACF,YAAY,EAAE,oCAAoC,EAAE,MAAM,qBAAqB,CAAC;AAEhF,eAAO,MAAM,4BAA4B,GACvC,OAAO,iCAAiC,EACxC,UAAU,kBAAkB,CAAC,gCAAgC,CAAC,KAC7D,OAAO,CAAC,aAAa,CAAC,oCAAoC,CAAC,CAM7D,CAAC;AAEF,KAAK,2BAA2B,GAAG,0BAA0B,CAAC,OAAO,CAAC,CAAC;AACvE,YAAY,EAAE,2BAA2B,EAAE,0BAA0B,EAAE,CAAC;AACxE,YAAY,EAAE,8BAA8B,EAAE,MAAM,qBAAqB,CAAC;AAE1E,eAAO,MAAM,sBAAsB,GACjC,OAAO,2BAA2B,EAClC,UAAU,kBAAkB,CAAC,0BAA0B,CAAC,KACvD,OAAO,CAAC,aAAa,CAAC,8BAA8B,CAAC,CAMvD,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { GetProfileBySocialHandleData, GetProfileBySocialHandleResponse } from "../client/types.gen";
|
|
2
|
+
import { RequestOptionsType } from "./query-types";
|
|
3
|
+
import { RequestResult } from "@hey-api/client-fetch";
|
|
4
|
+
type GetProfileBySocialHandleQuery = GetProfileBySocialHandleData["query"];
|
|
5
|
+
export type { GetProfileBySocialHandleQuery, GetProfileBySocialHandleData };
|
|
6
|
+
export type { GetProfileBySocialHandleResponse } from "../client/types.gen";
|
|
7
|
+
export declare const getProfileBySocialHandle: (query: GetProfileBySocialHandleQuery, options?: RequestOptionsType<GetProfileBySocialHandleData>) => Promise<RequestResult<GetProfileBySocialHandleResponse>>;
|
|
8
|
+
//# sourceMappingURL=social.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"social.d.ts","sourceRoot":"","sources":["../../src/api/social.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,4BAA4B,EAC5B,gCAAgC,EACjC,MAAM,qBAAqB,CAAC;AAG7B,OAAO,EAAE,kBAAkB,EAAE,MAAM,eAAe,CAAC;AACnD,OAAO,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AAEtD,KAAK,6BAA6B,GAAG,4BAA4B,CAAC,OAAO,CAAC,CAAC;AAC3E,YAAY,EAAE,6BAA6B,EAAE,4BAA4B,EAAE,CAAC;AAC5E,YAAY,EAAE,gCAAgC,EAAE,MAAM,qBAAqB,CAAC;AAE5E,eAAO,MAAM,wBAAwB,GACnC,OAAO,6BAA6B,EACpC,UAAU,kBAAkB,CAAC,4BAA4B,CAAC,KACzD,OAAO,CAAC,aAAa,CAAC,gCAAgC,CAAC,CAMzD,CAAC"}
|
package/dist/client/sdk.gen.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { Options as ClientOptions, TDataShape, Client } from "@hey-api/client-fetch";
|
|
2
|
-
import type { GetApiKeyData, GetCoinData, GetCoinCommentsData, GetCoinHoldersData, GetCoinPriceHistoryData, GetCoinSwapsData, GetCoinsData, GetCoinsListData, GetContentCoinPoolConfigData, SetCreateUploadJwtData, GetCreatorCoinPoolConfigData, GetCreatorLivestreamCommentsData, GetExploreData, GetFeaturedCreatorsData, GetLatestLiveStreamsData, GetProfileData, GetProfileBalancesData, GetProfileCoinsData, GetProfileSocialData, GetTokenInfoData, GetTopLiveStreamsData, GetTraderLeaderboardData, GetTrendCoinData, GetTrendsByNameData, PostQuoteData, PostQuoteError, PostCreateContentData } from "./types.gen";
|
|
2
|
+
import type { GetApiKeyData, GetCoinData, GetCoinCommentsData, GetCoinHoldersData, GetCoinPriceHistoryData, GetCoinSwapsData, GetCoinsData, GetCoinsListData, GetContentCoinPoolConfigData, SetCreateUploadJwtData, GetCreatorCoinPoolConfigData, GetCreatorLivestreamCommentsData, GetExploreData, GetFeaturedCreatorsData, GetLatestLiveStreamsData, GetProfileData, GetProfileBalancesData, GetProfileBySocialHandleData, GetProfileCoinsData, GetProfileSocialData, GetTokenInfoData, GetTopLiveStreamsData, GetTraderLeaderboardData, GetTrendCoinData, GetTrendsByNameData, GetWalletTradeActivityData, PostQuoteData, PostQuoteError, PostCreateContentData } from "./types.gen";
|
|
3
3
|
export type Options<TData extends TDataShape = TDataShape, ThrowOnError extends boolean = boolean> = ClientOptions<TData, ThrowOnError> & {
|
|
4
4
|
/**
|
|
5
5
|
* You can provide a client instance returned by `createClient()` instead of
|
|
@@ -987,6 +987,57 @@ export declare const getProfileBalances: <ThrowOnError extends boolean = false>(
|
|
|
987
987
|
};
|
|
988
988
|
};
|
|
989
989
|
}, unknown, ThrowOnError>;
|
|
990
|
+
/**
|
|
991
|
+
* zoraSDK_profileBySocialHandle query
|
|
992
|
+
*/
|
|
993
|
+
export declare const getProfileBySocialHandle: <ThrowOnError extends boolean = false>(options: Options<GetProfileBySocialHandleData, ThrowOnError>) => import("@hey-api/client-fetch").RequestResult<{
|
|
994
|
+
profileBySocialHandle?: {
|
|
995
|
+
id: string;
|
|
996
|
+
handle: string;
|
|
997
|
+
platformBlocked: boolean;
|
|
998
|
+
avatar?: {
|
|
999
|
+
previewImage: {
|
|
1000
|
+
blurhash?: string;
|
|
1001
|
+
medium: string;
|
|
1002
|
+
small: string;
|
|
1003
|
+
};
|
|
1004
|
+
};
|
|
1005
|
+
socialAccounts: {
|
|
1006
|
+
instagram?: {
|
|
1007
|
+
username?: string;
|
|
1008
|
+
displayName?: string;
|
|
1009
|
+
followerCount?: number;
|
|
1010
|
+
id?: string;
|
|
1011
|
+
};
|
|
1012
|
+
tiktok?: {
|
|
1013
|
+
username?: string;
|
|
1014
|
+
displayName?: string;
|
|
1015
|
+
followerCount?: number;
|
|
1016
|
+
id?: string;
|
|
1017
|
+
};
|
|
1018
|
+
twitter?: {
|
|
1019
|
+
username?: string;
|
|
1020
|
+
displayName?: string;
|
|
1021
|
+
followerCount?: number;
|
|
1022
|
+
id?: string;
|
|
1023
|
+
};
|
|
1024
|
+
farcaster?: {
|
|
1025
|
+
username?: string;
|
|
1026
|
+
displayName?: string;
|
|
1027
|
+
followerCount?: number;
|
|
1028
|
+
id?: string;
|
|
1029
|
+
};
|
|
1030
|
+
};
|
|
1031
|
+
creatorCoin?: {
|
|
1032
|
+
symbol: string;
|
|
1033
|
+
marketCap: string;
|
|
1034
|
+
marketCapDelta24h: string;
|
|
1035
|
+
multichainAddress: string;
|
|
1036
|
+
};
|
|
1037
|
+
username: string;
|
|
1038
|
+
displayName?: string;
|
|
1039
|
+
};
|
|
1040
|
+
}, unknown, ThrowOnError>;
|
|
990
1041
|
/**
|
|
991
1042
|
* zoraSDK_profileCoins query
|
|
992
1043
|
*/
|
|
@@ -1549,6 +1600,98 @@ export declare const getTrendsByName: <ThrowOnError extends boolean = false>(opt
|
|
|
1549
1600
|
}>;
|
|
1550
1601
|
};
|
|
1551
1602
|
}, unknown, ThrowOnError>;
|
|
1603
|
+
/**
|
|
1604
|
+
* zoraSDK_walletTradeActivity query
|
|
1605
|
+
*/
|
|
1606
|
+
export declare const getWalletTradeActivity: <ThrowOnError extends boolean = false>(options: Options<GetWalletTradeActivityData, ThrowOnError>) => import("@hey-api/client-fetch").RequestResult<{
|
|
1607
|
+
walletAddressTradeActivity: {
|
|
1608
|
+
count: number;
|
|
1609
|
+
edges: Array<{
|
|
1610
|
+
node: {
|
|
1611
|
+
transactionHash: string;
|
|
1612
|
+
transactionLogIndex?: number;
|
|
1613
|
+
blockTimestamp: string;
|
|
1614
|
+
coinAmount: string;
|
|
1615
|
+
coin?: {
|
|
1616
|
+
platformBlocked: boolean;
|
|
1617
|
+
address: string;
|
|
1618
|
+
coinType: "CREATOR" | "CONTENT" | "TREND";
|
|
1619
|
+
name: string;
|
|
1620
|
+
symbol: string;
|
|
1621
|
+
description: string;
|
|
1622
|
+
tokenUri?: string;
|
|
1623
|
+
mediaContent?: {
|
|
1624
|
+
previewImage?: {
|
|
1625
|
+
small: string;
|
|
1626
|
+
blurhash?: string;
|
|
1627
|
+
medium: string;
|
|
1628
|
+
};
|
|
1629
|
+
};
|
|
1630
|
+
creatorAddress?: string;
|
|
1631
|
+
creatorProfile?: {
|
|
1632
|
+
id: string;
|
|
1633
|
+
handle: string;
|
|
1634
|
+
platformBlocked: boolean;
|
|
1635
|
+
avatar?: {
|
|
1636
|
+
previewImage: {
|
|
1637
|
+
blurhash?: string;
|
|
1638
|
+
medium: string;
|
|
1639
|
+
small: string;
|
|
1640
|
+
};
|
|
1641
|
+
};
|
|
1642
|
+
};
|
|
1643
|
+
uniswapPoolAddress: string;
|
|
1644
|
+
totalSupply: string;
|
|
1645
|
+
};
|
|
1646
|
+
id: string;
|
|
1647
|
+
swapActivityType?: "BUY" | "SELL";
|
|
1648
|
+
currencyAmountWithPrice: {
|
|
1649
|
+
amountUsd?: string;
|
|
1650
|
+
priceUsdc?: string;
|
|
1651
|
+
priceDelta24h?: string;
|
|
1652
|
+
currencyAmount: {
|
|
1653
|
+
currencyAddress: string;
|
|
1654
|
+
amountDecimal: number;
|
|
1655
|
+
amountRaw: string;
|
|
1656
|
+
};
|
|
1657
|
+
};
|
|
1658
|
+
senderProfile?: {
|
|
1659
|
+
id: string;
|
|
1660
|
+
handle: string;
|
|
1661
|
+
platformBlocked: boolean;
|
|
1662
|
+
avatar?: {
|
|
1663
|
+
previewImage: {
|
|
1664
|
+
blurhash?: string;
|
|
1665
|
+
medium: string;
|
|
1666
|
+
small: string;
|
|
1667
|
+
};
|
|
1668
|
+
};
|
|
1669
|
+
};
|
|
1670
|
+
orderId: string;
|
|
1671
|
+
initialBuyAmount?: string;
|
|
1672
|
+
initialBuyAmountUsd?: number;
|
|
1673
|
+
multiplier: number;
|
|
1674
|
+
makerProfile?: {
|
|
1675
|
+
id: string;
|
|
1676
|
+
handle: string;
|
|
1677
|
+
platformBlocked: boolean;
|
|
1678
|
+
avatar?: {
|
|
1679
|
+
previewImage: {
|
|
1680
|
+
blurhash?: string;
|
|
1681
|
+
medium: string;
|
|
1682
|
+
small: string;
|
|
1683
|
+
};
|
|
1684
|
+
};
|
|
1685
|
+
};
|
|
1686
|
+
};
|
|
1687
|
+
cursor: string;
|
|
1688
|
+
}>;
|
|
1689
|
+
pageInfo: {
|
|
1690
|
+
endCursor?: string;
|
|
1691
|
+
hasNextPage: boolean;
|
|
1692
|
+
};
|
|
1693
|
+
};
|
|
1694
|
+
}, unknown, ThrowOnError>;
|
|
1552
1695
|
export declare const postQuote: <ThrowOnError extends boolean = false>(options?: Options<PostQuoteData, ThrowOnError>) => import("@hey-api/client-fetch").RequestResult<{
|
|
1553
1696
|
success: boolean;
|
|
1554
1697
|
call: {
|