🌐 NEAR Social Plugin
The NEAR Social plugin enables distribution of curated content to NEAR Social, a decentralized social network built on the NEAR Protocol.
🔧 Setup Guide
-
Create a NEAR account if you don't already have one. You can create an account on NEAR Wallet or MyNearWallet.
noteYou'll need a NEAR account with sufficient funds to cover transaction fees for posting content to NEAR Social.
-
Generate a private key for your account. This can be done through the NEAR CLI or through wallet interfaces that support key export.
-
Modify your
curate.config.json
to include the NEAR Social configuration:{
"outputs": {
"stream": {
"enabled": true,
"distribute": [
{
"plugin": "@curatedotfun/near-social",
"config": {
"accountId": "account.near",
"privateKey": "{ACCOUNT_PRIVATE_KEY}",
"networkId": "mainnet"
}
}
]
}
}
}The container is already set up to hydrate environment variables into the configuration at runtime, replacing
{ACCOUNT_PRIVATE_KEY}
with the values from the environment.You need to specify:
accountId
: Your NEAR account ID (e.g., example.near)privateKey
: The private key for your NEAR accountnetworkId
: (Optional) The NEAR network to use, either "mainnet" or "testnet". Defaults to "mainnet" if not specified.
cautionKeep your private key secure! Never commit it directly to your configuration files or repositories.
-
Enable the stream by setting
"enabled": true
if not already enabled.Once merged, your approved messages will start flowing to NEAR Social through your configured account.
tipIf your stream had been disabled and you have existing, approved curations, call
/api/feeds/:feedId/process
to process them.
📝 Configuration Reference
Full configuration options for the NEAR Social plugin:
{
"plugin": "@curatedotfun/near-social",
"config": {
"accountId": "account.near",
"privateKey": "{ACCOUNT_PRIVATE_KEY}", // Automatically injected from environment
"networkId": "mainnet" // Optional: "mainnet" or "testnet", defaults to "mainnet"
}
}
🔐 Security Considerations
- The NEAR Social plugin requires a private key to sign transactions. This key should be stored securely as an environment variable.
- Consider using a dedicated NEAR account for distribution purposes rather than your main account.
- Monitor your account's activity regularly to ensure it's being used as expected.
- Set appropriate gas limits for your transactions to control costs.