{"id":13408750,"url":"https://github.com/Elrond-Giants/erdjs-auth","last_synced_at":"2025-03-14T13:31:58.783Z","repository":{"id":45624468,"uuid":"500806081","full_name":"elrond-giants/erdjs-auth","owner":"elrond-giants","description":null,"archived":false,"fork":false,"pushed_at":"2024-08-20T07:18:42.000Z","size":219,"stargazers_count":6,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-09-21T14:05:16.980Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","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/elrond-giants.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":"2022-06-07T11:10:35.000Z","updated_at":"2024-08-20T07:18:46.000Z","dependencies_parsed_at":"2022-08-04T17:45:19.619Z","dependency_job_id":"c348a7ab-4a96-43e3-9f6a-bf16c83c76e4","html_url":"https://github.com/elrond-giants/erdjs-auth","commit_stats":{"total_commits":23,"total_committers":2,"mean_commits":11.5,"dds":"0.21739130434782605","last_synced_commit":"d84a1d09a707ce2bd156d98b5f4bd01d51ca480d"},"previous_names":[],"tags_count":13,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/elrond-giants%2Ferdjs-auth","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/elrond-giants%2Ferdjs-auth/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/elrond-giants%2Ferdjs-auth/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/elrond-giants%2Ferdjs-auth/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/elrond-giants","download_url":"https://codeload.github.com/elrond-giants/erdjs-auth/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243584433,"owners_count":20314760,"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":[],"created_at":"2024-07-30T20:00:55.000Z","updated_at":"2025-03-14T13:31:58.389Z","avatar_url":"https://github.com/elrond-giants.png","language":"TypeScript","funding_links":[],"categories":["MultiversX community"],"sub_categories":["SDKs and dev tools"],"readme":"# MultiversX Auth Providers\n\n### Overview\n\nThis library aims to make it easy to authenticate and sign transactions on MultiversX network. It offers a common interface\nfor all auth providers.\n\n### Install\n\n```bash\nnpm install @elrond-giants/erdjs-auth\n```\n\n### Usage\n\nThe library comes with simple provider factories for all providers. You can customize them by extending them, or you can\nchoose not to use them at all.\n\n```typescript\nimport {ExtensionProviderFactory} from \"@elrond-giants/erdjs-auth\";\n\n\nconst provider = new ExtensionProviderFactory().createProvider();\nawait provider.init();\n\n// you can pass a token to be included in auth signature\nconst token = \"some-token\";\nawait provider.login(token);\n````\n\n```typescript\nconst address = provider.getAddress();\nconst authSignature = provider.getSignature();\n```\n\nEvent listeners can be set for login/logout events.\n\n```typescript\nimport {WalletConnectProviderFactory} from \"@elrond-giants/erdjs-auth\";\n\nconst provider = new WalletConnectProviderFactory({\n    chainId: \"D\",\n    projectId: \"yourProjectId\"\n}).createProvider();\n\nprovider.on(\n    \"login\",\n    () =\u003e {\n        const {address} = provider.toJson();\n        console.log(address);\n    }\n);\nconst initialized = await provider.init();\n```\n\nIf you are using a react-based framework we recommend using the `@elrond-giants/erd-react-hooks` package as it makes the\nauthentication process even easier.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FElrond-Giants%2Ferdjs-auth","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FElrond-Giants%2Ferdjs-auth","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FElrond-Giants%2Ferdjs-auth/lists"}