Skip to main content

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

ConstructorModifiersDescription
(constructor)(options)Constructs a new instance of the OpenFormatSDK class

Properties

PropertyModifiersTypeDescription
AppApp
defaultOptionsstaticSDKOptions
factoryFactory
optionsSDKOptions
RewardReward
subgraphSubgraph

Methods

MethodModifiersDescription
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.