@imtbl/sdk 0.28.5-alpha.3 → 0.28.6-alpha

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/index.d.ts CHANGED
@@ -1,3 +1,6 @@
1
+ /// <reference types="node" />
2
+ import { ProviderConfiguration as ProviderConfiguration$1, ExchangeContracts } from 'config';
3
+
1
4
  declare enum Environment {
2
5
  PRODUCTION = "production",
3
6
  SANDBOX = "sandbox"
@@ -871,7 +874,7 @@ interface BlockchainMetadata {
871
874
  * @export
872
875
  * @interface Chain
873
876
  */
874
- interface Chain {
877
+ interface Chain$1 {
875
878
  /**
876
879
  * The id of chain
877
880
  * @type {string}
@@ -915,7 +918,7 @@ interface Activity {
915
918
  * @type {Chain}
916
919
  * @memberof Activity
917
920
  */
918
- 'chain': Chain;
921
+ 'chain': Chain$1;
919
922
  /**
920
923
  *
921
924
  * @type {ActivityType}
@@ -958,7 +961,7 @@ interface Activity {
958
961
  * @type ChainWithDetails
959
962
  * @export
960
963
  */
961
- type ChainWithDetails = Chain;
964
+ type ChainWithDetails = Chain$1;
962
965
 
963
966
  /**
964
967
  * Immutable zkEVM API
@@ -1004,7 +1007,7 @@ interface Collection$1 {
1004
1007
  * @type {Chain}
1005
1008
  * @memberof Collection
1006
1009
  */
1007
- 'chain': Chain;
1010
+ 'chain': Chain$1;
1008
1011
  /**
1009
1012
  * The name of the collection
1010
1013
  * @type {string}
@@ -1271,7 +1274,7 @@ interface Metadata {
1271
1274
  * @type {Chain}
1272
1275
  * @memberof Metadata
1273
1276
  */
1274
- 'chain': Chain;
1277
+ 'chain': Chain$1;
1275
1278
  /**
1276
1279
  * The contract address of the metadata
1277
1280
  * @type {string}
@@ -1383,7 +1386,7 @@ interface NFT {
1383
1386
  * @type {Chain}
1384
1387
  * @memberof NFT
1385
1388
  */
1386
- 'chain': Chain;
1389
+ 'chain': Chain$1;
1387
1390
  /**
1388
1391
  * An `uint256` token id as string
1389
1392
  * @type {string}
@@ -1558,7 +1561,7 @@ interface Token$1 {
1558
1561
  * @type {Chain}
1559
1562
  * @memberof Token
1560
1563
  */
1561
- 'chain': Chain;
1564
+ 'chain': Chain$1;
1562
1565
  /**
1563
1566
  * The address of token contract
1564
1567
  * @type {string}
@@ -1645,7 +1648,7 @@ interface GetTokenResult {
1645
1648
  * @export
1646
1649
  * @interface Page
1647
1650
  */
1648
- interface Page {
1651
+ interface Page$2 {
1649
1652
  /**
1650
1653
  * First item as an encoded string
1651
1654
  * @type {string}
@@ -1689,7 +1692,7 @@ interface ListActivitiesResult {
1689
1692
  * @type {Page}
1690
1693
  * @memberof ListActivitiesResult
1691
1694
  */
1692
- 'page': Page;
1695
+ 'page': Page$2;
1693
1696
  }
1694
1697
 
1695
1698
  /**
@@ -1721,7 +1724,7 @@ interface ListChainsResult {
1721
1724
  * @type {Page}
1722
1725
  * @memberof ListChainsResult
1723
1726
  */
1724
- 'page': Page;
1727
+ 'page': Page$2;
1725
1728
  }
1726
1729
 
1727
1730
  /**
@@ -1747,7 +1750,7 @@ interface NFTWithOwner {
1747
1750
  * @type {Chain}
1748
1751
  * @memberof NFTWithOwner
1749
1752
  */
1750
- 'chain': Chain;
1753
+ 'chain': Chain$1;
1751
1754
  /**
1752
1755
  * The address of NFT contract
1753
1756
  * @type {string}
@@ -1809,7 +1812,7 @@ interface ListCollectionOwnersResult {
1809
1812
  * @type {Page}
1810
1813
  * @memberof ListCollectionOwnersResult
1811
1814
  */
1812
- 'page': Page;
1815
+ 'page': Page$2;
1813
1816
  }
1814
1817
 
1815
1818
  /**
@@ -1841,7 +1844,7 @@ interface ListCollectionsResult {
1841
1844
  * @type {Page}
1842
1845
  * @memberof ListCollectionsResult
1843
1846
  */
1844
- 'page': Page;
1847
+ 'page': Page$2;
1845
1848
  }
1846
1849
 
1847
1850
  /**
@@ -1873,7 +1876,7 @@ interface ListMetadataResult {
1873
1876
  * @type {Page}
1874
1877
  * @memberof ListMetadataResult
1875
1878
  */
1876
- 'page': Page;
1879
+ 'page': Page$2;
1877
1880
  }
1878
1881
 
1879
1882
  /**
@@ -1899,7 +1902,7 @@ interface NFTOwner {
1899
1902
  * @type {Chain}
1900
1903
  * @memberof NFTOwner
1901
1904
  */
1902
- 'chain': Chain;
1905
+ 'chain': Chain$1;
1903
1906
  /**
1904
1907
  * The address of NFT contract
1905
1908
  * @type {string}
@@ -1961,7 +1964,7 @@ interface ListNFTOwnersResult {
1961
1964
  * @type {Page}
1962
1965
  * @memberof ListNFTOwnersResult
1963
1966
  */
1964
- 'page': Page;
1967
+ 'page': Page$2;
1965
1968
  }
1966
1969
 
1967
1970
  /**
@@ -1993,7 +1996,7 @@ interface ListNFTsResult {
1993
1996
  * @type {Page}
1994
1997
  * @memberof ListNFTsResult
1995
1998
  */
1996
- 'page': Page;
1999
+ 'page': Page$2;
1997
2000
  }
1998
2001
 
1999
2002
  /**
@@ -2025,7 +2028,7 @@ interface ListTokensResult {
2025
2028
  * @type {Page}
2026
2029
  * @memberof ListTokensResult
2027
2030
  */
2028
- 'page': Page;
2031
+ 'page': Page$2;
2029
2032
  }
2030
2033
 
2031
2034
  /**
@@ -2126,7 +2129,7 @@ interface RefreshCollectionMetadataResult {
2126
2129
  * @type {Chain}
2127
2130
  * @memberof RefreshCollectionMetadataResult
2128
2131
  */
2129
- 'chain': Chain;
2132
+ 'chain': Chain$1;
2130
2133
  /**
2131
2134
  *
2132
2135
  * @type {CollectionMetadata}
@@ -3959,6 +3962,7 @@ declare type Network = {
3959
3962
  ensAddress?: string;
3960
3963
  _defaultProvider?: (providers: any, options?: any) => any;
3961
3964
  };
3965
+ declare type Networkish = Network | string | number;
3962
3966
 
3963
3967
  declare type AccessList = Array<{
3964
3968
  address: string;
@@ -3984,6 +3988,23 @@ interface Transaction {
3984
3988
  maxFeePerGas?: BigNumber;
3985
3989
  }
3986
3990
 
3991
+ declare type ConnectionInfo = {
3992
+ url: string;
3993
+ headers?: {
3994
+ [key: string]: string | number;
3995
+ };
3996
+ user?: string;
3997
+ password?: string;
3998
+ allowInsecureAuthentication?: boolean;
3999
+ allowGzip?: boolean;
4000
+ throttleLimit?: number;
4001
+ throttleSlotInterval?: number;
4002
+ throttleCallback?: (attempt: number, url: string) => Promise<boolean>;
4003
+ skipFetchSetup?: boolean;
4004
+ fetchOptions?: Record<string, string>;
4005
+ errorPassThrough?: boolean;
4006
+ timeout?: number;
4007
+ };
3987
4008
  interface OnceBlockable {
3988
4009
  once(eventName: "block", handler: () => void): void;
3989
4010
  }
@@ -4079,6 +4100,9 @@ interface Filter extends EventFilter {
4079
4100
  fromBlock?: BlockTag;
4080
4101
  toBlock?: BlockTag;
4081
4102
  }
4103
+ interface FilterByBlockHash extends EventFilter {
4104
+ blockHash?: string;
4105
+ }
4082
4106
  declare abstract class ForkEvent extends Description {
4083
4107
  readonly expiry: number;
4084
4108
  readonly _isForkEvent?: boolean;
@@ -4120,6 +4144,20 @@ declare abstract class Provider$1 implements OnceBlockable {
4120
4144
  static isProvider(value: any): value is Provider$1;
4121
4145
  }
4122
4146
 
4147
+ interface TypedDataDomain {
4148
+ name?: string;
4149
+ version?: string;
4150
+ chainId?: BigNumberish;
4151
+ verifyingContract?: string;
4152
+ salt?: BytesLike;
4153
+ }
4154
+ interface TypedDataField {
4155
+ name: string;
4156
+ type: string;
4157
+ }
4158
+ interface TypedDataSigner {
4159
+ _signTypedData(domain: TypedDataDomain, types: Record<string, Array<TypedDataField>>, value: Record<string, any>): Promise<string>;
4160
+ }
4123
4161
  declare abstract class Signer {
4124
4162
  readonly provider?: Provider$1;
4125
4163
  abstract getAddress(): Promise<string>;
@@ -4143,6 +4181,294 @@ declare abstract class Signer {
4143
4181
  static isSigner(value: any): value is Signer;
4144
4182
  }
4145
4183
 
4184
+ interface PopulatedTransaction {
4185
+ to?: string;
4186
+ from?: string;
4187
+ nonce?: number;
4188
+ gasLimit?: BigNumber;
4189
+ gasPrice?: BigNumber;
4190
+ data?: string;
4191
+ value?: BigNumber;
4192
+ chainId?: number;
4193
+ type?: number;
4194
+ accessList?: AccessList;
4195
+ maxFeePerGas?: BigNumber;
4196
+ maxPriorityFeePerGas?: BigNumber;
4197
+ customData?: Record<string, any>;
4198
+ ccipReadEnabled?: boolean;
4199
+ }
4200
+
4201
+ declare type FormatFunc = (value: any) => any;
4202
+ declare type FormatFuncs = {
4203
+ [key: string]: FormatFunc;
4204
+ };
4205
+ declare type Formats = {
4206
+ transaction: FormatFuncs;
4207
+ transactionRequest: FormatFuncs;
4208
+ receipt: FormatFuncs;
4209
+ receiptLog: FormatFuncs;
4210
+ block: FormatFuncs;
4211
+ blockWithTransactions: FormatFuncs;
4212
+ filter: FormatFuncs;
4213
+ filterLog: FormatFuncs;
4214
+ };
4215
+ declare class Formatter {
4216
+ readonly formats: Formats;
4217
+ constructor();
4218
+ getDefaultFormats(): Formats;
4219
+ accessList(accessList: Array<any>): AccessList;
4220
+ number(number: any): number;
4221
+ type(number: any): number;
4222
+ bigNumber(value: any): BigNumber;
4223
+ boolean(value: any): boolean;
4224
+ hex(value: any, strict?: boolean): string;
4225
+ data(value: any, strict?: boolean): string;
4226
+ address(value: any): string;
4227
+ callAddress(value: any): string;
4228
+ contractAddress(value: any): string;
4229
+ blockTag(blockTag: any): string;
4230
+ hash(value: any, strict?: boolean): string;
4231
+ difficulty(value: any): number;
4232
+ uint256(value: any): string;
4233
+ _block(value: any, format: any): Block;
4234
+ block(value: any): Block;
4235
+ blockWithTransactions(value: any): Block;
4236
+ transactionRequest(value: any): any;
4237
+ transactionResponse(transaction: any): TransactionResponse;
4238
+ transaction(value: any): any;
4239
+ receiptLog(value: any): any;
4240
+ receipt(value: any): TransactionReceipt;
4241
+ topics(value: any): any;
4242
+ filter(value: any): any;
4243
+ filterLog(value: any): any;
4244
+ static check(format: {
4245
+ [name: string]: FormatFunc;
4246
+ }, object: any): any;
4247
+ static allowNull(format: FormatFunc, nullValue?: any): FormatFunc;
4248
+ static allowFalsish(format: FormatFunc, replaceValue: any): FormatFunc;
4249
+ static arrayOf(format: FormatFunc): FormatFunc;
4250
+ }
4251
+
4252
+ declare class Event {
4253
+ readonly listener: Listener;
4254
+ readonly once: boolean;
4255
+ readonly tag: string;
4256
+ _lastBlockNumber: number;
4257
+ _inflight: boolean;
4258
+ constructor(tag: string, listener: Listener, once: boolean);
4259
+ get event(): EventType;
4260
+ get type(): string;
4261
+ get hash(): string;
4262
+ get filter(): Filter;
4263
+ pollable(): boolean;
4264
+ }
4265
+ interface EnsResolver {
4266
+ readonly name: string;
4267
+ readonly address: string;
4268
+ getAddress(coinType?: 60): Promise<null | string>;
4269
+ getContentHash(): Promise<null | string>;
4270
+ getText(key: string): Promise<null | string>;
4271
+ }
4272
+ interface EnsProvider {
4273
+ resolveName(name: string): Promise<null | string>;
4274
+ lookupAddress(address: string): Promise<null | string>;
4275
+ getResolver(name: string): Promise<null | EnsResolver>;
4276
+ }
4277
+ interface Avatar {
4278
+ url: string;
4279
+ linkage: Array<{
4280
+ type: string;
4281
+ content: string;
4282
+ }>;
4283
+ }
4284
+ declare class Resolver$1 implements EnsResolver {
4285
+ readonly provider: BaseProvider;
4286
+ readonly name: string;
4287
+ readonly address: string;
4288
+ readonly _resolvedAddress: null | string;
4289
+ _supportsEip2544: null | Promise<boolean>;
4290
+ constructor(provider: BaseProvider, address: string, name: string, resolvedAddress?: string);
4291
+ supportsWildcard(): Promise<boolean>;
4292
+ _fetch(selector: string, parameters?: string): Promise<null | string>;
4293
+ _fetchBytes(selector: string, parameters?: string): Promise<null | string>;
4294
+ _getAddress(coinType: number, hexBytes: string): string;
4295
+ getAddress(coinType?: number): Promise<string>;
4296
+ getAvatar(): Promise<null | Avatar>;
4297
+ getContentHash(): Promise<string>;
4298
+ getText(key: string): Promise<string>;
4299
+ }
4300
+ declare class BaseProvider extends Provider$1 implements EnsProvider {
4301
+ _networkPromise: Promise<Network>;
4302
+ _network: Network;
4303
+ _events: Array<Event>;
4304
+ formatter: Formatter;
4305
+ _emitted: {
4306
+ [eventName: string]: number | "pending";
4307
+ };
4308
+ _pollingInterval: number;
4309
+ _poller: NodeJS.Timer;
4310
+ _bootstrapPoll: NodeJS.Timer;
4311
+ _lastBlockNumber: number;
4312
+ _maxFilterBlockRange: number;
4313
+ _fastBlockNumber: number;
4314
+ _fastBlockNumberPromise: Promise<number>;
4315
+ _fastQueryDate: number;
4316
+ _maxInternalBlockNumber: number;
4317
+ _internalBlockNumber: Promise<{
4318
+ blockNumber: number;
4319
+ reqTime: number;
4320
+ respTime: number;
4321
+ }>;
4322
+ readonly anyNetwork: boolean;
4323
+ disableCcipRead: boolean;
4324
+ /**
4325
+ * ready
4326
+ *
4327
+ * A Promise<Network> that resolves only once the provider is ready.
4328
+ *
4329
+ * Sub-classes that call the super with a network without a chainId
4330
+ * MUST set this. Standard named networks have a known chainId.
4331
+ *
4332
+ */
4333
+ constructor(network: Networkish | Promise<Network>);
4334
+ _ready(): Promise<Network>;
4335
+ get ready(): Promise<Network>;
4336
+ static getFormatter(): Formatter;
4337
+ static getNetwork(network: Networkish): Network;
4338
+ ccipReadFetch(tx: Transaction, calldata: string, urls: Array<string>): Promise<null | string>;
4339
+ _getInternalBlockNumber(maxAge: number): Promise<number>;
4340
+ poll(): Promise<void>;
4341
+ resetEventsBlock(blockNumber: number): void;
4342
+ get network(): Network;
4343
+ detectNetwork(): Promise<Network>;
4344
+ getNetwork(): Promise<Network>;
4345
+ get blockNumber(): number;
4346
+ get polling(): boolean;
4347
+ set polling(value: boolean);
4348
+ get pollingInterval(): number;
4349
+ set pollingInterval(value: number);
4350
+ _getFastBlockNumber(): Promise<number>;
4351
+ _setFastBlockNumber(blockNumber: number): void;
4352
+ waitForTransaction(transactionHash: string, confirmations?: number, timeout?: number): Promise<TransactionReceipt>;
4353
+ _waitForTransaction(transactionHash: string, confirmations: number, timeout: number, replaceable: {
4354
+ data: string;
4355
+ from: string;
4356
+ nonce: number;
4357
+ to: string;
4358
+ value: BigNumber;
4359
+ startBlock: number;
4360
+ }): Promise<TransactionReceipt>;
4361
+ getBlockNumber(): Promise<number>;
4362
+ getGasPrice(): Promise<BigNumber>;
4363
+ getBalance(addressOrName: string | Promise<string>, blockTag?: BlockTag | Promise<BlockTag>): Promise<BigNumber>;
4364
+ getTransactionCount(addressOrName: string | Promise<string>, blockTag?: BlockTag | Promise<BlockTag>): Promise<number>;
4365
+ getCode(addressOrName: string | Promise<string>, blockTag?: BlockTag | Promise<BlockTag>): Promise<string>;
4366
+ getStorageAt(addressOrName: string | Promise<string>, position: BigNumberish | Promise<BigNumberish>, blockTag?: BlockTag | Promise<BlockTag>): Promise<string>;
4367
+ _wrapTransaction(tx: Transaction, hash?: string, startBlock?: number): TransactionResponse;
4368
+ sendTransaction(signedTransaction: string | Promise<string>): Promise<TransactionResponse>;
4369
+ _getTransactionRequest(transaction: Deferrable<TransactionRequest>): Promise<Transaction>;
4370
+ _getFilter(filter: Filter | FilterByBlockHash | Promise<Filter | FilterByBlockHash>): Promise<Filter | FilterByBlockHash>;
4371
+ _call(transaction: TransactionRequest, blockTag: BlockTag, attempt: number): Promise<string>;
4372
+ call(transaction: Deferrable<TransactionRequest>, blockTag?: BlockTag | Promise<BlockTag>): Promise<string>;
4373
+ estimateGas(transaction: Deferrable<TransactionRequest>): Promise<BigNumber>;
4374
+ _getAddress(addressOrName: string | Promise<string>): Promise<string>;
4375
+ _getBlock(blockHashOrBlockTag: BlockTag | string | Promise<BlockTag | string>, includeTransactions?: boolean): Promise<Block | BlockWithTransactions>;
4376
+ getBlock(blockHashOrBlockTag: BlockTag | string | Promise<BlockTag | string>): Promise<Block>;
4377
+ getBlockWithTransactions(blockHashOrBlockTag: BlockTag | string | Promise<BlockTag | string>): Promise<BlockWithTransactions>;
4378
+ getTransaction(transactionHash: string | Promise<string>): Promise<TransactionResponse>;
4379
+ getTransactionReceipt(transactionHash: string | Promise<string>): Promise<TransactionReceipt>;
4380
+ getLogs(filter: Filter | FilterByBlockHash | Promise<Filter | FilterByBlockHash>): Promise<Array<Log>>;
4381
+ getEtherPrice(): Promise<number>;
4382
+ _getBlockTag(blockTag: BlockTag | Promise<BlockTag>): Promise<BlockTag>;
4383
+ getResolver(name: string): Promise<null | Resolver$1>;
4384
+ _getResolver(name: string, operation?: string): Promise<string>;
4385
+ resolveName(name: string | Promise<string>): Promise<null | string>;
4386
+ lookupAddress(address: string | Promise<string>): Promise<null | string>;
4387
+ getAvatar(nameOrAddress: string): Promise<null | string>;
4388
+ perform(method: string, params: any): Promise<any>;
4389
+ _startEvent(event: Event): void;
4390
+ _stopEvent(event: Event): void;
4391
+ _addEventListener(eventName: EventType, listener: Listener, once: boolean): this;
4392
+ on(eventName: EventType, listener: Listener): this;
4393
+ once(eventName: EventType, listener: Listener): this;
4394
+ emit(eventName: EventType, ...args: Array<any>): boolean;
4395
+ listenerCount(eventName?: EventType): number;
4396
+ listeners(eventName?: EventType): Array<Listener>;
4397
+ off(eventName: EventType, listener?: Listener): this;
4398
+ removeAllListeners(eventName?: EventType): this;
4399
+ }
4400
+
4401
+ declare class JsonRpcSigner extends Signer implements TypedDataSigner {
4402
+ readonly provider: JsonRpcProvider;
4403
+ _index: number;
4404
+ _address: string;
4405
+ constructor(constructorGuard: any, provider: JsonRpcProvider, addressOrIndex?: string | number);
4406
+ connect(provider: Provider$1): JsonRpcSigner;
4407
+ connectUnchecked(): JsonRpcSigner;
4408
+ getAddress(): Promise<string>;
4409
+ sendUncheckedTransaction(transaction: Deferrable<TransactionRequest>): Promise<string>;
4410
+ signTransaction(transaction: Deferrable<TransactionRequest>): Promise<string>;
4411
+ sendTransaction(transaction: Deferrable<TransactionRequest>): Promise<TransactionResponse>;
4412
+ signMessage(message: Bytes | string): Promise<string>;
4413
+ _legacySignMessage(message: Bytes | string): Promise<string>;
4414
+ _signTypedData(domain: TypedDataDomain, types: Record<string, Array<TypedDataField>>, value: Record<string, any>): Promise<string>;
4415
+ unlock(password: string): Promise<boolean>;
4416
+ }
4417
+ declare class UncheckedJsonRpcSigner extends JsonRpcSigner {
4418
+ sendTransaction(transaction: Deferrable<TransactionRequest>): Promise<TransactionResponse>;
4419
+ }
4420
+ declare class JsonRpcProvider extends BaseProvider {
4421
+ readonly connection: ConnectionInfo;
4422
+ _pendingFilter: Promise<number>;
4423
+ _nextId: number;
4424
+ _eventLoopCache: Record<string, Promise<any>>;
4425
+ get _cache(): Record<string, Promise<any>>;
4426
+ constructor(url?: ConnectionInfo | string, network?: Networkish);
4427
+ static defaultUrl(): string;
4428
+ detectNetwork(): Promise<Network>;
4429
+ _uncachedDetectNetwork(): Promise<Network>;
4430
+ getSigner(addressOrIndex?: string | number): JsonRpcSigner;
4431
+ getUncheckedSigner(addressOrIndex?: string | number): UncheckedJsonRpcSigner;
4432
+ listAccounts(): Promise<Array<string>>;
4433
+ send(method: string, params: Array<any>): Promise<any>;
4434
+ prepareRequest(method: string, params: any): [string, Array<any>];
4435
+ perform(method: string, params: any): Promise<any>;
4436
+ _startEvent(event: Event): void;
4437
+ _startPending(): void;
4438
+ _stopEvent(event: Event): void;
4439
+ static hexlifyTransaction(transaction: TransactionRequest, allowExtra?: {
4440
+ [key: string]: boolean;
4441
+ }): {
4442
+ [key: string]: string | AccessList;
4443
+ };
4444
+ }
4445
+
4446
+ declare type ExternalProvider = {
4447
+ isMetaMask?: boolean;
4448
+ isStatus?: boolean;
4449
+ host?: string;
4450
+ path?: string;
4451
+ sendAsync?: (request: {
4452
+ method: string;
4453
+ params?: Array<any>;
4454
+ }, callback: (error: any, response: any) => void) => void;
4455
+ send?: (request: {
4456
+ method: string;
4457
+ params?: Array<any>;
4458
+ }, callback: (error: any, response: any) => void) => void;
4459
+ request?: (request: {
4460
+ method: string;
4461
+ params?: Array<any>;
4462
+ }) => Promise<any>;
4463
+ };
4464
+ declare type JsonRpcFetchFunc = (method: string, params?: Array<any>) => Promise<any>;
4465
+ declare class Web3Provider extends JsonRpcProvider {
4466
+ readonly provider: ExternalProvider;
4467
+ readonly jsonRpcFetchFunc: JsonRpcFetchFunc;
4468
+ constructor(provider: ExternalProvider | JsonRpcFetchFunc, network?: Networkish);
4469
+ send(method: string, params: Array<any>): Promise<any>;
4470
+ }
4471
+
4146
4472
  // TypeScript Version: 3.0
4147
4473
 
4148
4474
  type AxiosRequestHeaders = Record<string, string | number | boolean>;
@@ -4944,7 +5270,7 @@ declare type FeeTokenData = FeeData;
4944
5270
  * @export
4945
5271
  * @interface FeeToken
4946
5272
  */
