@imtbl/sdk 0.28.5-alpha.2 → 0.28.5-alpha.3
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/blockchain_data.js +1 -1
- package/dist/immutablex_client.js +1 -1
- package/dist/index.browser.js +8 -25
- package/dist/index.browser.js.map +1 -1
- package/dist/index.cjs +11 -1593
- package/dist/index.d.ts +28 -1450
- package/dist/index.js +13 -1594
- package/dist/passport.js +2 -2
- package/package.json +1 -5
- package/dist/orderbook.d.ts +0 -1600
- package/dist/orderbook.js +0 -1580
package/dist/index.d.ts
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
/// <reference types="node" />
|
|
2
1
|
declare enum Environment {
|
|
3
2
|
PRODUCTION = "production",
|
|
4
3
|
SANDBOX = "sandbox"
|
|
@@ -872,7 +871,7 @@ interface BlockchainMetadata {
|
|
|
872
871
|
* @export
|
|
873
872
|
* @interface Chain
|
|
874
873
|
*/
|
|
875
|
-
interface Chain
|
|
874
|
+
interface Chain {
|
|
876
875
|
/**
|
|
877
876
|
* The id of chain
|
|
878
877
|
* @type {string}
|
|
@@ -916,7 +915,7 @@ interface Activity {
|
|
|
916
915
|
* @type {Chain}
|
|
917
916
|
* @memberof Activity
|
|
918
917
|
*/
|
|
919
|
-
'chain': Chain
|
|
918
|
+
'chain': Chain;
|
|
920
919
|
/**
|
|
921
920
|
*
|
|
922
921
|
* @type {ActivityType}
|
|
@@ -959,7 +958,7 @@ interface Activity {
|
|
|
959
958
|
* @type ChainWithDetails
|
|
960
959
|
* @export
|
|
961
960
|
*/
|
|
962
|
-
type ChainWithDetails = Chain
|
|
961
|
+
type ChainWithDetails = Chain;
|
|
963
962
|
|
|
964
963
|
/**
|
|
965
964
|
* Immutable zkEVM API
|
|
@@ -1005,7 +1004,7 @@ interface Collection$1 {
|
|
|
1005
1004
|
* @type {Chain}
|
|
1006
1005
|
* @memberof Collection
|
|
1007
1006
|
*/
|
|
1008
|
-
'chain': Chain
|
|
1007
|
+
'chain': Chain;
|
|
1009
1008
|
/**
|
|
1010
1009
|
* The name of the collection
|
|
1011
1010
|
* @type {string}
|
|
@@ -1272,7 +1271,7 @@ interface Metadata {
|
|
|
1272
1271
|
* @type {Chain}
|
|
1273
1272
|
* @memberof Metadata
|
|
1274
1273
|
*/
|
|
1275
|
-
'chain': Chain
|
|
1274
|
+
'chain': Chain;
|
|
1276
1275
|
/**
|
|
1277
1276
|
* The contract address of the metadata
|
|
1278
1277
|
* @type {string}
|
|
@@ -1384,7 +1383,7 @@ interface NFT {
|
|
|
1384
1383
|
* @type {Chain}
|
|
1385
1384
|
* @memberof NFT
|
|
1386
1385
|
*/
|
|
1387
|
-
'chain': Chain
|
|
1386
|
+
'chain': Chain;
|
|
1388
1387
|
/**
|
|
1389
1388
|
* An `uint256` token id as string
|
|
1390
1389
|
* @type {string}
|
|
@@ -1559,7 +1558,7 @@ interface Token$1 {
|
|
|
1559
1558
|
* @type {Chain}
|
|
1560
1559
|
* @memberof Token
|
|
1561
1560
|
*/
|
|
1562
|
-
'chain': Chain
|
|
1561
|
+
'chain': Chain;
|
|
1563
1562
|
/**
|
|
1564
1563
|
* The address of token contract
|
|
1565
1564
|
* @type {string}
|
|
@@ -1646,7 +1645,7 @@ interface GetTokenResult {
|
|
|
1646
1645
|
* @export
|
|
1647
1646
|
* @interface Page
|
|
1648
1647
|
*/
|
|
1649
|
-
interface Page
|
|
1648
|
+
interface Page {
|
|
1650
1649
|
/**
|
|
1651
1650
|
* First item as an encoded string
|
|
1652
1651
|
* @type {string}
|
|
@@ -1690,7 +1689,7 @@ interface ListActivitiesResult {
|
|
|
1690
1689
|
* @type {Page}
|
|
1691
1690
|
* @memberof ListActivitiesResult
|
|
1692
1691
|
*/
|
|
1693
|
-
'page': Page
|
|
1692
|
+
'page': Page;
|
|
1694
1693
|
}
|
|
1695
1694
|
|
|
1696
1695
|
/**
|
|
@@ -1722,7 +1721,7 @@ interface ListChainsResult {
|
|
|
1722
1721
|
* @type {Page}
|
|
1723
1722
|
* @memberof ListChainsResult
|
|
1724
1723
|
*/
|
|
1725
|
-
'page': Page
|
|
1724
|
+
'page': Page;
|
|
1726
1725
|
}
|
|
1727
1726
|
|
|
1728
1727
|
/**
|
|
@@ -1748,7 +1747,7 @@ interface NFTWithOwner {
|
|
|
1748
1747
|
* @type {Chain}
|
|
1749
1748
|
* @memberof NFTWithOwner
|
|
1750
1749
|
*/
|
|
1751
|
-
'chain': Chain
|
|
1750
|
+
'chain': Chain;
|
|
1752
1751
|
/**
|
|
1753
1752
|
* The address of NFT contract
|
|
1754
1753
|
* @type {string}
|
|
@@ -1810,7 +1809,7 @@ interface ListCollectionOwnersResult {
|
|
|
1810
1809
|
* @type {Page}
|
|
1811
1810
|
* @memberof ListCollectionOwnersResult
|
|
1812
1811
|
*/
|
|
1813
|
-
'page': Page
|
|
1812
|
+
'page': Page;
|
|
1814
1813
|
}
|
|
1815
1814
|
|
|
1816
1815
|
/**
|
|
@@ -1842,7 +1841,7 @@ interface ListCollectionsResult {
|
|
|
1842
1841
|
* @type {Page}
|
|
1843
1842
|
* @memberof ListCollectionsResult
|
|
1844
1843
|
*/
|
|
1845
|
-
'page': Page
|
|
1844
|
+
'page': Page;
|
|
1846
1845
|
}
|
|
1847
1846
|
|
|
1848
1847
|
/**
|
|
@@ -1874,7 +1873,7 @@ interface ListMetadataResult {
|
|
|
1874
1873
|
* @type {Page}
|
|
1875
1874
|
* @memberof ListMetadataResult
|
|
1876
1875
|
*/
|
|
1877
|
-
'page': Page
|
|
1876
|
+
'page': Page;
|
|
1878
1877
|
}
|
|
1879
1878
|
|
|
1880
1879
|
/**
|
|
@@ -1900,7 +1899,7 @@ interface NFTOwner {
|
|
|
1900
1899
|
* @type {Chain}
|
|
1901
1900
|
* @memberof NFTOwner
|
|
1902
1901
|
*/
|
|
1903
|
-
'chain': Chain
|
|
1902
|
+
'chain': Chain;
|
|
1904
1903
|
/**
|
|
1905
1904
|
* The address of NFT contract
|
|
1906
1905
|
* @type {string}
|
|
@@ -1962,7 +1961,7 @@ interface ListNFTOwnersResult {
|
|
|
1962
1961
|
* @type {Page}
|
|
1963
1962
|
* @memberof ListNFTOwnersResult
|
|
1964
1963
|
*/
|
|
1965
|
-
'page': Page
|
|
1964
|
+
'page': Page;
|
|
1966
1965
|
}
|
|
1967
1966
|
|
|
1968
1967
|
/**
|
|
@@ -1994,7 +1993,7 @@ interface ListNFTsResult {
|
|
|
1994
1993
|
* @type {Page}
|
|
1995
1994
|
* @memberof ListNFTsResult
|
|
1996
1995
|
*/
|
|
1997
|
-
'page': Page
|
|
1996
|
+
'page': Page;
|
|
1998
1997
|
}
|
|
1999
1998
|
|
|
2000
1999
|
/**
|
|
@@ -2026,7 +2025,7 @@ interface ListTokensResult {
|
|
|
2026
2025
|
* @type {Page}
|
|
2027
2026
|
* @memberof ListTokensResult
|
|
2028
2027
|
*/
|
|
2029
|
-
'page': Page
|
|
2028
|
+
'page': Page;
|
|
2030
2029
|
}
|
|
2031
2030
|
|
|
2032
2031
|
/**
|
|
@@ -2127,7 +2126,7 @@ interface RefreshCollectionMetadataResult {
|
|
|
2127
2126
|
* @type {Chain}
|
|
2128
2127
|
* @memberof RefreshCollectionMetadataResult
|
|
2129
2128
|
*/
|
|
2130
|
-
'chain': Chain
|
|
2129
|
+
'chain': Chain;
|
|
2131
2130
|
/**
|
|
2132
2131
|
*
|
|
2133
2132
|
* @type {CollectionMetadata}
|
|
@@ -3960,7 +3959,6 @@ declare type Network = {
|
|
|
3960
3959
|
ensAddress?: string;
|
|
3961
3960
|
_defaultProvider?: (providers: any, options?: any) => any;
|
|
3962
3961
|
};
|
|
3963
|
-
declare type Networkish = Network | string | number;
|
|
3964
3962
|
|
|
3965
3963
|
declare type AccessList = Array<{
|
|
3966
3964
|
address: string;
|
|
@@ -3986,23 +3984,6 @@ interface Transaction {
|
|
|
3986
3984
|
maxFeePerGas?: BigNumber;
|
|
3987
3985
|
}
|
|
3988
3986
|
|
|
3989
|
-
declare type ConnectionInfo = {
|
|
3990
|
-
url: string;
|
|
3991
|
-
headers?: {
|
|
3992
|
-
[key: string]: string | number;
|
|
3993
|
-
};
|
|
3994
|
-
user?: string;
|
|
3995
|
-
password?: string;
|
|
3996
|
-
allowInsecureAuthentication?: boolean;
|
|
3997
|
-
allowGzip?: boolean;
|
|
3998
|
-
throttleLimit?: number;
|
|
3999
|
-
throttleSlotInterval?: number;
|
|
4000
|
-
throttleCallback?: (attempt: number, url: string) => Promise<boolean>;
|
|
4001
|
-
skipFetchSetup?: boolean;
|
|
4002
|
-
fetchOptions?: Record<string, string>;
|
|
4003
|
-
errorPassThrough?: boolean;
|
|
4004
|
-
timeout?: number;
|
|
4005
|
-
};
|
|
4006
3987
|
interface OnceBlockable {
|
|
4007
3988
|
once(eventName: "block", handler: () => void): void;
|
|
4008
3989
|
}
|
|
@@ -4098,9 +4079,6 @@ interface Filter extends EventFilter {
|
|
|
4098
4079
|
fromBlock?: BlockTag;
|
|
4099
4080
|
toBlock?: BlockTag;
|
|
4100
4081
|
}
|
|
4101
|
-
interface FilterByBlockHash extends EventFilter {
|
|
4102
|
-
blockHash?: string;
|
|
4103
|
-
}
|
|
4104
4082
|
declare abstract class ForkEvent extends Description {
|
|
4105
4083
|
readonly expiry: number;
|
|
4106
4084
|
readonly _isForkEvent?: boolean;
|
|
@@ -4142,20 +4120,6 @@ declare abstract class Provider$1 implements OnceBlockable {
|
|
|
4142
4120
|
static isProvider(value: any): value is Provider$1;
|
|
4143
4121
|
}
|
|
4144
4122
|
|
|
4145
|
-
interface TypedDataDomain {
|
|
4146
|
-
name?: string;
|
|
4147
|
-
version?: string;
|
|
4148
|
-
chainId?: BigNumberish;
|
|
4149
|
-
verifyingContract?: string;
|
|
4150
|
-
salt?: BytesLike;
|
|
4151
|
-
}
|
|
4152
|
-
interface TypedDataField {
|
|
4153
|
-
name: string;
|
|
4154
|
-
type: string;
|
|
4155
|
-
}
|
|
4156
|
-
interface TypedDataSigner {
|
|
4157
|
-
_signTypedData(domain: TypedDataDomain, types: Record<string, Array<TypedDataField>>, value: Record<string, any>): Promise<string>;
|
|
4158
|
-
}
|
|
4159
4123
|
declare abstract class Signer {
|
|
4160
4124
|
readonly provider?: Provider$1;
|
|
4161
4125
|
abstract getAddress(): Promise<string>;
|
|
@@ -4179,294 +4143,6 @@ declare abstract class Signer {
|
|
|
4179
4143
|
static isSigner(value: any): value is Signer;
|
|
4180
4144
|
}
|
|
4181
4145
|
|
|
4182
|
-
interface PopulatedTransaction {
|
|
4183
|
-
to?: string;
|
|
4184
|
-
from?: string;
|
|
4185
|
-
nonce?: number;
|
|
4186
|
-
gasLimit?: BigNumber;
|
|
4187
|
-
gasPrice?: BigNumber;
|
|
4188
|
-
data?: string;
|
|
4189
|
-
value?: BigNumber;
|
|
4190
|
-
chainId?: number;
|
|
4191
|
-
type?: number;
|
|
4192
|
-
accessList?: AccessList;
|
|
4193
|
-
maxFeePerGas?: BigNumber;
|
|
4194
|
-
maxPriorityFeePerGas?: BigNumber;
|
|
4195
|
-
customData?: Record<string, any>;
|
|
4196
|
-
ccipReadEnabled?: boolean;
|
|
4197
|
-
}
|
|
4198
|
-
|
|
4199
|
-
declare type FormatFunc = (value: any) => any;
|
|
4200
|
-
declare type FormatFuncs = {
|
|
4201
|
-
[key: string]: FormatFunc;
|
|
4202
|
-
};
|
|
4203
|
-
declare type Formats = {
|
|
4204
|
-
transaction: FormatFuncs;
|
|
4205
|
-
transactionRequest: FormatFuncs;
|
|
4206
|
-
receipt: FormatFuncs;
|
|
4207
|
-
receiptLog: FormatFuncs;
|
|
4208
|
-
block: FormatFuncs;
|
|
4209
|
-
blockWithTransactions: FormatFuncs;
|
|
4210
|
-
filter: FormatFuncs;
|
|
4211
|
-
filterLog: FormatFuncs;
|
|
4212
|
-
};
|
|
4213
|
-
declare class Formatter {
|
|
4214
|
-
readonly formats: Formats;
|
|
4215
|
-
constructor();
|
|
4216
|
-
getDefaultFormats(): Formats;
|
|
4217
|
-
accessList(accessList: Array<any>): AccessList;
|
|
4218
|
-
number(number: any): number;
|
|
4219
|
-
type(number: any): number;
|
|
4220
|
-
bigNumber(value: any): BigNumber;
|
|
4221
|
-
boolean(value: any): boolean;
|
|
4222
|
-
hex(value: any, strict?: boolean): string;
|
|
4223
|
-
data(value: any, strict?: boolean): string;
|
|
4224
|
-
address(value: any): string;
|
|
4225
|
-
callAddress(value: any): string;
|
|
4226
|
-
contractAddress(value: any): string;
|
|
4227
|
-
blockTag(blockTag: any): string;
|
|
4228
|
-
hash(value: any, strict?: boolean): string;
|
|
4229
|
-
difficulty(value: any): number;
|
|
4230
|
-
uint256(value: any): string;
|
|
4231
|
-
_block(value: any, format: any): Block;
|
|
4232
|
-
block(value: any): Block;
|
|
4233
|
-
blockWithTransactions(value: any): Block;
|
|
4234
|
-
transactionRequest(value: any): any;
|
|
4235
|
-
transactionResponse(transaction: any): TransactionResponse;
|
|
4236
|
-
transaction(value: any): any;
|
|
4237
|
-
receiptLog(value: any): any;
|
|
4238
|
-
receipt(value: any): TransactionReceipt;
|
|
4239
|
-
topics(value: any): any;
|
|
4240
|
-
filter(value: any): any;
|
|
4241
|
-
filterLog(value: any): any;
|
|
4242
|
-
static check(format: {
|
|
4243
|
-
[name: string]: FormatFunc;
|
|
4244
|
-
}, object: any): any;
|
|
4245
|
-
static allowNull(format: FormatFunc, nullValue?: any): FormatFunc;
|
|
4246
|
-
static allowFalsish(format: FormatFunc, replaceValue: any): FormatFunc;
|
|
4247
|
-
static arrayOf(format: FormatFunc): FormatFunc;
|
|
4248
|
-
}
|
|
4249
|
-
|
|
4250
|
-
declare class Event {
|
|
4251
|
-
readonly listener: Listener;
|
|
4252
|
-
readonly once: boolean;
|
|
4253
|
-
readonly tag: string;
|
|
4254
|
-
_lastBlockNumber: number;
|
|
4255
|
-
_inflight: boolean;
|
|
4256
|
-
constructor(tag: string, listener: Listener, once: boolean);
|
|
4257
|
-
get event(): EventType;
|
|
4258
|
-
get type(): string;
|
|
4259
|
-
get hash(): string;
|
|
4260
|
-
get filter(): Filter;
|
|
4261
|
-
pollable(): boolean;
|
|
4262
|
-
}
|
|
4263
|
-
interface EnsResolver {
|
|
4264
|
-
readonly name: string;
|
|
4265
|
-
readonly address: string;
|
|
4266
|
-
getAddress(coinType?: 60): Promise<null | string>;
|
|
4267
|
-
getContentHash(): Promise<null | string>;
|
|
4268
|
-
getText(key: string): Promise<null | string>;
|
|
4269
|
-
}
|
|
4270
|
-
interface EnsProvider {
|
|
4271
|
-
resolveName(name: string): Promise<null | string>;
|
|
4272
|
-
lookupAddress(address: string): Promise<null | string>;
|
|
4273
|
-
getResolver(name: string): Promise<null | EnsResolver>;
|
|
4274
|
-
}
|
|
4275
|
-
interface Avatar {
|
|
4276
|
-
url: string;
|
|
4277
|
-
linkage: Array<{
|
|
4278
|
-
type: string;
|
|
4279
|
-
content: string;
|
|
4280
|
-
}>;
|
|
4281
|
-
}
|
|
4282
|
-
declare class Resolver$1 implements EnsResolver {
|
|
4283
|
-
readonly provider: BaseProvider;
|
|
4284
|
-
readonly name: string;
|
|
4285
|
-
readonly address: string;
|
|
4286
|
-
readonly _resolvedAddress: null | string;
|
|
4287
|
-
_supportsEip2544: null | Promise<boolean>;
|
|
4288
|
-
constructor(provider: BaseProvider, address: string, name: string, resolvedAddress?: string);
|
|
4289
|
-
supportsWildcard(): Promise<boolean>;
|
|
4290
|
-
_fetch(selector: string, parameters?: string): Promise<null | string>;
|
|
4291
|
-
_fetchBytes(selector: string, parameters?: string): Promise<null | string>;
|
|
4292
|
-
_getAddress(coinType: number, hexBytes: string): string;
|
|
4293
|
-
getAddress(coinType?: number): Promise<string>;
|
|
4294
|
-
getAvatar(): Promise<null | Avatar>;
|
|
4295
|
-
getContentHash(): Promise<string>;
|
|
4296
|
-
getText(key: string): Promise<string>;
|
|
4297
|
-
}
|
|
4298
|
-
declare class BaseProvider extends Provider$1 implements EnsProvider {
|
|
4299
|
-
_networkPromise: Promise<Network>;
|
|
4300
|
-
_network: Network;
|
|
4301
|
-
_events: Array<Event>;
|
|
4302
|
-
formatter: Formatter;
|
|
4303
|
-
_emitted: {
|
|
4304
|
-
[eventName: string]: number | "pending";
|
|
4305
|
-
};
|
|
4306
|
-
_pollingInterval: number;
|
|
4307
|
-
_poller: NodeJS.Timer;
|
|
4308
|
-
_bootstrapPoll: NodeJS.Timer;
|
|
4309
|
-
_lastBlockNumber: number;
|
|
4310
|
-
_maxFilterBlockRange: number;
|
|
4311
|
-
_fastBlockNumber: number;
|
|
4312
|
-
_fastBlockNumberPromise: Promise<number>;
|
|
4313
|
-
_fastQueryDate: number;
|
|
4314
|
-
_maxInternalBlockNumber: number;
|
|
4315
|
-
_internalBlockNumber: Promise<{
|
|
4316
|
-
blockNumber: number;
|
|
4317
|
-
reqTime: number;
|
|
4318
|
-
respTime: number;
|
|
4319
|
-
}>;
|
|
4320
|
-
readonly anyNetwork: boolean;
|
|
4321
|
-
disableCcipRead: boolean;
|
|
4322
|
-
/**
|
|
4323
|
-
* ready
|
|
4324
|
-
*
|
|
4325
|
-
* A Promise<Network> that resolves only once the provider is ready.
|
|
4326
|
-
*
|
|
4327
|
-
* Sub-classes that call the super with a network without a chainId
|
|
4328
|
-
* MUST set this. Standard named networks have a known chainId.
|
|
4329
|
-
*
|
|
4330
|
-
*/
|
|
4331
|
-
constructor(network: Networkish | Promise<Network>);
|
|
4332
|
-
_ready(): Promise<Network>;
|
|
4333
|
-
get ready(): Promise<Network>;
|
|
4334
|
-
static getFormatter(): Formatter;
|
|
4335
|
-
static getNetwork(network: Networkish): Network;
|
|
4336
|
-
ccipReadFetch(tx: Transaction, calldata: string, urls: Array<string>): Promise<null | string>;
|
|
4337
|
-
_getInternalBlockNumber(maxAge: number): Promise<number>;
|
|
4338
|
-
poll(): Promise<void>;
|
|
4339
|
-
resetEventsBlock(blockNumber: number): void;
|
|
4340
|
-
get network(): Network;
|
|
4341
|
-
detectNetwork(): Promise<Network>;
|
|
4342
|
-
getNetwork(): Promise<Network>;
|
|
4343
|
-
get blockNumber(): number;
|
|
4344
|
-
get polling(): boolean;
|
|
4345
|
-
set polling(value: boolean);
|
|
4346
|
-
get pollingInterval(): number;
|
|
4347
|
-
set pollingInterval(value: number);
|
|
4348
|
-
_getFastBlockNumber(): Promise<number>;
|
|
4349
|
-
_setFastBlockNumber(blockNumber: number): void;
|
|
4350
|
-
waitForTransaction(transactionHash: string, confirmations?: number, timeout?: number): Promise<TransactionReceipt>;
|
|
4351
|
-
_waitForTransaction(transactionHash: string, confirmations: number, timeout: number, replaceable: {
|
|
4352
|
-
data: string;
|
|
4353
|
-
from: string;
|
|
4354
|
-
nonce: number;
|
|
4355
|
-
to: string;
|
|
4356
|
-
value: BigNumber;
|
|
4357
|
-
startBlock: number;
|
|
4358
|
-
}): Promise<TransactionReceipt>;
|
|
4359
|
-
getBlockNumber(): Promise<number>;
|
|
4360
|
-
getGasPrice(): Promise<BigNumber>;
|
|
4361
|
-
getBalance(addressOrName: string | Promise<string>, blockTag?: BlockTag | Promise<BlockTag>): Promise<BigNumber>;
|
|
4362
|
-
getTransactionCount(addressOrName: string | Promise<string>, blockTag?: BlockTag | Promise<BlockTag>): Promise<number>;
|
|
4363
|
-
getCode(addressOrName: string | Promise<string>, blockTag?: BlockTag | Promise<BlockTag>): Promise<string>;
|
|
4364
|
-
getStorageAt(addressOrName: string | Promise<string>, position: BigNumberish | Promise<BigNumberish>, blockTag?: BlockTag | Promise<BlockTag>): Promise<string>;
|
|
4365
|
-
_wrapTransaction(tx: Transaction, hash?: string, startBlock?: number): TransactionResponse;
|
|
4366
|
-
sendTransaction(signedTransaction: string | Promise<string>): Promise<TransactionResponse>;
|
|
4367
|
-
_getTransactionRequest(transaction: Deferrable<TransactionRequest>): Promise<Transaction>;
|
|
4368
|
-
_getFilter(filter: Filter | FilterByBlockHash | Promise<Filter | FilterByBlockHash>): Promise<Filter | FilterByBlockHash>;
|
|
4369
|
-
_call(transaction: TransactionRequest, blockTag: BlockTag, attempt: number): Promise<string>;
|
|
4370
|
-
call(transaction: Deferrable<TransactionRequest>, blockTag?: BlockTag | Promise<BlockTag>): Promise<string>;
|
|
4371
|
-
estimateGas(transaction: Deferrable<TransactionRequest>): Promise<BigNumber>;
|
|
4372
|
-
_getAddress(addressOrName: string | Promise<string>): Promise<string>;
|
|
4373
|
-
_getBlock(blockHashOrBlockTag: BlockTag | string | Promise<BlockTag | string>, includeTransactions?: boolean): Promise<Block | BlockWithTransactions>;
|
|
4374
|
-
getBlock(blockHashOrBlockTag: BlockTag | string | Promise<BlockTag | string>): Promise<Block>;
|
|
4375
|
-
getBlockWithTransactions(blockHashOrBlockTag: BlockTag | string | Promise<BlockTag | string>): Promise<BlockWithTransactions>;
|
|
4376
|
-
getTransaction(transactionHash: string | Promise<string>): Promise<TransactionResponse>;
|
|
4377
|
-
getTransactionReceipt(transactionHash: string | Promise<string>): Promise<TransactionReceipt>;
|
|
4378
|
-
getLogs(filter: Filter | FilterByBlockHash | Promise<Filter | FilterByBlockHash>): Promise<Array<Log>>;
|
|
4379
|
-
getEtherPrice(): Promise<number>;
|
|
4380
|
-
_getBlockTag(blockTag: BlockTag | Promise<BlockTag>): Promise<BlockTag>;
|
|
4381
|
-
getResolver(name: string): Promise<null | Resolver$1>;
|
|
4382
|
-
_getResolver(name: string, operation?: string): Promise<string>;
|
|
4383
|
-
resolveName(name: string | Promise<string>): Promise<null | string>;
|
|
4384
|
-
lookupAddress(address: string | Promise<string>): Promise<null | string>;
|
|
4385
|
-
getAvatar(nameOrAddress: string): Promise<null | string>;
|
|
4386
|
-
perform(method: string, params: any): Promise<any>;
|
|
4387
|
-
_startEvent(event: Event): void;
|
|
4388
|
-
_stopEvent(event: Event): void;
|
|
4389
|
-
_addEventListener(eventName: EventType, listener: Listener, once: boolean): this;
|
|
4390
|
-
on(eventName: EventType, listener: Listener): this;
|
|
4391
|
-
once(eventName: EventType, listener: Listener): this;
|
|
4392
|
-
emit(eventName: EventType, ...args: Array<any>): boolean;
|
|
4393
|
-
listenerCount(eventName?: EventType): number;
|
|
4394
|
-
listeners(eventName?: EventType): Array<Listener>;
|
|
4395
|
-
off(eventName: EventType, listener?: Listener): this;
|
|
4396
|
-
removeAllListeners(eventName?: EventType): this;
|
|
4397
|
-
}
|
|
4398
|
-
|
|
4399
|
-
declare class JsonRpcSigner extends Signer implements TypedDataSigner {
|
|
4400
|
-
readonly provider: JsonRpcProvider;
|
|
4401
|
-
_index: number;
|
|
4402
|
-
_address: string;
|
|
4403
|
-
constructor(constructorGuard: any, provider: JsonRpcProvider, addressOrIndex?: string | number);
|
|
4404
|
-
connect(provider: Provider$1): JsonRpcSigner;
|
|
4405
|
-
connectUnchecked(): JsonRpcSigner;
|
|
4406
|
-
getAddress(): Promise<string>;
|
|
4407
|
-
sendUncheckedTransaction(transaction: Deferrable<TransactionRequest>): Promise<string>;
|
|
4408
|
-
signTransaction(transaction: Deferrable<TransactionRequest>): Promise<string>;
|
|
4409
|
-
sendTransaction(transaction: Deferrable<TransactionRequest>): Promise<TransactionResponse>;
|
|
4410
|
-
signMessage(message: Bytes | string): Promise<string>;
|
|
4411
|
-
_legacySignMessage(message: Bytes | string): Promise<string>;
|
|
4412
|
-
_signTypedData(domain: TypedDataDomain, types: Record<string, Array<TypedDataField>>, value: Record<string, any>): Promise<string>;
|
|
4413
|
-
unlock(password: string): Promise<boolean>;
|
|
4414
|
-
}
|
|
4415
|
-
declare class UncheckedJsonRpcSigner extends JsonRpcSigner {
|
|
4416
|
-
sendTransaction(transaction: Deferrable<TransactionRequest>): Promise<TransactionResponse>;
|
|
4417
|
-
}
|
|
4418
|
-
declare class JsonRpcProvider extends BaseProvider {
|
|
4419
|
-
readonly connection: ConnectionInfo;
|
|
4420
|
-
_pendingFilter: Promise<number>;
|
|
4421
|
-
_nextId: number;
|
|
4422
|
-
_eventLoopCache: Record<string, Promise<any>>;
|
|
4423
|
-
get _cache(): Record<string, Promise<any>>;
|
|
4424
|
-
constructor(url?: ConnectionInfo | string, network?: Networkish);
|
|
4425
|
-
static defaultUrl(): string;
|
|
4426
|
-
detectNetwork(): Promise<Network>;
|
|
4427
|
-
_uncachedDetectNetwork(): Promise<Network>;
|
|
4428
|
-
getSigner(addressOrIndex?: string | number): JsonRpcSigner;
|
|
4429
|
-
getUncheckedSigner(addressOrIndex?: string | number): UncheckedJsonRpcSigner;
|
|
4430
|
-
listAccounts(): Promise<Array<string>>;
|
|
4431
|
-
send(method: string, params: Array<any>): Promise<any>;
|
|
4432
|
-
prepareRequest(method: string, params: any): [string, Array<any>];
|
|
4433
|
-
perform(method: string, params: any): Promise<any>;
|
|
4434
|
-
_startEvent(event: Event): void;
|
|
4435
|
-
_startPending(): void;
|
|
4436
|
-
_stopEvent(event: Event): void;
|
|
4437
|
-
static hexlifyTransaction(transaction: TransactionRequest, allowExtra?: {
|
|
4438
|
-
[key: string]: boolean;
|
|
4439
|
-
}): {
|
|
4440
|
-
[key: string]: string | AccessList;
|
|
4441
|
-
};
|
|
4442
|
-
}
|
|
4443
|
-
|
|
4444
|
-
declare type ExternalProvider = {
|
|
4445
|
-
isMetaMask?: boolean;
|
|
4446
|
-
isStatus?: boolean;
|
|
4447
|
-
host?: string;
|
|
4448
|
-
path?: string;
|
|
4449
|
-
sendAsync?: (request: {
|
|
4450
|
-
method: string;
|
|
4451
|
-
params?: Array<any>;
|
|
4452
|
-
}, callback: (error: any, response: any) => void) => void;
|
|
4453
|
-
send?: (request: {
|
|
4454
|
-
method: string;
|
|
4455
|
-
params?: Array<any>;
|
|
4456
|
-
}, callback: (error: any, response: any) => void) => void;
|
|
4457
|
-
request?: (request: {
|
|
4458
|
-
method: string;
|
|
4459
|
-
params?: Array<any>;
|
|
4460
|
-
}) => Promise<any>;
|
|
4461
|
-
};
|
|
4462
|
-
declare type JsonRpcFetchFunc = (method: string, params?: Array<any>) => Promise<any>;
|
|
4463
|
-
declare class Web3Provider extends JsonRpcProvider {
|
|
4464
|
-
readonly provider: ExternalProvider;
|
|
4465
|
-
readonly jsonRpcFetchFunc: JsonRpcFetchFunc;
|
|
4466
|
-
constructor(provider: ExternalProvider | JsonRpcFetchFunc, network?: Networkish);
|
|
4467
|
-
send(method: string, params: Array<any>): Promise<any>;
|
|
4468
|
-
}
|
|
4469
|
-
|
|
4470
4146
|
// TypeScript Version: 3.0
|
|
4471
4147
|
|
|
4472
4148
|
type AxiosRequestHeaders = Record<string, string | number | boolean>;
|
|
@@ -5516,7 +5192,7 @@ declare type AssetOrders = OrderDetails;
|
|
|
5516
5192
|
* @export
|
|
5517
5193
|
* @interface Fee
|
|
5518
5194
|
*/
|
|
5519
|
-
interface Fee
|
|
5195
|
+
interface Fee {
|
|
5520
5196
|
/**
|
|
5521
5197
|
* Wallet address
|
|
5522
5198
|
* @type {string}
|
|
@@ -5578,7 +5254,7 @@ interface Asset {
|
|
|
5578
5254
|
* @type {Array<Fee>}
|
|
5579
5255
|
* @memberof Asset
|
|
5580
5256
|
*/
|
|
5581
|
-
'fees'?: Array<Fee
|
|
5257
|
+
'fees'?: Array<Fee>;
|
|
5582
5258
|
/**
|
|
5583
5259
|
* [DEPRECATED] Internal Immutable X Token ID
|
|
5584
5260
|
* @type {string}
|
|
@@ -5726,7 +5402,7 @@ interface AssetWithOrders {
|
|
|
5726
5402
|
* @type {Array<Fee>}
|
|
5727
5403
|
* @memberof AssetWithOrders
|
|
5728
5404
|
*/
|
|
5729
|
-
'fees'?: Array<Fee
|
|
5405
|
+
'fees'?: Array<Fee>;
|
|
5730
5406
|
/**
|
|
5731
5407
|
* [DEPRECATED] Internal Immutable X Token ID
|
|
5732
5408
|
* @type {string}
|
|
@@ -9224,7 +8900,7 @@ interface Mint {
|
|
|
9224
8900
|
* @type {Array<Fee>}
|
|
9225
8901
|
* @memberof Mint
|
|
9226
8902
|
*/
|
|
9227
|
-
'fees'?: Array<Fee
|
|
8903
|
+
'fees'?: Array<Fee>;
|
|
9228
8904
|
/**
|
|
9229
8905
|
* Status of this mint
|
|
9230
8906
|
* @type {string}
|
|
@@ -9754,7 +9430,7 @@ declare type TradeB = TradeSide;
|
|
|
9754
9430
|
* @export
|
|
9755
9431
|
* @interface Trade
|
|
9756
9432
|
*/
|
|
9757
|
-
interface Trade
|
|
9433
|
+
interface Trade {
|
|
9758
9434
|
/**
|
|
9759
9435
|
*
|
|
9760
9436
|
* @type {TradeA}
|
|
@@ -9822,7 +9498,7 @@ interface ListTradesResponse {
|
|
|
9822
9498
|
* @type {Array<Trade>}
|
|
9823
9499
|
* @memberof ListTradesResponse
|
|
9824
9500
|
*/
|
|
9825
|
-
'result': Array<Trade
|
|
9501
|
+
'result': Array<Trade>;
|
|
9826
9502
|
}
|
|
9827
9503
|
|
|
9828
9504
|
/**
|
|
@@ -13262,7 +12938,7 @@ declare class TradesApi extends BaseAPI {
|
|
|
13262
12938
|
* @throws {RequiredError}
|
|
13263
12939
|
* @memberof TradesApi
|
|
13264
12940
|
*/
|
|
13265
|
-
getTradeV3(requestParameters: TradesApiGetTradeV3Request, options?: AxiosRequestConfig): Promise<AxiosResponse<Trade
|
|
12941
|
+
getTradeV3(requestParameters: TradesApiGetTradeV3Request, options?: AxiosRequestConfig): Promise<AxiosResponse<Trade, any>>;
|
|
13266
12942
|
/**
|
|
13267
12943
|
* Get a list of trades (V3)
|
|
13268
12944
|
* @summary Get a list of trades (V3)
|
|
@@ -14244,7 +13920,7 @@ declare class ImmutableXClient {
|
|
|
14244
13920
|
* @returns a promise that resolves with the requested Trade
|
|
14245
13921
|
* @throws {@link index.IMXError}
|
|
14246
13922
|
*/
|
|
14247
|
-
getTrade(request: TradesApiGetTradeV3Request): Promise<Trade
|
|
13923
|
+
getTrade(request: TradesApiGetTradeV3Request): Promise<Trade>;
|
|
14248
13924
|
/**
|
|
14249
13925
|
* Get a list of Trades
|
|
14250
13926
|
* @param request - optional object containing the parameters to be provided in the API request
|
|
@@ -14765,1104 +14441,6 @@ declare namespace passport_d {
|
|
|
14765
14441
|
};
|
|
14766
14442
|
}
|
|
14767
14443
|
|
|
14768
|
-
interface OrderbookOverrides {
|
|
14769
|
-
provider?: JsonRpcProvider | Web3Provider;
|
|
14770
|
-
seaportContractAddress?: string;
|
|
14771
|
-
zoneContractAddress?: string;
|
|
14772
|
-
chainName?: string;
|
|
14773
|
-
apiEndpoint?: string;
|
|
14774
|
-
}
|
|
14775
|
-
interface OrderbookModuleConfiguration {
|
|
14776
|
-
seaportContractAddress: string;
|
|
14777
|
-
zoneContractAddress: string;
|
|
14778
|
-
apiEndpoint: string;
|
|
14779
|
-
chainName: string;
|
|
14780
|
-
provider: JsonRpcProvider | Web3Provider;
|
|
14781
|
-
}
|
|
14782
|
-
|
|
14783
|
-
type ApiRequestOptions = {
|
|
14784
|
-
readonly method: 'GET' | 'PUT' | 'POST' | 'DELETE' | 'OPTIONS' | 'HEAD' | 'PATCH';
|
|
14785
|
-
readonly url: string;
|
|
14786
|
-
readonly path?: Record<string, any>;
|
|
14787
|
-
readonly cookies?: Record<string, any>;
|
|
14788
|
-
readonly headers?: Record<string, any>;
|
|
14789
|
-
readonly query?: Record<string, any>;
|
|
14790
|
-
readonly formData?: Record<string, any>;
|
|
14791
|
-
readonly body?: any;
|
|
14792
|
-
readonly mediaType?: string;
|
|
14793
|
-
readonly responseHeader?: string;
|
|
14794
|
-
readonly errors?: Record<number, string>;
|
|
14795
|
-
};
|
|
14796
|
-
|
|
14797
|
-
interface OnCancel {
|
|
14798
|
-
readonly isResolved: boolean;
|
|
14799
|
-
readonly isRejected: boolean;
|
|
14800
|
-
readonly isCancelled: boolean;
|
|
14801
|
-
(cancelHandler: () => void): void;
|
|
14802
|
-
}
|
|
14803
|
-
declare class CancelablePromise<T> implements Promise<T> {
|
|
14804
|
-
readonly [Symbol.toStringTag]: string;
|
|
14805
|
-
private _isResolved;
|
|
14806
|
-
private _isRejected;
|
|
14807
|
-
private _isCancelled;
|
|
14808
|
-
private readonly _cancelHandlers;
|
|
14809
|
-
private readonly _promise;
|
|
14810
|
-
private _resolve?;
|
|
14811
|
-
private _reject?;
|
|
14812
|
-
constructor(executor: (resolve: (value: T | PromiseLike<T>) => void, reject: (reason?: any) => void, onCancel: OnCancel) => void);
|
|
14813
|
-
then<TResult1 = T, TResult2 = never>(onFulfilled?: ((value: T) => TResult1 | PromiseLike<TResult1>) | null, onRejected?: ((reason: any) => TResult2 | PromiseLike<TResult2>) | null): Promise<TResult1 | TResult2>;
|
|
14814
|
-
catch<TResult = never>(onRejected?: ((reason: any) => TResult | PromiseLike<TResult>) | null): Promise<T | TResult>;
|
|
14815
|
-
finally(onFinally?: (() => void) | null): Promise<T>;
|
|
14816
|
-
cancel(): void;
|
|
14817
|
-
get isCancelled(): boolean;
|
|
14818
|
-
}
|
|
14819
|
-
|
|
14820
|
-
type Resolver<T> = (options: ApiRequestOptions) => Promise<T>;
|
|
14821
|
-
type Headers = Record<string, string>;
|
|
14822
|
-
type OpenAPIConfig = {
|
|
14823
|
-
BASE: string;
|
|
14824
|
-
VERSION: string;
|
|
14825
|
-
WITH_CREDENTIALS: boolean;
|
|
14826
|
-
CREDENTIALS: 'include' | 'omit' | 'same-origin';
|
|
14827
|
-
TOKEN?: string | Resolver<string>;
|
|
14828
|
-
USERNAME?: string | Resolver<string>;
|
|
14829
|
-
PASSWORD?: string | Resolver<string>;
|
|
14830
|
-
HEADERS?: Headers | Resolver<Headers>;
|
|
14831
|
-
ENCODE_PATH?: (path: string) => string;
|
|
14832
|
-
};
|
|
14833
|
-
|
|
14834
|
-
declare abstract class BaseHttpRequest {
|
|
14835
|
-
readonly config: OpenAPIConfig;
|
|
14836
|
-
constructor(config: OpenAPIConfig);
|
|
14837
|
-
abstract request<T>(options: ApiRequestOptions): CancelablePromise<T>;
|
|
14838
|
-
}
|
|
14839
|
-
|
|
14840
|
-
type CancelOrdersRequestBody = {
|
|
14841
|
-
/**
|
|
14842
|
-
* Address of the user initiating the cancel request
|
|
14843
|
-
*/
|
|
14844
|
-
account_address: string;
|
|
14845
|
-
/**
|
|
14846
|
-
* List of order ids proposed for cancellation
|
|
14847
|
-
*/
|
|
14848
|
-
orders: Array<string>;
|
|
14849
|
-
/**
|
|
14850
|
-
* Signature generated by the user for the specific cancellation request
|
|
14851
|
-
*/
|
|
14852
|
-
signature: string;
|
|
14853
|
-
};
|
|
14854
|
-
|
|
14855
|
-
type FailedOrderCancellation = {
|
|
14856
|
-
/**
|
|
14857
|
-
* ID of the order which failed to be cancelled
|
|
14858
|
-
*/
|
|
14859
|
-
order: string;
|
|
14860
|
-
/**
|
|
14861
|
-
* Reason code indicating why the order failed to be cancelled
|
|
14862
|
-
*/
|
|
14863
|
-
reason_code: FailedOrderCancellation.reason_code;
|
|
14864
|
-
};
|
|
14865
|
-
declare namespace FailedOrderCancellation {
|
|
14866
|
-
/**
|
|
14867
|
-
* Reason code indicating why the order failed to be cancelled
|
|
14868
|
-
*/
|
|
14869
|
-
enum reason_code {
|
|
14870
|
-
FILLED = "FILLED"
|
|
14871
|
-
}
|
|
14872
|
-
}
|
|
14873
|
-
|
|
14874
|
-
type CancelOrdersResultData = {
|
|
14875
|
-
/**
|
|
14876
|
-
* Orders which were successfully cancelled
|
|
14877
|
-
*/
|
|
14878
|
-
successful_cancellations: Array<string>;
|
|
14879
|
-
/**
|
|
14880
|
-
* Orders which are marked for cancellation but the cancellation cannot be guaranteed
|
|
14881
|
-
*/
|
|
14882
|
-
pending_cancellations: Array<string>;
|
|
14883
|
-
/**
|
|
14884
|
-
* Orders which failed to be cancelled
|
|
14885
|
-
*/
|
|
14886
|
-
failed_cancellations: Array<FailedOrderCancellation>;
|
|
14887
|
-
};
|
|
14888
|
-
|
|
14889
|
-
type CancelOrdersResult = {
|
|
14890
|
-
result: CancelOrdersResultData;
|
|
14891
|
-
};
|
|
14892
|
-
|
|
14893
|
-
/**
|
|
14894
|
-
* The name of chain
|
|
14895
|
-
*/
|
|
14896
|
-
type ChainName = string;
|
|
14897
|
-
|
|
14898
|
-
type Fee$1 = {
|
|
14899
|
-
/**
|
|
14900
|
-
* Fee payable to recipient upon settlement
|
|
14901
|
-
*/
|
|
14902
|
-
amount: string;
|
|
14903
|
-
/**
|
|
14904
|
-
* Fee type
|
|
14905
|
-
*/
|
|
14906
|
-
fee_type: Fee$1.fee_type;
|
|
14907
|
-
/**
|
|
14908
|
-
* Wallet address of fee recipient
|
|
14909
|
-
*/
|
|
14910
|
-
recipient: string;
|
|
14911
|
-
};
|
|
14912
|
-
declare namespace Fee$1 {
|
|
14913
|
-
/**
|
|
14914
|
-
* Fee type
|
|
14915
|
-
*/
|
|
14916
|
-
enum fee_type {
|
|
14917
|
-
ROYALTY = "ROYALTY",
|
|
14918
|
-
MAKER_ECOSYSTEM = "MAKER_ECOSYSTEM",
|
|
14919
|
-
TAKER_ECOSYSTEM = "TAKER_ECOSYSTEM",
|
|
14920
|
-
PROTOCOL = "PROTOCOL"
|
|
14921
|
-
}
|
|
14922
|
-
}
|
|
14923
|
-
|
|
14924
|
-
type ERC20Item$1 = {
|
|
14925
|
-
/**
|
|
14926
|
-
* Token type user is offering, which in this case is ERC20
|
|
14927
|
-
*/
|
|
14928
|
-
item_type: 'ERC20';
|
|
14929
|
-
/**
|
|
14930
|
-
* Address of ERC20 token
|
|
14931
|
-
*/
|
|
14932
|
-
contract_address: string;
|
|
14933
|
-
/**
|
|
14934
|
-
* A string representing the starting price at which the user is willing to sell the token. This value is provided in the smallest unit of the token (e.g., wei for Ethereum).
|
|
14935
|
-
*/
|
|
14936
|
-
start_amount: string;
|
|
14937
|
-
};
|
|
14938
|
-
|
|
14939
|
-
type ERC721Item$1 = {
|
|
14940
|
-
/**
|
|
14941
|
-
* Token type user is offering, which in this case is ERC721
|
|
14942
|
-
*/
|
|
14943
|
-
item_type: 'ERC721';
|
|
14944
|
-
/**
|
|
14945
|
-
* Address of ERC721 token
|
|
14946
|
-
*/
|
|
14947
|
-
contract_address: string;
|
|
14948
|
-
/**
|
|
14949
|
-
* ID of ERC721 token
|
|
14950
|
-
*/
|
|
14951
|
-
token_id: string;
|
|
14952
|
-
};
|
|
14953
|
-
|
|
14954
|
-
type NativeItem$1 = {
|
|
14955
|
-
/**
|
|
14956
|
-
* Token type user is offering, which in this case is the native IMX token
|
|
14957
|
-
*/
|
|
14958
|
-
item_type: 'NATIVE';
|
|
14959
|
-
/**
|
|
14960
|
-
* A string representing the starting price at which the user is willing to sell the token. This value is provided in the smallest unit of the token (e.g., wei for Ethereum).
|
|
14961
|
-
*/
|
|
14962
|
-
start_amount: string;
|
|
14963
|
-
};
|
|
14964
|
-
|
|
14965
|
-
type Item = (NativeItem$1 | ERC20Item$1 | ERC721Item$1);
|
|
14966
|
-
|
|
14967
|
-
type ProtocolData = {
|
|
14968
|
-
/**
|
|
14969
|
-
* The Order type
|
|
14970
|
-
*/
|
|
14971
|
-
order_type: ProtocolData.order_type;
|
|
14972
|
-
/**
|
|
14973
|
-
* Immutable zone address
|
|
14974
|
-
*/
|
|
14975
|
-
zone_address: string;
|
|
14976
|
-
/**
|
|
14977
|
-
* big.Int or uint256 string for order counter
|
|
14978
|
-
*/
|
|
14979
|
-
counter: string;
|
|
14980
|
-
/**
|
|
14981
|
-
* Immutable Seaport contract address
|
|
14982
|
-
*/
|
|
14983
|
-
seaport_address: string;
|
|
14984
|
-
/**
|
|
14985
|
-
* Immutable Seaport contract version
|
|
14986
|
-
*/
|
|
14987
|
-
seaport_version: string;
|
|
14988
|
-
};
|
|
14989
|
-
declare namespace ProtocolData {
|
|
14990
|
-
/**
|
|
14991
|
-
* The Order type
|
|
14992
|
-
*/
|
|
14993
|
-
enum order_type {
|
|
14994
|
-
FULL_RESTRICTED = "FULL_RESTRICTED"
|
|
14995
|
-
}
|
|
14996
|
-
}
|
|
14997
|
-
|
|
14998
|
-
type CreateListingRequestBody = {
|
|
14999
|
-
account_address: string;
|
|
15000
|
-
order_hash: string;
|
|
15001
|
-
/**
|
|
15002
|
-
* Buy item for listing should either be NATIVE or ERC20 item
|
|
15003
|
-
*/
|
|
15004
|
-
buy: Array<Item>;
|
|
15005
|
-
/**
|
|
15006
|
-
* Buy fees should only include maker marketplace fees and should be no more than two entries as more entires will incur more gas. It is best practice to have this as few as possible.
|
|
15007
|
-
*/
|
|
15008
|
-
fees: Array<Fee$1>;
|
|
15009
|
-
/**
|
|
15010
|
-
* Time after which the Order is considered expired
|
|
15011
|
-
*/
|
|
15012
|
-
end_at: string;
|
|
15013
|
-
protocol_data: ProtocolData;
|
|
15014
|
-
/**
|
|
15015
|
-
* A random value added to the create Order request
|
|
15016
|
-
*/
|
|
15017
|
-
salt: string;
|
|
15018
|
-
/**
|
|
15019
|
-
* Sell item for listing should be an ERC721 item
|
|
15020
|
-
*/
|
|
15021
|
-
sell: Array<Item>;
|
|
15022
|
-
/**
|
|
15023
|
-
* Digital signature generated by the user for the specific Order
|
|
15024
|
-
*/
|
|
15025
|
-
signature: string;
|
|
15026
|
-
/**
|
|
15027
|
-
* Time after which Order is considered active
|
|
15028
|
-
*/
|
|
15029
|
-
start_at: string;
|
|
15030
|
-
};
|
|
15031
|
-
|
|
15032
|
-
/**
|
|
15033
|
-
* The chain details
|
|
15034
|
-
*/
|
|
15035
|
-
type Chain = {
|
|
15036
|
-
/**
|
|
15037
|
-
* The id of chain
|
|
15038
|
-
*/
|
|
15039
|
-
id: string;
|
|
15040
|
-
/**
|
|
15041
|
-
* The name of chain
|
|
15042
|
-
*/
|
|
15043
|
-
name: string;
|
|
15044
|
-
};
|
|
15045
|
-
|
|
15046
|
-
type ActiveOrderStatus = {
|
|
15047
|
-
/**
|
|
15048
|
-
* The order status that indicates an order can be fulfilled.
|
|
15049
|
-
*/
|
|
15050
|
-
name: 'ACTIVE';
|
|
15051
|
-
};
|
|
15052
|
-
|
|
15053
|
-
type CancelledOrderStatus = {
|
|
15054
|
-
/**
|
|
15055
|
-
* The order status indicating a order is has been cancelled or about to be cancelled.
|
|
15056
|
-
*/
|
|
15057
|
-
name: 'CANCELLED';
|
|
15058
|
-
/**
|
|
15059
|
-
* Whether the cancellation of the order is pending
|
|
15060
|
-
*/
|
|
15061
|
-
pending: boolean;
|
|
15062
|
-
/**
|
|
15063
|
-
* Whether the cancellation was done on-chain or off-chain
|
|
15064
|
-
*/
|
|
15065
|
-
cancellation_type: CancelledOrderStatus.cancellation_type;
|
|
15066
|
-
};
|
|
15067
|
-
declare namespace CancelledOrderStatus {
|
|
15068
|
-
/**
|
|
15069
|
-
* Whether the cancellation was done on-chain or off-chain
|
|
15070
|
-
*/
|
|
15071
|
-
enum cancellation_type {
|
|
15072
|
-
ON_CHAIN = "ON_CHAIN",
|
|
15073
|
-
OFF_CHAIN = "OFF_CHAIN"
|
|
15074
|
-
}
|
|
15075
|
-
}
|
|
15076
|
-
|
|
15077
|
-
type ExpiredOrderStatus = {
|
|
15078
|
-
/**
|
|
15079
|
-
* A terminal order status indicating that an order cannot be fulfilled due to expiry.
|
|
15080
|
-
*/
|
|
15081
|
-
name: 'EXPIRED';
|
|
15082
|
-
};
|
|
15083
|
-
|
|
15084
|
-
type FilledOrderStatus = {
|
|
15085
|
-
/**
|
|
15086
|
-
* A terminal order status indicating that an order has been fulfilled.
|
|
15087
|
-
*/
|
|
15088
|
-
name: 'FILLED';
|
|
15089
|
-
};
|
|
15090
|
-
|
|
15091
|
-
type InactiveOrderStatus = {
|
|
15092
|
-
/**
|
|
15093
|
-
* The order status that indicates an order cannot be fulfilled.
|
|
15094
|
-
*/
|
|
15095
|
-
name: 'INACTIVE';
|
|
15096
|
-
/**
|
|
15097
|
-
* Whether the order offerer has sufficient approvals
|
|
15098
|
-
*/
|
|
15099
|
-
sufficient_approvals: boolean;
|
|
15100
|
-
/**
|
|
15101
|
-
* Whether the order offerer still has sufficient balance to complete the order
|
|
15102
|
-
*/
|
|
15103
|
-
sufficient_balances: boolean;
|
|
15104
|
-
};
|
|
15105
|
-
|
|
15106
|
-
type PendingOrderStatus = {
|
|
15107
|
-
/**
|
|
15108
|
-
* The order status that indicates the order is yet to be active due to various reasons.
|
|
15109
|
-
*/
|
|
15110
|
-
name: 'PENDING';
|
|
15111
|
-
/**
|
|
15112
|
-
* Whether the order has been evaluated after its creation
|
|
15113
|
-
*/
|
|
15114
|
-
evaluated: boolean;
|
|
15115
|
-
/**
|
|
15116
|
-
* Whether the order has reached its specified start time
|
|
15117
|
-
*/
|
|
15118
|
-
started: boolean;
|
|
15119
|
-
};
|
|
15120
|
-
|
|
15121
|
-
/**
|
|
15122
|
-
* The Order status
|
|
15123
|
-
*/
|
|
15124
|
-
type OrderStatus = (CancelledOrderStatus | PendingOrderStatus | ActiveOrderStatus | InactiveOrderStatus | FilledOrderStatus | ExpiredOrderStatus);
|
|
15125
|
-
|
|
15126
|
-
type Order$1 = {
|
|
15127
|
-
account_address: string;
|
|
15128
|
-
buy: Array<Item>;
|
|
15129
|
-
fees: Array<Fee$1>;
|
|
15130
|
-
chain: Chain;
|
|
15131
|
-
/**
|
|
15132
|
-
* Time the Order is created
|
|
15133
|
-
*/
|
|
15134
|
-
created_at: string;
|
|
15135
|
-
/**
|
|
15136
|
-
* Time after which the Order is considered expired
|
|
15137
|
-
*/
|
|
15138
|
-
end_at: string;
|
|
15139
|
-
/**
|
|
15140
|
-
* Global Order identifier
|
|
15141
|
-
*/
|
|
15142
|
-
id: string;
|
|
15143
|
-
protocol_data: ProtocolData;
|
|
15144
|
-
/**
|
|
15145
|
-
* A random value added to the create Order request
|
|
15146
|
-
*/
|
|
15147
|
-
salt: string;
|
|
15148
|
-
sell: Array<Item>;
|
|
15149
|
-
/**
|
|
15150
|
-
* Digital signature generated by the user for the specific Order
|
|
15151
|
-
*/
|
|
15152
|
-
signature: string;
|
|
15153
|
-
/**
|
|
15154
|
-
* Time after which Order is considered active
|
|
15155
|
-
*/
|
|
15156
|
-
start_at: string;
|
|
15157
|
-
status: OrderStatus;
|
|
15158
|
-
/**
|
|
15159
|
-
* Time the Order is last updated
|
|
15160
|
-
*/
|
|
15161
|
-
updated_at: string;
|
|
15162
|
-
};
|
|
15163
|
-
|
|
15164
|
-
type FulfillableOrder = {
|
|
15165
|
-
extra_data: string;
|
|
15166
|
-
order: Order$1;
|
|
15167
|
-
};
|
|
15168
|
-
|
|
15169
|
-
type FulfillmentDataRequest = {
|
|
15170
|
-
order_id: string;
|
|
15171
|
-
fees: Array<Fee$1>;
|
|
15172
|
-
};
|
|
15173
|
-
|
|
15174
|
-
type ListingResult$1 = {
|
|
15175
|
-
result: Order$1;
|
|
15176
|
-
};
|
|
15177
|
-
|
|
15178
|
-
/**
|
|
15179
|
-
* Pagination properties
|
|
15180
|
-
*/
|
|
15181
|
-
type Page$1 = {
|
|
15182
|
-
/**
|
|
15183
|
-
* First item as an encoded string
|
|
15184
|
-
*/
|
|
15185
|
-
previous_cursor: string | null;
|
|
15186
|
-
/**
|
|
15187
|
-
* Last item as an encoded string
|
|
15188
|
-
*/
|
|
15189
|
-
next_cursor: string | null;
|
|
15190
|
-
};
|
|
15191
|
-
|
|
15192
|
-
type ListListingsResult$1 = {
|
|
15193
|
-
page: Page$1;
|
|
15194
|
-
result: Array<Order$1>;
|
|
15195
|
-
};
|
|
15196
|
-
|
|
15197
|
-
/**
|
|
15198
|
-
* The metadata related to the transaction in which the activity occurred
|
|
15199
|
-
*/
|
|
15200
|
-
type TradeBlockchainMetadata = {
|
|
15201
|
-
/**
|
|
15202
|
-
* The transaction hash of the trade
|
|
15203
|
-
*/
|
|
15204
|
-
transaction_hash: string;
|
|
15205
|
-
/**
|
|
15206
|
-
* EVM block number (uint64 as string)
|
|
15207
|
-
*/
|
|
15208
|
-
block_number: string;
|
|
15209
|
-
/**
|
|
15210
|
-
* Transaction index in a block (uint32 as string)
|
|
15211
|
-
*/
|
|
15212
|
-
transaction_index: string;
|
|
15213
|
-
/**
|
|
15214
|
-
* The log index of the fulfillment event in a block (uint32 as string)
|
|
15215
|
-
*/
|
|
15216
|
-
log_index: string;
|
|
15217
|
-
};
|
|
15218
|
-
|
|
15219
|
-
type Trade$1 = {
|
|
15220
|
-
buy: Array<Item>;
|
|
15221
|
-
buyer_address: string;
|
|
15222
|
-
buyer_fees: Array<Fee$1>;
|
|
15223
|
-
chain: Chain;
|
|
15224
|
-
order_id: string;
|
|
15225
|
-
blockchain_metadata: TradeBlockchainMetadata;
|
|
15226
|
-
/**
|
|
15227
|
-
* Time the on-chain trade event is indexed by the order book system
|
|
15228
|
-
*/
|
|
15229
|
-
indexed_at: string;
|
|
15230
|
-
/**
|
|
15231
|
-
* Global Trade identifier
|
|
15232
|
-
*/
|
|
15233
|
-
id: string;
|
|
15234
|
-
sell: Array<Item>;
|
|
15235
|
-
seller_address: string;
|
|
15236
|
-
maker_address: string;
|
|
15237
|
-
taker_address: string;
|
|
15238
|
-
};
|
|
15239
|
-
|
|
15240
|
-
type ListTradeResult = {
|
|
15241
|
-
page: Page$1;
|
|
15242
|
-
result: Array<Trade$1>;
|
|
15243
|
-
};
|
|
15244
|
-
|
|
15245
|
-
/**
|
|
15246
|
-
* The Order status
|
|
15247
|
-
*/
|
|
15248
|
-
declare enum OrderStatusName {
|
|
15249
|
-
PENDING = "PENDING",
|
|
15250
|
-
ACTIVE = "ACTIVE",
|
|
15251
|
-
INACTIVE = "INACTIVE",
|
|
15252
|
-
FILLED = "FILLED",
|
|
15253
|
-
EXPIRED = "EXPIRED",
|
|
15254
|
-
CANCELLED = "CANCELLED"
|
|
15255
|
-
}
|
|
15256
|
-
|
|
15257
|
-
/**
|
|
15258
|
-
* Encoded page cursor to retrieve previous or next page. Use the value returned in the response.
|
|
15259
|
-
*/
|
|
15260
|
-
type PageCursor = string;
|
|
15261
|
-
|
|
15262
|
-
/**
|
|
15263
|
-
* Maximum number of items to return
|
|
15264
|
-
*/
|
|
15265
|
-
type PageSize = number;
|
|
15266
|
-
|
|
15267
|
-
type TradeResult$1 = {
|
|
15268
|
-
result: Trade$1;
|
|
15269
|
-
};
|
|
15270
|
-
|
|
15271
|
-
type UnfulfillableOrder$1 = {
|
|
15272
|
-
/**
|
|
15273
|
-
* OrderID for the requested but unfulfillable order
|
|
15274
|
-
*/
|
|
15275
|
-
order_id: string;
|
|
15276
|
-
/**
|
|
15277
|
-
* Nullable string containing error reason if the signing is unsuccessful for the order
|
|
15278
|
-
*/
|
|
15279
|
-
reason: string;
|
|
15280
|
-
};
|
|
15281
|
-
|
|
15282
|
-
declare class OrdersService {
|
|
15283
|
-
readonly httpRequest: BaseHttpRequest;
|
|
15284
|
-
constructor(httpRequest: BaseHttpRequest);
|
|
15285
|
-
/**
|
|
15286
|
-
* Cancel one or more orders
|
|
15287
|
-
* Cancel one or more orders
|
|
15288
|
-
* @returns CancelOrdersResult Orders cancellation response.
|
|
15289
|
-
* @throws ApiError
|
|
15290
|
-
*/
|
|
15291
|
-
cancelOrders({ chainName, requestBody, }: {
|
|
15292
|
-
chainName: ChainName;
|
|
15293
|
-
requestBody: CancelOrdersRequestBody;
|
|
15294
|
-
}): CancelablePromise<CancelOrdersResult>;
|
|
15295
|
-
/**
|
|
15296
|
-
* List all listings
|
|
15297
|
-
* List all listings
|
|
15298
|
-
* @returns ListListingsResult OK response.
|
|
15299
|
-
* @throws ApiError
|
|
15300
|
-
*/
|
|
15301
|
-
listListings({ chainName, status, sellItemContractAddress, buyItemContractAddress, sellItemTokenId, fromUpdatedAt, pageSize, sortBy, sortDirection, pageCursor, }: {
|
|
15302
|
-
chainName: ChainName;
|
|
15303
|
-
/**
|
|
15304
|
-
* Order status to filter by
|
|
15305
|
-
*/
|
|
15306
|
-
status?: OrderStatusName;
|
|
15307
|
-
/**
|
|
15308
|
-
* Sell item contract address to filter by
|
|
15309
|
-
*/
|
|
15310
|
-
sellItemContractAddress?: string;
|
|
15311
|
-
/**
|
|
15312
|
-
* Buy item contract address to filter by
|
|
15313
|
-
*/
|
|
15314
|
-
buyItemContractAddress?: string;
|
|
15315
|
-
/**
|
|
15316
|
-
* Sell item token identifier to filter by
|
|
15317
|
-
*/
|
|
15318
|
-
sellItemTokenId?: string;
|
|
15319
|
-
/**
|
|
15320
|
-
* From updated at including given date
|
|
15321
|
-
*/
|
|
15322
|
-
fromUpdatedAt?: string;
|
|
15323
|
-
/**
|
|
15324
|
-
* Maximum number of orders to return per page
|
|
15325
|
-
*/
|
|
15326
|
-
pageSize?: PageSize;
|
|
15327
|
-
/**
|
|
15328
|
-
* Order field to sort by
|
|
15329
|
-
*/
|
|
15330
|
-
sortBy?: 'created_at' | 'updated_at' | 'buy_item_amount';
|
|
15331
|
-
/**
|
|
15332
|
-
* Ascending or descending direction for sort
|
|
15333
|
-
*/
|
|
15334
|
-
sortDirection?: 'asc' | 'desc';
|
|
15335
|
-
/**
|
|
15336
|
-
* Page cursor to retrieve previous or next page. Use the value returned in the response.
|
|
15337
|
-
*/
|
|
15338
|
-
pageCursor?: PageCursor;
|
|
15339
|
-
}): CancelablePromise<ListListingsResult$1>;
|
|
15340
|
-
/**
|
|
15341
|
-
* Create a listing
|
|
15342
|
-
* Create a listing
|
|
15343
|
-
* @returns ListingResult Created response.
|
|
15344
|
-
* @throws ApiError
|
|
15345
|
-
*/
|
|
15346
|
-
createListing({ chainName, requestBody, }: {
|
|
15347
|
-
chainName: ChainName;
|
|
15348
|
-
requestBody: CreateListingRequestBody;
|
|
15349
|
-
}): CancelablePromise<ListingResult$1>;
|
|
15350
|
-
/**
|
|
15351
|
-
* Get a single listing by ID
|
|
15352
|
-
* Get a single listing by ID
|
|
15353
|
-
* @returns ListingResult OK response.
|
|
15354
|
-
* @throws ApiError
|
|
15355
|
-
*/
|
|
15356
|
-
getListing({ chainName, listingId, }: {
|
|
15357
|
-
chainName: ChainName;
|
|
15358
|
-
/**
|
|
15359
|
-
* Global Order identifier
|
|
15360
|
-
*/
|
|
15361
|
-
listingId: string;
|
|
15362
|
-
}): CancelablePromise<ListingResult$1>;
|
|
15363
|
-
/**
|
|
15364
|
-
* Retrieve fulfillment data for orders
|
|
15365
|
-
* Retrieve signed fulfillment data based on the list of order IDs and corresponding fees.
|
|
15366
|
-
* @returns any Successful response
|
|
15367
|
-
* @throws ApiError
|
|
15368
|
-
*/
|
|
15369
|
-
fulfillmentData({ chainName, requestBody, }: {
|
|
15370
|
-
chainName: ChainName;
|
|
15371
|
-
requestBody: Array<FulfillmentDataRequest>;
|
|
15372
|
-
}): CancelablePromise<{
|
|
15373
|
-
result: {
|
|
15374
|
-
fulfillable_orders: Array<FulfillableOrder>;
|
|
15375
|
-
unfulfillable_orders: Array<UnfulfillableOrder$1>;
|
|
15376
|
-
};
|
|
15377
|
-
}>;
|
|
15378
|
-
/**
|
|
15379
|
-
* List all trades
|
|
15380
|
-
* List all trades
|
|
15381
|
-
* @returns ListTradeResult OK response.
|
|
15382
|
-
* @throws ApiError
|
|
15383
|
-
*/
|
|
15384
|
-
listTrades({ chainName, accountAddress, fromIndexedAt, pageSize, sortBy, sortDirection, pageCursor, }: {
|
|
15385
|
-
chainName: ChainName;
|
|
15386
|
-
accountAddress?: string;
|
|
15387
|
-
/**
|
|
15388
|
-
* From indexed at including given date
|
|
15389
|
-
*/
|
|
15390
|
-
fromIndexedAt?: string;
|
|
15391
|
-
/**
|
|
15392
|
-
* Maximum number of trades to return per page
|
|
15393
|
-
*/
|
|
15394
|
-
pageSize?: PageSize;
|
|
15395
|
-
/**
|
|
15396
|
-
* Trade field to sort by
|
|
15397
|
-
*/
|
|
15398
|
-
sortBy?: 'indexed_at';
|
|
15399
|
-
/**
|
|
15400
|
-
* Ascending or descending direction for sort
|
|
15401
|
-
*/
|
|
15402
|
-
sortDirection?: 'asc' | 'desc';
|
|
15403
|
-
/**
|
|
15404
|
-
* Page cursor to retrieve previous or next page. Use the value returned in the response.
|
|
15405
|
-
*/
|
|
15406
|
-
pageCursor?: PageCursor;
|
|
15407
|
-
}): CancelablePromise<ListTradeResult>;
|
|
15408
|
-
/**
|
|
15409
|
-
* Get a single trade by ID
|
|
15410
|
-
* Get a single trade by ID
|
|
15411
|
-
* @returns TradeResult OK response.
|
|
15412
|
-
* @throws ApiError
|
|
15413
|
-
*/
|
|
15414
|
-
getTrade({ chainName, tradeId, }: {
|
|
15415
|
-
chainName: ChainName;
|
|
15416
|
-
/**
|
|
15417
|
-
* Global Trade identifier
|
|
15418
|
-
*/
|
|
15419
|
-
tradeId: string;
|
|
15420
|
-
}): CancelablePromise<TradeResult$1>;
|
|
15421
|
-
}
|
|
15422
|
-
|
|
15423
|
-
declare enum OrderType {
|
|
15424
|
-
FULL_OPEN = 0,
|
|
15425
|
-
PARTIAL_OPEN = 1,
|
|
15426
|
-
FULL_RESTRICTED = 2,
|
|
15427
|
-
PARTIAL_RESTRICTED = 3
|
|
15428
|
-
}
|
|
15429
|
-
declare enum ItemType {
|
|
15430
|
-
NATIVE = 0,
|
|
15431
|
-
ERC20 = 1,
|
|
15432
|
-
ERC721 = 2,
|
|
15433
|
-
ERC1155 = 3,
|
|
15434
|
-
ERC721_WITH_CRITERIA = 4,
|
|
15435
|
-
ERC1155_WITH_CRITERIA = 5
|
|
15436
|
-
}
|
|
15437
|
-
|
|
15438
|
-
type OfferItem = {
|
|
15439
|
-
itemType: ItemType;
|
|
15440
|
-
token: string;
|
|
15441
|
-
identifierOrCriteria: string;
|
|
15442
|
-
startAmount: string;
|
|
15443
|
-
endAmount: string;
|
|
15444
|
-
};
|
|
15445
|
-
type ConsiderationItem = {
|
|
15446
|
-
itemType: ItemType;
|
|
15447
|
-
token: string;
|
|
15448
|
-
identifierOrCriteria: string;
|
|
15449
|
-
startAmount: string;
|
|
15450
|
-
endAmount: string;
|
|
15451
|
-
recipient: string;
|
|
15452
|
-
};
|
|
15453
|
-
type OrderParameters = {
|
|
15454
|
-
offerer: string;
|
|
15455
|
-
zone: string;
|
|
15456
|
-
orderType: OrderType;
|
|
15457
|
-
startTime: BigNumberish;
|
|
15458
|
-
endTime: BigNumberish;
|
|
15459
|
-
zoneHash: string;
|
|
15460
|
-
salt: string;
|
|
15461
|
-
offer: OfferItem[];
|
|
15462
|
-
consideration: ConsiderationItem[];
|
|
15463
|
-
totalOriginalConsiderationItems: BigNumberish;
|
|
15464
|
-
conduitKey: string;
|
|
15465
|
-
};
|
|
15466
|
-
type OrderComponents = OrderParameters & {
|
|
15467
|
-
counter: BigNumberish;
|
|
15468
|
-
};
|
|
15469
|
-
|
|
15470
|
-
interface ERC721Item {
|
|
15471
|
-
type: 'ERC721';
|
|
15472
|
-
contractAddress: string;
|
|
15473
|
-
tokenId: string;
|
|
15474
|
-
}
|
|
15475
|
-
interface ERC20Item {
|
|
15476
|
-
type: 'ERC20';
|
|
15477
|
-
contractAddress: string;
|
|
15478
|
-
amount: string;
|
|
15479
|
-
}
|
|
15480
|
-
interface NativeItem {
|
|
15481
|
-
type: 'NATIVE';
|
|
15482
|
-
amount: string;
|
|
15483
|
-
}
|
|
15484
|
-
interface RoyaltyInfo {
|
|
15485
|
-
recipient: string;
|
|
15486
|
-
amountRequired: string;
|
|
15487
|
-
}
|
|
15488
|
-
interface PrepareListingParams {
|
|
15489
|
-
makerAddress: string;
|
|
15490
|
-
sell: ERC721Item;
|
|
15491
|
-
buy: ERC20Item | NativeItem;
|
|
15492
|
-
orderExpiry?: Date;
|
|
15493
|
-
}
|
|
15494
|
-
interface PrepareListingResponse {
|
|
15495
|
-
actions: Action[];
|
|
15496
|
-
orderComponents: OrderComponents;
|
|
15497
|
-
orderHash: string;
|
|
15498
|
-
}
|
|
15499
|
-
interface PrepareCancelOrdersResponse {
|
|
15500
|
-
signableAction: SignableAction;
|
|
15501
|
-
}
|
|
15502
|
-
interface CreateListingParams {
|
|
15503
|
-
orderComponents: OrderComponents;
|
|
15504
|
-
orderHash: string;
|
|
15505
|
-
orderSignature: string;
|
|
15506
|
-
makerFees: FeeValue[];
|
|
15507
|
-
}
|
|
15508
|
-
type ListListingsParams = Omit<Parameters<typeof OrdersService.prototype.listListings>[0], 'chainName'>;
|
|
15509
|
-
type ListTradesParams = Omit<Parameters<typeof OrdersService.prototype.listTrades>[0], 'chainName'>;
|
|
15510
|
-
declare enum FeeType {
|
|
15511
|
-
MAKER_ECOSYSTEM = "MAKER_ECOSYSTEM",
|
|
15512
|
-
TAKER_ECOSYSTEM = "TAKER_ECOSYSTEM",
|
|
15513
|
-
PROTOCOL = "PROTOCOL",
|
|
15514
|
-
ROYALTY = "ROYALTY"
|
|
15515
|
-
}
|
|
15516
|
-
interface FeeValue {
|
|
15517
|
-
recipient: string;
|
|
15518
|
-
amount: string;
|
|
15519
|
-
}
|
|
15520
|
-
interface Fee extends FeeValue {
|
|
15521
|
-
type: FeeType;
|
|
15522
|
-
}
|
|
15523
|
-
declare enum TransactionPurpose {
|
|
15524
|
-
APPROVAL = "APPROVAL",
|
|
15525
|
-
FULFILL_ORDER = "FULFILL_ORDER",
|
|
15526
|
-
CANCEL = "CANCEL"
|
|
15527
|
-
}
|
|
15528
|
-
declare enum SignablePurpose {
|
|
15529
|
-
CREATE_LISTING = "CREATE_LISTING",
|
|
15530
|
-
OFF_CHAIN_CANCELLATION = "OFF_CHAIN_CANCELLATION"
|
|
15531
|
-
}
|
|
15532
|
-
declare enum ActionType {
|
|
15533
|
-
TRANSACTION = "TRANSACTION",
|
|
15534
|
-
SIGNABLE = "SIGNABLE"
|
|
15535
|
-
}
|
|
15536
|
-
type TransactionBuilder = () => Promise<PopulatedTransaction>;
|
|
15537
|
-
interface TransactionAction {
|
|
15538
|
-
type: ActionType.TRANSACTION;
|
|
15539
|
-
purpose: TransactionPurpose;
|
|
15540
|
-
buildTransaction: TransactionBuilder;
|
|
15541
|
-
}
|
|
15542
|
-
interface SignableAction {
|
|
15543
|
-
type: ActionType.SIGNABLE;
|
|
15544
|
-
purpose: SignablePurpose;
|
|
15545
|
-
message: {
|
|
15546
|
-
domain: TypedDataDomain;
|
|
15547
|
-
types: Record<string, TypedDataField[]>;
|
|
15548
|
-
value: Record<string, any>;
|
|
15549
|
-
};
|
|
15550
|
-
}
|
|
15551
|
-
type Action = TransactionAction | SignableAction;
|
|
15552
|
-
interface FulfillmentListing {
|
|
15553
|
-
listingId: string;
|
|
15554
|
-
takerFees: Array<FeeValue>;
|
|
15555
|
-
}
|
|
15556
|
-
type FulfillBulkOrdersResponse = FulfillBulkOrdersInsufficientBalanceResponse | FulfillBulkOrdersSufficientBalanceResponse;
|
|
15557
|
-
interface FulfillBulkOrdersSufficientBalanceResponse {
|
|
15558
|
-
sufficientBalance: true;
|
|
15559
|
-
actions: Action[];
|
|
15560
|
-
expiration: string;
|
|
15561
|
-
fulfillableOrders: Order[];
|
|
15562
|
-
unfulfillableOrders: UnfulfillableOrder[];
|
|
15563
|
-
}
|
|
15564
|
-
interface FulfillBulkOrdersInsufficientBalanceResponse {
|
|
15565
|
-
sufficientBalance: false;
|
|
15566
|
-
fulfillableOrders: Order[];
|
|
15567
|
-
unfulfillableOrders: UnfulfillableOrder[];
|
|
15568
|
-
}
|
|
15569
|
-
interface UnfulfillableOrder {
|
|
15570
|
-
orderId: string;
|
|
15571
|
-
reason: string;
|
|
15572
|
-
}
|
|
15573
|
-
interface FulfillOrderResponse {
|
|
15574
|
-
actions: Action[];
|
|
15575
|
-
/**
|
|
15576
|
-
* User MUST submit the fulfillment transaction before the expiration
|
|
15577
|
-
* Submitting after the expiration will result in a on chain revert
|
|
15578
|
-
*/
|
|
15579
|
-
expiration: string;
|
|
15580
|
-
order: Order;
|
|
15581
|
-
}
|
|
15582
|
-
interface CancelOrdersOnChainResponse {
|
|
15583
|
-
cancellationAction: TransactionAction;
|
|
15584
|
-
}
|
|
15585
|
-
interface Order {
|
|
15586
|
-
id: string;
|
|
15587
|
-
accountAddress: string;
|
|
15588
|
-
buy: (ERC20Item | NativeItem)[];
|
|
15589
|
-
sell: ERC721Item[];
|
|
15590
|
-
fees: Fee[];
|
|
15591
|
-
chain: {
|
|
15592
|
-
id: string;
|
|
15593
|
-
name: string;
|
|
15594
|
-
};
|
|
15595
|
-
createdAt: string;
|
|
15596
|
-
updatedAt: string;
|
|
15597
|
-
/**
|
|
15598
|
-
* Time after which the Order is considered active
|
|
15599
|
-
*/
|
|
15600
|
-
startAt: string;
|
|
15601
|
-
/**
|
|
15602
|
-
* Time after which the Order is expired
|
|
15603
|
-
*/
|
|
15604
|
-
endAt: string;
|
|
15605
|
-
protocolData: {
|
|
15606
|
-
orderType: 'FULL_RESTRICTED';
|
|
15607
|
-
zoneAddress: string;
|
|
15608
|
-
counter: string;
|
|
15609
|
-
seaportAddress: string;
|
|
15610
|
-
seaportVersion: string;
|
|
15611
|
-
};
|
|
15612
|
-
salt: string;
|
|
15613
|
-
signature: string;
|
|
15614
|
-
status: OrderStatus;
|
|
15615
|
-
}
|
|
15616
|
-
interface ListingResult {
|
|
15617
|
-
result: Order;
|
|
15618
|
-
}
|
|
15619
|
-
interface ListListingsResult {
|
|
15620
|
-
page: Page;
|
|
15621
|
-
result: Order[];
|
|
15622
|
-
}
|
|
15623
|
-
interface Page {
|
|
15624
|
-
/**
|
|
15625
|
-
* First item as an encoded string
|
|
15626
|
-
*/
|
|
15627
|
-
previousCursor: string | null;
|
|
15628
|
-
/**
|
|
15629
|
-
* Last item as an encoded string
|
|
15630
|
-
*/
|
|
15631
|
-
nextCursor: string | null;
|
|
15632
|
-
}
|
|
15633
|
-
interface Trade {
|
|
15634
|
-
id: string;
|
|
15635
|
-
orderId: string;
|
|
15636
|
-
chain: {
|
|
15637
|
-
id: string;
|
|
15638
|
-
name: string;
|
|
15639
|
-
};
|
|
15640
|
-
buy: (ERC20Item | NativeItem)[];
|
|
15641
|
-
sell: ERC721Item[];
|
|
15642
|
-
buyerFees: Fee[];
|
|
15643
|
-
sellerAddress: string;
|
|
15644
|
-
buyerAddress: string;
|
|
15645
|
-
makerAddress: string;
|
|
15646
|
-
takerAddress: string;
|
|
15647
|
-
/**
|
|
15648
|
-
* Time the on-chain event was indexed by the Immutable order book service
|
|
15649
|
-
*/
|
|
15650
|
-
indexedAt: string;
|
|
15651
|
-
blockchainMetadata: {
|
|
15652
|
-
/**
|
|
15653
|
-
* The transaction hash of the trade
|
|
15654
|
-
*/
|
|
15655
|
-
transactionHash: string;
|
|
15656
|
-
/**
|
|
15657
|
-
* EVM block number (uint64 as string)
|
|
15658
|
-
*/
|
|
15659
|
-
blockNumber: string;
|
|
15660
|
-
/**
|
|
15661
|
-
* Transaction index in a block (uint32 as string)
|
|
15662
|
-
*/
|
|
15663
|
-
transactionIndex: string;
|
|
15664
|
-
/**
|
|
15665
|
-
* The log index of the fulfillment event in a block (uint32 as string)
|
|
15666
|
-
*/
|
|
15667
|
-
logIndex: string;
|
|
15668
|
-
};
|
|
15669
|
-
}
|
|
15670
|
-
interface TradeResult {
|
|
15671
|
-
result: Trade;
|
|
15672
|
-
}
|
|
15673
|
-
interface ListTradesResult {
|
|
15674
|
-
page: Page;
|
|
15675
|
-
result: Trade[];
|
|
15676
|
-
}
|
|
15677
|
-
|
|
15678
|
-
/**
|
|
15679
|
-
* zkEVM orderbook SDK
|
|
15680
|
-
* @constructor
|
|
15681
|
-
* @param {OrderbookModuleConfiguration} config - Configuration for Immutable services.
|
|
15682
|
-
*/
|
|
15683
|
-
declare class Orderbook {
|
|
15684
|
-
private apiClient;
|
|
15685
|
-
private seaport;
|
|
15686
|
-
private orderbookConfig;
|
|
15687
|
-
constructor(config: ModuleConfiguration<OrderbookOverrides>);
|
|
15688
|
-
/**
|
|
15689
|
-
* Return the configuration for the orderbook module.
|
|
15690
|
-
* @return {OrderbookModuleConfiguration} The configuration for the orderbook module.
|
|
15691
|
-
*/
|
|
15692
|
-
config(): OrderbookModuleConfiguration;
|
|
15693
|
-
/**
|
|
15694
|
-
* Get an order by ID
|
|
15695
|
-
* @param {string} listingId - The listingId to find.
|
|
15696
|
-
* @return {ListingResult} The returned order result.
|
|
15697
|
-
*/
|
|
15698
|
-
getListing(listingId: string): Promise<ListingResult>;
|
|
15699
|
-
/**
|
|
15700
|
-
* Get a trade by ID
|
|
15701
|
-
* @param {string} tradeId - The tradeId to find.
|
|
15702
|
-
* @return {TradeResult} The returned order result.
|
|
15703
|
-
*/
|
|
15704
|
-
getTrade(tradeId: string): Promise<TradeResult>;
|
|
15705
|
-
/**
|
|
15706
|
-
* List orders. This method is used to get a list of orders filtered by conditions specified
|
|
15707
|
-
* in the params object.
|
|
15708
|
-
* @param {ListListingsParams} listOrderParams - Filtering, ordering and page parameters.
|
|
15709
|
-
* @return {ListListingsResult} The paged orders.
|
|
15710
|
-
*/
|
|
15711
|
-
listListings(listOrderParams: ListListingsParams): Promise<ListListingsResult>;
|
|
15712
|
-
/**
|
|
15713
|
-
* List trades. This method is used to get a list of trades filtered by conditions specified
|
|
15714
|
-
* in the params object
|
|
15715
|
-
* @param {ListTradesParams} listTradesParams - Filtering, ordering and page parameters.
|
|
15716
|
-
* @return {ListTradesResult} The paged trades.
|
|
15717
|
-
*/
|
|
15718
|
-
listTrades(listTradesParams: ListTradesParams): Promise<ListTradesResult>;
|
|
15719
|
-
/**
|
|
15720
|
-
* Get required transactions and messages for signing prior to creating a listing
|
|
15721
|
-
* through the createListing method
|
|
15722
|
-
* @param {PrepareListingParams} prepareListingParams - Details about the listing to be created.
|
|
15723
|
-
* @return {PrepareListingResponse} PrepareListingResponse includes
|
|
15724
|
-
* the unsigned approval transaction, the typed order message for signing and
|
|
15725
|
-
* the order components that can be submitted to `createListing` with a signature.
|
|
15726
|
-
*/
|
|
15727
|
-
prepareListing({ makerAddress, sell, buy, orderExpiry, }: PrepareListingParams): Promise<PrepareListingResponse>;
|
|
15728
|
-
/**
|
|
15729
|
-
* Create an order
|
|
15730
|
-
* @param {CreateListingParams} createListingParams - create an order with the given params.
|
|
15731
|
-
* @return {ListingResult} The result of the order created in the Immutable services.
|
|
15732
|
-
*/
|
|
15733
|
-
createListing(createListingParams: CreateListingParams): Promise<ListingResult>;
|
|
15734
|
-
/**
|
|
15735
|
-
* Get unsigned transactions that can be submitted to fulfil an open order. If the approval
|
|
15736
|
-
* transaction exists it must be signed and submitted to the chain before the fulfilment
|
|
15737
|
-
* transaction can be submitted or it will be reverted.
|
|
15738
|
-
* @param {string} listingId - The listingId to fulfil.
|
|
15739
|
-
* @param {string} fulfillerAddress - The address of the account fulfilling the order.
|
|
15740
|
-
* @return {FulfillOrderResponse} Approval and fulfilment transactions.
|
|
15741
|
-
*/
|
|
15742
|
-
fulfillOrder(listingId: string, takerAddress: string, takerFees: FeeValue[]): Promise<FulfillOrderResponse>;
|
|
15743
|
-
fulfillBulkOrders(listings: Array<FulfillmentListing>, takerAddress: string): Promise<FulfillBulkOrdersResponse>;
|
|
15744
|
-
/**
|
|
15745
|
-
* Cancelling orders is a gasless alternative to on-chain cancellation exposed with
|
|
15746
|
-
* `cancelOrdersOnChain`. For the orderbook to authenticate the cancellation, the creator
|
|
15747
|
-
* of the orders must sign an EIP712 message containing the orderIds
|
|
15748
|
-
* @param {string} orderIds - The orderIds to attempt to cancel.
|
|
15749
|
-
* @return {PrepareCancelOrdersResponse} The signable action to cancel the orders.
|
|
15750
|
-
*/
|
|
15751
|
-
prepareOrderCancellations(orderIds: string[]): Promise<PrepareCancelOrdersResponse>;
|
|
15752
|
-
/**
|
|
15753
|
-
* Cancelling orders is a gasless alternative to on-chain cancellation exposed with
|
|
15754
|
-
* `cancelOrdersOnChain`. Orders cancelled this way cannot be fulfilled and will be removed
|
|
15755
|
-
* from the orderbook. If there is pending fulfillment data outstanding for the order, its
|
|
15756
|
-
* cancellation will be pending until the fulfillment window has passed.
|
|
15757
|
-
* `prepareOffchainOrderCancellations` can be used to get the signable action that is signed
|
|
15758
|
-
* to get the signature required for this call.
|
|
15759
|
-
* @param {string[]} orderIds - The orderIds to attempt to cancel.
|
|
15760
|
-
* @param {string} accountAddress - The address of the account cancelling the orders.
|
|
15761
|
-
* @param {string} accountAddress - The address of the account cancelling the orders.
|
|
15762
|
-
* @return {CancelOrdersResult} The result of the off-chain cancellation request
|
|
15763
|
-
*/
|
|
15764
|
-
cancelOrders(orderIds: string[], accountAddress: string, signature: string): Promise<CancelOrdersResult>;
|
|
15765
|
-
/**
|
|
15766
|
-
* Get an unsigned order cancellation transaction. Orders can only be cancelled by
|
|
15767
|
-
* the account that created them. All of the orders must be from the same seaport contract.
|
|
15768
|
-
* If trying to cancel orders from multiple seaport contracts, group the orderIds by seaport
|
|
15769
|
-
* contract and call this method for each group.
|
|
15770
|
-
* @param {string[]} orderIds - The orderIds to cancel.
|
|
15771
|
-
* @param {string} accountAddress - The address of the account cancelling the order.
|
|
15772
|
-
* @return {CancelOrdersOnChainResponse} The unsigned cancel order action
|
|
15773
|
-
*/
|
|
15774
|
-
cancelOrdersOnChain(orderIds: string[], accountAddress: string): Promise<CancelOrdersOnChainResponse>;
|
|
15775
|
-
}
|
|
15776
|
-
|
|
15777
|
-
declare const constants: {
|
|
15778
|
-
estimatedFulfillmentGasGwei: number;
|
|
15779
|
-
};
|
|
15780
|
-
|
|
15781
|
-
type orderbook_d_Action = Action;
|
|
15782
|
-
type orderbook_d_ActionType = ActionType;
|
|
15783
|
-
declare const orderbook_d_ActionType: typeof ActionType;
|
|
15784
|
-
type orderbook_d_CancelOrdersOnChainResponse = CancelOrdersOnChainResponse;
|
|
15785
|
-
type orderbook_d_CreateListingParams = CreateListingParams;
|
|
15786
|
-
type orderbook_d_ERC20Item = ERC20Item;
|
|
15787
|
-
type orderbook_d_ERC721Item = ERC721Item;
|
|
15788
|
-
type orderbook_d_Fee = Fee;
|
|
15789
|
-
type orderbook_d_FeeType = FeeType;
|
|
15790
|
-
declare const orderbook_d_FeeType: typeof FeeType;
|
|
15791
|
-
type orderbook_d_FeeValue = FeeValue;
|
|
15792
|
-
type orderbook_d_FulfillBulkOrdersInsufficientBalanceResponse = FulfillBulkOrdersInsufficientBalanceResponse;
|
|
15793
|
-
type orderbook_d_FulfillBulkOrdersResponse = FulfillBulkOrdersResponse;
|
|
15794
|
-
type orderbook_d_FulfillBulkOrdersSufficientBalanceResponse = FulfillBulkOrdersSufficientBalanceResponse;
|
|
15795
|
-
type orderbook_d_FulfillOrderResponse = FulfillOrderResponse;
|
|
15796
|
-
type orderbook_d_FulfillmentListing = FulfillmentListing;
|
|
15797
|
-
type orderbook_d_ListListingsParams = ListListingsParams;
|
|
15798
|
-
type orderbook_d_ListListingsResult = ListListingsResult;
|
|
15799
|
-
type orderbook_d_ListTradesParams = ListTradesParams;
|
|
15800
|
-
type orderbook_d_ListTradesResult = ListTradesResult;
|
|
15801
|
-
type orderbook_d_ListingResult = ListingResult;
|
|
15802
|
-
type orderbook_d_NativeItem = NativeItem;
|
|
15803
|
-
type orderbook_d_Order = Order;
|
|
15804
|
-
type orderbook_d_OrderStatusName = OrderStatusName;
|
|
15805
|
-
declare const orderbook_d_OrderStatusName: typeof OrderStatusName;
|
|
15806
|
-
type orderbook_d_Orderbook = Orderbook;
|
|
15807
|
-
declare const orderbook_d_Orderbook: typeof Orderbook;
|
|
15808
|
-
type orderbook_d_Page = Page;
|
|
15809
|
-
type orderbook_d_PrepareCancelOrdersResponse = PrepareCancelOrdersResponse;
|
|
15810
|
-
type orderbook_d_PrepareListingParams = PrepareListingParams;
|
|
15811
|
-
type orderbook_d_PrepareListingResponse = PrepareListingResponse;
|
|
15812
|
-
type orderbook_d_RoyaltyInfo = RoyaltyInfo;
|
|
15813
|
-
type orderbook_d_SignableAction = SignableAction;
|
|
15814
|
-
type orderbook_d_SignablePurpose = SignablePurpose;
|
|
15815
|
-
declare const orderbook_d_SignablePurpose: typeof SignablePurpose;
|
|
15816
|
-
type orderbook_d_Trade = Trade;
|
|
15817
|
-
type orderbook_d_TradeResult = TradeResult;
|
|
15818
|
-
type orderbook_d_TransactionAction = TransactionAction;
|
|
15819
|
-
type orderbook_d_TransactionBuilder = TransactionBuilder;
|
|
15820
|
-
type orderbook_d_TransactionPurpose = TransactionPurpose;
|
|
15821
|
-
declare const orderbook_d_TransactionPurpose: typeof TransactionPurpose;
|
|
15822
|
-
type orderbook_d_UnfulfillableOrder = UnfulfillableOrder;
|
|
15823
|
-
declare const orderbook_d_constants: typeof constants;
|
|
15824
|
-
declare namespace orderbook_d {
|
|
15825
|
-
export {
|
|
15826
|
-
orderbook_d_Action as Action,
|
|
15827
|
-
orderbook_d_ActionType as ActionType,
|
|
15828
|
-
orderbook_d_CancelOrdersOnChainResponse as CancelOrdersOnChainResponse,
|
|
15829
|
-
orderbook_d_CreateListingParams as CreateListingParams,
|
|
15830
|
-
orderbook_d_ERC20Item as ERC20Item,
|
|
15831
|
-
orderbook_d_ERC721Item as ERC721Item,
|
|
15832
|
-
orderbook_d_Fee as Fee,
|
|
15833
|
-
orderbook_d_FeeType as FeeType,
|
|
15834
|
-
orderbook_d_FeeValue as FeeValue,
|
|
15835
|
-
orderbook_d_FulfillBulkOrdersInsufficientBalanceResponse as FulfillBulkOrdersInsufficientBalanceResponse,
|
|
15836
|
-
orderbook_d_FulfillBulkOrdersResponse as FulfillBulkOrdersResponse,
|
|
15837
|
-
orderbook_d_FulfillBulkOrdersSufficientBalanceResponse as FulfillBulkOrdersSufficientBalanceResponse,
|
|
15838
|
-
orderbook_d_FulfillOrderResponse as FulfillOrderResponse,
|
|
15839
|
-
orderbook_d_FulfillmentListing as FulfillmentListing,
|
|
15840
|
-
orderbook_d_ListListingsParams as ListListingsParams,
|
|
15841
|
-
orderbook_d_ListListingsResult as ListListingsResult,
|
|
15842
|
-
orderbook_d_ListTradesParams as ListTradesParams,
|
|
15843
|
-
orderbook_d_ListTradesResult as ListTradesResult,
|
|
15844
|
-
orderbook_d_ListingResult as ListingResult,
|
|
15845
|
-
orderbook_d_NativeItem as NativeItem,
|
|
15846
|
-
orderbook_d_Order as Order,
|
|
15847
|
-
orderbook_d_OrderStatusName as OrderStatusName,
|
|
15848
|
-
orderbook_d_Orderbook as Orderbook,
|
|
15849
|
-
orderbook_d_Page as Page,
|
|
15850
|
-
orderbook_d_PrepareCancelOrdersResponse as PrepareCancelOrdersResponse,
|
|
15851
|
-
orderbook_d_PrepareListingParams as PrepareListingParams,
|
|
15852
|
-
orderbook_d_PrepareListingResponse as PrepareListingResponse,
|
|
15853
|
-
orderbook_d_RoyaltyInfo as RoyaltyInfo,
|
|
15854
|
-
orderbook_d_SignableAction as SignableAction,
|
|
15855
|
-
orderbook_d_SignablePurpose as SignablePurpose,
|
|
15856
|
-
orderbook_d_Trade as Trade,
|
|
15857
|
-
orderbook_d_TradeResult as TradeResult,
|
|
15858
|
-
orderbook_d_TransactionAction as TransactionAction,
|
|
15859
|
-
orderbook_d_TransactionBuilder as TransactionBuilder,
|
|
15860
|
-
orderbook_d_TransactionPurpose as TransactionPurpose,
|
|
15861
|
-
orderbook_d_UnfulfillableOrder as UnfulfillableOrder,
|
|
15862
|
-
orderbook_d_constants as constants,
|
|
15863
|
-
};
|
|
15864
|
-
}
|
|
15865
|
-
|
|
15866
14444
|
type provider_d_GenericIMXProvider = GenericIMXProvider;
|
|
15867
14445
|
declare const provider_d_GenericIMXProvider: typeof GenericIMXProvider;
|
|
15868
14446
|
type provider_d_IMXProvider = IMXProvider;
|
|
@@ -15879,4 +14457,4 @@ declare namespace provider_d {
|
|
|
15879
14457
|
};
|
|
15880
14458
|
}
|
|
15881
14459
|
|
|
15882
|
-
export { blockchain_data_d as blockchainData, config_d as config, immutablex_client_d as immutablexClient,
|
|
14460
|
+
export { blockchain_data_d as blockchainData, config_d as config, immutablex_client_d as immutablexClient, passport_d as passport, provider_d as provider };
|