lbryio / lbryio/ytsync

Refactor of ytsync - part 1 - SDK

Open
#71 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Go
Stars
40
Forks
17
PR merge metrics
No merged PRs in 30d

Description

The goal is to create an interface that exposes the main SDK functions so that we can hide all the complicated logic and better organize the code. This way we'll be able to eventually swap out the SDK for a pure GO/lbrycrd implementation.

The identified tasks of the SDK are listed here.

- sdk
- download wallet and blockchain.db from s3
- start/stop sdk
- wait for slow startup
- clean up after shutdown
- what we actually need the sdk for
- publishing
- create channel claim, sign it, send it to lbrycrd
- create the content (aka stream) claim, sign claim with channel key
- put claim into a transaction, sign it with private key, send the transaction to lbrycrd
- ensure utxos are available, create utxos, select utxos for transaction (coin chooser)
- check balance, fund account from ytsync wallet
- check what channels are in the wallet. ensure that we're using the right wallet for the right channel, and that we have the right utxos for everything
- **don't spend staked utxos**
- transfer
- transferring claims to creator's wallet
- abandon tips and supports, and send them to the creator as tips
- after transfer, retain channel's public and private keys so we can keep publishing to their channel. also retain the address that the channel claim is in, so we can tell if the channel is abandoned and make sure we don't publish duplicate videos (videos we already published) to your channel
- metadata
- handle old versions of claim metadata
- update published metadata if new fields get added (may not be strictly necessary)

Must do:
- [ ] Write an interface for the SDK
- [ ] Move the code into an implementation

Contributor guide

No contributing guide indexed for this repository

Research direction

No files, tests, or entry points are named. Start by locating the existing SDK usage and comparing it with the listed wallet, lifecycle, publishing, transfer, and metadata responsibilities; done means an SDK interface exists and the current code is moved behind its implementation.

Written by the indexing model from the issue text.

Assessment

Tech stack
go
Domain
backend, blockchain
Issue type
Refactor
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.