Remove Link
The "remove link" operation is used to remove an existing link between two things on Crossbell, such as two characters, a character or a note, etc.
All unlink operations start from a character.
This links a character to another character.
linkCharacter(fromCharacterId: BigNumberish, toCharacterId: BigNumberish, linkType: string, data?: string, overrides?: Overrides): Promise<Result<number, true>>
Usage
Character ID 42
follows Character ID 10
:
crossbell.linkCharacter(42, 10, "follow")
Parameters
fromCharacterId
- Type: BigNumberish
The ID of the character that is doing the linking.
toCharacterId
- Type: BigNumberish
The ID of the character that is being linked to.
linkType
- Type: string
The type of link. This can be any string, but it is recommended to use a short, descriptive string.
data
- Type: string
The data to be passed to the link module if the character has one.
Returns
interface Returns {
/* The ID of the linklist. */
data: number
transactionHash: string
}
unlinkCharacter
This unlinks a character from another character.
unlinkCharacter(fromCharacterId: BigNumberish, toCharacterId: BigNumberish, linkType: string, overrides?: Overrides): Promise<Result<undefined, true>>
Usage
Character ID 42
unfollows Character ID 10
:
crossbell.unlinkCharacter(42, 10, 'follow')
Parameters
fromCharacterId
- Type: BigNumberish
The ID of the character that is doing the unlinking.
toCharacterId
- Type: BigNumberish
The ID of the character that is being unlinked from.
linkType
- Type: string
The type of link. This can be any string, but it is recommended to use a short, descriptive string.
Returns
interface Returns {
transactionHash: string
}
unlinkNote
This unlinks a character from a note.
unlinkNote(fromCharacterId: BigNumberish, toCharacterId: BigNumberish, toNoteId: BigNumberish, linkType: string, overrides?: Overrides): Promise<Result<undefined, true>>
Usage
Character ID 42
unlikes Note ID 5
from Character ID 10
:
crossbell.unlinkNote(42, 10, 5, 'like')
Parameters
fromCharacterId
- Type: BigNumberish
The ID of the character that is doing the unlinking.
toCharacterId
- Type: BigNumberish
The ID of the character that owns the note.
toNoteId
- Type: BigNumberish
The ID of the note that is being unlinked from.
linkType
- Type: string
The type of link. This can be any string, but it is recommended to use a short, descriptive string.
Returns
interface Returns {
transactionHash: string
}
unlinkAddress
This unlinks a character from an address.
unlinkAddress(fromCharacterId: BigNumberish, toAddress: string, linkType: string, overrides?: Overrides): Promise<Result<undefined, true>>
Usage
Character ID 42
unfollows Address 0x1234567890123456789012345678901234567890
:
crossbell.unlinkAddress(42, '0x1234567890123456789012345678901234567890', 'follow')
Parameters
fromCharacterId
- Type: BigNumberish
The ID of the character that is doing the unlinking.
toAddress
- Type: string
The address that is being unlinked from.
linkType
- Type: string
The type of link. This can be any string, but it is recommended to use a short, descriptive string.
Returns
interface Returns {
transactionHash: string
}
unlinkAnyUri
This unlinks a character from any URI.
unlinkAnyUri(fromCharacterId: BigNumberish, toUri: string, linkType: string, overrides?: Overrides): Promise<Result<undefined, true>>
Usage
Character ID 42
unlikes URI https://example.com
:
crossbell.unlinkAnyUri(42, 'https://example.com', 'like')
Parameters
fromCharacterId
- Type: BigNumberish
The ID of the character that is doing the unlinking.
toUri
- Type: string
The URI that is being unlinked from.
linkType
- Type: string
The type of link. This can be any string, but it is recommended to use a short, descriptive string.
Returns
interface Returns {
transactionHash: string
}
unlinkErc721
This unlinks a character from an ERC721 token.
unlinkErc721(fromCharacterId: BigNumberish, toContractAddress: string, toTokenId: BigNumberish, linkType: string, overrides?: Overrides): Promise<Result<undefined, true>>
Usage
Character ID 42
unlikes ERC721 token 0x1234567890123456789012345678901234567890
with ID 5
:
crossbell.unlinkErc721(42, '0x1234567890123456789012345678901234567890', 5, 'like')
Parameters
fromCharacterId
- Type: BigNumberish
The ID of the character that is doing the unlinking.
toContractAddress
- Type: string
The address of the ERC721 contract that is being unlinked from.
toTokenId
- Type: BigNumberish
The ID of the token that is being unlinked from.
linkType
- Type: string
The type of link. This can be any string, but it is recommended to use a short, descriptive string.
Returns
interface Returns {
transactionHash: string
}
unlinkLinklist
This unlinks a character from a linklist.
unlinkLinklist(fromCharacterId: BigNumberish, toLinklistId: BigNumberish, linkType: string, overrides?: Overrides): Promise<Result<undefined, true>>
Usage
Character ID 42
unlikes Linklist ID 5
:
crossbell.unlinkLinklist(42, 5, 'like')
Parameters
fromCharacterId
- Type: BigNumberish
The ID of the character that is doing the unlinking.
toLinklistId
- Type: BigNumberish
The ID of the linklist that is being unlinked from.
linkType
- Type: string
The type of link. This can be any string, but it is recommended to use a short, descriptive string.
Returns
interface Returns {
transactionHash: string
}