@imtbl/x-client 2.0.0-alpha.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/LICENSE.md +176 -0
- package/README.md +53 -0
- package/dist/browser/index.js +2 -0
- package/dist/node/index.cjs +2 -0
- package/dist/node/index.js +2 -0
- package/dist/types/IMXClient.d.ts +334 -0
- package/dist/types/config/config.test.d.ts +1 -0
- package/dist/types/config/index.d.ts +77 -0
- package/dist/types/contracts/@openzeppelin/contracts/index.d.ts +4 -0
- package/dist/types/contracts/@openzeppelin/contracts/token/ERC20/IERC20.d.ts +129 -0
- package/dist/types/contracts/@openzeppelin/contracts/token/ERC20/index.d.ts +1 -0
- package/dist/types/contracts/@openzeppelin/contracts/token/ERC721/IERC721.d.ts +199 -0
- package/dist/types/contracts/@openzeppelin/contracts/token/ERC721/index.d.ts +1 -0
- package/dist/types/contracts/@openzeppelin/contracts/token/index.d.ts +4 -0
- package/dist/types/contracts/@openzeppelin/contracts/utils/index.d.ts +2 -0
- package/dist/types/contracts/@openzeppelin/contracts/utils/introspection/IERC165.d.ts +29 -0
- package/dist/types/contracts/@openzeppelin/contracts/utils/introspection/index.d.ts +1 -0
- package/dist/types/contracts/@openzeppelin/index.d.ts +2 -0
- package/dist/types/contracts/common.d.ts +50 -0
- package/dist/types/contracts/contracts/index.d.ts +4 -0
- package/dist/types/contracts/contracts/v3/Core.d.ts +1088 -0
- package/dist/types/contracts/contracts/v3/Registration.d.ts +169 -0
- package/dist/types/contracts/contracts/v3/index.d.ts +2 -0
- package/dist/types/contracts/contracts/v4/CoreV4.d.ts +1650 -0
- package/dist/types/contracts/contracts/v4/RegistrationV4.d.ts +111 -0
- package/dist/types/contracts/contracts/v4/index.d.ts +2 -0
- package/dist/types/contracts/factories/@openzeppelin/contracts/index.d.ts +2 -0
- package/dist/types/contracts/factories/@openzeppelin/contracts/token/ERC20/IERC20__factory.d.ts +147 -0
- package/dist/types/contracts/factories/@openzeppelin/contracts/token/ERC20/index.d.ts +1 -0
- package/dist/types/contracts/factories/@openzeppelin/contracts/token/ERC721/IERC721__factory.d.ts +227 -0
- package/dist/types/contracts/factories/@openzeppelin/contracts/token/ERC721/index.d.ts +1 -0
- package/dist/types/contracts/factories/@openzeppelin/contracts/token/index.d.ts +2 -0
- package/dist/types/contracts/factories/@openzeppelin/contracts/utils/index.d.ts +1 -0
- package/dist/types/contracts/factories/@openzeppelin/contracts/utils/introspection/IERC165__factory.d.ts +21 -0
- package/dist/types/contracts/factories/@openzeppelin/contracts/utils/introspection/index.d.ts +1 -0
- package/dist/types/contracts/factories/@openzeppelin/index.d.ts +1 -0
- package/dist/types/contracts/factories/contracts/index.d.ts +2 -0
- package/dist/types/contracts/factories/contracts/v3/Core__factory.d.ts +1254 -0
- package/dist/types/contracts/factories/contracts/v3/Registration__factory.d.ts +214 -0
- package/dist/types/contracts/factories/contracts/v3/index.d.ts +2 -0
- package/dist/types/contracts/factories/contracts/v4/CoreV4__factory.d.ts +1890 -0
- package/dist/types/contracts/factories/contracts/v4/RegistrationV4__factory.d.ts +168 -0
- package/dist/types/contracts/factories/contracts/v4/index.d.ts +2 -0
- package/dist/types/contracts/factories/index.d.ts +2 -0
- package/dist/types/contracts/index.d.ts +19 -0
- package/dist/types/exportContracts.d.ts +2 -0
- package/dist/types/exportUtils.d.ts +1 -0
- package/dist/types/imx.test.d.ts +1 -0
- package/dist/types/index.d.ts +11 -0
- package/dist/types/types/api.d.ts +223 -0
- package/dist/types/types/errors.d.ts +9 -0
- package/dist/types/types/index.d.ts +6 -0
- package/dist/types/types/requests.d.ts +53 -0
- package/dist/types/types/signers.d.ts +37 -0
- package/dist/types/types/tokens.d.ts +51 -0
- package/dist/types/types/transfers.d.ts +17 -0
- package/dist/types/utils/convertToSignableToken.d.ts +8 -0
- package/dist/types/utils/crypto/crypto.d.ts +16 -0
- package/dist/types/utils/crypto/crypto.test.d.ts +1 -0
- package/dist/types/utils/crypto/index.d.ts +1 -0
- package/dist/types/utils/formatError.d.ts +7 -0
- package/dist/types/utils/formatError.test.d.ts +1 -0
- package/dist/types/utils/index.d.ts +5 -0
- package/dist/types/utils/stark/errors.d.ts +3 -0
- package/dist/types/utils/stark/getStarkPublicKeyFromImx.d.ts +12 -0
- package/dist/types/utils/stark/legacy/crypto/constants.d.ts +27 -0
- package/dist/types/utils/stark/legacy/crypto/crypto.d.ts +14 -0
- package/dist/types/utils/stark/legacy/crypto/index.d.ts +2 -0
- package/dist/types/utils/stark/legacy/crypto/points.d.ts +1 -0
- package/dist/types/utils/stark/legacy/crypto/types.d.ts +18 -0
- package/dist/types/utils/stark/starkCurve.d.ts +18 -0
- package/dist/types/utils/stark/starkCurve.test.d.ts +1 -0
- package/dist/types/utils/stark/starkSigner.d.ts +17 -0
- package/dist/types/utils/stark/starkSigner.test.d.ts +1 -0
- package/dist/types/workflows/errors.d.ts +3 -0
- package/dist/types/workflows/exchangeTransfers.d.ts +8 -0
- package/dist/types/workflows/index.d.ts +1 -0
- package/dist/types/workflows/minting.d.ts +4 -0
- package/dist/types/workflows/orders.d.ts +13 -0
- package/dist/types/workflows/trades.d.ts +8 -0
- package/dist/types/workflows/workflows.d.ts +29 -0
- package/package.json +70 -0
|
@@ -0,0 +1,169 @@
|
|
|
1
|
+
import type { BaseContract, BigNumberish, BytesLike, FunctionFragment, Result, Interface, AddressLike, ContractRunner, ContractMethod, Listener } from "ethers";
|
|
2
|
+
import type { TypedContractEvent, TypedDeferredTopicFilter, TypedEventLog, TypedListener, TypedContractMethod } from "../../common";
|
|
3
|
+
export interface RegistrationInterface extends Interface {
|
|
4
|
+
getFunction(nameOrSignature: "imx" | "isRegistered" | "registerAndDepositNft" | "registerAndWithdraw" | "registerAndWithdrawNft" | "registerAndWithdrawNftTo" | "registerAndWithdrawTo" | "regsiterAndWithdrawAndMint"): FunctionFragment;
|
|
5
|
+
encodeFunctionData(functionFragment: "imx", values?: undefined): string;
|
|
6
|
+
encodeFunctionData(functionFragment: "isRegistered", values: [BigNumberish]): string;
|
|
7
|
+
encodeFunctionData(functionFragment: "registerAndDepositNft", values: [
|
|
8
|
+
AddressLike,
|
|
9
|
+
BigNumberish,
|
|
10
|
+
BytesLike,
|
|
11
|
+
BigNumberish,
|
|
12
|
+
BigNumberish,
|
|
13
|
+
BigNumberish
|
|
14
|
+
]): string;
|
|
15
|
+
encodeFunctionData(functionFragment: "registerAndWithdraw", values: [AddressLike, BigNumberish, BytesLike, BigNumberish]): string;
|
|
16
|
+
encodeFunctionData(functionFragment: "registerAndWithdrawNft", values: [AddressLike, BigNumberish, BytesLike, BigNumberish, BigNumberish]): string;
|
|
17
|
+
encodeFunctionData(functionFragment: "registerAndWithdrawNftTo", values: [
|
|
18
|
+
AddressLike,
|
|
19
|
+
BigNumberish,
|
|
20
|
+
BytesLike,
|
|
21
|
+
BigNumberish,
|
|
22
|
+
BigNumberish,
|
|
23
|
+
AddressLike
|
|
24
|
+
]): string;
|
|
25
|
+
encodeFunctionData(functionFragment: "registerAndWithdrawTo", values: [AddressLike, BigNumberish, BytesLike, BigNumberish, AddressLike]): string;
|
|
26
|
+
encodeFunctionData(functionFragment: "regsiterAndWithdrawAndMint", values: [AddressLike, BigNumberish, BytesLike, BigNumberish, BytesLike]): string;
|
|
27
|
+
decodeFunctionResult(functionFragment: "imx", data: BytesLike): Result;
|
|
28
|
+
decodeFunctionResult(functionFragment: "isRegistered", data: BytesLike): Result;
|
|
29
|
+
decodeFunctionResult(functionFragment: "registerAndDepositNft", data: BytesLike): Result;
|
|
30
|
+
decodeFunctionResult(functionFragment: "registerAndWithdraw", data: BytesLike): Result;
|
|
31
|
+
decodeFunctionResult(functionFragment: "registerAndWithdrawNft", data: BytesLike): Result;
|
|
32
|
+
decodeFunctionResult(functionFragment: "registerAndWithdrawNftTo", data: BytesLike): Result;
|
|
33
|
+
decodeFunctionResult(functionFragment: "registerAndWithdrawTo", data: BytesLike): Result;
|
|
34
|
+
decodeFunctionResult(functionFragment: "regsiterAndWithdrawAndMint", data: BytesLike): Result;
|
|
35
|
+
}
|
|
36
|
+
export interface Registration extends BaseContract {
|
|
37
|
+
connect(runner?: ContractRunner | null): Registration;
|
|
38
|
+
waitForDeployment(): Promise<this>;
|
|
39
|
+
interface: RegistrationInterface;
|
|
40
|
+
queryFilter<TCEvent extends TypedContractEvent>(event: TCEvent, fromBlockOrBlockhash?: string | number | undefined, toBlock?: string | number | undefined): Promise<Array<TypedEventLog<TCEvent>>>;
|
|
41
|
+
queryFilter<TCEvent extends TypedContractEvent>(filter: TypedDeferredTopicFilter<TCEvent>, fromBlockOrBlockhash?: string | number | undefined, toBlock?: string | number | undefined): Promise<Array<TypedEventLog<TCEvent>>>;
|
|
42
|
+
on<TCEvent extends TypedContractEvent>(event: TCEvent, listener: TypedListener<TCEvent>): Promise<this>;
|
|
43
|
+
on<TCEvent extends TypedContractEvent>(filter: TypedDeferredTopicFilter<TCEvent>, listener: TypedListener<TCEvent>): Promise<this>;
|
|
44
|
+
once<TCEvent extends TypedContractEvent>(event: TCEvent, listener: TypedListener<TCEvent>): Promise<this>;
|
|
45
|
+
once<TCEvent extends TypedContractEvent>(filter: TypedDeferredTopicFilter<TCEvent>, listener: TypedListener<TCEvent>): Promise<this>;
|
|
46
|
+
listeners<TCEvent extends TypedContractEvent>(event: TCEvent): Promise<Array<TypedListener<TCEvent>>>;
|
|
47
|
+
listeners(eventName?: string): Promise<Array<Listener>>;
|
|
48
|
+
removeAllListeners<TCEvent extends TypedContractEvent>(event?: TCEvent): Promise<this>;
|
|
49
|
+
imx: TypedContractMethod<[], [string], "view">;
|
|
50
|
+
isRegistered: TypedContractMethod<[
|
|
51
|
+
starkKey: BigNumberish
|
|
52
|
+
], [
|
|
53
|
+
boolean
|
|
54
|
+
], "view">;
|
|
55
|
+
registerAndDepositNft: TypedContractMethod<[
|
|
56
|
+
ethKey: AddressLike,
|
|
57
|
+
starkKey: BigNumberish,
|
|
58
|
+
signature: BytesLike,
|
|
59
|
+
assetType: BigNumberish,
|
|
60
|
+
vaultId: BigNumberish,
|
|
61
|
+
tokenId: BigNumberish
|
|
62
|
+
], [
|
|
63
|
+
void
|
|
64
|
+
], "nonpayable">;
|
|
65
|
+
registerAndWithdraw: TypedContractMethod<[
|
|
66
|
+
ethKey: AddressLike,
|
|
67
|
+
starkKey: BigNumberish,
|
|
68
|
+
signature: BytesLike,
|
|
69
|
+
assetType: BigNumberish
|
|
70
|
+
], [
|
|
71
|
+
void
|
|
72
|
+
], "nonpayable">;
|
|
73
|
+
registerAndWithdrawNft: TypedContractMethod<[
|
|
74
|
+
ethKey: AddressLike,
|
|
75
|
+
starkKey: BigNumberish,
|
|
76
|
+
signature: BytesLike,
|
|
77
|
+
assetType: BigNumberish,
|
|
78
|
+
tokenId: BigNumberish
|
|
79
|
+
], [
|
|
80
|
+
void
|
|
81
|
+
], "nonpayable">;
|
|
82
|
+
registerAndWithdrawNftTo: TypedContractMethod<[
|
|
83
|
+
ethKey: AddressLike,
|
|
84
|
+
starkKey: BigNumberish,
|
|
85
|
+
signature: BytesLike,
|
|
86
|
+
assetType: BigNumberish,
|
|
87
|
+
tokenId: BigNumberish,
|
|
88
|
+
recipient: AddressLike
|
|
89
|
+
], [
|
|
90
|
+
void
|
|
91
|
+
], "nonpayable">;
|
|
92
|
+
registerAndWithdrawTo: TypedContractMethod<[
|
|
93
|
+
ethKey: AddressLike,
|
|
94
|
+
starkKey: BigNumberish,
|
|
95
|
+
signature: BytesLike,
|
|
96
|
+
assetType: BigNumberish,
|
|
97
|
+
recipient: AddressLike
|
|
98
|
+
], [
|
|
99
|
+
void
|
|
100
|
+
], "nonpayable">;
|
|
101
|
+
regsiterAndWithdrawAndMint: TypedContractMethod<[
|
|
102
|
+
ethKey: AddressLike,
|
|
103
|
+
starkKey: BigNumberish,
|
|
104
|
+
signature: BytesLike,
|
|
105
|
+
assetType: BigNumberish,
|
|
106
|
+
mintingBlob: BytesLike
|
|
107
|
+
], [
|
|
108
|
+
void
|
|
109
|
+
], "nonpayable">;
|
|
110
|
+
getFunction<T extends ContractMethod = ContractMethod>(key: string | FunctionFragment): T;
|
|
111
|
+
getFunction(nameOrSignature: "imx"): TypedContractMethod<[], [string], "view">;
|
|
112
|
+
getFunction(nameOrSignature: "isRegistered"): TypedContractMethod<[starkKey: BigNumberish], [boolean], "view">;
|
|
113
|
+
getFunction(nameOrSignature: "registerAndDepositNft"): TypedContractMethod<[
|
|
114
|
+
ethKey: AddressLike,
|
|
115
|
+
starkKey: BigNumberish,
|
|
116
|
+
signature: BytesLike,
|
|
117
|
+
assetType: BigNumberish,
|
|
118
|
+
vaultId: BigNumberish,
|
|
119
|
+
tokenId: BigNumberish
|
|
120
|
+
], [
|
|
121
|
+
void
|
|
122
|
+
], "nonpayable">;
|
|
123
|
+
getFunction(nameOrSignature: "registerAndWithdraw"): TypedContractMethod<[
|
|
124
|
+
ethKey: AddressLike,
|
|
125
|
+
starkKey: BigNumberish,
|
|
126
|
+
signature: BytesLike,
|
|
127
|
+
assetType: BigNumberish
|
|
128
|
+
], [
|
|
129
|
+
void
|
|
130
|
+
], "nonpayable">;
|
|
131
|
+
getFunction(nameOrSignature: "registerAndWithdrawNft"): TypedContractMethod<[
|
|
132
|
+
ethKey: AddressLike,
|
|
133
|
+
starkKey: BigNumberish,
|
|
134
|
+
signature: BytesLike,
|
|
135
|
+
assetType: BigNumberish,
|
|
136
|
+
tokenId: BigNumberish
|
|
137
|
+
], [
|
|
138
|
+
void
|
|
139
|
+
], "nonpayable">;
|
|
140
|
+
getFunction(nameOrSignature: "registerAndWithdrawNftTo"): TypedContractMethod<[
|
|
141
|
+
ethKey: AddressLike,
|
|
142
|
+
starkKey: BigNumberish,
|
|
143
|
+
signature: BytesLike,
|
|
144
|
+
assetType: BigNumberish,
|
|
145
|
+
tokenId: BigNumberish,
|
|
146
|
+
recipient: AddressLike
|
|
147
|
+
], [
|
|
148
|
+
void
|
|
149
|
+
], "nonpayable">;
|
|
150
|
+
getFunction(nameOrSignature: "registerAndWithdrawTo"): TypedContractMethod<[
|
|
151
|
+
ethKey: AddressLike,
|
|
152
|
+
starkKey: BigNumberish,
|
|
153
|
+
signature: BytesLike,
|
|
154
|
+
assetType: BigNumberish,
|
|
155
|
+
recipient: AddressLike
|
|
156
|
+
], [
|
|
157
|
+
void
|
|
158
|
+
], "nonpayable">;
|
|
159
|
+
getFunction(nameOrSignature: "regsiterAndWithdrawAndMint"): TypedContractMethod<[
|
|
160
|
+
ethKey: AddressLike,
|
|
161
|
+
starkKey: BigNumberish,
|
|
162
|
+
signature: BytesLike,
|
|
163
|
+
assetType: BigNumberish,
|
|
164
|
+
mintingBlob: BytesLike
|
|
165
|
+
], [
|
|
166
|
+
void
|
|
167
|
+
], "nonpayable">;
|
|
168
|
+
filters: {};
|
|
169
|
+
}
|