-
Notifications
You must be signed in to change notification settings - Fork 1
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
Conversation
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. |
There was a problem hiding this 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/03-sdk/04-methods-reference/bridge-aggregate/bridgeAggregateBalance.md
Outdated
Show resolved
Hide resolved
docs/docs/03-sdk/04-methods-reference/bridge-aggregate/bridgeAggregateBalanceAndCall.md
Outdated
Show resolved
Hide resolved
|
||
function App() { | ||
return ( | ||
<SprinterContext baseUrl={Environment.MAINNET}> |
There was a problem hiding this comment.
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"); |
There was a problem hiding this comment.
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 => { |
There was a problem hiding this comment.
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 }
There was a problem hiding this comment.
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...} }
There was a problem hiding this comment.
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
}
return previousValue; | ||
}, | ||
{ | ||
["ETH"]: { |
There was a problem hiding this comment.
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
🤖 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>
🤖 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]>
closes #58
BREAKING CHANGE: All functions renamed, different API and flows, please consult docs or reach out to us directly!