Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
E
Elixxir dApps SDK Swift
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
mobile
iOS
Elixxir dApps SDK Swift
Merge requests
!2
Bindings API wrapper
Code
Review changes
Check out branch
Download
Patches
Plain diff
Expand sidebar
Merged
Bindings API wrapper
feature/bindings-api-wrapper
into
main
Overview
0
Commits
42
Pipelines
0
Changes
1
Merged
Bindings API wrapper
Dariusz Rybicki
requested to merge
feature/bindings-api-wrapper
into
main
Jun 2, 2022
Overview
0
Commits
42
Pipelines
0
Changes
1
Get network follower status
Start network follower
Stop network follower
Wait for network
Make identity
Make connection
Make connection with authentication
Send E2E message using connection
Register listener and receive incoming messages data
Wait for message delivery
Get network health status
Listen for network health status changes
Get partner id from connection
Close connection
Check if connection is authenticated
Listen for client errors
Get client id
Get connection id
Check client processes status
Register listen and receive client logs
Configure client logging level
Get contact data from identity
Make rest-like request
Make authenticated rest-like request
Get version
Get git version
Get dependencies
Get contact id
Get contact pubkey
Get contact facts
Set contact facts
Edited
Jun 2, 2022
by
Dariusz Rybicki
0
0
Merge request reports
Viewing commit
79e8e4ac
Prev
Next
Show latest version
1 file
+
11
−
6
Side-by-side
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
79e8e4ac
Add regCode parameter to ClientCreator
· 79e8e4ac
Dariusz Rybicki
authored
Jun 2, 2022
Sources/ElixxirDAppsSDK/ClientCreator.swift
+
11
−
6
View file @ 79e8e4ac
Edit in single-file editor
Open in Web IDE
Show full file
import
Bindings
import
Bindings
public
struct
ClientCreator
{
public
struct
ClientCreator
{
public
var
create
:
(
URL
,
Data
,
Data
)
throws
->
Void
public
var
create
:
(
URL
,
Data
,
Data
,
String
?
)
throws
->
Void
public
func
callAsFunction
(
directoryURL
:
URL
,
ndf
:
Data
,
password
:
Data
)
throws
{
public
func
callAsFunction
(
try
create
(
directoryURL
,
ndf
,
password
)
directoryURL
:
URL
,
ndf
:
Data
,
password
:
Data
,
regCode
:
String
?
=
nil
)
throws
{
try
create
(
directoryURL
,
ndf
,
password
,
regCode
)
}
}
}
}
extension
ClientCreator
{
extension
ClientCreator
{
public
static
let
live
=
ClientCreator
{
directoryURL
,
ndf
,
password
in
public
static
let
live
=
ClientCreator
{
directoryURL
,
ndf
,
password
,
regCode
in
var
error
:
NSError
?
var
error
:
NSError
?
let
network
=
String
(
data
:
ndf
,
encoding
:
.
utf8
)
!
let
network
=
String
(
data
:
ndf
,
encoding
:
.
utf8
)
!
let
created
=
BindingsNewClient
(
network
,
directoryURL
.
path
,
password
,
nil
,
&
error
)
let
created
=
BindingsNewClient
(
network
,
directoryURL
.
path
,
password
,
regCode
,
&
error
)
if
let
error
=
error
{
if
let
error
=
error
{
throw
error
throw
error
}
}
@@ -24,7 +29,7 @@ extension ClientCreator {
@@ -24,7 +29,7 @@ extension ClientCreator {
#if DEBUG
#if DEBUG
extension
ClientCreator
{
extension
ClientCreator
{
public
static
let
failing
=
ClientCreator
{
_
,
_
,
_
in
public
static
let
failing
=
ClientCreator
{
_
,
_
,
_
,
_
in
struct
NotImplemented
:
Error
{}
struct
NotImplemented
:
Error
{}
throw
NotImplemented
()
throw
NotImplemented
()
}
}
Loading