@imtbl/sdk 0.16.0-alpha.1 → 0.17.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/blockchain_data.d.ts +151 -26
- package/dist/blockchain_data.js +106 -7
- package/dist/browser/checkout.js +2 -2
- package/dist/checkout_sdk.d.ts +218 -40
- package/dist/checkout_sdk.js +751 -297
- package/dist/checkout_widgets.js +1 -1
- package/dist/erc721.d.ts +40 -0
- package/dist/erc721.js +173 -1
- package/dist/erc721_mint_by_id.d.ts +14 -0
- package/dist/erc721_mint_by_id.js +165 -19
- package/dist/immutablex_client.js +1 -1
- package/dist/index.browser.js +14 -14
- package/dist/index.browser.js.map +1 -1
- package/dist/index.cjs +1213 -341
- package/dist/index.d.ts +415 -48
- package/dist/index.js +1198 -326
- package/dist/passport.js +77 -6
- package/package.json +6 -2
package/dist/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/// <reference path="global.d.ts" />
|
|
2
2
|
/// <reference types="node" />
|
|
3
|
-
import {
|
|
3
|
+
import { ProviderConfiguration as ProviderConfiguration$1, ExchangeContracts } from 'config';
|
|
4
4
|
|
|
5
5
|
declare enum Environment {
|
|
6
6
|
PRODUCTION = "production",
|
|
@@ -32,6 +32,90 @@ declare namespace config_d {
|
|
|
32
32
|
};
|
|
33
33
|
}
|
|
34
34
|
|
|
35
|
+
/**
|
|
36
|
+
* Immutable zkEVM API
|
|
37
|
+
* Immutable Multi Rollup API
|
|
38
|
+
*
|
|
39
|
+
* The version of the OpenAPI document: 1.0.0
|
|
40
|
+
* Contact: support@immutable.com
|
|
41
|
+
*
|
|
42
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
43
|
+
* https://openapi-generator.tech
|
|
44
|
+
* Do not edit the class manually.
|
|
45
|
+
*/
|
|
46
|
+
interface ConfigurationParameters$1 {
|
|
47
|
+
apiKey?: string | Promise<string> | ((name: string) => string) | ((name: string) => Promise<string>);
|
|
48
|
+
username?: string;
|
|
49
|
+
password?: string;
|
|
50
|
+
accessToken?: string | Promise<string> | ((name?: string, scopes?: string[]) => string) | ((name?: string, scopes?: string[]) => Promise<string>);
|
|
51
|
+
basePath?: string;
|
|
52
|
+
baseOptions?: any;
|
|
53
|
+
formDataCtor?: new () => any;
|
|
54
|
+
}
|
|
55
|
+
declare class Configuration$1 {
|
|
56
|
+
/**
|
|
57
|
+
* parameter for apiKey security
|
|
58
|
+
* @param name security name
|
|
59
|
+
* @memberof Configuration
|
|
60
|
+
*/
|
|
61
|
+
apiKey?: string | Promise<string> | ((name: string) => string) | ((name: string) => Promise<string>);
|
|
62
|
+
/**
|
|
63
|
+
* parameter for basic security
|
|
64
|
+
*
|
|
65
|
+
* @type {string}
|
|
66
|
+
* @memberof Configuration
|
|
67
|
+
*/
|
|
68
|
+
username?: string;
|
|
69
|
+
/**
|
|
70
|
+
* parameter for basic security
|
|
71
|
+
*
|
|
72
|
+
* @type {string}
|
|
73
|
+
* @memberof Configuration
|
|
74
|
+
*/
|
|
75
|
+
password?: string;
|
|
76
|
+
/**
|
|
77
|
+
* parameter for oauth2 security
|
|
78
|
+
* @param name security name
|
|
79
|
+
* @param scopes oauth2 scope
|
|
80
|
+
* @memberof Configuration
|
|
81
|
+
*/
|
|
82
|
+
accessToken?: string | Promise<string> | ((name?: string, scopes?: string[]) => string) | ((name?: string, scopes?: string[]) => Promise<string>);
|
|
83
|
+
/**
|
|
84
|
+
* override base path
|
|
85
|
+
*
|
|
86
|
+
* @type {string}
|
|
87
|
+
* @memberof Configuration
|
|
88
|
+
*/
|
|
89
|
+
basePath?: string;
|
|
90
|
+
/**
|
|
91
|
+
* base options for axios calls
|
|
92
|
+
*
|
|
93
|
+
* @type {any}
|
|
94
|
+
* @memberof Configuration
|
|
95
|
+
*/
|
|
96
|
+
baseOptions?: any;
|
|
97
|
+
/**
|
|
98
|
+
* The FormData constructor that will be used to create multipart form data
|
|
99
|
+
* requests. You can inject this here so that execution environments that
|
|
100
|
+
* do not support the FormData class can still run the generated client.
|
|
101
|
+
*
|
|
102
|
+
* @type {new () => FormData}
|
|
103
|
+
*/
|
|
104
|
+
formDataCtor?: new () => any;
|
|
105
|
+
constructor(param?: ConfigurationParameters$1);
|
|
106
|
+
/**
|
|
107
|
+
* Check if the given MIME is a JSON MIME.
|
|
108
|
+
* JSON MIME examples:
|
|
109
|
+
* application/json
|
|
110
|
+
* application/json; charset=UTF8
|
|
111
|
+
* APPLICATION/JSON
|
|
112
|
+
* application/vnd.company+json
|
|
113
|
+
* @param mime - MIME (Multipurpose Internet Mail Extensions)
|
|
114
|
+
* @return True if the given MIME is JSON, false otherwise.
|
|
115
|
+
*/
|
|
116
|
+
isJsonMime(mime: string): boolean;
|
|
117
|
+
}
|
|
118
|
+
|
|
35
119
|
/**
|
|
36
120
|
* Immutable zkEVM API
|
|
37
121
|
* Immutable Multi Rollup API
|
|
@@ -1689,6 +1773,37 @@ interface CollectionsApiListCollectionsRequest$1 {
|
|
|
1689
1773
|
*/
|
|
1690
1774
|
readonly pageSize?: number;
|
|
1691
1775
|
}
|
|
1776
|
+
/**
|
|
1777
|
+
* Request parameters for listCollectionsByNFTOwner operation in CollectionsApi.
|
|
1778
|
+
* @export
|
|
1779
|
+
* @interface CollectionsApiListCollectionsByNFTOwnerRequest
|
|
1780
|
+
*/
|
|
1781
|
+
interface CollectionsApiListCollectionsByNFTOwnerRequest {
|
|
1782
|
+
/**
|
|
1783
|
+
* Account address
|
|
1784
|
+
* @type {string}
|
|
1785
|
+
* @memberof CollectionsApiListCollectionsByNFTOwner
|
|
1786
|
+
*/
|
|
1787
|
+
readonly accountAddress: string;
|
|
1788
|
+
/**
|
|
1789
|
+
* The name of chain
|
|
1790
|
+
* @type {string}
|
|
1791
|
+
* @memberof CollectionsApiListCollectionsByNFTOwner
|
|
1792
|
+
*/
|
|
1793
|
+
readonly chainName: string;
|
|
1794
|
+
/**
|
|
1795
|
+
* Encoded page cursor to retrieve previous or next page. Use the value returned in the response.
|
|
1796
|
+
* @type {string}
|
|
1797
|
+
* @memberof CollectionsApiListCollectionsByNFTOwner
|
|
1798
|
+
*/
|
|
1799
|
+
readonly pageCursor?: string;
|
|
1800
|
+
/**
|
|
1801
|
+
* Maximum number of items to return
|
|
1802
|
+
* @type {number}
|
|
1803
|
+
* @memberof CollectionsApiListCollectionsByNFTOwner
|
|
1804
|
+
*/
|
|
1805
|
+
readonly pageSize?: number;
|
|
1806
|
+
}
|
|
1692
1807
|
|
|
1693
1808
|
/**
|
|
1694
1809
|
* Request parameters for listNFTOwners operation in NftOwnersApi.
|
|
@@ -1886,6 +2001,18 @@ declare class APIError$1 extends Error {
|
|
|
1886
2001
|
constructor({ message, code, details, link, trace_id: traceId, }: OpenAPIError);
|
|
1887
2002
|
}
|
|
1888
2003
|
|
|
2004
|
+
interface APIConfigurationParams {
|
|
2005
|
+
basePath: string;
|
|
2006
|
+
headers?: Record<string, string>;
|
|
2007
|
+
}
|
|
2008
|
+
interface BlockchainDataModuleConfiguration extends ModuleConfiguration<APIConfigurationParams> {
|
|
2009
|
+
}
|
|
2010
|
+
declare class BlockchainDataConfiguration {
|
|
2011
|
+
readonly apiConfig: Configuration$1;
|
|
2012
|
+
readonly baseConfig: ImmutableConfiguration;
|
|
2013
|
+
constructor({ baseConfig, overrides }: BlockchainDataModuleConfiguration);
|
|
2014
|
+
}
|
|
2015
|
+
|
|
1889
2016
|
declare class BlockchainData {
|
|
1890
2017
|
readonly config: BlockchainDataConfiguration;
|
|
1891
2018
|
private readonly activities;
|
|
@@ -1894,7 +2021,7 @@ declare class BlockchainData {
|
|
|
1894
2021
|
private readonly nfts;
|
|
1895
2022
|
private readonly nftOwners;
|
|
1896
2023
|
private readonly tokens;
|
|
1897
|
-
constructor(moduleConfig: BlockchainDataModuleConfiguration
|
|
2024
|
+
constructor(moduleConfig: BlockchainDataModuleConfiguration);
|
|
1898
2025
|
/**
|
|
1899
2026
|
* List all activities
|
|
1900
2027
|
* @param request - the request object containing the parameters to be provided in the API request
|
|
@@ -1923,6 +2050,13 @@ declare class BlockchainData {
|
|
|
1923
2050
|
* @throws {@link index.APIError}
|
|
1924
2051
|
*/
|
|
1925
2052
|
listCollections(request: CollectionsApiListCollectionsRequest$1): Promise<ListCollectionsResult>;
|
|
2053
|
+
/**
|
|
2054
|
+
* List collections by NFT owner
|
|
2055
|
+
* @param request - the request object containing the parameters to be provided in the API request
|
|
2056
|
+
* @returns a promise that resolves with a list of collections
|
|
2057
|
+
* @throws {@link index.APIError}
|
|
2058
|
+
*/
|
|
2059
|
+
listCollectionsByNFTOwner(request: CollectionsApiListCollectionsByNFTOwnerRequest): Promise<ListCollectionsResult>;
|
|
1926
2060
|
/**
|
|
1927
2061
|
* Get collection by contract address
|
|
1928
2062
|
* @param request - the request object containing the parameters to be provided in the API request
|
|
@@ -1974,13 +2108,6 @@ declare class BlockchainData {
|
|
|
1974
2108
|
getToken(request: TokensApiGetERC20TokenRequest): Promise<GetTokenResult>;
|
|
1975
2109
|
}
|
|
1976
2110
|
|
|
1977
|
-
interface APIConfigurationParams {
|
|
1978
|
-
basePath: string;
|
|
1979
|
-
headers?: Record<string, string>;
|
|
1980
|
-
}
|
|
1981
|
-
interface BlockchainDataModuleConfiguration extends ModuleConfiguration<APIConfigurationParams> {
|
|
1982
|
-
}
|
|
1983
|
-
|
|
1984
2111
|
type ActivityType = ActivityType$1;
|
|
1985
2112
|
|
|
1986
2113
|
type blockchain_data_d_ActivityType = ActivityType;
|
|
@@ -14251,6 +14378,68 @@ type ERC20Gas = {
|
|
|
14251
14378
|
contractAddress: string;
|
|
14252
14379
|
limit: BigNumber;
|
|
14253
14380
|
};
|
|
14381
|
+
/**
|
|
14382
|
+
* Represents the result of {@link Checkout.smartCheckout}.
|
|
14383
|
+
* @property {boolean} sufficient - If the user address has sufficient funds to cover the transaction.
|
|
14384
|
+
* @property {TransactionRequirement[]} transactionRequirements - The transaction requirements.
|
|
14385
|
+
*/
|
|
14386
|
+
interface SmartCheckoutResult {
|
|
14387
|
+
sufficient: boolean;
|
|
14388
|
+
transactionRequirements: TransactionRequirement[];
|
|
14389
|
+
}
|
|
14390
|
+
/**
|
|
14391
|
+
* Represents the transaction requirement for a transaction.
|
|
14392
|
+
* @property {ItemType} type - The type of the transaction requirement.
|
|
14393
|
+
* @property {boolean} sufficient - If the user address has sufficient funds to cover the transaction.
|
|
14394
|
+
* @property {TransactionRequirementItem} required - The required item balance.
|
|
14395
|
+
* @property {TransactionRequirementItem} current - The current item balance.
|
|
14396
|
+
* @property {TransactionRequirementDelta} delta - The delta between the required and current balances.
|
|
14397
|
+
*/
|
|
14398
|
+
type TransactionRequirement = {
|
|
14399
|
+
type: ItemType;
|
|
14400
|
+
sufficient: boolean;
|
|
14401
|
+
required: ItemBalance;
|
|
14402
|
+
current: ItemBalance;
|
|
14403
|
+
delta: BalanceDelta;
|
|
14404
|
+
};
|
|
14405
|
+
/**
|
|
14406
|
+
* Represents the balance for either a native or ERC20 token.
|
|
14407
|
+
* @property {BigNumber} balance - The balance of the item.
|
|
14408
|
+
* @property {string} formattedBalance - The formatted balance of the item.
|
|
14409
|
+
* @property {TokenInfo} token - The token info of the item.
|
|
14410
|
+
*/
|
|
14411
|
+
type TokenBalance = {
|
|
14412
|
+
type: ItemType.NATIVE | ItemType.ERC20;
|
|
14413
|
+
balance: BigNumber;
|
|
14414
|
+
formattedBalance: string;
|
|
14415
|
+
token: TokenInfo;
|
|
14416
|
+
};
|
|
14417
|
+
/**
|
|
14418
|
+
* Represents the balance for an ERC20.
|
|
14419
|
+
* @property {BigNumber} balance - The balance of the item.
|
|
14420
|
+
* @property {string} formattedBalance - The formatted balance of the item.
|
|
14421
|
+
* @property {TokenInfo} token - The token info of the item.
|
|
14422
|
+
*/
|
|
14423
|
+
interface ERC721Balance {
|
|
14424
|
+
type: ItemType.ERC721;
|
|
14425
|
+
balance: BigNumber;
|
|
14426
|
+
formattedBalance: string;
|
|
14427
|
+
contractAddress: string;
|
|
14428
|
+
id: string;
|
|
14429
|
+
}
|
|
14430
|
+
/**
|
|
14431
|
+
* Type representing the balance of an item.
|
|
14432
|
+
*/
|
|
14433
|
+
type ItemBalance = ERC721Balance | TokenBalance;
|
|
14434
|
+
/**
|
|
14435
|
+
* Represents the delta between two balances.
|
|
14436
|
+
* @property {BigNumber} balance - The delta of the balance.
|
|
14437
|
+
* @property {string} formattedBalance - The formatted balance of the delta.
|
|
14438
|
+
*/
|
|
14439
|
+
type BalanceDelta = {
|
|
14440
|
+
balance: BigNumber;
|
|
14441
|
+
formattedBalance: string;
|
|
14442
|
+
};
|
|
14254
14443
|
/**
|
|
14255
14444
|
* Interface representing the parameters for {@link Checkout.buy}
|
|
14256
14445
|
* @property {Web3Provider} provider - The provider to use for the buy.
|
|
@@ -14260,9 +14449,65 @@ interface BuyParams {
|
|
|
14260
14449
|
provider: Web3Provider;
|
|
14261
14450
|
orderId: string;
|
|
14262
14451
|
}
|
|
14452
|
+
/**
|
|
14453
|
+
* Interface representing the result of the buy
|
|
14454
|
+
* @property {SmartCheckoutResult} smartCheckoutResult - The result of smart checkout.
|
|
14455
|
+
* @property {string} orderId - The order ID.
|
|
14456
|
+
* @property {BuyStatus} status - The status of the buy, present when smart checkout balances are sufficient
|
|
14457
|
+
* and the transactions were executed
|
|
14458
|
+
*/
|
|
14459
|
+
type BuyResult = {
|
|
14460
|
+
smartCheckoutResult: SmartCheckoutResult;
|
|
14461
|
+
orderId: string;
|
|
14462
|
+
status?: BuyStatus;
|
|
14463
|
+
};
|
|
14464
|
+
/**
|
|
14465
|
+
* Represents the status of the transaction for the Buy
|
|
14466
|
+
*/
|
|
14467
|
+
type BuyStatus = BuySuccessStatus | BuyFailedStatus;
|
|
14468
|
+
/**
|
|
14469
|
+
* Represents the status of a successful Buy
|
|
14470
|
+
* @property {string} type - The success buy status type.
|
|
14471
|
+
*/
|
|
14472
|
+
interface BuySuccessStatus {
|
|
14473
|
+
type: BuyStatusType.SUCCESS;
|
|
14474
|
+
}
|
|
14475
|
+
/**
|
|
14476
|
+
* Represents the status of a failed Buy
|
|
14477
|
+
* @property {string} type - The failed buy status type.
|
|
14478
|
+
* @property {string} transactionHash - The transaction hash of the failed transaction.
|
|
14479
|
+
* @property {string} reason - The reason for the failed transaction.
|
|
14480
|
+
*/
|
|
14481
|
+
interface BuyFailedStatus {
|
|
14482
|
+
type: BuyStatusType.FAILED;
|
|
14483
|
+
transactionHash: string;
|
|
14484
|
+
reason: string;
|
|
14485
|
+
}
|
|
14486
|
+
/**
|
|
14487
|
+
* A type representing the status of the transaction for the Buy
|
|
14488
|
+
* @enum {string}
|
|
14489
|
+
* @property {string} SUCCESS - All the transactions were successful.
|
|
14490
|
+
* @property {string} FAILED - At least one of the transactions failed.
|
|
14491
|
+
*/
|
|
14492
|
+
declare enum BuyStatusType {
|
|
14493
|
+
SUCCESS = "SUCCESS",
|
|
14494
|
+
FAILED = "FAILED"
|
|
14495
|
+
}
|
|
14496
|
+
/**
|
|
14497
|
+
* Interface representing the parameters for {@link Checkout.cancel}
|
|
14498
|
+
* @property {Web3Provider} provider - The provider to use for the cancel.
|
|
14499
|
+
* @property {string} orderId - The order ID.
|
|
14500
|
+
*/
|
|
14501
|
+
interface CancelParams {
|
|
14502
|
+
provider: Web3Provider;
|
|
14503
|
+
orderId: string;
|
|
14504
|
+
}
|
|
14263
14505
|
interface CheckoutOverrides {
|
|
14264
14506
|
}
|
|
14265
14507
|
interface CheckoutModuleConfiguration extends ModuleConfiguration<CheckoutOverrides> {
|
|
14508
|
+
isOnRampEnabled?: boolean;
|
|
14509
|
+
isSwapEnabled?: boolean;
|
|
14510
|
+
isBridgeEnabled?: boolean;
|
|
14266
14511
|
}
|
|
14267
14512
|
/**
|
|
14268
14513
|
* A type representing various remotely defined configurations which are
|
|
@@ -14497,6 +14742,91 @@ declare enum NetworkFilterTypes {
|
|
|
14497
14742
|
interface NetworkFilter {
|
|
14498
14743
|
chainId: ChainId;
|
|
14499
14744
|
}
|
|
14745
|
+
/**
|
|
14746
|
+
* Interface representing the parameters for {@link Checkout.sell}
|
|
14747
|
+
* @property {Web3Provider} provider - The provider to use for the sell.
|
|
14748
|
+
* @property {string} id - The ERC721 ID.
|
|
14749
|
+
* @property {string} collectionAddress - The contract address of the ERC721s collection.
|
|
14750
|
+
* @property {BuyToken} buyToken - The token to buy the item with.
|
|
14751
|
+
*/
|
|
14752
|
+
interface SellParams {
|
|
14753
|
+
provider: Web3Provider;
|
|
14754
|
+
id: string;
|
|
14755
|
+
collectionAddress: string;
|
|
14756
|
+
buyToken: BuyToken;
|
|
14757
|
+
}
|
|
14758
|
+
/**
|
|
14759
|
+
* Interface representing the result of the sell
|
|
14760
|
+
* @property {string} id - The ERC721 ID.
|
|
14761
|
+
* @property {string} collectionAddress - The contract address of the ERC721s collection.
|
|
14762
|
+
* @property {SmartCheckoutResult} smartCheckoutResult - The result of the smart checkout.
|
|
14763
|
+
* @property {SellStatus} status - The status of the sell, present when smart checkout balances are sufficient
|
|
14764
|
+
*/
|
|
14765
|
+
type SellResult = {
|
|
14766
|
+
id: string;
|
|
14767
|
+
collectionAddress: string;
|
|
14768
|
+
smartCheckoutResult: SmartCheckoutResult;
|
|
14769
|
+
status?: SellStatus;
|
|
14770
|
+
};
|
|
14771
|
+
/**
|
|
14772
|
+
* Represents the status of the transaction for the Sell
|
|
14773
|
+
*/
|
|
14774
|
+
type SellStatus = SellSuccessStatus | SellFailedStatus;
|
|
14775
|
+
/**
|
|
14776
|
+
* Represents the status of a successful Sell
|
|
14777
|
+
* @property {string} type - The success sell status type.
|
|
14778
|
+
* @property {string} orderId - The order ID of the listing.
|
|
14779
|
+
*/
|
|
14780
|
+
interface SellSuccessStatus {
|
|
14781
|
+
type: SellStatusType.SUCCESS;
|
|
14782
|
+
orderId: string;
|
|
14783
|
+
}
|
|
14784
|
+
/**
|
|
14785
|
+
* Represents the status of a failed Sell
|
|
14786
|
+
* @property {string} type - The failed sell status type.
|
|
14787
|
+
* @property {string} transactionHash - The transaction hash of the failed transaction.
|
|
14788
|
+
* @property {string} reason - The reason for the failed transaction.
|
|
14789
|
+
*/
|
|
14790
|
+
interface SellFailedStatus {
|
|
14791
|
+
type: SellStatusType.FAILED;
|
|
14792
|
+
transactionHash: string;
|
|
14793
|
+
reason: string;
|
|
14794
|
+
}
|
|
14795
|
+
/**
|
|
14796
|
+
* A type representing the status of the transaction for the Sell
|
|
14797
|
+
* @enum {string}
|
|
14798
|
+
* @property {string} SUCCESS - All the transactions were successful.
|
|
14799
|
+
* @property {string} FAILED - At least one of the transactions failed.
|
|
14800
|
+
*/
|
|
14801
|
+
declare enum SellStatusType {
|
|
14802
|
+
SUCCESS = "SUCCESS",
|
|
14803
|
+
FAILED = "FAILED"
|
|
14804
|
+
}
|
|
14805
|
+
/**
|
|
14806
|
+
* Represents the token that the item can be bought with once listed for sale.
|
|
14807
|
+
* NativeBuyToken or ERC20BuyToken {@link Checkout.smartCheckout}.
|
|
14808
|
+
*/
|
|
14809
|
+
type BuyToken = NativeBuyToken | ERC20BuyToken;
|
|
14810
|
+
/**
|
|
14811
|
+
* Represents a native buy token
|
|
14812
|
+
* @property {ItemType} type - The type indicate this is a native token.
|
|
14813
|
+
* @property {BigNumber} amount - The amount of native token.
|
|
14814
|
+
*/
|
|
14815
|
+
type NativeBuyToken = {
|
|
14816
|
+
type: ItemType.NATIVE;
|
|
14817
|
+
amount: BigNumber;
|
|
14818
|
+
};
|
|
14819
|
+
/**
|
|
14820
|
+
* Represents a ERC20 buy token
|
|
14821
|
+
* @property {ItemType} type - The type indicate this is a ERC20 token.
|
|
14822
|
+
* @property {BigNumber} amount - The amount of native token.
|
|
14823
|
+
* @property {string} contractAddress - The contract address of the ERC20.
|
|
14824
|
+
*/
|
|
14825
|
+
type ERC20BuyToken = {
|
|
14826
|
+
type: ItemType.ERC20;
|
|
14827
|
+
amount: BigNumber;
|
|
14828
|
+
contractAddress: string;
|
|
14829
|
+
};
|
|
14500
14830
|
/**
|
|
14501
14831
|
* Interface representing the parameters for {@link Checkout.getTokenAllowList}.
|
|
14502
14832
|
* @property {TokenFilterTypes} type - The type of token to retrieve.
|
|
@@ -14659,10 +14989,15 @@ declare enum CheckoutErrorType {
|
|
|
14659
14989
|
UNSUPPORTED_TOKEN_TYPE_ERROR = "UNSUPPORTED_TOKEN_TYPE_ERROR",
|
|
14660
14990
|
UNSUPPORTED_BALANCE_REQUIREMENT_ERROR = "UNSUPPORTED_BALANCE_REQUIREMENT_ERROR",
|
|
14661
14991
|
GET_ORDER_LISTING_ERROR = "GET_ORDER_LISTING_ERROR",
|
|
14992
|
+
CANCEL_ORDER_LISTING_ERROR = "CANCEL_ORDER_LISTING_ERROR",
|
|
14662
14993
|
PREPARE_ORDER_LISTING_ERROR = "PREPARE_ORDER_LISTING_ERROR",
|
|
14994
|
+
CREATE_ORDER_LISTING_ERROR = "CREATE_ORDER_LISTING_ERROR",
|
|
14663
14995
|
SWITCH_NETWORK_UNSUPPORTED = "SWITCH_NETWORK_UNSUPPORTED",
|
|
14664
14996
|
GET_ERC20_ALLOWANCE_ERROR = "GET_ERC20_ALLOWANCE_ERROR",
|
|
14665
|
-
GET_ERC721_ALLOWANCE_ERROR = "GET_ERC721_ALLOWANCE_ERROR"
|
|
14997
|
+
GET_ERC721_ALLOWANCE_ERROR = "GET_ERC721_ALLOWANCE_ERROR",
|
|
14998
|
+
EXECUTE_APPROVAL_TRANSACTION_ERROR = "EXECUTE_APPROVAL_TRANSACTION_ERROR",
|
|
14999
|
+
EXECUTE_FULFILMENT_TRANSACTION_ERROR = "EXECUTE_FULFILMENT_TRANSACTION_ERROR",
|
|
15000
|
+
SIGN_MESSAGE_ERROR = "SIGN_MESSAGE_ERROR"
|
|
14666
15001
|
}
|
|
14667
15002
|
/**
|
|
14668
15003
|
* Represents an error object with a specific type, optional message, and optional data.
|
|
@@ -14689,49 +15024,14 @@ declare class RemoteConfigFetcher {
|
|
|
14689
15024
|
declare class CheckoutConfiguration {
|
|
14690
15025
|
readonly isDevelopment: boolean;
|
|
14691
15026
|
readonly isProduction: boolean;
|
|
15027
|
+
readonly isOnRampEnabled: boolean;
|
|
15028
|
+
readonly isSwapEnabled: boolean;
|
|
15029
|
+
readonly isBridgeEnabled: boolean;
|
|
14692
15030
|
readonly remote: RemoteConfigFetcher;
|
|
14693
15031
|
readonly environment: Environment;
|
|
14694
15032
|
readonly networkMap: NetworkMap;
|
|
14695
15033
|
constructor(config: CheckoutModuleConfiguration);
|
|
14696
15034
|
}
|
|
14697
|
-
/**
|
|
14698
|
-
* Interface representing the parameters for {@link Checkout.sell}
|
|
14699
|
-
* @property {Web3Provider} provider - The provider to use for the sell.
|
|
14700
|
-
* @property {string} id - The ERC721 ID.
|
|
14701
|
-
* @property {string} collectionAddress - The contract address of the ERC721s collection.
|
|
14702
|
-
* @property {BuyToken} buyToken - The token to buy the item with.
|
|
14703
|
-
*/
|
|
14704
|
-
interface SellParams {
|
|
14705
|
-
provider: Web3Provider;
|
|
14706
|
-
id: string;
|
|
14707
|
-
collectionAddress: string;
|
|
14708
|
-
buyToken: BuyToken;
|
|
14709
|
-
}
|
|
14710
|
-
/**
|
|
14711
|
-
* Represents the token that the item can be bought with once listed for sale.
|
|
14712
|
-
* NativeBuyToken or ERC20BuyToken {@link Checkout.smartCheckout}.
|
|
14713
|
-
*/
|
|
14714
|
-
type BuyToken = NativeBuyToken | ERC20BuyToken;
|
|
14715
|
-
/**
|
|
14716
|
-
* Represents a native buy token
|
|
14717
|
-
* @property {ItemType} type - The type indicate this is a native token.
|
|
14718
|
-
* @property {BigNumber} amount - The amount of native token.
|
|
14719
|
-
*/
|
|
14720
|
-
type NativeBuyToken = {
|
|
14721
|
-
type: ItemType.NATIVE;
|
|
14722
|
-
amount: BigNumber;
|
|
14723
|
-
};
|
|
14724
|
-
/**
|
|
14725
|
-
* Represents a ERC20 buy token
|
|
14726
|
-
* @property {ItemType} type - The type indicate this is a ERC20 token.
|
|
14727
|
-
* @property {BigNumber} amount - The amount of native token.
|
|
14728
|
-
* @property {string} contractAddress - The contract address of the ERC20.
|
|
14729
|
-
*/
|
|
14730
|
-
type ERC20BuyToken = {
|
|
14731
|
-
type: ItemType.ERC20;
|
|
14732
|
-
amount: BigNumber;
|
|
14733
|
-
contractAddress: string;
|
|
14734
|
-
};
|
|
14735
15035
|
declare class Checkout {
|
|
14736
15036
|
readonly config: CheckoutConfiguration;
|
|
14737
15037
|
/**
|
|
@@ -14816,6 +15116,11 @@ declare class Checkout {
|
|
|
14816
15116
|
* @param {SellParams} params - The parameters for the sell.
|
|
14817
15117
|
*/
|
|
14818
15118
|
sell(params: SellParams): Promise<void>;
|
|
15119
|
+
/**
|
|
15120
|
+
* Cancels a sell.
|
|
15121
|
+
* @param {CancelParams} params - The parameters for the cancel.
|
|
15122
|
+
*/
|
|
15123
|
+
cancel(params: CancelParams): Promise<void>;
|
|
14819
15124
|
/**
|
|
14820
15125
|
* Determines the transaction requirements to complete a purchase.
|
|
14821
15126
|
* @params {SmartCheckoutParams} params - The parameters for smart checkout.
|
|
@@ -14837,7 +15142,9 @@ declare class Checkout {
|
|
|
14837
15142
|
|
|
14838
15143
|
type checkout_sdk_d_AllowedNetworkConfig = AllowedNetworkConfig;
|
|
14839
15144
|
type checkout_sdk_d_BuyParams = BuyParams;
|
|
15145
|
+
type checkout_sdk_d_BuyResult = BuyResult;
|
|
14840
15146
|
declare const checkout_sdk_d_CHECKOUT_API_BASE_URL: typeof CHECKOUT_API_BASE_URL;
|
|
15147
|
+
type checkout_sdk_d_CancelParams = CancelParams;
|
|
14841
15148
|
type checkout_sdk_d_ChainId = ChainId;
|
|
14842
15149
|
declare const checkout_sdk_d_ChainId: typeof ChainId;
|
|
14843
15150
|
type checkout_sdk_d_ChainName = ChainName;
|
|
@@ -14879,6 +15186,8 @@ type checkout_sdk_d_NetworkFilterTypes = NetworkFilterTypes;
|
|
|
14879
15186
|
declare const checkout_sdk_d_NetworkFilterTypes: typeof NetworkFilterTypes;
|
|
14880
15187
|
type checkout_sdk_d_NetworkInfo = NetworkInfo;
|
|
14881
15188
|
type checkout_sdk_d_RemoteConfiguration = RemoteConfiguration;
|
|
15189
|
+
type checkout_sdk_d_SellParams = SellParams;
|
|
15190
|
+
type checkout_sdk_d_SellResult = SellResult;
|
|
14882
15191
|
type checkout_sdk_d_SendTransactionParams = SendTransactionParams;
|
|
14883
15192
|
type checkout_sdk_d_SendTransactionResult = SendTransactionResult;
|
|
14884
15193
|
type checkout_sdk_d_SmartCheckoutParams = SmartCheckoutParams;
|
|
@@ -14900,7 +15209,9 @@ declare namespace checkout_sdk_d {
|
|
|
14900
15209
|
export {
|
|
14901
15210
|
checkout_sdk_d_AllowedNetworkConfig as AllowedNetworkConfig,
|
|
14902
15211
|
checkout_sdk_d_BuyParams as BuyParams,
|
|
15212
|
+
checkout_sdk_d_BuyResult as BuyResult,
|
|
14903
15213
|
checkout_sdk_d_CHECKOUT_API_BASE_URL as CHECKOUT_API_BASE_URL,
|
|
15214
|
+
checkout_sdk_d_CancelParams as CancelParams,
|
|
14904
15215
|
checkout_sdk_d_ChainId as ChainId,
|
|
14905
15216
|
checkout_sdk_d_ChainName as ChainName,
|
|
14906
15217
|
checkout_sdk_d_CheckConnectionParams as CheckConnectionParams,
|
|
@@ -14934,6 +15245,8 @@ declare namespace checkout_sdk_d {
|
|
|
14934
15245
|
checkout_sdk_d_NetworkFilterTypes as NetworkFilterTypes,
|
|
14935
15246
|
checkout_sdk_d_NetworkInfo as NetworkInfo,
|
|
14936
15247
|
checkout_sdk_d_RemoteConfiguration as RemoteConfiguration,
|
|
15248
|
+
checkout_sdk_d_SellParams as SellParams,
|
|
15249
|
+
checkout_sdk_d_SellResult as SellResult,
|
|
14937
15250
|
checkout_sdk_d_SendTransactionParams as SendTransactionParams,
|
|
14938
15251
|
checkout_sdk_d_SendTransactionResult as SendTransactionResult,
|
|
14939
15252
|
checkout_sdk_d_SmartCheckoutParams as SmartCheckoutParams,
|
|
@@ -29979,6 +30292,11 @@ declare class ERC721 {
|
|
|
29979
30292
|
* @returns the DEFAULT_ADMIN_ROLE as a string.
|
|
29980
30293
|
*/
|
|
29981
30294
|
DEFAULT_ADMIN_ROLE(provider: Provider$1, overrides?: CallOverrides): Promise<string>;
|
|
30295
|
+
/**
|
|
30296
|
+
* Returns the domain separator used in the encoding of the signature for permits, as defined by EIP-712
|
|
30297
|
+
* @return the bytes32 domain separator
|
|
30298
|
+
*/
|
|
30299
|
+
DOMAIN_SEPARATOR(provider: Provider$1, overrides?: CallOverrides): Promise<string>;
|
|
29982
30300
|
/**
|
|
29983
30301
|
* @returns the MINTER_ROLE as a string.
|
|
29984
30302
|
*/
|
|
@@ -29995,6 +30313,27 @@ declare class ERC721 {
|
|
|
29995
30313
|
* @returns the contractURI as a string.
|
|
29996
30314
|
*/
|
|
29997
30315
|
contractURI(provider: Provider$1, overrides?: CallOverrides): Promise<string>;
|
|
30316
|
+
/**
|
|
30317
|
+
* @dev returns the fields and values that describe the domain separator used by this contract for EIP-712
|
|
30318
|
+
* signature.
|
|
30319
|
+
*/
|
|
30320
|
+
eip712Domain(provider: Provider$1, overrides?: CallOverrides): Promise<[
|
|
30321
|
+
string,
|
|
30322
|
+
string,
|
|
30323
|
+
string,
|
|
30324
|
+
BigNumber,
|
|
30325
|
+
string,
|
|
30326
|
+
string,
|
|
30327
|
+
BigNumber[]
|
|
30328
|
+
] & {
|
|
30329
|
+
fields: string;
|
|
30330
|
+
name: string;
|
|
30331
|
+
version: string;
|
|
30332
|
+
chainId: BigNumber;
|
|
30333
|
+
verifyingContract: string;
|
|
30334
|
+
salt: string;
|
|
30335
|
+
extensions: BigNumber[];
|
|
30336
|
+
}>;
|
|
29998
30337
|
/**
|
|
29999
30338
|
* @returns admin addresses as an array of strings.
|
|
30000
30339
|
*/
|
|
@@ -30031,6 +30370,12 @@ declare class ERC721 {
|
|
|
30031
30370
|
* @returns the owner address of a particular tokenId.
|
|
30032
30371
|
*/
|
|
30033
30372
|
ownerOf(provider: Provider$1, tokenId: PromiseOrValue<BigNumberish>, overrides?: CallOverrides): Promise<string>;
|
|
30373
|
+
/**
|
|
30374
|
+
* Returns the current nonce of a given token ID.
|
|
30375
|
+
* @param tokenId The ID of the token for which to retrieve the nonce.
|
|
30376
|
+
* @return Current nonce of the given token.
|
|
30377
|
+
*/
|
|
30378
|
+
nonces(provider: Provider$1, tokenId: PromiseOrValue<BigNumberish>, overrides?: CallOverrides): Promise<BigNumber>;
|
|
30034
30379
|
/**
|
|
30035
30380
|
* @returns the operator allowlist as a string.
|
|
30036
30381
|
*/
|
|
@@ -30060,6 +30405,14 @@ declare class ERC721 {
|
|
|
30060
30405
|
populateApprove(to: PromiseOrValue<string>, tokenId: PromiseOrValue<BigNumberish>, overrides?: Overrides & {
|
|
30061
30406
|
from?: PromiseOrValue<string>;
|
|
30062
30407
|
}): Promise<PopulatedTransaction>;
|
|
30408
|
+
/**
|
|
30409
|
+
* Function to approve by way of owner signature
|
|
30410
|
+
* @param spender the address to approve
|
|
30411
|
+
* @param tokenId the index of the NFT to approve the spender on
|
|
30412
|
+
* @param deadline a timestamp expiry for the permit
|
|
30413
|
+
* @param sig a traditional or EIP-2098 signature
|
|
30414
|
+
*/
|
|
30415
|
+
populatePermit(spender: PromiseOrValue<string>, tokenId: PromiseOrValue<BigNumberish>, deadline: PromiseOrValue<BigNumberish>, sig: PromiseOrValue<BytesLike>, overrides?: CallOverrides): Promise<PopulatedTransaction>;
|
|
30063
30416
|
/**
|
|
30064
30417
|
* @returns a populated transaction for the burn contract function
|
|
30065
30418
|
*/
|
|
@@ -30326,6 +30679,12 @@ declare class ERC721MintByID {
|
|
|
30326
30679
|
* @returns the owner address of a particular tokenId.
|
|
30327
30680
|
*/
|
|
30328
30681
|
ownerOf(provider: Provider$1, tokenId: PromiseOrValue<BigNumberish>, overrides?: CallOverrides): Promise<string>;
|
|
30682
|
+
/**
|
|
30683
|
+
* Returns the current nonce of a given token ID.
|
|
30684
|
+
* @param tokenId The ID of the token for which to retrieve the nonce.
|
|
30685
|
+
* @return Current nonce of the given token.
|
|
30686
|
+
*/
|
|
30687
|
+
nonces(provider: Provider$1, tokenId: PromiseOrValue<BigNumberish>, overrides?: CallOverrides): Promise<BigNumber>;
|
|
30329
30688
|
/**
|
|
30330
30689
|
* @returns the operator allowlist as a string.
|
|
30331
30690
|
*/
|
|
@@ -30355,6 +30714,14 @@ declare class ERC721MintByID {
|
|
|
30355
30714
|
populateApprove(to: PromiseOrValue<string>, tokenId: PromiseOrValue<BigNumberish>, overrides?: Overrides & {
|
|
30356
30715
|
from?: PromiseOrValue<string>;
|
|
30357
30716
|
}): Promise<PopulatedTransaction>;
|
|
30717
|
+
/**
|
|
30718
|
+
* Function to approve by way of owner signature
|
|
30719
|
+
* @param spender the address to approve
|
|
30720
|
+
* @param tokenId the index of the NFT to approve the spender on
|
|
30721
|
+
* @param deadline a timestamp expiry for the permit
|
|
30722
|
+
* @param sig a traditional or EIP-2098 signature
|
|
30723
|
+
*/
|
|
30724
|
+
populatePermit(spender: PromiseOrValue<string>, tokenId: PromiseOrValue<BigNumberish>, deadline: PromiseOrValue<BigNumberish>, sig: PromiseOrValue<BytesLike>, overrides?: CallOverrides): Promise<PopulatedTransaction>;
|
|
30358
30725
|
/**
|
|
30359
30726
|
* @returns a populated transaction for the burn contract function
|
|
30360
30727
|
*/
|