Skip to main content

getOrder

Function

Get all orders for address.

This interface allows you to get all orders for all upload data for the address. The service provider can subscribe to the uploaded orders of the user's address and perform the payment service on behalf of the user.

Example

import { getOrders } from 'arseeding-js'
const run = async () => {
const arseedingUrl = 'https://arseed.web3infra.dev'
const address = '<your account address>'
const orders = await getOrders(arseedingUrl, address)
console.log(orders)
}
Warning

This interface returns data without the token tag required to pay for an order, but with currency, which can be returned via getTokenTagByEver, return the token tag for currency and assign it to the order data structure, which can be accessed via payOrder to store the payment.

Parameters

FieldDescription
arseedingUrlarseedUrl is the address of the Arseeding backend service that needs to be configured. Here we use the Arseed service provided by permadao at https://arseed.web3infra.dev.
addressaccount address.

Return Data

[
{
id: 1121936,
createdAt: '2023-07-04T10:29:31.313Z',
updatedAt: '2023-07-05T03:52:56.667Z',
itemId: 'b9qf5fCDY0dB-nF3ixPqL6pHVPFLiDvNYBm_MOi4yq4',
bundler: 'uDA8ZblC-lyEFfsYXKewpwaX-kkNDDw8az3IW9bDL68',
signer: '0x26361130d5d6E798E9319114643AF8c868412859',
signType: 3,
size: 203,
currency: 'USDC',
decimals: 6,
fee: '1247',
paymentExpiredTime: 1691058571,
expectedBlock: 1213090,
paymentStatus: 'paid',
paymentId: '0xe99cd34649e89e7bd207589d4df978c1e8ea3ef185f3616eb6fc25ebeaeb8c88',
onChainStatus: 'success',
sort: false,
kafka: true
}
//...
]