-
Notifications
You must be signed in to change notification settings - Fork 3
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
0xAlcibiades
merged 7 commits into
main
from
nickadamson/val-1486-ci-pipeline-for-typescript-sdk
Oct 18, 2023
Merged
CI Pipeline #6
Changes from all commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
fbdf56d
ci: refactor ci workflows
nickadamson 75cdf20
ci: allow publishing on refs/tags/* branches
nickadamson 26d5dac
feat: tag 0.0.1
nickadamson 7b0dc38
chore: set peer dependencies
nickadamson 894aaa0
docs: add link to docs + example in README
nickadamson 949ae47
fix: link
nickadamson 66a6ba3
chore: update readme
nickadamson File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
.github/workflows/build-and-test.yml → .github/workflows/test.yml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
name: Build and Test | ||
name: Test | ||
|
||
on: | ||
push: | ||
|
This file was deleted.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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/) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.