@txtcel/protocol
Advanced tools
+8
-3
@@ -51,2 +51,5 @@ # @txtcel/protocol | ||
| (follow/unfollow a channel; maintains the caller's FollowRegistry and the per-channel FollowerShard counter; no fee, caller pays rent only) | ||
| - buildSetDescriptionInstruction(programId, authority, seed, description, treasuryShardIdx) | ||
| (author-only channel description in a sidecar ThreadDescription PDA, <= MAX_DESCRIPTION_LEN UTF-8 bytes; | ||
| empty string clears the description, closes the PDA and refunds its rent to the author) | ||
@@ -65,2 +68,3 @@ buildFillSlotInstruction takes an options object: { programId, payer, seed, author, candidates, | ||
| - deriveFollowRegistryPda(programId, owner), deriveFollowerShardPda(programId, seed, shard), followerShardIndex(owner) | ||
| - deriveDescriptionPda(programId, seed) | ||
| - randomTreasuryShard(), randomWalletFeeShard() | ||
@@ -75,2 +79,3 @@ | ||
| ({ shards: [{ shard, address, lamports, claimable }], totalClaimable } — one batched RPC over all 32 shards). | ||
| - Description: loadThreadDescription(connection, programId, seed) -> ThreadDescriptionData | null (null = no description set). | ||
| - Decoders (Uint8Array -> typed data): decodeContent/decodeAlloc/decodeThread/decodeSettings/ | ||
@@ -80,7 +85,7 @@ decodeThreadAccess/decodeAccessEntry/decodeAllocLikes/decodeFollowRegistry/decodeFollowerShard. Raw zorsh schemas in codec/schemas.ts. | ||
| ## Constants | ||
| - Tags: TAG_CONTENT/TAG_ALLOC/TAG_THREAD/TAG_SETTINGS/TAG_ACCESS/TAG_LIKES/TAG_ACCESS_ENTRY/TAG_FOLLOW_REGISTRY/TAG_FOLLOWER_SHARD | ||
| - Tags: TAG_CONTENT/TAG_ALLOC/TAG_THREAD/TAG_SETTINGS/TAG_ACCESS/TAG_LIKES/TAG_ACCESS_ENTRY/TAG_FOLLOW_REGISTRY/TAG_FOLLOWER_SHARD/TAG_THREAD_DESCRIPTION | ||
| - Content kinds: KIND_TEXT. Access status: ACCESS_ALLOWED/ACCESS_DENIED/ACCESS_FEE_EXEMPT | ||
| - Layout: CONTENT_SLOTS, EXTEND_THRESHOLD, EXTEND_STALE_SLOTS, MAX_BODY_LEN, MAX_TITLE_LEN, INDEX_NONE, PUBKEY_SIZE | ||
| - Layout: CONTENT_SLOTS, EXTEND_THRESHOLD, EXTEND_STALE_SLOTS, MAX_BODY_LEN, MAX_TITLE_LEN, MAX_DESCRIPTION_LEN (512), INDEX_NONE, PUBKEY_SIZE | ||
| - Shards: N_TREASURY_SHARDS, N_WALLET_FEE_SHARDS (32), N_FOLLOWER_SHARDS; follows: MAX_FOLLOWS | ||
| - Seeds: SEED_SETTINGS/SEED_ALLOC/SEED_CONTENT/SEED_ACCESS/SEED_LIKES/SEED_TREASURY_SHARD/SEED_WALLET_FEE/SEED_ACL/SEED_FOLLOWS/SEED_FOLLOWER_COUNT | ||
| - Seeds: SEED_SETTINGS/SEED_ALLOC/SEED_CONTENT/SEED_ACCESS/SEED_LIKES/SEED_TREASURY_SHARD/SEED_WALLET_FEE/SEED_ACL/SEED_FOLLOWS/SEED_FOLLOWER_COUNT/SEED_DESCRIPTION | ||
| - Fees: MAX_FEE_CUT_BPS (5000; on-chain max for fee cuts / base fee) | ||
@@ -87,0 +92,0 @@ - Misc: Instruction (variant index map; e.g. Instruction.FillSlot === 1, Instruction.Subscribe === 27, Instruction.Unsubscribe === 28), BPF_LOADER_UPGRADEABLE_ID, DESIRED_CANDIDATES, BPS_DIVISOR, TX_POLL_TIMEOUT_MS, TX_POLL_INTERVAL_MS |
+1
-1
| { | ||
| "name": "@txtcel/protocol", | ||
| "version": "0.11.0", | ||
| "version": "0.12.0", | ||
| "description": "TypeScript SDK for the Txtcel Solana program: instruction builders, account codecs and PDA derivation.", | ||
@@ -5,0 +5,0 @@ "license": "MIT", |
+10
-2
@@ -88,2 +88,8 @@ # @txtcel/protocol | ||
| ### Channel metadata | ||
| | On-chain instruction | Builder | | ||
| |---|---| | ||
| | `SetDescription` (42) | `buildSetDescriptionInstruction(programId, authority, seed, description, treasuryShardIdx)` — author-only; sets/updates the channel description (≤ 512 UTF-8 bytes) in its sidecar PDA, empty string clears it and refunds the rent | | ||
| ### Program administration | ||
@@ -120,2 +126,3 @@ | ||
| | `deriveFollowerShardPda(programId, seed, idx)` | `["follower_count", seed, u8(idx)]` | | ||
| | `deriveDescriptionPda(programId, seed)` | `["description", seed]` | | ||
| | `deriveProgramDataPda(programId)` | canonical BPF-loader `ProgramData` address | | ||
@@ -133,6 +140,7 @@ | ||
| `loadFollowRegistry`, `loadFollowerCount`, `loadWalletFeeBalances` | ||
| (per-shard earnings + sweepable total for a wallet), and | ||
| `loadThreadNodesBatched` (tolerant batch loader for channel lists). | ||
| (per-shard earnings + sweepable total for a wallet), | ||
| `loadThreadDescription` (returns `null` when the channel has no description), | ||
| and `loadThreadNodesBatched` (tolerant batch loader for channel lists). | ||
| Raw codecs for every account layout are exported from `codec/` if you need to | ||
| decode account data you fetched yourself. |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
1006283
3.19%6881
3.24%144
5.88%