-
Notifications
You must be signed in to change notification settings - Fork 0
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
1 parent
6b4bcb5
commit def883b
Showing
6 changed files
with
101 additions
and
61 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
// | ||
// AptosFaucetClient.swift | ||
// | ||
// | ||
// Created by mathwallet on 2022/8/22. | ||
// | ||
|
||
import Foundation | ||
import PromiseKit | ||
|
||
public class AptosFaucetClient: AptosClientBase { | ||
|
||
/// This creates an account if it does not exist and mints the specified amount of coins into that account | ||
/// - Parameters: | ||
/// - address: Aptos account address | ||
/// - amount: Amount of tokens to mint | ||
/// - Returns: Hashes of submitted transactions | ||
public func fundAccount(address: AptosAddress, amount: UInt64) -> Promise<[String]> { | ||
let queryParameters: [String: Any] = [ | ||
"address": address.address, | ||
"amount": amount | ||
] | ||
return POST(path: "/mint", queryParameters: queryParameters) | ||
} | ||
} |
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
Oops, something went wrong.