{"id":13392937,"url":"https://github.com/fox-one/mixin-sdk-go","last_synced_at":"2025-04-06T07:12:47.134Z","repository":{"id":37825318,"uuid":"275560378","full_name":"fox-one/mixin-sdk-go","owner":"fox-one","description":"Golang sdk for Mixin Network \u0026 Mixin Messenger","archived":false,"fork":false,"pushed_at":"2024-10-29T12:00:56.000Z","size":693,"stargazers_count":45,"open_issues_count":5,"forks_count":13,"subscribers_count":8,"default_branch":"master","last_synced_at":"2024-10-29T14:33:18.455Z","etag":null,"topics":["golang","mixin","mixin-messenger","mixin-network","mixin-sdk","mixin-sdk-go"],"latest_commit_sha":null,"homepage":"https://developers.mixin.one/","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/fox-one.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-06-28T10:24:29.000Z","updated_at":"2024-10-29T12:01:00.000Z","dependencies_parsed_at":"2023-11-06T02:33:14.966Z","dependency_job_id":"24cdac5f-9605-4ceb-ab1d-98d826ecc64a","html_url":"https://github.com/fox-one/mixin-sdk-go","commit_stats":{"total_commits":191,"total_committers":18,"mean_commits":10.61111111111111,"dds":0.4136125654450262,"last_synced_commit":"bd977b8f532337abd430e0a219a1f63a6be98ac2"},"previous_names":[],"tags_count":118,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fox-one%2Fmixin-sdk-go","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fox-one%2Fmixin-sdk-go/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fox-one%2Fmixin-sdk-go/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fox-one%2Fmixin-sdk-go/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/fox-one","download_url":"https://codeload.github.com/fox-one/mixin-sdk-go/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247445671,"owners_count":20939958,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["golang","mixin","mixin-messenger","mixin-network","mixin-sdk","mixin-sdk-go"],"created_at":"2024-07-30T17:00:39.724Z","updated_at":"2025-04-06T07:12:47.118Z","avatar_url":"https://github.com/fox-one.png","language":"Go","funding_links":[],"categories":["SDK"],"sub_categories":["3rd-party SDK"],"readme":"\u003cimg align=\"right\" width=\"256px\" src=\"https://raw.githubusercontent.com/fox-one/mixin-sdk-go/master/logo/logo.png\"\u003e\n\n# mixin-sdk-go\nGolang sdk for Mixin Network \u0026 Mixin Messenger\n\n## Install\n\n`go get -u github.com/fox-one/mixin-sdk-go/v2`\n\n## Features\n\n* **Comprehensive** most of the Mixin Network \u0026 Mixin Messenger api supported\n* **Security** verify Response `X-Request-ID` \u0026 signature automatically\n* **Flexible** initialize [Client](https://github.com/fox-one/mixin-sdk-go/blob/master/client.go) from `keystore`, `ed25519_oauth_token` or `access_token`\n\n## Examples\n\nSee [_examples/](https://github.com/fox-one/mixin-sdk-go/blob/master/_examples/) for a variety of examples.\n\n**Quick Start**\n\n```go\npackage main\n\nimport (\n\t\"context\"\n\t\"log\"\n\n\t\"github.com/fox-one/mixin-sdk-go/v2\"\n)\n\nfunc main() {\n\tctx := context.Background()\n\ts := \u0026mixin.Keystore{\n\t\tClientID:   \"\",\n\t\tSessionID:  \"\",\n\t\tPrivateKey: \"\",\n\t\tPinToken: \"\",\n\t}\n\n\tclient, err := mixin.NewFromKeystore(s)\n\tif err != nil {\n\t\tlog.Panicln(err)\n\t}\n\n\tuser, err := client.UserMe(ctx)\n\tif err != nil {\n\t\tlog.Printf(\"UserMe: %v\", err)\n\t\treturn\n\t}\n\n\tlog.Println(\"user id\", user.UserID)\n}\n```\n\n## Error handling?\n\ncheck error code by `mixin.IsErrorCodes`\n\n```go\nif _, err := client.UserMe(ctx); err != nil {\n    switch {\n    case mixin.IsErrorCodes(err,mixin.Unauthorized,mixin.EndpointNotFound):\n    \t// handle unauthorized error\n    case mixin.IsErrorCodes(err,mixin.InsufficientBalance):\n        // handle insufficient balance error\n    default:\n    }\n}\n```\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffox-one%2Fmixin-sdk-go","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffox-one%2Fmixin-sdk-go","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffox-one%2Fmixin-sdk-go/lists"}