Skip to content

CI Pipeline #6

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
46 changes: 0 additions & 46 deletions .github/workflows/bump-version.yml

This file was deleted.

34 changes: 0 additions & 34 deletions .github/workflows/deploy-docs.yml

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Semantic Release
name: Release

on:
release:
Expand All @@ -8,14 +8,9 @@ permissions:
contents: read # for checkout

jobs:
semantic-release:
release:
name: Release
runs-on: ubuntu-latest
permissions:
contents: write # to be able to publish a GitHub release
issues: write # to be able to comment on released issues
pull-requests: write # to be able to comment on released pull requests
id-token: write # to enable use of OIDC for npm provenance
steps:
- name: Checkout repo
uses: actions/checkout@v3
Expand All @@ -27,16 +22,27 @@ jobs:
with:
version: latest

- name: Install packages and build
- name: Install packages, compile SDK, and build docs
run: |
pnpm i
pnpm build
pnpm gen-docs

- name: Deploy Docs to Github Pages
uses: JamesIves/github-pages-deploy-action@v4
with:
folder: docs

- name: Verify the integrity of provenance attestations and registry signatures for installed dependencies
run: pnpm audit signatures

- name: Release
# Setup .npmrc file to publish to npm
- uses: actions/setup-node@v3
with:
node-version: '18.x'
registry-url: 'https://registry.npmjs.org'

- name: Publish
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
run: npx semantic-release
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
run: pnpm publish --access public --no-git-checks
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Build and Test
name: Test

on:
push:
Expand Down
5 changes: 0 additions & 5 deletions .releaserc.json

This file was deleted.

61 changes: 59 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,60 @@
# WIP

This is a work in progress. The API is not yet stable, and is subject to change, including breaking changes. Contributions welcome.

# Valorem TypeScript SDK

This is a TypeScript SDK for interacting with Valorem's smart contracts and Trade API.

## Installation

```bash
npm i @valorem-labs-inc/sdk
```

```bash
pnpm i @valorem-labs-inc/sdk
```

```bash
yarn add @valorem-labs-inc/sdk
```

## Getting Started

```typescript
import { createPublicClient, createWalletClient, http } from 'viem';
import { privateKeyToAccount } from 'viem/accounts';
import { arbitrumGoerli } from 'viem/chains';
import { ValoremSDK } from '@valorem-labs-inc/sdk';

// set up viem clients
const account = privateKeyToAccount(YOUR_PRIVATE_KEY);
const publicClient = createPublicClient({
chain: arbitrumGoerli,
transport: http(),
});
const walletClient = createWalletClient({
account,
chain: arbitrumGoerli,
transport: http(),
});

// init Valorem SDK
const valoremSDK = new ValoremSDK({
publicClient,
walletClient,
});
```

## Usage

```typescript
const webTaker = valoremSDK.webTaker;
await webTaker.signIn();
// now you can send requests to the Trade API
```

A full example of using the Valorem Typescript SDK to create an option, request a quote, and fulfill a trade order is located here: [@valorem-labs-inc/trade-interfaces/examples/typescript/src/RFQ_taker.ts](https://github.com/valorem-labs-inc/trade-interfaces/blob/main/examples/typescript/src/RFQ_taker.ts).

## Documentation

For documentation, visit [https://valorem-labs-inc.github.io/typescript-sdk/](https://valorem-labs-inc.github.io/typescript-sdk/)
19 changes: 13 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@valorem-labs-inc/sdk",
"version": "0.0.0",
"version": "0.0.1",
"repository": {
"type": "git",
"url": "https://github.com/valorem-labs-inc/typescript-sdk.git"
Expand Down Expand Up @@ -30,7 +30,6 @@
"lint:fix": "eslint . --fix",
"prepare": "git submodule update --init --recursive",
"prepublish": "pnpm build",
"semantic-release": "semantic-release",
"test": "vitest run --coverage"
},
"prettier": "@vercel/style-guide/prettier",
Expand All @@ -39,26 +38,34 @@
"@bufbuild/protobuf": "^1.3.3",
"@connectrpc/connect": "^1.1.2",
"@connectrpc/connect-node": "^1.1.2",
"@wagmi/core": "^1.4.3",
"viem": "^1.16.5"
"@wagmi/core": "^1.4.4"
},
"devDependencies": {
"@bufbuild/protoc-gen-es": "^1.3.3",
"@connectrpc/protoc-gen-connect-es": "^1.1.2",
"@connectrpc/protoc-gen-connect-query": "^0.5.3",
"@types/node": "^20.8.5",
"@types/node": "^20.8.7",
"@vercel/style-guide": "^5.0.1",
"@vitest/coverage-v8": "^0.34.6",
"eslint": "^8.51.0",
"prettier": "^3.0.3",
"semantic-release": "^22.0.5",
"ts-node": "^10.9.1",
"tsup": "^7.2.0",
"typedoc": "^0.25.2",
"typedoc-plugin-missing-exports": "^2.1.0",
"typescript": "^5.2.2",
"viem": "^1.16.5",
"vitest": "^0.34.6"
},
"peerDependencies": {
"typescript": ">=5.2.0",
"viem": ">=1.0.0"
},
"peerDependenciesMeta": {
"typescript": {
"optional": true
}
},
"packageManager": "pnpm@8.6.10",
"engines": {
"node": ">=18"
Expand Down
Loading