Skip to content
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

feat!: refactor api #61

Merged
merged 44 commits into from
Oct 24, 2024
Merged

feat!: refactor api #61

merged 44 commits into from
Oct 24, 2024

Conversation

BeroBurny
Copy link
Collaborator

@BeroBurny BeroBurny commented Sep 26, 2024

closes #58

BREAKING CHANGE: All functions renamed, different API and flows, please consult docs or reach out to us directly!

@github-actions github-actions bot temporarily deployed to gopher-poc (Preview) September 26, 2024 11:09 Inactive
@github-actions github-actions bot temporarily deployed to gopher-docs (Preview) September 26, 2024 11:10 Inactive
@github-actions github-actions bot temporarily deployed to gopher-poc (Preview) September 26, 2024 12:21 Inactive
@github-actions github-actions bot temporarily deployed to gopher-docs (Preview) September 26, 2024 12:21 Inactive
@github-actions github-actions bot temporarily deployed to gopher-poc (Preview) October 1, 2024 14:48 Inactive
@github-actions github-actions bot temporarily deployed to gopher-docs (Preview) October 1, 2024 14:48 Inactive
@itsbobbyzzz168
Copy link
Collaborator

itsbobbyzzz168 commented Oct 1, 2024

Lets TRIPLE MAKE SURE, the docs are reflective before we merge because there will be breaking changes for B3. Let's give them notice once we deploy to testnet, and will only propogate changes to mainnet once they are confirmed to be working on testnet.

@BeroBurny BeroBurny marked this pull request as ready for review October 16, 2024 06:49
Copy link
Member

@mpetrunic mpetrunic left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe a section on executing transactions missing

docs/docs/02-quick-start.md Outdated Show resolved Hide resolved
docs/docs/03-sdk/02-installation.md Outdated Show resolved Hide resolved
docs/docs/03-sdk/02-installation.md Outdated Show resolved Hide resolved
docs/docs/03-sdk/03-configuration.md Show resolved Hide resolved
docs/docs/03-sdk/04-methods-reference/_how-to-calldata.md Outdated Show resolved Hide resolved
@github-actions github-actions bot temporarily deployed to gopher-poc (Preview) October 18, 2024 13:03 Inactive
@github-actions github-actions bot temporarily deployed to gopher-docs-preview (Preview) October 18, 2024 13:04 Inactive

function App() {
return (
<SprinterContext baseUrl={Environment.MAINNET}>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe change the name of baseUrl to environment

```typescript
import { setBaseUrl } from '@chainsafe/sprinter-sdk';

setBaseUrl("https://api.sprinter.buildwithsygma.com");
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same for this one, setEnvironment can be used here

### Example: Using `fetchOptions`

```typescript
sprinter.bridgeAndCall(settings, { baseUrl: 'https://custom.api.url' }).then(solution => {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

both parameters can be combined into a single object

{ settings, fetchOptions }

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fetchOptions is an optional paramether, and then you will have { setting: { bla bla...} }

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe have baseUrl/environment inside settings directly and rest of fetchOptions nested inside settings like:

settings: {
   env: MAINNET,
   fetchOptions: FetchOptionsWithoutBaseUrl
}

web/src/lib/components/SubmitTokensDrawer.svelte Outdated Show resolved Hide resolved
return previousValue;
},
{
["ETH"]: {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ETH might not be a native token on all EVM chains

@github-actions github-actions bot temporarily deployed to gopher-poc (Preview) October 24, 2024 06:11 Inactive
@github-actions github-actions bot temporarily deployed to gopher-docs-preview (Preview) October 24, 2024 06:11 Inactive
@github-actions github-actions bot temporarily deployed to gopher-poc (Preview) October 24, 2024 09:52 Inactive
@github-actions github-actions bot temporarily deployed to gopher-docs-preview (Preview) October 24, 2024 09:52 Inactive
@mpetrunic mpetrunic changed the title feat: reafactor api feat!: reafactor api Oct 24, 2024
@mpetrunic mpetrunic changed the title feat!: reafactor api feat!: refactor api Oct 24, 2024
@MakMuftic MakMuftic merged commit d6b1e9c into master Oct 24, 2024
5 checks passed
@MakMuftic MakMuftic deleted the beroburny/api-refactor branch October 24, 2024 14:20
@github-actions github-actions bot mentioned this pull request Oct 24, 2024
MakMuftic pushed a commit that referenced this pull request Oct 24, 2024
🤖 I have created a release *beep* *boop*
---


<details><summary>sprinter-sdk: 1.0.0</summary>

##
[1.0.0](sprinter-sdk-v0.3.0...sprinter-sdk-v1.0.0)
(2024-10-24)


### ⚠ BREAKING CHANGES

* All functions renamed, different API and flows, please consult docs or
reach out to us directly!

### Features

* get bridge history for an address
([#68](#68))
([4d524c6](4d524c6))
* refactor api
([#61](#61))
([d6b1e9c](d6b1e9c))
</details>

<details><summary>sprinter-react: 1.0.0</summary>

##
[1.0.0](sprinter-react-v0.2.1...sprinter-react-v1.0.0)
(2024-10-24)


### ⚠ BREAKING CHANGES

* All functions renamed, different API and flows, please consult docs or
reach out to us directly!

### Features

* get bridge history for an address
([#68](#68))
([4d524c6](4d524c6))
* refactor api
([#61](#61))
([d6b1e9c](d6b1e9c))
</details>

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
@github-actions github-actions bot mentioned this pull request Jan 13, 2025
Tbaut added a commit that referenced this pull request Jan 16, 2025
🤖 I have created a release *beep* *boop*
---


<details><summary>docs: 1.0.0</summary>

##
[1.0.0](docs-v0.0.1...docs-v1.0.0)
(2025-01-13)


### ⚠ BREAKING CHANGES

* All functions renamed, different API and flows, please consult docs or
reach out to us directly!

### Features

* add enableSwaps in `transferWithHook` and `transfer`
([#97](#97))
([bd21311](bd21311)),
closes [#94](#94)
* add relay to the docs
([#103](#103))
([310c506](310c506))
* Add sweep function
([#115](#115))
([efaaa2b](efaaa2b)),
closes [#110](#110)
* cross chain contract call
([#21](#21))
([69c0128](69c0128))
* depricate provider param from sdk
([#41](#41))
([72297fe](72297fe))
* docs POC ([#14](#14))
([8cd800d](8cd800d))
* dynamic supported network and tokens in docs
([#32](#32))
([abe5618](abe5618)),
closes [#29](#29)
* erc20 with contract call
([#39](#39))
([77e1d8d](77e1d8d)),
closes [#38](#38)
* native tokens transfers
([#40](#40))
([d4edf35](d4edf35)),
closes [#36](#36)
* refactor api
([#61](#61))
([d6b1e9c](d6b1e9c))
</details>

<details><summary>sprinter-sdk: 1.2.0</summary>

##
[1.2.0](sprinter-sdk-v1.1.2...sprinter-sdk-v1.2.0)
(2025-01-13)


### Features

* Add sweep function
([#115](#115))
([efaaa2b](efaaa2b)),
closes [#110](#110)


### Bug Fixes

* webpack import meta error
([#114](#114))
([f5f6fcf](f5f6fcf))
</details>

<details><summary>sprinter-react: 1.2.0</summary>

##
[1.2.0](sprinter-react-v1.1.2...sprinter-react-v1.2.0)
(2025-01-13)


### Features

* Add sweep function
([#115](#115))
([efaaa2b](efaaa2b)),
closes [#110](#110)
</details>

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).

---------

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Thibaut Sardan <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

API refactory
5 participants