@@ -82,7 +82,7 @@ public extension Transaction {
82
82
throw " Missing signature on transaction. "
83
83
}
84
84
85
- let commit = API . shared. request ( for: . commit( self ) )
85
+ let commit = Arweave . shared. request ( for: . commit( self ) )
86
86
_ = try await HttpClient . request ( commit)
87
87
}
88
88
@@ -104,20 +104,20 @@ public extension Transaction {
104
104
public extension Transaction {
105
105
106
106
static func find( _ txId: TransactionId ) async throws -> Transaction {
107
- let findEndpoint = API . shared. request ( for: . transaction( id: txId) )
107
+ let findEndpoint = Arweave . shared. request ( for: . transaction( id: txId) )
108
108
let response = try await HttpClient . request ( findEndpoint)
109
109
return try JSONDecoder ( ) . decode ( Transaction . self, from: response. data)
110
110
}
111
111
112
112
static func data( for txId: TransactionId ) async throws -> Base64EncodedString {
113
- let target = API . shared. request ( for: . transactionData( id: txId) )
113
+ let target = Arweave . shared. request ( for: . transactionData( id: txId) )
114
114
let response = try await HttpClient . request ( target)
115
115
return String ( decoding: response. data, as: UTF8 . self)
116
116
}
117
117
118
118
static func status( of txId: TransactionId ) async throws -> Transaction . Status {
119
119
120
- let target = API . shared. request ( for: . transactionStatus( id: txId) )
120
+ let target = Arweave . shared. request ( for: . transactionStatus( id: txId) )
121
121
let response = try await HttpClient . request ( target)
122
122
123
123
var status : Transaction . Status
@@ -131,7 +131,7 @@ public extension Transaction {
131
131
}
132
132
133
133
static func price( for request: Transaction . PriceRequest ) async throws -> Amount {
134
- let target = API . shared. request ( for: . reward( request) )
134
+ let target = Arweave . shared. request ( for: . reward( request) )
135
135
let response = try await HttpClient . request ( target)
136
136
137
137
let costString = String ( decoding: response. data, as: UTF8 . self)
@@ -142,7 +142,7 @@ public extension Transaction {
142
142
}
143
143
144
144
static func anchor( ) async throws -> String {
145
- let target = API . shared. request ( for: . txAnchor)
145
+ let target = Arweave . shared. request ( for: . txAnchor)
146
146
let response = try await HttpClient . request ( target)
147
147
148
148
let anchor = String ( decoding: response. data, as: UTF8 . self)
0 commit comments