Account
Methods used to customize an account's data including username, biography, and profile image.
Get Pint Peer Address
Returns the pint address for the PintSwap PeerId
A pint address is an encoding of the underlying libp2p multihash, converted to bech32 with a pint
prefix.
Assign Username
Uses the /pintswap/0.1.0/ns/register
protocol handler.
Registers a name on the PintSwap nameservers. Currently, only .drip
nameservers are available for registration, however there are plans to increase options. The nameserver this request is routed to depends on the table stored in NS_MULTIADDRS
exported by @pintswap/sdk
The default pintswap-ns
implementation requires that you retain custody of your PeerId
for as long as you wish to use the name registered. If the PeerId
is lost, the name cannot be released unless nameserver operators release it intentionally.
Assign Profile Picture
Registers an image per peer that is used as the peer's profile picture. It is important to note that an array buffer must be passed into the parameters of this method.
An implementation of the following can be found below that is used as the event handler for a <input type="file" />
:
Assign Biography
Registers a biography for the connected peer.
Last updated