@fileverse-dev/dsheet 2.1.5 → 3.0.1-formula-1
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/{constants-yStXQJiK.js → constants-Cdz6oSCq.js} +5 -7
- package/dist/constants.js +1 -1
- package/dist/editor/components/api-key-modal/api-key-input.d.ts +5 -0
- package/dist/editor/components/api-key-modal/api-key-modal.d.ts +7 -0
- package/dist/editor/components/api-key-modal/rate-limit-info.d.ts +4 -0
- package/dist/editor/components/comments/comment-actions-dropdown.d.ts +19 -0
- package/dist/editor/components/comments/comment-cell-popup.d.ts +4 -0
- package/dist/editor/components/comments/comment-input.d.ts +4 -0
- package/dist/editor/components/comments/comment-item.d.ts +4 -0
- package/dist/editor/components/comments/comment-sidebar-empty.d.ts +4 -0
- package/dist/editor/components/comments/comment-sidebar.d.ts +4 -0
- package/dist/editor/components/comments/ens/ens-cache.d.ts +10 -0
- package/dist/editor/components/comments/ens/use-ens-status.d.ts +10 -0
- package/dist/editor/components/comments/use-comment-cell-popup.d.ts +12 -0
- package/dist/editor/components/comments/use-comment-permissions.d.ts +15 -0
- package/dist/editor/components/editor-workbook-sync.d.ts +1 -1
- package/dist/editor/components/editor-workbook.d.ts +11 -17
- package/dist/editor/components/sidebar/editor-right-sidebar.d.ts +20 -0
- package/dist/editor/components/sidebar/right-sidebar.d.ts +14 -0
- package/dist/editor/components/sidebar/sidebar-context.d.ts +17 -0
- package/dist/editor/components/sidebar/sidebar-portal-registry.d.ts +20 -0
- package/dist/editor/components/sidebar/use-right-panels.d.ts +12 -0
- package/dist/editor/components/sidebars/conditional-format.d.ts +2 -0
- package/dist/editor/components/sidebars/data-verification.d.ts +2 -0
- package/dist/editor/components/sidebars/function/function-categories-logic.d.ts +11 -0
- package/dist/editor/components/sidebars/function/function-categories.d.ts +6 -0
- package/dist/editor/components/sidebars/function/function-metadata.d.ts +7 -0
- package/dist/editor/components/sidebars/function/functionList.d.ts +8 -0
- package/dist/editor/components/sidebars/function/types.d.ts +24 -0
- package/dist/editor/components/sidebars/function/use-functions.d.ts +20 -0
- package/dist/editor/components/sidebars/function-content.d.ts +8 -0
- package/dist/editor/components/sidebars/named-ranges.d.ts +2 -0
- package/dist/editor/components/sidebars/template-ui.d.ts +22 -0
- package/dist/editor/components/sidebars/templates.d.ts +9 -0
- package/dist/editor/components/smart-contract/error-toast.d.ts +11 -0
- package/dist/editor/components/smart-contract/modal/abi-input-section.d.ts +11 -0
- package/dist/editor/components/smart-contract/modal/contract-name-section.d.ts +13 -0
- package/dist/editor/components/smart-contract/modal/file-upload-section.d.ts +12 -0
- package/dist/editor/components/smart-contract/modal/import-section.d.ts +8 -0
- package/dist/editor/components/smart-contract/modal/modal-header.d.ts +17 -0
- package/dist/editor/components/smart-contract/smart-contract-list-item.d.ts +8 -0
- package/dist/editor/components/smart-contract/smart-contract-modal-ui.d.ts +33 -0
- package/dist/editor/components/smart-contract/smart-contract-modal.d.ts +12 -0
- package/dist/editor/components/smart-contract/smart-contract-reading-intro.d.ts +4 -0
- package/dist/editor/components/smart-contract/smart-contract-view-list.d.ts +6 -0
- package/dist/editor/components/smart-contract/use-address-validation.d.ts +5 -0
- package/dist/editor/components/smart-contract/use-modal-outside-click.d.ts +18 -0
- package/dist/editor/components/smart-contract/use-smart-contract-modal.d.ts +38 -0
- package/dist/editor/constants/shared-constants.d.ts +0 -2
- package/dist/editor/contexts/editor-context.d.ts +20 -5
- package/dist/editor/dsheet-editor.d.ts +1 -1
- package/dist/editor/hooks/live-query/use-live-query.d.ts +4 -2
- package/dist/editor/hooks/use-celldata-compaction.d.ts +23 -0
- package/dist/editor/hooks/use-editor-data.d.ts +4 -2
- package/dist/editor/hooks/use-smart-contract.d.ts +26 -0
- package/dist/editor/hooks/use-xlsx-import-impl.d.ts +8 -1
- package/dist/editor/hooks/use-xlsx-import.d.ts +2 -1
- package/dist/editor/types/comments.d.ts +134 -0
- package/dist/editor/types/smart-contract.d.ts +88 -0
- package/dist/editor/types.d.ts +39 -32
- package/dist/editor/utils/after-update-cell.d.ts +13 -8
- package/dist/editor/utils/api-key-storage.d.ts +6 -0
- package/dist/editor/utils/api-keys-local-storage.d.ts +19 -0
- package/dist/editor/utils/cell-comment-marker.d.ts +30 -0
- package/dist/editor/utils/comment-key-utils.d.ts +7 -0
- package/dist/editor/utils/compact-committed-celldata.d.ts +28 -0
- package/dist/editor/utils/config-ydoc-update.d.ts +20 -0
- package/dist/editor/utils/csv-import.d.ts +3 -1
- package/dist/editor/utils/data-block-error-handler.d.ts +21 -0
- package/dist/editor/utils/datablock-error-utils.d.ts +1 -0
- package/dist/editor/utils/defined-names-ydoc.d.ts +31 -0
- package/dist/editor/utils/sheet-editor-safe.d.ts +26 -0
- package/dist/editor/utils/smart-contract/constants.d.ts +488 -0
- package/dist/editor/utils/smart-contract/error-helper.d.ts +20 -0
- package/dist/editor/utils/smart-contract/helpers.d.ts +4 -0
- package/dist/editor/utils/smart-contract/reading-utils.d.ts +34 -0
- package/dist/editor/utils/smart-contract/signature-utils.d.ts +9 -0
- package/dist/editor/utils/spreadsheet-import.d.ts +12 -0
- package/dist/editor/utils/update-ydoc.d.ts +2 -2
- package/dist/editor/utils/xlsx-defined-names.d.ts +41 -0
- package/dist/executeStringFunction-DMPoSj5F.js +32826 -0
- package/dist/formula.js +1 -1
- package/dist/index-DAVuAF9T.js +55303 -0
- package/dist/index.d.ts +11 -1
- package/dist/index.es.js +55 -49
- package/dist/jszip.min-CEyB-71x.js +2319 -0
- package/dist/sheet-engine/core/api/cell.d.ts +0 -20
- package/dist/sheet-engine/core/api/common.d.ts +2 -1
- package/dist/sheet-engine/core/api/index.d.ts +1 -0
- package/dist/sheet-engine/core/api/sheet-flowdata-lifecycle.d.ts +17 -0
- package/dist/sheet-engine/core/api/sheet.d.ts +5 -0
- package/dist/sheet-engine/core/context.d.ts +8 -1
- package/dist/sheet-engine/core/index.d.ts +2 -2
- package/dist/sheet-engine/core/modules/formula-async-eval.d.ts +53 -0
- package/dist/sheet-engine/core/modules/formula-eval.worker.d.ts +1 -0
- package/dist/sheet-engine/core/modules/formula-range-cache.d.ts +20 -0
- package/dist/sheet-engine/core/modules/formula-snapshot-eval.d.ts +51 -0
- package/dist/sheet-engine/core/modules/formula-transitive-deps.d.ts +7 -0
- package/dist/sheet-engine/core/modules/formula-worker-bridge.d.ts +17 -0
- package/dist/sheet-engine/core/modules/formula-worker-types.d.ts +24 -0
- package/dist/sheet-engine/core/modules/formula.d.ts +53 -1
- package/dist/sheet-engine/core/modules/index.d.ts +5 -2
- package/dist/sheet-engine/core/modules/namedRanges.d.ts +53 -0
- package/dist/sheet-engine/core/modules/sheet-metadata-hooks.d.ts +4 -0
- package/dist/sheet-engine/core/modules/sheet.d.ts +17 -1
- package/dist/sheet-engine/core/paste/paste-border-utils.d.ts +23 -0
- package/dist/sheet-engine/core/settings.d.ts +3 -1
- package/dist/sheet-engine/core/theme.d.ts +67 -0
- package/dist/sheet-engine/core/types.d.ts +20 -0
- package/dist/sheet-engine/core/utils/border-config-utils.d.ts +16 -0
- package/dist/sheet-engine/core/utils/cell-persist-utils.d.ts +10 -0
- package/dist/sheet-engine/core/utils/range-format.d.ts +71 -0
- package/dist/sheet-engine/core/utils/ydoc-celldata-changes.d.ts +40 -0
- package/dist/sheet-engine/react/components/NamedRanges/index.d.ts +4 -0
- package/dist/sheet-engine/react/components/SheetOverlay/Icon.d.ts +5 -4
- package/dist/sheet-engine/react/components/SheetOverlay/LucideIcon.d.ts +4 -4
- package/dist/sheet-engine/react/components/SidebarPanelPortals/index.d.ts +17 -0
- package/dist/sheet-engine/react/components/Workbook/api.d.ts +8 -1
- package/dist/sheet-engine/react/components/Workbook/index.d.ts +11 -1
- package/dist/sheet-engine/react/components/index.d.ts +1 -0
- package/dist/sheet-engine/react/utils/datepickerStyles.d.ts +1 -1
- package/dist/style.css +1 -1
- package/dist/use-xlsx-import-impl-DzthrhwA.js +1595 -0
- package/dist/xlsx-defined-names-D2KoICbm.js +117 -0
- package/dist/xlsx-export-impl-b2z4De4f.js +818 -0
- package/package.json +6 -4
- package/dist/executeStringFunction-BkmJj04p.js +0 -27295
- package/dist/index-Drl8OuI3.js +0 -52659
- package/dist/sheet-engine/react/components/Toolbar/conditionalFormatPortal.d.ts +0 -7
- package/dist/sheet-engine/react/components/Toolbar/dataVerificationPortal.d.ts +0 -6
- package/dist/use-xlsx-import-impl-DC_BfAcT.js +0 -1527
- package/dist/xlsx-export-impl-DP_eK3zS.js +0 -3126
|
@@ -0,0 +1,488 @@
|
|
|
1
|
+
import { ContractConfig, SupportedChain } from '../../types/smart-contract';
|
|
2
|
+
|
|
3
|
+
export declare const DEFAULT_RPC_URL_MAP: Record<SupportedChain, string[]>;
|
|
4
|
+
export declare const SUPPORTED_VIEM_CHAIN_MAP: {
|
|
5
|
+
Sepolia: {
|
|
6
|
+
blockExplorers: {
|
|
7
|
+
readonly default: {
|
|
8
|
+
readonly name: "Etherscan";
|
|
9
|
+
readonly url: "https://sepolia.etherscan.io";
|
|
10
|
+
readonly apiUrl: "https://api-sepolia.etherscan.io/api";
|
|
11
|
+
};
|
|
12
|
+
};
|
|
13
|
+
blockTime?: number | undefined | undefined;
|
|
14
|
+
contracts: {
|
|
15
|
+
readonly multicall3: {
|
|
16
|
+
readonly address: "0xca11bde05977b3631167028862be2a173976ca11";
|
|
17
|
+
readonly blockCreated: 751532;
|
|
18
|
+
};
|
|
19
|
+
readonly ensUniversalResolver: {
|
|
20
|
+
readonly address: "0xeeeeeeee14d718c2b47d9923deab1335e144eeee";
|
|
21
|
+
readonly blockCreated: 8928790;
|
|
22
|
+
};
|
|
23
|
+
};
|
|
24
|
+
ensTlds?: readonly string[] | undefined;
|
|
25
|
+
id: 11155111;
|
|
26
|
+
name: "Sepolia";
|
|
27
|
+
nativeCurrency: {
|
|
28
|
+
readonly name: "Sepolia Ether";
|
|
29
|
+
readonly symbol: "ETH";
|
|
30
|
+
readonly decimals: 18;
|
|
31
|
+
};
|
|
32
|
+
experimental_preconfirmationTime?: number | undefined | undefined;
|
|
33
|
+
rpcUrls: {
|
|
34
|
+
readonly default: {
|
|
35
|
+
readonly http: readonly ["https://11155111.rpc.thirdweb.com"];
|
|
36
|
+
};
|
|
37
|
+
};
|
|
38
|
+
sourceId?: number | undefined | undefined;
|
|
39
|
+
testnet: true;
|
|
40
|
+
custom?: Record<string, unknown> | undefined;
|
|
41
|
+
extendSchema?: Record<string, unknown> | undefined;
|
|
42
|
+
fees?: import('viem').ChainFees<undefined> | undefined;
|
|
43
|
+
formatters?: undefined;
|
|
44
|
+
prepareTransactionRequest?: ((args: import('viem').PrepareTransactionRequestParameters, options: {
|
|
45
|
+
client: import('viem').Client;
|
|
46
|
+
phase: "beforeFillTransaction" | "beforeFillParameters" | "afterFillParameters";
|
|
47
|
+
}) => Promise<import('viem').PrepareTransactionRequestParameters>) | [fn: ((args: import('viem').PrepareTransactionRequestParameters, options: {
|
|
48
|
+
client: import('viem').Client;
|
|
49
|
+
phase: "beforeFillTransaction" | "beforeFillParameters" | "afterFillParameters";
|
|
50
|
+
}) => Promise<import('viem').PrepareTransactionRequestParameters>) | undefined, options: {
|
|
51
|
+
runAt: readonly ("beforeFillTransaction" | "beforeFillParameters" | "afterFillParameters")[];
|
|
52
|
+
}] | undefined;
|
|
53
|
+
serializers?: import('viem').ChainSerializers<undefined, import('viem').TransactionSerializable> | undefined;
|
|
54
|
+
verifyHash?: ((client: import('viem').Client, parameters: import('viem').VerifyHashActionParameters) => Promise<import('viem').VerifyHashActionReturnType>) | undefined;
|
|
55
|
+
};
|
|
56
|
+
Gnosis: {
|
|
57
|
+
blockExplorers: {
|
|
58
|
+
readonly default: {
|
|
59
|
+
readonly name: "Gnosisscan";
|
|
60
|
+
readonly url: "https://gnosisscan.io";
|
|
61
|
+
readonly apiUrl: "https://api.gnosisscan.io/api";
|
|
62
|
+
};
|
|
63
|
+
};
|
|
64
|
+
blockTime: 5000;
|
|
65
|
+
contracts: {
|
|
66
|
+
readonly multicall3: {
|
|
67
|
+
readonly address: "0xca11bde05977b3631167028862be2a173976ca11";
|
|
68
|
+
readonly blockCreated: 21022491;
|
|
69
|
+
};
|
|
70
|
+
};
|
|
71
|
+
ensTlds?: readonly string[] | undefined;
|
|
72
|
+
id: 100;
|
|
73
|
+
name: "Gnosis";
|
|
74
|
+
nativeCurrency: {
|
|
75
|
+
readonly decimals: 18;
|
|
76
|
+
readonly name: "xDAI";
|
|
77
|
+
readonly symbol: "XDAI";
|
|
78
|
+
};
|
|
79
|
+
experimental_preconfirmationTime?: number | undefined | undefined;
|
|
80
|
+
rpcUrls: {
|
|
81
|
+
readonly default: {
|
|
82
|
+
readonly http: readonly ["https://rpc.gnosischain.com"];
|
|
83
|
+
readonly webSocket: readonly ["wss://rpc.gnosischain.com/wss"];
|
|
84
|
+
};
|
|
85
|
+
};
|
|
86
|
+
sourceId?: number | undefined | undefined;
|
|
87
|
+
testnet?: boolean | undefined | undefined;
|
|
88
|
+
custom?: Record<string, unknown> | undefined;
|
|
89
|
+
extendSchema?: Record<string, unknown> | undefined;
|
|
90
|
+
fees?: import('viem').ChainFees<undefined> | undefined;
|
|
91
|
+
formatters?: undefined;
|
|
92
|
+
prepareTransactionRequest?: ((args: import('viem').PrepareTransactionRequestParameters, options: {
|
|
93
|
+
client: import('viem').Client;
|
|
94
|
+
phase: "beforeFillTransaction" | "beforeFillParameters" | "afterFillParameters";
|
|
95
|
+
}) => Promise<import('viem').PrepareTransactionRequestParameters>) | [fn: ((args: import('viem').PrepareTransactionRequestParameters, options: {
|
|
96
|
+
client: import('viem').Client;
|
|
97
|
+
phase: "beforeFillTransaction" | "beforeFillParameters" | "afterFillParameters";
|
|
98
|
+
}) => Promise<import('viem').PrepareTransactionRequestParameters>) | undefined, options: {
|
|
99
|
+
runAt: readonly ("beforeFillTransaction" | "beforeFillParameters" | "afterFillParameters")[];
|
|
100
|
+
}] | undefined;
|
|
101
|
+
serializers?: import('viem').ChainSerializers<undefined, import('viem').TransactionSerializable> | undefined;
|
|
102
|
+
verifyHash?: ((client: import('viem').Client, parameters: import('viem').VerifyHashActionParameters) => Promise<import('viem').VerifyHashActionReturnType>) | undefined;
|
|
103
|
+
};
|
|
104
|
+
Base: {
|
|
105
|
+
blockExplorers: {
|
|
106
|
+
readonly default: {
|
|
107
|
+
readonly name: "Basescan";
|
|
108
|
+
readonly url: "https://basescan.org";
|
|
109
|
+
readonly apiUrl: "https://api.basescan.org/api";
|
|
110
|
+
};
|
|
111
|
+
};
|
|
112
|
+
blockTime: 2000;
|
|
113
|
+
contracts: {
|
|
114
|
+
readonly disputeGameFactory: {
|
|
115
|
+
readonly 1: {
|
|
116
|
+
readonly address: "0x43edB88C4B80fDD2AdFF2412A7BebF9dF42cB40e";
|
|
117
|
+
};
|
|
118
|
+
};
|
|
119
|
+
readonly l2OutputOracle: {
|
|
120
|
+
readonly 1: {
|
|
121
|
+
readonly address: "0x56315b90c40730925ec5485cf004d835058518A0";
|
|
122
|
+
};
|
|
123
|
+
};
|
|
124
|
+
readonly multicall3: {
|
|
125
|
+
readonly address: "0xca11bde05977b3631167028862be2a173976ca11";
|
|
126
|
+
readonly blockCreated: 5022;
|
|
127
|
+
};
|
|
128
|
+
readonly portal: {
|
|
129
|
+
readonly 1: {
|
|
130
|
+
readonly address: "0x49048044D57e1C92A77f79988d21Fa8fAF74E97e";
|
|
131
|
+
readonly blockCreated: 17482143;
|
|
132
|
+
};
|
|
133
|
+
};
|
|
134
|
+
readonly l1StandardBridge: {
|
|
135
|
+
readonly 1: {
|
|
136
|
+
readonly address: "0x3154Cf16ccdb4C6d922629664174b904d80F2C35";
|
|
137
|
+
readonly blockCreated: 17482143;
|
|
138
|
+
};
|
|
139
|
+
};
|
|
140
|
+
readonly gasPriceOracle: {
|
|
141
|
+
readonly address: "0x420000000000000000000000000000000000000F";
|
|
142
|
+
};
|
|
143
|
+
readonly l1Block: {
|
|
144
|
+
readonly address: "0x4200000000000000000000000000000000000015";
|
|
145
|
+
};
|
|
146
|
+
readonly l2CrossDomainMessenger: {
|
|
147
|
+
readonly address: "0x4200000000000000000000000000000000000007";
|
|
148
|
+
};
|
|
149
|
+
readonly l2Erc721Bridge: {
|
|
150
|
+
readonly address: "0x4200000000000000000000000000000000000014";
|
|
151
|
+
};
|
|
152
|
+
readonly l2StandardBridge: {
|
|
153
|
+
readonly address: "0x4200000000000000000000000000000000000010";
|
|
154
|
+
};
|
|
155
|
+
readonly l2ToL1MessagePasser: {
|
|
156
|
+
readonly address: "0x4200000000000000000000000000000000000016";
|
|
157
|
+
};
|
|
158
|
+
};
|
|
159
|
+
ensTlds?: readonly string[] | undefined;
|
|
160
|
+
id: 8453;
|
|
161
|
+
name: "Base";
|
|
162
|
+
nativeCurrency: {
|
|
163
|
+
readonly name: "Ether";
|
|
164
|
+
readonly symbol: "ETH";
|
|
165
|
+
readonly decimals: 18;
|
|
166
|
+
};
|
|
167
|
+
experimental_preconfirmationTime?: number | undefined | undefined;
|
|
168
|
+
rpcUrls: {
|
|
169
|
+
readonly default: {
|
|
170
|
+
readonly http: readonly ["https://mainnet.base.org"];
|
|
171
|
+
};
|
|
172
|
+
};
|
|
173
|
+
sourceId: 1;
|
|
174
|
+
testnet?: boolean | undefined | undefined;
|
|
175
|
+
custom?: Record<string, unknown> | undefined;
|
|
176
|
+
extendSchema?: Record<string, unknown> | undefined;
|
|
177
|
+
fees?: import('viem').ChainFees<undefined> | undefined;
|
|
178
|
+
formatters: {
|
|
179
|
+
readonly block: {
|
|
180
|
+
exclude: [] | undefined;
|
|
181
|
+
format: (args: import('viem/chains').OpStackRpcBlock, action?: string | undefined) => {
|
|
182
|
+
baseFeePerGas: bigint | null;
|
|
183
|
+
blobGasUsed: bigint;
|
|
184
|
+
difficulty: bigint;
|
|
185
|
+
excessBlobGas: bigint;
|
|
186
|
+
extraData: import('viem').Hex;
|
|
187
|
+
gasLimit: bigint;
|
|
188
|
+
gasUsed: bigint;
|
|
189
|
+
hash: `0x${string}` | null;
|
|
190
|
+
logsBloom: `0x${string}` | null;
|
|
191
|
+
miner: import('abitype').Address;
|
|
192
|
+
mixHash: import('viem').Hash;
|
|
193
|
+
nonce: `0x${string}` | null;
|
|
194
|
+
number: bigint | null;
|
|
195
|
+
parentBeaconBlockRoot?: `0x${string}` | undefined;
|
|
196
|
+
parentHash: import('viem').Hash;
|
|
197
|
+
receiptsRoot: import('viem').Hex;
|
|
198
|
+
sealFields: import('viem').Hex[];
|
|
199
|
+
sha3Uncles: import('viem').Hash;
|
|
200
|
+
size: bigint;
|
|
201
|
+
stateRoot: import('viem').Hash;
|
|
202
|
+
timestamp: bigint;
|
|
203
|
+
totalDifficulty: bigint | null;
|
|
204
|
+
transactions: `0x${string}`[] | import('viem/chains').OpStackTransaction<boolean>[];
|
|
205
|
+
transactionsRoot: import('viem').Hash;
|
|
206
|
+
uncles: import('viem').Hash[];
|
|
207
|
+
withdrawals?: import('viem').Withdrawal[] | undefined | undefined;
|
|
208
|
+
withdrawalsRoot?: `0x${string}` | undefined;
|
|
209
|
+
} & {};
|
|
210
|
+
type: "block";
|
|
211
|
+
};
|
|
212
|
+
readonly transaction: {
|
|
213
|
+
exclude: [] | undefined;
|
|
214
|
+
format: (args: import('viem/chains').OpStackRpcTransaction, action?: string | undefined) => ({
|
|
215
|
+
blockHash: `0x${string}` | null;
|
|
216
|
+
blockNumber: bigint | null;
|
|
217
|
+
blockTimestamp?: bigint | undefined;
|
|
218
|
+
from: import('abitype').Address;
|
|
219
|
+
gas: bigint;
|
|
220
|
+
hash: import('viem').Hash;
|
|
221
|
+
input: import('viem').Hex;
|
|
222
|
+
nonce: number;
|
|
223
|
+
r: import('viem').Hex;
|
|
224
|
+
s: import('viem').Hex;
|
|
225
|
+
to: import('abitype').Address | null;
|
|
226
|
+
transactionIndex: number | null;
|
|
227
|
+
typeHex: import('viem').Hex | null;
|
|
228
|
+
v: bigint;
|
|
229
|
+
value: bigint;
|
|
230
|
+
yParity: number;
|
|
231
|
+
gasPrice?: undefined | undefined;
|
|
232
|
+
maxFeePerBlobGas?: undefined | undefined;
|
|
233
|
+
maxFeePerGas: bigint;
|
|
234
|
+
maxPriorityFeePerGas: bigint;
|
|
235
|
+
isSystemTx?: boolean;
|
|
236
|
+
mint?: bigint | undefined | undefined;
|
|
237
|
+
sourceHash: import('viem').Hex;
|
|
238
|
+
type: "deposit";
|
|
239
|
+
} | {
|
|
240
|
+
r: import('viem').Hex;
|
|
241
|
+
s: import('viem').Hex;
|
|
242
|
+
v: bigint;
|
|
243
|
+
to: import('abitype').Address | null;
|
|
244
|
+
from: import('abitype').Address;
|
|
245
|
+
gas: bigint;
|
|
246
|
+
nonce: number;
|
|
247
|
+
value: bigint;
|
|
248
|
+
blockHash: `0x${string}` | null;
|
|
249
|
+
blockNumber: bigint | null;
|
|
250
|
+
blockTimestamp?: bigint | undefined;
|
|
251
|
+
hash: import('viem').Hash;
|
|
252
|
+
input: import('viem').Hex;
|
|
253
|
+
transactionIndex: number | null;
|
|
254
|
+
typeHex: import('viem').Hex | null;
|
|
255
|
+
accessList?: undefined | undefined;
|
|
256
|
+
authorizationList?: undefined | undefined;
|
|
257
|
+
blobVersionedHashes?: undefined | undefined;
|
|
258
|
+
chainId?: number | undefined;
|
|
259
|
+
yParity?: undefined | undefined;
|
|
260
|
+
type: "legacy";
|
|
261
|
+
gasPrice: bigint;
|
|
262
|
+
maxFeePerBlobGas?: undefined | undefined;
|
|
263
|
+
maxFeePerGas?: undefined | undefined;
|
|
264
|
+
maxPriorityFeePerGas?: undefined | undefined;
|
|
265
|
+
isSystemTx?: undefined | undefined;
|
|
266
|
+
mint?: undefined | undefined;
|
|
267
|
+
sourceHash?: undefined | undefined;
|
|
268
|
+
} | {
|
|
269
|
+
blockHash: `0x${string}` | null;
|
|
270
|
+
blockNumber: bigint | null;
|
|
271
|
+
blockTimestamp?: bigint | undefined;
|
|
272
|
+
from: import('abitype').Address;
|
|
273
|
+
gas: bigint;
|
|
274
|
+
hash: import('viem').Hash;
|
|
275
|
+
input: import('viem').Hex;
|
|
276
|
+
nonce: number;
|
|
277
|
+
r: import('viem').Hex;
|
|
278
|
+
s: import('viem').Hex;
|
|
279
|
+
to: import('abitype').Address | null;
|
|
280
|
+
transactionIndex: number | null;
|
|
281
|
+
typeHex: import('viem').Hex | null;
|
|
282
|
+
v: bigint;
|
|
283
|
+
value: bigint;
|
|
284
|
+
yParity: number;
|
|
285
|
+
accessList: import('viem').AccessList;
|
|
286
|
+
authorizationList?: undefined | undefined;
|
|
287
|
+
blobVersionedHashes?: undefined | undefined;
|
|
288
|
+
chainId: number;
|
|
289
|
+
type: "eip2930";
|
|
290
|
+
gasPrice: bigint;
|
|
291
|
+
maxFeePerBlobGas?: undefined | undefined;
|
|
292
|
+
maxFeePerGas?: undefined | undefined;
|
|
293
|
+
maxPriorityFeePerGas?: undefined | undefined;
|
|
294
|
+
isSystemTx?: undefined | undefined;
|
|
295
|
+
mint?: undefined | undefined;
|
|
296
|
+
sourceHash?: undefined | undefined;
|
|
297
|
+
} | {
|
|
298
|
+
blockHash: `0x${string}` | null;
|
|
299
|
+
blockNumber: bigint | null;
|
|
300
|
+
blockTimestamp?: bigint | undefined;
|
|
301
|
+
from: import('abitype').Address;
|
|
302
|
+
gas: bigint;
|
|
303
|
+
hash: import('viem').Hash;
|
|
304
|
+
input: import('viem').Hex;
|
|
305
|
+
nonce: number;
|
|
306
|
+
r: import('viem').Hex;
|
|
307
|
+
s: import('viem').Hex;
|
|
308
|
+
to: import('abitype').Address | null;
|
|
309
|
+
transactionIndex: number | null;
|
|
310
|
+
typeHex: import('viem').Hex | null;
|
|
311
|
+
v: bigint;
|
|
312
|
+
value: bigint;
|
|
313
|
+
yParity: number;
|
|
314
|
+
accessList: import('viem').AccessList;
|
|
315
|
+
authorizationList?: undefined | undefined;
|
|
316
|
+
blobVersionedHashes?: undefined | undefined;
|
|
317
|
+
chainId: number;
|
|
318
|
+
type: "eip1559";
|
|
319
|
+
gasPrice?: undefined | undefined;
|
|
320
|
+
maxFeePerBlobGas?: undefined | undefined;
|
|
321
|
+
maxFeePerGas: bigint;
|
|
322
|
+
maxPriorityFeePerGas: bigint;
|
|
323
|
+
isSystemTx?: undefined | undefined;
|
|
324
|
+
mint?: undefined | undefined;
|
|
325
|
+
sourceHash?: undefined | undefined;
|
|
326
|
+
} | {
|
|
327
|
+
blockHash: `0x${string}` | null;
|
|
328
|
+
blockNumber: bigint | null;
|
|
329
|
+
blockTimestamp?: bigint | undefined;
|
|
330
|
+
from: import('abitype').Address;
|
|
331
|
+
gas: bigint;
|
|
332
|
+
hash: import('viem').Hash;
|
|
333
|
+
input: import('viem').Hex;
|
|
334
|
+
nonce: number;
|
|
335
|
+
r: import('viem').Hex;
|
|
336
|
+
s: import('viem').Hex;
|
|
337
|
+
to: import('abitype').Address | null;
|
|
338
|
+
transactionIndex: number | null;
|
|
339
|
+
typeHex: import('viem').Hex | null;
|
|
340
|
+
v: bigint;
|
|
341
|
+
value: bigint;
|
|
342
|
+
yParity: number;
|
|
343
|
+
accessList: import('viem').AccessList;
|
|
344
|
+
authorizationList?: undefined | undefined;
|
|
345
|
+
blobVersionedHashes: readonly import('viem').Hex[];
|
|
346
|
+
chainId: number;
|
|
347
|
+
type: "eip4844";
|
|
348
|
+
gasPrice?: undefined | undefined;
|
|
349
|
+
maxFeePerBlobGas: bigint;
|
|
350
|
+
maxFeePerGas: bigint;
|
|
351
|
+
maxPriorityFeePerGas: bigint;
|
|
352
|
+
isSystemTx?: undefined | undefined;
|
|
353
|
+
mint?: undefined | undefined;
|
|
354
|
+
sourceHash?: undefined | undefined;
|
|
355
|
+
} | {
|
|
356
|
+
blockHash: `0x${string}` | null;
|
|
357
|
+
blockNumber: bigint | null;
|
|
358
|
+
blockTimestamp?: bigint | undefined;
|
|
359
|
+
from: import('abitype').Address;
|
|
360
|
+
gas: bigint;
|
|
361
|
+
hash: import('viem').Hash;
|
|
362
|
+
input: import('viem').Hex;
|
|
363
|
+
nonce: number;
|
|
364
|
+
r: import('viem').Hex;
|
|
365
|
+
s: import('viem').Hex;
|
|
366
|
+
to: import('abitype').Address | null;
|
|
367
|
+
transactionIndex: number | null;
|
|
368
|
+
typeHex: import('viem').Hex | null;
|
|
369
|
+
v: bigint;
|
|
370
|
+
value: bigint;
|
|
371
|
+
yParity: number;
|
|
372
|
+
accessList: import('viem').AccessList;
|
|
373
|
+
authorizationList: import('viem').SignedAuthorizationList;
|
|
374
|
+
blobVersionedHashes?: undefined | undefined;
|
|
375
|
+
chainId: number;
|
|
376
|
+
type: "eip7702";
|
|
377
|
+
gasPrice?: undefined | undefined;
|
|
378
|
+
maxFeePerBlobGas?: undefined | undefined;
|
|
379
|
+
maxFeePerGas: bigint;
|
|
380
|
+
maxPriorityFeePerGas: bigint;
|
|
381
|
+
isSystemTx?: undefined | undefined;
|
|
382
|
+
mint?: undefined | undefined;
|
|
383
|
+
sourceHash?: undefined | undefined;
|
|
384
|
+
}) & {};
|
|
385
|
+
type: "transaction";
|
|
386
|
+
};
|
|
387
|
+
readonly transactionReceipt: {
|
|
388
|
+
exclude: [] | undefined;
|
|
389
|
+
format: (args: import('viem/chains').OpStackRpcTransactionReceipt, action?: string | undefined) => {
|
|
390
|
+
blobGasPrice?: bigint | undefined;
|
|
391
|
+
blobGasUsed?: bigint | undefined;
|
|
392
|
+
blockHash: import('viem').Hash;
|
|
393
|
+
blockNumber: bigint;
|
|
394
|
+
blockTimestamp?: bigint | undefined;
|
|
395
|
+
contractAddress: import('abitype').Address | null | undefined;
|
|
396
|
+
cumulativeGasUsed: bigint;
|
|
397
|
+
effectiveGasPrice: bigint;
|
|
398
|
+
from: import('abitype').Address;
|
|
399
|
+
gasUsed: bigint;
|
|
400
|
+
logs: import('viem').Log<bigint, number, false>[];
|
|
401
|
+
logsBloom: import('viem').Hex;
|
|
402
|
+
root?: `0x${string}` | undefined;
|
|
403
|
+
status: "success" | "reverted";
|
|
404
|
+
to: import('abitype').Address | null;
|
|
405
|
+
transactionHash: import('viem').Hash;
|
|
406
|
+
transactionIndex: number;
|
|
407
|
+
type: import('viem').TransactionType;
|
|
408
|
+
l1GasPrice: bigint | null;
|
|
409
|
+
l1GasUsed: bigint | null;
|
|
410
|
+
l1Fee: bigint | null;
|
|
411
|
+
l1FeeScalar: number | null;
|
|
412
|
+
} & {};
|
|
413
|
+
type: "transactionReceipt";
|
|
414
|
+
};
|
|
415
|
+
};
|
|
416
|
+
prepareTransactionRequest?: ((args: import('viem').PrepareTransactionRequestParameters, options: {
|
|
417
|
+
client: import('viem').Client;
|
|
418
|
+
phase: "beforeFillTransaction" | "beforeFillParameters" | "afterFillParameters";
|
|
419
|
+
}) => Promise<import('viem').PrepareTransactionRequestParameters>) | [fn: ((args: import('viem').PrepareTransactionRequestParameters, options: {
|
|
420
|
+
client: import('viem').Client;
|
|
421
|
+
phase: "beforeFillTransaction" | "beforeFillParameters" | "afterFillParameters";
|
|
422
|
+
}) => Promise<import('viem').PrepareTransactionRequestParameters>) | undefined, options: {
|
|
423
|
+
runAt: readonly ("beforeFillTransaction" | "beforeFillParameters" | "afterFillParameters")[];
|
|
424
|
+
}] | undefined;
|
|
425
|
+
serializers: {
|
|
426
|
+
readonly transaction: typeof import('viem/chains').serializeTransactionOpStack;
|
|
427
|
+
};
|
|
428
|
+
verifyHash?: ((client: import('viem').Client, parameters: import('viem').VerifyHashActionParameters) => Promise<import('viem').VerifyHashActionReturnType>) | undefined;
|
|
429
|
+
};
|
|
430
|
+
Ethereum: {
|
|
431
|
+
blockExplorers: {
|
|
432
|
+
readonly default: {
|
|
433
|
+
readonly name: "Etherscan";
|
|
434
|
+
readonly url: "https://etherscan.io";
|
|
435
|
+
readonly apiUrl: "https://api.etherscan.io/api";
|
|
436
|
+
};
|
|
437
|
+
};
|
|
438
|
+
blockTime: 12000;
|
|
439
|
+
contracts: {
|
|
440
|
+
readonly ensUniversalResolver: {
|
|
441
|
+
readonly address: "0xeeeeeeee14d718c2b47d9923deab1335e144eeee";
|
|
442
|
+
readonly blockCreated: 23085558;
|
|
443
|
+
};
|
|
444
|
+
readonly multicall3: {
|
|
445
|
+
readonly address: "0xca11bde05977b3631167028862be2a173976ca11";
|
|
446
|
+
readonly blockCreated: 14353601;
|
|
447
|
+
};
|
|
448
|
+
};
|
|
449
|
+
ensTlds?: readonly string[] | undefined;
|
|
450
|
+
id: 1;
|
|
451
|
+
name: "Ethereum";
|
|
452
|
+
nativeCurrency: {
|
|
453
|
+
readonly name: "Ether";
|
|
454
|
+
readonly symbol: "ETH";
|
|
455
|
+
readonly decimals: 18;
|
|
456
|
+
};
|
|
457
|
+
experimental_preconfirmationTime?: number | undefined | undefined;
|
|
458
|
+
rpcUrls: {
|
|
459
|
+
readonly default: {
|
|
460
|
+
readonly http: readonly ["https://eth.merkle.io"];
|
|
461
|
+
};
|
|
462
|
+
};
|
|
463
|
+
sourceId?: number | undefined | undefined;
|
|
464
|
+
testnet?: boolean | undefined | undefined;
|
|
465
|
+
custom?: Record<string, unknown> | undefined;
|
|
466
|
+
extendSchema?: Record<string, unknown> | undefined;
|
|
467
|
+
fees?: import('viem').ChainFees<undefined> | undefined;
|
|
468
|
+
formatters?: undefined;
|
|
469
|
+
prepareTransactionRequest?: ((args: import('viem').PrepareTransactionRequestParameters, options: {
|
|
470
|
+
client: import('viem').Client;
|
|
471
|
+
phase: "beforeFillTransaction" | "beforeFillParameters" | "afterFillParameters";
|
|
472
|
+
}) => Promise<import('viem').PrepareTransactionRequestParameters>) | [fn: ((args: import('viem').PrepareTransactionRequestParameters, options: {
|
|
473
|
+
client: import('viem').Client;
|
|
474
|
+
phase: "beforeFillTransaction" | "beforeFillParameters" | "afterFillParameters";
|
|
475
|
+
}) => Promise<import('viem').PrepareTransactionRequestParameters>) | undefined, options: {
|
|
476
|
+
runAt: readonly ("beforeFillTransaction" | "beforeFillParameters" | "afterFillParameters")[];
|
|
477
|
+
}] | undefined;
|
|
478
|
+
serializers?: import('viem').ChainSerializers<undefined, import('viem').TransactionSerializable> | undefined;
|
|
479
|
+
verifyHash?: ((client: import('viem').Client, parameters: import('viem').VerifyHashActionParameters) => Promise<import('viem').VerifyHashActionReturnType>) | undefined;
|
|
480
|
+
};
|
|
481
|
+
};
|
|
482
|
+
export declare const SUPPORTED_CHAIN_ID_MAP: Record<number, SupportedChain>;
|
|
483
|
+
export declare const CHAIN_NAME_MAP: Record<string, SupportedChain>;
|
|
484
|
+
export declare const POPULAR_CONTRACTS_MAP: Record<string, ContractConfig>;
|
|
485
|
+
export declare const UNIVERSAL_ENS_RESOLVER_ADDRESS = "0xce01f8eee7E479C928F8919abD53E553a36CeF67";
|
|
486
|
+
export declare const RESOLVER_FUNCTION_NAME = "findResolver";
|
|
487
|
+
export declare const SMART_CONTRACT_PANEL_ID = "smart-contract-list-view";
|
|
488
|
+
export declare const POPULAR_CONTRACT_NAMES: Set<string>;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { Hex } from 'viem';
|
|
2
|
+
|
|
3
|
+
export declare class ContractNotFound extends Error {
|
|
4
|
+
constructor(contractName: string);
|
|
5
|
+
}
|
|
6
|
+
export declare class InvalidFunctionName extends Error {
|
|
7
|
+
constructor(functionName: string);
|
|
8
|
+
}
|
|
9
|
+
export declare class ReadOnlyError extends Error {
|
|
10
|
+
constructor(functionName: string);
|
|
11
|
+
}
|
|
12
|
+
export declare class InvalidParams extends Error {
|
|
13
|
+
constructor(message: string);
|
|
14
|
+
}
|
|
15
|
+
export declare class UnsupportedChainError extends Error {
|
|
16
|
+
constructor(chainId: number | Hex | string);
|
|
17
|
+
}
|
|
18
|
+
export declare class ContractAbiFetchError extends Error {
|
|
19
|
+
constructor(contractAddress: string, chainId: number | Hex);
|
|
20
|
+
}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
export declare function sanitizeValue(value: unknown): unknown;
|
|
2
|
+
export declare function flattenArray(arr: unknown[]): unknown[];
|
|
3
|
+
export declare function flattenObject(obj: Record<string, unknown>): Record<string, unknown>;
|
|
4
|
+
export declare function isPlainObject(val: unknown): val is Record<string, unknown>;
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { Abi, AbiParameter, Chain, Hex } from 'viem';
|
|
2
|
+
import { CallerParams, ContractConfig, ContractRegistry, FetchAbiParams, ParsedFunction, SupportedChain } from '../../types/smart-contract';
|
|
3
|
+
|
|
4
|
+
export type SmartContractRuntimeDeps = {
|
|
5
|
+
resolveAbi?: (abiHash: string) => Promise<Abi>;
|
|
6
|
+
rpcConfig?: Partial<Record<SupportedChain, string>>;
|
|
7
|
+
abiCache: Record<string, Abi>;
|
|
8
|
+
};
|
|
9
|
+
export declare const getContractConfig: (contractName: string, contractRegistry: ContractRegistry) => ContractConfig;
|
|
10
|
+
export declare const fetchAbi: (params: FetchAbiParams, deps: SmartContractRuntimeDeps) => Promise<Abi>;
|
|
11
|
+
export declare const validateParams: (functionInput: readonly AbiParameter[], args: unknown[]) => boolean;
|
|
12
|
+
export declare const getChainFromChainId: (chainId: number | Hex | string) => Chain;
|
|
13
|
+
export declare const fetchVerifiedAbi: (contractAddress: Hex, chain: Chain, exactFields?: string[]) => Promise<Abi>;
|
|
14
|
+
export declare function parseAbiViewFunctions(abi: Abi): ParsedFunction[];
|
|
15
|
+
export declare const getCallerParamsByAddress: (callSignature: unknown[], deps: SmartContractRuntimeDeps) => Promise<CallerParams>;
|
|
16
|
+
export declare const getCallerParamsByName: (callSignature: unknown[], registry: ContractRegistry, deps: SmartContractRuntimeDeps) => Promise<CallerParams>;
|
|
17
|
+
export declare const parseCallSignature: (callSignature: unknown[], registry: ContractRegistry, deps: SmartContractRuntimeDeps) => Promise<CallerParams>;
|
|
18
|
+
export declare const executeSmartContractCall: (params: CallerParams, deps: SmartContractRuntimeDeps) => Promise<{
|
|
19
|
+
response: {
|
|
20
|
+
'Function name': string;
|
|
21
|
+
Argument: string;
|
|
22
|
+
stateMutability: import('abitype').AbiStateMutability;
|
|
23
|
+
}[];
|
|
24
|
+
staticInstructions: string[];
|
|
25
|
+
outputType?: undefined;
|
|
26
|
+
} | {
|
|
27
|
+
response: unknown;
|
|
28
|
+
outputType: readonly AbiParameter[];
|
|
29
|
+
staticInstructions?: undefined;
|
|
30
|
+
}>;
|
|
31
|
+
export declare const validateAbi: (abi: unknown) => void;
|
|
32
|
+
export declare const normalizeGridArray: (input: unknown[], functionName: string, abi: Abi) => any[];
|
|
33
|
+
export declare const fetchContractAbi: (contract: ContractConfig, deps: SmartContractRuntimeDeps) => Promise<Abi>;
|
|
34
|
+
export declare const isPopularContract: (name: string, popularNames: Set<string>) => boolean;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export type SpreadsheetImportFileType = 'xlsx' | 'csv';
|
|
2
|
+
export type ImportSpreadsheetFileOptions = {
|
|
3
|
+
type: SpreadsheetImportFileType;
|
|
4
|
+
separator?: 'auto' | 'tab' | 'comma' | string;
|
|
5
|
+
dsheetId: string;
|
|
6
|
+
};
|
|
7
|
+
export type ImportSpreadsheetFileResult = {
|
|
8
|
+
encodedContent: string;
|
|
9
|
+
title?: string;
|
|
10
|
+
warnings?: string[];
|
|
11
|
+
};
|
|
12
|
+
export declare function importSpreadsheetFile(file: File, options: ImportSpreadsheetFileOptions): Promise<ImportSpreadsheetFileResult>;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { Sheet } from '../../sheet-engine/react';
|
|
2
|
-
import * as Y from
|
|
2
|
+
import * as Y from "yjs";
|
|
3
3
|
export type SheetChangePath = {
|
|
4
4
|
sheetId: string;
|
|
5
5
|
path: string[];
|
|
6
6
|
key?: string;
|
|
7
7
|
value: any;
|
|
8
|
-
type?:
|
|
8
|
+
type?: "update" | "delete";
|
|
9
9
|
};
|
|
10
10
|
export declare const updateYdocSheetData: (ydoc: Y.Doc | null, dsheetId: string, changes: SheetChangePath[], handleContentPortal: any) => void;
|
|
11
11
|
export declare function ySheetArrayToPlain(sheetArray: Y.Array<Y.Map>): Sheet[];
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { DefinedName } from '../../sheet-engine/core/types';
|
|
2
|
+
|
|
3
|
+
export type ExcelDefinedNameEntry = {
|
|
4
|
+
name: string;
|
|
5
|
+
ranges: string[];
|
|
6
|
+
localSheetId?: number;
|
|
7
|
+
};
|
|
8
|
+
export declare function isExcelSystemDefinedName(name: string): boolean;
|
|
9
|
+
/** Build Excel loc string: `Sheet1!$A$1:$C$2` (or single cell). */
|
|
10
|
+
export declare function encodeDefinedNameExcelRef(sheetName: string, range: DefinedName['range']): string;
|
|
11
|
+
/**
|
|
12
|
+
* Parse `Sheet1!$A$1:$B$2` / `'My Sheet'!$A$1` into sheet name + 0-based range.
|
|
13
|
+
*/
|
|
14
|
+
export declare function parseExcelDefinedNameRef(ref: string): {
|
|
15
|
+
sheetName: string;
|
|
16
|
+
range: {
|
|
17
|
+
row: [number, number];
|
|
18
|
+
column: [number, number];
|
|
19
|
+
};
|
|
20
|
+
} | null;
|
|
21
|
+
/**
|
|
22
|
+
* Convert Excel defined-name entries into our DefinedName list.
|
|
23
|
+
* `sheets` must already have stable ids and names (Excel order).
|
|
24
|
+
*/
|
|
25
|
+
export declare function excelEntriesToDefinedNames(entries: ExcelDefinedNameEntry[], sheets: Array<{
|
|
26
|
+
id?: string;
|
|
27
|
+
name?: string;
|
|
28
|
+
}>): DefinedName[];
|
|
29
|
+
/** Write defined names onto an ExcelJS workbook (Pass 2). */
|
|
30
|
+
export declare function applyDefinedNamesToExcelWorkbook(excelWorkbook: {
|
|
31
|
+
definedNames: {
|
|
32
|
+
add: (loc: string, name: string) => void;
|
|
33
|
+
};
|
|
34
|
+
}, definedNames: DefinedName[] | undefined, sheets: Array<{
|
|
35
|
+
id?: string;
|
|
36
|
+
name?: string;
|
|
37
|
+
}>): void;
|
|
38
|
+
/**
|
|
39
|
+
* Parse `<definedNames>` from xl/workbook.xml (keeps localSheetId).
|
|
40
|
+
*/
|
|
41
|
+
export declare function parseDefinedNamesFromXlsxBuffer(arrayBuffer: ArrayBuffer): Promise<ExcelDefinedNameEntry[]>;
|