-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
16 changed files
with
429 additions
and
243 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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 |
---|---|---|
@@ -0,0 +1,157 @@ | ||
# Connecting to a node | ||
|
||
The first step is to construct the SDK configuration. In it the environment and Greenlight node configuration is defined, whether you are using an invite code or partner credentials. | ||
|
||
The SDK uses the config working directory to store the state of the SDK instance. Once a connection has been established with a node, the working directory can only be used for that node. When handling multiple instances of the SDK, one per node, each needs to have a different working directory defined. | ||
|
||
Now you are ready to interact with the SDK. | ||
|
||
<custom-tabs category="lang"> | ||
<div slot="title">Rust</div> | ||
<section> | ||
|
||
```rust,ignore | ||
{{#include ../../snippets/rust/src/getting_started.rs:init-sdk}} | ||
``` | ||
|
||
</section> | ||
|
||
<div slot="title">Swift</div> | ||
<section> | ||
|
||
```swift,ignore | ||
{{#include ../../snippets/swift/BreezSDKExamples/Sources/GettingStarted.swift:init-sdk}} | ||
``` | ||
|
||
</section> | ||
|
||
<div slot="title">Kotlin</div> | ||
<section> | ||
|
||
```kotlin,ignore | ||
{{#include ../../snippets/kotlin_mpp_lib/shared/src/commonMain/kotlin/com/example/kotlinmpplib/GettingStarted.kt:init-sdk}} | ||
``` | ||
|
||
</section> | ||
|
||
<div slot="title">React Native</div> | ||
<section> | ||
|
||
```typescript | ||
{{#include ../../snippets/react-native/getting_started.ts:init-sdk}} | ||
``` | ||
|
||
</section> | ||
|
||
<div slot="title">Dart</div> | ||
<section> | ||
|
||
```dart,ignore | ||
{{#include ../../snippets/dart_snippets/lib/getting_started.dart:init-sdk}} | ||
``` | ||
</section> | ||
|
||
<div slot="title">Python</div> | ||
<section> | ||
|
||
```python,ignore | ||
{{#include ../../snippets/python/src/getting_started.py:init-sdk}} | ||
``` | ||
</section> | ||
|
||
<div slot="title">Go</div> | ||
<section> | ||
|
||
```go,ignore | ||
{{#include ../../snippets/go/getting_started.go:init-sdk}} | ||
``` | ||
</section> | ||
|
||
<div slot="title">C#</div> | ||
<section> | ||
|
||
```cs,ignore | ||
{{#include ../../snippets/csharp/GettingStarted.cs:init-sdk}} | ||
``` | ||
</section> | ||
</custom-tabs> | ||
|
||
<div class="warning"> | ||
<h4>Developer note</h4> | ||
|
||
By default the config working directory is set to `./`. Some platforms may require that you use an application specific directory that is writable within the application sandbox. For example applications running on Android or iOS. | ||
|
||
</div> | ||
<br/> | ||
|
||
To connect to an already existing node without registering a new one, use the `restore_only` flag in the connect request. If the node does not exist it will result in an error. | ||
|
||
<custom-tabs category="lang"> | ||
<div slot="title">Rust</div> | ||
<section> | ||
|
||
```rust,ignore | ||
{{#include ../../snippets/rust/src/getting_started.rs:init-sdk-restore-only}} | ||
``` | ||
|
||
</section> | ||
|
||
<div slot="title">Swift</div> | ||
<section> | ||
|
||
```swift,ignore | ||
{{#include ../../snippets/swift/BreezSDKExamples/Sources/GettingStarted.swift:init-sdk-restore-only}} | ||
``` | ||
|
||
</section> | ||
|
||
<div slot="title">Kotlin</div> | ||
<section> | ||
|
||
```kotlin,ignore | ||
{{#include ../../snippets/kotlin_mpp_lib/shared/src/commonMain/kotlin/com/example/kotlinmpplib/GettingStarted.kt:init-sdk-restore-only}} | ||
``` | ||
|
||
</section> | ||
|
||
<div slot="title">React Native</div> | ||
<section> | ||
|
||
```typescript | ||
{{#include ../../snippets/react-native/getting_started.ts:init-sdk-restore-only}} | ||
``` | ||
|
||
</section> | ||
|
||
<div slot="title">Dart</div> | ||
<section> | ||
|
||
```dart,ignore | ||
{{#include ../../snippets/dart_snippets/lib/getting_started.dart:init-sdk-restore-only}} | ||
``` | ||
</section> | ||
|
||
<div slot="title">Python</div> | ||
<section> | ||
|
||
```python,ignore | ||
{{#include ../../snippets/python/src/getting_started.py:init-sdk-restore-only}} | ||
``` | ||
</section> | ||
|
||
<div slot="title">Go</div> | ||
<section> | ||
|
||
```go,ignore | ||
{{#include ../../snippets/go/getting_started.go:init-sdk-restore-only}} | ||
``` | ||
</section> | ||
|
||
<div slot="title">C#</div> | ||
<section> | ||
|
||
```cs,ignore | ||
{{#include ../../snippets/csharp/GettingStarted.cs:init-sdk-restore-only}} | ||
``` | ||
</section> | ||
</custom-tabs> |
Oops, something went wrong.