Skip to content

Commit 6638bee

Browse files
Update README.md
1 parent 844a10b commit 6638bee

File tree

1 file changed

+12
-61
lines changed

1 file changed

+12
-61
lines changed

README.md

Lines changed: 12 additions & 61 deletions
Original file line numberDiff line numberDiff line change
@@ -1,77 +1,28 @@
11
# Lattice SDK Javascript
22

3+
[![Version](https://img.shields.io/npm/v/@anduril-industries/lattice-sdk.svg)][https://www.npmjs.com/package/@anduril-industries/lattice-sdk]
4+
35
The official [Anduril](https://www.anduril.com/) Lattice SDK for Javascript.
46

5-
## Requirements
7+
## Documentation
68

7-
[Active LTS Node.js version](https://nodejs.org/en/about/previous-releases)
8-
08/24: Node.js 20 or later
9+
See the [Anduril Lattice SDK for Javascript documentation](https://docs.anduril.com/sdks/javascript).
910

10-
## Installation
11+
## Requirements
1112

12-
### Authentication
13+
This repository is tested against the latest [Active LTS Node.js version](https://nodejs.org/en/about/previous-releases).
1314

14-
To authenticate with the Github package repository, you will need to generate a [personal access token](https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/managing-your-personal-access-tokens#creating-a-personal-access-token-classic). This should have at least `read:packages` scope. Please keep the token safe for the next stage of the setup procedure.
15+
## Installation
1516

16-
### .npmrc
17-
Create a file in the package directory
17+
1. Create a new NPM repository `npm init`
18+
2. Install the Lattice SDK package with
1819

1920
```
20-
@anduril:registry=https://npm.pkg.github.com
21-
//npm.pkg.github.com/:_authToken=<GITHUB_PERSONAL_ACCESS_TOKEN>
22-
```
23-
24-
### package.json
25-
Create a file in the package directory
26-
27-
```json
28-
{
29-
"dependencies": {
30-
"@anduril/lattice-sdk-javascript": "1.0.6",
31-
"@connectrpc/connect-node": "1.4.0"
32-
}
33-
}
34-
```
35-
36-
## Usage
37-
38-
Index.ts
39-
40-
```javascript
41-
import { EntityManagerAPI } from "@anduril/anduril-javascript/src/anduril/entitymanager/v1/entity_manager_api.pub_connect.js";
42-
import { createGrpcTransport } from "@connectrpc/connect-node";
43-
import { createPromiseClient } from "@connectrpc/connect";
44-
import { Entity } from "@anduril/lattice-sdk-javascript/src/anduril/entitymanager/v1/entity.pub_pb.js";
45-
46-
const transport = createGrpcTransport({
47-
// Requests will be made to <baseUrl>/<package>.<service>/method
48-
baseUrl: "https://${YOUR_BASE_URL}",
49-
50-
// You have to tell the Node.js http API which HTTP version to use.
51-
httpVersion: "2",
52-
53-
// Interceptors apply to all calls running through this transport.
54-
interceptors: [],
55-
});
56-
57-
async function main() {
58-
const client = createPromiseClient(EntityManagerAPI, transport);
59-
const headers = new Headers();
60-
headers.set("Authorization", "Bearer <YOUR BEAERER TOKEN>");
61-
62-
const response = await client.getEntity(
63-
{ entityId: "<ENTITY ID>" },
64-
{ headers: headers },
65-
);
66-
console.log(response);
67-
}
68-
69-
void main();
21+
npm i @anduril-industries/lattice-sdk
22+
# or
23+
yarn add @anduril-industries/lattice-sdk
7024
```
7125

7226
## Support
7327

7428
For support with this library please [file an issue](https://github.com/anduril/lattice-sdk-javascript/issues/new) or reach out to your Anduril representative.
75-
76-
77-

0 commit comments

Comments
 (0)