{"id":39234000,"url":"https://github.com/perusworld/mtn-ts-wrapper","last_synced_at":"2026-01-17T23:44:54.524Z","repository":{"id":239645733,"uuid":"800132121","full_name":"perusworld/mtn-ts-wrapper","owner":"perusworld","description":"MTN Typescript Wrapper API","archived":false,"fork":false,"pushed_at":"2024-08-27T21:24:26.000Z","size":788,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-08-28T22:29:43.603Z","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":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/perusworld.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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":"2024-05-13T19:00:08.000Z","updated_at":"2024-08-27T21:24:30.000Z","dependencies_parsed_at":"2024-08-27T22:27:55.618Z","dependency_job_id":null,"html_url":"https://github.com/perusworld/mtn-ts-wrapper","commit_stats":null,"previous_names":["perusworld/mtn-ts-wrapper"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/perusworld/mtn-ts-wrapper","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/perusworld%2Fmtn-ts-wrapper","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/perusworld%2Fmtn-ts-wrapper/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/perusworld%2Fmtn-ts-wrapper/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/perusworld%2Fmtn-ts-wrapper/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/perusworld","download_url":"https://codeload.github.com/perusworld/mtn-ts-wrapper/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/perusworld%2Fmtn-ts-wrapper/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28522313,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-17T22:11:28.393Z","status":"ssl_error","status_checked_at":"2026-01-17T22:11:27.841Z","response_time":85,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":"2026-01-17T23:44:53.674Z","updated_at":"2026-01-17T23:44:54.516Z","avatar_url":"https://github.com/perusworld.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# MTN Typescript Wrapper API #\n\n## Install\n```bash\nnpm i https://github.com/perusworld/mtn-ts-wrapper.git\n```\n\n## Example Usage\nLook at the following testcases for examples. A version of [env file](.env.example) needs to be configured prior to running the testcases.\n\n[Token Test Case](./test/token.test.ts)\n\n[Earmark Test Case](./test/earmark.test.ts)\n\n### Token API Usage\n```typescript\n    import { TokenService, GetBurnRequest, GetMintRequest, GetTransferRequest,\n  buildTokenConfigurationFromEnv, uuid,  GetTokenBalanceRequest } from \"mtn-ts-wrapper\";\n\n    const fromTestAlias = process.env.TEST_FROM_ALIAS || '';\n    const toTestAlias = process.env.TEST_TO_ALIAS || '';\n    const amt = 1;\n    const cfg = buildTokenConfigurationFromEnv();\n    const tkn = new TokenService(cfg);\n\n    const balanceBefore = await tkn.getBalance(GetTokenBalanceRequest(toTestAlias, cfg))\n    const mintResp = await tkn.mint(GetMintRequest(uuid(), fromTestAlias, amt, cfg));\n    await tkn.waitForTokenOperation(mintResp?.operationId || '', cfg)\n    const transferResp = await tkn.transfer(GetTransferRequest(uuid(), fromTestAlias, toTestAlias, amt, cfg));\n    await tkn.waitForTokenOperation(transferResp?.operationId || '', cfg)\n    const balanceAfter = await tkn.getBalance(GetTokenBalanceRequest(toTestAlias, cfg))\n\n```\n\n### Earmark API Usage\n```typescript\n    import { EarmarkService, TokenService, GetEarmarkCreateRequest, GetEarmarkDepositRequest, GetEarmarkDetailsRequest,\n  GetEarmarkReleaseRequest, GetMintRequest, buildEarmarkConfigurationFromEnv, buildTokenConfigurationFromEnv, rndId, uuid\n } from \"mtn-ts-wrapper\";\n\n    const payerTestAlias = process.env.TEST_EARMARK_PAYER_ALIAS || '';\n    const recipientTestAlias = process.env.TEST_EARMARK_RECIPIENT_ALIAS || '';\n    const amt = 1;\n    const tknCfg = buildTokenConfigurationFromEnv();\n    const tkn = new TokenService(tknCfg);\n  \n    const emCfg = buildEarmarkConfigurationFromEnv();\n    const em = new EarmarkService(emCfg);\n      \n    const externalReference = rndId();\n    const created = await em.createEarmark(GetEarmarkCreateRequest(emCfg, externalReference, [{\n      accountAlias: payerTestAlias, amount: amt\n    }], [{\n      accountAlias: recipientTestAlias, amount: amt\n    }]));\n\n    const mintResp = await tkn.mint(GetMintRequest(uuid(), payerTestAlias, amt, tknCfg));\n    await tkn.waitForTokenOperation(mintResp?.operationId || '', tknCfg);\n\n    const deposited = await tkn.depositIntoEarmark(GetEarmarkDepositRequest(tknCfg, created?.earmarkId || '', payerTestAlias, amt));\n\n    const ready = await em.waitForEarmarkStatus(\"READY_FOR_RELEASE\", GetEarmarkDetailsRequest(emCfg, created?.earmarkId || ''));\n\n    const released = await em.releaseEarmark(GetEarmarkReleaseRequest(emCfg, created?.earmarkId || ''));\n\n    const executed = await em.waitForEarmarkStatus(\"EXECUTED\", GetEarmarkDetailsRequest(emCfg, created?.earmarkId || ''));\n\n    const details = await em.getEarmarkDetails(GetEarmarkDetailsRequest(emCfg, created?.earmarkId || ''));\n\n\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fperusworld%2Fmtn-ts-wrapper","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fperusworld%2Fmtn-ts-wrapper","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fperusworld%2Fmtn-ts-wrapper/lists"}