The NotInterested module
Create a comment on Momoka.
⚠️ Requires authenticated LensClient.
Request object for the mutation
PromiseResult with CreateMomokaPublicationResultFragment or LensProfileManagerRelayErrorFragment
const result = await client.publication.commentOnMomoka({
commentOn: '0x123-0x456',
contentURI: 'ipfs://Qm...', // or arweave
});
Create a comment onchain using Profile Manager. Profile has to have a Profile Manager enabled.
⚠️ Requires authenticated LensClient.
Request object for the mutation
PromiseResult with RelaySuccessFragment or LensProfileManagerRelayErrorFragment
const result = await client.publication.commentOnchain({
commentOn: '0x123-0x456',
contentURI: 'ipfs://Qm...', // or arweave
});
Fetch typed data to collect a publication.
Typed data has to be signed by the profile's wallet and broadcasted with Transaction.broadcastOnchain.
⚠️ Requires authenticated LensClient.
Request object for the mutation
Optional
options: TypedDataOptionsConfigure returned typed data
Typed data for collecting a publication
const result = await client.publication.createLegacyCollectTypedData({
on: '0x123-0x456',
});
Fetch typed data to create a comment on Momoka.
Typed data has to be signed by the profile's wallet and broadcasted with Transaction.broadcastOnMomoka.
⚠️ Requires authenticated LensClient.
Request object for the mutation
Typed data for creating a post
const result = await client.publication.createMomokaCommentTypedData({
commentOn: '0x123-0x456',
contentURI: 'ipfs://Qm...', // or arweave
});
Fetch typed data to create a mirror on Momoka.
Typed data has to be signed by the profile's wallet and broadcasted with Transaction.broadcastOnMomoka.
⚠️ Requires authenticated LensClient.
Request object for the mutation
Typed data for creating a post
const result = await client.publication.createMomokaMirrorTypedData({
mirrorOn: '0x123-0x456',
});
Fetch typed data to create a post on Momoka.
Typed data has to be signed by the profile's wallet and broadcasted with Transaction.broadcastOnMomoka.
⚠️ Requires authenticated LensClient.
Request object for the mutation
Typed data for creating a post
const result = await client.publication.createMomokaPostTypedData({
contentURI: 'ipfs://Qm...', // or arweave
});
Fetch typed data to create a quote on Momoka.
Typed data has to be signed by the profile's wallet and broadcasted with Transaction.broadcastOnMomoka.
⚠️ Requires authenticated LensClient.
Request object for the mutation
Typed data for creating a post
const result = await client.publication.createMomokaQuoteTypedData({
quoteOn: '0x123-0x456',
contentURI: 'ipfs://Qm...', // or arweave
});
Fetch typed data to create a comment onchain.
Typed data has to be signed by the profile's wallet and broadcasted with Transaction.broadcastOnchain.
⚠️ Requires authenticated LensClient.
Request object for the mutation
Optional
options: TypedDataOptionsConfigure returned typed data
Typed data for creating a post
const result = await client.publication.createOnchainCommentTypedData({
commentOn: '0x123-0x456',
contentURI: 'ipfs://Qm...', // or arweave
});
Fetch typed data to create a mirror onchain.
Typed data has to be signed by the profile's wallet and broadcasted with Transaction.broadcastOnchain.
⚠️ Requires authenticated LensClient.
Request object for the mutation
Optional
options: TypedDataOptionsConfigure returned typed data
Typed data for creating a post
const result = await client.publication.createOnchainMirrorTypedData({
mirrorOn: '0x123-0x456',
});
Fetch typed data to create a post onchain.
Typed data has to be signed by the profile's wallet and broadcasted with Transaction.broadcastOnchain.
⚠️ Requires authenticated LensClient.
Request object for the mutation
Optional
options: TypedDataOptionsConfigure returned typed data
Typed data for creating a post
const result = await client.publication.createOnchainPostTypedData({
contentURI: 'ipfs://Qm...', // or arweave
});
Fetch typed data to create a quote onchain.
Typed data has to be signed by the profile's wallet and broadcasted with Transaction.broadcastOnchain.
⚠️ Requires authenticated LensClient.
Request object for the mutation
Optional
options: TypedDataOptionsConfigure returned typed data
Typed data for creating a post
const result = await client.publication.createOnchainQuoteTypedData({
quoteOn: '0x123-0x456',
contentURI: 'ipfs://Qm...', // or arweave
});
Fetch a publication
Request object for the query
Optional
options: FetchPublicationOptionsAdditional options for the query
AnyPublicationFragment or null if not found
const result = await client.publication.fetch({
forId: '0x123-0x456',
});
Fetch all publications by requested criteria
Request object for the query
Optional
options: FetchPublicationOptionsAdditional options for the query
AnyPublicationFragment wrapped in PaginatedResult
const result = await client.publication.fetchAll({
where: {
from: ['0x123'],
},
});
Hide a publication
⚠️ Requires authenticated LensClient.
Request object for the mutation
PromiseResult with void
await client.publication.hide({
for: '0x014e-0x0a',
});
Hide a comment that exists under a publication made by the authenticated profile. If already hidden, does nothing.
⚠️ Requires authenticated LensClient.
Request object for the mutation
PromiseResult with void
await client.publication.hideComment({
for: '0x014e-0x0a',
});
Collect a publication using Profile Manager. Profile has to have a Profile Manager enabled.
⚠️ Requires authenticated LensClient.
Request object for the mutation
PromiseResult with RelaySuccessFragment or LensProfileManagerRelayErrorFragment
const result = await client.publication.legacyCollect({
on: '0x123-0x456',
});
Create a mirror on Momoka.
⚠️ Requires authenticated LensClient.
Request object for the mutation
PromiseResult with CreateMomokaPublicationResultFragment or LensProfileManagerRelayErrorFragment
const result = await client.publication.mirrorOnMomoka({
mirrorOn: '0x123-0x456',
});
Create a mirror onchain using Profile Manager. Profile has to have a Profile Manager enabled.
⚠️ Requires authenticated LensClient.
Request object for the mutation
PromiseResult with RelaySuccessFragment or LensProfileManagerRelayErrorFragment
const result = await client.publication.mirrorOnchain({
mirrorOn: '0x123-0x456',
});
Create a post on Momoka.
⚠️ Requires authenticated LensClient.
Request object for the mutation
PromiseResult with CreateMomokaPublicationResultFragment or LensProfileManagerRelayErrorFragment
const result = await client.publication.postOnMomoka({
contentURI: 'ipfs://Qm...', // or arweave
});
Create a post onchain using Profile Manager. Profile has to have a Profile Manager enabled.
⚠️ Requires authenticated LensClient.
Request object for the mutation
PromiseResult with RelaySuccessFragment or LensProfileManagerRelayErrorFragment
const result = await client.publication.postOnchain({
contentURI: 'ipfs://Qm...', // or arweave
});
Predict the next onchain Publication id for a Profile.
Request object for the method
Profile Id of the profile to predict the next onchain Publication Id for
Publication Id
Create a quote on Momoka.
⚠️ Requires authenticated LensClient.
Request object for the mutation
PromiseResult with CreateMomokaPublicationResultFragment or LensProfileManagerRelayErrorFragment
const result = await client.publication.quoteOnMomoka({
quoteOn: '0x123-0x456',
contentURI: 'ipfs://Qm...', // or arweave
});
Create a quote onchain using Profile Manager. Profile has to have a Profile Manager enabled.
⚠️ Requires authenticated LensClient.
Request object for the mutation
PromiseResult with RelaySuccessFragment or LensProfileManagerRelayErrorFragment
const result = await client.publication.quoteOnchain({
quoteOn: '0x123-0x456',
contentURI: 'ipfs://Qm...', // or arweave
});
Refresh a publication metadata stored by the API
Request object for the mutation
Refresh mutation result
const result = await client.publication.refreshMetadata({
for: '0x123-0x456',
});
Report a publication with a reason
⚠️ Requires authenticated LensClient.
Request object for the mutation
PromiseResult with void
import { PublicationReportingReason, PublicationReportingSpamSubreason } from '@lens-protocol/client';
await client.publication.report({
for: '0x014e-0x0a',
reason: {
spamReason: {
reason: PublicationReportingReason.Spam,
subreason: PublicationReportingSpamSubreason.FakeEngagement,
},
},
additionalComments: 'Human readable comments, if any.',
});
Fetch tags
Request object for the query
TagResultFragment wrapped in PaginatedResult
const result = await client.publication.tags({});
Unhide a comment that exists under a publication made by the authenticated profile. If not hidden, does nothing.
⚠️ Requires authenticated LensClient.
Request object for the mutation
PromiseResult with void
await client.publication.unhideComment({
for: '0x014e-0x0a',
});
Validate a publication metadata before creating it
Request object for the query
Validation result
const result = await client.publication.validateMetadata({
json: JSON.stringify(metadata),
});
if (!result.valid) {
throw new Error(`Metadata is not valid because of ${result.reason}`);
}
Publications are the posts, comments, mirrors and quotes that a profile creates.