@hypercerts-org/marketplace-sdk 0.1.0 → 0.1.1
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.
@@ -26,9 +26,12 @@ export declare class HypercertExchangeClient {
|
|
26
26
|
* @param chainId Current app chain id
|
27
27
|
* @param provider Ethers provider
|
28
28
|
* @param signer Ethers signer
|
29
|
-
* @param
|
29
|
+
* @param overrides Override contract addresses or api endpoint used
|
30
30
|
*/
|
31
|
-
constructor(chainId: ChainId, provider: Provider, signer?: Signer,
|
31
|
+
constructor(chainId: ChainId, provider: Provider, signer?: Signer, overrides?: {
|
32
|
+
addresses: Addresses;
|
33
|
+
apiEndpoint?: string;
|
34
|
+
});
|
32
35
|
/**
|
33
36
|
* Return the signer it it's set, throw an exception otherwise
|
34
37
|
* @returns Signer
|
package/dist/index.cjs.js
CHANGED
@@ -4910,14 +4910,14 @@ class HypercertExchangeClient {
|
|
4910
4910
|
* @param chainId Current app chain id
|
4911
4911
|
* @param provider Ethers provider
|
4912
4912
|
* @param signer Ethers signer
|
4913
|
-
* @param
|
4913
|
+
* @param overrides Override contract addresses or api endpoint used
|
4914
4914
|
*/
|
4915
|
-
constructor(chainId, provider, signer,
|
4915
|
+
constructor(chainId, provider, signer, overrides) {
|
4916
4916
|
this.chainId = chainId;
|
4917
|
-
this.addresses =
|
4917
|
+
this.addresses = overrides?.addresses ?? addressesByNetwork[this.chainId];
|
4918
4918
|
this.signer = signer;
|
4919
4919
|
this.provider = provider;
|
4920
|
-
this.api = new ApiClient(apiEndpoint);
|
4920
|
+
this.api = new ApiClient(overrides?.apiEndpoint);
|
4921
4921
|
}
|
4922
4922
|
/**
|
4923
4923
|
* Return the signer it it's set, throw an exception otherwise
|
package/dist/index.esm.js
CHANGED
@@ -4908,14 +4908,14 @@ class HypercertExchangeClient {
|
|
4908
4908
|
* @param chainId Current app chain id
|
4909
4909
|
* @param provider Ethers provider
|
4910
4910
|
* @param signer Ethers signer
|
4911
|
-
* @param
|
4911
|
+
* @param overrides Override contract addresses or api endpoint used
|
4912
4912
|
*/
|
4913
|
-
constructor(chainId, provider, signer,
|
4913
|
+
constructor(chainId, provider, signer, overrides) {
|
4914
4914
|
this.chainId = chainId;
|
4915
|
-
this.addresses =
|
4915
|
+
this.addresses = overrides?.addresses ?? addressesByNetwork[this.chainId];
|
4916
4916
|
this.signer = signer;
|
4917
4917
|
this.provider = provider;
|
4918
|
-
this.api = new ApiClient(apiEndpoint);
|
4918
|
+
this.api = new ApiClient(overrides?.apiEndpoint);
|
4919
4919
|
}
|
4920
4920
|
/**
|
4921
4921
|
* Return the signer it it's set, throw an exception otherwise
|