export declare namespace MeemAPI { interface IError { status: string; code: string; reason: string; friendlyReason: string; } enum HttpMethod { Get = "GET", Post = "POST", Patch = "PATCH", Put = "PUT", Options = "OPTIONS", Delete = "DELETE" } interface IApiResponseBody { apiVersion: string; } interface IApiPaginatedResponseBody extends IApiResponseBody { totalItems: number; itemsPerPage: number; } /** The source of the event. Who emits the event. */ enum EventSource { Server = "server", Client = "client" } interface IEvent { key: string; data?: Record; } type AsyncReturnType Promise> = T extends (...args: any) => Promise ? R : any; interface IRequestPaginated { /** The current page to fetch. Page starts at 0 index */ page?: number; /** The number of records to fetch */ limit?: number; } enum License { Cc0 = "cc0", Unknown = "unknown" } enum MeemMetadataStorageProvider { Git = "git", Ipfs = "ipfs" } interface IWhitelist { [contractAddress: string]: IWhitelistItem; } interface IWhitelistItem { /** The chain for the contract */ chain: Chain; /** Whether all holders are whitelisted */ allAddresses?: boolean; /** Specific addresses to allow mint access for this token (overriden by allAddresses) */ addresses?: string[]; /** The NFT name */ name: string; /** The NFT description */ description: string; /** The name of the original NFT creator */ creator?: string; /** The license */ license: License; /** Link to the license */ licenseURL?: string; /** Description of the T&C */ terms?: string; /** Link to the terms and conditions */ termsURL?: string; /** Link to the NFT website */ websiteURL?: string; } interface IAccessList { addresses: { [address: string]: IAccessAddressListItem; }; tokens: { [address: string]: IWhitelistItem; }; } interface IAccessAddressListItem { /** Whether to allow mint access to all tokens */ allTokens?: boolean; /** Specific tokens to allow mint access (overriden by allTokens) */ tokens?: string[]; } /** The zero address. Used in Meems to denote fields that are not set. */ const zeroAddress = "0x0000000000000000000000000000000000000000"; /** The chain id corresponding to the smart contract */ enum Chain { Ethereum = 0, Polygon = 1, Cardano = 2, Solana = 3, Rinkeby = 4 } /** The permission type corresponding to the smart contract */ enum PermissionType { Copy = 0, Remix = 1, Read = 2 } /** The Meem type */ enum MeemType { Original = 0, Copy = 1, Remix = 2, Wrapped = 3 } /** The permission corresponding to the smart contract */ enum Permission { Anyone = 0, Addresses = 1, Holders = 2 } /** The propety type corresponding to the smart contract */ enum PropertyType { Meem = 0, Child = 1 } /** Various eth-like chains and their corresponding ids */ enum NetworkChainId { Mainnet = 1, Rinkeby = 4, Polygon = 137, Mumbai = 80001 } /** The network name as expected by ethers.providers.InfuraProvider */ enum NetworkName { Mainnet = "homestead", Rinkeby = "rinkeby", Polygon = "matic", Mumbai = "mumbai", Hardhat = "hardhat" } enum UriSource { TokenUri = 0, Data = 1 } /** Convert Chain to NetworkName */ const chainToNetworkName: (chain: Chain) => NetworkName; /** Convert NetworkName to Chain */ const networkNameToChain: (networkName: NetworkName) => Chain; /** Convert Chain to friendly, readable network name */ const chainToFriendlyNetworkName: (chain: Chain) => "Ethereum" | "Rinkeby" | "Polygon"; /** A single split */ interface IMeemSplit { toAddress: string; amount: number; lockedBy: string; } interface IMeemMetadataLike { meem_metadata_type: string; meem_metadata_version: string; [key: string]: any; } enum OpenSeaDisplayType { Number = "number", BoostNumber = "boost_number", BoostPercentage = "boost_percentage" } interface IOpenseaStringTrait { trait_type?: string; value: string; } /** * For numeric traits, OpenSea currently supports three different options, number (lower right in the image below), boost_percentage (lower left in the image above), and boost_number (similar to boost_percentage but doesn't show a percent sign). If you pass in a value that's a number and you don't set a display_type, the trait will appear in the Rankings section (top right in the image above). * * Adding an optional max_value sets a ceiling for a numerical trait's possible values. It defaults to the maximum that OpenSea has seen so far on the assets on your contract. If you set a max_value, make sure not to pass in a higher value. * */ interface IOpenseaNumericTrait { display_type?: OpenSeaDisplayType; trait_type?: string; value: number; max_value?: number; } /** OpenSea also supports a date display_type. Traits of this type will appear in the right column near "Rankings" and "Stats." Pass in a unix timestamp as the value. */ interface IOpenseaDateTrait { display_type: 'date'; trait_type: string; value: number; } interface IEnjinProperties { [propertyName: string]: string | { name: string; value: string | number | string[] | number[]; [additionalProperties: string]: string | number | string[] | number[] | Record; }; } /** Based on Opensea metadata standards: https://docs.opensea.io/docs/metadata-standards */ interface IMeemPermission { permission: Permission; addresses: string[]; /** BigNumber hex string */ numTokens: string; costWei: string; mintStartTimestamp: string; mintEndTimestamp: string; merkleRoot: string; } interface IMeemProperties { /** BigNumber hex string */ totalCopies: string; totalCopiesLockedBy: string; totalRemixes: string; totalRemixesLockedBy: string; /** BigNumber hex string */ copiesPerWallet: string; copiesPerWalletLockedBy: string; remixesPerWallet: string; remixesPerWalletLockedBy: string; copyPermissions: IMeemPermission[]; remixPermissions: IMeemPermission[]; readPermissions: IMeemPermission[]; copyPermissionsLockedBy: string; remixPermissionsLockedBy: string; readPermissionsLockedBy: string; splits: IMeemSplit[]; splitsLockedBy: string; isTransferrable: boolean; isTransferrableLockedBy: string; mintStartAt: number; mintEndAt: number; mintDatesLockedBy: string; transferLockupUntil: number; transferLockupUntilLockedBy: string; } interface IAgreementBaseProperties { /** BigNumber hex string */ totalOriginalsSupply: string; totalOriginalsSupplyLockedBy: string; mintPermissions: IMeemPermission[]; mintPermissionsLockedBy: string; splits: IMeemSplit[]; splitsLockedBy: string; /** BigNumber hex string */ originalsPerWallet: string; originalsPerWalletLockedBy: string; isTransferrable: boolean; isTransferrableLockedBy: string; mintStartAt: number; mintEndAt: number; mintDatesLockedBy: string; transferLockupUntil: number; transferLockupUntilLockedBy: string; } interface IAgreementInitParams { symbol?: string; name: string; contractURI: string; admins: string[]; minters: string[]; maxSupply: string; isMaxSupplyLocked: boolean; mintPermissions: IMeemPermission[]; splits: IMeemSplit[]; isTransferLocked: boolean; } interface IMeem { tokenId: string; /** Address of the token owner */ owner: string; tokenURI?: string; parentChain: Chain; parent: string; /** BigNumber hex string */ parentTokenId: string; generation: number; rootChain: Chain; root: string; /** BigNumber hex string */ rootTokenId: string; properties: IMeemProperties; childProperties: IMeemProperties; /** Unix timestamp of when the Meem was minted */ mintedAt: number; /** Will be a non-zero address if locked */ uriLockedBy: string; uriSource: UriSource; meemType: MeemType; mintedBy: string; reactionTypes: string[]; } interface IReaction { /** Address that reacted */ address: string; /** Type of reaction */ reaction: string; /** Unix timestamp of when the reaction occurred */ reactedAt: number; /** The associated MeemIdentification if the user has a MeemID */ MeemIdentificationId: string | null; } interface IMetadataMeem extends IMeem { reactionCounts: { [reaction: string]: number; }; numCopies: number; numRemixes: number; addressReactions?: IReaction[]; metadata: IMeemMetadataLike; defaultTwitterUser?: { id: string; username: string; displayName: string; profileImageUrl: string | null; }; } interface IERC721Metadata { [key: string]: any; } interface IAgreementRoleExtensionMetadata { [key: string]: any; } enum AgreementExtensionVisibility { /** Anyone can view the integration */ Anyone = "anyone", /** Users that are token-holders of the same agreement */ TokenHolders = "token-holders" } interface INFT { /** The address of the contract of the NFT */ tokenAddress: string; /** The token id of the NFT */ tokenId: string; /** The type of NFT contract standard */ contractType: string; /** The address of the owner of the NFT */ ownerOf: string; /** The blocknumber when the amount or owner changed */ blockNumber: string; /** The blocknumber when the NFT was minted */ blockNumberMinted: string; /** The uri to the metadata of the token */ tokenUri?: string; /** The metadata of the token */ metadata?: string; /** When the metadata was last updated */ syncedAt?: string; /** The number of this item the user owns (used by ERC1155) */ amount?: string; /** The name of the Token contract */ name: string; /** The symbol of the NFT contract */ symbol: string; } interface IChainNFTsResult { total: number; page: number; pageSize: number; chain: Chain; nfts: INFT[]; } interface IMeemId { /** List of wallet addresses */ wallets: string[]; /** List of twitter IDs */ twitters: string[]; /** The default twitter id to use for this MeemId */ defaultTwitter: string; /** The default wallet to use for this MeemId */ defaultWallet: string; /** Whether the user has gone through the onboarding process */ hasOnboarded: boolean; meemPass: { twitter: { hasApplied: boolean; isWhitelisted: boolean; tweetsPerDayQuota: number; }; isAdmin: boolean; }; } enum IUserIdentityVisibility { /** Anyone can view the integration */ Anyone = "anyone", /** Users that are token-holders of the same agreement */ TokenHolders = "token-holders", /** Private. Only the current user can view */ JustMe = "just-me" } interface ITransfer { from: string; to: string; transactionHash: string; timestamp: number; } interface ICollectorResult { owner: string; edition: number; tokenId: string; twitter?: { id: string; username: string; displayName: string; profileImageUrl: string | null; }; } interface IClipping { /** The wallet address that clipped */ address: string; /** Whether the clipper has a MeemId */ hasMeemId: boolean; /** Timestamp of when the item was clipped */ clippedAt: number; /** The Meem tokenId that was clipped */ tokenId: string; } /** Includes full Meem metadata */ interface IClippingExtended extends IClipping { meem?: IMetadataMeem; } enum SortOrder { Asc = "asc", Desc = "desc" } const defaultReactionTypes: string[]; enum ContractType { Regular = "regular", DiamondProxy = "diamondProxy", DiamondFacet = "diamondFacet" } interface IMeemUser { id: string; displayName: string; profilePicUrl: string; DefaultWalletId: string; Wallets: { id: string; address: string; ens: string; }[]; DefaultWallet: { id: string; address: string; ens: string; }; } interface IAgreementRole { id: string; name: string; isAdminRole: boolean; AgreementId: string; members: IMeemUser[]; } interface IGuild { id: number; name: string; guildPlatforms: { id: number; platformId: number; platformGuildId: string; platformGuildData?: any; platformGuildName?: string; invite?: string; }[]; } interface IDiscordServer { id: string; name: string; icon: string; owner: boolean; guildData: { connectedGuildId: number; serverIcon: string; serverName: string; serverId: string; categories: { id: string; name: string; channels: { id: string; name: string; roles: any[]; }[]; }[]; roles: { guild: string; icon: string | null; unicodeEmoji: string | null; id: string; name: string; }[]; isAdmin: boolean; membersWithoutRole: number; channels: { id: string; name: string; }[]; }; } enum TransactionStatus { Pending = "pending", Success = "success", Failure = "failure" } enum QueueEvent { CallContract = "callContract", DeployContract = "deployContract", DiamondCut = "diamondCut", CreateTablelandTable = "createTablelandTable" } enum StorageDataType { Integer = "INTEGER", Text = "TEXT" } enum StorageType { Tableland = "tableland" } enum ExtensionCategory { Basics = "basics", Communications = "communications", Commerce = "commerce", Finance = "finance", Organization = "organization", Publishing = "publishing", RoleManagement = "roleManagement", SocialMedia = "socialMedia" } enum ExtensionCapability { Link = "link", DApp = "dapp", Auth = "auth", Widget = "widget" } interface IExtensionStorageDefinition { tableland?: { tables?: [ { name: string; schema: { [columnName: string]: StorageDataType; }; permissions: { adminRoleContract: string; canInsert: boolean; insertRoleContract: string; canUpdate: boolean; updateRoleContract: string; canDelete: boolean; deleteRoleContract: string; updateableColumns: string[]; }; } ]; }; } interface IExtensionWidgetDefinition { widgets: { metadata: Record; visibility: AgreementExtensionVisibility; }[]; } interface IAgreementExtensionMetadata { externalUrl?: string; tableland?: { /** The extension table name */ [extensionTableName: string]: { /** The tableland table name */ tablelandTableName: string; /** The tableland table id */ tableId: string; }; }; transactions?: { /** The Transaction id */ TransactionId: string; status: TransactionStatus; }[]; [key: string]: any; } namespace v1 { namespace GenerateTypes { interface IPathParams { } const path: () => string; const method = HttpMethod.Post; interface IQueryParams { } interface IRequestBody { abi?: Record[]; bundleId?: string; name?: string; } interface IResponseBody extends IApiResponseBody { abi: Record[]; types: string; } interface IDefinition { pathParams: IPathParams; queryParams: IQueryParams; requestBody: IRequestBody; responseBody: IResponseBody; } type Response = IResponseBody | IError; } /** Get Config */ namespace GetConfig { interface IPathParams { } const path: () => string; const method = HttpMethod.Get; interface IQueryParams { } interface IRequestBody { } interface IResponseBody extends IApiResponseBody { } interface IDefinition { pathParams: IPathParams; queryParams: IQueryParams; requestBody: IRequestBody; responseBody: IResponseBody; } type Response = IResponseBody | IError; } /** Get Info about Token */ namespace GetIPFSFile { interface IPathParams { } const path: () => string; const method = HttpMethod.Get; interface IQueryParams { filename: string; } interface IRequestBody { } interface IResponseBody extends IApiResponseBody { } interface IDefinition { pathParams: IPathParams; queryParams: IQueryParams; requestBody: IRequestBody; responseBody: IResponseBody; } type Response = IResponseBody | IError; } /** Generate nonce for client to sign and verify a user's wallet address */ namespace GetNonce { interface IPathParams { } const path: () => string; const method = HttpMethod.Get; interface IQueryParams { /** The address that will be signing */ address: string; } interface IRequestBody { } interface IResponseBody extends IApiResponseBody { nonce: string; } interface IDefinition { pathParams: IPathParams; queryParams: IQueryParams; requestBody: IRequestBody; responseBody: IResponseBody; } type Response = IResponseBody | IError; } /** Log in a user. */ namespace Login { interface IPathParams { } const path: () => string; const method = HttpMethod.Post; interface IQueryParams { } interface IRequestBody { /** Login w/ access token provided by Auth0 magic link */ accessToken?: string; /** Login w/ wallet. Both message and signature must be provided */ message?: string; /** Login w/ wallet. Both message and signature must be provided */ signature?: string; /** Whether to connect the login method with the currently authenticated user */ shouldConnectUser?: boolean; } interface IResponseBody extends IApiResponseBody { /** JWT that can be used for future authentication */ jwt: string; } interface IDefinition { pathParams: IPathParams; queryParams: IQueryParams; requestBody: IRequestBody; responseBody: IResponseBody; } type Response = IResponseBody | IError; } /** Bulk mint agreement role tokens */ namespace BulkBurnAgreementRoleTokens { interface IPathParams { /** The id of the agreement */ agreementId: string; /** The id of the agreement role */ agreementRoleId: string; } const path: (options: IPathParams) => string; const method = HttpMethod.Post; interface IQueryParams { } interface IRequestBody { tokenIds: string[]; } interface IResponseBody extends IApiResponseBody { /** The Transaction id */ txId: string; } interface IDefinition { pathParams: IPathParams; queryParams: IQueryParams; requestBody: IRequestBody; responseBody: IResponseBody; } type Response = IResponseBody | IError; } /** Bulk mint agreement tokens */ namespace BulkBurnAgreementTokens { interface IPathParams { /** The id of the agreement */ agreementId: string; } const path: (options: IPathParams) => string; const method = HttpMethod.Post; interface IQueryParams { } interface IRequestBody { tokenIds: string[]; } interface IResponseBody extends IApiResponseBody { /** The Transaction id */ txId: string; } interface IDefinition { pathParams: IPathParams; queryParams: IQueryParams; requestBody: IRequestBody; responseBody: IResponseBody; } type Response = IResponseBody | IError; } /** Bulk mint agreement role tokens */ namespace BulkMintAgreementRoleTokens { interface IPathParams { /** The id of the agreement */ agreementId: string; /** The id of the agreement role */ agreementRoleId: string; } const path: (options: IPathParams) => string; const method = HttpMethod.Post; interface IQueryParams { } interface IRequestBody { tokens: { /** Token metadata */ metadata?: IMeemMetadataLike; /** The address where the token will be minted to. */ to: string; }[]; } interface IResponseBody extends IApiResponseBody { /** The Transaction id */ txId: string; } interface IDefinition { pathParams: IPathParams; queryParams: IQueryParams; requestBody: IRequestBody; responseBody: IResponseBody; } type Response = IResponseBody | IError; } /** Bulk mint agreement tokens */ namespace BulkMintAgreementTokens { interface IPathParams { /** The id of the agreement */ agreementId: string; } const path: (options: IPathParams) => string; const method = HttpMethod.Post; interface IQueryParams { } interface IRequestBody { tokens: { /** The token metadata */ metadata?: IMeemMetadataLike; /** The address where the token will be minted */ to: string; }[]; } interface IResponseBody extends IApiResponseBody { /** The Transaction id */ txId: string; } interface IDefinition { pathParams: IPathParams; queryParams: IQueryParams; requestBody: IRequestBody; responseBody: IResponseBody; } type Response = IResponseBody | IError; } /** Checks if the current user is an Agreement admin either by holding the Admin token or having the admin role on the contract */ namespace CheckIsAgreementAdmin { interface IPathParams { /** The id of the agreement */ agreementId: string; } const path: (options: IPathParams) => string; const method = HttpMethod.Get; interface IQueryParams { } interface IRequestBody { } interface IResponseBody extends IApiResponseBody { isAdmin: boolean; } interface IDefinition { pathParams: IPathParams; queryParams: IQueryParams; requestBody: IRequestBody; responseBody: IResponseBody; } type Response = IResponseBody | IError; } /** Create an agreement contract. */ namespace CreateAgreement { interface IPathParams { } const path: () => string; const method = HttpMethod.Post; interface IQueryParams { } interface IRequestBody { /** The name of the contract */ name: string; /** Agreement contract metadata */ metadata: IMeemMetadataLike; /** The contract chain id */ chainId: number; /** The max number of tokens */ maxSupply: string; /** Whether the max number of tokens is locked */ isMaxSupplyLocked?: boolean; /** The contract symbol. If omitted, will use slug generated from name. */ symbol?: string; /** Contract admin addresses */ admins?: string[]; /** Special minter permissions */ minters?: string[]; /** Minting permissions */ mintPermissions?: Omit[]; /** Splits for minting / transfers */ splits?: IMeemSplit[]; /** Whether tokens can be transferred */ isTransferLocked?: boolean; /** If true, will mint a token to the admin wallet addresses and any addresses in the members parameter */ shouldMintTokens?: boolean; /** Additional non-admin member addresses that will receive tokens if shouldMintTokens is true */ members?: string[]; /** Token metadata to use if shouldMintTokens is true */ tokenMetadata?: IMeemMetadataLike; /** If true, will create an admin role contract and set it as the admin contract for this agreement */ shouldCreateAdminRole?: boolean; } interface IResponseBody extends IApiResponseBody { /** The Transaction id for deploying the contract. Transaction #1 */ deployContractTxId: string; /** The Transaction id for initializing the contract. Transaction #2 */ cutTxId: string; /** The Transaction id for minting tokens. Transaction #3 */ mintTxId?: string; /** The Transaction id for deploying the admin role contract. Transaction #4 */ adminRoleDeployContractTxId?: string; /** The Transaction id for initializing the admin role contract. Transaction #5 */ adminRoleCutTxId?: string; /** The Transaction id for setting the role contract as the admin contract on the agreement. Transaction #6 */ adminRoleSetAdminContractTxId?: string; /** The Transaction id for minting admin role tokens. Transaction #7 */ adminRoleMintTxId?: string; } interface IDefinition { pathParams: IPathParams; queryParams: IQueryParams; requestBody: IRequestBody; responseBody: IResponseBody; } type Response = IResponseBody | IError; } /** Create an agreement extension */ namespace CreateAgreementExtension { interface IPathParams { /** The id of the agreement */ agreementId: string; } const path: (options: IPathParams) => string; const method = HttpMethod.Post; interface IQueryParams { } interface IRequestBody { /** The id of the extension to enable */ extensionId: string; /** Whether the extension initialization is complete */ isInitialized?: boolean; /** Whether the extension setup is complete */ isSetupComplete?: boolean; /** Optional metadata associated with this extension */ metadata?: { [key: string]: any; }; /** Optional external link associated with this extension */ externalLink?: { /** Url for the link */ url: string; /** The link label */ label?: string; /** Visibility of the link extension */ visibility?: AgreementExtensionVisibility; }; /** Optional widget data associated with this extension */ widget?: { /** Metadata associated with the extension widget */ metadata?: IMeemMetadataLike; /** Visibility of the widget extension */ visibility?: AgreementExtensionVisibility; }; } interface IResponseBody extends IApiResponseBody { status: 'success'; /** The Transaction ids that must be completed as part of creating the extension. May be empty if no transactions are required. */ txIds: string[]; } interface IDefinition { pathParams: IPathParams; queryParams: IQueryParams; requestBody: IRequestBody; responseBody: IResponseBody; } type Response = IResponseBody | IError; } /** Create an agreement role contract */ namespace CreateAgreementRole { interface IPathParams { /** The id of the agreement */ agreementId: string; } const path: (options: IPathParams) => string; const method = HttpMethod.Post; interface IQueryParams { } interface IRequestBody { /** The name of the agreement role contract */ name: string; /** Agreement role contract metadata */ metadata: IMeemMetadataLike; /** The max number of tokens */ maxSupply: string; /** Whether the max supply is locked */ isMaxSupplyLocked?: boolean; /** The contract symbol. If omitted, will use slug generated from name */ symbol?: string; /** Splits for minting / transfers */ splits?: IMeemSplit[]; /** Whether tokens can be transferred */ isTransferLocked?: boolean; /** If true, will mint a token to the admin wallet addresses and any addresses in the members parameter */ shouldMintTokens?: boolean; /** Additional non-admin member addresses that will receive tokens if shouldMintTokens is true */ members?: string[]; /** Token metadata to use if shouldMintTokens is true */ tokenMetadata?: IMeemMetadataLike; } interface IResponseBody extends IApiResponseBody { /** The Transaction id for deploying the contract. Transaction #1 */ deployContractTxId: string; /** The Transaction id for initializing the contract. Transaction #2 */ cutTxId: string; /** The Transaction id for minting tokens. Transaction #3 */ mintTxId?: string; } interface IDefinition { pathParams: IPathParams; queryParams: IQueryParams; requestBody: IRequestBody; responseBody: IResponseBody; } type Response = IResponseBody | IError; } /** Create an agreement safe */ namespace CreateAgreementSafe { interface IPathParams { agreementId: string; } const path: (options: IPathParams) => string; const method = HttpMethod.Post; interface IQueryParams { } interface IRequestBody { /** Addresses of the safe owners */ safeOwners: string[]; /** Chain id of the safe */ chainId?: number; /** The number of signatures required */ threshold?: number; } interface IResponseBody extends IApiResponseBody { /** The Transaction id */ txId: string; } interface IDefinition { pathParams: IPathParams; queryParams: IQueryParams; requestBody: IRequestBody; responseBody: IResponseBody; } type Response = IResponseBody | IError; } /** Delete an agreement role contract */ namespace DeleteAgreementRole { interface IPathParams { /** The id of the agreement */ agreementId: string; /** The id of the agreement role */ agreementRoleId: string; } const path: (options: IPathParams) => string; const method = HttpMethod.Delete; interface IQueryParams { } interface IRequestBody { } interface IResponseBody extends IApiResponseBody { status: 'success'; } interface IDefinition { pathParams: IPathParams; queryParams: IQueryParams; requestBody: IRequestBody; responseBody: IResponseBody; } type Response = IResponseBody | IError; } /** Get an agreement role */ namespace GetAgreementRole { interface IPathParams { /** The id of the agreement */ agreementId: string; /** The id of the agreement role */ agreementRoleId: string; } const path: (options: IPathParams) => string; const method = HttpMethod.Get; interface IQueryParams { } interface IRequestBody { } interface IResponseBody extends IApiResponseBody { role: IAgreementRole; } interface IDefinition { pathParams: IPathParams; queryParams: IQueryParams; requestBody: IRequestBody; responseBody: IResponseBody; } type Response = IResponseBody | IError; } namespace GetAgreementRoles { interface IPathParams { /** The Agreement id to fetch roles of */ agreementId: string; } const path: (options: IPathParams) => string; const method = HttpMethod.Get; interface IQueryParams { } interface IRequestBody { } interface IResponseBody extends IApiResponseBody { roles: any[]; } interface IDefinition { pathParams: IPathParams; queryParams: IQueryParams; requestBody: IRequestBody; responseBody: IResponseBody; } type Response = IResponseBody | IError; } /** Get agreement minting proof */ namespace GetMintingProof { interface IPathParams { /** The id of the agreement */ agreementId: string; } const path: (options: IPathParams) => string; const method = HttpMethod.Get; interface IQueryParams { } interface IRequestBody { } interface IResponseBody extends IApiResponseBody { proof: string[]; } interface IDefinition { pathParams: IPathParams; queryParams: IQueryParams; requestBody: IRequestBody; responseBody: IResponseBody; } type Response = IResponseBody | IError; } /** Check if agreement slug is available */ namespace IsSlugAvailable { interface IPathParams { } const path: (options: IPathParams) => string; const method = HttpMethod.Post; interface IQueryParams { } interface IRequestBody { /** New agreement slug to check */ slug: string; /** The chain id of new agreement */ chainId: number; } interface IResponseBody extends IApiResponseBody { isSlugAvailable: boolean; } interface IDefinition { pathParams: IPathParams; queryParams: IQueryParams; requestBody: IRequestBody; responseBody: IResponseBody; } type Response = IResponseBody | IError; } /** Reinitialize an agreement contract */ namespace ReInitializeAgreement { interface IPathParams { /** The id of the agreement */ agreementId: string; } const path: (options: IPathParams) => string; const method = HttpMethod.Post; interface IQueryParams { } interface IRequestBody { /** The name of the contract */ name?: string; /** The max number of tokens */ maxSupply?: string; /** Agreement contract metadata */ metadata?: IMeemMetadataLike; /** The contract symbol. If omitted, will use slug generated from name */ symbol?: string; /** Contract admin addresses */ admins?: string[]; /** Special minter permissions */ minters?: string[]; /** Minting permissions */ mintPermissions?: Omit[]; /** Splits for minting / transfers */ splits?: IMeemSplit[]; /** Whether tokens can be transferred */ isTransferLocked?: boolean; } interface IResponseBody extends IApiResponseBody { /** The Transaction id for updating the contract */ txId: string; } interface IDefinition { pathParams: IPathParams; queryParams: IQueryParams; requestBody: IRequestBody; responseBody: IResponseBody; } type Response = IResponseBody | IError; } /** Reinitialize an agreement contract */ namespace ReInitializeAgreementRole { interface IPathParams { /** The id of the agreement */ agreementId: string; /** The id of the agreement role */ agreementRoleId: string; } const path: (options: IPathParams) => string; const method = HttpMethod.Post; interface IQueryParams { } interface IRequestBody { /** The name of the contract */ name?: string; /** The max number of tokens */ maxSupply?: string; /** Agreement role contract metadata */ metadata?: IMeemMetadataLike; /** The contract symbol. If omitted, will use slug generated from name */ symbol?: string; /** Splits for minting / transfers */ splits?: IMeemSplit[]; /** Whether tokens can be transferred */ isTransferLocked?: boolean; } interface IResponseBody extends IApiResponseBody { /** The Transaction id for updating the contract */ txId: string; } interface IDefinition { pathParams: IPathParams; queryParams: IQueryParams; requestBody: IRequestBody; responseBody: IResponseBody; } type Response = IResponseBody | IError; } /** Set the agreement admin role */ namespace SetAgreementAdminRole { interface IPathParams { /** The id of the agreement */ agreementId: string; } const path: (options: IPathParams) => string; const method = HttpMethod.Patch; interface IQueryParams { } interface IRequestBody { /** The id of the agreement role to set as admin role */ adminAgreementRoleId: string; } interface IResponseBody extends IApiResponseBody { /** The Transaction id */ txId: string; } interface IDefinition { pathParams: IPathParams; queryParams: IQueryParams; requestBody: IRequestBody; responseBody: IResponseBody; } } /** Set the agreement safe address */ namespace SetAgreementSafeAddress { interface IPathParams { agreementId: string; } const path: (options: IPathParams) => string; const method = HttpMethod.Patch; interface IQueryParams { } interface IRequestBody { /** The safe address */ address: string; /** Chain id of the safe */ chainId?: number; } interface IResponseBody extends IApiResponseBody { status: 'success'; } interface IDefinition { pathParams: IPathParams; queryParams: IQueryParams; requestBody: IRequestBody; responseBody: IResponseBody; } type Response = IResponseBody | IError; } /** Update off-chain agreement data */ namespace UpdateAgreement { interface IPathParams { /** The id of the agreement */ agreementId: string; } const path: (options: IPathParams) => string; const method = HttpMethod.Patch; interface IQueryParams { } interface IRequestBody { /** Whether the agreement is launched and visible to members */ isLaunched: boolean; } interface IResponseBody extends IApiResponseBody { status: 'success'; } interface IDefinition { pathParams: IPathParams; queryParams: IQueryParams; requestBody: IRequestBody; responseBody: IResponseBody; } type Response = IResponseBody | IError; } /** Update an agreement extension */ namespace UpdateAgreementExtension { interface IPathParams { /** The id of the agreement */ agreementId: string; /** The agreement extension id */ agreementExtensionId: string; } const path: (options: IPathParams) => string; const method = HttpMethod.Put; interface IQueryParams { } interface IRequestBody { /** Whether the extension initialization is complete */ isInitialized?: boolean; /** Whether the extension setup is complete */ isSetupComplete?: boolean; /** Optional metadata associated with this extension */ metadata?: { [key: string]: any; } | null; /** Optional external link associated with this extension */ externalLink?: { /** Url for the link */ url: string; /** The link label */ label?: string; /** Whether link should be enabled */ isEnabled?: boolean; /** Visibility of the extension link */ visibility?: AgreementExtensionVisibility; } | null; /** Optional widget data associated with this extension */ widget?: { /** Metadata associated with the extension widget */ metadata?: IMeemMetadataLike; /** Whether widget should be enabled */ isEnabled?: boolean; /** Visibility of the extension widget */ visibility?: AgreementExtensionVisibility; } | null; } interface IResponseBody extends IApiResponseBody { status: 'success'; } interface IDefinition { pathParams: IPathParams; queryParams: IQueryParams; requestBody: IRequestBody; responseBody: IResponseBody; } type Response = IResponseBody | IError; } /** Upgrade an agreement contract */ namespace UpgradeAgreement { interface IPathParams { agreementId: string; } const path: (options: IPathParams) => string; const method = HttpMethod.Post; interface IQueryParams { } interface IRequestBody { /** Specify the bundle id to upgrade to. Defaults to latest Agreements bundle */ bundleId?: string; } interface IResponseBody extends IApiResponseBody { /** The Transaction id */ txId: string; } interface IDefinition { pathParams: IPathParams; queryParams: IQueryParams; requestBody: IRequestBody; responseBody: IResponseBody; } type Response = IResponseBody | IError; } /** Upgrade an agreement role contract */ namespace UpgradeAgreementRole { interface IPathParams { /** The id of the agreement */ agreementId: string; /** The id of the agreement role */ agreementRoleId: string; } const path: (options: IPathParams) => string; const method = HttpMethod.Post; interface IQueryParams { } interface IRequestBody { /** Specify the bundle id to upgrade to. Defaults to latest Agreements bundle */ bundleId?: string; } interface IResponseBody extends IApiResponseBody { /** The Transaction id */ txId: string; } interface IDefinition { pathParams: IPathParams; queryParams: IQueryParams; requestBody: IRequestBody; responseBody: IResponseBody; } type Response = IResponseBody | IError; } namespace AuthenticateWithDiscord { interface IPathParams { } const path: (options: IPathParams) => string; const method = HttpMethod.Post; interface IQueryParams { } interface IRequestBody { /** The Discord authentication code */ authCode: string; /** The Discord authentication callback url */ redirectUri: string; } interface IResponseBody extends IApiResponseBody { user: { [key: string]: any; }; accessToken: string; } interface IDefinition { pathParams: IPathParams; queryParams: IQueryParams; requestBody: IRequestBody; responseBody: IResponseBody; } type Response = IResponseBody | IError; } namespace GetDiscordServers { interface IPathParams { } const path: (options: IPathParams) => string; const method = HttpMethod.Get; interface IQueryParams { accessToken: string; } interface IRequestBody { /** The Discord authentication code */ authCode: string; /** The Discord authentication callback url */ redirectUri: string; } interface IResponseBody extends IApiResponseBody { discordServers: IDiscordServer[]; } interface IDefinition { pathParams: IPathParams; queryParams: IQueryParams; requestBody: IRequestBody; responseBody: IResponseBody; } type Response = IResponseBody | IError; } namespace CreateBundle { interface IPathParams { } const path: () => string; const method = HttpMethod.Post; interface IQueryParams { } interface IRequestBody { name: string; description: string; contracts: { id: string; functionSelectors: string[]; }[]; } interface IResponseBody extends IApiResponseBody { bundleId: string; types: string; abi: Record[]; } interface IDefinition { pathParams: IPathParams; queryParams: IQueryParams; requestBody: IRequestBody; responseBody: IResponseBody; } type Response = IResponseBody | IError; } namespace CreateContract { interface IPathParams { } const path: () => string; const method = HttpMethod.Post; interface IQueryParams { } interface IRequestBody { name: string; description: string; contractType: ContractType; abi: any[]; bytecode: string; } interface IResponseBody extends IApiResponseBody { status: 'success'; contractId: string; } interface IDefinition { pathParams: IPathParams; queryParams: IQueryParams; requestBody: IRequestBody; responseBody: IResponseBody; } type Response = IResponseBody | IError; } namespace TrackContractInstance { interface IPathParams { } const path: () => string; const method = HttpMethod.Post; interface IQueryParams { } interface IRequestBody { address: string; chainId: number; } interface IResponseBody extends IApiResponseBody { status: 'success'; } interface IDefinition { pathParams: IPathParams; queryParams: IQueryParams; requestBody: IRequestBody; responseBody: IResponseBody; } type Response = IResponseBody | IError; } namespace UntrackContractInstance { interface IPathParams { contractInstanceId: string; } const path: (options: IPathParams) => string; const method = HttpMethod.Delete; interface IQueryParams { } interface IRequestBody { } interface IResponseBody extends IApiResponseBody { status: 'success'; } interface IDefinition { pathParams: IPathParams; queryParams: IQueryParams; requestBody: IRequestBody; responseBody: IResponseBody; } type Response = IResponseBody | IError; } namespace UpdateBundle { interface IPathParams { bundleId: string; } const path: (options: IPathParams) => string; const method = HttpMethod.Put; interface IQueryParams { } interface IRequestBody { name: string; description: string; contracts: { id: string; functionSelectors: string[]; }[]; } interface IResponseBody extends IApiResponseBody { types: string; abi: Record[]; } interface IDefinition { pathParams: IPathParams; queryParams: IQueryParams; requestBody: IRequestBody; responseBody: IResponseBody; } type Response = IResponseBody | IError; } namespace UpdateWalletContractInstance { interface IPathParams { contractInstanceId: string; } const path: (options: IPathParams) => string; const method = HttpMethod.Patch; interface IQueryParams { } interface IRequestBody { note: string; name: string; } interface IResponseBody extends IApiResponseBody { status: 'success'; } interface IDefinition { pathParams: IPathParams; queryParams: IQueryParams; requestBody: IRequestBody; responseBody: IResponseBody; } type Response = IResponseBody | IError; } namespace GetJoinGuildMessage { interface IPathParams { /** The Agreement id */ agreementId: string; } const path: (options: IPathParams) => string; const method = HttpMethod.Get; interface IQueryParams { } interface IRequestBody { } interface IResponseBody extends IApiResponseBody { message: string; params: { chainId?: string; msg: string; method: number; addr: string; nonce: string; hash?: string; ts: string; }; } interface IDefinition { pathParams: IPathParams; queryParams: IQueryParams; requestBody: IRequestBody; responseBody: IResponseBody; } type Response = IResponseBody | IError; } namespace JoinGuild { interface IPathParams { /** The Agreement id */ agreementId: string; } const path: (options: IPathParams) => string; const method = HttpMethod.Post; interface IQueryParams { } interface IRequestBody { message: string; params: { chainId?: string; msg: string; method: number; addr: string; nonce: string; hash?: string; ts: string; }; sig: string; mintToken?: boolean; } interface IResponseBody extends IApiResponseBody { status: 'success'; } interface IDefinition { pathParams: IPathParams; queryParams: IQueryParams; requestBody: IRequestBody; responseBody: IResponseBody; } type Response = IResponseBody | IError; } /** Save some data to IPFS */ namespace SaveToIPFS { interface IPathParams { } const path: () => string; const method = HttpMethod.Post; interface IQueryParams { } interface IRequestBody { /** The data to save. Only one of "data" or "json" should be sent */ data?: string; /** The JSON to save. Only one of "data" or "json" should be sent */ json?: Record; } interface IResponseBody extends IApiResponseBody { /** The IPFS hash for the saved data */ ipfsHash: string; } interface IDefinition { pathParams: IPathParams; queryParams: IQueryParams; requestBody: IRequestBody; responseBody: IResponseBody; } type Response = IResponseBody | IError; } /** Create or update the current user */ namespace CreateOrUpdateUser { interface IPathParams { } const path: () => string; const method = HttpMethod.Post; interface IQueryParams { } interface IRequestBody { /** Profile picture base64 string */ profilePicBase64?: string; /** Url to profile picture */ /** Display name of identity */ displayName?: string; } interface IResponseBody extends IApiResponseBody { user: IMeemUser; } interface IDefinition { pathParams: IPathParams; queryParams: IQueryParams; requestBody: IRequestBody; responseBody: IResponseBody; } type Response = IResponseBody | IError; } namespace GetApiKey { interface IPathParams { } const path: () => string; const method = HttpMethod.Get; interface IQueryParams { } interface IRequestBody { } interface IResponseBody extends IApiResponseBody { jwt: string; } interface IDefinition { pathParams: IPathParams; queryParams: IQueryParams; requestBody: IRequestBody; responseBody: IResponseBody; } type Response = IResponseBody | IError; } /** Get the current authenticated user */ namespace GetMe { interface IPathParams { } const path: () => string; const method = HttpMethod.Get; interface IQueryParams { } interface IRequestBody { } interface IResponseBody extends IApiResponseBody { /** The authenticated user's wallet id */ walletId: string; /** The authenticated user's wallet address */ address: string; /** The authenticated user */ user: IMeemUser; } interface IDefinition { pathParams: IPathParams; queryParams: IQueryParams; requestBody: IRequestBody; responseBody: IResponseBody; } type Response = IResponseBody | IError; } /** Refresh the ENS name for the current user's wallet address */ namespace RefreshENS { interface IPathParams { } const path: () => string; const method = HttpMethod.Get; interface IQueryParams { } interface IRequestBody { } interface IResponseBody extends IApiResponseBody { status: 'success'; } interface IDefinition { pathParams: IPathParams; queryParams: IQueryParams; requestBody: IRequestBody; responseBody: IResponseBody; } type Response = IResponseBody | IError; } /** Remove a user identity from the current user */ namespace RemoveUserIdentity { interface IPathParams { /** The id of the user identity to remove */ userIdentityId: string; } const path: (options: IPathParams) => string; const method = HttpMethod.Delete; interface IQueryParams { } interface IRequestBody { } interface IResponseBody extends IApiResponseBody { status: 'success'; } interface IDefinition { pathParams: IPathParams; queryParams: IQueryParams; requestBody: IRequestBody; responseBody: IResponseBody; } type Response = IResponseBody | IError; } /** Update current user identity */ namespace UpdateUserIdentity { interface IPathParams { /** The id of the user identity to update */ userIdentityId: string; } const path: (options: IPathParams) => string; const method = HttpMethod.Patch; interface IQueryParams { } interface IRequestBody { /** Set the visibility type of the user identity */ visibility?: IUserIdentityVisibility; /** Metadata associated with this user identity */ metadata?: { [key: string]: unknown; }; } interface IResponseBody extends IApiResponseBody { userIdentity: any; } interface IDefinition { pathParams: IPathParams; queryParams: IQueryParams; requestBody: IRequestBody; responseBody: IResponseBody; } type Response = IResponseBody | IError; } } enum MeemEvent { Err = "err", MeemIdUpdated = "meemIdUpdated", MeemMinted = "meemMinted", Subscribe = "subscribe", SubscribeAck = "subscribeAck", Unsubscribe = "unsubscribe", UnubscribeAck = "unubscribeAck" } namespace Events { namespace Err { const eventName = MeemEvent.Err; const eventSource = EventSource.Server; interface ISubscribePayload { } interface IEventPayload extends Record { } } namespace MeemIdUpdated { const eventName = MeemEvent.MeemIdUpdated; const eventSource = EventSource.Server; interface ISubscribePayload { } interface IEventPayload { meemId: IMeemId; jwt: string; } } namespace MeemMinted { const eventName = MeemEvent.MeemMinted; const eventSource = EventSource.Server; interface ISubscribePayload { } interface IEventPayload { /** The wallet address where the Meem was minted */ toAddress: string; /** The URI for the minted Meem */ tokenURI: string; /** The tokenId */ tokenId: string; /** The transaction hash */ transactionHash: string; } } namespace Subscribe { const eventName = MeemEvent.Subscribe; const eventSource = EventSource.Client; interface IEventPayload { type: MeemEvent.Subscribe; walletAddress?: string; events: { key: string; data?: Record; }[]; } } namespace SubscribeAck { const eventName = MeemEvent.SubscribeAck; const eventSource = EventSource.Server; interface ISubscribePayload { } interface IEventPayload { events: SubscribeType[]; } } namespace Unsubscribe { const eventName = MeemEvent.Unsubscribe; const eventSource = EventSource.Client; interface IEventPayload { type: MeemEvent.Unsubscribe; events: SubscribeType[]; } } namespace UnubscribeAck { const eventName = MeemEvent.UnubscribeAck; const eventSource = EventSource.Server; interface ISubscribePayload { } interface IEventPayload { events: SubscribeType[]; } } } type SubscribeType = (Events.Err.ISubscribePayload & { type: MeemEvent.Err; }) | (Events.MeemIdUpdated.ISubscribePayload & { type: MeemEvent.MeemIdUpdated; }) | (Events.MeemMinted.ISubscribePayload & { type: MeemEvent.MeemMinted; }) | (Events.SubscribeAck.ISubscribePayload & { type: MeemEvent.SubscribeAck; }) | (Events.UnubscribeAck.ISubscribePayload & { type: MeemEvent.UnubscribeAck; }); type EventListener = ({ eventName: MeemEvent.Err; handler: (options: { detail: Events.Err.IEventPayload; }) => void; }) | ({ eventName: MeemEvent.MeemIdUpdated; handler: (options: { detail: Events.MeemIdUpdated.IEventPayload; }) => void; }) | ({ eventName: MeemEvent.MeemMinted; handler: (options: { detail: Events.MeemMinted.IEventPayload; }) => void; }) | ({ eventName: MeemEvent.SubscribeAck; handler: (options: { detail: Events.SubscribeAck.IEventPayload; }) => void; }) | ({ eventName: MeemEvent.UnubscribeAck; handler: (options: { detail: Events.UnubscribeAck.IEventPayload; }) => void; }); }