Skip to content
This repository has been archived by the owner on May 16, 2024. It is now read-only.

Commit

Permalink
Core SDK v1.0.0 (#185)
Browse files Browse the repository at this point in the history
* add ImmutableX.ts

* Cleanup exports.

* refactor: token type as string instead of enum
this allows consumer to avoid having to import TokenType enum

* DX-1154 refactor interfaces with SignableToken (#149)

* refactor: remove sender from transfer interfaces
sender eth address can be filled in using the wallet connection

* refactor(ERC20Deposit): remove unused field symbol

* refactor: simplify request interfaces
- Consolidate deposit/withdrawal interfaces with TokenAmount
- Simplify order/transfer request interfaces
- Remove decimals from ERC20 GetSignableToken requests [DX-1184]
- Remove token_id from ERC20 encode asset api call

* fix: optional chaining error response for 404 check

* [DX-1156] fix: Undecimalise amounts on deposits (#151)
Update depositETH and depositERC20 workflows to accept undecimalised amounts.

* [DX-1153] Signed timestamp APIs to handle auth internally (#153)

* [DX-1185]: Clean up dependencies (#162)

* [DX-1224] Fix peer dependency warnings (#163)

* DX-1152 remove stark key derivation (#150)

Added export function createStarkSigner(privateKey: string): StarkSigner in utils/stark/stark-signer
Added export function generatePrivateKey(): string in utils/stark/stark-curve to generate a new private key
at this point it's the responsibility of the developer to store the key against Eth address
Removed Stark key derivation from Eth signature - this is going to be moved to Wallet/Link SDK
Removed ethereumjs-wallet dependency
moved code and renamed some files

* fix(isRegisteredOnchain): handle USER_UNREGISTERED (#169)

Registration contract isRegistered method may throw `error.reason = 'USER_UNREGISTERED'`
Updated to catch errors where reason is USER_UNREGISTERED to return
false. For all other errors, throw exception.

This issue was causing exceptions for registerAndDeposit/Withdraw
methods when using unregistered(onchain) users.

* [DX-1221] Annotate exposed functions & types (#170)

* feat: Add typedoc annotations to custom types & refactor export structure

* [DX-1235] Return expected response types (#172)

* Beta release support (#181)

* feat: Add beta tagging for releases

* feat: add methods from MetadataRefreshesApi (#175)

Co-authored-by: Chris James <[email protected]>
Co-authored-by: Nik Ho <[email protected]>
Co-authored-by: Kostia Kim <[email protected]>
Co-authored-by: Matthew Muscat <[email protected]>
Co-authored-by: Adaura <[email protected]>
  • Loading branch information
6 people authored Oct 5, 2022
1 parent 29566eb commit 6253059
Show file tree
Hide file tree
Showing 180 changed files with 6,795 additions and 3,154 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/publish.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,8 @@ jobs:
- name: Build
run: yarn build

- name: Update package.json version for alpha releases
if: ${{ contains(github.event.inputs.tag, 'alpha') }}
- name: Update package.json version for alpha, beta releases
if: ${{ contains(github.event.inputs.tag, 'alpha') || contains(github.event.inputs.tag, 'beta') }}
run: |
tmp=$(mktemp)
jq '.version = "${{github.event.inputs.tag}}"' ./package.json > "$tmp" && mv "$tmp" ./package.json
Expand All @@ -67,4 +67,4 @@ jobs:
with:
token: ${{ secrets.PLATFORM_SA_NPM_TOKEN }}
access: public
tag: ${{ contains(github.event.inputs.tag, 'alpha') && 'alpha' || 'latest' }}
tag: ${{ (contains(github.event.inputs.tag, 'alpha') && 'alpha') || (contains(github.event.inputs.tag, 'beta') && 'beta') || 'latest' }}
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,6 @@ cache
artifacts

dist
docs/

.vscode/
13 changes: 13 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,19 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [Unreleased]

### Changed

- Expose fewer public methods to make it easier for us to maintain the SDK.
- Introduced a [single entry point](https://github.com/immutable/imx-core-sdk/blob/34629c169f2c0fc6e38e73ec75a814f36b680620/src/ImmutableX.ts#L64) for the SDK to improve discoverability
- Clear response and error types, no more Axios wrappers
- Simplified complex types required for creating trades, orders and transfers, no more SignableToken in the interface
- Make the deposit method on SDK consistent with the API and industry norms.
- SDK now handles L1 signature-protected APIs; no need to generate imx-signature separately for authentication headers
- Removed wallet-specific logic
- Removed the `ethereumjs-wallet` dependency.

## [0.7.0] - 2022-08-03

### Added
Expand Down
Loading

0 comments on commit 6253059

Please sign in to comment.