You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: source/mainnet/net/guides/wallet-sdk/wallet-sdk-account-transaction.rst
+47-2
Original file line number
Diff line number
Diff line change
@@ -143,9 +143,54 @@ Note that when the transaction has been signed anyone with the signature and the
143
143
144
144
.. tab::
145
145
146
-
Swift (iOS)
146
+
Swift (macOS, iOS)
147
+
148
+
.. code-block:: Swift
149
+
150
+
importConcordium
151
+
152
+
// Inputs.
153
+
let seedPhrase ="fence tongue sell large master side flock bronze ice accident what humble bring heart swear record valley party jar caution horn cushion endorse position"
154
+
let network = Network.testnet
155
+
let identityProviderID =IdentityProviderID(3)
156
+
let identityIndex =IdentityIndex(7)
157
+
let credentialCounter =CredentialCounter(21)
158
+
let amount =MicroCCDAmount(1337)
159
+
let receiver =try!AccountAddress(base58Check: "33Po4Z5v4DaAHo9Gz9Afc9LRzbZmYikus4Q7gqMaXHtdS17khz")
160
+
let expiry =TransactionTime(9_999_999_999)
161
+
162
+
/// Perform a transfer based on the inputs above.
163
+
functransfer(client: NodeClient) asyncthrows {
164
+
let seed =trydecodeSeed(seedPhrase, network)
165
+
166
+
// Derive seed based account from the given coordinates of the given seed.
167
+
let cryptoParams =tryawait client.cryptographicParameters(block: .lastFinal)
168
+
let accountDerivation =SeedBasedAccountDerivation(seed: seed, cryptoParams: cryptoParams)
169
+
let credentialIndexes =AccountCredentialSeedIndexes(
Copy file name to clipboardExpand all lines: source/mainnet/net/guides/wallet-sdk/wallet-sdk-credential-deployment.rst
+75-2
Original file line number
Diff line number
Diff line change
@@ -180,9 +180,82 @@ The following example demonstrates how a credential deployment transaction is cr
180
180
181
181
.. tab::
182
182
183
-
Swift (iOS)
183
+
Swift (macOS, iOS)
184
+
185
+
.. code-block:: Swift
186
+
187
+
importConcordium
188
+
importFoundation
189
+
190
+
// Inputs.
191
+
let seedPhrase ="fence tongue sell large master side flock bronze ice accident what humble bring heart swear record valley party jar caution horn cushion endorse position"
192
+
let network = Network.testnet
193
+
let identityProviderID =IdentityProviderID(3)
194
+
let identityIndex =IdentityIndex(7)
195
+
let credentialCounter =CredentialCounter(21)
196
+
let walletProxyBaseURL =URL(string: "https://wallet-proxy.testnet.concordium.com")!
197
+
let anonymityRevocationThreshold =RevocationThreshold(2)
198
+
let expiry =TransactionTime(9_999_999_999)
199
+
200
+
/// Perform account creation (on recovered identity) based on the inputs above.
Copy file name to clipboardExpand all lines: source/mainnet/net/guides/wallet-sdk/wallet-sdk-identity-creation.rst
+93-2
Original file line number
Diff line number
Diff line change
@@ -140,9 +140,100 @@ The first step is to create the actual identity request. To do this, you need th
140
140
141
141
.. tab::
142
142
143
-
Swift (iOS)
143
+
Swift (macOS, iOS)
144
+
145
+
.. code-block:: Swift
146
+
147
+
importConcordium
148
+
importFoundation
149
+
150
+
// Inputs.
151
+
let seedPhrase ="fence tongue sell large master side flock bronze ice accident what humble bring heart swear record valley party jar caution horn cushion endorse position"
152
+
let network = Network.testnet
153
+
let identityProviderID =IdentityProviderID(3)
154
+
let identityIndex =IdentityIndex(7)
155
+
let walletProxyBaseURL =URL(string: "https://wallet-proxy.testnet.concordium.com")!
156
+
let anonymityRevocationThreshold =RevocationThreshold(2)
157
+
158
+
/// Perform an identity creation based on the inputs above.
Copy file name to clipboardExpand all lines: source/mainnet/net/guides/wallet-sdk/wallet-sdk-identity-recovery.rst
+51-2
Original file line number
Diff line number
Diff line change
@@ -197,6 +197,55 @@ The next step is to send the generated identity recovery request to the associat
197
197
198
198
.. tab::
199
199
200
-
Swift (iOS)
200
+
Swift (macOS, iOS)
201
+
202
+
.. code-block:: Swift
203
+
204
+
importConcordium
205
+
importFoundation
206
+
207
+
// Inputs.
208
+
let seedPhrase ="fence tongue sell large master side flock bronze ice accident what humble bring heart swear record valley party jar caution horn cushion endorse position"
209
+
let network = Network.testnet
210
+
let identityProviderID =IdentityProviderID(3)
211
+
let identityIndex =IdentityIndex(7)
212
+
let walletProxyBaseURL =URL(string: "https://wallet-proxy.testnet.concordium.com")!
213
+
let anonymityRevocationThreshold =RevocationThreshold(2)
214
+
215
+
/// Perform identity recovery based on the inputs above.
0 commit comments