sdk.openformatsdk
Home > @openformat/sdk > OpenFormatSDK
OpenFormatSDK class
Creates a new instance of the Open Format SDK
Signature:
export declare class OpenFormatSDK extends BaseContract
Extends: BaseContract
Example
const sdk = new OpenFormatSDK({
signer: "0x....",
appId: "0x1ade2613adb6bafbc65d40eb9c1effbe3bfd8b81",
network: Chains.polygonMumbai
});
Constructors
| Constructor | Modifiers | Description |
|---|---|---|
| (constructor)(options) | Constructs a new instance of the OpenFormatSDK class |
Properties
| Property | Modifiers | Type | Description |
|---|---|---|---|
| App | App | ||
| defaultOptions | static | SDKOptions | |
| factory | Factory | ||
| options | SDKOptions | ||
| Reward | Reward | ||
| subgraph | Subgraph |
Methods
| Method | Modifiers | Description |
|---|---|---|
| getContract({ contractAddress, type, }) | ||
| setStarId(starId) | Updates the appId of the OpenFormatSDK instance and reinstantiates the App, Reward, Factory, and Subgraph objects with the new appId. |