@oceanprotocol/lib 3.4.2 → 3.4.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (72) hide show
  1. package/CHANGELOG.md +9 -0
  2. package/CodeExamples.md +1 -1
  3. package/ComputeExamples.md +2 -2
  4. package/dist/lib.js +1 -1
  5. package/dist/lib.js.map +1 -1
  6. package/dist/lib.modern.js +1 -1
  7. package/dist/lib.modern.js.map +1 -1
  8. package/dist/lib.module.js +1 -1
  9. package/dist/lib.module.js.map +1 -1
  10. package/dist/lib.umd.js +1 -1
  11. package/dist/lib.umd.js.map +1 -1
  12. package/dist/types/@types/Asset.d.ts +148 -0
  13. package/dist/types/@types/Compute.d.ts +71 -0
  14. package/dist/types/@types/Contracts.d.ts +26 -0
  15. package/dist/types/@types/DDO/ConsumerParameter.d.ts +37 -0
  16. package/dist/types/@types/DDO/Credentials.d.ts +8 -0
  17. package/dist/types/@types/DDO/DDO.d.ts +55 -0
  18. package/dist/types/@types/DDO/Event.d.ts +27 -0
  19. package/dist/types/@types/DDO/Metadata.d.ts +141 -0
  20. package/dist/types/@types/DDO/Service.d.ts +106 -0
  21. package/dist/types/@types/Datatoken.d.ts +42 -0
  22. package/dist/types/@types/Dispenser.d.ts +16 -0
  23. package/dist/types/@types/DownloadResponse.d.ts +4 -0
  24. package/dist/types/@types/File.d.ts +89 -0
  25. package/dist/types/@types/FileInfo.d.ts +43 -0
  26. package/dist/types/@types/FixedPrice.d.ts +51 -0
  27. package/dist/types/@types/NFT.d.ts +18 -0
  28. package/dist/types/@types/NFTFactory.d.ts +20 -0
  29. package/dist/types/@types/Provider.d.ts +33 -0
  30. package/dist/types/@types/ReturnTypes.d.ts +3 -0
  31. package/dist/types/@types/Router.d.ts +59 -0
  32. package/dist/types/@types/index.d.ts +20 -0
  33. package/dist/types/config/Config.d.ts +162 -0
  34. package/dist/types/config/ConfigHelper.d.ts +13 -0
  35. package/dist/types/config/index.d.ts +2 -0
  36. package/dist/types/contracts/AccessList.d.ts +85 -0
  37. package/dist/types/contracts/AccessListFactory.d.ts +56 -0
  38. package/dist/types/contracts/Datatoken.d.ts +278 -0
  39. package/dist/types/contracts/Datatoken4.d.ts +72 -0
  40. package/dist/types/contracts/Dispenser.d.ts +73 -0
  41. package/dist/types/contracts/FixedRateExchange.d.ts +209 -0
  42. package/dist/types/contracts/NFT.d.ts +227 -0
  43. package/dist/types/contracts/NFTFactory.d.ts +165 -0
  44. package/dist/types/contracts/Router.d.ts +107 -0
  45. package/dist/types/contracts/SmartContract.d.ts +46 -0
  46. package/dist/types/contracts/SmartContractWithAddress.d.ts +17 -0
  47. package/dist/types/contracts/df/DfRewards.d.ts +31 -0
  48. package/dist/types/contracts/df/DfStrategyV1.d.ts +21 -0
  49. package/dist/types/contracts/index.d.ts +20 -0
  50. package/dist/types/contracts/ve/VeAllocate.d.ts +38 -0
  51. package/dist/types/contracts/ve/VeFeeDistributor.d.ts +29 -0
  52. package/dist/types/contracts/ve/VeFeeEstimate.d.ts +14 -0
  53. package/dist/types/contracts/ve/VeOcean.d.ts +68 -0
  54. package/dist/types/index.d.ts +5 -0
  55. package/dist/types/services/Aquarius.d.ts +53 -0
  56. package/dist/types/services/Provider.d.ts +197 -0
  57. package/dist/types/services/index.d.ts +2 -0
  58. package/dist/types/utils/Assets.d.ts +56 -0
  59. package/dist/types/utils/Constants.d.ts +4 -0
  60. package/dist/types/utils/ContractUtils.d.ts +46 -0
  61. package/dist/types/utils/DatatokenName.d.ts +14 -0
  62. package/dist/types/utils/DdoHelpers.d.ts +13 -0
  63. package/dist/types/utils/FetchHelper.d.ts +14 -0
  64. package/dist/types/utils/General.d.ts +5 -0
  65. package/dist/types/utils/Logger.d.ts +19 -0
  66. package/dist/types/utils/OrderUtils.d.ts +20 -0
  67. package/dist/types/utils/ProviderErrors.d.ts +1 -0
  68. package/dist/types/utils/SignatureUtils.d.ts +12 -0
  69. package/dist/types/utils/TokenUtils.d.ts +70 -0
  70. package/dist/types/utils/index.d.ts +13 -0
  71. package/dist/types/utils/minAbi.d.ts +38 -0
  72. package/package.json +2 -2
