-
Notifications
You must be signed in to change notification settings - Fork 108
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
Showing
273 changed files
with
6,448 additions
and
1,076 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,8 +4,8 @@ | |
* REST api to TON blockchain explorer | ||
* Provide access to indexed TON blockchain | ||
* | ||
* The version of the OpenAPI document: 0.0.1 | ||
* Contact: [email protected] | ||
* The version of the OpenAPI document: 2.0.0 | ||
* Contact: [email protected] | ||
* | ||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). | ||
* https://openapi-generator.tech | ||
|
@@ -18,22 +18,26 @@ import type { | |
Account, | ||
AccountEvents, | ||
Accounts, | ||
DnsExpiring, | ||
DomainNames, | ||
FoundAccounts, | ||
GetAccountsRequest, | ||
GetBlock401Response, | ||
GetPublicKeyByAccountID200Response, | ||
JettonsBalances, | ||
NftItems, | ||
Subscriptions, | ||
TraceIds, | ||
} from '../models'; | ||
} from '../models/index'; | ||
import { | ||
AccountFromJSON, | ||
AccountToJSON, | ||
AccountEventsFromJSON, | ||
AccountEventsToJSON, | ||
AccountsFromJSON, | ||
AccountsToJSON, | ||
DnsExpiringFromJSON, | ||
DnsExpiringToJSON, | ||
DomainNamesFromJSON, | ||
DomainNamesToJSON, | ||
FoundAccountsFromJSON, | ||
|
@@ -42,6 +46,8 @@ import { | |
GetAccountsRequestToJSON, | ||
GetBlock401ResponseFromJSON, | ||
GetBlock401ResponseToJSON, | ||
GetPublicKeyByAccountID200ResponseFromJSON, | ||
GetPublicKeyByAccountID200ResponseToJSON, | ||
JettonsBalancesFromJSON, | ||
JettonsBalancesToJSON, | ||
NftItemsFromJSON, | ||
|
@@ -50,7 +56,7 @@ import { | |
SubscriptionsToJSON, | ||
TraceIdsFromJSON, | ||
TraceIdsToJSON, | ||
} from '../models'; | ||
} from '../models/index'; | ||
|
||
export interface DnsBackResolveRequest { | ||
accountId: string; | ||
|
@@ -64,6 +70,11 @@ export interface GetAccountsOperationRequest { | |
getAccountsRequest?: GetAccountsRequest; | ||
} | ||
|
||
export interface GetDnsExpiringRequest { | ||
accountId: string; | ||
period?: number; | ||
} | ||
|
||
export interface GetEventsByAccountRequest { | ||
accountId: string; | ||
limit: number; | ||
|
@@ -98,11 +109,16 @@ export interface GetJettonsHistoryByIDRequest { | |
|
||
export interface GetNftItemsByOwnerRequest { | ||
accountId: string; | ||
collection?: string; | ||
limit?: number; | ||
offset?: number; | ||
indirectOwnership?: boolean; | ||
} | ||
|
||
export interface GetPublicKeyByAccountIDRequest { | ||
accountId: string; | ||
} | ||
|
||
export interface GetSearchAccountsRequest { | ||
name: string; | ||
} | ||
|
@@ -116,6 +132,10 @@ export interface GetTracesByAccountRequest { | |
limit?: number; | ||
} | ||
|
||
export interface ReindexAccountRequest { | ||
accountId: string; | ||
} | ||
|
||
/** | ||
* AccountsApi - interface | ||
* | ||
|
@@ -165,6 +185,21 @@ export interface AccountsApiInterface { | |
*/ | ||
getAccounts(requestParameters: GetAccountsOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Accounts>; | ||
|
||
/** | ||
* Get expiring .ton dns | ||
* @param {string} accountId account ID | ||
* @param {number} [period] number of days before expiration | ||
* @param {*} [options] Override http request option. | ||
* @throws {RequiredError} | ||
* @memberof AccountsApiInterface | ||
*/ | ||
getDnsExpiringRaw(requestParameters: GetDnsExpiringRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<DnsExpiring>>; | ||
|
||
/** | ||
* Get expiring .ton dns | ||
*/ | ||
getDnsExpiring(requestParameters: GetDnsExpiringRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<DnsExpiring>; | ||
|
||
/** | ||
* Get events for an account. Each event is built on top of a trace which is a series of transactions caused by one inbound message. TonAPI looks for known patterns inside the trace and splits the trace into actions, where a single action represents a meaningful high-level operation like a Jetton Transfer or an NFT Purchase. Actions are expected to be shown to users. It is advised not to build any logic on top of actions because actions can be changed at any time. | ||
* @param {string} accountId account ID | ||
|
@@ -240,6 +275,7 @@ export interface AccountsApiInterface { | |
/** | ||
* Get all NFT items by owner address | ||
* @param {string} accountId account ID | ||
* @param {string} [collection] nft collection | ||
* @param {number} [limit] | ||
* @param {number} [offset] | ||
* @param {boolean} [indirectOwnership] Selling nft items in ton implemented usually via transfer items to special selling account. This option enables including items which owned not directly. | ||
|
@@ -254,6 +290,20 @@ export interface AccountsApiInterface { | |
*/ | ||
getNftItemsByOwner(requestParameters: GetNftItemsByOwnerRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<NftItems>; | ||
|
||
/** | ||
* Get public key by account id | ||
* @param {string} accountId account ID | ||
* @param {*} [options] Override http request option. | ||
* @throws {RequiredError} | ||
* @memberof AccountsApiInterface | ||
*/ | ||
getPublicKeyByAccountIDRaw(requestParameters: GetPublicKeyByAccountIDRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GetPublicKeyByAccountID200Response>>; | ||
|
||
/** | ||
* Get public key by account id | ||
*/ | ||
getPublicKeyByAccountID(requestParameters: GetPublicKeyByAccountIDRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GetPublicKeyByAccountID200Response>; | ||
|
||
/** | ||
* Search for accounts by name. You can find the account by the first characters of the domain. | ||
* @param {string} name | ||
|
@@ -297,6 +347,20 @@ export interface AccountsApiInterface { | |
*/ | ||
getTracesByAccount(requestParameters: GetTracesByAccountRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<TraceIds>; | ||
|
||
/** | ||
* Update internal cache for a particular account | ||
* @param {string} accountId account ID | ||
* @param {*} [options] Override http request option. | ||
* @throws {RequiredError} | ||
* @memberof AccountsApiInterface | ||
*/ | ||
reindexAccountRaw(requestParameters: ReindexAccountRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>>; | ||
|
||
/** | ||
* Update internal cache for a particular account | ||
*/ | ||
reindexAccount(requestParameters: ReindexAccountRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>; | ||
|
||
} | ||
|
||
/** | ||
|
@@ -393,6 +457,40 @@ export class AccountsApi extends runtime.BaseAPI implements AccountsApiInterface | |
return await response.value(); | ||
} | ||
|
||
/** | ||
* Get expiring .ton dns | ||
*/ | ||
async getDnsExpiringRaw(requestParameters: GetDnsExpiringRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<DnsExpiring>> { | ||
if (requestParameters.accountId === null || requestParameters.accountId === undefined) { | ||
throw new runtime.RequiredError('accountId','Required parameter requestParameters.accountId was null or undefined when calling getDnsExpiring.'); | ||
} | ||
|
||
const queryParameters: any = {}; | ||
|
||
if (requestParameters.period !== undefined) { | ||
queryParameters['period'] = requestParameters.period; | ||
} | ||
|
||
const headerParameters: runtime.HTTPHeaders = {}; | ||
|
||
const response = await this.request({ | ||
path: `/v2/accounts/{account_id}/dns/expiring`.replace(`{${"account_id"}}`, encodeURIComponent(String(requestParameters.accountId))), | ||
method: 'GET', | ||
headers: headerParameters, | ||
query: queryParameters, | ||
}, initOverrides); | ||
|
||
return new runtime.JSONApiResponse(response, (jsonValue) => DnsExpiringFromJSON(jsonValue)); | ||
} | ||
|
||
/** | ||
* Get expiring .ton dns | ||
*/ | ||
async getDnsExpiring(requestParameters: GetDnsExpiringRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<DnsExpiring> { | ||
const response = await this.getDnsExpiringRaw(requestParameters, initOverrides); | ||
return await response.value(); | ||
} | ||
|
||
/** | ||
* Get events for an account. Each event is built on top of a trace which is a series of transactions caused by one inbound message. TonAPI looks for known patterns inside the trace and splits the trace into actions, where a single action represents a meaningful high-level operation like a Jetton Transfer or an NFT Purchase. Actions are expected to be shown to users. It is advised not to build any logic on top of actions because actions can be changed at any time. | ||
*/ | ||
|
@@ -599,6 +697,10 @@ export class AccountsApi extends runtime.BaseAPI implements AccountsApiInterface | |
|
||
const queryParameters: any = {}; | ||
|
||
if (requestParameters.collection !== undefined) { | ||
queryParameters['collection'] = requestParameters.collection; | ||
} | ||
|
||
if (requestParameters.limit !== undefined) { | ||
queryParameters['limit'] = requestParameters.limit; | ||
} | ||
|
@@ -631,6 +733,36 @@ export class AccountsApi extends runtime.BaseAPI implements AccountsApiInterface | |
return await response.value(); | ||
} | ||
|
||
/** | ||
* Get public key by account id | ||
*/ | ||
async getPublicKeyByAccountIDRaw(requestParameters: GetPublicKeyByAccountIDRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GetPublicKeyByAccountID200Response>> { | ||
if (requestParameters.accountId === null || requestParameters.accountId === undefined) { | ||
throw new runtime.RequiredError('accountId','Required parameter requestParameters.accountId was null or undefined when calling getPublicKeyByAccountID.'); | ||
} | ||
|
||
const queryParameters: any = {}; | ||
|
||
const headerParameters: runtime.HTTPHeaders = {}; | ||
|
||
const response = await this.request({ | ||
path: `/v2/accounts/{account_id}/publickey`.replace(`{${"account_id"}}`, encodeURIComponent(String(requestParameters.accountId))), | ||
method: 'GET', | ||
headers: headerParameters, | ||
query: queryParameters, | ||
}, initOverrides); | ||
|
||
return new runtime.JSONApiResponse(response, (jsonValue) => GetPublicKeyByAccountID200ResponseFromJSON(jsonValue)); | ||
} | ||
|
||
/** | ||
* Get public key by account id | ||
*/ | ||
async getPublicKeyByAccountID(requestParameters: GetPublicKeyByAccountIDRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GetPublicKeyByAccountID200Response> { | ||
const response = await this.getPublicKeyByAccountIDRaw(requestParameters, initOverrides); | ||
return await response.value(); | ||
} | ||
|
||
/** | ||
* Search for accounts by name. You can find the account by the first characters of the domain. | ||
*/ | ||
|
@@ -729,4 +861,33 @@ export class AccountsApi extends runtime.BaseAPI implements AccountsApiInterface | |
return await response.value(); | ||
} | ||
|
||
/** | ||
* Update internal cache for a particular account | ||
*/ | ||
async reindexAccountRaw(requestParameters: ReindexAccountRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> { | ||
if (requestParameters.accountId === null || requestParameters.accountId === undefined) { | ||
throw new runtime.RequiredError('accountId','Required parameter requestParameters.accountId was null or undefined when calling reindexAccount.'); | ||
} | ||
|
||
const queryParameters: any = {}; | ||
|
||
const headerParameters: runtime.HTTPHeaders = {}; | ||
|
||
const response = await this.request({ | ||
path: `/v2/accounts/{account_id}/reindex`.replace(`{${"account_id"}}`, encodeURIComponent(String(requestParameters.accountId))), | ||
method: 'POST', | ||
headers: headerParameters, | ||
query: queryParameters, | ||
}, initOverrides); | ||
|
||
return new runtime.VoidApiResponse(response); | ||
} | ||
|
||
/** | ||
* Update internal cache for a particular account | ||
*/ | ||
async reindexAccount(requestParameters: ReindexAccountRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void> { | ||
await this.reindexAccountRaw(requestParameters, initOverrides); | ||
} | ||
|
||
} |
Oops, something went wrong.