4947
- interface FeeToken {
5273
+ interface FeeToken$1 {
4948
5274
  /**
4949
5275
  *
4950
5276
  * @type {FeeTokenData}
@@ -4981,7 +5307,7 @@ declare type FeeTokenTypeEnum = typeof FeeTokenTypeEnum[keyof typeof FeeTokenTyp
4981
5307
  * Details of the fee currency
4982
5308
  * @export
4983
5309
  */
4984
- declare type OrderFeeInfoToken = FeeToken;
5310
+ declare type OrderFeeInfoToken = FeeToken$1;
4985
5311
 
4986
5312
  /**
4987
5313
  * Immutable X API
@@ -5192,7 +5518,7 @@ declare type AssetOrders = OrderDetails;
5192
5518
  * @export
5193
5519
  * @interface Fee
5194
5520
  */
5195
- interface Fee {
5521
+ interface Fee$3 {
5196
5522
  /**
5197
5523
  * Wallet address
5198
5524
  * @type {string}
@@ -5254,7 +5580,7 @@ interface Asset {
5254
5580
  * @type {Array<Fee>}
5255
5581
  * @memberof Asset
5256
5582
  */
5257
- 'fees'?: Array<Fee>;
5583
+ 'fees'?: Array<Fee$3>;
5258
5584
  /**
5259
5585
  * [DEPRECATED] Internal Immutable X Token ID
5260
5586
  * @type {string}
@@ -5402,7 +5728,7 @@ interface AssetWithOrders {
5402
5728
  * @type {Array<Fee>}
5403
5729
  * @memberof AssetWithOrders
5404
5730
  */
5405
- 'fees'?: Array<Fee>;
5731
+ 'fees'?: Array<Fee$3>;
5406
5732
  /**
5407
5733
  * [DEPRECATED] Internal Immutable X Token ID
5408
5734
  * @type {string}
@@ -8900,7 +9226,7 @@ interface Mint {
8900
9226
  * @type {Array<Fee>}
8901
9227
  * @memberof Mint
8902
9228
  */
8903
- 'fees'?: Array<Fee>;
9229
+ 'fees'?: Array<Fee$3>;
8904
9230
  /**
8905
9231
  * Status of this mint
8906
9232
  * @type {string}
@@ -9430,7 +9756,7 @@ declare type TradeB = TradeSide;
9430
9756
  * @export
9431
9757
  * @interface Trade
9432
9758
  */
9433
- interface Trade {
9759
+ interface Trade$2 {
9434
9760
  /**
9435
9761
  *
9436
9762
  * @type {TradeA}
@@ -9498,7 +9824,7 @@ interface ListTradesResponse {
9498
9824
  * @type {Array<Trade>}
9499
9825
  * @memberof ListTradesResponse
9500
9826
  */
9501
- 'result': Array<Trade>;
9827
+ 'result': Array<Trade$2>;
9502
9828
  }
9503
9829
 
9504
9830
  /**
@@ -12938,7 +13264,7 @@ declare class TradesApi extends BaseAPI {
12938
13264
  * @throws {RequiredError}
12939
13265
  * @memberof TradesApi
12940
13266
  */
12941
- getTradeV3(requestParameters: TradesApiGetTradeV3Request, options?: AxiosRequestConfig): Promise<AxiosResponse<Trade, any>>;
13267
+ getTradeV3(requestParameters: TradesApiGetTradeV3Request, options?: AxiosRequestConfig): Promise<AxiosResponse<Trade$2, any>>;
12942
13268
  /**
12943
13269
  * Get a list of trades (V3)
12944
13270
  * @summary Get a list of trades (V3)
@@ -13920,7 +14246,7 @@ declare class ImmutableXClient {
13920
14246
  * @returns a promise that resolves with the requested Trade
13921
14247
  * @throws {@link index.IMXError}
13922
14248
  */
13923
- getTrade(request: TradesApiGetTradeV3Request): Promise<Trade>;
14249
+ getTrade(request: TradesApiGetTradeV3Request): Promise<Trade$2>;
13924
14250
  /**
13925
14251
  * Get a list of Trades
13926
14252
  * @param request - optional object containing the parameters to be provided in the API request
@@ -14095,12 +14421,6 @@ interface IMXProvider {
14095
14421
  * @return {Promise<RegisterUserResponse>} Returns a promise that resolves with the user registration response
14096
14422
  */
14097
14423
  registerOffchain(): Promise<RegisterUserResponse>;
14098
- /**
14099
- * Checks if a User is registered off-chain
14100
- *
14101
- * @return {Promise<boolean>} Returns a promise that resolves with true if the User is registered with IMX, false otherwise
14102
- */
14103
- isRegisteredOffchain(): Promise<boolean>;
14104
14424
  /**
14105
14425
  * Checks if a User is registered on-chain
14106
14426
  *
@@ -14173,23 +14493,11 @@ interface IMXProvider {
14173
14493
  completeWithdrawal(starkPublicKey: string, token: AnyToken): Promise<TransactionResponse>;
14174
14494
  }
14175
14495
 
14176
- interface ProviderOverrides {
14177
- immutableXConfig: ImmutableXConfiguration;
14178
- }
14179
- interface ProviderModuleConfiguration extends ModuleConfiguration<ProviderOverrides> {
14180
- }
14181
- declare class ProviderConfiguration {
14182
- readonly immutableXConfig: ImmutableXConfiguration;
14183
- readonly baseConfig: ImmutableConfiguration;
14184
- constructor({ baseConfig, overrides }: ProviderModuleConfiguration);
14185
- }
14186
-
14187
14496
  declare class GenericIMXProvider implements IMXProvider {
14188
14497
  private readonly config;
14189
14498
  private readonly signers;
14190
- constructor(config: ProviderConfiguration, ethSigner: Signer, starkSigner: StarkSigner);
14499
+ constructor(config: ProviderConfiguration$1, ethSigner: Signer, starkSigner: StarkSigner);
14191
14500
  getAddress(): Promise<string>;
14192
- isRegisteredOffchain(): Promise<boolean>;
14193
14501
  registerOffchain(): Promise<RegisterUserResponse>;
14194
14502
  batchNftTransfer(request: Array<NftTransferDetails>): Promise<CreateTransferResponse>;
14195
14503
  cancelOrder(request: GetSignableCancelOrderRequest): Promise<CancelOrderResponse>;
@@ -14205,11 +14513,22 @@ declare class GenericIMXProvider implements IMXProvider {
14205
14513
 
14206
14514
  declare class MetaMaskIMXProvider extends GenericIMXProvider {
14207
14515
  private static imxSigner;
14208
- static connect(config: ProviderConfiguration): Promise<MetaMaskIMXProvider>;
14516
+ static connect(config: ProviderConfiguration$1): Promise<MetaMaskIMXProvider>;
14209
14517
  static disconnect(): Promise<void>;
14210
14518
  static signMessage(message: string): Promise<string>;
14211
14519
  }
14212
14520
 
14521
+ interface ProviderOverrides {
14522
+ immutableXConfig: ImmutableXConfiguration;
14523
+ }
14524
+ interface ProviderModuleConfiguration extends ModuleConfiguration<ProviderOverrides> {
14525
+ }
14526
+ declare class ProviderConfiguration {
14527
+ readonly immutableXConfig: ImmutableXConfiguration;
14528
+ readonly baseConfig: ImmutableConfiguration;
14529
+ constructor({ baseConfig, overrides }: ProviderModuleConfiguration);
14530
+ }
14531
+
14213
14532
  type UserProfile = {
14214
14533
  email?: string;
14215
14534
  nickname?: string;
@@ -14217,7 +14536,7 @@ type UserProfile = {
14217
14536
  };
14218
14537
  declare enum Networks {
14219
14538
  PRODUCTION = "mainnet",
14220
- SANDBOX = "sepolia"
14539
+ SANDBOX = "goerli"
14221
14540
  }
14222
14541
  interface OidcConfiguration {
14223
14542
  clientId: string;
@@ -14334,7 +14653,7 @@ type Provider = {
14334
14653
  removeListener: (event: string, listener: (...args: any[]) => void) => void;
14335
14654
  isPassport: boolean;
14336
14655
  };
14337
- declare enum ProviderEvent {
14656
+ declare enum ProviderEvent$1 {
14338
14657
  ACCOUNTS_CHANGED = "accountsChanged"
14339
14658
  }
14340
14659
  type AccountsChangedEvent = Array<string>;
@@ -14410,8 +14729,6 @@ type passport_d_PassportOverrides = PassportOverrides;
14410
14729
  type passport_d_Provider = Provider;
14411
14730
  type passport_d_ProviderErrorCode = ProviderErrorCode;
14412
14731
  declare const passport_d_ProviderErrorCode: typeof ProviderErrorCode;
14413
- type passport_d_ProviderEvent = ProviderEvent;
14414
- declare const passport_d_ProviderEvent: typeof ProviderEvent;
14415
14732
  type passport_d_RequestArguments = RequestArguments;
14416
14733
  type passport_d_RpcErrorCode = RpcErrorCode;
14417
14734
  declare const passport_d_RpcErrorCode: typeof RpcErrorCode;
@@ -14433,7 +14750,7 @@ declare namespace passport_d {
14433
14750
  passport_d_PassportOverrides as PassportOverrides,
14434
14751
  passport_d_Provider as Provider,
14435
14752
  passport_d_ProviderErrorCode as ProviderErrorCode,
14436
- passport_d_ProviderEvent as ProviderEvent,
14753
+ ProviderEvent$1 as ProviderEvent,
14437
14754
  passport_d_RequestArguments as RequestArguments,
14438
14755
  passport_d_RpcErrorCode as RpcErrorCode,
14439
14756
  passport_d_TypedDataPayload as TypedDataPayload,
@@ -14441,20 +14758,3538 @@ declare namespace passport_d {
14441
14758
  };
14442
14759
  }
14443
14760
 
14444
- type provider_d_GenericIMXProvider = GenericIMXProvider;
14445
- declare const provider_d_GenericIMXProvider: typeof GenericIMXProvider;
14446
- type provider_d_IMXProvider = IMXProvider;
14447
- type provider_d_MetaMaskIMXProvider = MetaMaskIMXProvider;
14448
- declare const provider_d_MetaMaskIMXProvider: typeof MetaMaskIMXProvider;
14449
- type provider_d_ProviderConfiguration = ProviderConfiguration;
14450
- declare const provider_d_ProviderConfiguration: typeof ProviderConfiguration;
14451
- declare namespace provider_d {
14452
- export {
14453
- provider_d_GenericIMXProvider as GenericIMXProvider,
14454
- provider_d_IMXProvider as IMXProvider,
14455
- provider_d_MetaMaskIMXProvider as MetaMaskIMXProvider,
14456
- provider_d_ProviderConfiguration as ProviderConfiguration,
14761
+ interface OrderbookOverrides {
14762
+ provider?: JsonRpcProvider | Web3Provider;
14763
+ seaportContractAddress?: string;
14764
+ zoneContractAddress?: string;
14765
+ chainName?: string;
14766
+ apiEndpoint?: string;
14767
+ }
14768
+ interface OrderbookModuleConfiguration {
14769
+ seaportContractAddress: string;
14770
+ zoneContractAddress: string;
14771
+ apiEndpoint: string;
14772
+ chainName: string;
14773
+ provider: JsonRpcProvider | Web3Provider;
14774
+ }
14775
+
14776
+ type ApiRequestOptions = {
14777
+ readonly method: 'GET' | 'PUT' | 'POST' | 'DELETE' | 'OPTIONS' | 'HEAD' | 'PATCH';
14778
+ readonly url: string;
14779
+ readonly path?: Record<string, any>;
14780
+ readonly cookies?: Record<string, any>;
14781
+ readonly headers?: Record<string, any>;
14782
+ readonly query?: Record<string, any>;
14783
+ readonly formData?: Record<string, any>;
14784
+ readonly body?: any;
14785
+ readonly mediaType?: string;
14786
+ readonly responseHeader?: string;
14787
+ readonly errors?: Record<number, string>;
14788
+ };
14789
+
14790
+ interface OnCancel {
14791
+ readonly isResolved: boolean;
14792
+ readonly isRejected: boolean;
14793
+ readonly isCancelled: boolean;
14794
+ (cancelHandler: () => void): void;
14795
+ }
14796
+ declare class CancelablePromise<T> implements Promise<T> {
14797
+ readonly [Symbol.toStringTag]: string;
14798
+ private _isResolved;
14799
+ private _isRejected;
14800
+ private _isCancelled;
14801
+ private readonly _cancelHandlers;
14802
+ private readonly _promise;
14803
+ private _resolve?;
14804
+ private _reject?;
14805
+ constructor(executor: (resolve: (value: T | PromiseLike<T>) => void, reject: (reason?: any) => void, onCancel: OnCancel) => void);
14806
+ then<TResult1 = T, TResult2 = never>(onFulfilled?: ((value: T) => TResult1 | PromiseLike<TResult1>) | null, onRejected?: ((reason: any) => TResult2 | PromiseLike<TResult2>) | null): Promise<TResult1 | TResult2>;
14807
+ catch<TResult = never>(onRejected?: ((reason: any) => TResult | PromiseLike<TResult>) | null): Promise<T | TResult>;
14808
+ finally(onFinally?: (() => void) | null): Promise<T>;
14809
+ cancel(): void;
14810
+ get isCancelled(): boolean;
14811
+ }
14812
+
14813
+ type Resolver<T> = (options: ApiRequestOptions) => Promise<T>;
14814
+ type Headers = Record<string, string>;
14815
+ type OpenAPIConfig = {
14816
+ BASE: string;
14817
+ VERSION: string;
14818
+ WITH_CREDENTIALS: boolean;
14819
+ CREDENTIALS: 'include' | 'omit' | 'same-origin';
14820
+ TOKEN?: string | Resolver<string>;
14821
+ USERNAME?: string | Resolver<string>;
14822
+ PASSWORD?: string | Resolver<string>;
14823
+ HEADERS?: Headers | Resolver<Headers>;
14824
+ ENCODE_PATH?: (path: string) => string;
14825
+ };
14826
+
14827
+ declare abstract class BaseHttpRequest {
14828
+ readonly config: OpenAPIConfig;
14829
+ constructor(config: OpenAPIConfig);
14830
+ abstract request<T>(options: ApiRequestOptions): CancelablePromise<T>;
14831
+ }
14832
+
14833
+ type CancelOrdersRequestBody = {
14834
+ /**
14835
+ * Address of the user initiating the cancel request
14836
+ */
14837
+ account_address: string;
14838
+ /**
14839
+ * List of order ids proposed for cancellation
14840
+ */
14841
+ orders: Array<string>;
14842
+ /**
14843
+ * Signature generated by the user for the specific cancellation request
14844
+ */
14845
+ signature: string;
14846
+ };
14847
+
14848
+ type FailedOrderCancellation = {
14849
+ /**
14850
+ * ID of the order which failed to be cancelled
14851
+ */
14852
+ order: string;
14853
+ /**
14854
+ * Reason code indicating why the order failed to be cancelled
14855
+ */
14856
+ reason_code: FailedOrderCancellation.reason_code;
14857
+ };
14858
+ declare namespace FailedOrderCancellation {
14859
+ /**
14860
+ * Reason code indicating why the order failed to be cancelled
14861
+ */
14862
+ enum reason_code {
14863
+ FILLED = "FILLED"
14864
+ }
14865
+ }
14866
+
14867
+ type CancelOrdersResultData = {
14868
+ /**
14869
+ * Orders which were successfully cancelled
14870
+ */
14871
+ successful_cancellations: Array<string>;
14872
+ /**
14873
+ * Orders which are marked for cancellation but the cancellation cannot be guaranteed
14874
+ */
14875
+ pending_cancellations: Array<string>;
14876
+ /**
14877
+ * Orders which failed to be cancelled
14878
+ */
14879
+ failed_cancellations: Array<FailedOrderCancellation>;
14880
+ };
14881
+
14882
+ type CancelOrdersResult = {
14883
+ result: CancelOrdersResultData;
14884
+ };
14885
+
14886
+ /**
14887
+ * The name of chain
14888
+ */
14889
+ type ChainName$1 = string;
14890
+
14891
+ type Fee$2 = {
14892
+ /**
14893
+ * Fee payable to recipient upon settlement
14894
+ */
14895
+ amount: string;
14896
+ /**
14897
+ * Fee type
14898
+ */
14899
+ fee_type: Fee$2.fee_type;
14900
+ /**
14901
+ * Wallet address of fee recipient
14902
+ */
14903
+ recipient: string;
14904
+ };
14905
+ declare namespace Fee$2 {
14906
+ /**
14907
+ * Fee type
14908
+ */
14909
+ enum fee_type {
14910
+ ROYALTY = "ROYALTY",
14911
+ MAKER_ECOSYSTEM = "MAKER_ECOSYSTEM",
14912
+ TAKER_ECOSYSTEM = "TAKER_ECOSYSTEM",
14913
+ PROTOCOL = "PROTOCOL"
14914
+ }
14915
+ }
14916
+
14917
+ type ERC20Item$1 = {
14918
+ /**
14919
+ * Token type user is offering, which in this case is ERC20
14920
+ */
14921
+ item_type: 'ERC20';
14922
+ /**
14923
+ * Address of ERC20 token
14924
+ */
14925
+ contract_address: string;
14926
+ /**
14927
+ * 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).
14928
+ */
14929
+ start_amount: string;
14930
+ };
14931
+
14932
+ type ERC721Item$1 = {
14933
+ /**
14934
+ * Token type user is offering, which in this case is ERC721
14935
+ */
14936
+ item_type: 'ERC721';
14937
+ /**
14938
+ * Address of ERC721 token
14939
+ */
14940
+ contract_address: string;
14941
+ /**
14942
+ * ID of ERC721 token
14943
+ */
14944
+ token_id: string;
14945
+ };
14946
+
14947
+ type NativeItem$1 = {
14948
+ /**
14949
+ * Token type user is offering, which in this case is the native IMX token
14950
+ */
14951
+ item_type: 'NATIVE';
14952
+ /**
14953
+ * 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).
14954
+ */
14955
+ start_amount: string;
14956
+ };
14957
+
14958
+ type Item = (NativeItem$1 | ERC20Item$1 | ERC721Item$1);
14959
+
14960
+ type ProtocolData = {
14961
+ /**
14962
+ * The Order type
14963
+ */
14964
+ order_type: ProtocolData.order_type;
14965
+ /**
14966
+ * Immutable zone address
14967
+ */
14968
+ zone_address: string;
14969
+ /**
14970
+ * big.Int or uint256 string for order counter
14971
+ */
14972
+ counter: string;
14973
+ /**
14974
+ * Immutable Seaport contract address
14975
+ */
14976
+ seaport_address: string;
14977
+ /**
14978
+ * Immutable Seaport contract version
14979
+ */
14980
+ seaport_version: string;
14981
+ };
14982
+ declare namespace ProtocolData {
14983
+ /**
14984
+ * The Order type
14985
+ */
14986
+ enum order_type {
14987
+ FULL_RESTRICTED = "FULL_RESTRICTED"
14988
+ }
14989
+ }
14990
+
14991
+ type CreateListingRequestBody = {
14992
+ account_address: string;
14993
+ order_hash: string;
14994
+ /**
14995
+ * Buy item for listing should either be NATIVE or ERC20 item
14996
+ */
14997
+ buy: Array<Item>;
14998
+ /**
14999
+ * 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.
15000
+ */
15001
+ fees: Array<Fee$2>;
15002
+ /**
15003
+ * Time after which the Order is considered expired
15004
+ */
15005
+ end_at: string;
15006
+ protocol_data: ProtocolData;
15007
+ /**
15008
+ * A random value added to the create Order request
15009
+ */
15010
+ salt: string;
15011
+ /**
15012
+ * Sell item for listing should be an ERC721 item
15013
+ */
15014
+ sell: Array<Item>;
15015
+ /**
15016
+ * Digital signature generated by the user for the specific Order
15017
+ */
15018
+ signature: string;
15019
+ /**
15020
+ * Time after which Order is considered active
15021
+ */
15022
+ start_at: string;
15023
+ };
15024
+
15025
+ /**
15026
+ * The chain details
15027
+ */
15028
+ type Chain = {
15029
+ /**
15030
+ * The id of chain
15031
+ */
15032
+ id: string;
15033
+ /**
15034
+ * The name of chain
15035
+ */
15036
+ name: string;
15037
+ };
15038
+
15039
+ type ActiveOrderStatus = {
15040
+ /**
15041
+ * The order status that indicates an order can be fulfilled.
15042
+ */
15043
+ name: 'ACTIVE';
15044
+ };
15045
+
15046
+ type CancelledOrderStatus = {
15047
+ /**
15048
+ * The order status indicating a order is has been cancelled or about to be cancelled.
15049
+ */
15050
+ name: 'CANCELLED';
15051
+ /**
15052
+ * Whether the cancellation of the order is pending
15053
+ */
15054
+ pending: boolean;
15055
+ /**
15056
+ * Whether the cancellation was done on-chain or off-chain
15057
+ */
15058
+ cancellation_type: CancelledOrderStatus.cancellation_type;
15059
+ };
15060
+ declare namespace CancelledOrderStatus {
15061
+ /**
15062
+ * Whether the cancellation was done on-chain or off-chain
15063
+ */
15064
+ enum cancellation_type {
15065
+ ON_CHAIN = "ON_CHAIN",
15066
+ OFF_CHAIN = "OFF_CHAIN"
15067
+ }
15068
+ }
15069
+
15070
+ type ExpiredOrderStatus = {
15071
+ /**
15072
+ * A terminal order status indicating that an order cannot be fulfilled due to expiry.
15073
+ */
15074
+ name: 'EXPIRED';
15075
+ };
15076
+
15077
+ type FilledOrderStatus = {
15078
+ /**
15079
+ * A terminal order status indicating that an order has been fulfilled.
15080
+ */
15081
+ name: 'FILLED';
15082
+ };
15083
+
15084
+ type InactiveOrderStatus = {
15085
+ /**
15086
+ * The order status that indicates an order cannot be fulfilled.
15087
+ */
15088
+ name: 'INACTIVE';
15089
+ /**
15090
+ * Whether the order offerer has sufficient approvals
15091
+ */
15092
+ sufficient_approvals: boolean;
15093
+ /**
15094
+ * Whether the order offerer still has sufficient balance to complete the order
15095
+ */
15096
+ sufficient_balances: boolean;
15097
+ };
15098
+
15099
+ type PendingOrderStatus = {
15100
+ /**
15101
+ * The order status that indicates the order is yet to be active due to various reasons.
15102
+ */
15103
+ name: 'PENDING';
15104
+ /**
15105
+ * Whether the order has been evaluated after its creation
15106
+ */
15107
+ evaluated: boolean;
15108
+ /**
15109
+ * Whether the order has reached its specified start time
15110
+ */
15111
+ started: boolean;
15112
+ };
15113
+
15114
+ /**
15115
+ * The Order status
15116
+ */
15117
+ type OrderStatus = (CancelledOrderStatus | PendingOrderStatus | ActiveOrderStatus | InactiveOrderStatus | FilledOrderStatus | ExpiredOrderStatus);
15118
+
15119
+ type Order$1 = {
15120
+ account_address: string;
15121
+ buy: Array<Item>;
15122
+ fees: Array<Fee$2>;
15123
+ chain: Chain;
15124
+ /**
15125
+ * Time the Order is created
15126
+ */
15127
+ created_at: string;
15128
+ /**
15129
+ * Time after which the Order is considered expired
15130
+ */
15131
+ end_at: string;
15132
+ /**
15133
+ * Global Order identifier
15134
+ */
15135
+ id: string;
15136
+ protocol_data: ProtocolData;
15137
+ /**
15138
+ * A random value added to the create Order request
15139
+ */
15140
+ salt: string;
15141
+ sell: Array<Item>;
15142
+ /**
15143
+ * Digital signature generated by the user for the specific Order
15144
+ */
15145
+ signature: string;
15146
+ /**
15147
+ * Time after which Order is considered active
15148
+ */
15149
+ start_at: string;
15150
+ status: OrderStatus;
15151
+ /**
15152
+ * Time the Order is last updated
15153
+ */
15154
+ updated_at: string;
15155
+ };
15156
+
15157
+ type FulfillableOrder = {
15158
+ extra_data: string;
15159
+ order: Order$1;
15160
+ };
15161
+
15162
+ type FulfillmentDataRequest = {
15163
+ order_id: string;
15164
+ fees: Array<Fee$2>;
15165
+ };
15166
+
15167
+ type ListingResult$1 = {
15168
+ result: Order$1;
15169
+ };
15170
+
15171
+ /**
15172
+ * Pagination properties
15173
+ */
15174
+ type Page$1 = {
15175
+ /**
15176
+ * First item as an encoded string
15177
+ */
15178
+ previous_cursor: string | null;
15179
+ /**
15180
+ * Last item as an encoded string
15181
+ */
15182
+ next_cursor: string | null;
15183
+ };
15184
+
15185
+ type ListListingsResult$1 = {
15186
+ page: Page$1;
15187
+ result: Array<Order$1>;
15188
+ };
15189
+
15190
+ /**
15191
+ * The metadata related to the transaction in which the activity occurred
15192
+ */
15193
+ type TradeBlockchainMetadata = {
15194
+ /**
15195
+ * The transaction hash of the trade
15196
+ */
15197
+ transaction_hash: string;
15198
+ /**
15199
+ * EVM block number (uint64 as string)
15200
+ */
15201
+ block_number: string;
15202
+ /**
15203
+ * Transaction index in a block (uint32 as string)
15204
+ */
15205
+ transaction_index: string;
15206
+ /**
15207
+ * The log index of the fulfillment event in a block (uint32 as string)
15208
+ */
15209
+ log_index: string;
15210
+ };
15211
+
15212
+ type Trade$1 = {
15213
+ buy: Array<Item>;
15214
+ buyer_address: string;
15215
+ buyer_fees: Array<Fee$2>;
15216
+ chain: Chain;
15217
+ order_id: string;
15218
+ blockchain_metadata: TradeBlockchainMetadata;
15219
+ /**
15220
+ * Time the on-chain trade event is indexed by the order book system
15221
+ */
15222
+ indexed_at: string;
15223
+ /**
15224
+ * Global Trade identifier
15225
+ */
15226
+ id: string;
15227
+ sell: Array<Item>;
15228
+ seller_address: string;
15229
+ maker_address: string;
15230
+ taker_address: string;
15231
+ };
15232
+
15233
+ type ListTradeResult = {
15234
+ page: Page$1;
15235
+ result: Array<Trade$1>;
15236
+ };
15237
+
15238
+ /**
15239
+ * The Order status
15240
+ */
15241
+ declare enum OrderStatusName {
15242
+ PENDING = "PENDING",
15243
+ ACTIVE = "ACTIVE",
15244
+ INACTIVE = "INACTIVE",
15245
+ FILLED = "FILLED",
15246
+ EXPIRED = "EXPIRED",
15247
+ CANCELLED = "CANCELLED"
15248
+ }
15249
+
15250
+ /**
15251
+ * Encoded page cursor to retrieve previous or next page. Use the value returned in the response.
15252
+ */
15253
+ type PageCursor = string;
15254
+
15255
+ /**
15256
+ * Maximum number of items to return
15257
+ */
15258
+ type PageSize = number;
15259
+
15260
+ type TradeResult$1 = {
15261
+ result: Trade$1;
15262
+ };
15263
+
15264
+ type UnfulfillableOrder$1 = {
15265
+ /**
15266
+ * OrderID for the requested but unfulfillable order
15267
+ */
15268
+ order_id: string;
15269
+ /**
15270
+ * Nullable string containing error reason if the signing is unsuccessful for the order
15271
+ */
15272
+ reason: string;
15273
+ };
15274
+
15275
+ declare class OrdersService {
15276
+ readonly httpRequest: BaseHttpRequest;
15277
+ constructor(httpRequest: BaseHttpRequest);
15278
+ /**
15279
+ * Cancel one or more orders
15280
+ * Cancel one or more orders
15281
+ * @returns CancelOrdersResult Orders cancellation response.
15282
+ * @throws ApiError
15283
+ */
15284
+ cancelOrders({ chainName, requestBody, }: {
15285
+ chainName: ChainName$1;
15286
+ requestBody: CancelOrdersRequestBody;
15287
+ }): CancelablePromise<CancelOrdersResult>;
15288
+ /**
15289
+ * List all listings
15290
+ * List all listings
15291
+ * @returns ListListingsResult OK response.
15292
+ * @throws ApiError
15293
+ */
15294
+ listListings({ chainName, status, sellItemContractAddress, buyItemContractAddress, sellItemTokenId, fromUpdatedAt, pageSize, sortBy, sortDirection, pageCursor, }: {
15295
+ chainName: ChainName$1;
15296
+ /**
15297
+ * Order status to filter by
15298
+ */
15299
+ status?: OrderStatusName;
15300
+ /**
15301
+ * Sell item contract address to filter by
15302
+ */
15303
+ sellItemContractAddress?: string;
15304
+ /**
15305
+ * Buy item contract address to filter by
15306
+ */
15307
+ buyItemContractAddress?: string;
15308
+ /**
15309
+ * Sell item token identifier to filter by
15310
+ */
15311
+ sellItemTokenId?: string;
15312
+ /**
15313
+ * From updated at including given date
15314
+ */
15315
+ fromUpdatedAt?: string;
15316
+ /**
15317
+ * Maximum number of orders to return per page
15318
+ */
15319
+ pageSize?: PageSize;
15320
+ /**
15321
+ * Order field to sort by
15322
+ */
15323
+ sortBy?: 'created_at' | 'updated_at' | 'buy_item_amount';
15324
+ /**
15325
+ * Ascending or descending direction for sort
15326
+ */
15327
+ sortDirection?: 'asc' | 'desc';
15328
+ /**
15329
+ * Page cursor to retrieve previous or next page. Use the value returned in the response.
15330
+ */
15331
+ pageCursor?: PageCursor;
15332
+ }): CancelablePromise<ListListingsResult$1>;
15333
+ /**
15334
+ * Create a listing
15335
+ * Create a listing
15336
+ * @returns ListingResult Created response.
15337
+ * @throws ApiError
15338
+ */
15339
+ createListing({ chainName, requestBody, }: {
15340
+ chainName: ChainName$1;
15341
+ requestBody: CreateListingRequestBody;
15342
+ }): CancelablePromise<ListingResult$1>;
15343
+ /**
15344
+ * Get a single listing by ID
15345
+ * Get a single listing by ID
15346
+ * @returns ListingResult OK response.
15347
+ * @throws ApiError
15348
+ */
15349
+ getListing({ chainName, listingId, }: {
15350
+ chainName: ChainName$1;
15351
+ /**
15352
+ * Global Order identifier
15353
+ */
15354
+ listingId: string;
15355
+ }): CancelablePromise<ListingResult$1>;
15356
+ /**
15357
+ * Retrieve fulfillment data for orders
15358
+ * Retrieve signed fulfillment data based on the list of order IDs and corresponding fees.
15359
+ * @returns any Successful response
15360
+ * @throws ApiError
15361
+ */
15362
+ fulfillmentData({ chainName, requestBody, }: {
15363
+ chainName: ChainName$1;
15364
+ requestBody: Array<FulfillmentDataRequest>;
15365
+ }): CancelablePromise<{
15366
+ result: {
15367
+ fulfillable_orders: Array<FulfillableOrder>;
15368
+ unfulfillable_orders: Array<UnfulfillableOrder$1>;
15369
+ };
15370
+ }>;
15371
+ /**
15372
+ * List all trades
15373
+ * List all trades
15374
+ * @returns ListTradeResult OK response.
15375
+ * @throws ApiError
15376
+ */
15377
+ listTrades({ chainName, accountAddress, fromIndexedAt, pageSize, sortBy, sortDirection, pageCursor, }: {
15378
+ chainName: ChainName$1;
15379
+ accountAddress?: string;
15380
+ /**
15381
+ * From indexed at including given date
15382
+ */
15383
+ fromIndexedAt?: string;
15384
+ /**
15385
+ * Maximum number of trades to return per page
15386
+ */
15387
+ pageSize?: PageSize;
15388
+ /**
15389
+ * Trade field to sort by
15390
+ */
15391
+ sortBy?: 'indexed_at';
15392
+ /**
15393
+ * Ascending or descending direction for sort
15394
+ */
15395
+ sortDirection?: 'asc' | 'desc';
15396
+ /**
15397
+ * Page cursor to retrieve previous or next page. Use the value returned in the response.
15398
+ */
15399
+ pageCursor?: PageCursor;
15400
+ }): CancelablePromise<ListTradeResult>;
15401
+ /**
15402
+ * Get a single trade by ID
15403
+ * Get a single trade by ID
15404
+ * @returns TradeResult OK response.
15405
+ * @throws ApiError
15406
+ */
15407
+ getTrade({ chainName, tradeId, }: {
15408
+ chainName: ChainName$1;
15409
+ /**
15410
+ * Global Trade identifier
15411
+ */
15412
+ tradeId: string;
15413
+ }): CancelablePromise<TradeResult$1>;
15414
+ }
15415
+
15416
+ declare enum OrderType {
15417
+ FULL_OPEN = 0,
15418
+ PARTIAL_OPEN = 1,
15419
+ FULL_RESTRICTED = 2,
15420
+ PARTIAL_RESTRICTED = 3
15421
+ }
15422
+ declare enum ItemType$1 {
15423
+ NATIVE = 0,
15424
+ ERC20 = 1,
15425
+ ERC721 = 2,
15426
+ ERC1155 = 3,
15427
+ ERC721_WITH_CRITERIA = 4,
15428
+ ERC1155_WITH_CRITERIA = 5
15429
+ }
15430
+
15431
+ type OfferItem = {
15432
+ itemType: ItemType$1;
15433
+ token: string;
15434
+ identifierOrCriteria: string;
15435
+ startAmount: string;
15436
+ endAmount: string;
15437
+ };
15438
+ type ConsiderationItem = {
15439
+ itemType: ItemType$1;
15440
+ token: string;
15441
+ identifierOrCriteria: string;
15442
+ startAmount: string;
15443
+ endAmount: string;
15444
+ recipient: string;
15445
+ };
15446
+ type OrderParameters = {
15447
+ offerer: string;
15448
+ zone: string;
15449
+ orderType: OrderType;
15450
+ startTime: BigNumberish;
15451
+ endTime: BigNumberish;
15452
+ zoneHash: string;
15453
+ salt: string;
15454
+ offer: OfferItem[];
15455
+ consideration: ConsiderationItem[];
15456
+ totalOriginalConsiderationItems: BigNumberish;
15457
+ conduitKey: string;
15458
+ };
15459
+ type OrderComponents = OrderParameters & {
15460
+ counter: BigNumberish;
15461
+ };
15462
+
15463
+ interface ERC721Item {
15464
+ type: 'ERC721';
15465
+ contractAddress: string;
15466
+ tokenId: string;
15467
+ }
15468
+ interface ERC20Item {
15469
+ type: 'ERC20';
15470
+ contractAddress: string;
15471
+ amount: string;
15472
+ }
15473
+ interface NativeItem {
15474
+ type: 'NATIVE';
15475
+ amount: string;
15476
+ }
15477
+ interface RoyaltyInfo {
15478
+ recipient: string;
15479
+ amountRequired: string;
15480
+ }
15481
+ interface PrepareListingParams {
15482
+ makerAddress: string;
15483
+ sell: ERC721Item;
15484
+ buy: ERC20Item | NativeItem;
15485
+ orderExpiry?: Date;
15486
+ }
15487
+ interface PrepareListingResponse {
15488
+ actions: Action[];
15489
+ orderComponents: OrderComponents;
15490
+ orderHash: string;
15491
+ }
15492
+ interface PrepareCancelOrdersResponse {
15493
+ signableAction: SignableAction;
15494
+ }
15495
+ interface CreateListingParams {
15496
+ orderComponents: OrderComponents;
15497
+ orderHash: string;
15498
+ orderSignature: string;
15499
+ makerFees: FeeValue[];
15500
+ }
15501
+ type ListListingsParams = Omit<Parameters<typeof OrdersService.prototype.listListings>[0], 'chainName'>;
15502
+ type ListTradesParams = Omit<Parameters<typeof OrdersService.prototype.listTrades>[0], 'chainName'>;
15503
+ declare enum FeeType {
15504
+ MAKER_ECOSYSTEM = "MAKER_ECOSYSTEM",
15505
+ TAKER_ECOSYSTEM = "TAKER_ECOSYSTEM",
15506
+ PROTOCOL = "PROTOCOL",
15507
+ ROYALTY = "ROYALTY"
15508
+ }
15509
+ interface FeeValue {
15510
+ recipient: string;
15511
+ amount: string;
15512
+ }
15513
+ interface Fee$1 extends FeeValue {
15514
+ type: FeeType;
15515
+ }
15516
+ declare enum TransactionPurpose {
15517
+ APPROVAL = "APPROVAL",
15518
+ FULFILL_ORDER = "FULFILL_ORDER",
15519
+ CANCEL = "CANCEL"
15520
+ }
15521
+ declare enum SignablePurpose {
15522
+ CREATE_LISTING = "CREATE_LISTING",
15523
+ OFF_CHAIN_CANCELLATION = "OFF_CHAIN_CANCELLATION"
15524
+ }
15525
+ declare enum ActionType {
15526
+ TRANSACTION = "TRANSACTION",
15527
+ SIGNABLE = "SIGNABLE"
15528
+ }
15529
+ type TransactionBuilder = () => Promise<PopulatedTransaction>;
15530
+ interface TransactionAction {
15531
+ type: ActionType.TRANSACTION;
15532
+ purpose: TransactionPurpose;
15533
+ buildTransaction: TransactionBuilder;
15534
+ }
15535
+ interface SignableAction {
15536
+ type: ActionType.SIGNABLE;
15537
+ purpose: SignablePurpose;
15538
+ message: {
15539
+ domain: TypedDataDomain;
15540
+ types: Record<string, TypedDataField[]>;
15541
+ value: Record<string, any>;
15542
+ };
15543
+ }
15544
+ type Action = TransactionAction | SignableAction;
15545
+ interface FulfillmentListing {
15546
+ listingId: string;
15547
+ takerFees: Array<FeeValue>;
15548
+ }
15549
+ type FulfillBulkOrdersResponse = FulfillBulkOrdersInsufficientBalanceResponse | FulfillBulkOrdersSufficientBalanceResponse;
15550
+ interface FulfillBulkOrdersSufficientBalanceResponse {
15551
+ sufficientBalance: true;
15552
+ actions: Action[];
15553
+ expiration: string;
15554
+ fulfillableOrders: Order[];
15555
+ unfulfillableOrders: UnfulfillableOrder[];
15556
+ }
15557
+ interface FulfillBulkOrdersInsufficientBalanceResponse {
15558
+ sufficientBalance: false;
15559
+ fulfillableOrders: Order[];
15560
+ unfulfillableOrders: UnfulfillableOrder[];
15561
+ }
15562
+ interface UnfulfillableOrder {
15563
+ orderId: string;
15564
+ reason: string;
15565
+ }
15566
+ interface FulfillOrderResponse {
15567
+ actions: Action[];
15568
+ /**
15569
+ * User MUST submit the fulfillment transaction before the expiration
15570
+ * Submitting after the expiration will result in a on chain revert
15571
+ */
15572
+ expiration: string;
15573
+ order: Order;
15574
+ }
15575
+ interface CancelOrdersOnChainResponse {
15576
+ cancellationAction: TransactionAction;
15577
+ }
15578
+ interface Order {
15579
+ id: string;
15580
+ accountAddress: string;
15581
+ buy: (ERC20Item | NativeItem)[];
15582
+ sell: ERC721Item[];
15583
+ fees: Fee$1[];
15584
+ chain: {
15585
+ id: string;
15586
+ name: string;
15587
+ };
15588
+ createdAt: string;
15589
+ updatedAt: string;
15590
+ /**
15591
+ * Time after which the Order is considered active
15592
+ */
15593
+ startAt: string;
15594
+ /**
15595
+ * Time after which the Order is expired
15596
+ */
15597
+ endAt: string;
15598
+ protocolData: {
15599
+ orderType: 'FULL_RESTRICTED';
15600
+ zoneAddress: string;
15601
+ counter: string;
15602
+ seaportAddress: string;
15603
+ seaportVersion: string;
15604
+ };
15605
+ salt: string;
15606
+ signature: string;
15607
+ status: OrderStatus;
15608
+ }
15609
+ interface ListingResult {
15610
+ result: Order;
15611
+ }
15612
+ interface ListListingsResult {
15613
+ page: Page;
15614
+ result: Order[];
15615
+ }
15616
+ interface Page {
15617
+ /**
15618
+ * First item as an encoded string
15619
+ */
15620
+ previousCursor: string | null;
15621
+ /**
15622
+ * Last item as an encoded string
15623
+ */
15624
+ nextCursor: string | null;
15625
+ }
15626
+ interface Trade {
15627
+ id: string;
15628
+ orderId: string;
15629
+ chain: {
15630
+ id: string;
15631
+ name: string;
15632
+ };
15633
+ buy: (ERC20Item | NativeItem)[];
15634
+ sell: ERC721Item[];
15635
+ buyerFees: Fee$1[];
15636
+ sellerAddress: string;
15637
+ buyerAddress: string;
15638
+ makerAddress: string;
15639
+ takerAddress: string;
15640
+ /**
15641
+ * Time the on-chain event was indexed by the Immutable order book service
15642
+ */
15643
+ indexedAt: string;
15644
+ blockchainMetadata: {
15645
+ /**
15646
+ * The transaction hash of the trade
15647
+ */
15648
+ transactionHash: string;
15649
+ /**
15650
+ * EVM block number (uint64 as string)
15651
+ */
15652
+ blockNumber: string;
15653
+ /**
15654
+ * Transaction index in a block (uint32 as string)
15655
+ */
15656
+ transactionIndex: string;
15657
+ /**
15658
+ * The log index of the fulfillment event in a block (uint32 as string)
15659
+ */
15660
+ logIndex: string;
15661
+ };
15662
+ }
15663
+ interface TradeResult {
15664
+ result: Trade;
15665
+ }
15666
+ interface ListTradesResult {
15667
+ page: Page;
15668
+ result: Trade[];
15669
+ }
15670
+
15671
+ /**
15672
+ * zkEVM orderbook SDK
15673
+ * @constructor
15674
+ * @param {OrderbookModuleConfiguration} config - Configuration for Immutable services.
15675
+ */
15676
+ declare class Orderbook {
15677
+ private apiClient;
15678
+ private seaport;
15679
+ private orderbookConfig;
15680
+ constructor(config: ModuleConfiguration<OrderbookOverrides>);
15681
+ /**
15682
+ * Return the configuration for the orderbook module.
15683
+ * @return {OrderbookModuleConfiguration} The configuration for the orderbook module.
15684
+ */
15685
+ config(): OrderbookModuleConfiguration;
15686
+ /**
15687
+ * Get an order by ID
15688
+ * @param {string} listingId - The listingId to find.
15689
+ * @return {ListingResult} The returned order result.
15690
+ */
15691
+ getListing(listingId: string): Promise<ListingResult>;
15692
+ /**
15693
+ * Get a trade by ID
15694
+ * @param {string} tradeId - The tradeId to find.
15695
+ * @return {TradeResult} The returned order result.
15696
+ */
15697
+ getTrade(tradeId: string): Promise<TradeResult>;
15698
+ /**
15699
+ * List orders. This method is used to get a list of orders filtered by conditions specified
15700
+ * in the params object.
15701
+ * @param {ListListingsParams} listOrderParams - Filtering, ordering and page parameters.
15702
+ * @return {ListListingsResult} The paged orders.
15703
+ */
15704
+ listListings(listOrderParams: ListListingsParams): Promise<ListListingsResult>;
15705
+ /**
15706
+ * List trades. This method is used to get a list of trades filtered by conditions specified
15707
+ * in the params object
15708
+ * @param {ListTradesParams} listTradesParams - Filtering, ordering and page parameters.
15709
+ * @return {ListTradesResult} The paged trades.
15710
+ */
15711
+ listTrades(listTradesParams: ListTradesParams): Promise<ListTradesResult>;
15712
+ /**
15713
+ * Get required transactions and messages for signing prior to creating a listing
15714
+ * through the createListing method
15715
+ * @param {PrepareListingParams} prepareListingParams - Details about the listing to be created.
15716
+ * @return {PrepareListingResponse} PrepareListingResponse includes
15717
+ * the unsigned approval transaction, the typed order message for signing and
15718
+ * the order components that can be submitted to `createListing` with a signature.
15719
+ */
15720
+ prepareListing({ makerAddress, sell, buy, orderExpiry, }: PrepareListingParams): Promise<PrepareListingResponse>;
15721
+ /**
15722
+ * Create an order
15723
+ * @param {CreateListingParams} createListingParams - create an order with the given params.
15724
+ * @return {ListingResult} The result of the order created in the Immutable services.
15725
+ */
15726
+ createListing(createListingParams: CreateListingParams): Promise<ListingResult>;
15727
+ /**
15728
+ * Get unsigned transactions that can be submitted to fulfil an open order. If the approval
15729
+ * transaction exists it must be signed and submitted to the chain before the fulfilment
15730
+ * transaction can be submitted or it will be reverted.
15731
+ * @param {string} listingId - The listingId to fulfil.
15732
+ * @param {string} fulfillerAddress - The address of the account fulfilling the order.
15733
+ * @return {FulfillOrderResponse} Approval and fulfilment transactions.
15734
+ */
15735
+ fulfillOrder(listingId: string, takerAddress: string, takerFees: FeeValue[]): Promise<FulfillOrderResponse>;
15736
+ fulfillBulkOrders(listings: Array<FulfillmentListing>, takerAddress: string): Promise<FulfillBulkOrdersResponse>;
15737
+ /**
15738
+ * Cancelling orders is a gasless alternative to on-chain cancellation exposed with
15739
+ * `cancelOrdersOnChain`. For the orderbook to authenticate the cancellation, the creator
15740
+ * of the orders must sign an EIP712 message containing the orderIds
15741
+ * @param {string} orderIds - The orderIds to attempt to cancel.
15742
+ * @return {PrepareCancelOrdersResponse} The signable action to cancel the orders.
15743
+ */
15744
+ prepareOrderCancellations(orderIds: string[]): Promise<PrepareCancelOrdersResponse>;
15745
+ /**
15746
+ * Cancelling orders is a gasless alternative to on-chain cancellation exposed with
15747
+ * `cancelOrdersOnChain`. Orders cancelled this way cannot be fulfilled and will be removed
15748
+ * from the orderbook. If there is pending fulfillment data outstanding for the order, its
15749
+ * cancellation will be pending until the fulfillment window has passed.
15750
+ * `prepareOffchainOrderCancellations` can be used to get the signable action that is signed
15751
+ * to get the signature required for this call.
15752
+ * @param {string[]} orderIds - The orderIds to attempt to cancel.
15753
+ * @param {string} accountAddress - The address of the account cancelling the orders.
15754
+ * @param {string} accountAddress - The address of the account cancelling the orders.
15755
+ * @return {CancelOrdersResult} The result of the off-chain cancellation request
15756
+ */
15757
+ cancelOrders(orderIds: string[], accountAddress: string, signature: string): Promise<CancelOrdersResult>;
15758
+ /**
15759
+ * Get an unsigned order cancellation transaction. Orders can only be cancelled by
15760
+ * the account that created them. All of the orders must be from the same seaport contract.
15761
+ * If trying to cancel orders from multiple seaport contracts, group the orderIds by seaport
15762
+ * contract and call this method for each group.
15763
+ * @param {string[]} orderIds - The orderIds to cancel.
15764
+ * @param {string} accountAddress - The address of the account cancelling the order.
15765
+ * @return {CancelOrdersOnChainResponse} The unsigned cancel order action
15766
+ */
15767
+ cancelOrdersOnChain(orderIds: string[], accountAddress: string): Promise<CancelOrdersOnChainResponse>;
15768
+ }
15769
+
15770
+ declare const constants: {
15771
+ estimatedFulfillmentGasGwei: number;
15772
+ };
15773
+
15774
+ type orderbook_d_Action = Action;
15775
+ type orderbook_d_ActionType = ActionType;
15776
+ declare const orderbook_d_ActionType: typeof ActionType;
15777
+ type orderbook_d_CancelOrdersOnChainResponse = CancelOrdersOnChainResponse;
15778
+ type orderbook_d_CreateListingParams = CreateListingParams;
15779
+ type orderbook_d_ERC20Item = ERC20Item;
15780
+ type orderbook_d_ERC721Item = ERC721Item;
15781
+ type orderbook_d_FeeType = FeeType;
15782
+ declare const orderbook_d_FeeType: typeof FeeType;
15783
+ type orderbook_d_FeeValue = FeeValue;
15784
+ type orderbook_d_FulfillBulkOrdersInsufficientBalanceResponse = FulfillBulkOrdersInsufficientBalanceResponse;
15785
+ type orderbook_d_FulfillBulkOrdersResponse = FulfillBulkOrdersResponse;
15786
+ type orderbook_d_FulfillBulkOrdersSufficientBalanceResponse = FulfillBulkOrdersSufficientBalanceResponse;
15787
+ type orderbook_d_FulfillOrderResponse = FulfillOrderResponse;
15788
+ type orderbook_d_FulfillmentListing = FulfillmentListing;
15789
+ type orderbook_d_ListListingsParams = ListListingsParams;
15790
+ type orderbook_d_ListListingsResult = ListListingsResult;
15791
+ type orderbook_d_ListTradesParams = ListTradesParams;
15792
+ type orderbook_d_ListTradesResult = ListTradesResult;
15793
+ type orderbook_d_ListingResult = ListingResult;
15794
+ type orderbook_d_NativeItem = NativeItem;
15795
+ type orderbook_d_Order = Order;
15796
+ type orderbook_d_OrderStatusName = OrderStatusName;
15797
+ declare const orderbook_d_OrderStatusName: typeof OrderStatusName;
15798
+ type orderbook_d_Orderbook = Orderbook;
15799
+ declare const orderbook_d_Orderbook: typeof Orderbook;
15800
+ type orderbook_d_Page = Page;
15801
+ type orderbook_d_PrepareCancelOrdersResponse = PrepareCancelOrdersResponse;
15802
+ type orderbook_d_PrepareListingParams = PrepareListingParams;
15803
+ type orderbook_d_PrepareListingResponse = PrepareListingResponse;
15804
+ type orderbook_d_RoyaltyInfo = RoyaltyInfo;
15805
+ type orderbook_d_SignableAction = SignableAction;
15806
+ type orderbook_d_SignablePurpose = SignablePurpose;
15807
+ declare const orderbook_d_SignablePurpose: typeof SignablePurpose;
15808
+ type orderbook_d_Trade = Trade;
15809
+ type orderbook_d_TradeResult = TradeResult;
15810
+ type orderbook_d_TransactionAction = TransactionAction;
15811
+ type orderbook_d_TransactionBuilder = TransactionBuilder;
15812
+ type orderbook_d_TransactionPurpose = TransactionPurpose;
15813
+ declare const orderbook_d_TransactionPurpose: typeof TransactionPurpose;
15814
+ type orderbook_d_UnfulfillableOrder = UnfulfillableOrder;
15815
+ declare const orderbook_d_constants: typeof constants;
15816
+ declare namespace orderbook_d {
15817
+ export {
15818
+ orderbook_d_Action as Action,
15819
+ orderbook_d_ActionType as ActionType,
15820
+ orderbook_d_CancelOrdersOnChainResponse as CancelOrdersOnChainResponse,
15821
+ orderbook_d_CreateListingParams as CreateListingParams,
15822
+ orderbook_d_ERC20Item as ERC20Item,
15823
+ orderbook_d_ERC721Item as ERC721Item,
15824
+ Fee$1 as Fee,
15825
+ orderbook_d_FeeType as FeeType,
15826
+ orderbook_d_FeeValue as FeeValue,
15827
+ orderbook_d_FulfillBulkOrdersInsufficientBalanceResponse as FulfillBulkOrdersInsufficientBalanceResponse,
15828
+ orderbook_d_FulfillBulkOrdersResponse as FulfillBulkOrdersResponse,
15829
+ orderbook_d_FulfillBulkOrdersSufficientBalanceResponse as FulfillBulkOrdersSufficientBalanceResponse,
15830
+ orderbook_d_FulfillOrderResponse as FulfillOrderResponse,
15831
+ orderbook_d_FulfillmentListing as FulfillmentListing,
15832
+ orderbook_d_ListListingsParams as ListListingsParams,
15833
+ orderbook_d_ListListingsResult as ListListingsResult,
15834
+ orderbook_d_ListTradesParams as ListTradesParams,
15835
+ orderbook_d_ListTradesResult as ListTradesResult,
15836
+ orderbook_d_ListingResult as ListingResult,
15837
+ orderbook_d_NativeItem as NativeItem,
15838
+ orderbook_d_Order as Order,
15839
+ orderbook_d_OrderStatusName as OrderStatusName,
15840
+ orderbook_d_Orderbook as Orderbook,
15841
+ orderbook_d_Page as Page,
15842
+ orderbook_d_PrepareCancelOrdersResponse as PrepareCancelOrdersResponse,
15843
+ orderbook_d_PrepareListingParams as PrepareListingParams,
15844
+ orderbook_d_PrepareListingResponse as PrepareListingResponse,
15845
+ orderbook_d_RoyaltyInfo as RoyaltyInfo,
15846
+ orderbook_d_SignableAction as SignableAction,
15847
+ orderbook_d_SignablePurpose as SignablePurpose,
15848
+ orderbook_d_Trade as Trade,
15849
+ orderbook_d_TradeResult as TradeResult,
15850
+ orderbook_d_TransactionAction as TransactionAction,
15851
+ orderbook_d_TransactionBuilder as TransactionBuilder,
15852
+ orderbook_d_TransactionPurpose as TransactionPurpose,
15853
+ orderbook_d_UnfulfillableOrder as UnfulfillableOrder,
15854
+ orderbook_d_constants as constants,
15855
+ };
15856
+ }
15857
+
15858
+ type provider_d_GenericIMXProvider = GenericIMXProvider;
15859
+ declare const provider_d_GenericIMXProvider: typeof GenericIMXProvider;
15860
+ type provider_d_IMXProvider = IMXProvider;
15861
+ type provider_d_MetaMaskIMXProvider = MetaMaskIMXProvider;
15862
+ declare const provider_d_MetaMaskIMXProvider: typeof MetaMaskIMXProvider;
15863
+ type provider_d_ProviderConfiguration = ProviderConfiguration;
15864
+ declare const provider_d_ProviderConfiguration: typeof ProviderConfiguration;
15865
+ declare namespace provider_d {
15866
+ export {
15867
+ provider_d_GenericIMXProvider as GenericIMXProvider,
15868
+ provider_d_IMXProvider as IMXProvider,
15869
+ provider_d_MetaMaskIMXProvider as MetaMaskIMXProvider,
15870
+ provider_d_ProviderConfiguration as ProviderConfiguration,
15871
+ };
15872
+ }
15873
+
15874
+ /**
15875
+ * Enum representing different chain IDs.
15876
+ * @enum {number}
15877
+ * @property {number} IMTBL_ZKEVM_MAINNET - The chain ID for IMTBL ZKEVM Mainnet.
15878
+ * @property {number} IMTBL_ZKEVM_TESTNET - The chain ID for IMTBL ZKEVM Testnet.
15879
+ * @property {number} IMTBL_ZKEVM_DEVNET - The chain ID for IMTBL ZKEVM Devnet.
15880
+ * @property {number} ETHEREUM - The chain ID for Ethereum.
15881
+ * @property {number} SEPOLIA - The chain ID for Sepolia.
15882
+ */
15883
+ declare enum ChainId {
15884
+ IMTBL_ZKEVM_MAINNET = 13371,
15885
+ IMTBL_ZKEVM_TESTNET = 13472,
15886
+ IMTBL_ZKEVM_DEVNET = 13433,
15887
+ ETHEREUM = 1,
15888
+ SEPOLIA = 11155111
15889
+ }
15890
+ /**
15891
+ * Enum representing different chain names.
15892
+ * @enum {number}
15893
+ * @property {number} IMTBL_ZKEVM_MAINNET - The chain name for IMTBL ZKEVM Mainnet.
15894
+ * @property {number} IMTBL_ZKEVM_TESTNET - The chain name for IMTBL ZKEVM Testnet.
15895
+ * @property {number} IMTBL_ZKEVM_DEVNET - The chain name for IMTBL ZKEVM Devnet.
15896
+ * @property {number} ETHEREUM - The chain name for Ethereum.
15897
+ * @property {number} SEPOLIA - The chain name for Sepolia.
15898
+ */
15899
+ declare enum ChainName {
15900
+ ETHEREUM = "Ethereum",
15901
+ SEPOLIA = "Sepolia",
15902
+ IMTBL_ZKEVM_TESTNET = "Immutable zkEVM Test",
15903
+ IMTBL_ZKEVM_DEVNET = "Immutable zkEVM Dev",
15904
+ IMTBL_ZKEVM_MAINNET = "Immutable zkEVM"
15905
+ }
15906
+
15907
+ /**
15908
+ * Represents information about a token.
15909
+ * @interface TokenInfo
15910
+ * @property {string} name - The name of the token.
15911
+ * @property {string} symbol - The symbol of the token.
15912
+ * @property {number} decimals - The number of decimal places the token supports.
15913
+ * @property {string | undefined} [address] - The address of the token.
15914
+ * @property {string | undefined} [icon] - The URL of the token's icon.
15915
+ */
15916
+ interface TokenInfo {
15917
+ name: string;
15918
+ symbol: string;
15919
+ decimals: number;
15920
+ address?: string;
15921
+ icon?: string;
15922
+ }
15923
+
15924
+ /**
15925
+ * Interface representing the parameters for {@link Checkout.getBalance}.
15926
+ * @property {Web3Provider} provider - The provider used to get the balance.
15927
+ * @property {string} walletAddress - The wallet address.
15928
+ * @property {string | undefined} contractAddress - The contract address of the token.
15929
+ */
15930
+ interface GetBalanceParams {
15931
+ provider: Web3Provider;
15932
+ walletAddress: string;
15933
+ contractAddress?: string;
15934
+ }
15935
+ /**
15936
+ * Interface representing the result of {@link Checkout.getBalance}.
15937
+ * @property {BigNumber} balance - The balance of the wallet for the token.
15938
+ * @property {string} formattedBalance - The formatted balance of the wallet for the token.
15939
+ * @property {TokenInfo} token - The token information.
15940
+ */
15941
+ interface GetBalanceResult {
15942
+ balance: BigNumber;
15943
+ formattedBalance: string;
15944
+ token: TokenInfo;
15945
+ }
15946
+ /**
15947
+ * Interface representing the parameters for {@link Checkout.getAllBalances}.
15948
+ * @property {Web3Provider} provider - The provider used to get the balances.
15949
+ * @property {string} walletAddress - The wallet address.
15950
+ * @property {ChainId} chainId - The ID of the network.
15951
+ */
15952
+ interface GetAllBalancesParams {
15953
+ provider: Web3Provider;
15954
+ walletAddress: string;
15955
+ chainId: ChainId;
15956
+ }
15957
+ /**
15958
+ * Interface representing the result of {@link Checkout.getAllBalances}.
15959
+ * @property {GetBalanceResult[]} balances - The array of balances of the wallet for every token.
15960
+ */
15961
+ interface GetAllBalancesResult {
15962
+ balances: GetBalanceResult[];
15963
+ }
15964
+
15965
+ interface OrderFee {
15966
+ amount: FeeToken | FeePercentage;
15967
+ recipient: string;
15968
+ }
15969
+ interface FeeToken {
15970
+ token: string;
15971
+ }
15972
+ interface FeePercentage {
15973
+ percentageDecimal: number;
15974
+ }
15975
+
15976
+ type BuyResult = BuyResultSuccess | BuyResultFailed | BuyResultInsufficientFunds;
15977
+ /**
15978
+ * Represents the result of {@link Checkout.buy}
15979
+ * @property {CheckoutStatus.SUCCESS} status - The status to indicate success
15980
+ * @property {SmartCheckoutSufficient} smartCheckoutResult - The sufficient result of smart checkout
15981
+ */
15982
+ type BuyResultSuccess = {
15983
+ status: CheckoutStatus.SUCCESS;
15984
+ smartCheckoutResult: SmartCheckoutSufficient;
15985
+ };
15986
+ /**
15987
+ * Represents the result of {@link Checkout.buy}
15988
+ * @property {CheckoutStatus.FAILED} status - The status to indicate failure
15989
+ * @property {string} transactionHash - The transaction hash of the failed transaction
15990
+ * @property {string} reason - The reason for the failure
15991
+ * @property {SmartCheckoutSufficient} smartCheckoutResult - The sufficient result of smart checkout
15992
+ */
15993
+ type BuyResultFailed = {
15994
+ status: CheckoutStatus.FAILED;
15995
+ transactionHash: string;
15996
+ reason: string;
15997
+ smartCheckoutResult: SmartCheckoutSufficient;
15998
+ };
15999
+ /**
16000
+ * Represents the result of {@link Checkout.buy}
16001
+ * @property {CheckoutStatus.INSUFFICIENT_FUNDS} status - The status to indicate insufficient funds
16002
+ * @property {SmartCheckoutInsufficient} smartCheckoutResult - The insufficient result of smart checkout
16003
+ */
16004
+ type BuyResultInsufficientFunds = {
16005
+ status: CheckoutStatus.INSUFFICIENT_FUNDS;
16006
+ smartCheckoutResult: SmartCheckoutInsufficient;
16007
+ };
16008
+ type SellResult = SellResultSuccess | SellResultFailed | SellResultInsufficientFunds;
16009
+ /**
16010
+ * Represents the result of {@link Checkout.sell}
16011
+ * @property {CheckoutStatus.SUCCESS} status - The status to indicate success
16012
+ * @property {SmartCheckoutSufficient} smartCheckoutResult - The sufficient result of smart checkout
16013
+ */
16014
+ type SellResultSuccess = {
16015
+ status: CheckoutStatus.SUCCESS;
16016
+ orderIds: string[];
16017
+ smartCheckoutResult: SmartCheckoutSufficient;
16018
+ };
16019
+ /**
16020
+ * Represents the result of {@link Checkout.sell}
16021
+ * @property {CheckoutStatus.FAILED} status - The status to indicate failure
16022
+ * @property {string} transactionHash - The transaction hash of the failed transaction
16023
+ * @property {string} reason - The reason for the failure
16024
+ * @property {SmartCheckoutSufficient} smartCheckoutResult - The sufficient result of smart checkout
16025
+ */
16026
+ type SellResultFailed = {
16027
+ status: CheckoutStatus.FAILED;
16028
+ transactionHash: string;
16029
+ reason: string;
16030
+ smartCheckoutResult: SmartCheckoutSufficient;
16031
+ };
16032
+ /**
16033
+ * Represents the result of {@link Checkout.sell}
16034
+ * @property {CheckoutStatus.INSUFFICIENT_FUNDS} status - The status to indicate insufficient funds
16035
+ * @property {SmartCheckoutInsufficient} smartCheckoutResult - The insufficient result of smart checkout
16036
+ */
16037
+ type SellResultInsufficientFunds = {
16038
+ status: CheckoutStatus.INSUFFICIENT_FUNDS;
16039
+ smartCheckoutResult: SmartCheckoutInsufficient;
16040
+ };
16041
+ type CancelResult = CancelResultSuccess | CancelResultFailed;
16042
+ /**
16043
+ * Represents the result of {@link Checkout.cancel}
16044
+ * @property {CheckoutStatus.SUCCESS} status - The status to indicate success
16045
+ */
16046
+ type CancelResultSuccess = {
16047
+ status: CheckoutStatus.SUCCESS;
16048
+ };
16049
+ /**
16050
+ * Represents the result of {@link Checkout.cancel}
16051
+ * @property {CheckoutStatus.FAILED} status - The status to indicate failure
16052
+ * @property {string} transactionHash - The transaction hash of the failed transaction
16053
+ * @property {string} reason - The reason for the failure
16054
+ */
16055
+ type CancelResultFailed = {
16056
+ status: CheckoutStatus.FAILED;
16057
+ transactionHash: string;
16058
+ reason: string;
16059
+ };
16060
+ /**
16061
+ * An enum representing the checkout status types
16062
+ * @enum {string}
16063
+ * @property {string} SUCCESS - If checkout succeeded as the transactions were able to be processed
16064
+ * @property {string} FAILED - If checkout failed due to transactions not settling on chain
16065
+ * @property {string} INSUFFICIENT_FUNDS - If checkout failed due to insufficient funds
16066
+ */
16067
+ declare enum CheckoutStatus {
16068
+ SUCCESS = "SUCCESS",
16069
+ FAILED = "FAILED",
16070
+ INSUFFICIENT_FUNDS = "INSUFFICIENT_FUNDS"
16071
+ }
16072
+ /**
16073
+ * The type representing the order to buy
16074
+ * @property {string} orderId - the id of the order to buy
16075
+ * @property {Array<OrderFee>} takerFees - array of order fees to apply to the order
16076
+ */
16077
+ type BuyOrder = {
16078
+ id: string;
16079
+ takerFees?: OrderFee[];
16080
+ };
16081
+ /**
16082
+ * The type representing the sell order to create a listing from
16083
+ * @property {SellToken} sellToken - the token to be listed for sale
16084
+ * @property {BuyToken} buyToken - the token info of the price of the item
16085
+ * @property {OrderFee[]} makerFees - option array of makerFees to be applied to the listing
16086
+ */
16087
+ type SellOrder = {
16088
+ sellToken: SellToken;
16089
+ buyToken: BuyToken;
16090
+ makerFees?: OrderFee[];
16091
+ };
16092
+ /**
16093
+ * Represents the token that the item can be bought with once listed for sale.
16094
+ * NativeBuyToken or ERC20BuyToken {@link Checkout.smartCheckout}.
16095
+ */
16096
+ type BuyToken = NativeBuyToken | ERC20BuyToken;
16097
+ /**
16098
+ * Represents a native buy token
16099
+ * @property {ItemType} type - The type indicate this is a native token.
16100
+ * @property {string} amount - The amount of native token.
16101
+ */
16102
+ type NativeBuyToken = {
16103
+ type: ItemType.NATIVE;
16104
+ amount: string;
16105
+ };
16106
+ /**
16107
+ * Represents a ERC20 buy token
16108
+ * @property {ItemType} type - The type indicate this is a ERC20 token.
16109
+ * @property {string} amount - The amount of native token.
16110
+ * @property {string} contractAddress - The contract address of the ERC20.
16111
+ */
16112
+ type ERC20BuyToken = {
16113
+ type: ItemType.ERC20;
16114
+ amount: string;
16115
+ contractAddress: string;
16116
+ };
16117
+ /**
16118
+ * The SellToken type
16119
+ * @property {string} id - The ERC721 token id
16120
+ * @property {string} collectionAddress - The ERC721 collection address
16121
+ */
16122
+ type SellToken = {
16123
+ id: string;
16124
+ collectionAddress: string;
16125
+ };
16126
+ /**
16127
+ * Interface representing the parameters for {@link Checkout.smartCheckout}
16128
+ * @property {Web3Provider} provider - The provider to use for smart checkout.
16129
+ * @property {ItemRequirement[]} itemRequirements - The item requirements for the transaction.
16130
+ * @property {FulfillmentTransaction | GasAmount} transactionOrGasAmount - The transaction or gas amount.
16131
+ */
16132
+ interface SmartCheckoutParams {
16133
+ provider: Web3Provider;
16134
+ itemRequirements: (NativeItemRequirement | ERC20ItemRequirement | ERC721ItemRequirement)[];
16135
+ transactionOrGasAmount: FulfillmentTransaction | GasAmount;
16136
+ }
16137
+ /**
16138
+ * Represents a native item requirement for a transaction.
16139
+ * @property {ItemType.NATIVE} type - The type to indicate this is a native item requirement.
16140
+ * @property {string} amount - The amount of the item.
16141
+ */
16142
+ type NativeItemRequirement = {
16143
+ type: ItemType.NATIVE;
16144
+ amount: string;
16145
+ };
16146
+ /**
16147
+ * Represents an ERC20 item requirement for a transaction.
16148
+ * @property {ItemType.ERC20} type - The type to indicate this is a ERC20 item requirement.
16149
+ * @property {string} amount - The amount of the item.
16150
+ * @property {string} contractAddress - The contract address of the ERC20.
16151
+ * @property {string} spenderAddress - The contract address of the approver.
16152
+ */
16153
+ type ERC20ItemRequirement = {
16154
+ type: ItemType.ERC20;
16155
+ contractAddress: string;
16156
+ amount: string;
16157
+ spenderAddress: string;
16158
+ };
16159
+ /**
16160
+ * Represents an ERC721 item requirement for a transaction.
16161
+ * @property {ItemType.ERC721} type - The type to indicate this is a ERC721 item requirement.
16162
+ * @property {string} contractAddress - The contract address of the ERC721 collection.
16163
+ * @property {string} id - The ID of this ERC721 in the collection.
16164
+ * @property {string} spenderAddress - The contract address of the approver.
16165
+ */
16166
+ type ERC721ItemRequirement = {
16167
+ type: ItemType.ERC721;
16168
+ contractAddress: string;
16169
+ id: string;
16170
+ spenderAddress: string;
16171
+ };
16172
+ /**
16173
+ * An enum representing the item types
16174
+ * @enum {string}
16175
+ * @property {string} NATIVE - If the item is a native token.
16176
+ * @property {string} ERC20 - If the item is an ERC20 token.
16177
+ * @property {string} ERC721 - If the item is an ERC721 token.
16178
+ */
16179
+ declare enum ItemType {
16180
+ NATIVE = "NATIVE",
16181
+ ERC20 = "ERC20",
16182
+ ERC721 = "ERC721"
16183
+ }
16184
+ /**
16185
+ * An enum representing transaction or gas types
16186
+ * @enum {string}
16187
+ * @property {string} TRANSACTION - If the type is a transaction
16188
+ * @property {string} GAS - If the type is the gas amount
16189
+ */
16190
+ declare enum TransactionOrGasType {
16191
+ TRANSACTION = "TRANSACTION",
16192
+ GAS = "GAS"
16193
+ }
16194
+ /**
16195
+ * The fulfillment transaction which contains the transaction to send.
16196
+ * @property {TransactionOrGasType} type - The type to indicate this is a fulfillment transaction.
16197
+ * @property {TransactionRequest} transaction - The transaction to send.
16198
+ */
16199
+ type FulfillmentTransaction = {
16200
+ type: TransactionOrGasType.TRANSACTION;
16201
+ transaction: TransactionRequest;
16202
+ };
16203
+ /**
16204
+ * The gas amount which contains the gas token and the gas limit.
16205
+ * @property {TransactionOrGasType} type - The type to indicate this is a gas amount.
16206
+ * @property {GasToken} gasToken - The gas token.
16207
+ */
16208
+ type GasAmount = {
16209
+ type: TransactionOrGasType.GAS;
16210
+ gasToken: GasToken;
16211
+ };
16212
+ /**
16213
+ * Represents the gas token which is either a native token or an ERC20 token.
16214
+ */
16215
+ type GasToken = NativeGas | ERC20Gas;
16216
+ /**
16217
+ * An enum representing the gas token types
16218
+ * @enum {string}
16219
+ * @property {string} NATIVE - If the gas token is a native token.
16220
+ * @property {string} ERC20 - If the gas token is an ERC20 token.
16221
+ */
16222
+ declare enum GasTokenType {
16223
+ NATIVE = "NATIVE",
16224
+ ERC20 = "ERC20"
16225
+ }
16226
+ /**
16227
+ * Represents a native gas token.
16228
+ * @property {GasTokenType} type - The type to indicate this is a native gas token.
16229
+ * @property {BigNumber} limit - The gas limit.
16230
+ */
16231
+ type NativeGas = {
16232
+ type: GasTokenType.NATIVE;
16233
+ limit: BigNumber;
16234
+ };
16235
+ /**
16236
+ * Represents an ERC20 gas token.
16237
+ * @property {GasTokenType} type - The type to indicate this is an ERC20 gas token.
16238
+ * @property {string} contractAddress - The contract address of the ERC20.
16239
+ * @property {BigNumber} limit - The gas limit.
16240
+ */
16241
+ type ERC20Gas = {
16242
+ type: GasTokenType.ERC20;
16243
+ contractAddress: string;
16244
+ limit: BigNumber;
16245
+ };
16246
+ /**
16247
+ * The type representing the result of {@link Checkout.smartCheckout}.
16248
+ */
16249
+ type SmartCheckoutResult = SmartCheckoutSufficient | SmartCheckoutInsufficient;
16250
+ /**
16251
+ * Represents the result of {@link Checkout.smartCheckout} when smart checkout is sufficient.
16252
+ * @property {boolean} sufficient - Indicates that smart checkout determined the user had sufficient funds.
16253
+ * @property {TransactionRequirement[]} transactionRequirements - The transaction requirements smart checkout
16254
+ * determined were required for the transaction.
16255
+ */
16256
+ type SmartCheckoutSufficient = {
16257
+ sufficient: true;
16258
+ transactionRequirements: TransactionRequirement[];
16259
+ };
16260
+ /**
16261
+ * Represents the result of {@link Checkout.smartCheckout} when smart checkout is insufficient.
16262
+ * @property {boolean} sufficient - Indicates that smart checkout determined the user has insufficient funds
16263
+ * @property {TransactionRequirement[]} transactionRequirements - The transaction requirements smart checkout
16264
+ * determined were required for the transaction.
16265
+ * @property {SmartCheckoutRouter} router - The type containing the funding routes the user can take to fulfill the transaction requirements
16266
+ */
16267
+ type SmartCheckoutInsufficient = {
16268
+ sufficient: false;
16269
+ transactionRequirements: TransactionRequirement[];
16270
+ router: SmartCheckoutRouter;
16271
+ };
16272
+ /**
16273
+ * Represents the routing outcome for a transaction.
16274
+ * @property {AvailableRoutingOptions} availableRoutingOptions - The routing options available to the user
16275
+ * @property {RoutingOutcome} routingOutcome - The routing outcome for the transaction which
16276
+ * includes the funding routes if routes were found
16277
+ */
16278
+ type SmartCheckoutRouter = {
16279
+ availableRoutingOptions: AvailableRoutingOptions;
16280
+ routingOutcome: RoutingOutcome;
16281
+ };
16282
+ /**
16283
+ * An enum representing the routing outcome types
16284
+ * @enum {string}
16285
+ * @property {string} ROUTES_FOUND - If funding routes were found for the transaction.
16286
+ * @property {string} NO_ROUTES_FOUND - If no funding routes were found for the transaction.
16287
+ * @property {string} NO_ROUTE_OPTIONS - If no routing options were available for the transaction.
16288
+ */
16289
+ declare enum RoutingOutcomeType {
16290
+ ROUTES_FOUND = "ROUTES_FOUND",
16291
+ NO_ROUTES_FOUND = "NO_ROUTES_FOUND",
16292
+ NO_ROUTE_OPTIONS = "NO_ROUTE_OPTIONS"
16293
+ }
16294
+ type RoutingOutcome = RoutesFound | NoRoutesFound | NoRouteOptions;
16295
+ /**
16296
+ * Represents a routing outcome where funding routes were found.
16297
+ * @property {RoutingOutcomeType.ROUTES_FOUND} type - Indicates that funding routes were found for the transaction.
16298
+ * @property {AvailableRoutingOptions} fundingRoutes - The funding routes found for the transaction.
16299
+ */
16300
+ type RoutesFound = {
16301
+ type: RoutingOutcomeType.ROUTES_FOUND;
16302
+ fundingRoutes: FundingRoute[];
16303
+ };
16304
+ /**
16305
+ * Represents a routing outcome where no funding routes were found.
16306
+ * @property {RoutingOutcomeType.NO_ROUTES_FOUND} type - Indicates that no funding routes were found for the transaction.
16307
+ * @property {string} message - The message indicating why no funding routes were found.
16308
+ */
16309
+ type NoRoutesFound = {
16310
+ type: RoutingOutcomeType.NO_ROUTES_FOUND;
16311
+ message: string;
16312
+ };
16313
+ /**
16314
+ * Represents a routing outcome where no routing options were available for the transaction.
16315
+ * @property {RoutingOutcomeType.NO_ROUTE_OPTIONS} type - Indicates that no routing options were available for the transaction.
16316
+ * @property {string} message - The message indicating why no routing options were available.
16317
+ */
16318
+ type NoRouteOptions = {
16319
+ type: RoutingOutcomeType.NO_ROUTE_OPTIONS;
16320
+ message: string;
16321
+ };
16322
+ /**
16323
+ * Represents a funding route
16324
+ * @property {number} priority - The priority of the route
16325
+ * @property {FundingStep[]} steps - The steps associated with this funding route
16326
+ */
16327
+ type FundingRoute = {
16328
+ priority: number;
16329
+ steps: FundingStep[];
16330
+ };
16331
+ /**
16332
+ * Represents a fee
16333
+ * @property {BigNumber} amount - The amount of the fee
16334
+ * @property {string} formatted - The formatted amount of the fee
16335
+ * @property {TokenInfo | undefined} token - The token info for the fee
16336
+ */
16337
+ type Fee = {
16338
+ amount: BigNumber;
16339
+ formattedAmount: string;
16340
+ token?: TokenInfo;
16341
+ };
16342
+ type FundingStep = BridgeFundingStep | SwapFundingStep | OnRampFundingStep;
16343
+ /**
16344
+ * Represents a bridge funding route
16345
+ * @property {FundingStepType.BRIDGE} type - Indicates that this is a bridge funding step
16346
+ * @property {number} chainId - The chain id the bridge should be executed on
16347
+ * @property {FundingItem} fundingItem - The funding item for the bridge
16348
+ * @property {BridgeFees} fees - The fees for the bridge
16349
+ */
16350
+ type BridgeFundingStep = {
16351
+ type: FundingStepType.BRIDGE;
16352
+ chainId: number;
16353
+ fundingItem: FundingItem;
16354
+ fees: BridgeFees;
16355
+ };
16356
+ /**
16357
+ * Represents the fees for a bridge funding step
16358
+ * @property {Fee} approvalGasFees - The approval gas fees for the bridge
16359
+ * @property {Fee} bridgeGasFees - The bridge gas fees for the bridge
16360
+ * @property {Fee[]} bridgeFees - Additional bridge fees for the bridge
16361
+ */
16362
+ type BridgeFees = {
16363
+ approvalGasFees: Fee;
16364
+ bridgeGasFees: Fee;
16365
+ bridgeFees: Fee[];
16366
+ };
16367
+ /**
16368
+ * Represents a swap funding route
16369
+ * @property {FundingStepType.SWAP} type - Indicates that this is a swap funding step
16370
+ * @property {number} chainId - The chain id the swap should be executed on
16371
+ * @property {FundingItem} fundingItem - The funding item for the swap
16372
+ * @property {SwapFees} fees - The fees for the swap
16373
+ */
16374
+ type SwapFundingStep = {
16375
+ type: FundingStepType.SWAP;
16376
+ chainId: number;
16377
+ fundingItem: FundingItem;
16378
+ fees: SwapFees;
16379
+ };
16380
+ /**
16381
+ * Represents the fees for a swap funding step
16382
+ * @property {Fee} approvalGasFees - The approval gas fees for the swap
16383
+ * @property {Fee} swapGasFees - The swap gas fees for the swap
16384
+ * @property {Fee[]} swapFees - Additional swap fees for the swap
16385
+ */
16386
+ type SwapFees = {
16387
+ approvalGasFees: Fee;
16388
+ swapGasFees: Fee;
16389
+ swapFees: Fee[];
16390
+ };
16391
+ /**
16392
+ * Represents an onramp funding route
16393
+ * @property {FundingStepType.ONRAMP} type - Indicates that this is an onramp funding step
16394
+ * @property {number} chainId - The chain id the onramp should provide funds to
16395
+ * @property {FundingItem} fundingItem - The item to be onramped
16396
+ */
16397
+ type OnRampFundingStep = {
16398
+ type: FundingStepType.ONRAMP;
16399
+ chainId: number;
16400
+ fundingItem: FundingItem;
16401
+ };
16402
+ /**
16403
+ * An enum representing the funding step types
16404
+ * @enum {string}
16405
+ * @property {string} BRIDGE - If the funding step is a bridge.
16406
+ * @property {string} SWAP - If the funding step is a swap.
16407
+ * @property {string} ONRAMP - If the funding step is an onramp.
16408
+ */
16409
+ declare enum FundingStepType {
16410
+ BRIDGE = "BRIDGE",
16411
+ SWAP = "SWAP",
16412
+ ONRAMP = "ONRAMP"
16413
+ }
16414
+ /**
16415
+ * Represents a funding item
16416
+ * @property {ItemType.NATIVE | ItemType.ERC20} type - The type of the funding item
16417
+ * @property {FundsRequired} fundsRequired - The amount of funds required of this funding item
16418
+ * @property {UserBalance} userBalance - The current user balance of this funding item
16419
+ * @property {TokenInfo} token - The token info for the funding item
16420
+ */
16421
+ type FundingItem = {
16422
+ type: ItemType.NATIVE | ItemType.ERC20;
16423
+ fundsRequired: FundsRequired;
16424
+ userBalance: UserBalance;
16425
+ token: TokenInfo;
16426
+ };
16427
+ /**
16428
+ * Represents the funds required of a funding item
16429
+ * @property {BigNumber} amount - The amount of funds required
16430
+ * @property {string} formattedAmount - The formatted amount of funds required
16431
+ */
16432
+ type FundsRequired = {
16433
+ amount: BigNumber;
16434
+ formattedAmount: string;
16435
+ };
16436
+ /**
16437
+ * Represents the user balance of a funding item
16438
+ * @property {BigNumber} balance - The balance of the funding item
16439
+ * @property {string} formattedBalance - The formatted balance of the funding item
16440
+ */
16441
+ type UserBalance = {
16442
+ balance: BigNumber;
16443
+ formattedBalance: string;
16444
+ };
16445
+ /**
16446
+ * Represents the transaction requirement for a transaction.
16447
+ * @property {ItemType} type - The type of the transaction requirement.
16448
+ * @property {boolean} sufficient - If the user address has sufficient funds to cover the transaction.
16449
+ * @property {ItemBalance} required - The required item balance.
16450
+ * @property {ItemBalance} current - The current item balance.
16451
+ * @property {BalanceDelta} delta - The delta between the required and current balances.
16452
+ */
16453
+ type TransactionRequirement = {
16454
+ type: ItemType;
16455
+ sufficient: boolean;
16456
+ required: ItemBalance;
16457
+ current: ItemBalance;
16458
+ delta: BalanceDelta;
16459
+ };
16460
+ /**
16461
+ * Represents the balance for either a native or ERC20 token.
16462
+ * @property {ItemType.NATIVE | ItemType.ERC20} type - Type to indicate this is a native or ERC20 token.
16463
+ * @property {BigNumber} balance - The balance of the item.
16464
+ * @property {string} formattedBalance - The formatted balance of the item.
16465
+ * @property {TokenInfo} token - The token info of the item.
16466
+ */
16467
+ type TokenBalance = {
16468
+ type: ItemType.NATIVE | ItemType.ERC20;
16469
+ balance: BigNumber;
16470
+ formattedBalance: string;
16471
+ token: TokenInfo;
16472
+ };
16473
+ /**
16474
+ * Represents the balance for an ERC721.
16475
+ * @property {ItemType.ERC721} type - Type to indicate this is an ERC721 token.
16476
+ * @property {BigNumber} balance - The balance of the item.
16477
+ * @property {string} formattedBalance - The formatted balance of the item.
16478
+ * @property {string} contractAddress - The contract address of the ERC721 collection.
16479
+ * @property {string} id - The ID of the ERC721 in the collection.
16480
+ */
16481
+ type ERC721Balance = {
16482
+ type: ItemType.ERC721;
16483
+ balance: BigNumber;
16484
+ formattedBalance: string;
16485
+ contractAddress: string;
16486
+ id: string;
16487
+ };
16488
+ /**
16489
+ * Type representing the balance of an item.
16490
+ */
16491
+ type ItemBalance = ERC721Balance | TokenBalance;
16492
+ /**
16493
+ * Represents the delta between two balances.
16494
+ * @property {BigNumber} balance - The delta of the balance.
16495
+ * @property {string} formattedBalance - The formatted balance of the delta.
16496
+ */
16497
+ type BalanceDelta = {
16498
+ balance: BigNumber;
16499
+ formattedBalance: string;
16500
+ };
16501
+ /**
16502
+ * A type representing the Smart Checkout routing options available for a user
16503
+ * if they are configured and enabled (not geo-blocked etc.)
16504
+ * @property {boolean | undefined} onRamp - If the user can use onramp
16505
+ * @property {boolean | undefined} swap - If the user can use swap
16506
+ * @property {boolean | undefined} bridge - If the user can use bridge
16507
+ */
16508
+ type AvailableRoutingOptions = {
16509
+ onRamp?: boolean;
16510
+ swap?: boolean;
16511
+ bridge?: boolean;
16512
+ };
16513
+
16514
+ /**
16515
+ * Interface representing the parameters for {@link Checkout.buy}
16516
+ * @property {Web3Provider} provider - The provider to use for the buy.
16517
+ * @property {Array<BuyOrder>} orders - The orders to buy
16518
+ * Currently only processes the first order in the array until batch processing is supported.
16519
+ */
16520
+ interface BuyParams {
16521
+ provider: Web3Provider;
16522
+ orders: Array<BuyOrder>;
16523
+ }
16524
+
16525
+ /**
16526
+ * Interface representing the parameters for {@link Checkout.cancel}
16527
+ * @property {Web3Provider} provider - The provider to use for the cancel.
16528
+ * @property {string[]} orderIds - The order IDs to cancel.
16529
+ * Currently only processes the first order in the array until batch processing is supported.
16530
+ */
16531
+ interface CancelParams {
16532
+ provider: Web3Provider;
16533
+ orderIds: string[];
16534
+ }
16535
+
16536
+ /**
16537
+ * Type representing an ERC20 token
16538
+ * @property {string} type - The token type, used to discriminate between {@link ERC20} and {@link Native}
16539
+ * @property {number} chainId - The chain ID
16540
+ * @property {string} address - The token address
16541
+ * @property {number} decimals - The token decimals
16542
+ * @property {string | undefined} symbol - The token symbol or undefined if it is not available
16543
+ * @property {string | undefined} name - The token name or undefined if it is not available
16544
+ */
16545
+ type ERC20 = {
16546
+ type: 'erc20';
16547
+ chainId: number;
16548
+ address: string;
16549
+ decimals: number;
16550
+ symbol?: string;
16551
+ name?: string;
16552
+ };
16553
+ /**
16554
+ * Type representing a native token
16555
+ * @property {string} type - The token type, used to discriminate between {@link ERC20} and {@link Native}
16556
+ * @property {number} chainId - The chain ID
16557
+ * @property {number} decimals - The token decimals
16558
+ * @property {string | undefined} symbol - The token symbol or undefined if it is not available
16559
+ * @property {string | undefined} name - The token name or undefined if it is not available
16560
+ */
16561
+ type Native = {
16562
+ type: 'native';
16563
+ chainId: number;
16564
+ decimals: number;
16565
+ symbol?: string;
16566
+ name?: string;
16567
+ };
16568
+ /**
16569
+ * Type representing a token, either an {@link ERC20} or {@link Native}
16570
+ */
16571
+ type Coin = ERC20 | Native;
16572
+ /**
16573
+ * Type representing the overrides for the {@link Exchange} module
16574
+ * @property {string} rpcURL - The RPC URL for the chain
16575
+ * @property {ExchangeContracts} exchangeContracts - The DEX contract addresses
16576
+ * @property {ERC20[]} commonRoutingTokens - The tokens used to find available pools for a swap
16577
+ * @property {Coin} nativeToken - The native token of the chain
16578
+ * @property {ERC20} wrappedNativeToken - The wrapped native token of the chain
16579
+ */
16580
+ type ExchangeOverrides = {
16581
+ rpcURL: string;
16582
+ exchangeContracts: ExchangeContracts;
16583
+ commonRoutingTokens: ERC20[];
16584
+ nativeToken: Coin;
16585
+ wrappedNativeToken: ERC20;
16586
+ };
16587
+
16588
+ interface CheckoutOverrides {
16589
+ }
16590
+ /**
16591
+ * A type representing checkout SDK configurations.
16592
+ * @property {boolean} isOnRampEnabled - To enable on-ramp feature in Checkout sdk.
16593
+ * @property {boolean} isSwapEnabled - To enable swap feature in Checkout sdk.
16594
+ * @property {boolean} isBridgeEnabled - To enable bridge feature in Checkout sdk.
16595
+ * @property {Passport} passport - To enable passport wallet with Checkout sdk.
16596
+ */
16597
+ interface CheckoutModuleConfiguration extends ModuleConfiguration<CheckoutOverrides> {
16598
+ isOnRampEnabled?: boolean;
16599
+ isSwapEnabled?: boolean;
16600
+ isBridgeEnabled?: boolean;
16601
+ passport?: Passport;
16602
+ }
16603
+ /**
16604
+ * A type representing various remotely defined configurations which are
16605
+ * accessible via the Checkout config and configured based on the Environment.
16606
+ * @property {DexConfig} dex - The config used for the DEX.
16607
+ * @property {OnRampConfig} onramp - The config used for the OnRamp
16608
+ * @property {AllowedNetworkConfig[]} allowedNetworks - An array representing the allowed networks.
16609
+ * @property {GasEstimateTokenConfig | undefined} gasEstimateTokens - The config for the tokens used to estimate gas.
16610
+ */
16611
+ type RemoteConfiguration = {
16612
+ dex: DexConfig;
16613
+ onramp: OnRampConfig;
16614
+ bridge: BridgeConfig;
16615
+ allowedNetworks: AllowedNetworkConfig[];
16616
+ gasEstimateTokens?: GasEstimateTokenConfig;
16617
+ imxAddressMapping?: ImxAddressConfig;
16618
+ };
16619
+ /**
16620
+ * A type representing the fee structure for an OnRamp provider
16621
+ * @property {string | undefined} minPercentage - minimum percentage fee shown if a fee range is provided
16622
+ * @property {string | undefined} maxPercentage - maximum percentage fee shown if a fee range is provided
16623
+ * @property {string | undefined} feePercentage - specific fee percentage shown if there is no range provided
16624
+ */
16625
+ type OnRampProviderFees = {
16626
+ minPercentage?: string;
16627
+ maxPercentage?: string;
16628
+ feePercentage?: string;
16629
+ };
16630
+ /**
16631
+ * A type representing the configuration for the OnRamp for a specific provider.
16632
+ * @property {string} publishableApiKey - on ramp provider publishable api-key
16633
+ * @property {TokenInfo[]} tokens - allowed tokens for the OnRamp provider
16634
+ * @property {OnRampProviderFees} fees - on ramp provider transaction fees
16635
+ */
16636
+ type OnRampProviderConfig = {
16637
+ publishableApiKey: string;
16638
+ tokens: TokenInfo[];
16639
+ fees: OnRampProviderFees;
16640
+ };
16641
+ /**
16642
+ * A type representing the configuration for the OnRamp.
16643
+ * @property {OnRampProviderConfig} transak - OnRamp config for Transak provider
16644
+ */
16645
+ type OnRampConfig = {
16646
+ [key: string]: OnRampProviderConfig;
16647
+ };
16648
+ /**
16649
+ * A type representing the configuration for the DEX.
16650
+ * @property {ExchangeOverrides | undefined} overrides - The DEX overrides.
16651
+ * @property {TokenInfo[] | undefined} tokens - An array of tokens compatible with the DEX.
16652
+ */
16653
+ type DexConfig = {
16654
+ overrides?: ExchangeOverrides;
16655
+ tokens?: TokenInfo[];
16656
+ };
16657
+ /**
16658
+ * A type representing the configuration for the Bridge.
16659
+ * @property {TokenInfo[] | undefined} tokens - An array of tokens compatible with the Bridge.
16660
+ */
16661
+ type BridgeConfig = {
16662
+ tokens?: TokenInfo[];
16663
+ };
16664
+ /**
16665
+ * A type representing an allowed network.
16666
+ * @property {number} chainId - The network chain id.
16667
+ */
16668
+ type AllowedNetworkConfig = {
16669
+ chainId: number;
16670
+ };
16671
+ /**
16672
+ * A type representing the IMX address mappings across available networks.
16673
+ * @type {{ [chainId: string]: string }}
16674
+ */
16675
+ type ImxAddressConfig = {
16676
+ [chainId: string]: string;
16677
+ };
16678
+ /**
16679
+ * A type representing the required information to estimate gas for a transaction.
16680
+ * @type {{ [key: string]: { bridgeToL2Addresses?: GasEstimateBridgeToL2TokenConfig, swapAddresses?: GasEstimateSwapTokenConfig } }}
16681
+ * - A map of addresses for estimating gas keyed by the network chain id.
16682
+ * @property {GasEstimateBridgeToL2TokenConfig | undefined} bridgeToL2Addresses
16683
+ * - The type representing the addresses for a bridge to layer 2 gas estimate.
16684
+ * @property {GasEstimateSwapTokenConfig | undefined} swapAddresses - The type representing the addresses for a swap gas estimate
16685
+ */
16686
+ type GasEstimateTokenConfig = {
16687
+ [key: string]: {
16688
+ bridgeToL2Addresses?: GasEstimateBridgeToL2TokenConfig;
16689
+ swapAddresses?: GasEstimateSwapTokenConfig;
16690
+ };
16691
+ };
16692
+ /**
16693
+ * A type representing the config for a bridge to layer 2 gas estimate.
16694
+ * @property {string | 'NATIVE'} gasTokenAddress - The address of the gas token.
16695
+ * @property {string} fromAddress - The address of the token being bridged.
16696
+ */
16697
+ type GasEstimateBridgeToL2TokenConfig = {
16698
+ gasTokenAddress: string | 'NATIVE';
16699
+ fromAddress: string;
16700
+ };
16701
+ /**
16702
+ * A type representing the config for a swap gas estimate.
16703
+ * @property {string} inAddress - The in token address.
16704
+ * @property {string} outAddress - The out token address.
16705
+ */
16706
+ type GasEstimateSwapTokenConfig = {
16707
+ inAddress: string;
16708
+ outAddress: string;
16709
+ };
16710
+ /**
16711
+ * A type representing all the feature flags available.
16712
+ * @property {TokenInfo[] | undefined} allowed - List of allowed tokens for a given chain.
16713
+ * @property {boolean | undefined} blockscout - Feature flag to enable/disable blockscout integration.
16714
+ */
16715
+ type ChainTokensConfig = {
16716
+ allowed?: TokenInfo[];
16717
+ blockscout?: boolean;
16718
+ };
16719
+
16720
+ /**
16721
+ * Represents information about a network.
16722
+ * @interface NetworkInfo
16723
+ * @property {string} name - The name of the network.
16724
+ * @property {number} chainId - The chain ID of the network.
16725
+ * @property {TokenInfo} nativeCurrency - Information about the native currency of the network.
16726
+ * @property {boolean} isSupported - Indicates whether the network is supported.
16727
+ */
16728
+ interface NetworkInfo {
16729
+ name: string;
16730
+ chainId: number;
16731
+ nativeCurrency: TokenInfo;
16732
+ isSupported: boolean;
16733
+ }
16734
+
16735
+ /**
16736
+ * Interface representing the params of {@link Checkout.connect}.
16737
+ * @property {Web3Provider} provider - The provider used to connect to the network.
16738
+ */
16739
+ interface ConnectParams {
16740
+ provider: Web3Provider;
16741
+ }
16742
+ /**
16743
+ * Interface representing the result of {@link Checkout.connect}.
16744
+ * @property {Web3Provider} provider - The provider used to connect to the network.
16745
+ * @property {NetworkInfo} network - Information about the connected network.
16746
+ */
16747
+ interface ConnectResult {
16748
+ provider: Web3Provider;
16749
+ network: NetworkInfo;
16750
+ }
16751
+ /**
16752
+ * Interface representing the params of {@link Checkout.checkIsWalletConnected}.
16753
+ * @property {Web3Provider} provider - The provider used to connect to the network.
16754
+ */
16755
+ interface CheckConnectionParams {
16756
+ provider: Web3Provider;
16757
+ }
16758
+ /**
16759
+ * Interface representing the result of {@link Checkout.checkIsWalletConnected}.
16760
+ * @property {boolean} isConnected - A boolean indicating the connection status of th Web3 provider.
16761
+ * @property {string} walletAddress - The wallet address used to check the connection.
16762
+ */
16763
+ interface CheckConnectionResult {
16764
+ isConnected: boolean;
16765
+ walletAddress: string;
16766
+ }
16767
+
16768
+ /**
16769
+ * @typedef {string} Address - Represents an Ethereum address.
16770
+ */
16771
+ type Address = string;
16772
+ /**
16773
+ * @typedef {Address | 'NATIVE'} FungibleToken - Represents a fungible token, either an ERC20 token address or the native token.
16774
+ */
16775
+ type FungibleToken = Address | 'NATIVE';
16776
+
16777
+ /**
16778
+ * An enum representing the type of gas estimate.
16779
+ * @enum {string}
16780
+ * @property {string} BRIDGE_TO_L2 - The gas estimate type for a bridge to L2 transaction.
16781
+ * @property {string} SWAP - The gas estimate type for a swap transaction.
16782
+ */
16783
+ declare enum GasEstimateType {
16784
+ BRIDGE_TO_L2 = "BRIDGE_TO_L2",
16785
+ SWAP = "SWAP"
16786
+ }
16787
+ /**
16788
+ * Represents the parameters for estimating gas usage, which can be either
16789
+ * GasEstimateBridgeToL2Params or GasEstimateSwapParams {@link Checkout.gasEstimate}.
16790
+ * @typedef {GasEstimateBridgeToL2Params | GasEstimateSwapParams} GasEstimateParams
16791
+ */
16792
+ type GasEstimateParams = GasEstimateBridgeToL2Params | GasEstimateSwapParams;
16793
+ /**
16794
+ * An interface representing the parameters for estimating gas for a bridge to L2 transaction {@link Checkout.gasEstimate}.
16795
+ * @param {GasEstimateType.BRIDGE_TO_L2} gasEstimateType - The type of gas estimate.
16796
+ * @param {boolean} isSpendingCapApprovalRequired - Whether or not spending cap approval is required.
16797
+ * @param {FungibleToken | undefined} tokenAddress - The address of the fungible token to use in the transaction.
16798
+ */
16799
+ interface GasEstimateBridgeToL2Params {
16800
+ gasEstimateType: GasEstimateType.BRIDGE_TO_L2;
16801
+ isSpendingCapApprovalRequired: boolean;
16802
+ tokenAddress?: FungibleToken;
16803
+ }
16804
+ /**
16805
+ * An interface representing the parameters for a gas estimate swap {@link Checkout.gasEstimate}.
16806
+ * @interface
16807
+ * @property {GasEstimateType.SWAP} gasEstimateType - The type of gas estimate, which is always "swap".
16808
+ */
16809
+ interface GasEstimateSwapParams {
16810
+ gasEstimateType: GasEstimateType.SWAP;
16811
+ }
16812
+ /**
16813
+ * An interface representing the result of a gas estimate for a swap transaction {@link Checkout.gasEstimate}.
16814
+ * @interface GasEstimateSwapResult
16815
+ * @property {GasEstimateType.SWAP} gasEstimateType - The type of gas estimate, which is always "SWAP".
16816
+ * @property {TokenAmountEstimate} gasFee - The estimated gas fee for the swap transaction.
16817
+ */
16818
+ interface GasEstimateSwapResult {
16819
+ gasEstimateType: GasEstimateType.SWAP;
16820
+ gasFee: TokenAmountEstimate;
16821
+ }
16822
+ /**
16823
+ * An interface representing the result of a gas estimate for a bridge to L2 transaction {@link Checkout.gasEstimate}.
16824
+ * @interface GasEstimateBridgeToL2Result
16825
+ * @property {GasEstimateType.BRIDGE_TO_L2} gasEstimateType - The type of gas estimate.
16826
+ * @property {TokenAmountEstimate} gasFee - The estimated gas fee for the transaction.
16827
+ * @property {TokenAmountEstimate} bridgeFee - The estimated bridge fee for the transaction.
16828
+ * @property {boolean} bridgeable - A boolean indicating whether the transaction is bridgeable.
16829
+ */
16830
+ interface GasEstimateBridgeToL2Result {
16831
+ gasEstimateType: GasEstimateType.BRIDGE_TO_L2;
16832
+ gasFee: TokenAmountEstimate;
16833
+ bridgeFee: TokenAmountEstimate;
16834
+ bridgeable: boolean;
16835
+ }
16836
+ interface TokenAmountEstimate {
16837
+ estimatedAmount?: BigNumber;
16838
+ token?: TokenInfo;
16839
+ }
16840
+
16841
+ /**
16842
+ * Interface representing the parameters for {@link Checkout.switchNetwork}.
16843
+ * @property {Web3Provider} provider - The provider to connect to the network.
16844
+ * @property {ChainId} chainId - The ID of the network to switch to.
16845
+ */
16846
+ interface SwitchNetworkParams {
16847
+ provider: Web3Provider;
16848
+ chainId: ChainId;
16849
+ }
16850
+ /**
16851
+ * Represents the result of switching the network in a Web3 application {@link Checkout.switchNetwork}.
16852
+ * @interface SwitchNetworkResult
16853
+ * @property {NetworkInfo} network - The information about the switched network.
16854
+ * @property {Web3Provider} provider - The Web3 provider for the switched network.
16855
+ */
16856
+ interface SwitchNetworkResult {
16857
+ network: NetworkInfo;
16858
+ provider: Web3Provider;
16859
+ }
16860
+ /**
16861
+ * * Interface representing the parameters for {@link Checkout.getNetworkInfo}.
16862
+ * @property {Web3Provider} provider - The provider to connect to the network.
16863
+ */
16864
+ interface GetNetworkParams {
16865
+ provider: Web3Provider;
16866
+ }
16867
+ /**
16868
+ * * Interface representing the parameters for {@link Checkout.getNetworkAllowList}.
16869
+ * @property {NetworkFilterTypes} type - The type of allow list filter to apply.
16870
+ * @property {NetworkFilter[]} [exclude] - The list of networks to exclude from the allow list.
16871
+ */
16872
+ interface GetNetworkAllowListParams {
16873
+ type: NetworkFilterTypes;
16874
+ exclude?: NetworkFilter[];
16875
+ }
16876
+ /**
16877
+ * Interface representing the result of {@link Checkout.getNetworkAllowList}.
16878
+ * @property {NetworkInfo[]} networks - The list of allowed networks.
16879
+ */
16880
+ interface GetNetworkAllowListResult {
16881
+ networks: NetworkInfo[];
16882
+ }
16883
+ /**
16884
+ * Enum representing the types of filters that can be applied to get the allow list of networks.
16885
+ */
16886
+ declare enum NetworkFilterTypes {
16887
+ ALL = "all"
16888
+ }
16889
+ /**
16890
+ * Interface representing a filter for filtering a specific network.
16891
+ * @property {ChainId} chainId - The ID of the network to allow or disallow.
16892
+ */
16893
+ interface NetworkFilter {
16894
+ chainId: ChainId;
16895
+ }
16896
+
16897
+ /**
16898
+ * Interface representing the parameters for {@link Checkout.sell}
16899
+ * @property {Web3Provider} provider - The provider to use for the sell.
16900
+ * @property {Array<SellOrder>} orders - An array of sell orders to execute.
16901
+ * Currently only processes the first order in the array until batch processing is supported.
16902
+ */
16903
+ interface SellParams {
16904
+ provider: Web3Provider;
16905
+ orders: Array<SellOrder>;
16906
+ }
16907
+
16908
+ /**
16909
+ * Interface representing the parameters for {@link Checkout.getTokenAllowList}.
16910
+ * @property {TokenFilterTypes} type - The type of token to retrieve.
16911
+ * @property {ChainId} chainId - The ID of the blockchain network.
16912
+ * @property {TokenFilter[]} [exclude] - The tokens to exclude from the list.
16913
+ */
16914
+ interface GetTokenAllowListParams {
16915
+ type: TokenFilterTypes;
16916
+ chainId: ChainId;
16917
+ exclude?: TokenFilter[];
16918
+ }
16919
+ /**
16920
+ * Interface representing the result of {@link Checkout.getTokenAllowList}.
16921
+ * @property {TokenInfo[]} tokens - The list of tokens allowed for the specified params.
16922
+ */
16923
+ interface GetTokenAllowListResult {
16924
+ tokens: TokenInfo[];
16925
+ }
16926
+ /**
16927
+ * Enum representing the types of token filters available.
16928
+ */
16929
+ declare enum TokenFilterTypes {
16930
+ ALL = "all",
16931
+ SWAP = "swap",
16932
+ BRIDGE = "bridge",
16933
+ ONRAMP = "onramp"
16934
+ }
16935
+ /**
16936
+ * Interface representing a token filter that can be used to exclude certain tokens.
16937
+ * @property {string} address - The token contract address.
16938
+ */
16939
+ interface TokenFilter {
16940
+ address: string;
16941
+ }
16942
+
16943
+ /**
16944
+ * Interface representing the parameters for {@link Checkout.sendTransaction}.
16945
+ * @property {Web3Provider} provider - The provider to connect to the network.
16946
+ * @property {TransactionRequest} transaction - The transaction to send.
16947
+ */
16948
+ interface SendTransactionParams {
16949
+ provider: Web3Provider;
16950
+ transaction: TransactionRequest;
16951
+ }
16952
+ /**
16953
+ * Interface representing the result of {@link Checkout.sendTransaction}.
16954
+ * @property {TransactionResponse} transactionResponse - The response of the transaction.
16955
+ */
16956
+ interface SendTransactionResult {
16957
+ transactionResponse: TransactionResponse;
16958
+ }
16959
+
16960
+ /**
16961
+ * Enum representing the names of different wallet providers.
16962
+ */
16963
+ declare enum WalletProviderName {
16964
+ PASSPORT = "passport",
16965
+ METAMASK = "metamask"
16966
+ }
16967
+ /**
16968
+ * Interface for the parameters required to create a wallet provider {@link Checkout.createProvider}.
16969
+ * @interface CreateProviderParams
16970
+ * @property {WalletProviderName} walletProviderName - The wallet provider name to create a provider for.
16971
+ */
16972
+ interface CreateProviderParams {
16973
+ walletProviderName: WalletProviderName;
16974
+ }
16975
+ /**
16976
+ * Represents the result of creating a Web3 provider {@link Checkout.createProvider}.
16977
+ * @property {Web3Provider} provider - The created Web3 provider.
16978
+ * @property {WalletProviderName} walletProviderName - The wallet provider name of the provider that was created.
16979
+ */
16980
+ type CreateProviderResult = {
16981
+ provider: Web3Provider;
16982
+ walletProviderName: WalletProviderName;
16983
+ };
16984
+
16985
+ /**
16986
+ * Interface representing a wallet filter to be used in {@link GetWalletAllowListParams}.
16987
+ * @property {WalletProviderName} walletProviderName - The wallet provider name to filter wallets by.
16988
+ */
16989
+ interface WalletFilter {
16990
+ walletProviderName: WalletProviderName;
16991
+ }
16992
+ /**
16993
+ * Interface representing the parameters for {@link Checkout.getWalletAllowList}.
16994
+ * @property {WalletFilterTypes} type - The type of wallets to filter by.
16995
+ * @property {WalletFilter[]} [exclude] - An optional list of wallet filters to exclude from the allowed wallets list.
16996
+ */
16997
+ interface GetWalletAllowListParams {
16998
+ type: WalletFilterTypes;
16999
+ exclude?: WalletFilter[];
17000
+ }
17001
+ /**
17002
+ * Interface representing information about a wallet used in {@link GetWalletAllowListResult}.
17003
+ * @property {WalletProviderName} walletProviderName - The wallet provider name for the wallet.
17004
+ * @property {string | undefined} description - A description of the wallet.
17005
+ * @property {string | undefined} icon - The URL/data:image of an icon for the wallet.
17006
+ */
17007
+ interface WalletInfo {
17008
+ walletProviderName: WalletProviderName;
17009
+ description?: string;
17010
+ icon?: string;
17011
+ }
17012
+ /**
17013
+ * Interface representing the result of {@link Checkout.getWalletAllowList}.
17014
+ * @property {WalletInfo[]} wallets - A list of {@link WalletInfo} objects representing the allowed wallets.
17015
+ */
17016
+ interface GetWalletAllowListResult {
17017
+ wallets: WalletInfo[];
17018
+ }
17019
+ /**
17020
+ * Enum representing the platform filters used in {@link GetWalletAllowListParams}.
17021
+ */
17022
+ declare enum WalletFilterTypes {
17023
+ ALL = "all"
17024
+ }
17025
+
17026
+ /**
17027
+ * Base URL for the checkout API based on the environment.
17028
+ * @property {string} DEVELOPMENT - The base URL for the development environment.
17029
+ * @property {string} SANDBOX - The base URL for the sandbox environment.
17030
+ * @property {string} PRODUCTION - The base URL for the production environment.
17031
+ */
17032
+ declare const CHECKOUT_API_BASE_URL: {
17033
+ [x: string]: string;
17034
+ sandbox: string;
17035
+ production: string;
17036
+ };
17037
+ type NetworkDetails = {
17038
+ chainIdHex: string;
17039
+ chainName: string;
17040
+ rpcUrls: string[];
17041
+ nativeCurrency: TokenInfo;
17042
+ blockExplorerUrls?: string[];
17043
+ };
17044
+ type NetworkMap = Map<ChainId, NetworkDetails>;
17045
+
17046
+ /**
17047
+ * An enum representing the type of exchange.
17048
+ * @enum {string}
17049
+ * @property {string} ONRAMP - The exchange type for transacting.
17050
+ */
17051
+ declare enum ExchangeType {
17052
+ ONRAMP = "onramp"
17053
+ }
17054
+ /**
17055
+ * Interface representing the result of {@link Checkout.createFiatRampUrl}.
17056
+ * @property {ExchangeType} exchangeType - The ExchangeType specified.
17057
+ * @property {Web3Provider} web3Provider - The Web3Provider used to exchange.
17058
+ * @property {string | undefined} tokenAmount - The token amount specified as input.
17059
+ * @property {string | undefined} tokenAddress - The token address specified as input.
17060
+ * @property {Passport | undefined} passport - The Passport instance specified as input.
17061
+ */
17062
+ interface FiatRampParams {
17063
+ exchangeType: ExchangeType;
17064
+ web3Provider: Web3Provider;
17065
+ tokenAmount?: string;
17066
+ tokenAddress?: string;
17067
+ passport?: any;
17068
+ }
17069
+
17070
+ type RemoteConfigParams = {
17071
+ isDevelopment: boolean;
17072
+ isProduction: boolean;
17073
+ };
17074
+ declare class RemoteConfigFetcher {
17075
+ private isDevelopment;
17076
+ private isProduction;
17077
+ private configCache;
17078
+ private tokensCache;
17079
+ constructor(params: RemoteConfigParams);
17080
+ private static makeHttpRequest;
17081
+ private getEndpoint;
17082
+ private loadConfig;
17083
+ private loadConfigTokens;
17084
+ getConfig(key?: keyof RemoteConfiguration): Promise<RemoteConfiguration | RemoteConfiguration[keyof RemoteConfiguration] | undefined>;
17085
+ getTokensConfig(chainId: ChainId): Promise<ChainTokensConfig>;
17086
+ }
17087
+
17088
+ declare class CheckoutConfiguration {
17089
+ readonly isDevelopment: boolean;
17090
+ readonly isProduction: boolean;
17091
+ readonly isOnRampEnabled: boolean;
17092
+ readonly isSwapEnabled: boolean;
17093
+ readonly isBridgeEnabled: boolean;
17094
+ readonly remote: RemoteConfigFetcher;
17095
+ readonly environment: Environment;
17096
+ readonly networkMap: NetworkMap;
17097
+ constructor(config: CheckoutModuleConfiguration);
17098
+ }
17099
+
17100
+ interface FiatRampWidgetParams {
17101
+ exchangeType: ExchangeType;
17102
+ isPassport: boolean;
17103
+ walletAddress?: string;
17104
+ tokenAmount?: string;
17105
+ tokenSymbol?: string;
17106
+ email?: string;
17107
+ }
17108
+ declare class FiatRampService {
17109
+ readonly config: CheckoutConfiguration;
17110
+ /**
17111
+ * Constructs a new instance of the FiatRampService class.
17112
+ * @param {CheckoutConfiguration} config - The config required for the FiatRampService.
17113
+ */
17114
+ constructor(config: CheckoutConfiguration);
17115
+ feeEstimate(): Promise<OnRampProviderFees>;
17116
+ createWidgetUrl(params: FiatRampWidgetParams): Promise<string>;
17117
+ private getTransakWidgetUrl;
17118
+ }
17119
+
17120
+ type AvailabilityService = {
17121
+ checkDexAvailability: () => Promise<boolean>;
17122
+ };
17123
+
17124
+ /**
17125
+ * Enum representing the themes for the widgets.
17126
+ */
17127
+ declare enum WidgetTheme {
17128
+ LIGHT = "light",
17129
+ DARK = "dark"
17130
+ }
17131
+
17132
+ /**
17133
+ * Represents the local configuration options for the Checkout Widgets.
17134
+ * @property {WidgetTheme | undefined} theme - The theme of the Checkout Widget (default: "DARK")
17135
+ */
17136
+ type WidgetConfiguration = {
17137
+ theme?: WidgetTheme;
17138
+ };
17139
+
17140
+ /**
17141
+ * Enum representing the events emitted by the widgets.
17142
+ */
17143
+ declare enum IMTBLWidgetEvents {
17144
+ IMTBL_WIDGETS_PROVIDER = "imtbl-widgets-provider",
17145
+ IMTBL_CONNECT_WIDGET_EVENT = "imtbl-connect-widget",
17146
+ IMTBL_WALLET_WIDGET_EVENT = "imtbl-wallet-widget",
17147
+ IMTBL_SWAP_WIDGET_EVENT = "imtbl-swap-widget",
17148
+ IMTBL_BRIDGE_WIDGET_EVENT = "imtbl-bridge-widget",
17149
+ IMTBL_ONRAMP_WIDGET_EVENT = "imtbl-onramp-widget",
17150
+ IMTBL_SALE_WIDGET_EVENT = "imtbl-sale-widget"
17151
+ }
17152
+ /**
17153
+ * Enum for events raised for about provider objects
17154
+ */
17155
+ declare enum ProviderEventType {
17156
+ PROVIDER_UPDATED = "PROVIDER_UPDATED"
17157
+ }
17158
+ /**
17159
+ * Payload type for the PROVIDER_UPDATED event
17160
+ */
17161
+ type ProviderUpdated = {
17162
+ provider: Web3Provider;
17163
+ };
17164
+
17165
+ /**
17166
+ * Enum representing possible Connect Widget event types.
17167
+ */
17168
+ declare enum ConnectEventType {
17169
+ CLOSE_WIDGET = "close-widget",
17170
+ SUCCESS = "success",
17171
+ FAILURE = "failure"
17172
+ }
17173
+ /**
17174
+ * Represents a successful connection.
17175
+ * @property {Web3Provider} provider - The connected provider.
17176
+ * @property {WalletProviderName | undefined} walletProviderName - The wallet provider name of the connected provider.
17177
+ */
17178
+ type ConnectionSuccess = {
17179
+ provider: Web3Provider;
17180
+ walletProviderName: WalletProviderName | undefined;
17181
+ };
17182
+ /**
17183
+ * Represents a connection failure with a reason.
17184
+ * @property {string} reason - The reason for the failed connection.
17185
+ */
17186
+ type ConnectionFailed = {
17187
+ reason: string;
17188
+ };
17189
+
17190
+ /**
17191
+ * Enum representing possible Wallet Widget event types.
17192
+ */
17193
+ declare enum WalletEventType {
17194
+ CLOSE_WIDGET = "close-widget",
17195
+ NETWORK_SWITCH = "network-switch",
17196
+ DISCONNECT_WALLET = "disconnect-wallet"
17197
+ }
17198
+ /**
17199
+ * Represents an event that is triggered when the user switches the network in their wallet.
17200
+ * @property {string} network - The name of the network that the user switched to.
17201
+ * @property {number} chainId - The chain ID of the network that the user switched to.
17202
+ * @property {Web3Provider} provider - The Web3 provider object for the switched network.
17203
+ */
17204
+ type WalletNetworkSwitchEvent = {
17205
+ network: string;
17206
+ chainId: number;
17207
+ provider: Web3Provider;
17208
+ };
17209
+ /**
17210
+ * Represents an event that is triggered when a wallet is disconnected.
17211
+ */
17212
+ type WalletDisconnectWalletEvent = {};
17213
+
17214
+ /**
17215
+ * Enum representing possible Swap Widget event types.
17216
+ */
17217
+ declare enum SwapEventType {
17218
+ CLOSE_WIDGET = "close-widget",
17219
+ SUCCESS = "success",
17220
+ FAILURE = "failure",
17221
+ REJECTED = "rejected"
17222
+ }
17223
+ /**
17224
+ * Represents a successful swap transaction.
17225
+ * @property {string} transactionHash - The hash of the successful transaction.
17226
+ */
17227
+ type SwapSuccess = {
17228
+ transactionHash: string;
17229
+ };
17230
+ /**
17231
+ * Type representing a Swap Widget with type FAILURE.
17232
+ * @property {string} reason - The reason why the swap failed.
17233
+ * @property {number} timestamp - The timestamp of the failed swap.
17234
+ */
17235
+ type SwapFailed = {
17236
+ reason: string;
17237
+ timestamp: number;
17238
+ };
17239
+ /**
17240
+ * Type representing a Swap Widget with type FAILURE.
17241
+ * @property {string} reason - The reason why the swap failed.
17242
+ * @property {number} timestamp - The timestamp of the failed swap.
17243
+ */
17244
+ type SwapRejected = {
17245
+ reason: string;
17246
+ timestamp: number;
17247
+ };
17248
+
17249
+ /**
17250
+ * Enum representing possible Sale Widget event types.
17251
+ */
17252
+ declare enum SaleEventType {
17253
+ CLOSE_WIDGET = "close-widget",
17254
+ SUCCESS = "success",
17255
+ FAILURE = "failure",
17256
+ REJECTED = "rejected"
17257
+ }
17258
+ /**
17259
+ * Represents a successful Sale transaction.
17260
+ * @property {string} transactionHash - The hash of the successful transaction.
17261
+ */
17262
+ type SaleSuccess = {
17263
+ transactions: {
17264
+ method: string;
17265
+ hash: string | undefined;
17266
+ }[];
17267
+ [key: string]: unknown;
17268
+ };
17269
+ /**
17270
+ * Type representing a Sale Widget with type FAILURE.
17271
+ * @property {string} reason - The reason why the swap failed.
17272
+ * @property {number} timestamp - The timestamp of the failed swap.
17273
+ */
17274
+ type SaleFailed = {
17275
+ reason: string;
17276
+ timestamp: number;
17277
+ };
17278
+
17279
+ /**
17280
+ * Enum of possible Bridge Widget event types.
17281
+ */
17282
+ declare enum BridgeEventType {
17283
+ CLOSE_WIDGET = "close-widget",
17284
+ SUCCESS = "success",
17285
+ FAILURE = "failure"
17286
+ }
17287
+ /**
17288
+ * Represents a successful bridge transaction.
17289
+ * @property {string} transactionHash - The hash of the successful transaction.
17290
+ */
17291
+ type BridgeSuccess = {
17292
+ transactionHash: string;
17293
+ };
17294
+ /**
17295
+ * Represents a failed bridge transaction.
17296
+ * @property {string} reason - The reason for the failed transaction.
17297
+ * @property {number} timestamp - The timestamp of the failed transaction.
17298
+ */
17299
+ type BridgeFailed = {
17300
+ reason: string;
17301
+ timestamp: number;
17302
+ };
17303
+
17304
+ /**
17305
+ * Enum representing different types of orchestration events.
17306
+ */
17307
+ declare enum OrchestrationEventType {
17308
+ REQUEST_CONNECT = "request-connect",
17309
+ REQUEST_WALLET = "request-wallet",
17310
+ REQUEST_SWAP = "request-swap",
17311
+ REQUEST_BRIDGE = "request-bridge",
17312
+ REQUEST_ONRAMP = "request-onramp"
17313
+ }
17314
+ /**
17315
+ * Represents the connect event object when the connect widget is requested.
17316
+ * @property {string} walletProviderName - The wallet provider name.
17317
+ */
17318
+ type RequestConnectEvent = {
17319
+ walletProviderName: string;
17320
+ };
17321
+ /**
17322
+ * Represents the wallet event object when the wallet widget is requested.
17323
+ * @property {string} walletProviderName - The wallet provider name.
17324
+ */
17325
+ type RequestWalletEvent = {
17326
+ walletProviderName: string;
17327
+ };
17328
+ /**
17329
+ * Represents the swap event object when the swap widget is requested.
17330
+ * @property {string} fromTokenAddress - The address of the token to swap from.
17331
+ * @property {string} toTokenAddress - The address of the token to swap to.
17332
+ * @property {string} amount - The amount of from tokens to swap.
17333
+ */
17334
+ type RequestSwapEvent = {
17335
+ fromTokenAddress: string;
17336
+ toTokenAddress: string;
17337
+ amount: string;
17338
+ };
17339
+ /**
17340
+ * Represents the bridge event object when the bridge widget is requested.
17341
+ * @property {string} tokenAddress - The address of the token to bridge.
17342
+ * @property {string} amount - The amount of tokens to bridge.
17343
+ */
17344
+ type RequestBridgeEvent = {
17345
+ tokenAddress: string;
17346
+ amount: string;
17347
+ };
17348
+ /**
17349
+ * Represents the onramp event object when the onramp widget is requested.
17350
+ * @property {string} tokenAddress - The address of the token to be used for onramp.
17351
+ * @property {string} amount - The amount of tokens to onramp.
17352
+ */
17353
+ type RequestOnrampEvent = {
17354
+ tokenAddress: string;
17355
+ amount: string;
17356
+ };
17357
+ type OrchestrationEventData = RequestConnectEvent | RequestWalletEvent | RequestSwapEvent | RequestBridgeEvent | RequestOnrampEvent;
17358
+
17359
+ /**
17360
+ * Enum of possible OnRamp Widget event types.
17361
+ */
17362
+ declare enum OnRampEventType {
17363
+ CLOSE_WIDGET = "close-widget",
17364
+ SUCCESS = "success",
17365
+ FAILURE = "failure"
17366
+ }
17367
+ /**
17368
+ * Represents a successful on-ramp transaction.
17369
+ * @property {string} transactionHash - The transaction hash of the successful transaction.
17370
+ */
17371
+ type OnRampSuccess = {
17372
+ transactionHash: string;
17373
+ };
17374
+ /**
17375
+ * Type representing a On-ramp Widget with type FAILURE.
17376
+ * @property {string} reason - The reason why the on-ramp failed.
17377
+ * @property {number} timestamp - The timestamp of the failed transaction.
17378
+ */
17379
+ type OnRampFailed = {
17380
+ reason: string;
17381
+ timestamp: number;
17382
+ };
17383
+
17384
+ declare enum ConnectTargetLayer {
17385
+ LAYER1 = "LAYER1",
17386
+ LAYER2 = "LAYER2"
17387
+ }
17388
+ type ConnectWidgetParams = {};
17389
+
17390
+ /**
17391
+ * Bridge Widget parameters
17392
+ * @property {string | undefined} fromContractAddress - The contract address of the token to bridge from, used to populate the bridge form token field
17393
+ * @property {string | undefined} amount - The formatted amount to bridge, used to populate the bridge form amount field
17394
+ * @property {WalletProviderName | undefined} walletProviderName - The wallet provider name to use for the bridge widget
17395
+ */
17396
+ type BridgeWidgetParams = {
17397
+ fromContractAddress?: string;
17398
+ amount?: string;
17399
+ walletProviderName?: WalletProviderName;
17400
+ };
17401
+
17402
+ /**
17403
+ * Wallet Widget parameters
17404
+ * @property {WalletProviderName | undefined} walletProviderName - The wallet provider name to use for the wallet widget
17405
+ * @property {Web3Provider | undefined} web3Provider - The ethers Web3Provider
17406
+ */
17407
+ type WalletWidgetParams = {
17408
+ walletProviderName?: WalletProviderName;
17409
+ };
17410
+
17411
+ /**
17412
+ * Swap Widget parameters
17413
+ * @property {string | undefined} amount - The formatted amount to swap, used to populate the swap from amount field
17414
+ * @property {string | undefined} fromContractAddress - The contract address of the token to swap from
17415
+ * @property {string | undefined} toContractAddress - The contract address of the token to swap to
17416
+ * @property {WalletProviderName | undefined} walletProviderName - The wallet provider name to use for the swap widget
17417
+ */
17418
+ interface SwapWidgetParams {
17419
+ amount?: string;
17420
+ fromContractAddress?: string;
17421
+ toContractAddress?: string;
17422
+ walletProviderName?: WalletProviderName;
17423
+ }
17424
+
17425
+ /**
17426
+ * OnRamp Widget parameters
17427
+ * @property {string | undefined} contractAddress - The contract address of the token to onramp
17428
+ * @property {string | undefined} amount - The formatted amount to onramp, used to populate the onramp form amount field
17429
+ * @property {WalletProviderName | undefined} walletProviderName - The wallet provider name to use for the onramp widget
17430
+ */
17431
+ type OnRampWidgetParams = {
17432
+ contractAddress?: string;
17433
+ amount?: string;
17434
+ walletProviderName?: WalletProviderName;
17435
+ };
17436
+
17437
+ /**
17438
+ * Sale Widget parameters
17439
+ * @property {string} amount - The total price to pay for the items in the sale
17440
+ * @property {SaleItem[]} items - The list of products to be purchased
17441
+ * @property {WalletProviderName | undefined} walletProviderName - The wallet provider name to default to if no web3Provider is passed
17442
+ */
17443
+ type SaleWidgetParams = {
17444
+ amount?: string;
17445
+ environmentId?: string;
17446
+ fromContractAddress?: string;
17447
+ items?: SaleItem[];
17448
+ walletProviderName?: WalletProviderName;
17449
+ };
17450
+ type SaleItem = {
17451
+ productId: string;
17452
+ qty: number;
17453
+ name: string;
17454
+ image: string;
17455
+ description: string;
17456
+ };
17457
+
17458
+ type ConnectWidgetConfiguration = {} & WidgetConfiguration;
17459
+
17460
+ type BridgeWidgetConfiguration = {} & WidgetConfiguration;
17461
+
17462
+ type WalletWidgetConfiguration = {} & WidgetConfiguration;
17463
+
17464
+ type SwapWidgetConfiguration = {} & WidgetConfiguration;
17465
+
17466
+ type OnrampWidgetConfiguration = {} & WidgetConfiguration;
17467
+
17468
+ type SaleWidgetConfiguration = {} & WidgetConfiguration;
17469
+
17470
+ /**
17471
+ * Enum representing the list of widget types.
17472
+ */
17473
+ declare enum WidgetType {
17474
+ CONNECT = "connect",
17475
+ WALLET = "wallet",
17476
+ SWAP = "swap",
17477
+ BRIDGE = "bridge",
17478
+ ONRAMP = "onramp",
17479
+ SALE = "sale"
17480
+ }
17481
+ /**
17482
+ * Widget properties definition for each widget. Used for creating and updating widgets
17483
+ */
17484
+ type WidgetProperties<T extends WidgetType> = {
17485
+ config?: WidgetConfigurations[T];
17486
+ provider?: Web3Provider;
17487
+ };
17488
+ type WidgetConfigurations = {
17489
+ [WidgetType.CONNECT]: ConnectWidgetConfiguration;
17490
+ [WidgetType.WALLET]: WalletWidgetConfiguration;
17491
+ [WidgetType.SWAP]: SwapWidgetConfiguration;
17492
+ [WidgetType.BRIDGE]: BridgeWidgetConfiguration;
17493
+ [WidgetType.ONRAMP]: OnrampWidgetConfiguration;
17494
+ [WidgetType.SALE]: SaleWidgetConfiguration;
17495
+ };
17496
+ type WidgetParameters = {
17497
+ [WidgetType.CONNECT]: ConnectWidgetParams;
17498
+ [WidgetType.WALLET]: WalletWidgetParams;
17499
+ [WidgetType.SWAP]: SwapWidgetParams;
17500
+ [WidgetType.BRIDGE]: BridgeWidgetParams;
17501
+ [WidgetType.ONRAMP]: OnRampWidgetParams;
17502
+ [WidgetType.SALE]: SaleWidgetParams;
17503
+ };
17504
+ /**
17505
+ * Represents all the possible event types that are emitted by the widgets.
17506
+ */
17507
+ type WidgetEventTypes = {
17508
+ [WidgetType.CONNECT]: ConnectEventType | OrchestrationEventType;
17509
+ [WidgetType.WALLET]: WalletEventType | OrchestrationEventType;
17510
+ [WidgetType.SWAP]: SwapEventType | OrchestrationEventType;
17511
+ [WidgetType.BRIDGE]: BridgeEventType | OrchestrationEventType;
17512
+ [WidgetType.ONRAMP]: OnRampEventType | OrchestrationEventType;
17513
+ [WidgetType.SALE]: SaleEventType | OrchestrationEventType;
17514
+ };
17515
+ type OrchestrationMapping = {
17516
+ [OrchestrationEventType.REQUEST_CONNECT]: RequestConnectEvent;
17517
+ [OrchestrationEventType.REQUEST_WALLET]: RequestWalletEvent;
17518
+ [OrchestrationEventType.REQUEST_SWAP]: RequestSwapEvent;
17519
+ [OrchestrationEventType.REQUEST_BRIDGE]: RequestBridgeEvent;
17520
+ [OrchestrationEventType.REQUEST_ONRAMP]: RequestOnrampEvent;
17521
+ };
17522
+ type ProviderEventMapping = {
17523
+ [ProviderEventType.PROVIDER_UPDATED]: ProviderUpdated;
17524
+ };
17525
+ /**
17526
+ * Mapping of widget type, to each of it's events and then each event's payload
17527
+ * Update this whenever a new event is created and used by a widget
17528
+ * Each widget also has all of the orchestration events
17529
+ */
17530
+ type WidgetEventData = {
17531
+ [WidgetType.CONNECT]: {
17532
+ [ConnectEventType.SUCCESS]: ConnectionSuccess;
17533
+ [ConnectEventType.FAILURE]: ConnectionFailed;
17534
+ [ConnectEventType.CLOSE_WIDGET]: {};
17535
+ } & OrchestrationMapping & ProviderEventMapping;
17536
+ [WidgetType.WALLET]: {
17537
+ [WalletEventType.NETWORK_SWITCH]: WalletNetworkSwitchEvent;
17538
+ [WalletEventType.DISCONNECT_WALLET]: WalletDisconnectWalletEvent;
17539
+ [WalletEventType.CLOSE_WIDGET]: {};
17540
+ } & OrchestrationMapping & ProviderEventMapping;
17541
+ [WidgetType.SWAP]: {
17542
+ [SwapEventType.SUCCESS]: SwapSuccess;
17543
+ [SwapEventType.FAILURE]: SwapFailed;
17544
+ [SwapEventType.REJECTED]: SwapRejected;
17545
+ [SwapEventType.CLOSE_WIDGET]: {};
17546
+ } & OrchestrationMapping & ProviderEventMapping;
17547
+ [WidgetType.BRIDGE]: {
17548
+ [BridgeEventType.SUCCESS]: BridgeSuccess;
17549
+ [BridgeEventType.FAILURE]: BridgeFailed;
17550
+ [BridgeEventType.CLOSE_WIDGET]: {};
17551
+ } & OrchestrationMapping & ProviderEventMapping;
17552
+ [WidgetType.ONRAMP]: {
17553
+ [OnRampEventType.SUCCESS]: OnRampSuccess;
17554
+ [OnRampEventType.FAILURE]: OnRampFailed;
17555
+ [OnRampEventType.CLOSE_WIDGET]: {};
17556
+ } & OrchestrationMapping & ProviderEventMapping;
17557
+ [WidgetType.SALE]: {
17558
+ [SaleEventType.SUCCESS]: SaleSuccess;
17559
+ [SaleEventType.FAILURE]: SaleFailed;
17560
+ [SaleEventType.REJECTED]: any;
17561
+ [SaleEventType.CLOSE_WIDGET]: {};
17562
+ } & OrchestrationMapping & ProviderEventMapping;
17563
+ };
17564
+ /**
17565
+ * Represents an event emitted by a widget. The event type should match the event data
17566
+ */
17567
+ /**
17568
+ * Represents an event emitted by a widget.
17569
+ * @template T - The widget type
17570
+ * @template KEventName - The widget event name.
17571
+ * @property {KEventName} type - The type of the event.
17572
+ * @property {WidgetEventData[T][KEventName]} data - The data associated with the widget event.
17573
+ */
17574
+ type WidgetEvent<T extends WidgetType, KEventName extends keyof WidgetEventData[T]> = {
17575
+ type: KEventName;
17576
+ data: WidgetEventData[T][KEventName];
17577
+ };
17578
+ /**
17579
+ * Represents an event emitted by a widget.
17580
+ * @template KEventName - The orchestration event name.
17581
+ * @property {KEventName} type - The type of the event.
17582
+ * @property {OrchestrationMapping[KEventName]} data - The data associated with the event.
17583
+ */
17584
+ type OrchestrationEvent<KEventName extends keyof OrchestrationMapping> = {
17585
+ type: KEventName;
17586
+ data: OrchestrationMapping[KEventName];
17587
+ };
17588
+ /**
17589
+ * Represents an event emitted by a widget.
17590
+ * @template KEventName - The provider event name.
17591
+ * @property {KEventName} type - The type of the event.
17592
+ * @property {ProviderEventMapping[KEventName]} data - The data associated with the event.
17593
+ */
17594
+ type ProviderEvent<KEventName extends keyof ProviderEventMapping> = {
17595
+ type: KEventName;
17596
+ data: ProviderEventMapping[KEventName];
17597
+ };
17598
+ interface IWidgetsFactory {
17599
+ /**
17600
+ * Create a new widget instance.
17601
+ * @param type widget type to instantiate.
17602
+ */
17603
+ create<T extends WidgetType>(type: T, config?: WidgetConfigurations[T], provider?: Web3Provider): Widget<T>;
17604
+ updateProvider(provider: Web3Provider): void;
17605
+ }
17606
+ /**
17607
+ * Widget interface. Every widget implements this interface.
17608
+ */
17609
+ interface Widget<T extends WidgetType> {
17610
+ /**
17611
+ * Mount a widget to a DOM ref element.
17612
+ * @param id ID of the DOM element where the widget will be mounted.
17613
+ */
17614
+ mount(id: string, params?: WidgetParameters[T]): void;
17615
+ /**
17616
+ * Unmount a widget and reset parameters
17617
+ */
17618
+ unmount(): void;
17619
+ /**
17620
+ * Update the widget parameters
17621
+ * @param params Widget specific parameters including configuration
17622
+ */
17623
+ update(params: WidgetProperties<T>): void;
17624
+ /**
17625
+ * Add a listener for a widget event.
17626
+ * @param event Widget specific event name.
17627
+ * @param callback function to execute when the event is received.
17628
+ */
17629
+ addListener<KEventName extends keyof WidgetEventData[T]>(type: KEventName, callback: (data: WidgetEventData[T][KEventName]) => void): void;
17630
+ /**
17631
+ * Removes an event listener for a widget event.
17632
+ * @param type Widget specific event name.
17633
+ */
17634
+ removeListener<KEventName extends keyof WidgetEventData[T]>(type: KEventName): void;
17635
+ }
17636
+ /**
17637
+ * Represents the version of the Checkout Widgets to use defaults to (0.1.9-alpha)
17638
+ * @property {number} major - The major version of the widgets, must specify a major version even if it is 0.
17639
+ * @property {number | undefined} minor - The minor version of the widgets, leaving this blank will use the latest minor based on major
17640
+ * @property {number | undefined} patch - The patch version of the widgets, leaving this blank will use the latest minor based on minor
17641
+ * @property {'alpha' | undefined} prerelease - The prerelease version of the widgets, can only be 'alpha'. Do not use in production.
17642
+ * @property {number | undefined} build - The build version of the widgets. Do not use in production.
17643
+ *
17644
+ * @example
17645
+ * { major: 0 } - use default version 0.1.9-alpha
17646
+ * { major: 1 } - use version 1.x.x, pickup all new minor and patch versions released
17647
+ * { major: 1, minor: 1 } - use version 1.1.x, pickup all new patch versions released
17648
+ * { major: 1, minor: 2, patch: 3 } - use version 1.2.3 specifically
17649
+ */
17650
+ type SemanticVersion = {
17651
+ major: number;
17652
+ minor?: number;
17653
+ patch?: number;
17654
+ prerelease?: 'alpha';
17655
+ build?: number;
17656
+ };
17657
+ /**
17658
+ * Represents the global configuration options for the Checkout Widgets.
17659
+ * @property {WidgetTheme | undefined} theme - The theme of the Checkout Widget (default: "DARK")
17660
+ * @property {Environment | undefined} environment - The environment configuration (default: "SANDBOX")
17661
+ * @property {SemanticVersion | undefined} version - The version of the checkout widgets js file to use (default: "0.1.x")
17662
+ * @property {boolean | undefined} isOnRampEnabled - Enable on-ramp top-up method (default: "true")
17663
+ * @property {boolean | undefined} isSwapEnabled - Enable swap top-up method (default: "true")
17664
+ * @property {boolean | undefined} isBridgeEnabled - Enable bridge top-up method (default: "true")
17665
+ */
17666
+ type CheckoutWidgetsConfig = {
17667
+ theme?: WidgetTheme;
17668
+ environment?: Environment;
17669
+ version?: SemanticVersion;
17670
+ isOnRampEnabled?: boolean;
17671
+ isSwapEnabled?: boolean;
17672
+ isBridgeEnabled?: boolean;
17673
+ };
17674
+
17675
+ /**
17676
+ * Represents the configuration options for instantiating the Checkout Widgets factory.
17677
+ * @property {WidgetConfiguration} config - global configuration options for the widgets.
17678
+ * @property {SemanticVersion | undefined} version - version of the Checkout widgets bundle (default latest version will be used).
17679
+ */
17680
+ type WidgetsInit = {
17681
+ config: WidgetConfiguration;
17682
+ version?: SemanticVersion;
17683
+ };
17684
+
17685
+ declare class Checkout {
17686
+ private readOnlyProviders;
17687
+ readonly config: CheckoutConfiguration;
17688
+ readonly fiatRampService: FiatRampService;
17689
+ readonly availability: AvailabilityService;
17690
+ readonly passport?: Passport;
17691
+ /**
17692
+ * Constructs a new instance of the CheckoutModule class.
17693
+ * @param {CheckoutModuleConfiguration} [config=SANDBOX_CONFIGURATION] - The configuration object for the CheckoutModule.
17694
+ */
17695
+ constructor(config?: CheckoutModuleConfiguration);
17696
+ /**
17697
+ * Loads the widgets bundle and initiate the widgets factory.
17698
+ * @param {WidgetsInit} init - The initialisation parameters for loading the widgets bundle and applying configuration
17699
+ */
17700
+ widgets(init: WidgetsInit): Promise<ImmutableCheckoutWidgets.WidgetsFactory>;
17701
+ /**
17702
+ * Creates a provider using the given parameters.
17703
+ * @param {CreateProviderParams} params - The parameters for creating the provider.
17704
+ * @returns {Promise<CreateProviderResult>} A promise that resolves to the created provider.
17705
+ */
17706
+ createProvider(params: CreateProviderParams): Promise<CreateProviderResult>;
17707
+ /**
17708
+ * Checks if a wallet is connected to the specified provider.
17709
+ * @param {CheckConnectionParams} params - The parameters for checking the wallet connection.
17710
+ * @returns {Promise<CheckConnectionResult>} - A promise that resolves to the result of the check.
17711
+ */
17712
+ checkIsWalletConnected(params: CheckConnectionParams): Promise<CheckConnectionResult>;
17713
+ /**
17714
+ * Connects to a blockchain network using the specified provider.
17715
+ * @param {ConnectParams} params - The parameters for connecting to the network.
17716
+ * @returns {Promise<ConnectResult>} A promise that resolves to an object containing the provider and network information.
17717
+ * @throws {Error} If the provider is not valid or if there is an error connecting to the network.
17718
+ */
17719
+ connect(params: ConnectParams): Promise<ConnectResult>;
17720
+ /**
17721
+ * Switches the network for the current wallet provider.
17722
+ * @param {SwitchNetworkParams} params - The parameters for switching the network.
17723
+ * @returns {Promise<SwitchNetworkResult>} - A promise that resolves to the result of switching the network.
17724
+ */
17725
+ switchNetwork(params: SwitchNetworkParams): Promise<SwitchNetworkResult>;
17726
+ /**
17727
+ * Retrieves the balance of a wallet address.
17728
+ * @param {GetBalanceParams} params - The parameters for retrieving the balance.
17729
+ * @returns {Promise<GetBalanceResult>} - A promise that resolves to the balance result.
17730
+ */
17731
+ getBalance(params: GetBalanceParams): Promise<GetBalanceResult>;
17732
+ /**
17733
+ * Retrieves the balances of all tokens for a given wallet address on a specific chain.
17734
+ * @param {GetAllBalancesParams} params - The parameters for retrieving the balances.
17735
+ * @returns {Promise<GetAllBalancesResult>} - A promise that resolves to the result of retrieving the balances.
17736
+ */
17737
+ getAllBalances(params: GetAllBalancesParams): Promise<GetAllBalancesResult>;
17738
+ /**
17739
+ * Retrieves the supported networks based on the provided parameters.
17740
+ * @param {GetNetworkAllowListParams} params - The parameters for retrieving the network allow list.
17741
+ * @returns {Promise<GetNetworkAllowListResult>} - A promise that resolves to the network allow list result.
17742
+ */
17743
+ getNetworkAllowList(params: GetNetworkAllowListParams): Promise<GetNetworkAllowListResult>;
17744
+ /**
17745
+ * Retrieves the supported tokens based on the provided parameters.
17746
+ * @param {GetTokenAllowListParams} params - The parameters for retrieving the token allow list.
17747
+ * @returns {Promise<GetTokenAllowListResult>} - A promise that resolves to the token allow list result.
17748
+ */
17749
+ getTokenAllowList(params: GetTokenAllowListParams): Promise<GetTokenAllowListResult>;
17750
+ /**
17751
+ * Retrieves the default supported wallets based on the provided parameters.
17752
+ * @param {GetWalletAllowListParams} params - The parameters for retrieving the wallet allow list.
17753
+ * @returns {Promise<GetWalletAllowListResult>} - A promise that resolves to the wallet allow list result.
17754
+ */
17755
+ getWalletAllowList(params: GetWalletAllowListParams): Promise<GetWalletAllowListResult>;
17756
+ /**
17757
+ * Sends a transaction using the specified provider and transaction parameters.
17758
+ * @param {SendTransactionParams} params - The parameters for sending the transaction.
17759
+ * @returns {Promise<SendTransactionResult>} A promise that resolves to the result of the transaction.
17760
+ */
17761
+ sendTransaction(params: SendTransactionParams): Promise<SendTransactionResult>;
17762
+ /**
17763
+ * Retrieves network information using the specified provider.
17764
+ * @param {GetNetworkParams} params - The parameters for retrieving network information.
17765
+ * @returns {Promise<NetworkInfo>} A promise that resolves to the network information.
17766
+ */
17767
+ getNetworkInfo(params: GetNetworkParams): Promise<NetworkInfo>;
17768
+ /**
17769
+ * Determines the requirements for performing a buy.
17770
+ * @param {BuyParams} params - The parameters for the buy.
17771
+ */
17772
+ buy(params: BuyParams): Promise<BuyResult>;
17773
+ /**
17774
+ * Determines the requirements for performing a sell.
17775
+ * @param {SellParams} params - The parameters for the sell.
17776
+ * Only currently actions the first order in the array until we support batch processing.
17777
+ * Only currently actions the first fee in the fees array of each order until we support multiple fees.
17778
+ */
17779
+ sell(params: SellParams): Promise<SellResult>;
17780
+ /**
17781
+ * Cancels a sell.
17782
+ * @param {CancelParams} params - The parameters for the cancel.
17783
+ */
17784
+ cancel(params: CancelParams): Promise<CancelResult>;
17785
+ /**
17786
+ * Determines the transaction requirements to complete a purchase.
17787
+ * @params {SmartCheckoutParams} params - The parameters for smart checkout.
17788
+ */
17789
+ smartCheckout(params: SmartCheckoutParams): Promise<SmartCheckoutResult>;
17790
+ /**
17791
+ * Checks if the given object is a Web3 provider.
17792
+ * @param {Web3Provider} web3Provider - The object to check.
17793
+ * @returns {boolean} - True if the object is a Web3 provider, false otherwise.
17794
+ */
17795
+ static isWeb3Provider(web3Provider: Web3Provider): boolean;
17796
+ /**
17797
+ * Estimates the gas required for a swap or bridge transaction.
17798
+ * @param {GasEstimateParams} params - The parameters for the gas estimation.
17799
+ * @returns {Promise<GasEstimateSwapResult | GasEstimateBridgeToL2Result>} - A promise that resolves to the gas estimation result.
17800
+ */
17801
+ gasEstimate(params: GasEstimateParams): Promise<GasEstimateSwapResult | GasEstimateBridgeToL2Result>;
17802
+ /**
17803
+ * Creates and returns a URL for the fiat ramp widget.
17804
+ * @param {FiatRampParams} params - The parameters for creating the url.
17805
+ * @returns {Promise<string>} - A promise that resolves to a string url.
17806
+ */
17807
+ createFiatRampUrl(params: FiatRampParams): Promise<string>;
17808
+ /**
17809
+ * Fetches fiat ramp fee estimations.
17810
+ * @returns {Promise<OnRampProviderFees>} - A promise that resolves to OnRampProviderFees.
17811
+ */
17812
+ getExchangeFeeEstimate(): Promise<OnRampProviderFees>;
17813
+ /**
17814
+ * Fetches Swap widget availability.
17815
+ * @returns {Promise<boolean>} - A promise that resolves to a boolean.
17816
+ */
17817
+ isSwapAvailable(): Promise<boolean>;
17818
+ }
17819
+
17820
+ /**
17821
+ * Declares global interfaces and namespaces for the application.
17822
+ * @global
17823
+ * @namespace ImmutableCheckoutWidgets
17824
+ * */
17825
+ declare global {
17826
+ namespace ImmutableCheckoutWidgets {
17827
+ class WidgetsFactory implements IWidgetsFactory {
17828
+ constructor(sdk: Checkout, config: CheckoutWidgetsConfig);
17829
+ create<T extends WidgetType>(type: T, config?: WidgetConfigurations[T], provider?: Web3Provider): Widget<T>;
17830
+ updateProvider(provider: Web3Provider): void;
17831
+ }
17832
+ class Connect<T extends WidgetType> implements Widget<T> {
17833
+ constructor(sdk: Checkout, props: WidgetProperties<T>);
17834
+ mount(id: string, params?: WidgetParameters[T]): void;
17835
+ unmount(): void;
17836
+ update(props: WidgetProperties<T>): void;
17837
+ addListener<KEventName extends keyof WidgetEventData[T]>(type: KEventName, callback: (data: WidgetEventData[T][KEventName]) => void): void;
17838
+ removeListener<KEventName extends keyof WidgetEventData[T]>(type: KEventName): void;
17839
+ }
17840
+ class Bridge<T extends WidgetType> implements Widget<T> {
17841
+ constructor(sdk: Checkout, props: WidgetProperties<T>);
17842
+ mount(id: string, params?: WidgetParameters[T]): void;
17843
+ unmount(): void;
17844
+ update(props: WidgetProperties<T>): void;
17845
+ addListener<KEventName extends keyof WidgetEventData[T]>(type: KEventName, callback: (data: WidgetEventData[T][KEventName]) => void): void;
17846
+ removeListener<KEventName extends keyof WidgetEventData[T]>(type: KEventName): void;
17847
+ }
17848
+ class Wallet<T extends WidgetType> implements Widget<T> {
17849
+ constructor(sdk: Checkout, props: WidgetProperties<T>);
17850
+ mount(id: string, params?: WidgetParameters[T]): void;
17851
+ unmount(): void;
17852
+ update(props: WidgetProperties<T>): void;
17853
+ addListener<KEventName extends keyof WidgetEventData[T]>(type: KEventName, callback: (data: WidgetEventData[T][KEventName]) => void): void;
17854
+ removeListener<KEventName extends keyof WidgetEventData[T]>(type: KEventName): void;
17855
+ }
17856
+ class Swap<T extends WidgetType> implements Widget<T> {
17857
+ constructor(sdk: Checkout, props: WidgetProperties<T>);
17858
+ mount(id: string, params?: WidgetParameters[T]): void;
17859
+ unmount(): void;
17860
+ update(props: WidgetProperties<T>): void;
17861
+ addListener<KEventName extends keyof WidgetEventData[T]>(type: KEventName, callback: (data: WidgetEventData[T][KEventName]) => void): void;
17862
+ removeListener<KEventName extends keyof WidgetEventData[T]>(type: KEventName): void;
17863
+ }
17864
+ class OnRamp<T extends WidgetType> implements Widget<T> {
17865
+ constructor(sdk: Checkout, props: WidgetProperties<T>);
17866
+ mount(id: string, params?: WidgetParameters[T]): void;
17867
+ unmount(): void;
17868
+ update(props: WidgetProperties<T>): void;
17869
+ addListener<KEventName extends keyof WidgetEventData[T]>(type: KEventName, callback: (data: WidgetEventData[T][KEventName]) => void): void;
17870
+ removeListener<KEventName extends keyof WidgetEventData[T]>(type: KEventName): void;
17871
+ }
17872
+ class Sale<T extends WidgetType> implements Widget<T> {
17873
+ constructor(sdk: Checkout, props: WidgetProperties<T>);
17874
+ mount(id: string, params?: WidgetParameters[T]): void;
17875
+ unmount(): void;
17876
+ update(props: WidgetProperties<T>): void;
17877
+ addListener<KEventName extends keyof WidgetEventData[T]>(type: KEventName, callback: (data: WidgetEventData[T][KEventName]) => void): void;
17878
+ removeListener<KEventName extends keyof WidgetEventData[T]>(type: KEventName): void;
17879
+ }
17880
+ }
17881
+ }
17882
+
17883
+ /**
17884
+ * Enum representing different types of errors that can occur during the checkout process.
17885
+ */
17886
+ declare enum CheckoutErrorType {
17887
+ WEB3_PROVIDER_ERROR = "WEB3_PROVIDER_ERROR",
17888
+ PROVIDER_ERROR = "PROVIDER_ERROR",
17889
+ DEFAULT_PROVIDER_ERROR = "DEFAULT_PROVIDER_ERROR",
17890
+ CONNECT_PROVIDER_ERROR = "CONNECT_PROVIDER_ERROR",
17891
+ GET_BALANCE_ERROR = "GET_BALANCE_ERROR",
17892
+ GET_INDEXER_BALANCE_ERROR = "GET_INDEXER_BALANCE_ERROR",
17893
+ GET_ERC20_BALANCE_ERROR = "GET_ERC20_BALANCE_ERROR",
17894
+ GET_ERC721_BALANCE_ERROR = "GET_ERC721_BALANCE_ERROR",
17895
+ GET_NETWORK_INFO_ERROR = "GET_NETWORK_INFO_ERROR",
17896
+ METAMASK_PROVIDER_ERROR = "METAMASK_PROVIDER_ERROR",
17897
+ CHAIN_NOT_SUPPORTED_ERROR = "CHAIN_NOT_SUPPORTED_ERROR",
17898
+ PROVIDER_REQUEST_MISSING_ERROR = "PROVIDER_REQUEST_MISSING_ERROR",
17899
+ PROVIDER_REQUEST_FAILED_ERROR = "PROVIDER_REQUEST_FAILED_ERROR",
17900
+ USER_REJECTED_REQUEST_ERROR = "USER_REJECTED_REQUEST_ERROR",
17901
+ TRANSACTION_FAILED = "TRANSACTION_FAILED",
17902
+ INSUFFICIENT_FUNDS = "INSUFFICIENT_FUNDS",
17903
+ UNPREDICTABLE_GAS_LIMIT = "UNPREDICTABLE_GAS_LIMIT",
17904
+ INVALID_GAS_ESTIMATE_TYPE = "INVALID_GAS_ESTIMATE_TYPE",
17905
+ UNSUPPORTED_TOKEN_TYPE_ERROR = "UNSUPPORTED_TOKEN_TYPE_ERROR",
17906
+ UNSUPPORTED_BALANCE_REQUIREMENT_ERROR = "UNSUPPORTED_BALANCE_REQUIREMENT_ERROR",
17907
+ GET_ORDER_LISTING_ERROR = "GET_ORDER_LISTING_ERROR",
17908
+ CANCEL_ORDER_LISTING_ERROR = "CANCEL_ORDER_LISTING_ERROR",
17909
+ PREPARE_ORDER_LISTING_ERROR = "PREPARE_ORDER_LISTING_ERROR",
17910
+ CREATE_ORDER_LISTING_ERROR = "CREATE_ORDER_LISTING_ERROR",
17911
+ FULFILL_ORDER_LISTING_ERROR = "FULFILL_ORDER_LISTING_ERROR",
17912
+ SWITCH_NETWORK_UNSUPPORTED = "SWITCH_NETWORK_UNSUPPORTED",
17913
+ GET_ERC20_ALLOWANCE_ERROR = "GET_ERC20_ALLOWANCE_ERROR",
17914
+ GET_ERC721_ALLOWANCE_ERROR = "GET_ERC721_ALLOWANCE_ERROR",
17915
+ EXECUTE_APPROVAL_TRANSACTION_ERROR = "EXECUTE_APPROVAL_TRANSACTION_ERROR",
17916
+ EXECUTE_FULFILLMENT_TRANSACTION_ERROR = "EXECUTE_FULFILLMENT_TRANSACTION_ERROR",
17917
+ SIGN_MESSAGE_ERROR = "SIGN_MESSAGE_ERROR",
17918
+ BRIDGE_GAS_ESTIMATE_ERROR = "BRIDGE_GAS_ESTIMATE_ERROR",
17919
+ ORDER_FEE_ERROR = "ORDER_FEE_ERROR",
17920
+ ITEM_REQUIREMENTS_ERROR = "ITEM_REQUIREMENTS_ERROR",
17921
+ API_ERROR = "API_ERROR",
17922
+ ORDER_EXPIRED_ERROR = "ORDER_EXPIRED_ERROR",
17923
+ WIDGETS_SCRIPT_LOAD_ERROR = "WIDGETS_SCRIPT_LOAD_ERROR"
17924
+ }
17925
+ /**
17926
+ * Represents an error object with a specific type, optional message, and optional data.
17927
+ * @property {CheckoutErrorType} type - The type of the error.
17928
+ * @property {string | undefined} [message] - The error message.
17929
+ * @property {Object.<string, string> | undefined} [data] - Additional data associated with the error.
17930
+ */
17931
+ type ErrorType = {
17932
+ type: CheckoutErrorType;
17933
+ message?: string;
17934
+ data?: {
17935
+ [key: string]: string;
17936
+ };
17937
+ };
17938
+
17939
+ type checkout_sdk_d_AllowedNetworkConfig = AllowedNetworkConfig;
17940
+ type checkout_sdk_d_AvailableRoutingOptions = AvailableRoutingOptions;
17941
+ type checkout_sdk_d_BalanceDelta = BalanceDelta;
17942
+ type checkout_sdk_d_BridgeEventType = BridgeEventType;
17943
+ declare const checkout_sdk_d_BridgeEventType: typeof BridgeEventType;
17944
+ type checkout_sdk_d_BridgeFailed = BridgeFailed;
17945
+ type checkout_sdk_d_BridgeFundingStep = BridgeFundingStep;
17946
+ type checkout_sdk_d_BridgeSuccess = BridgeSuccess;
17947
+ type checkout_sdk_d_BridgeWidgetConfiguration = BridgeWidgetConfiguration;
17948
+ type checkout_sdk_d_BridgeWidgetParams = BridgeWidgetParams;
17949
+ type checkout_sdk_d_BuyOrder = BuyOrder;
17950
+ type checkout_sdk_d_BuyParams = BuyParams;
17951
+ type checkout_sdk_d_BuyResult = BuyResult;
17952
+ type checkout_sdk_d_BuyResultFailed = BuyResultFailed;
17953
+ type checkout_sdk_d_BuyResultInsufficientFunds = BuyResultInsufficientFunds;
17954
+ type checkout_sdk_d_BuyResultSuccess = BuyResultSuccess;
17955
+ type checkout_sdk_d_BuyToken = BuyToken;
17956
+ declare const checkout_sdk_d_CHECKOUT_API_BASE_URL: typeof CHECKOUT_API_BASE_URL;
17957
+ type checkout_sdk_d_CancelParams = CancelParams;
17958
+ type checkout_sdk_d_CancelResult = CancelResult;
17959
+ type checkout_sdk_d_CancelResultFailed = CancelResultFailed;
17960
+ type checkout_sdk_d_CancelResultSuccess = CancelResultSuccess;
17961
+ type checkout_sdk_d_ChainId = ChainId;
17962
+ declare const checkout_sdk_d_ChainId: typeof ChainId;
17963
+ type checkout_sdk_d_ChainName = ChainName;
17964
+ declare const checkout_sdk_d_ChainName: typeof ChainName;
17965
+ type checkout_sdk_d_CheckConnectionParams = CheckConnectionParams;
17966
+ type checkout_sdk_d_CheckConnectionResult = CheckConnectionResult;
17967
+ type checkout_sdk_d_Checkout = Checkout;
17968
+ declare const checkout_sdk_d_Checkout: typeof Checkout;
17969
+ type checkout_sdk_d_CheckoutConfiguration = CheckoutConfiguration;
17970
+ declare const checkout_sdk_d_CheckoutConfiguration: typeof CheckoutConfiguration;
17971
+ type checkout_sdk_d_CheckoutErrorType = CheckoutErrorType;
17972
+ declare const checkout_sdk_d_CheckoutErrorType: typeof CheckoutErrorType;
17973
+ type checkout_sdk_d_CheckoutModuleConfiguration = CheckoutModuleConfiguration;
17974
+ type checkout_sdk_d_CheckoutStatus = CheckoutStatus;
17975
+ declare const checkout_sdk_d_CheckoutStatus: typeof CheckoutStatus;
17976
+ type checkout_sdk_d_CheckoutWidgetsConfig = CheckoutWidgetsConfig;
17977
+ type checkout_sdk_d_ConnectEventType = ConnectEventType;
17978
+ declare const checkout_sdk_d_ConnectEventType: typeof ConnectEventType;
17979
+ type checkout_sdk_d_ConnectParams = ConnectParams;
17980
+ type checkout_sdk_d_ConnectResult = ConnectResult;
17981
+ type checkout_sdk_d_ConnectTargetLayer = ConnectTargetLayer;
17982
+ declare const checkout_sdk_d_ConnectTargetLayer: typeof ConnectTargetLayer;
17983
+ type checkout_sdk_d_ConnectWidgetConfiguration = ConnectWidgetConfiguration;
17984
+ type checkout_sdk_d_ConnectWidgetParams = ConnectWidgetParams;
17985
+ type checkout_sdk_d_ConnectionFailed = ConnectionFailed;
17986
+ type checkout_sdk_d_ConnectionSuccess = ConnectionSuccess;
17987
+ type checkout_sdk_d_DexConfig = DexConfig;
17988
+ type checkout_sdk_d_ERC20ItemRequirement = ERC20ItemRequirement;
17989
+ type checkout_sdk_d_ERC721Balance = ERC721Balance;
17990
+ type checkout_sdk_d_ERC721ItemRequirement = ERC721ItemRequirement;
17991
+ type checkout_sdk_d_ErrorType = ErrorType;
17992
+ type checkout_sdk_d_ExchangeType = ExchangeType;
17993
+ declare const checkout_sdk_d_ExchangeType: typeof ExchangeType;
17994
+ type checkout_sdk_d_FeePercentage = FeePercentage;
17995
+ type checkout_sdk_d_FeeToken = FeeToken;
17996
+ type checkout_sdk_d_FiatRampParams = FiatRampParams;
17997
+ type checkout_sdk_d_FulfillmentTransaction = FulfillmentTransaction;
17998
+ type checkout_sdk_d_FundingItem = FundingItem;
17999
+ type checkout_sdk_d_FundingRoute = FundingRoute;
18000
+ type checkout_sdk_d_FundingStep = FundingStep;
18001
+ type checkout_sdk_d_FundingStepType = FundingStepType;
18002
+ declare const checkout_sdk_d_FundingStepType: typeof FundingStepType;
18003
+ type checkout_sdk_d_GasAmount = GasAmount;
18004
+ type checkout_sdk_d_GasEstimateBridgeToL2Result = GasEstimateBridgeToL2Result;
18005
+ type checkout_sdk_d_GasEstimateParams = GasEstimateParams;
18006
+ type checkout_sdk_d_GasEstimateSwapResult = GasEstimateSwapResult;
18007
+ type checkout_sdk_d_GasEstimateTokenConfig = GasEstimateTokenConfig;
18008
+ type checkout_sdk_d_GasEstimateType = GasEstimateType;
18009
+ declare const checkout_sdk_d_GasEstimateType: typeof GasEstimateType;
18010
+ type checkout_sdk_d_GasToken = GasToken;
18011
+ type checkout_sdk_d_GasTokenType = GasTokenType;
18012
+ declare const checkout_sdk_d_GasTokenType: typeof GasTokenType;
18013
+ type checkout_sdk_d_GetAllBalancesParams = GetAllBalancesParams;
18014
+ type checkout_sdk_d_GetAllBalancesResult = GetAllBalancesResult;
18015
+ type checkout_sdk_d_GetBalanceParams = GetBalanceParams;
18016
+ type checkout_sdk_d_GetBalanceResult = GetBalanceResult;
18017
+ type checkout_sdk_d_GetNetworkAllowListParams = GetNetworkAllowListParams;
18018
+ type checkout_sdk_d_GetNetworkAllowListResult = GetNetworkAllowListResult;
18019
+ type checkout_sdk_d_GetNetworkParams = GetNetworkParams;
18020
+ type checkout_sdk_d_GetTokenAllowListParams = GetTokenAllowListParams;
18021
+ type checkout_sdk_d_GetTokenAllowListResult = GetTokenAllowListResult;
18022
+ type checkout_sdk_d_GetWalletAllowListParams = GetWalletAllowListParams;
18023
+ type checkout_sdk_d_GetWalletAllowListResult = GetWalletAllowListResult;
18024
+ type checkout_sdk_d_IMTBLWidgetEvents = IMTBLWidgetEvents;
18025
+ declare const checkout_sdk_d_IMTBLWidgetEvents: typeof IMTBLWidgetEvents;
18026
+ type checkout_sdk_d_IWidgetsFactory = IWidgetsFactory;
18027
+ type checkout_sdk_d_ItemBalance = ItemBalance;
18028
+ type checkout_sdk_d_ItemType = ItemType;
18029
+ declare const checkout_sdk_d_ItemType: typeof ItemType;
18030
+ type checkout_sdk_d_NativeItemRequirement = NativeItemRequirement;
18031
+ type checkout_sdk_d_NetworkFilter = NetworkFilter;
18032
+ type checkout_sdk_d_NetworkFilterTypes = NetworkFilterTypes;
18033
+ declare const checkout_sdk_d_NetworkFilterTypes: typeof NetworkFilterTypes;
18034
+ type checkout_sdk_d_NetworkInfo = NetworkInfo;
18035
+ type checkout_sdk_d_NoRouteOptions = NoRouteOptions;
18036
+ type checkout_sdk_d_NoRoutesFound = NoRoutesFound;
18037
+ type checkout_sdk_d_OnRampEventType = OnRampEventType;
18038
+ declare const checkout_sdk_d_OnRampEventType: typeof OnRampEventType;
18039
+ type checkout_sdk_d_OnRampFailed = OnRampFailed;
18040
+ type checkout_sdk_d_OnRampFundingStep = OnRampFundingStep;
18041
+ type checkout_sdk_d_OnRampProviderFees = OnRampProviderFees;
18042
+ type checkout_sdk_d_OnRampSuccess = OnRampSuccess;
18043
+ type checkout_sdk_d_OnRampWidgetParams = OnRampWidgetParams;
18044
+ type checkout_sdk_d_OnrampWidgetConfiguration = OnrampWidgetConfiguration;
18045
+ type checkout_sdk_d_OrchestrationEvent<KEventName extends keyof OrchestrationMapping> = OrchestrationEvent<KEventName>;
18046
+ type checkout_sdk_d_OrchestrationEventData = OrchestrationEventData;
18047
+ type checkout_sdk_d_OrchestrationEventType = OrchestrationEventType;
18048
+ declare const checkout_sdk_d_OrchestrationEventType: typeof OrchestrationEventType;
18049
+ type checkout_sdk_d_OrderFee = OrderFee;
18050
+ type checkout_sdk_d_ProviderEvent<KEventName extends keyof ProviderEventMapping> = ProviderEvent<KEventName>;
18051
+ type checkout_sdk_d_ProviderEventType = ProviderEventType;
18052
+ declare const checkout_sdk_d_ProviderEventType: typeof ProviderEventType;
18053
+ type checkout_sdk_d_ProviderUpdated = ProviderUpdated;
18054
+ type checkout_sdk_d_RemoteConfiguration = RemoteConfiguration;
18055
+ type checkout_sdk_d_RequestBridgeEvent = RequestBridgeEvent;
18056
+ type checkout_sdk_d_RequestConnectEvent = RequestConnectEvent;
18057
+ type checkout_sdk_d_RequestOnrampEvent = RequestOnrampEvent;
18058
+ type checkout_sdk_d_RequestSwapEvent = RequestSwapEvent;
18059
+ type checkout_sdk_d_RequestWalletEvent = RequestWalletEvent;
18060
+ type checkout_sdk_d_RoutesFound = RoutesFound;
18061
+ type checkout_sdk_d_RoutingOutcome = RoutingOutcome;
18062
+ type checkout_sdk_d_RoutingOutcomeType = RoutingOutcomeType;
18063
+ declare const checkout_sdk_d_RoutingOutcomeType: typeof RoutingOutcomeType;
18064
+ type checkout_sdk_d_SaleEventType = SaleEventType;
18065
+ declare const checkout_sdk_d_SaleEventType: typeof SaleEventType;
18066
+ type checkout_sdk_d_SaleFailed = SaleFailed;
18067
+ type checkout_sdk_d_SaleItem = SaleItem;
18068
+ type checkout_sdk_d_SaleSuccess = SaleSuccess;
18069
+ type checkout_sdk_d_SaleWidgetConfiguration = SaleWidgetConfiguration;
18070
+ type checkout_sdk_d_SaleWidgetParams = SaleWidgetParams;
18071
+ type checkout_sdk_d_SellOrder = SellOrder;
18072
+ type checkout_sdk_d_SellParams = SellParams;
18073
+ type checkout_sdk_d_SellResult = SellResult;
18074
+ type checkout_sdk_d_SellResultFailed = SellResultFailed;
18075
+ type checkout_sdk_d_SellResultInsufficientFunds = SellResultInsufficientFunds;
18076
+ type checkout_sdk_d_SellResultSuccess = SellResultSuccess;
18077
+ type checkout_sdk_d_SellToken = SellToken;
18078
+ type checkout_sdk_d_SemanticVersion = SemanticVersion;
18079
+ type checkout_sdk_d_SendTransactionParams = SendTransactionParams;
18080
+ type checkout_sdk_d_SendTransactionResult = SendTransactionResult;
18081
+ type checkout_sdk_d_SmartCheckoutInsufficient = SmartCheckoutInsufficient;
18082
+ type checkout_sdk_d_SmartCheckoutParams = SmartCheckoutParams;
18083
+ type checkout_sdk_d_SmartCheckoutResult = SmartCheckoutResult;
18084
+ type checkout_sdk_d_SmartCheckoutRouter = SmartCheckoutRouter;
18085
+ type checkout_sdk_d_SmartCheckoutSufficient = SmartCheckoutSufficient;
18086
+ type checkout_sdk_d_SwapEventType = SwapEventType;
18087
+ declare const checkout_sdk_d_SwapEventType: typeof SwapEventType;
18088
+ type checkout_sdk_d_SwapFailed = SwapFailed;
18089
+ type checkout_sdk_d_SwapFundingStep = SwapFundingStep;
18090
+ type checkout_sdk_d_SwapRejected = SwapRejected;
18091
+ type checkout_sdk_d_SwapSuccess = SwapSuccess;
18092
+ type checkout_sdk_d_SwapWidgetConfiguration = SwapWidgetConfiguration;
18093
+ type checkout_sdk_d_SwapWidgetParams = SwapWidgetParams;
18094
+ type checkout_sdk_d_SwitchNetworkParams = SwitchNetworkParams;
18095
+ type checkout_sdk_d_SwitchNetworkResult = SwitchNetworkResult;
18096
+ type checkout_sdk_d_TokenAmountEstimate = TokenAmountEstimate;
18097
+ type checkout_sdk_d_TokenBalance = TokenBalance;
18098
+ type checkout_sdk_d_TokenFilter = TokenFilter;
18099
+ type checkout_sdk_d_TokenFilterTypes = TokenFilterTypes;
18100
+ declare const checkout_sdk_d_TokenFilterTypes: typeof TokenFilterTypes;
18101
+ type checkout_sdk_d_TokenInfo = TokenInfo;
18102
+ type checkout_sdk_d_TransactionOrGasType = TransactionOrGasType;
18103
+ declare const checkout_sdk_d_TransactionOrGasType: typeof TransactionOrGasType;
18104
+ type checkout_sdk_d_TransactionRequirement = TransactionRequirement;
18105
+ type checkout_sdk_d_WalletDisconnectWalletEvent = WalletDisconnectWalletEvent;
18106
+ type checkout_sdk_d_WalletEventType = WalletEventType;
18107
+ declare const checkout_sdk_d_WalletEventType: typeof WalletEventType;
18108
+ type checkout_sdk_d_WalletFilter = WalletFilter;
18109
+ type checkout_sdk_d_WalletFilterTypes = WalletFilterTypes;
18110
+ declare const checkout_sdk_d_WalletFilterTypes: typeof WalletFilterTypes;
18111
+ type checkout_sdk_d_WalletInfo = WalletInfo;
18112
+ type checkout_sdk_d_WalletNetworkSwitchEvent = WalletNetworkSwitchEvent;
18113
+ type checkout_sdk_d_WalletProviderName = WalletProviderName;
18114
+ declare const checkout_sdk_d_WalletProviderName: typeof WalletProviderName;
18115
+ type checkout_sdk_d_WalletWidgetConfiguration = WalletWidgetConfiguration;
18116
+ type checkout_sdk_d_WalletWidgetParams = WalletWidgetParams;
18117
+ type checkout_sdk_d_Widget<T extends WidgetType> = Widget<T>;
18118
+ type checkout_sdk_d_WidgetConfiguration = WidgetConfiguration;
18119
+ type checkout_sdk_d_WidgetConfigurations = WidgetConfigurations;
18120
+ type checkout_sdk_d_WidgetEvent<T extends WidgetType, KEventName extends keyof WidgetEventData[T]> = WidgetEvent<T, KEventName>;
18121
+ type checkout_sdk_d_WidgetEventData = WidgetEventData;
18122
+ type checkout_sdk_d_WidgetEventTypes = WidgetEventTypes;
18123
+ type checkout_sdk_d_WidgetParameters = WidgetParameters;
18124
+ type checkout_sdk_d_WidgetProperties<T extends WidgetType> = WidgetProperties<T>;
18125
+ type checkout_sdk_d_WidgetTheme = WidgetTheme;
18126
+ declare const checkout_sdk_d_WidgetTheme: typeof WidgetTheme;
18127
+ type checkout_sdk_d_WidgetType = WidgetType;
18128
+ declare const checkout_sdk_d_WidgetType: typeof WidgetType;
18129
+ declare namespace checkout_sdk_d {
18130
+ export {
18131
+ checkout_sdk_d_AllowedNetworkConfig as AllowedNetworkConfig,
18132
+ checkout_sdk_d_AvailableRoutingOptions as AvailableRoutingOptions,
18133
+ checkout_sdk_d_BalanceDelta as BalanceDelta,
18134
+ checkout_sdk_d_BridgeEventType as BridgeEventType,
18135
+ checkout_sdk_d_BridgeFailed as BridgeFailed,
18136
+ checkout_sdk_d_BridgeFundingStep as BridgeFundingStep,
18137
+ checkout_sdk_d_BridgeSuccess as BridgeSuccess,
18138
+ checkout_sdk_d_BridgeWidgetConfiguration as BridgeWidgetConfiguration,
18139
+ checkout_sdk_d_BridgeWidgetParams as BridgeWidgetParams,
18140
+ checkout_sdk_d_BuyOrder as BuyOrder,
18141
+ checkout_sdk_d_BuyParams as BuyParams,
18142
+ checkout_sdk_d_BuyResult as BuyResult,
18143
+ checkout_sdk_d_BuyResultFailed as BuyResultFailed,
18144
+ checkout_sdk_d_BuyResultInsufficientFunds as BuyResultInsufficientFunds,
18145
+ checkout_sdk_d_BuyResultSuccess as BuyResultSuccess,
18146
+ checkout_sdk_d_BuyToken as BuyToken,
18147
+ checkout_sdk_d_CHECKOUT_API_BASE_URL as CHECKOUT_API_BASE_URL,
18148
+ checkout_sdk_d_CancelParams as CancelParams,
18149
+ checkout_sdk_d_CancelResult as CancelResult,
18150
+ checkout_sdk_d_CancelResultFailed as CancelResultFailed,
18151
+ checkout_sdk_d_CancelResultSuccess as CancelResultSuccess,
18152
+ checkout_sdk_d_ChainId as ChainId,
18153
+ checkout_sdk_d_ChainName as ChainName,
18154
+ checkout_sdk_d_CheckConnectionParams as CheckConnectionParams,
18155
+ checkout_sdk_d_CheckConnectionResult as CheckConnectionResult,
18156
+ checkout_sdk_d_Checkout as Checkout,
18157
+ checkout_sdk_d_CheckoutConfiguration as CheckoutConfiguration,
18158
+ checkout_sdk_d_CheckoutErrorType as CheckoutErrorType,
18159
+ checkout_sdk_d_CheckoutModuleConfiguration as CheckoutModuleConfiguration,
18160
+ checkout_sdk_d_CheckoutStatus as CheckoutStatus,
18161
+ checkout_sdk_d_CheckoutWidgetsConfig as CheckoutWidgetsConfig,
18162
+ checkout_sdk_d_ConnectEventType as ConnectEventType,
18163
+ checkout_sdk_d_ConnectParams as ConnectParams,
18164
+ checkout_sdk_d_ConnectResult as ConnectResult,
18165
+ checkout_sdk_d_ConnectTargetLayer as ConnectTargetLayer,
18166
+ checkout_sdk_d_ConnectWidgetConfiguration as ConnectWidgetConfiguration,
18167
+ checkout_sdk_d_ConnectWidgetParams as ConnectWidgetParams,
18168
+ checkout_sdk_d_ConnectionFailed as ConnectionFailed,
18169
+ checkout_sdk_d_ConnectionSuccess as ConnectionSuccess,
18170
+ checkout_sdk_d_DexConfig as DexConfig,
18171
+ checkout_sdk_d_ERC20ItemRequirement as ERC20ItemRequirement,
18172
+ checkout_sdk_d_ERC721Balance as ERC721Balance,
18173
+ checkout_sdk_d_ERC721ItemRequirement as ERC721ItemRequirement,
18174
+ checkout_sdk_d_ErrorType as ErrorType,
18175
+ checkout_sdk_d_ExchangeType as ExchangeType,
18176
+ checkout_sdk_d_FeePercentage as FeePercentage,
18177
+ checkout_sdk_d_FeeToken as FeeToken,
18178
+ checkout_sdk_d_FiatRampParams as FiatRampParams,
18179
+ checkout_sdk_d_FulfillmentTransaction as FulfillmentTransaction,
18180
+ checkout_sdk_d_FundingItem as FundingItem,
18181
+ checkout_sdk_d_FundingRoute as FundingRoute,
18182
+ checkout_sdk_d_FundingStep as FundingStep,
18183
+ checkout_sdk_d_FundingStepType as FundingStepType,
18184
+ checkout_sdk_d_GasAmount as GasAmount,
18185
+ checkout_sdk_d_GasEstimateBridgeToL2Result as GasEstimateBridgeToL2Result,
18186
+ checkout_sdk_d_GasEstimateParams as GasEstimateParams,
18187
+ checkout_sdk_d_GasEstimateSwapResult as GasEstimateSwapResult,
18188
+ checkout_sdk_d_GasEstimateTokenConfig as GasEstimateTokenConfig,
18189
+ checkout_sdk_d_GasEstimateType as GasEstimateType,
18190
+ checkout_sdk_d_GasToken as GasToken,
18191
+ checkout_sdk_d_GasTokenType as GasTokenType,
18192
+ checkout_sdk_d_GetAllBalancesParams as GetAllBalancesParams,
18193
+ checkout_sdk_d_GetAllBalancesResult as GetAllBalancesResult,
18194
+ checkout_sdk_d_GetBalanceParams as GetBalanceParams,
18195
+ checkout_sdk_d_GetBalanceResult as GetBalanceResult,
18196
+ checkout_sdk_d_GetNetworkAllowListParams as GetNetworkAllowListParams,
18197
+ checkout_sdk_d_GetNetworkAllowListResult as GetNetworkAllowListResult,
18198
+ checkout_sdk_d_GetNetworkParams as GetNetworkParams,
18199
+ checkout_sdk_d_GetTokenAllowListParams as GetTokenAllowListParams,
18200
+ checkout_sdk_d_GetTokenAllowListResult as GetTokenAllowListResult,
18201
+ checkout_sdk_d_GetWalletAllowListParams as GetWalletAllowListParams,
18202
+ checkout_sdk_d_GetWalletAllowListResult as GetWalletAllowListResult,
18203
+ checkout_sdk_d_IMTBLWidgetEvents as IMTBLWidgetEvents,
18204
+ checkout_sdk_d_IWidgetsFactory as IWidgetsFactory,
18205
+ checkout_sdk_d_ItemBalance as ItemBalance,
18206
+ checkout_sdk_d_ItemType as ItemType,
18207
+ checkout_sdk_d_NativeItemRequirement as NativeItemRequirement,
18208
+ checkout_sdk_d_NetworkFilter as NetworkFilter,
18209
+ checkout_sdk_d_NetworkFilterTypes as NetworkFilterTypes,
18210
+ checkout_sdk_d_NetworkInfo as NetworkInfo,
18211
+ checkout_sdk_d_NoRouteOptions as NoRouteOptions,
18212
+ checkout_sdk_d_NoRoutesFound as NoRoutesFound,
18213
+ checkout_sdk_d_OnRampEventType as OnRampEventType,
18214
+ checkout_sdk_d_OnRampFailed as OnRampFailed,
18215
+ checkout_sdk_d_OnRampFundingStep as OnRampFundingStep,
18216
+ checkout_sdk_d_OnRampProviderFees as OnRampProviderFees,
18217
+ checkout_sdk_d_OnRampSuccess as OnRampSuccess,
18218
+ checkout_sdk_d_OnRampWidgetParams as OnRampWidgetParams,
18219
+ checkout_sdk_d_OnrampWidgetConfiguration as OnrampWidgetConfiguration,
18220
+ checkout_sdk_d_OrchestrationEvent as OrchestrationEvent,
18221
+ checkout_sdk_d_OrchestrationEventData as OrchestrationEventData,
18222
+ checkout_sdk_d_OrchestrationEventType as OrchestrationEventType,
18223
+ checkout_sdk_d_OrderFee as OrderFee,
18224
+ checkout_sdk_d_ProviderEvent as ProviderEvent,
18225
+ checkout_sdk_d_ProviderEventType as ProviderEventType,
18226
+ checkout_sdk_d_ProviderUpdated as ProviderUpdated,
18227
+ checkout_sdk_d_RemoteConfiguration as RemoteConfiguration,
18228
+ checkout_sdk_d_RequestBridgeEvent as RequestBridgeEvent,
18229
+ checkout_sdk_d_RequestConnectEvent as RequestConnectEvent,
18230
+ checkout_sdk_d_RequestOnrampEvent as RequestOnrampEvent,
18231
+ checkout_sdk_d_RequestSwapEvent as RequestSwapEvent,
18232
+ checkout_sdk_d_RequestWalletEvent as RequestWalletEvent,
18233
+ checkout_sdk_d_RoutesFound as RoutesFound,
18234
+ checkout_sdk_d_RoutingOutcome as RoutingOutcome,
18235
+ checkout_sdk_d_RoutingOutcomeType as RoutingOutcomeType,
18236
+ checkout_sdk_d_SaleEventType as SaleEventType,
18237
+ checkout_sdk_d_SaleFailed as SaleFailed,
18238
+ checkout_sdk_d_SaleItem as SaleItem,
18239
+ checkout_sdk_d_SaleSuccess as SaleSuccess,
18240
+ checkout_sdk_d_SaleWidgetConfiguration as SaleWidgetConfiguration,
18241
+ checkout_sdk_d_SaleWidgetParams as SaleWidgetParams,
18242
+ checkout_sdk_d_SellOrder as SellOrder,
18243
+ checkout_sdk_d_SellParams as SellParams,
18244
+ checkout_sdk_d_SellResult as SellResult,
18245
+ checkout_sdk_d_SellResultFailed as SellResultFailed,
18246
+ checkout_sdk_d_SellResultInsufficientFunds as SellResultInsufficientFunds,
18247
+ checkout_sdk_d_SellResultSuccess as SellResultSuccess,
18248
+ checkout_sdk_d_SellToken as SellToken,
18249
+ checkout_sdk_d_SemanticVersion as SemanticVersion,
18250
+ checkout_sdk_d_SendTransactionParams as SendTransactionParams,
18251
+ checkout_sdk_d_SendTransactionResult as SendTransactionResult,
18252
+ checkout_sdk_d_SmartCheckoutInsufficient as SmartCheckoutInsufficient,
18253
+ checkout_sdk_d_SmartCheckoutParams as SmartCheckoutParams,
18254
+ checkout_sdk_d_SmartCheckoutResult as SmartCheckoutResult,
18255
+ checkout_sdk_d_SmartCheckoutRouter as SmartCheckoutRouter,
18256
+ checkout_sdk_d_SmartCheckoutSufficient as SmartCheckoutSufficient,
18257
+ checkout_sdk_d_SwapEventType as SwapEventType,
18258
+ checkout_sdk_d_SwapFailed as SwapFailed,
18259
+ checkout_sdk_d_SwapFundingStep as SwapFundingStep,
18260
+ checkout_sdk_d_SwapRejected as SwapRejected,
18261
+ checkout_sdk_d_SwapSuccess as SwapSuccess,
18262
+ checkout_sdk_d_SwapWidgetConfiguration as SwapWidgetConfiguration,
18263
+ checkout_sdk_d_SwapWidgetParams as SwapWidgetParams,
18264
+ checkout_sdk_d_SwitchNetworkParams as SwitchNetworkParams,
18265
+ checkout_sdk_d_SwitchNetworkResult as SwitchNetworkResult,
18266
+ checkout_sdk_d_TokenAmountEstimate as TokenAmountEstimate,
18267
+ checkout_sdk_d_TokenBalance as TokenBalance,
18268
+ checkout_sdk_d_TokenFilter as TokenFilter,
18269
+ checkout_sdk_d_TokenFilterTypes as TokenFilterTypes,
18270
+ checkout_sdk_d_TokenInfo as TokenInfo,
18271
+ checkout_sdk_d_TransactionOrGasType as TransactionOrGasType,
18272
+ checkout_sdk_d_TransactionRequirement as TransactionRequirement,
18273
+ checkout_sdk_d_WalletDisconnectWalletEvent as WalletDisconnectWalletEvent,
18274
+ checkout_sdk_d_WalletEventType as WalletEventType,
18275
+ checkout_sdk_d_WalletFilter as WalletFilter,
18276
+ checkout_sdk_d_WalletFilterTypes as WalletFilterTypes,
18277
+ checkout_sdk_d_WalletInfo as WalletInfo,
18278
+ checkout_sdk_d_WalletNetworkSwitchEvent as WalletNetworkSwitchEvent,
18279
+ checkout_sdk_d_WalletProviderName as WalletProviderName,
18280
+ checkout_sdk_d_WalletWidgetConfiguration as WalletWidgetConfiguration,
18281
+ checkout_sdk_d_WalletWidgetParams as WalletWidgetParams,
18282
+ checkout_sdk_d_Widget as Widget,
18283
+ checkout_sdk_d_WidgetConfiguration as WidgetConfiguration,
18284
+ checkout_sdk_d_WidgetConfigurations as WidgetConfigurations,
18285
+ checkout_sdk_d_WidgetEvent as WidgetEvent,
18286
+ checkout_sdk_d_WidgetEventData as WidgetEventData,
18287
+ checkout_sdk_d_WidgetEventTypes as WidgetEventTypes,
18288
+ checkout_sdk_d_WidgetParameters as WidgetParameters,
18289
+ checkout_sdk_d_WidgetProperties as WidgetProperties,
18290
+ checkout_sdk_d_WidgetTheme as WidgetTheme,
18291
+ checkout_sdk_d_WidgetType as WidgetType,
14457
18292
  };
14458
18293
  }
14459
18294
 
14460
- export { blockchain_data_d as blockchainData, config_d as config, immutablex_client_d as immutablexClient, passport_d as passport, provider_d as provider };
18295
+ export { blockchain_data_d as blockchainData, checkout_sdk_d as checkoutSdk, config_d as config, immutablex_client_d as immutablexClient, orderbook_d as orderbook, passport_d as passport, provider_d as provider };