{"id":24676440,"url":"https://github.com/masa-finance/masa-sdk","last_synced_at":"2025-04-07T05:09:01.508Z","repository":{"id":64863388,"uuid":"556735212","full_name":"masa-finance/masa-sdk","owner":"masa-finance","description":"Masa SDK","archived":false,"fork":false,"pushed_at":"2024-05-17T08:06:25.000Z","size":4272,"stargazers_count":133,"open_issues_count":2,"forks_count":14,"subscribers_count":4,"default_branch":"main","last_synced_at":"2024-05-17T09:27:30.952Z","etag":null,"topics":["arweave","ethers","sdk","typescript"],"latest_commit_sha":null,"homepage":"https://masa.finance","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/masa-finance.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-10-24T12:18:31.000Z","updated_at":"2024-06-03T08:20:20.868Z","dependencies_parsed_at":"2023-12-18T11:27:24.270Z","dependency_job_id":"cae19247-58e7-4328-ad5c-e1534816783c","html_url":"https://github.com/masa-finance/masa-sdk","commit_stats":{"total_commits":518,"total_committers":6,"mean_commits":86.33333333333333,"dds":"0.11776061776061775","last_synced_commit":"962c5f2498d8cfcdd06ca752302cc6484ad5ce9a"},"previous_names":[],"tags_count":370,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/masa-finance%2Fmasa-sdk","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/masa-finance%2Fmasa-sdk/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/masa-finance%2Fmasa-sdk/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/masa-finance%2Fmasa-sdk/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/masa-finance","download_url":"https://codeload.github.com/masa-finance/masa-sdk/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247595334,"owners_count":20963943,"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":["arweave","ethers","sdk","typescript"],"created_at":"2025-01-26T12:15:04.161Z","updated_at":"2025-04-07T05:09:01.485Z","avatar_url":"https://github.com/masa-finance.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003c!-- TOC --\u003e\n\n- [Installation](#installation)\n- [Usage](#usage)\n- [Interface](#interface)\n- [Configuration](#configuration)\n\n\u003c!-- TOC --\u003e\n\n## Installation\n\nyarn  \n`yarn add @masa-finance/masa-sdk --save`\n\nnpm  \n`npm i @masa-finance/masa-sdk --save`\n\n## Usage\n\nBrowser:\n\n```typescript\nimport { Masa } from \"@masa-finance/masa-sdk\";\nimport { providers } from \"ethers\";\n\n// with metamask\nconst provider = new providers.Web3Provider(window.ethereum);\nconst signer = provider.getSigner();\n\n// by default Masa SDK will assume the provider points to ethereum mainnet and\n// will load contracts accordingly. If you plan to connect to a different network\n// the networkName must be specified i.e. like this: networkName: \"goerli\"\n\nexport const masa = new Masa({\n  signer,\n  // networkName: \"goerli\",\n});\n```\n\nNode:\n\n```typescript\nimport { Masa } from \"@masa-finance/masa-sdk\";\nimport { providers, Wallet } from \"ethers\";\n\nconst provider = new providers.JsonRpcProvider(\"your blockchain rpc endpoint\");\nconst wallet = new Wallet(\"your private key\", provider);\n\n// by default Masa SDK will assume the provider points to ethereum mainnet and\n// will load contracts accordingly. If you plan to connect to a different network\n// the networkName must be specified i.e. like this: networkName: \"goerli\"\n\nexport const masa = new Masa({\n  signer: wallet,\n  // networkName: \"goerli\",\n});\n```\n\n## Interface\n\nFor a detailed interface description see [Masa](docs/classes/Masa.md)\n\n## Configuration\n\n| Key              | Type                             | Description                                                                           | Default Value                          |\n| ---------------- | -------------------------------- | ------------------------------------------------------------------------------------- | -------------------------------------- |\n| cookie           | `string`                         | Cookie value. Don't set this manually unless you know what you do!                    |                                        |\n| wallet           | `ethers.Signer or ethers.Wallet` | The Wallet instance to use when interacting with the Blockchain.                      | \"wallet with a random private key\"     |\n| apiUrl           | `string`                         | The API Endpoint of the Masa Infrastructure for `dev`, `test`, `beta` and production. | \"https://dev.middleware.masa.finance/\" |\n| environment      | `string`                         | The environment to use `dev`, `test`, `beta`, `production`.                           | \"dev\"                                  |\n| network          | `string`                         | The network name ie. \"goerli\".                                                        | \"goerli\"                               |\n| arweave.host     | `string`                         | The arweave host to use for loading metadata.                                         | \"arweave.net\"                          |\n| arweave.port     | `number`                         | The arweave port to use for loading metadata.                                         | 443                                    |\n| arweave.protocol | `string`                         | The arweave protocol to use for loading metadata.                                     | \"https\"                                |\n| arweave.logging  | `boolean`                        | Turn arweave logging on or off.                                                       | false                                  |\n\n```typescript\nnew Masa({\n  // cookie value for connecting with the backend\n  cookie: \"my fancy cookie\",\n  // wallet object is always mandatory\n  wallet,\n  // api endpoint to the masa infrastructure\n  apiUrl: \"https://middleware.masa.finance\",\n  // masa environment dev, test, beta, prod\n  environment: \"prod\",\n  // network name to use goerli, mainnet\n  network: \"goerli\",\n  // arweave endpoint to use\n  arweave: {\n    host: \"arweave.net\",\n    port: 443,\n    protocol: \"https\",\n    logging: false,\n  },\n});\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmasa-finance%2Fmasa-sdk","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmasa-finance%2Fmasa-sdk","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmasa-finance%2Fmasa-sdk/lists"}