Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,12 @@ let package = Package(
targets: [
.target(name: "secp256k1"),
.target(
name: "Core",
name: "Web3Core",
dependencies: ["BigInt", "secp256k1", "CryptoSwift"]
),
.target(
name: "web3swift",
dependencies: ["Core", "BigInt", "secp256k1"],
dependencies: ["Web3Core", "BigInt", "secp256k1"],
resources: [
.copy("./Browser/browser.js"),
.copy("./Browser/browser.min.js"),
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ In the imports section:

```swift
import web3swift
import Core
import Web3Core
```

### Send Ether
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -262,7 +262,7 @@ extension ABI.Element {

extension ABI.Element.Function {
public func decodeInputData(_ rawData: Data) -> [String: Any]? {
return Core.decodeInputData(rawData, methodEncoding: methodEncoding, inputs: inputs)
return Web3Core.decodeInputData(rawData, methodEncoding: methodEncoding, inputs: inputs)
}

/// Decodes data returned by a function call. Able to decode `revert(string)`, `revert CustomError(...)` and `require(expression, string)` calls.
Expand Down Expand Up @@ -432,7 +432,7 @@ extension ABI.Element.Function {

extension ABI.Element.Constructor {
public func decodeInputData(_ rawData: Data) -> [String: Any]? {
return Core.decodeInputData(rawData, inputs: inputs)
return Web3Core.decodeInputData(rawData, inputs: inputs)
}
}

Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

import Foundation
import BigInt
import Core
import Web3Core

public extension IEth {
func callTransaction(_ transaction: CodableTransaction) async throws -> Data {
Expand Down
2 changes: 1 addition & 1 deletion Sources/web3swift/EthereumAPICalls/Ethereum/IEth.swift
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

import Foundation
import BigInt
import Core
import Web3Core

public protocol IEth {
var provider: Web3Provider { get }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

import Foundation
import BigInt
import Core
import Web3Core

extension Web3.Personal {
public func createAccount(password: String ) async throws -> EthereumAddress {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

import Foundation
import BigInt
import Core
import Web3Core

extension Web3.Personal {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

import Foundation
import BigInt
import Core
import Web3Core

extension Web3.Personal {
public func unlock(account: EthereumAddress, password: String, seconds: UInt = 300) async throws -> Bool {
Expand Down
2 changes: 1 addition & 1 deletion Sources/web3swift/EthereumAPICalls/TxPool.swift
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

import Foundation
import BigInt
import Core
import Web3Core

extension Web3.TxPool {
public func txPoolStatus() async throws -> TxPoolStatus {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

import Foundation
import BigInt
import Core
import Web3Core

extension Web3.BrowserFunctions {

Expand Down
2 changes: 1 addition & 1 deletion Sources/web3swift/HookedFunctions/Web3+Wallet.swift
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

import Foundation
import BigInt
import Core
import Web3Core

extension Web3.Web3Wallet {

Expand Down
2 changes: 1 addition & 1 deletion Sources/web3swift/Operations/ReadOperation.swift
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

import Foundation
import BigInt
import Core
import Web3Core

// FIXME: Rewrite this to CodableTransaction

Expand Down
2 changes: 1 addition & 1 deletion Sources/web3swift/Operations/WriteOperation.swift
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

import Foundation
import BigInt
import Core
import Web3Core

/// Wrapper for `EthererumTransaction.data` property appropriate encoding.
public class WriteOperation: ReadOperation {
Expand Down
2 changes: 1 addition & 1 deletion Sources/web3swift/Tokens/ERC1155/Web3+ERC1155.swift
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

import Foundation
import BigInt
import Core
import Web3Core

// Multi Token Standard
// FIXME: Rewrite this to CodableTransaction
Expand Down
2 changes: 1 addition & 1 deletion Sources/web3swift/Tokens/ERC1376/Web3+ERC1376.swift
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

import Foundation
import BigInt
import Core
import Web3Core

public enum IERC1376DelegateMode: UInt {
case PublicMsgSender = 0
Expand Down
2 changes: 1 addition & 1 deletion Sources/web3swift/Tokens/ERC1400/Web3+ERC1400.swift
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
//
import Foundation
import BigInt
import Core
import Web3Core

// Security Token Standard
protocol IERC1400: IERC20 {
Expand Down
2 changes: 1 addition & 1 deletion Sources/web3swift/Tokens/ERC1410/Web3+ERC1410.swift
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

import Foundation
import BigInt
import Core
import Web3Core

// Partially Fungible Token Standard
protocol IERC1410: IERC20 {
Expand Down
2 changes: 1 addition & 1 deletion Sources/web3swift/Tokens/ERC1594/Web3+ERC1594.swift
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

import Foundation
import BigInt
import Core
import Web3Core

// Core Security Token Standard
protocol IERC1594: IERC20 {
Expand Down
2 changes: 1 addition & 1 deletion Sources/web3swift/Tokens/ERC1633/Web3+ERC1633.swift
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

import Foundation
import BigInt
import Core
import Web3Core

// Re-Fungible Token Standard (RFT)
// FIXME: Rewrite this to CodableTransaction
Expand Down
2 changes: 1 addition & 1 deletion Sources/web3swift/Tokens/ERC1643/Web3+ERC1643.swift
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

import Foundation
import BigInt
import Core
import Web3Core

// Document Management Standard
protocol IERC1643: IERC20 {
Expand Down
2 changes: 1 addition & 1 deletion Sources/web3swift/Tokens/ERC1644/Web3+ERC1644.swift
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

import Foundation
import BigInt
import Core
import Web3Core

// Controller Token Operation Standard
protocol IERC1644: IERC20 {
Expand Down
2 changes: 1 addition & 1 deletion Sources/web3swift/Tokens/ERC20/Web3+ERC20.swift
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

import Foundation
import BigInt
import Core
import Web3Core

// Token Standard
protocol IERC20 {
Expand Down
2 changes: 1 addition & 1 deletion Sources/web3swift/Tokens/ERC721/Web3+ERC721.swift
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

import Foundation
import BigInt
import Core
import Web3Core

// Non-Fungible Token Standard
protocol IERC721: IERC165 {
Expand Down
2 changes: 1 addition & 1 deletion Sources/web3swift/Tokens/ERC721x/Web3+ERC721x.swift
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

import Foundation
import BigInt
import Core
import Web3Core

// A Smarter Token for the Future of Crypto Collectibles
// ERC721x is an extension of ERC721 that adds support for multi-fungible tokens and batch transfers, while being fully backward-compatible.
Expand Down
2 changes: 1 addition & 1 deletion Sources/web3swift/Tokens/ERC777/Web3+ERC777.swift
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
//
import Foundation
import BigInt
import Core
import Web3Core

// A New Advanced Token Standard
protocol IERC777: IERC20, IERC820 {
Expand Down
2 changes: 1 addition & 1 deletion Sources/web3swift/Tokens/ERC820/Web3+ERC820.swift
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
//

import Foundation
import Core
import Web3Core

// Pseudo-introspection using a registry contract
protocol IERC820: IERC165 {
Expand Down
2 changes: 1 addition & 1 deletion Sources/web3swift/Tokens/ERC888/Web3+ERC888.swift
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

import Foundation
import BigInt
import Core
import Web3Core

// MultiDimensional Token Standard
protocol IERC888 {
Expand Down
2 changes: 1 addition & 1 deletion Sources/web3swift/Tokens/ST20/Web3+ST20.swift
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

import Foundation
import BigInt
import Core
import Web3Core

// NPolymath Token Standard
protocol IST20: IERC20 {
Expand Down
2 changes: 1 addition & 1 deletion Sources/web3swift/Tokens/ST20/Web3+SecurityToken.swift
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

import Foundation
import BigInt
import Core
import Web3Core

/// The Ownable contract has an owner address, and provides basic authorization control functions, this simplifies the implementation of "user permissions".
protocol IOwnable {
Expand Down
2 changes: 1 addition & 1 deletion Sources/web3swift/Utils/EIP/EIP4361.swift
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

import Foundation
import BigInt
import Core
import Web3Core

public typealias SIWE = EIP4361

Expand Down
2 changes: 1 addition & 1 deletion Sources/web3swift/Utils/EIP/EIP67Code.swift
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
import Foundation
import CoreImage
import BigInt
import Core
import Web3Core

extension Web3 {

Expand Down
2 changes: 1 addition & 1 deletion Sources/web3swift/Utils/EIP/EIP681.swift
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

import Foundation
import BigInt
import Core
import Web3Core

extension Web3 {

Expand Down
2 changes: 1 addition & 1 deletion Sources/web3swift/Utils/EIP/EIP712.swift
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import CryptoSwift
import Foundation
import BigInt
import Core
import Web3Core

/// Protocol defines EIP712 struct encoding
public protocol EIP712Hashable {
Expand Down
2 changes: 1 addition & 1 deletion Sources/web3swift/Utils/ENS/ENS.swift
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

import Foundation
import BigInt
import Core
import Web3Core

public class ENS {

Expand Down
2 changes: 1 addition & 1 deletion Sources/web3swift/Utils/ENS/ENSBaseRegistrar.swift
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

import Foundation
import BigInt
import Core
import Web3Core

// FIXME: Rewrite this to CodableTransaction
public extension ENS {
Expand Down
2 changes: 1 addition & 1 deletion Sources/web3swift/Utils/ENS/ENSRegistry.swift
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

import Foundation
import BigInt
import Core
import Web3Core

public extension ENS {
class Registry {
Expand Down
2 changes: 1 addition & 1 deletion Sources/web3swift/Utils/ENS/ENSResolver.swift
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

import Foundation
import BigInt
import Core
import Web3Core

public extension ENS {
class Resolver {
Expand Down
2 changes: 1 addition & 1 deletion Sources/web3swift/Utils/ENS/ENSReverseRegistrar.swift
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

import Foundation
import BigInt
import Core
import Web3Core

public extension ENS {
class ReverseRegistrar {
Expand Down
2 changes: 1 addition & 1 deletion Sources/web3swift/Utils/ENS/ETHRegistrarController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

import Foundation
import BigInt
import Core
import Web3Core

public extension ENS {
class ETHRegistrarController {
Expand Down
2 changes: 1 addition & 1 deletion Sources/web3swift/Web3/Web3+Contract.swift
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

import Foundation
import BigInt
import Core
import Web3Core

extension Web3 {

Expand Down
2 changes: 1 addition & 1 deletion Sources/web3swift/Web3/Web3+EIP1559.swift
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

import Foundation
import BigInt
import Core
import Web3Core

/// EIP-1559 Base fee extension
///
Expand Down
2 changes: 1 addition & 1 deletion Sources/web3swift/Web3/Web3+EventParser.swift
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

import Foundation
import BigInt
import Core
import Web3Core

// extension web3.web3contract {
// /// An event parser to fetch events produced by smart-contract related transactions. Should not be constructed manually, but rather by calling the corresponding function on the web3contract object.
Expand Down
Loading