@@ -0,0 +1,89 @@
1
+ import { AbiItem } from './Contracts';
2
+ interface FileTypeHeaders {
3
+ [key: string]: string;
4
+ }
5
+ export interface UrlFile {
6
+ type: 'url';
7
+ /**
8
+ * File index.
9
+ * @type {number}
10
+ */
11
+ index?: number;
12
+ /**
13
+ * File URL.
14
+ * @type {string}
15
+ */
16
+ url: string;
17
+ /**
18
+ * HTTP method used
19
+ * @type {string}
20
+ */
21
+ method: string;
22
+ /**
23
+ * Headers key value pairs associated with the asset GET request
24
+ * @type {string}
25
+ */
26
+ headers?: FileTypeHeaders;
27
+ }
28
+ export interface GraphqlQuery {
29
+ type: 'graphql';
30
+ /**
31
+ * @type {number}
32
+ */
33
+ index?: number;
34
+ /**
35
+ * Endpoint URL
36
+ * @type {string}
37
+ */
38
+ url: string;
39
+ /**
40
+ * query
41
+ * @type {string}
42
+ */
43
+ query: string;
44
+ /**
45
+ * Headers key value pairs associated with the asset GET request
46
+ * @type {string}
47
+ */
48
+ headers?: FileTypeHeaders;
49
+ }
50
+ export interface Arweave {
51
+ type: 'arweave';
52
+ /**
53
+ * transactionId
54
+ * @type {string}
55
+ */
56
+ transactionId: string;
57
+ }
58
+ export interface Ipfs {
59
+ type: 'ipfs';
60
+ /**
61
+ * hash
62
+ * @type {string}
63
+ */
64
+ hash: string;
65
+ }
66
+ export interface Smartcontract {
67
+ type: 'smartcontract';
68
+ /**
69
+ * Smartcontract address
70
+ * @type {string}
71
+ */
72
+ address: string;
73
+ /**
74
+ * ChainId
75
+ * @type {number}
76
+ */
77
+ chainId: number;
78
+ /**
79
+ * Function ABI (not the entire smartcontract abi)
80
+ * @type {AbiItem}
81
+ */
82
+ abi: AbiItem;
83
+ }
84
+ export interface Files {
85
+ nftAddress: string;
86
+ datatokenAddress: string;
87
+ files: UrlFile[] | GraphqlQuery[] | Arweave[] | Smartcontract[] | Ipfs[];
88
+ }
89
+ export {};
@@ -0,0 +1,43 @@
1
+ export interface FileInfo {
2
+ /**
3
+ * File URL.
4
+ * @type {string}
5
+ */
6
+ type: string;
7
+ /**
8
+ * File format, if applicable.
9
+ * @type {string}
10
+ * @example "text/csv"
11
+ */
12
+ contentType?: string;
13
+ /**
14
+ * File content length.
15
+ * @type {[type]}
16
+ */
17
+ contentLength?: string;
18
+ /**
19
+ * File index.
20
+ * @type {number}
21
+ */
22
+ index?: number;
23
+ /**
24
+ * File URL.
25
+ * @type {string}
26
+ */
27
+ url?: string;
28
+ /**
29
+ * HTTP method used
30
+ * @type {string}
31
+ */
32
+ method?: string;
33
+ /**
34
+ * Computed file checksum
35
+ * @type {string}
36
+ */
37
+ checksum?: string;
38
+ /**
39
+ * check if file exists
40
+ * @type {boolean}
41
+ */
42
+ valid?: boolean;
43
+ }
@@ -0,0 +1,51 @@
1
+ export interface FreCreationParams {
2
+ fixedRateAddress: string;
3
+ baseTokenAddress: string;
4
+ owner: string;
5
+ marketFeeCollector: string;
6
+ baseTokenDecimals: number;
7
+ datatokenDecimals: number;
8
+ fixedRate: string;
9
+ marketFee: string;
10
+ withMint?: boolean;
11
+ allowedConsumer?: string;
12
+ }
13
+ export interface FreOrderParams {
14
+ exchangeContract: string;
15
+ exchangeId: string;
16
+ maxBaseTokenAmount: string;
17
+ baseTokenAddress: string;
18
+ baseTokenDecimals?: number;
19
+ swapMarketFee: string;
20
+ marketFeeAddress: string;
21
+ }
22
+ export interface PriceAndFees {
23
+ baseTokenAmount: string;
24
+ oceanFeeAmount: string;
25
+ marketFeeAmount: string;
26
+ consumeMarketFeeAmount: string;
27
+ }
28
+ export interface FixedPriceExchange {
29
+ active: boolean;
30
+ exchangeOwner: string;
31
+ datatoken: string;
32
+ baseToken: string;
33
+ fixedRate: string;
34
+ dtDecimals: string;
35
+ btDecimals: string;
36
+ dtBalance: string;
37
+ btBalance: string;
38
+ dtSupply: string;
39
+ btSupply: string;
40
+ withMint: boolean;
41
+ allowedSwapper: string;
42
+ exchangeId?: string;
43
+ }
44
+ export interface FeesInfo {
45
+ opcFee: string;
46
+ marketFee: string;
47
+ marketFeeCollector: string;
48
+ marketFeeAvailable: string;
49
+ oceanFeeAvailable: string;
50
+ exchangeId: string;
51
+ }
@@ -0,0 +1,18 @@
1
+ import { MetadataProof } from '.';
2
+ export interface MetadataAndTokenURI {
3
+ metaDataState: number;
4
+ metaDataDecryptorUrl: string;
5
+ metaDataDecryptorAddress: string;
6
+ flags: string;
7
+ data: string;
8
+ metaDataHash: string;
9
+ tokenId: number;
10
+ tokenURI: string;
11
+ metadataProofs?: MetadataProof[];
12
+ }
13
+ export interface NftRoles {
14
+ manager: boolean;
15
+ deployERC20: boolean;
16
+ updateMetadata: boolean;
17
+ store: boolean;
18
+ }
@@ -0,0 +1,20 @@
1
+ import { ConsumeMarketFee, ProviderFees } from '.';
2
+ export interface Template {
3
+ templateAddress: string;
4
+ isActive: boolean;
5
+ }
6
+ export interface TokenOrder {
7
+ tokenAddress: string;
8
+ consumer: string;
9
+ serviceIndex: number;
10
+ _providerFee: ProviderFees;
11
+ _consumeMarketFee: ConsumeMarketFee;
12
+ }
13
+ export interface NftCreateData {
14
+ name: string;
15
+ symbol: string;
16
+ templateIndex: number;
17
+ tokenURI: string;
18
+ transferable: boolean;
19
+ owner: string;
20
+ }
@@ -0,0 +1,33 @@
1
+ export interface ProviderFees {
2
+ providerFeeAddress: string;
3
+ providerFeeToken: string;
4
+ providerFeeAmount: string;
5
+ v: string;
6
+ r: string;
7
+ s: string;
8
+ providerData: string;
9
+ validUntil: string;
10
+ }
11
+ export interface ProviderInitialize {
12
+ datatoken: string;
13
+ nonce: string;
14
+ computeAddress: string;
15
+ providerFee: ProviderFees;
16
+ }
17
+ export interface ProviderComputeInitialize {
18
+ datatoken?: string;
19
+ validOrder?: string;
20
+ providerFee?: ProviderFees;
21
+ }
22
+ export interface ProviderComputeInitializeResults {
23
+ algorithm?: ProviderComputeInitialize;
24
+ datasets?: ProviderComputeInitialize[];
25
+ }
26
+ export interface ServiceEndpoint {
27
+ serviceName: string;
28
+ method: string;
29
+ urlPath: string;
30
+ }
31
+ export interface UserCustomParameters {
32
+ [key: string]: any;
33
+ }
@@ -0,0 +1,3 @@
1
+ import { BigNumber, providers } from 'ethers';
2
+ export type ReceiptOrEstimate<G extends boolean = false> = G extends false ? providers.TransactionResponse : BigNumber;
3
+ export type ReceiptOrDecimal<G extends boolean = false> = G extends false ? providers.TransactionResponse : number;
@@ -0,0 +1,59 @@
1
+ export interface Operation {
2
+ /**
3
+ * used for FixedRate or Dispenser
4
+ * @type {string}
5
+ */
6
+ exchangeIds: string;
7
+ /**
8
+ * pool Address
9
+ * @type {string}
10
+ */
11
+ source: string;
12
+ /**
13
+ * operation:
14
+ * 0 - swapExactAmountIn
15
+ * 1 - swapExactAmountOut
16
+ * 2 - FixedRateExchange
17
+ * 3 - Dispenser
18
+ * @type {number}
19
+ */
20
+ operation: number;
21
+ /**
22
+ * token in address
23
+ * @type {string}
24
+ */
25
+ tokenIn: string;
26
+ /**
27
+ * when swapExactAmountIn is EXACT amount IN
28
+ * expressed in Wei
29
+ * @type {string | number}
30
+ */
31
+ amountsIn: string | number;
32
+ /**
33
+ * token out address
34
+ * @type {string}
35
+ */
36
+ tokenOut: string;
37
+ /**
38
+ * when swapExactAmountIn is MIN amount OUT
39
+ * expressed in Wei
40
+ * @type {string | number}
41
+ */
42
+ amountsOut: string | number;
43
+ /**
44
+ * max price (only for pools)
45
+ * expressed in Wei
46
+ * @type {string | number}
47
+ */
48
+ maxPrice: string | number;
49
+ /**
50
+ * swap fee amount
51
+ * @type {string}
52
+ */
53
+ swapMarketFee: string;
54
+ /**
55
+ * market fee address to receive fees
56
+ * @type {string}
57
+ */
58
+ marketFeeAddress: string;
59
+ }
@@ -0,0 +1,20 @@
1
+ export * from './DDO/Credentials';
2
+ export * from './DDO/DDO';
3
+ export * from './DDO/Event';
4
+ export * from './DDO/Metadata';
5
+ export * from './DDO/ConsumerParameter';
6
+ export * from './DDO/Service';
7
+ export * from './Asset';
8
+ export * from './Contracts';
9
+ export * from './File';
10
+ export * from './FileInfo';
11
+ export * from './Compute';
12
+ export * from './Datatoken';
13
+ export * from './Dispenser';
14
+ export * from './DownloadResponse';
15
+ export * from './FixedPrice';
16
+ export * from './NFT';
17
+ export * from './NFTFactory';
18
+ export * from './Provider';
19
+ export * from './Router';
20
+ export * from './ReturnTypes';
@@ -0,0 +1,162 @@
1
+ import { AbiItem } from '../@types';
2
+ import { LogLevel } from '../utils';
3
+ type SDK = 'evm' | 'oasis';
4
+ export declare class Config {
5
+ /**
6
+ * Ethereum node URL.
7
+ * @type {string}
8
+ */
9
+ nodeUri?: string;
10
+ /**
11
+ * Address of Provider.
12
+ * @type {string}
13
+ */
14
+ providerAddress?: string;
15
+ /**
16
+ * Metadata Store URL.
17
+ * @type {string}
18
+ */
19
+ metadataCacheUri?: string;
20
+ /**
21
+ * Provider URL.
22
+ * @type {string}
23
+ */
24
+ providerUri?: string;
25
+ /**
26
+ * Web3 Provider.
27
+ * @type {any}
28
+ */
29
+ web3Provider?: any;
30
+ /**
31
+ * Ocean Token address
32
+ * @type {string}
33
+ */
34
+ oceanTokenAddress?: string;
35
+ /**
36
+ * Factory address
37
+ * @type {string}
38
+ */
39
+ nftFactoryAddress?: string;
40
+ /**
41
+ * Router Factory address
42
+ * @type {string}
43
+ */
44
+ routerFactoryAddress?: string;
45
+ /**
46
+ * datatokens ABI
47
+ * @type {string}
48
+ */
49
+ datatokensABI?: AbiItem | AbiItem[];
50
+ /**
51
+ * FixedRateExchangeAddress
52
+ * @type {string}
53
+ */
54
+ fixedRateExchangeAddress?: string;
55
+ /**
56
+ * FixedRateExchangeAddressABI
57
+ * @type {any}
58
+ */
59
+ fixedRateExchangeAddressABI?: AbiItem | AbiItem[];
60
+ /**
61
+ * DispenserAddress
62
+ * @type {string}
63
+ */
64
+ dispenserAddress?: string;
65
+ /**
66
+ * DispenserABI
67
+ * @type {any}
68
+ */
69
+ dispenserABI?: AbiItem | AbiItem[];
70
+ /**
71
+ * OPFCommunityFeeCollector
72
+ * @type {string}
73
+ */
74
+ opfCommunityFeeCollector?: string;
75
+ /**
76
+ * SideStaking address
77
+ * @type {string}
78
+ */
79
+ sideStakingAddress?: string;
80
+ /**
81
+ * block number of the deployment
82
+ * @type {number}
83
+ */
84
+ startBlock?: number;
85
+ /**
86
+ * Log level.
87
+ * @type {boolean | LogLevel}
88
+ */
89
+ verbose?: boolean | LogLevel;
90
+ /**
91
+ * Message shown when the user creates its own token.
92
+ * @type {string}
93
+ */
94
+ authMessage?: string;
95
+ /**
96
+ * Token expiration time in ms.
97
+ * @type {number}
98
+ */
99
+ authTokenExpiration?: number;
100
+ /**
101
+ * Parity config
102
+ * @type {string}
103
+ */
104
+ parityUri?: string;
105
+ threshold?: number;
106
+ /**
107
+ * Chain ID
108
+ * @type {number}
109
+ */
110
+ chainId: number;
111
+ /**
112
+ * Network name ex: mainnet, goerli, polygon
113
+ * @type {string}
114
+ */
115
+ network: string;
116
+ /**
117
+ * Url of the relevant subgraph instance ex: https://subgraph.mainnet.oceanprotocol.com
118
+ * @type {string}
119
+ */
120
+ subgraphUri: string;
121
+ /**
122
+ * Url of the blockchain exporer ex: https://etherscan.io
123
+ * @type {string}
124
+ */
125
+ explorerUri: string;
126
+ /**
127
+ * Ocean toke symbol on the chain, it's used just for convenience to reduce number of calls
128
+ * @type {string}
129
+ */
130
+ oceanTokenSymbol: string;
131
+ /**
132
+ * Specify the transaction Block Timeout
133
+ * @type {number}
134
+ */
135
+ transactionBlockTimeout: number;
136
+ /**
137
+ * Specify the transaction Confirmation Blocks
138
+ * @type {number}
139
+ */
140
+ transactionConfirmationBlocks: number;
141
+ /**
142
+ * Specify the transaction Polling Blocks Timeout
143
+ * @type {number}
144
+ */
145
+ transactionPollingTimeout: number;
146
+ /**
147
+ * Specify the multiplier for the gas fee
148
+ * @type {number}
149
+ */
150
+ gasFeeMultiplier: number;
151
+ veAllocate?: string;
152
+ veOCEAN?: string;
153
+ veDelegation?: string;
154
+ veFeeDistributor?: string;
155
+ veDelegationProxy?: string;
156
+ DFRewards?: string;
157
+ DFStrategyV1?: string;
158
+ veFeeEstimate?: string;
159
+ sdk?: SDK;
160
+ accessListFactory?: string;
161
+ }
162
+ export {};
@@ -0,0 +1,13 @@
1
+ import { Config } from '.';
2
+ export declare const configHelperNetworks: Config[];
3
+ export declare const KNOWN_CONFIDENTIAL_EVMS: number[];
4
+ export declare class ConfigHelper {
5
+ getAddressesFromEnv(network: string, customAddresses?: any): Partial<Config>;
6
+ /**
7
+ * Returns the config object for a specific network supported by the oceanprotocol stack
8
+ * @param {string | number} network the network's chainId or name
9
+ * @param {string} infuraProjectId optional infura project id that will replace the configs node URI
10
+ * @return {Config} Config obhjedct
11
+ */
12
+ getConfig(network: string | number, infuraProjectId?: string): Config;
13
+ }
@@ -0,0 +1,2 @@
1
+ export * from './Config';
2
+ export * from './ConfigHelper';
@@ -0,0 +1,85 @@
1
+ import { Signer } from 'ethers';
2
+ import { AbiItem, ReceiptOrEstimate } from '../@types';
3
+ import { Config } from '../config';
4
+ import { SmartContractWithAddress } from './SmartContractWithAddress';
5
+ export declare class AccessListContract extends SmartContractWithAddress {
6
+ abiEnterprise: AbiItem[];
7
+ getDefaultAbi(): AbiItem[];
8
+ /**
9
+ * Instantiate AccessList class
10
+ * @param {string} address The contract address.
11
+ * @param {Signer} signer The signer object.
12
+ * @param {string | number} [network] Network id or name
13
+ * @param {Config} [config] The configuration object.
14
+ * @param {AbiItem[]} [abi] ABI array of the smart contract
15
+ * @param {AbiItem[]} abiEnterprise Enterprise ABI array of the smart contract
16
+ */
17
+ constructor(address: string, signer: Signer, network?: string | number, config?: Config, abi?: AbiItem[]);
18
+ /**
19
+ * Get Token Uri
20
+ * @return {Promise<string>} Token URI
21
+ */
22
+ getTokenUri(tokenId: number): Promise<string>;
23
+ /**
24
+ * Get Owner
25
+ * @return {Promise<string>} Owner
26
+ */
27
+ getOwner(): Promise<string>;
28
+ /**
29
+ * Get Id
30
+ * @return {Promise<string>} Id
31
+ */
32
+ getId(): Promise<number>;
33
+ /**
34
+ * Get Name of Access list
35
+ * @return {Promise<string>} Name
36
+ */
37
+ getName(): Promise<string>;
38
+ /**
39
+ * Get Symbol of Access list
40
+ * @return {Promise<string>} Symbol
41
+ */
42
+ getSymbol(): Promise<string>;
43
+ /**
44
+ * Get Address Balance for access list token
45
+ * @param {String} address user adress
46
+ * @return {Promise<String>} balance Number of datatokens. Will be converted from wei
47
+ */
48
+ balance(address: string): Promise<string>;
49
+ /**
50
+ * Add address to access list
51
+ * @param {String} user Minter address
52
+ * @param {String} tokenUri tokenURI
53
+ * @param {Boolean} estimateGas if True, return gas estimate
54
+ * @return {Promise<ReceiptOrEstimate>} returns the transaction receipt or the estimateGas value
55
+ */
56
+ mint<G extends boolean = false>(user: string, tokenUri: string, estimateGas?: G): Promise<ReceiptOrEstimate<G>>;
57
+ /**
58
+ * Batch add addresses to the access list
59
+ * @param {String} users Minter addresses
60
+ * @param {String} tokenUris tokenURI
61
+ * @param {Boolean} estimateGas if True, return gas estimate
62
+ * @return {Promise<ReceiptOrEstimate>} returns the transaction receipt or the estimateGas value
63
+ */
64
+ batchMint<G extends boolean = false>(users: Array<string>, tokenUris: Array<string>, estimateGas?: G): Promise<ReceiptOrEstimate<G>>;
65
+ /**
66
+ * Delete address from access list
67
+ * @param {Number} tokenId token ID
68
+ * @param {Boolean} estimateGas if True, return gas estimate
69
+ * @return {Promise<ReceiptOrEstimate>} returns the transaction receipt or the estimateGas value
70
+ */
71
+ burn<G extends boolean = false>(tokenId: number, estimateGas?: G): Promise<ReceiptOrEstimate<G>>;
72
+ /**
73
+ * Transfer Ownership of an access list, called by owner of access list
74
+ * @param {Number} newOwner new owner of the access list
75
+ * @param {Boolean} estimateGas if True, return gas estimate
76
+ * @return {Promise<ReceiptOrEstimate>} returns the transaction receipt or the estimateGas value
77
+ */
78
+ transferOwnership<G extends boolean = false>(newOwner: string, estimateGas?: G): Promise<ReceiptOrEstimate<G>>;
79
+ /**
80
+ * Renounce Ownership of an access list, called by owner of access list
81
+ * @param {Boolean} estimateGas if True, return gas estimate
82
+ * @return {Promise<ReceiptOrEstimate>} returns the transaction receipt or the estimateGas value
83
+ */
84
+ renounceOwnership<G extends boolean = false>(estimateGas?: G): Promise<ReceiptOrEstimate<G>>;
85
+ }
@@ -0,0 +1,56 @@
1
+ import { BigNumber, Signer } from 'ethers';
2
+ import { Config } from '../config';
3
+ import { AbiItem, ReceiptOrEstimate } from '../@types';
4
+ import { SmartContractWithAddress } from './SmartContractWithAddress';
5
+ /**
6
+ * Provides an interface for Access List Factory contract
7
+ */
8
+ export declare class AccesslistFactory extends SmartContractWithAddress {
9
+ getDefaultAbi(): AbiItem[];
10
+ /**
11
+ * Instantiate AccessListFactory class
12
+ * @param {string} address The factory contract address.
13
+ * @param {Signer} signer The signer object.
14
+ * @param {string | number} [network] Network id or name
15
+ * @param {Config} [config] The configuration object.
16
+ * @param {AbiItem[]} [abi] ABI array of the smart contract
17
+ */
18
+ constructor(address: string, signer: Signer, network?: string | number, config?: Config, abi?: AbiItem[]);
19
+ /**
20
+ * Create new Access List Contract
21
+ * @param {string} nameAccessList The name for access list.
22
+ * @param {string} symbolAccessList The symbol for access list.
23
+ * @param {string[]} tokenURI Token URIs list.
24
+ * @param {boolean} transferable Default false, to be soulbound.
25
+ * @param {string} owner Owner of the access list.
26
+ * @param {string[]} user Users of the access lists as addresses.
27
+ * @param {Boolean} [estimateGas] if True, return gas estimate
28
+ * @return {Promise<string|BigNumber>} The transaction hash or the gas estimate.
29
+ */
30
+ deployAccessListContract<G extends boolean = false>(nameAccessList: string, symbolAccessList: string, tokenURI: string[], transferable: boolean, owner: string, user: string[], estimateGas?: G): Promise<G extends false ? string : BigNumber>;
31
+ /**
32
+ * Get Factory Owner
33
+ * @return {Promise<string>} Factory Owner address
34
+ */
35
+ getOwner(): Promise<string>;
36
+ /**
37
+ * Is a list contract soul bound?
38
+ * @param {String} contractAddress list contract address
39
+ * @return {Promise<boolean>} is soulbound?
40
+ */
41
+ isSoulbound(contractAddress: string): Promise<boolean>;
42
+ /**
43
+ * Is a list contract deployed?
44
+ * @param {String} contractAddress list contract address
45
+ * @return {Promise<boolean>} is deployed?
46
+ */
47
+ isDeployed(contractAddress: string): Promise<boolean>;
48
+ /**
49
+ * changeTemplateAddress - only factory Owner
50
+ * @param {String} owner caller address
51
+ * @param {Number} templateAddress address of the template we want to change
52
+ * @param {Boolean} estimateGas if True, return gas estimate
53
+ * @return {Promise<ReceiptOrEstimate>} returns the transaction receipt or the estimateGas value, current token template count
54
+ */
55
+ changeTemplateAddress<G extends boolean = false>(owner: string, templateAddress: string, estimateGas?: G): Promise<ReceiptOrEstimate<G>>;
56
+ }