Claim/transfer YouTube channels #2646

Closed
opened 2019-07-22 15:41:01 +02:00 by tzarebczan · 2 comments
tzarebczan commented 2019-07-22 15:41:01 +02:00 (Migrated from github.com)

The Issue

YouTubers will be able to request their channels and claims to be sent over via an API call to internal apis. We'll probably need https://github.com/lbryio/lbry-desktop/issues/2597 first so we can tell if they have channels which need to be claimed.

When calling the new API, the app will pass one of it's wallet addresses, auth token, and possibly youtube channel/status token (from previous API). Not sure if we'll make them claim one by one, or all (if all, we won't need the channel).

The api will return a serialized string that would then be passed to the channel_import command, which saves the channel signing key in their wallet + allows them to sign new claims (pending https://github.com/lbryio/lbry-sdk/pull/2220).

We would let them know this and that their content will soon show up in their Publishes section. They cannot edit their channel until the channel claim is sent. The api will put their channel into a queue, and the process to send over should be fairly quick.

System Configuration

  • LBRY Daemon version:
  • LBRY App version:
  • LBRY Installation ID:
  • Operating system:

Anything Else

Screenshots

<!-- Thanks for reporting an issue to LBRY and helping us improve! To make it possible for us to help you, please fill out below information carefully. Before reporting any issues, please make sure that you're using the latest version. - App releases: https://github.com/lbryio/lbry-desktop/releases - Standalone daemon: https://github.com/lbryio/lbry/releases We are also available on live chat at https://chat.lbry.com --> ## The Issue YouTubers will be able to request their channels and claims to be sent over via an API call to internal apis. We'll probably need https://github.com/lbryio/lbry-desktop/issues/2597 first so we can tell if they have channels which need to be claimed. When calling the new API, the app will pass one of it's wallet addresses, auth token, and possibly youtube channel/status token (from previous API). Not sure if we'll make them claim one by one, or all (if all, we won't need the channel). The api will return a serialized string that would then be passed to the channel_import command, which saves the channel signing key in their wallet + allows them to sign new claims (pending https://github.com/lbryio/lbry-sdk/pull/2220). We would let them know this and that their content will soon show up in their Publishes section. They cannot edit their channel until the channel claim is sent. The api will put their channel into a queue, and the process to send over should be fairly quick. ## System Configuration <!-- For the app, this info is in the About section at the bottom of the Help page. You can include a screenshot instead of typing it out --> <!-- For the daemon, run: curl 'http://localhost:5279' --data '{"method":"version"}' and include the full output --> - LBRY Daemon version: - LBRY App version: - LBRY Installation ID: - Operating system: ## Anything Else <!-- Include anything else that does not fit into the above sections --> ## Screenshots <!-- If a screenshot would help explain the bug, please include one or two here -->
tzarebczan commented 2019-09-10 16:50:19 +02:00 (Migrated from github.com)

Based on the output of the user/me call, we'll want to show a tile for each channel on the overview page along with their sync status, transfer_state, transferrable status, total published/total transferred, and link to the sync status page (lbry.com/youtube/status/STATUS_TOKEN). A claim button would be shown if any of the channels have in transferrable = true status (one call transfers multiple channels).

Not sure if we want to keep showing the tile once the transfer is completed - might be a good idea so at least they have the status/link to the status page. Could also use this later to reimport the certificate if something went wrong, or to send additional publishing addresses to yt sync.

This should be limited to the desktop app - not available on web until we have full wallet support.

user/me response:

{
  "success": true,
  "error": null,
  "data": {
    "id": 1001326,
    "language": "en",
    "given_name": "Tom",
    "family_name": "Zarebczan",
    "created_at": "2017-04-19T01:25:55Z",
    "updated_at": "2019-05-30T15:02:51Z",
    "invited_by_id": 762247,
    "invited_at": null,
    "invites_remaining": 951,
    "invite_reward_claimed": true,
    "is_email_enabled": true,
    "manual_approval_user_id": null,
    "reward_status_change_trigger": "manual",
    "youtube_channels": [
      {
                "yt_channel_name": "Swiss Experiments - Castagnola007",
                "lbry_channel_name": "@Swiss-Experiments",
                "channel_claim_id": "a0f1f8e50dbc4d104edc5640081a71d19cb98702",
                "sync_status": "queued",
                "status_token": "pp7YjAmrcAvY7Ee5ze3ZEHiRvdEEkatf",
                "transferable": false,
                "transfer_state": "completed_transfer",
                "publish_to_address": [
                    "bVcBccunuQ6Etp8CD4GRNcvzzfjM2XdmY4"
                ],
      }, 
      {
                "yt_channel_name": "Niko Storni",
                "lbry_channel_name": "@TestyNet",
                "channel_claim_id": "",
                "sync_status": "synced",
                "status_token": "3qzGyuVjQaf7t4pKKu2Er1NRW2LJkeWw",
                "transferable": false,
                "transfer_state": "pending_transfer",
                "publish_to_address": [
                    "bVcBccunuQ6Etp8CD4GRNcvzzfjM2XdmY4"
                ]
      }
    ],
    "primary_email": "thomas.zarebczan@gmail.com",
    "has_verified_email": true,
    "is_identity_verified": false,
    "is_reward_approved": true,
    "groups": [
      "admin"
    ]
  }
}

Then you'd call the transfer endpoint with the current auth token + a wallet address (use same endpoint to get an unused address as rewards) https://api.lbry.com/yt/transfer?auth_token=xxxxxxxx&address=bWT1jqp1NofuEdXrKWYs2qcGZ25L9VRf7Q

This will return a certificate for each channel_certificate which needs to be run against the sdk-api via channel import:

{
    "success": true,
    "error": null,
    "data": [
        {
            "channel": {
                "yt_channel_name": "Swiss Experiments - Castagnola007",
                "lbry_channel_name": "@Swiss-Experiments",
                "channel_claim_id": "a0f1f8e50dbc4d104edc5640081a71d19cb98702",
                "sync_status": "queued",
                "status_token": "pp7YjAmrcAvY7Ee5ze3ZEHiRvdEEkatf",
                "transferable": false,
                "transfer_state": "completed_transfer",
                "publish_to_address": [
                    "bVcBccunuQ6Etp8CD4GRNcvzzfjM2XdmY4"
                ],
                "channel_certificate": "XXXXXX"
            },
            "total_published_videos": 0,
            "total_transferred": 0,
            "changed": false
        },
        {
            "channel": {
                "yt_channel_name": "Niko Storni",
                "lbry_channel_name": "@TestyNet",
                "channel_claim_id": "",
                "sync_status": "synced",
                "status_token": "3qzGyuVjQaf7t4pKKu2Er1NRW2LJkeWw",
                "transferable": false,
                "transfer_state": "pending_transfer",
                "publish_to_address": [
                    "bVcBccunuQ6Etp8CD4GRNcvzzfjM2XdmY4"
                ]
            },
            "total_published_videos": 0,
            "total_transferred": 0,
            "changed": false
        }
    ]
}```
Based on the output of the user/me call, we'll want to show a tile for each channel on the overview page along with their sync status, transfer_state, transferrable status, total published/total transferred, and link to the sync status page (lbry.com/youtube/status/STATUS_TOKEN). A claim button would be shown if any of the channels have in transferrable = true status (one call transfers multiple channels). Not sure if we want to keep showing the tile once the transfer is completed - might be a good idea so at least they have the status/link to the status page. Could also use this later to reimport the certificate if something went wrong, or to send additional publishing addresses to yt sync. This should be limited to the desktop app - not available on web until we have full wallet support. user/me response: ``` { "success": true, "error": null, "data": { "id": 1001326, "language": "en", "given_name": "Tom", "family_name": "Zarebczan", "created_at": "2017-04-19T01:25:55Z", "updated_at": "2019-05-30T15:02:51Z", "invited_by_id": 762247, "invited_at": null, "invites_remaining": 951, "invite_reward_claimed": true, "is_email_enabled": true, "manual_approval_user_id": null, "reward_status_change_trigger": "manual", "youtube_channels": [ { "yt_channel_name": "Swiss Experiments - Castagnola007", "lbry_channel_name": "@Swiss-Experiments", "channel_claim_id": "a0f1f8e50dbc4d104edc5640081a71d19cb98702", "sync_status": "queued", "status_token": "pp7YjAmrcAvY7Ee5ze3ZEHiRvdEEkatf", "transferable": false, "transfer_state": "completed_transfer", "publish_to_address": [ "bVcBccunuQ6Etp8CD4GRNcvzzfjM2XdmY4" ], }, { "yt_channel_name": "Niko Storni", "lbry_channel_name": "@TestyNet", "channel_claim_id": "", "sync_status": "synced", "status_token": "3qzGyuVjQaf7t4pKKu2Er1NRW2LJkeWw", "transferable": false, "transfer_state": "pending_transfer", "publish_to_address": [ "bVcBccunuQ6Etp8CD4GRNcvzzfjM2XdmY4" ] } ], "primary_email": "thomas.zarebczan@gmail.com", "has_verified_email": true, "is_identity_verified": false, "is_reward_approved": true, "groups": [ "admin" ] } } ``` Then you'd call the transfer endpoint with the current auth token + a wallet address (use same endpoint to get an unused address as rewards) https://api.lbry.com/yt/transfer?auth_token=xxxxxxxx&address=bWT1jqp1NofuEdXrKWYs2qcGZ25L9VRf7Q This will return a certificate for each channel_certificate which needs to be run against the sdk-api via channel import: ``` { "success": true, "error": null, "data": [ { "channel": { "yt_channel_name": "Swiss Experiments - Castagnola007", "lbry_channel_name": "@Swiss-Experiments", "channel_claim_id": "a0f1f8e50dbc4d104edc5640081a71d19cb98702", "sync_status": "queued", "status_token": "pp7YjAmrcAvY7Ee5ze3ZEHiRvdEEkatf", "transferable": false, "transfer_state": "completed_transfer", "publish_to_address": [ "bVcBccunuQ6Etp8CD4GRNcvzzfjM2XdmY4" ], "channel_certificate": "XXXXXX" }, "total_published_videos": 0, "total_transferred": 0, "changed": false }, { "channel": { "yt_channel_name": "Niko Storni", "lbry_channel_name": "@TestyNet", "channel_claim_id": "", "sync_status": "synced", "status_token": "3qzGyuVjQaf7t4pKKu2Er1NRW2LJkeWw", "transferable": false, "transfer_state": "pending_transfer", "publish_to_address": [ "bVcBccunuQ6Etp8CD4GRNcvzzfjM2XdmY4" ] }, "total_published_videos": 0, "total_transferred": 0, "changed": false } ] }```
tzarebczan commented 2019-09-17 15:57:49 +02:00 (Migrated from github.com)

The last step is adding the address_list API call (0.41.1+) (http://build.lbry.io/daemon/build-12001_commit-b7c2054_branch-master/) and passing the address returned from get unused wallet address, and grabbing the public_key to pass to the api (https://github.com/lbryio/internal-apis/pull/1013/files)

The other option would be to run address list instead of get unused address, and grab the last result with address + public key (last address will be unused).

address list is a new API for redux I beleive.

C:\Users\SoloDolo\Desktop>lbrynet address list --address=bUaTCGxmmWb6j9UQmw4k7AbyY9kPgPDSk3
[
  {
    "account": "bTKdXCA7kMEzUMaVXJhsCjajGxJfra6oEY",
    "address": "bUaTCGxmmWb6j9UQmw4k7AbyY9kPgPDSk3",
    "public_key": "xpub6B9vNLVFLiTFbbSejWUjW2ZmtfHWbnQVdVZ3NY4NoxvmuwayUYm8Wi8qZ3rUMnHPdix1sqwkwfp6F72A8fHGjZFbjDyBFVEUyFtXmVd8otY",
    "used_times": 0
  }
]
The last step is adding the address_list API call (0.41.1+) (http://build.lbry.io/daemon/build-12001_commit-b7c2054_branch-master/) and passing the address returned from get unused wallet address, and grabbing the public_key to pass to the api (https://github.com/lbryio/internal-apis/pull/1013/files) The other option would be to run address list instead of get unused address, and grab the last result with address + public key (last address will be unused). address list is a new API for redux I beleive. ``` C:\Users\SoloDolo\Desktop>lbrynet address list --address=bUaTCGxmmWb6j9UQmw4k7AbyY9kPgPDSk3 [ { "account": "bTKdXCA7kMEzUMaVXJhsCjajGxJfra6oEY", "address": "bUaTCGxmmWb6j9UQmw4k7AbyY9kPgPDSk3", "public_key": "xpub6B9vNLVFLiTFbbSejWUjW2ZmtfHWbnQVdVZ3NY4NoxvmuwayUYm8Wi8qZ3rUMnHPdix1sqwkwfp6F72A8fHGjZFbjDyBFVEUyFtXmVd8otY", "used_times": 0 } ] ```
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: LBRYCommunity/lbry-desktop#2646
No description provided.