diff --git a/.changelog/2076.feature.md b/.changelog/2076.feature.md
new file mode 100644
index 0000000000..78d22c3c44
--- /dev/null
+++ b/.changelog/2076.feature.md
@@ -0,0 +1 @@
+Add support for Nexus API as a backend option for Wallet
diff --git a/.vscode/settings.json b/.vscode/settings.json
index c6a8945730..b63cf3a847 100644
--- a/.vscode/settings.json
+++ b/.vscode/settings.json
@@ -38,6 +38,12 @@
"src/vendors/oasisscan/.openapi-generator": true,
"src/vendors/oasisscan/.openapi-generator-ignore": true,
"src/vendors/oasisscan/runtime.ts": true,
- "src/vendors/oasisscan/index.ts": true
+ "src/vendors/oasisscan/index.ts": true,
+ "src/vendors/nexus/apis": true,
+ "src/vendors/nexus/models": true,
+ "src/vendors/nexus/.openapi-generator": true,
+ "src/vendors/nexus/.openapi-generator-ignore": true,
+ "src/vendors/nexus/runtime.ts": true,
+ "src/vendors/nexus/index.ts": true
}
}
diff --git a/internals/getSecurityHeaders.js b/internals/getSecurityHeaders.js
index 500a7f5cf2..38c88dda0b 100644
--- a/internals/getSecurityHeaders.js
+++ b/internals/getSecurityHeaders.js
@@ -48,6 +48,8 @@ const getCsp = ({ isExtension, isDev }) =>
https://grpc.oasis.io
https://testnet.grpc.oasis.io
https://api.oasisscan.com
+ https://nexus.oasis.io
+ https://testnet.nexus.oasis.io
${isDev ? localnet : ''}
${isDev ? hmr : ''}
;
diff --git a/src/app/components/ErrorFormatter/index.tsx b/src/app/components/ErrorFormatter/index.tsx
index 7ed7c11ebe..93c11501d0 100644
--- a/src/app/components/ErrorFormatter/index.tsx
+++ b/src/app/components/ErrorFormatter/index.tsx
@@ -22,6 +22,7 @@ export function ErrorFormatter(props: Props) {
const backendToLabel = {
[BackendAPIs.OasisMonitor]: t('backends.oasismonitor', 'Oasis Monitor API'),
[BackendAPIs.OasisScan]: t('backends.oasisscan', 'Oasis Scan API'),
+ [BackendAPIs.Nexus]: t('backends.nexus', 'Nexus API'),
}
const errorMap: { [code in WalletErrors]: string | React.ReactElement } = {
diff --git a/src/app/components/Footer/index.tsx b/src/app/components/Footer/index.tsx
index c35507f80d..81260eb030 100644
--- a/src/app/components/Footer/index.tsx
+++ b/src/app/components/Footer/index.tsx
@@ -27,6 +27,7 @@ export const Footer = memo(() => {
const backendToLabel = {
[BackendAPIs.OasisMonitor]: t('footer.poweredBy.oasismonitor', 'Oasis Monitor API & Oasis gRPC'),
[BackendAPIs.OasisScan]: t('footer.poweredBy.oasisscan', 'Oasis Scan API & Oasis gRPC'),
+ [BackendAPIs.Nexus]: t('footer.poweredBy.nexus', 'Nexus API & Oasis gRPC'),
}
const poweredByLabel = backendToLabel[backend()]
diff --git a/src/app/lib/helpers.ts b/src/app/lib/helpers.ts
index 46c81c1955..cafafb7336 100644
--- a/src/app/lib/helpers.ts
+++ b/src/app/lib/helpers.ts
@@ -119,3 +119,8 @@ export const getDefaultFeeAmount = (isDepositing: boolean, paraTimeConfig: ParaT
export function parseConsensusToLayerBaseUnit(feeAmount: string, decimals: number): BigNumber {
return new BigNumber(feeAmount).shiftedBy(decimals).shiftedBy(-consensusDecimals)
}
+
+export function removeTrailingZeros(value: string, zeros: number): string {
+ const bigValue = new BigNumber(value)
+ return bigValue.dividedBy(new BigNumber(10).pow(zeros)).toFixed()
+}
diff --git a/src/config.ts b/src/config.ts
index d36d2d8e83..e76ba72b89 100644
--- a/src/config.ts
+++ b/src/config.ts
@@ -8,6 +8,7 @@ export const consensusDecimals = 9
export enum BackendAPIs {
OasisMonitor = 'oasismonitor',
OasisScan = 'oasisscan',
+ Nexus = 'nexus',
}
type BackendApiUrls = {
@@ -23,6 +24,7 @@ type BackendProviders = {
min_delegation: number // from nic.stakingConsensusParameters().min_delegation
[BackendAPIs.OasisMonitor]: BackendApiUrls
[BackendAPIs.OasisScan]: BackendApiUrls
+ [BackendAPIs.Nexus]: BackendApiUrls
}
type BackendConfig = {
@@ -44,6 +46,12 @@ export const config: BackendConfig = {
blockExplorerParatimes: 'https://oasisscan.com/paratimes/transactions/{{txHash}}?runtime={{runtimeId}}',
blockExplorerAccount: 'https://www.oasisscan.com/accounts/detail/{{address}}',
},
+ [BackendAPIs.Nexus]: {
+ explorer: 'https://nexus.oasis.io/v1',
+ blockExplorer: 'https://oasisscan.com/transactions/{{txHash}}',
+ blockExplorerParatimes: 'https://explorer.oasis.io/mainnet/{{runtimeId}}/tx/{{txHash}}',
+ blockExplorerAccount: 'https://www.oasisscan.com/accounts/detail/{{address}}',
+ },
},
testnet: {
grpc: 'https://testnet.grpc.oasis.io',
@@ -56,8 +64,13 @@ export const config: BackendConfig = {
[BackendAPIs.OasisScan]: {
explorer: 'https://api.oasisscan.com/testnet',
blockExplorer: 'https://testnet.oasisscan.com/transactions/{{txHash}}',
- blockExplorerParatimes:
- 'https://testnet.oasisscan.com/paratimes/transactions/{{txHash}}?runtime={{runtimeId}}',
+ blockExplorerParatimes: 'https://testnet.oasisscan.com/paratimes/tx/{{txHash}}',
+ blockExplorerAccount: 'https://testnet.oasisscan.com/accounts/detail/{{address}}',
+ },
+ [BackendAPIs.Nexus]: {
+ explorer: 'https://testnet.nexus.oasis.io/v1',
+ blockExplorer: 'https://testnet.oasisscan.com/transactions/{{txHash}}',
+ blockExplorerParatimes: 'https://explorer.oasis.io/testnet/{{runtimeId}}/transactions/{{txHash}}',
blockExplorerAccount: 'https://testnet.oasisscan.com/accounts/detail/{{address}}',
},
},
@@ -76,6 +89,13 @@ export const config: BackendConfig = {
'http://localhost:9001/data/paratimes/transactions/{{txHash}}?runtime={{runtimeId}}',
blockExplorerAccount: 'http://localhost:9001/data/accounts/detail/{{address}}',
},
+ [BackendAPIs.Nexus]: {
+ explorer: 'http://localhost:9001',
+ blockExplorer: 'http://localhost:9001/data/transactions?operation_id={{txHash}}',
+ blockExplorerParatimes:
+ 'http://localhost:9001/data/paratimes/transactions/{{txHash}}?runtime={{runtimeId}}',
+ blockExplorerAccount: 'http://localhost:9001/data/accounts/detail/{{address}}',
+ },
},
}
diff --git a/src/locales/en/translation.json b/src/locales/en/translation.json
index ae27373430..a9c2fb1619 100644
--- a/src/locales/en/translation.json
+++ b/src/locales/en/translation.json
@@ -107,7 +107,8 @@
"appTitle": "ROSE Wallet",
"backends": {
"oasismonitor": "Oasis Monitor API",
- "oasisscan": "Oasis Scan API"
+ "oasisscan": "Oasis Scan API",
+ "nexus": "Nexus API"
},
"banner": {
"buildPreview": "Please note this is an experimental build of ROSE Wallet and your secrets are not safe. ONLY USE IT FOR TESTING.",
@@ -198,7 +199,8 @@
"github": "ROSE Wallet is open source and powered by",
"poweredBy": {
"oasismonitor": "Oasis Monitor API & Oasis gRPC",
- "oasisscan": "Oasis Scan API & Oasis gRPC"
+ "oasisscan": "Oasis Scan API & Oasis gRPC",
+ "nexus": "Nexus API & Oasis gRPC"
},
"terms": "Terms and Conditions",
"version": "Version: (commit: ) built at {{buildTime}}"
diff --git a/src/types/env.d.ts b/src/types/env.d.ts
index 2abfeed6b6..de0c18ab2a 100644
--- a/src/types/env.d.ts
+++ b/src/types/env.d.ts
@@ -1,6 +1,6 @@
declare namespace NodeJS {
export interface ProcessEnv {
- REACT_APP_BACKEND: 'oasismonitor' | 'oasisscan'
+ REACT_APP_BACKEND: 'oasismonitor' | 'oasisscan' | 'nexus'
REACT_APP_TRANSAK_URL: string
REACT_APP_TRANSAK_PARTNER_ID: string
REACT_APP_LOCALNET: '1' | undefined
diff --git a/src/vendors/backend.ts b/src/vendors/backend.ts
index 91deb4d8ca..cad79ba741 100644
--- a/src/vendors/backend.ts
+++ b/src/vendors/backend.ts
@@ -1,10 +1,12 @@
import { getMonitorAPIs } from 'vendors/monitor'
import { getOasisscanAPIs } from 'vendors/oasisscan'
+import { getNexusAPIs } from 'vendors/nexus'
import { BackendAPIs } from 'config'
const backendNameToApi = {
[BackendAPIs.OasisMonitor]: getMonitorAPIs,
[BackendAPIs.OasisScan]: getOasisscanAPIs,
+ [BackendAPIs.Nexus]: getNexusAPIs,
}
export const backend = () => process.env.REACT_APP_BACKEND || BackendAPIs.OasisMonitor
diff --git a/src/vendors/nexus.ts b/src/vendors/nexus.ts
new file mode 100644
index 0000000000..e2ebd82df8
--- /dev/null
+++ b/src/vendors/nexus.ts
@@ -0,0 +1,315 @@
+import * as oasis from '@oasisprotocol/client'
+import {
+ Configuration,
+ Account as NexusAccount,
+ Delegation as NexusDelegation,
+ DebondingDelegation as NexusDebondingDelegation,
+ DefaultApi as NexusApi,
+ Transaction as NexusTransaction,
+ RuntimeTransaction as NexusRuntimeTransaction,
+ Validator as NexusValidator,
+ ConsensusTxMethod,
+ Runtime,
+ RuntimeTransaction,
+ ConsensusEventType,
+} from 'vendors/nexus/index'
+import { Account } from 'app/state/account/types'
+import { Transaction, TransactionStatus, TransactionType } from 'app/state/transaction/types'
+import { DebondingDelegation, Delegation, Validator } from 'app/state/staking/types'
+import { StringifiedBigInt } from 'types/StringifiedBigInt'
+import { throwAPIErrors } from './helpers'
+import { removeTrailingZeros } from 'app/lib/helpers'
+import { consensusDecimals, paraTimesConfig } from '../config'
+
+export interface ExtendedRuntimeTransaction extends NexusRuntimeTransaction {
+ decimals: number
+ runtimeId: Runtime
+ runtimeName: string
+}
+
+export function getNexusAPIs(url: string | 'https://nexus.oasis.io/v1/') {
+ const explorerConfig = new Configuration({
+ basePath: url,
+ ...throwAPIErrors,
+ })
+
+ const api = new NexusApi(explorerConfig)
+
+ async function getAccount(address: string): Promise {
+ const account = await api.consensusAccountsAddressGet({ address })
+ if (!account) throw new Error('Wrong response code')
+
+ return parseAccount(account)
+ }
+
+ async function getAllValidators(): Promise {
+ const validatorsResponse = await api.consensusValidatorsGet({})
+ if (!validatorsResponse) throw new Error('Wrong response code')
+
+ return parseValidatorsList(validatorsResponse.validators)
+ }
+
+ function extendRuntimeTransaction(
+ runtime: Runtime,
+ runtimeTransaction: RuntimeTransaction,
+ ): ExtendedRuntimeTransaction {
+ const config =
+ runtime === Runtime.Sapphire
+ ? paraTimesConfig.sapphire
+ : runtime === Runtime.Emerald
+ ? paraTimesConfig.emerald
+ : undefined
+
+ return {
+ ...runtimeTransaction,
+ decimals: config?.decimals || consensusDecimals,
+ runtimeId: runtime,
+ runtimeName: runtime.charAt(0).toUpperCase() + runtime.slice(1),
+ }
+ }
+
+ function mergeTransactions(
+ limit: number,
+ ...responses: (NexusTransaction | ExtendedRuntimeTransaction)[][]
+ ): (NexusTransaction | ExtendedRuntimeTransaction)[] {
+ const mergedList = responses.flat()
+ mergedList.sort((a, b) => new Date(b.timestamp).getTime() - new Date(a.timestamp).getTime())
+
+ return mergedList.slice(0, limit)
+ }
+
+ async function getTransactionsList(params: { accountId: string; limit: number }) {
+ try {
+ const [consensusResponse, sapphireResponse, emeraldResponse] = await Promise.all([
+ api.consensusTransactionsGet({
+ rel: params.accountId,
+ limit: params.limit,
+ }),
+ api.runtimeTransactionsGet({
+ runtime: Runtime.Sapphire,
+ rel: params.accountId,
+ limit: params.limit,
+ }),
+ api.runtimeTransactionsGet({
+ runtime: Runtime.Emerald,
+ rel: params.accountId,
+ limit: params.limit,
+ }),
+ ])
+ const extendedSapphireResponse = sapphireResponse.transactions.map(runtimeTransaction =>
+ extendRuntimeTransaction(Runtime.Sapphire, runtimeTransaction),
+ )
+ const extendedEmeraldResponse = emeraldResponse.transactions.map(runtimeTransaction =>
+ extendRuntimeTransaction(Runtime.Emerald, runtimeTransaction),
+ )
+ const mergedTransactions = mergeTransactions(
+ params.limit,
+ consensusResponse.transactions,
+ extendedSapphireResponse,
+ extendedEmeraldResponse,
+ )
+
+ // Temporary workaround for missing amount in staking.ReclaimEscrow
+ const transactionsWithFixedAmount = await Promise.all(
+ mergedTransactions.map(async transaction => {
+ if (transaction.method === ConsensusTxMethod.StakingReclaimEscrow) {
+ const eventsResponse = await api.consensusEventsGet({
+ limit: 1,
+ txHash: transaction.hash,
+ type: ConsensusEventType.StakingEscrowDebondingStart,
+ })
+ const amount = (eventsResponse.events[0].body as { amount?: number })?.amount
+ return {
+ ...transaction,
+ body: {
+ ...transaction.body,
+ amount,
+ },
+ }
+ }
+ return { ...transaction }
+ }),
+ )
+
+ return parseTransactionsList(transactionsWithFixedAmount)
+ } catch (error) {
+ console.error('Could not fetch Nexus', error)
+ throw error
+ }
+ }
+
+ async function getDelegations(params: { accountId: string; nic: oasis.client.NodeInternal }): Promise<{
+ delegations: Delegation[]
+ debonding: DebondingDelegation[]
+ }> {
+ const delegations = await api.consensusAccountsAddressDelegationsGet({
+ address: params.accountId,
+ })
+ const debonding = await api.consensusAccountsAddressDebondingDelegationsGet({
+ address: params.accountId,
+ })
+ if (!delegations) throw new Error('Wrong response code')
+ if (!debonding) throw new Error('Wrong response code')
+
+ return {
+ delegations: parseDelegations(delegations.delegations),
+ debonding: parseDebonding(debonding.debonding_delegations),
+ }
+ }
+
+ return {
+ getAccount,
+ getAllValidators,
+ getTransactionsList,
+ getDelegations,
+ }
+}
+
+function parseAccount(account: NexusAccount): Account {
+ const total = (
+ BigInt(account.available) +
+ BigInt(account.delegations_balance) +
+ BigInt(account.debonding_delegations_balance)
+ ).toString()
+
+ return {
+ address: account.address,
+ allowances: account.allowances.map(allowance => ({
+ address: allowance.address,
+ amount: allowance.amount,
+ })),
+ available: account.available,
+ delegations: account.delegations_balance,
+ debonding: account.debonding_delegations_balance,
+ total,
+ nonce: BigInt(account.nonce ?? 0).toString(),
+ }
+}
+
+function parseValidatorsList(validators: NexusValidator[]): Validator[] {
+ return validators.map(v => {
+ const parsed: Validator = {
+ address: v.entity_address,
+ name: v.media?.name ?? undefined,
+ escrow: v.escrow.active_balance as StringifiedBigInt,
+ current_rate: v.current_rate / 100000,
+ status: v.active ? 'active' : 'inactive',
+ media: {
+ email_address: v.media?.email ?? undefined,
+ logotype: v.media?.logoUrl ?? undefined,
+ twitter_acc: v.media?.twitter ?? undefined,
+ website_link: v.media?.url ?? undefined,
+ },
+ rank: v.rank,
+ }
+ return parsed
+ })
+}
+
+export function parseDelegations(delegations: NexusDelegation[]): Delegation[] {
+ return delegations.map(delegation => {
+ const parsed: Delegation = {
+ amount: delegation.amount,
+ shares: delegation.shares,
+ validatorAddress: delegation.validator,
+ }
+ return parsed
+ })
+}
+
+function getTransactionType(method: string | undefined): TransactionType {
+ const type = transactionMethodMap[method as keyof typeof transactionMethodMap]
+ // Not handled mappings are rendered as unrecognizedTransaction
+ return type ?? (method as TransactionType)
+}
+
+export const transactionMethodMap: Partial<{
+ [k in ConsensusTxMethod]: TransactionType
+}> = {
+ [ConsensusTxMethod.StakingTransfer]: TransactionType.StakingTransfer,
+ [ConsensusTxMethod.StakingAddEscrow]: TransactionType.StakingAddEscrow,
+ [ConsensusTxMethod.StakingReclaimEscrow]: TransactionType.StakingReclaimEscrow,
+ [ConsensusTxMethod.StakingAmendCommissionSchedule]: TransactionType.StakingAmendCommissionSchedule,
+ [ConsensusTxMethod.StakingAllow]: TransactionType.StakingAllow,
+ [ConsensusTxMethod.StakingWithdraw]: TransactionType.StakingWithdraw,
+ [ConsensusTxMethod.StakingBurn]: TransactionType.StakingBurn,
+ [ConsensusTxMethod.RoothashExecutorCommit]: TransactionType.RoothashExecutorCommit,
+ [ConsensusTxMethod.RoothashExecutorProposerTimeout]: TransactionType.RoothashExecutorProposerTimeout,
+ [ConsensusTxMethod.RoothashSubmitMsg]: TransactionType.RoothashSubmitMsg,
+ [ConsensusTxMethod.RegistryDeregisterEntity]: TransactionType.RegistryDeregisterEntity,
+ [ConsensusTxMethod.RegistryRegisterEntity]: TransactionType.RegistryRegisterEntity,
+ [ConsensusTxMethod.RegistryRegisterNode]: TransactionType.RegistryRegisterNode,
+ [ConsensusTxMethod.RegistryRegisterRuntime]: TransactionType.RegistryRegisterRuntime,
+ [ConsensusTxMethod.RegistryUnfreezeNode]: TransactionType.RegistryUnfreezeNode,
+ [ConsensusTxMethod.GovernanceCastVote]: TransactionType.GovernanceCastVote,
+ [ConsensusTxMethod.GovernanceSubmitProposal]: TransactionType.GovernanceSubmitProposal,
+ [ConsensusTxMethod.BeaconPvssCommit]: TransactionType.BeaconPvssCommit,
+ [ConsensusTxMethod.BeaconPvssReveal]: TransactionType.BeaconPvssReveal,
+ [ConsensusTxMethod.BeaconVrfProve]: TransactionType.BeaconVrfProve,
+ [ConsensusTxMethod.ConsensusMeta]: TransactionType.ConsensusMeta,
+ [ConsensusTxMethod.VaultCreate]: TransactionType.VaultCreate,
+}
+
+function parseTransactionsList(list: (NexusTransaction | ExtendedRuntimeTransaction)[]): Transaction[] {
+ return list.map(t => {
+ if ('round' in t) {
+ const transactionDate = new Date(t.timestamp)
+ const parsed: Transaction = {
+ amount: t.amount ? removeTrailingZeros(t.amount, t.decimals - consensusDecimals) : undefined,
+ fee: t.fee ? removeTrailingZeros(t.fee, t.decimals - consensusDecimals) : undefined,
+ from: t.sender_0_eth || t.sender_0,
+ hash: t.hash,
+ level: undefined,
+ status: t.success ? TransactionStatus.Successful : TransactionStatus.Failed,
+ timestamp: transactionDate.getTime(),
+ to: (t.body as { to?: string }).to ?? undefined,
+ type: getTransactionType(t.method),
+ runtimeName: t.runtimeName,
+ runtimeId: t.runtimeId,
+ round: t.round,
+ nonce: BigInt(t.nonce_0).toString(),
+ }
+ return parsed
+ } else {
+ const transactionDate = new Date(t.timestamp)
+ const parsed: Transaction = {
+ amount:
+ (t.body as { amount?: StringifiedBigInt })?.amount ||
+ ((t.body as { amount_change?: StringifiedBigInt })?.amount_change &&
+ ((t.body as { negative?: boolean })?.negative
+ ? `-${(t.body as { amount_change?: StringifiedBigInt }).amount_change}`
+ : (t.body as { amount_change?: StringifiedBigInt }).amount_change)) ||
+ undefined,
+ fee: t.fee,
+ from: t.sender,
+ hash: t.hash,
+ level: t.block,
+ status: t.success ? TransactionStatus.Successful : TransactionStatus.Failed,
+ timestamp: transactionDate.getTime(),
+ to:
+ (t.body as { to?: StringifiedBigInt })?.to ||
+ (t.body as { beneficiary?: StringifiedBigInt })?.beneficiary ||
+ (t.body as { account?: StringifiedBigInt })?.account ||
+ undefined,
+ type: getTransactionType(t.method),
+ runtimeName: undefined,
+ runtimeId: undefined,
+ round: undefined,
+ nonce: BigInt(t.nonce).toString(),
+ }
+ return parsed
+ }
+ })
+}
+
+export function parseDebonding(debonding: NexusDebondingDelegation[]): DebondingDelegation[] {
+ return debonding.map(debonding => {
+ const parsed: DebondingDelegation = {
+ amount: debonding.shares,
+ shares: debonding.shares,
+ validatorAddress: debonding.validator,
+ epoch: debonding.debond_end,
+ }
+ return parsed
+ })
+}
diff --git a/src/vendors/nexus/.openapi-generator-ignore b/src/vendors/nexus/.openapi-generator-ignore
new file mode 100644
index 0000000000..7484ee590a
--- /dev/null
+++ b/src/vendors/nexus/.openapi-generator-ignore
@@ -0,0 +1,23 @@
+# OpenAPI Generator Ignore
+# Generated by openapi-generator https://github.com/openapitools/openapi-generator
+
+# Use this file to prevent files from being overwritten by the generator.
+# The patterns follow closely to .gitignore or .dockerignore.
+
+# As an example, the C# client generator defines ApiClient.cs.
+# You can make changes and tell OpenAPI Generator to ignore just this file by uncommenting the following line:
+#ApiClient.cs
+
+# You can match any string of characters against a directory, file or extension with a single asterisk (*):
+#foo/*/qux
+# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux
+
+# You can recursively match patterns against a directory, file or extension with a double asterisk (**):
+#foo/**/qux
+# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux
+
+# You can also negate patterns with an exclamation (!).
+# For example, you can ignore all files in a docs folder with the file extension .md:
+#docs/*.md
+# Then explicitly reverse the ignore rule for a single file:
+#!docs/README.md
diff --git a/src/vendors/nexus/.openapi-generator/FILES b/src/vendors/nexus/.openapi-generator/FILES
new file mode 100644
index 0000000000..ee68eb3ded
--- /dev/null
+++ b/src/vendors/nexus/.openapi-generator/FILES
@@ -0,0 +1,102 @@
+.openapi-generator-ignore
+apis/DefaultApi.ts
+apis/index.ts
+index.ts
+models/Account.ts
+models/AccountList.ts
+models/AccountListAllOf.ts
+models/AccountStats.ts
+models/ActiveAccounts.ts
+models/ActiveAccountsList.ts
+models/AddressDerivationContext.ts
+models/AddressPreimage.ts
+models/Allowance.ts
+models/BareTokenHolder.ts
+models/Block.ts
+models/BlockList.ts
+models/BlockListAllOf.ts
+models/ConsensusEvent.ts
+models/ConsensusEventList.ts
+models/ConsensusEventListAllOf.ts
+models/ConsensusEventType.ts
+models/ConsensusTxMethod.ts
+models/DebondingDelegation.ts
+models/DebondingDelegationList.ts
+models/DebondingDelegationListAllOf.ts
+models/Delegation.ts
+models/DelegationList.ts
+models/DelegationListAllOf.ts
+models/Entity.ts
+models/EntityList.ts
+models/EntityListAllOf.ts
+models/Epoch.ts
+models/EpochList.ts
+models/EpochListAllOf.ts
+models/Escrow.ts
+models/EvmAbiParam.ts
+models/EvmEventToken.ts
+models/EvmNft.ts
+models/EvmNftList.ts
+models/EvmNftListAllOf.ts
+models/EvmToken.ts
+models/EvmTokenList.ts
+models/EvmTokenListAllOf.ts
+models/EvmTokenType.ts
+models/InlineResponse400.ts
+models/Layer.ts
+models/List.ts
+models/Node.ts
+models/NodeList.ts
+models/NodeListAllOf.ts
+models/Proposal.ts
+models/ProposalList.ts
+models/ProposalListAllOf.ts
+models/ProposalState.ts
+models/ProposalTarget.ts
+models/ProposalVote.ts
+models/ProposalVotes.ts
+models/ProposalVotesAllOf.ts
+models/RoothashMessage.ts
+models/RoothashMessageList.ts
+models/RoothashMessageListAllOf.ts
+models/RoothashMessageType.ts
+models/Runtime.ts
+models/RuntimeAccount.ts
+models/RuntimeBlock.ts
+models/RuntimeBlockList.ts
+models/RuntimeBlockListAllOf.ts
+models/RuntimeEvent.ts
+models/RuntimeEventList.ts
+models/RuntimeEventListAllOf.ts
+models/RuntimeEventType.ts
+models/RuntimeEvmBalance.ts
+models/RuntimeEvmContract.ts
+models/RuntimeEvmContractVerification.ts
+models/RuntimeSdkBalance.ts
+models/RuntimeStatus.ts
+models/RuntimeTransaction.ts
+models/RuntimeTransactionEncryptionEnvelope.ts
+models/RuntimeTransactionList.ts
+models/RuntimeTransactionListAllOf.ts
+models/Status.ts
+models/TokenHolderList.ts
+models/TokenHolderListAllOf.ts
+models/Transaction.ts
+models/TransactionList.ts
+models/TransactionListAllOf.ts
+models/TxError.ts
+models/TxVolume.ts
+models/TxVolumeList.ts
+models/Validator.ts
+models/ValidatorAggStats.ts
+models/ValidatorCommissionBound.ts
+models/ValidatorHistory.ts
+models/ValidatorHistoryAllOf.ts
+models/ValidatorHistoryPoint.ts
+models/ValidatorList.ts
+models/ValidatorListAllOf.ts
+models/ValidatorMedia.ts
+models/ValidatorsResponse.ts
+models/VerificationLevel.ts
+models/index.ts
+runtime.ts
diff --git a/src/vendors/nexus/.openapi-generator/VERSION b/src/vendors/nexus/.openapi-generator/VERSION
new file mode 100644
index 0000000000..acf69b48b8
--- /dev/null
+++ b/src/vendors/nexus/.openapi-generator/VERSION
@@ -0,0 +1 @@
+5.1.0
\ No newline at end of file
diff --git a/src/vendors/nexus/README.md b/src/vendors/nexus/README.md
new file mode 100644
index 0000000000..38c3e6b938
--- /dev/null
+++ b/src/vendors/nexus/README.md
@@ -0,0 +1,37 @@
+# Typescript bindings for Nexus
+
+This folder contains generated typescript bindings for Nexus.
+
+To update the bindings:
+
+1. Update openapi.json based on
+ -
+
+2. Generate the bindings:
+
+ ```sh
+ npx @openapitools/openapi-generator-cli generate \
+ -i openapi.json \
+ -g typescript-fetch \
+ -o . \
+ --additional-properties=modelPropertyNaming=original,typescriptThreePlus=true
+ ```
+
+ or
+
+ ```sh
+ docker run --rm --user "${UID}:${GID}" \
+ -v ${PWD}:/local \
+ --workdir /local \
+ openapitools/openapi-generator-cli:v5.1.0 generate \
+ -i openapi.json \
+ -g typescript-fetch \
+ -o . \
+ --additional-properties=modelPropertyNaming=original,typescriptThreePlus=true
+ ```
+
+3. Lint:
+
+ ```sh
+ yarn lint:fix
+ ```
diff --git a/src/vendors/nexus/apis/DefaultApi.ts b/src/vendors/nexus/apis/DefaultApi.ts
new file mode 100644
index 0000000000..9ca668b489
--- /dev/null
+++ b/src/vendors/nexus/apis/DefaultApi.ts
@@ -0,0 +1,1956 @@
+/* tslint:disable */
+/* eslint-disable */
+/**
+ * Oasis Nexus API V1
+ * An API for accessing indexed data from the Oasis Network. # Endpoints
+ *
+ * The version of the OpenAPI document: 0.1.0
+ *
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
+ */
+
+
+import * as runtime from '../runtime';
+import {
+ Account,
+ AccountFromJSON,
+ AccountToJSON,
+ AccountList,
+ AccountListFromJSON,
+ AccountListToJSON,
+ ActiveAccountsList,
+ ActiveAccountsListFromJSON,
+ ActiveAccountsListToJSON,
+ Block,
+ BlockFromJSON,
+ BlockToJSON,
+ BlockList,
+ BlockListFromJSON,
+ BlockListToJSON,
+ ConsensusEventList,
+ ConsensusEventListFromJSON,
+ ConsensusEventListToJSON,
+ ConsensusEventType,
+ ConsensusEventTypeFromJSON,
+ ConsensusEventTypeToJSON,
+ ConsensusTxMethod,
+ ConsensusTxMethodFromJSON,
+ ConsensusTxMethodToJSON,
+ DebondingDelegationList,
+ DebondingDelegationListFromJSON,
+ DebondingDelegationListToJSON,
+ DelegationList,
+ DelegationListFromJSON,
+ DelegationListToJSON,
+ Entity,
+ EntityFromJSON,
+ EntityToJSON,
+ EntityList,
+ EntityListFromJSON,
+ EntityListToJSON,
+ Epoch,
+ EpochFromJSON,
+ EpochToJSON,
+ EpochList,
+ EpochListFromJSON,
+ EpochListToJSON,
+ EvmNft,
+ EvmNftFromJSON,
+ EvmNftToJSON,
+ EvmNftList,
+ EvmNftListFromJSON,
+ EvmNftListToJSON,
+ EvmToken,
+ EvmTokenFromJSON,
+ EvmTokenToJSON,
+ EvmTokenList,
+ EvmTokenListFromJSON,
+ EvmTokenListToJSON,
+ InlineResponse400,
+ InlineResponse400FromJSON,
+ InlineResponse400ToJSON,
+ Layer,
+ LayerFromJSON,
+ LayerToJSON,
+ Node,
+ NodeFromJSON,
+ NodeToJSON,
+ NodeList,
+ NodeListFromJSON,
+ NodeListToJSON,
+ Proposal,
+ ProposalFromJSON,
+ ProposalToJSON,
+ ProposalList,
+ ProposalListFromJSON,
+ ProposalListToJSON,
+ ProposalState,
+ ProposalStateFromJSON,
+ ProposalStateToJSON,
+ ProposalVotes,
+ ProposalVotesFromJSON,
+ ProposalVotesToJSON,
+ RoothashMessageList,
+ RoothashMessageListFromJSON,
+ RoothashMessageListToJSON,
+ RoothashMessageType,
+ RoothashMessageTypeFromJSON,
+ RoothashMessageTypeToJSON,
+ Runtime,
+ RuntimeFromJSON,
+ RuntimeToJSON,
+ RuntimeAccount,
+ RuntimeAccountFromJSON,
+ RuntimeAccountToJSON,
+ RuntimeBlockList,
+ RuntimeBlockListFromJSON,
+ RuntimeBlockListToJSON,
+ RuntimeEventList,
+ RuntimeEventListFromJSON,
+ RuntimeEventListToJSON,
+ RuntimeEventType,
+ RuntimeEventTypeFromJSON,
+ RuntimeEventTypeToJSON,
+ RuntimeStatus,
+ RuntimeStatusFromJSON,
+ RuntimeStatusToJSON,
+ RuntimeTransactionList,
+ RuntimeTransactionListFromJSON,
+ RuntimeTransactionListToJSON,
+ Status,
+ StatusFromJSON,
+ StatusToJSON,
+ TokenHolderList,
+ TokenHolderListFromJSON,
+ TokenHolderListToJSON,
+ Transaction,
+ TransactionFromJSON,
+ TransactionToJSON,
+ TransactionList,
+ TransactionListFromJSON,
+ TransactionListToJSON,
+ TxVolumeList,
+ TxVolumeListFromJSON,
+ TxVolumeListToJSON,
+ ValidatorHistory,
+ ValidatorHistoryFromJSON,
+ ValidatorHistoryToJSON,
+ ValidatorList,
+ ValidatorListFromJSON,
+ ValidatorListToJSON,
+} from '../models';
+
+export interface ConsensusAccountsAddressDebondingDelegationsGetRequest {
+ address: string;
+ limit?: number;
+ offset?: number;
+}
+
+export interface ConsensusAccountsAddressDebondingDelegationsToGetRequest {
+ address: string;
+ limit?: number;
+ offset?: number;
+}
+
+export interface ConsensusAccountsAddressDelegationsGetRequest {
+ address: string;
+ limit?: number;
+ offset?: number;
+}
+
+export interface ConsensusAccountsAddressDelegationsToGetRequest {
+ address: string;
+ limit?: number;
+ offset?: number;
+}
+
+export interface ConsensusAccountsAddressGetRequest {
+ address: string;
+}
+
+export interface ConsensusAccountsGetRequest {
+ limit?: number;
+ offset?: number;
+}
+
+export interface ConsensusBlocksGetRequest {
+ limit?: number;
+ offset?: number;
+ from?: number;
+ to?: number;
+ after?: Date;
+ before?: Date;
+ hash?: string;
+}
+
+export interface ConsensusBlocksHeightGetRequest {
+ height: number;
+}
+
+export interface ConsensusEntitiesAddressGetRequest {
+ address: string;
+}
+
+export interface ConsensusEntitiesAddressNodesGetRequest {
+ address: string;
+ limit?: number;
+ offset?: number;
+}
+
+export interface ConsensusEntitiesAddressNodesNodeIdGetRequest {
+ address: string;
+ nodeId: string;
+}
+
+export interface ConsensusEntitiesGetRequest {
+ limit?: number;
+ offset?: number;
+}
+
+export interface ConsensusEpochsEpochGetRequest {
+ epoch: number;
+}
+
+export interface ConsensusEpochsGetRequest {
+ limit?: number;
+ offset?: number;
+}
+
+export interface ConsensusEventsGetRequest {
+ limit?: number;
+ offset?: number;
+ block?: number;
+ txIndex?: number;
+ txHash?: string;
+ rel?: string;
+ type?: ConsensusEventType;
+}
+
+export interface ConsensusProposalsGetRequest {
+ limit?: number;
+ offset?: number;
+ submitter?: string;
+ state?: ProposalState;
+}
+
+export interface ConsensusProposalsProposalIdGetRequest {
+ proposalId: number;
+}
+
+export interface ConsensusProposalsProposalIdVotesGetRequest {
+ proposalId: number;
+ limit?: number;
+ offset?: number;
+}
+
+export interface ConsensusRoothashMessagesGetRequest {
+ runtime: Runtime;
+ limit?: number;
+ offset?: number;
+ round?: number;
+ type?: RoothashMessageType;
+ rel?: string;
+}
+
+export interface ConsensusTransactionsGetRequest {
+ limit?: number;
+ offset?: number;
+ block?: number;
+ method?: ConsensusTxMethod;
+ sender?: string;
+ rel?: string;
+ after?: Date;
+ before?: Date;
+}
+
+export interface ConsensusTransactionsTxHashGetRequest {
+ txHash: string;
+}
+
+export interface ConsensusValidatorsAddressGetRequest {
+ address: string;
+}
+
+export interface ConsensusValidatorsAddressHistoryGetRequest {
+ address: string;
+ limit?: number;
+ offset?: number;
+ from?: number;
+ to?: number;
+}
+
+export interface ConsensusValidatorsGetRequest {
+ limit?: number;
+ offset?: number;
+ name?: string;
+}
+
+export interface LayerStatsActiveAccountsGetRequest {
+ layer: Layer;
+ limit?: number;
+ offset?: number;
+ windowStepSeconds?: number;
+}
+
+export interface LayerStatsTxVolumeGetRequest {
+ layer: Layer;
+ limit?: number;
+ offset?: number;
+ windowSizeSeconds?: number;
+ windowStepSeconds?: number;
+}
+
+export interface RuntimeAccountsAddressGetRequest {
+ runtime: Runtime;
+ address: string;
+}
+
+export interface RuntimeAccountsAddressNftsGetRequest {
+ runtime: Runtime;
+ address: string;
+ limit?: number;
+ offset?: number;
+ tokenAddress?: string;
+}
+
+export interface RuntimeBlocksGetRequest {
+ runtime: Runtime;
+ limit?: number;
+ offset?: number;
+ from?: number;
+ to?: number;
+ after?: Date;
+ before?: Date;
+ hash?: string;
+}
+
+export interface RuntimeEventsGetRequest {
+ runtime: Runtime;
+ limit?: number;
+ offset?: number;
+ block?: number;
+ txIndex?: number;
+ txHash?: string;
+ type?: RuntimeEventType;
+ rel?: string;
+ evmLogSignature?: string;
+ contractAddress?: string;
+ nftId?: string;
+}
+
+export interface RuntimeEvmTokensAddressGetRequest {
+ runtime: Runtime;
+ address: string;
+}
+
+export interface RuntimeEvmTokensAddressHoldersGetRequest {
+ runtime: Runtime;
+ address: string;
+ limit?: number;
+ offset?: number;
+}
+
+export interface RuntimeEvmTokensAddressNftsGetRequest {
+ runtime: Runtime;
+ address: string;
+ limit?: number;
+ offset?: number;
+}
+
+export interface RuntimeEvmTokensAddressNftsIdGetRequest {
+ runtime: Runtime;
+ address: string;
+ id: string;
+}
+
+export interface RuntimeEvmTokensGetRequest {
+ runtime: Runtime;
+ limit?: number;
+ offset?: number;
+ name?: string;
+}
+
+export interface RuntimeStatusGetRequest {
+ runtime: Runtime;
+}
+
+export interface RuntimeTransactionsGetRequest {
+ runtime: Runtime;
+ limit?: number;
+ offset?: number;
+ block?: number;
+ after?: Date;
+ before?: Date;
+ rel?: string;
+}
+
+export interface RuntimeTransactionsTxHashGetRequest {
+ runtime: Runtime;
+ txHash: string;
+}
+
+/**
+ *
+ */
+export class DefaultApi extends runtime.BaseAPI {
+
+ /**
+ * Returns an account\'s debonding delegations.
+ */
+ async consensusAccountsAddressDebondingDelegationsGetRaw(requestParameters: ConsensusAccountsAddressDebondingDelegationsGetRequest): Promise> {
+ if (requestParameters.address === null || requestParameters.address === undefined) {
+ throw new runtime.RequiredError('address','Required parameter requestParameters.address was null or undefined when calling consensusAccountsAddressDebondingDelegationsGet.');
+ }
+
+ const queryParameters: any = {};
+
+ if (requestParameters.limit !== undefined) {
+ queryParameters['limit'] = requestParameters.limit;
+ }
+
+ if (requestParameters.offset !== undefined) {
+ queryParameters['offset'] = requestParameters.offset;
+ }
+
+ const headerParameters: runtime.HTTPHeaders = {};
+
+ const response = await this.request({
+ path: `/consensus/accounts/{address}/debonding_delegations`.replace(`{${"address"}}`, encodeURIComponent(String(requestParameters.address))),
+ method: 'GET',
+ headers: headerParameters,
+ query: queryParameters,
+ });
+
+ return new runtime.JSONApiResponse(response, (jsonValue) => DebondingDelegationListFromJSON(jsonValue));
+ }
+
+ /**
+ * Returns an account\'s debonding delegations.
+ */
+ async consensusAccountsAddressDebondingDelegationsGet(requestParameters: ConsensusAccountsAddressDebondingDelegationsGetRequest): Promise {
+ const response = await this.consensusAccountsAddressDebondingDelegationsGetRaw(requestParameters);
+ return await response.value();
+ }
+
+ /**
+ * Returns a list of debonding delegations to an account.
+ */
+ async consensusAccountsAddressDebondingDelegationsToGetRaw(requestParameters: ConsensusAccountsAddressDebondingDelegationsToGetRequest): Promise> {
+ if (requestParameters.address === null || requestParameters.address === undefined) {
+ throw new runtime.RequiredError('address','Required parameter requestParameters.address was null or undefined when calling consensusAccountsAddressDebondingDelegationsToGet.');
+ }
+
+ const queryParameters: any = {};
+
+ if (requestParameters.limit !== undefined) {
+ queryParameters['limit'] = requestParameters.limit;
+ }
+
+ if (requestParameters.offset !== undefined) {
+ queryParameters['offset'] = requestParameters.offset;
+ }
+
+ const headerParameters: runtime.HTTPHeaders = {};
+
+ const response = await this.request({
+ path: `/consensus/accounts/{address}/debonding_delegations_to`.replace(`{${"address"}}`, encodeURIComponent(String(requestParameters.address))),
+ method: 'GET',
+ headers: headerParameters,
+ query: queryParameters,
+ });
+
+ return new runtime.JSONApiResponse(response, (jsonValue) => DebondingDelegationListFromJSON(jsonValue));
+ }
+
+ /**
+ * Returns a list of debonding delegations to an account.
+ */
+ async consensusAccountsAddressDebondingDelegationsToGet(requestParameters: ConsensusAccountsAddressDebondingDelegationsToGetRequest): Promise {
+ const response = await this.consensusAccountsAddressDebondingDelegationsToGetRaw(requestParameters);
+ return await response.value();
+ }
+
+ /**
+ * Returns an account\'s delegations.
+ */
+ async consensusAccountsAddressDelegationsGetRaw(requestParameters: ConsensusAccountsAddressDelegationsGetRequest): Promise> {
+ if (requestParameters.address === null || requestParameters.address === undefined) {
+ throw new runtime.RequiredError('address','Required parameter requestParameters.address was null or undefined when calling consensusAccountsAddressDelegationsGet.');
+ }
+
+ const queryParameters: any = {};
+
+ if (requestParameters.limit !== undefined) {
+ queryParameters['limit'] = requestParameters.limit;
+ }
+
+ if (requestParameters.offset !== undefined) {
+ queryParameters['offset'] = requestParameters.offset;
+ }
+
+ const headerParameters: runtime.HTTPHeaders = {};
+
+ const response = await this.request({
+ path: `/consensus/accounts/{address}/delegations`.replace(`{${"address"}}`, encodeURIComponent(String(requestParameters.address))),
+ method: 'GET',
+ headers: headerParameters,
+ query: queryParameters,
+ });
+
+ return new runtime.JSONApiResponse(response, (jsonValue) => DelegationListFromJSON(jsonValue));
+ }
+
+ /**
+ * Returns an account\'s delegations.
+ */
+ async consensusAccountsAddressDelegationsGet(requestParameters: ConsensusAccountsAddressDelegationsGetRequest): Promise {
+ const response = await this.consensusAccountsAddressDelegationsGetRaw(requestParameters);
+ return await response.value();
+ }
+
+ /**
+ * Returns a list of delegations to an account.
+ */
+ async consensusAccountsAddressDelegationsToGetRaw(requestParameters: ConsensusAccountsAddressDelegationsToGetRequest): Promise> {
+ if (requestParameters.address === null || requestParameters.address === undefined) {
+ throw new runtime.RequiredError('address','Required parameter requestParameters.address was null or undefined when calling consensusAccountsAddressDelegationsToGet.');
+ }
+
+ const queryParameters: any = {};
+
+ if (requestParameters.limit !== undefined) {
+ queryParameters['limit'] = requestParameters.limit;
+ }
+
+ if (requestParameters.offset !== undefined) {
+ queryParameters['offset'] = requestParameters.offset;
+ }
+
+ const headerParameters: runtime.HTTPHeaders = {};
+
+ const response = await this.request({
+ path: `/consensus/accounts/{address}/delegations_to`.replace(`{${"address"}}`, encodeURIComponent(String(requestParameters.address))),
+ method: 'GET',
+ headers: headerParameters,
+ query: queryParameters,
+ });
+
+ return new runtime.JSONApiResponse(response, (jsonValue) => DelegationListFromJSON(jsonValue));
+ }
+
+ /**
+ * Returns a list of delegations to an account.
+ */
+ async consensusAccountsAddressDelegationsToGet(requestParameters: ConsensusAccountsAddressDelegationsToGetRequest): Promise {
+ const response = await this.consensusAccountsAddressDelegationsToGetRaw(requestParameters);
+ return await response.value();
+ }
+
+ /**
+ * Returns a consensus layer account.
+ */
+ async consensusAccountsAddressGetRaw(requestParameters: ConsensusAccountsAddressGetRequest): Promise> {
+ if (requestParameters.address === null || requestParameters.address === undefined) {
+ throw new runtime.RequiredError('address','Required parameter requestParameters.address was null or undefined when calling consensusAccountsAddressGet.');
+ }
+
+ const queryParameters: any = {};
+
+ const headerParameters: runtime.HTTPHeaders = {};
+
+ const response = await this.request({
+ path: `/consensus/accounts/{address}`.replace(`{${"address"}}`, encodeURIComponent(String(requestParameters.address))),
+ method: 'GET',
+ headers: headerParameters,
+ query: queryParameters,
+ });
+
+ return new runtime.JSONApiResponse(response, (jsonValue) => AccountFromJSON(jsonValue));
+ }
+
+ /**
+ * Returns a consensus layer account.
+ */
+ async consensusAccountsAddressGet(requestParameters: ConsensusAccountsAddressGetRequest): Promise {
+ const response = await this.consensusAccountsAddressGetRaw(requestParameters);
+ return await response.value();
+ }
+
+ /**
+ * Returns a list of consensus layer accounts. Note that for performance reasons, the info returned by this endpoint may be slightly stale (<2 minutes). For the most up-to-date account state, query the single-account endpoint.
+ */
+ async consensusAccountsGetRaw(requestParameters: ConsensusAccountsGetRequest): Promise> {
+ const queryParameters: any = {};
+
+ if (requestParameters.limit !== undefined) {
+ queryParameters['limit'] = requestParameters.limit;
+ }
+
+ if (requestParameters.offset !== undefined) {
+ queryParameters['offset'] = requestParameters.offset;
+ }
+
+ const headerParameters: runtime.HTTPHeaders = {};
+
+ const response = await this.request({
+ path: `/consensus/accounts`,
+ method: 'GET',
+ headers: headerParameters,
+ query: queryParameters,
+ });
+
+ return new runtime.JSONApiResponse(response, (jsonValue) => AccountListFromJSON(jsonValue));
+ }
+
+ /**
+ * Returns a list of consensus layer accounts. Note that for performance reasons, the info returned by this endpoint may be slightly stale (<2 minutes). For the most up-to-date account state, query the single-account endpoint.
+ */
+ async consensusAccountsGet(requestParameters: ConsensusAccountsGetRequest): Promise {
+ const response = await this.consensusAccountsGetRaw(requestParameters);
+ return await response.value();
+ }
+
+ /**
+ * Returns a list of consensus blocks, sorted from most to least recent.
+ */
+ async consensusBlocksGetRaw(requestParameters: ConsensusBlocksGetRequest): Promise> {
+ const queryParameters: any = {};
+
+ if (requestParameters.limit !== undefined) {
+ queryParameters['limit'] = requestParameters.limit;
+ }
+
+ if (requestParameters.offset !== undefined) {
+ queryParameters['offset'] = requestParameters.offset;
+ }
+
+ if (requestParameters.from !== undefined) {
+ queryParameters['from'] = requestParameters.from;
+ }
+
+ if (requestParameters.to !== undefined) {
+ queryParameters['to'] = requestParameters.to;
+ }
+
+ if (requestParameters.after !== undefined) {
+ queryParameters['after'] = (requestParameters.after as any).toISOString();
+ }
+
+ if (requestParameters.before !== undefined) {
+ queryParameters['before'] = (requestParameters.before as any).toISOString();
+ }
+
+ if (requestParameters.hash !== undefined) {
+ queryParameters['hash'] = requestParameters.hash;
+ }
+
+ const headerParameters: runtime.HTTPHeaders = {};
+
+ const response = await this.request({
+ path: `/consensus/blocks`,
+ method: 'GET',
+ headers: headerParameters,
+ query: queryParameters,
+ });
+
+ return new runtime.JSONApiResponse(response, (jsonValue) => BlockListFromJSON(jsonValue));
+ }
+
+ /**
+ * Returns a list of consensus blocks, sorted from most to least recent.
+ */
+ async consensusBlocksGet(requestParameters: ConsensusBlocksGetRequest): Promise {
+ const response = await this.consensusBlocksGetRaw(requestParameters);
+ return await response.value();
+ }
+
+ /**
+ * Returns a consensus block.
+ */
+ async consensusBlocksHeightGetRaw(requestParameters: ConsensusBlocksHeightGetRequest): Promise> {
+ if (requestParameters.height === null || requestParameters.height === undefined) {
+ throw new runtime.RequiredError('height','Required parameter requestParameters.height was null or undefined when calling consensusBlocksHeightGet.');
+ }
+
+ const queryParameters: any = {};
+
+ const headerParameters: runtime.HTTPHeaders = {};
+
+ const response = await this.request({
+ path: `/consensus/blocks/{height}`.replace(`{${"height"}}`, encodeURIComponent(String(requestParameters.height))),
+ method: 'GET',
+ headers: headerParameters,
+ query: queryParameters,
+ });
+
+ return new runtime.JSONApiResponse(response, (jsonValue) => BlockFromJSON(jsonValue));
+ }
+
+ /**
+ * Returns a consensus block.
+ */
+ async consensusBlocksHeightGet(requestParameters: ConsensusBlocksHeightGetRequest): Promise {
+ const response = await this.consensusBlocksHeightGetRaw(requestParameters);
+ return await response.value();
+ }
+
+ /**
+ * Returns an entity registered at the consensus layer.
+ */
+ async consensusEntitiesAddressGetRaw(requestParameters: ConsensusEntitiesAddressGetRequest): Promise> {
+ if (requestParameters.address === null || requestParameters.address === undefined) {
+ throw new runtime.RequiredError('address','Required parameter requestParameters.address was null or undefined when calling consensusEntitiesAddressGet.');
+ }
+
+ const queryParameters: any = {};
+
+ const headerParameters: runtime.HTTPHeaders = {};
+
+ const response = await this.request({
+ path: `/consensus/entities/{address}`.replace(`{${"address"}}`, encodeURIComponent(String(requestParameters.address))),
+ method: 'GET',
+ headers: headerParameters,
+ query: queryParameters,
+ });
+
+ return new runtime.JSONApiResponse(response, (jsonValue) => EntityFromJSON(jsonValue));
+ }
+
+ /**
+ * Returns an entity registered at the consensus layer.
+ */
+ async consensusEntitiesAddressGet(requestParameters: ConsensusEntitiesAddressGetRequest): Promise {
+ const response = await this.consensusEntitiesAddressGetRaw(requestParameters);
+ return await response.value();
+ }
+
+ /**
+ * Returns a list of nodes registered at the consensus layer.
+ */
+ async consensusEntitiesAddressNodesGetRaw(requestParameters: ConsensusEntitiesAddressNodesGetRequest): Promise> {
+ if (requestParameters.address === null || requestParameters.address === undefined) {
+ throw new runtime.RequiredError('address','Required parameter requestParameters.address was null or undefined when calling consensusEntitiesAddressNodesGet.');
+ }
+
+ const queryParameters: any = {};
+
+ if (requestParameters.limit !== undefined) {
+ queryParameters['limit'] = requestParameters.limit;
+ }
+
+ if (requestParameters.offset !== undefined) {
+ queryParameters['offset'] = requestParameters.offset;
+ }
+
+ const headerParameters: runtime.HTTPHeaders = {};
+
+ const response = await this.request({
+ path: `/consensus/entities/{address}/nodes`.replace(`{${"address"}}`, encodeURIComponent(String(requestParameters.address))),
+ method: 'GET',
+ headers: headerParameters,
+ query: queryParameters,
+ });
+
+ return new runtime.JSONApiResponse(response, (jsonValue) => NodeListFromJSON(jsonValue));
+ }
+
+ /**
+ * Returns a list of nodes registered at the consensus layer.
+ */
+ async consensusEntitiesAddressNodesGet(requestParameters: ConsensusEntitiesAddressNodesGetRequest): Promise {
+ const response = await this.consensusEntitiesAddressNodesGetRaw(requestParameters);
+ return await response.value();
+ }
+
+ /**
+ * Returns a node registered at the consensus layer.
+ */
+ async consensusEntitiesAddressNodesNodeIdGetRaw(requestParameters: ConsensusEntitiesAddressNodesNodeIdGetRequest): Promise> {
+ if (requestParameters.address === null || requestParameters.address === undefined) {
+ throw new runtime.RequiredError('address','Required parameter requestParameters.address was null or undefined when calling consensusEntitiesAddressNodesNodeIdGet.');
+ }
+
+ if (requestParameters.nodeId === null || requestParameters.nodeId === undefined) {
+ throw new runtime.RequiredError('nodeId','Required parameter requestParameters.nodeId was null or undefined when calling consensusEntitiesAddressNodesNodeIdGet.');
+ }
+
+ const queryParameters: any = {};
+
+ const headerParameters: runtime.HTTPHeaders = {};
+
+ const response = await this.request({
+ path: `/consensus/entities/{address}/nodes/{node_id}`.replace(`{${"address"}}`, encodeURIComponent(String(requestParameters.address))).replace(`{${"node_id"}}`, encodeURIComponent(String(requestParameters.nodeId))),
+ method: 'GET',
+ headers: headerParameters,
+ query: queryParameters,
+ });
+
+ return new runtime.JSONApiResponse(response, (jsonValue) => NodeFromJSON(jsonValue));
+ }
+
+ /**
+ * Returns a node registered at the consensus layer.
+ */
+ async consensusEntitiesAddressNodesNodeIdGet(requestParameters: ConsensusEntitiesAddressNodesNodeIdGetRequest): Promise {
+ const response = await this.consensusEntitiesAddressNodesNodeIdGetRaw(requestParameters);
+ return await response.value();
+ }
+
+ /**
+ * Returns a list of entities registered at the consensus layer.
+ */
+ async consensusEntitiesGetRaw(requestParameters: ConsensusEntitiesGetRequest): Promise> {
+ const queryParameters: any = {};
+
+ if (requestParameters.limit !== undefined) {
+ queryParameters['limit'] = requestParameters.limit;
+ }
+
+ if (requestParameters.offset !== undefined) {
+ queryParameters['offset'] = requestParameters.offset;
+ }
+
+ const headerParameters: runtime.HTTPHeaders = {};
+
+ const response = await this.request({
+ path: `/consensus/entities`,
+ method: 'GET',
+ headers: headerParameters,
+ query: queryParameters,
+ });
+
+ return new runtime.JSONApiResponse(response, (jsonValue) => EntityListFromJSON(jsonValue));
+ }
+
+ /**
+ * Returns a list of entities registered at the consensus layer.
+ */
+ async consensusEntitiesGet(requestParameters: ConsensusEntitiesGetRequest): Promise {
+ const response = await this.consensusEntitiesGetRaw(requestParameters);
+ return await response.value();
+ }
+
+ /**
+ * Returns a consensus epoch.
+ */
+ async consensusEpochsEpochGetRaw(requestParameters: ConsensusEpochsEpochGetRequest): Promise> {
+ if (requestParameters.epoch === null || requestParameters.epoch === undefined) {
+ throw new runtime.RequiredError('epoch','Required parameter requestParameters.epoch was null or undefined when calling consensusEpochsEpochGet.');
+ }
+
+ const queryParameters: any = {};
+
+ const headerParameters: runtime.HTTPHeaders = {};
+
+ const response = await this.request({
+ path: `/consensus/epochs/{epoch}`.replace(`{${"epoch"}}`, encodeURIComponent(String(requestParameters.epoch))),
+ method: 'GET',
+ headers: headerParameters,
+ query: queryParameters,
+ });
+
+ return new runtime.JSONApiResponse(response, (jsonValue) => EpochFromJSON(jsonValue));
+ }
+
+ /**
+ * Returns a consensus epoch.
+ */
+ async consensusEpochsEpochGet(requestParameters: ConsensusEpochsEpochGetRequest): Promise {
+ const response = await this.consensusEpochsEpochGetRaw(requestParameters);
+ return await response.value();
+ }
+
+ /**
+ * Returns a list of consensus epochs.
+ */
+ async consensusEpochsGetRaw(requestParameters: ConsensusEpochsGetRequest): Promise> {
+ const queryParameters: any = {};
+
+ if (requestParameters.limit !== undefined) {
+ queryParameters['limit'] = requestParameters.limit;
+ }
+
+ if (requestParameters.offset !== undefined) {
+ queryParameters['offset'] = requestParameters.offset;
+ }
+
+ const headerParameters: runtime.HTTPHeaders = {};
+
+ const response = await this.request({
+ path: `/consensus/epochs`,
+ method: 'GET',
+ headers: headerParameters,
+ query: queryParameters,
+ });
+
+ return new runtime.JSONApiResponse(response, (jsonValue) => EpochListFromJSON(jsonValue));
+ }
+
+ /**
+ * Returns a list of consensus epochs.
+ */
+ async consensusEpochsGet(requestParameters: ConsensusEpochsGetRequest): Promise {
+ const response = await this.consensusEpochsGetRaw(requestParameters);
+ return await response.value();
+ }
+
+ /**
+ * Returns a list of consensus events.
+ */
+ async consensusEventsGetRaw(requestParameters: ConsensusEventsGetRequest): Promise> {
+ const queryParameters: any = {};
+
+ if (requestParameters.limit !== undefined) {
+ queryParameters['limit'] = requestParameters.limit;
+ }
+
+ if (requestParameters.offset !== undefined) {
+ queryParameters['offset'] = requestParameters.offset;
+ }
+
+ if (requestParameters.block !== undefined) {
+ queryParameters['block'] = requestParameters.block;
+ }
+
+ if (requestParameters.txIndex !== undefined) {
+ queryParameters['tx_index'] = requestParameters.txIndex;
+ }
+
+ if (requestParameters.txHash !== undefined) {
+ queryParameters['tx_hash'] = requestParameters.txHash;
+ }
+
+ if (requestParameters.rel !== undefined) {
+ queryParameters['rel'] = requestParameters.rel;
+ }
+
+ if (requestParameters.type !== undefined) {
+ queryParameters['type'] = requestParameters.type;
+ }
+
+ const headerParameters: runtime.HTTPHeaders = {};
+
+ const response = await this.request({
+ path: `/consensus/events`,
+ method: 'GET',
+ headers: headerParameters,
+ query: queryParameters,
+ });
+
+ return new runtime.JSONApiResponse(response, (jsonValue) => ConsensusEventListFromJSON(jsonValue));
+ }
+
+ /**
+ * Returns a list of consensus events.
+ */
+ async consensusEventsGet(requestParameters: ConsensusEventsGetRequest): Promise {
+ const response = await this.consensusEventsGetRaw(requestParameters);
+ return await response.value();
+ }
+
+ /**
+ * Returns a list of governance proposals.
+ */
+ async consensusProposalsGetRaw(requestParameters: ConsensusProposalsGetRequest): Promise> {
+ const queryParameters: any = {};
+
+ if (requestParameters.limit !== undefined) {
+ queryParameters['limit'] = requestParameters.limit;
+ }
+
+ if (requestParameters.offset !== undefined) {
+ queryParameters['offset'] = requestParameters.offset;
+ }
+
+ if (requestParameters.submitter !== undefined) {
+ queryParameters['submitter'] = requestParameters.submitter;
+ }
+
+ if (requestParameters.state !== undefined) {
+ queryParameters['state'] = requestParameters.state;
+ }
+
+ const headerParameters: runtime.HTTPHeaders = {};
+
+ const response = await this.request({
+ path: `/consensus/proposals`,
+ method: 'GET',
+ headers: headerParameters,
+ query: queryParameters,
+ });
+
+ return new runtime.JSONApiResponse(response, (jsonValue) => ProposalListFromJSON(jsonValue));
+ }
+
+ /**
+ * Returns a list of governance proposals.
+ */
+ async consensusProposalsGet(requestParameters: ConsensusProposalsGetRequest): Promise {
+ const response = await this.consensusProposalsGetRaw(requestParameters);
+ return await response.value();
+ }
+
+ /**
+ * Returns a governance proposal.
+ */
+ async consensusProposalsProposalIdGetRaw(requestParameters: ConsensusProposalsProposalIdGetRequest): Promise> {
+ if (requestParameters.proposalId === null || requestParameters.proposalId === undefined) {
+ throw new runtime.RequiredError('proposalId','Required parameter requestParameters.proposalId was null or undefined when calling consensusProposalsProposalIdGet.');
+ }
+
+ const queryParameters: any = {};
+
+ const headerParameters: runtime.HTTPHeaders = {};
+
+ const response = await this.request({
+ path: `/consensus/proposals/{proposal_id}`.replace(`{${"proposal_id"}}`, encodeURIComponent(String(requestParameters.proposalId))),
+ method: 'GET',
+ headers: headerParameters,
+ query: queryParameters,
+ });
+
+ return new runtime.JSONApiResponse(response, (jsonValue) => ProposalFromJSON(jsonValue));
+ }
+
+ /**
+ * Returns a governance proposal.
+ */
+ async consensusProposalsProposalIdGet(requestParameters: ConsensusProposalsProposalIdGetRequest): Promise {
+ const response = await this.consensusProposalsProposalIdGetRaw(requestParameters);
+ return await response.value();
+ }
+
+ /**
+ * Returns a list of votes for a governance proposal.
+ */
+ async consensusProposalsProposalIdVotesGetRaw(requestParameters: ConsensusProposalsProposalIdVotesGetRequest): Promise> {
+ if (requestParameters.proposalId === null || requestParameters.proposalId === undefined) {
+ throw new runtime.RequiredError('proposalId','Required parameter requestParameters.proposalId was null or undefined when calling consensusProposalsProposalIdVotesGet.');
+ }
+
+ const queryParameters: any = {};
+
+ if (requestParameters.limit !== undefined) {
+ queryParameters['limit'] = requestParameters.limit;
+ }
+
+ if (requestParameters.offset !== undefined) {
+ queryParameters['offset'] = requestParameters.offset;
+ }
+
+ const headerParameters: runtime.HTTPHeaders = {};
+
+ const response = await this.request({
+ path: `/consensus/proposals/{proposal_id}/votes`.replace(`{${"proposal_id"}}`, encodeURIComponent(String(requestParameters.proposalId))),
+ method: 'GET',
+ headers: headerParameters,
+ query: queryParameters,
+ });
+
+ return new runtime.JSONApiResponse(response, (jsonValue) => ProposalVotesFromJSON(jsonValue));
+ }
+
+ /**
+ * Returns a list of votes for a governance proposal.
+ */
+ async consensusProposalsProposalIdVotesGet(requestParameters: ConsensusProposalsProposalIdVotesGetRequest): Promise {
+ const response = await this.consensusProposalsProposalIdVotesGetRaw(requestParameters);
+ return await response.value();
+ }
+
+ /**
+ */
+ async consensusRoothashMessagesGetRaw(requestParameters: ConsensusRoothashMessagesGetRequest): Promise> {
+ if (requestParameters.runtime === null || requestParameters.runtime === undefined) {
+ throw new runtime.RequiredError('runtime','Required parameter requestParameters.runtime was null or undefined when calling consensusRoothashMessagesGet.');
+ }
+
+ const queryParameters: any = {};
+
+ if (requestParameters.limit !== undefined) {
+ queryParameters['limit'] = requestParameters.limit;
+ }
+
+ if (requestParameters.offset !== undefined) {
+ queryParameters['offset'] = requestParameters.offset;
+ }
+
+ if (requestParameters.runtime !== undefined) {
+ queryParameters['runtime'] = requestParameters.runtime;
+ }
+
+ if (requestParameters.round !== undefined) {
+ queryParameters['round'] = requestParameters.round;
+ }
+
+ if (requestParameters.type !== undefined) {
+ queryParameters['type'] = requestParameters.type;
+ }
+
+ if (requestParameters.rel !== undefined) {
+ queryParameters['rel'] = requestParameters.rel;
+ }
+
+ const headerParameters: runtime.HTTPHeaders = {};
+
+ const response = await this.request({
+ path: `/consensus/roothash_messages`,
+ method: 'GET',
+ headers: headerParameters,
+ query: queryParameters,
+ });
+
+ return new runtime.JSONApiResponse(response, (jsonValue) => RoothashMessageListFromJSON(jsonValue));
+ }
+
+ /**
+ */
+ async consensusRoothashMessagesGet(requestParameters: ConsensusRoothashMessagesGetRequest): Promise {
+ const response = await this.consensusRoothashMessagesGetRaw(requestParameters);
+ return await response.value();
+ }
+
+ /**
+ * Returns a list of consensus transactions.
+ */
+ async consensusTransactionsGetRaw(requestParameters: ConsensusTransactionsGetRequest): Promise> {
+ const queryParameters: any = {};
+
+ if (requestParameters.limit !== undefined) {
+ queryParameters['limit'] = requestParameters.limit;
+ }
+
+ if (requestParameters.offset !== undefined) {
+ queryParameters['offset'] = requestParameters.offset;
+ }
+
+ if (requestParameters.block !== undefined) {
+ queryParameters['block'] = requestParameters.block;
+ }
+
+ if (requestParameters.method !== undefined) {
+ queryParameters['method'] = requestParameters.method;
+ }
+
+ if (requestParameters.sender !== undefined) {
+ queryParameters['sender'] = requestParameters.sender;
+ }
+
+ if (requestParameters.rel !== undefined) {
+ queryParameters['rel'] = requestParameters.rel;
+ }
+
+ if (requestParameters.after !== undefined) {
+ queryParameters['after'] = (requestParameters.after as any).toISOString();
+ }
+
+ if (requestParameters.before !== undefined) {
+ queryParameters['before'] = (requestParameters.before as any).toISOString();
+ }
+
+ const headerParameters: runtime.HTTPHeaders = {};
+
+ const response = await this.request({
+ path: `/consensus/transactions`,
+ method: 'GET',
+ headers: headerParameters,
+ query: queryParameters,
+ });
+
+ return new runtime.JSONApiResponse(response, (jsonValue) => TransactionListFromJSON(jsonValue));
+ }
+
+ /**
+ * Returns a list of consensus transactions.
+ */
+ async consensusTransactionsGet(requestParameters: ConsensusTransactionsGetRequest): Promise {
+ const response = await this.consensusTransactionsGetRaw(requestParameters);
+ return await response.value();
+ }
+
+ /**
+ * Returns a consensus transaction.
+ */
+ async consensusTransactionsTxHashGetRaw(requestParameters: ConsensusTransactionsTxHashGetRequest): Promise> {
+ if (requestParameters.txHash === null || requestParameters.txHash === undefined) {
+ throw new runtime.RequiredError('txHash','Required parameter requestParameters.txHash was null or undefined when calling consensusTransactionsTxHashGet.');
+ }
+
+ const queryParameters: any = {};
+
+ const headerParameters: runtime.HTTPHeaders = {};
+
+ const response = await this.request({
+ path: `/consensus/transactions/{tx_hash}`.replace(`{${"tx_hash"}}`, encodeURIComponent(String(requestParameters.txHash))),
+ method: 'GET',
+ headers: headerParameters,
+ query: queryParameters,
+ });
+
+ return new runtime.JSONApiResponse(response, (jsonValue) => TransactionFromJSON(jsonValue));
+ }
+
+ /**
+ * Returns a consensus transaction.
+ */
+ async consensusTransactionsTxHashGet(requestParameters: ConsensusTransactionsTxHashGetRequest): Promise {
+ const response = await this.consensusTransactionsTxHashGetRaw(requestParameters);
+ return await response.value();
+ }
+
+ /**
+ * Returns a validator registered at the consensus layer.
+ */
+ async consensusValidatorsAddressGetRaw(requestParameters: ConsensusValidatorsAddressGetRequest): Promise> {
+ if (requestParameters.address === null || requestParameters.address === undefined) {
+ throw new runtime.RequiredError('address','Required parameter requestParameters.address was null or undefined when calling consensusValidatorsAddressGet.');
+ }
+
+ const queryParameters: any = {};
+
+ const headerParameters: runtime.HTTPHeaders = {};
+
+ const response = await this.request({
+ path: `/consensus/validators/{address}`.replace(`{${"address"}}`, encodeURIComponent(String(requestParameters.address))),
+ method: 'GET',
+ headers: headerParameters,
+ query: queryParameters,
+ });
+
+ return new runtime.JSONApiResponse(response, (jsonValue) => ValidatorListFromJSON(jsonValue));
+ }
+
+ /**
+ * Returns a validator registered at the consensus layer.
+ */
+ async consensusValidatorsAddressGet(requestParameters: ConsensusValidatorsAddressGetRequest): Promise {
+ const response = await this.consensusValidatorsAddressGetRaw(requestParameters);
+ return await response.value();
+ }
+
+ /**
+ * Returns historical information for a single validator.
+ */
+ async consensusValidatorsAddressHistoryGetRaw(requestParameters: ConsensusValidatorsAddressHistoryGetRequest): Promise> {
+ if (requestParameters.address === null || requestParameters.address === undefined) {
+ throw new runtime.RequiredError('address','Required parameter requestParameters.address was null or undefined when calling consensusValidatorsAddressHistoryGet.');
+ }
+
+ const queryParameters: any = {};
+
+ if (requestParameters.limit !== undefined) {
+ queryParameters['limit'] = requestParameters.limit;
+ }
+
+ if (requestParameters.offset !== undefined) {
+ queryParameters['offset'] = requestParameters.offset;
+ }
+
+ if (requestParameters.from !== undefined) {
+ queryParameters['from'] = requestParameters.from;
+ }
+
+ if (requestParameters.to !== undefined) {
+ queryParameters['to'] = requestParameters.to;
+ }
+
+ const headerParameters: runtime.HTTPHeaders = {};
+
+ const response = await this.request({
+ path: `/consensus/validators/{address}/history`.replace(`{${"address"}}`, encodeURIComponent(String(requestParameters.address))),
+ method: 'GET',
+ headers: headerParameters,
+ query: queryParameters,
+ });
+
+ return new runtime.JSONApiResponse(response, (jsonValue) => ValidatorHistoryFromJSON(jsonValue));
+ }
+
+ /**
+ * Returns historical information for a single validator.
+ */
+ async consensusValidatorsAddressHistoryGet(requestParameters: ConsensusValidatorsAddressHistoryGetRequest): Promise {
+ const response = await this.consensusValidatorsAddressHistoryGetRaw(requestParameters);
+ return await response.value();
+ }
+
+ /**
+ * Returns a list of validators registered at the consensus layer (the list includes all registered entities, even those without a currently active validator node).
+ */
+ async consensusValidatorsGetRaw(requestParameters: ConsensusValidatorsGetRequest): Promise> {
+ const queryParameters: any = {};
+
+ if (requestParameters.limit !== undefined) {
+ queryParameters['limit'] = requestParameters.limit;
+ }
+
+ if (requestParameters.offset !== undefined) {
+ queryParameters['offset'] = requestParameters.offset;
+ }
+
+ if (requestParameters.name !== undefined) {
+ queryParameters['name'] = requestParameters.name;
+ }
+
+ const headerParameters: runtime.HTTPHeaders = {};
+
+ const response = await this.request({
+ path: `/consensus/validators`,
+ method: 'GET',
+ headers: headerParameters,
+ query: queryParameters,
+ });
+
+ return new runtime.JSONApiResponse(response, (jsonValue) => ValidatorListFromJSON(jsonValue));
+ }
+
+ /**
+ * Returns a list of validators registered at the consensus layer (the list includes all registered entities, even those without a currently active validator node).
+ */
+ async consensusValidatorsGet(requestParameters: ConsensusValidatorsGetRequest): Promise {
+ const response = await this.consensusValidatorsGetRaw(requestParameters);
+ return await response.value();
+ }
+
+ /**
+ * Returns the status of indexing.
+ */
+ async getStatusRaw(): Promise> {
+ const queryParameters: any = {};
+
+ const headerParameters: runtime.HTTPHeaders = {};
+
+ const response = await this.request({
+ path: `/`,
+ method: 'GET',
+ headers: headerParameters,
+ query: queryParameters,
+ });
+
+ return new runtime.JSONApiResponse(response, (jsonValue) => StatusFromJSON(jsonValue));
+ }
+
+ /**
+ * Returns the status of indexing.
+ */
+ async getStatus(): Promise {
+ const response = await this.getStatusRaw();
+ return await response.value();
+ }
+
+ /**
+ * Returns a (sliding) timeline of the recorded daily unique active accounts for either consensus or one of the paratimes.
+ */
+ async layerStatsActiveAccountsGetRaw(requestParameters: LayerStatsActiveAccountsGetRequest): Promise> {
+ if (requestParameters.layer === null || requestParameters.layer === undefined) {
+ throw new runtime.RequiredError('layer','Required parameter requestParameters.layer was null or undefined when calling layerStatsActiveAccountsGet.');
+ }
+
+ const queryParameters: any = {};
+
+ if (requestParameters.limit !== undefined) {
+ queryParameters['limit'] = requestParameters.limit;
+ }
+
+ if (requestParameters.offset !== undefined) {
+ queryParameters['offset'] = requestParameters.offset;
+ }
+
+ if (requestParameters.windowStepSeconds !== undefined) {
+ queryParameters['window_step_seconds'] = requestParameters.windowStepSeconds;
+ }
+
+ const headerParameters: runtime.HTTPHeaders = {};
+
+ const response = await this.request({
+ path: `/{layer}/stats/active_accounts`.replace(`{${"layer"}}`, encodeURIComponent(String(requestParameters.layer))),
+ method: 'GET',
+ headers: headerParameters,
+ query: queryParameters,
+ });
+
+ return new runtime.JSONApiResponse(response, (jsonValue) => ActiveAccountsListFromJSON(jsonValue));
+ }
+
+ /**
+ * Returns a (sliding) timeline of the recorded daily unique active accounts for either consensus or one of the paratimes.
+ */
+ async layerStatsActiveAccountsGet(requestParameters: LayerStatsActiveAccountsGetRequest): Promise {
+ const response = await this.layerStatsActiveAccountsGetRaw(requestParameters);
+ return await response.value();
+ }
+
+ /**
+ * Returns a timeline of the transaction volume at the chosen granularity, for either consensus or one of the paratimes.
+ */
+ async layerStatsTxVolumeGetRaw(requestParameters: LayerStatsTxVolumeGetRequest): Promise> {
+ if (requestParameters.layer === null || requestParameters.layer === undefined) {
+ throw new runtime.RequiredError('layer','Required parameter requestParameters.layer was null or undefined when calling layerStatsTxVolumeGet.');
+ }
+
+ const queryParameters: any = {};
+
+ if (requestParameters.limit !== undefined) {
+ queryParameters['limit'] = requestParameters.limit;
+ }
+
+ if (requestParameters.offset !== undefined) {
+ queryParameters['offset'] = requestParameters.offset;
+ }
+
+ if (requestParameters.windowSizeSeconds !== undefined) {
+ queryParameters['window_size_seconds'] = requestParameters.windowSizeSeconds;
+ }
+
+ if (requestParameters.windowStepSeconds !== undefined) {
+ queryParameters['window_step_seconds'] = requestParameters.windowStepSeconds;
+ }
+
+ const headerParameters: runtime.HTTPHeaders = {};
+
+ const response = await this.request({
+ path: `/{layer}/stats/tx_volume`.replace(`{${"layer"}}`, encodeURIComponent(String(requestParameters.layer))),
+ method: 'GET',
+ headers: headerParameters,
+ query: queryParameters,
+ });
+
+ return new runtime.JSONApiResponse(response, (jsonValue) => TxVolumeListFromJSON(jsonValue));
+ }
+
+ /**
+ * Returns a timeline of the transaction volume at the chosen granularity, for either consensus or one of the paratimes.
+ */
+ async layerStatsTxVolumeGet(requestParameters: LayerStatsTxVolumeGetRequest): Promise {
+ const response = await this.layerStatsTxVolumeGetRaw(requestParameters);
+ return await response.value();
+ }
+
+ /**
+ * Returns a runtime account.
+ */
+ async runtimeAccountsAddressGetRaw(requestParameters: RuntimeAccountsAddressGetRequest): Promise> {
+ if (requestParameters.runtime === null || requestParameters.runtime === undefined) {
+ throw new runtime.RequiredError('runtime','Required parameter requestParameters.runtime was null or undefined when calling runtimeAccountsAddressGet.');
+ }
+
+ if (requestParameters.address === null || requestParameters.address === undefined) {
+ throw new runtime.RequiredError('address','Required parameter requestParameters.address was null or undefined when calling runtimeAccountsAddressGet.');
+ }
+
+ const queryParameters: any = {};
+
+ const headerParameters: runtime.HTTPHeaders = {};
+
+ const response = await this.request({
+ path: `/{runtime}/accounts/{address}`.replace(`{${"runtime"}}`, encodeURIComponent(String(requestParameters.runtime))).replace(`{${"address"}}`, encodeURIComponent(String(requestParameters.address))),
+ method: 'GET',
+ headers: headerParameters,
+ query: queryParameters,
+ });
+
+ return new runtime.JSONApiResponse(response, (jsonValue) => RuntimeAccountFromJSON(jsonValue));
+ }
+
+ /**
+ * Returns a runtime account.
+ */
+ async runtimeAccountsAddressGet(requestParameters: RuntimeAccountsAddressGetRequest): Promise {
+ const response = await this.runtimeAccountsAddressGetRaw(requestParameters);
+ return await response.value();
+ }
+
+ /**
+ * Returns the list of non-fungible token (NFT) instances owned by an account.
+ */
+ async runtimeAccountsAddressNftsGetRaw(requestParameters: RuntimeAccountsAddressNftsGetRequest): Promise> {
+ if (requestParameters.runtime === null || requestParameters.runtime === undefined) {
+ throw new runtime.RequiredError('runtime','Required parameter requestParameters.runtime was null or undefined when calling runtimeAccountsAddressNftsGet.');
+ }
+
+ if (requestParameters.address === null || requestParameters.address === undefined) {
+ throw new runtime.RequiredError('address','Required parameter requestParameters.address was null or undefined when calling runtimeAccountsAddressNftsGet.');
+ }
+
+ const queryParameters: any = {};
+
+ if (requestParameters.limit !== undefined) {
+ queryParameters['limit'] = requestParameters.limit;
+ }
+
+ if (requestParameters.offset !== undefined) {
+ queryParameters['offset'] = requestParameters.offset;
+ }
+
+ if (requestParameters.tokenAddress !== undefined) {
+ queryParameters['token_address'] = requestParameters.tokenAddress;
+ }
+
+ const headerParameters: runtime.HTTPHeaders = {};
+
+ const response = await this.request({
+ path: `/{runtime}/accounts/{address}/nfts`.replace(`{${"runtime"}}`, encodeURIComponent(String(requestParameters.runtime))).replace(`{${"address"}}`, encodeURIComponent(String(requestParameters.address))),
+ method: 'GET',
+ headers: headerParameters,
+ query: queryParameters,
+ });
+
+ return new runtime.JSONApiResponse(response, (jsonValue) => EvmNftListFromJSON(jsonValue));
+ }
+
+ /**
+ * Returns the list of non-fungible token (NFT) instances owned by an account.
+ */
+ async runtimeAccountsAddressNftsGet(requestParameters: RuntimeAccountsAddressNftsGetRequest): Promise {
+ const response = await this.runtimeAccountsAddressNftsGetRaw(requestParameters);
+ return await response.value();
+ }
+
+ /**
+ * Returns a list of Runtime blocks.
+ */
+ async runtimeBlocksGetRaw(requestParameters: RuntimeBlocksGetRequest): Promise> {
+ if (requestParameters.runtime === null || requestParameters.runtime === undefined) {
+ throw new runtime.RequiredError('runtime','Required parameter requestParameters.runtime was null or undefined when calling runtimeBlocksGet.');
+ }
+
+ const queryParameters: any = {};
+
+ if (requestParameters.limit !== undefined) {
+ queryParameters['limit'] = requestParameters.limit;
+ }
+
+ if (requestParameters.offset !== undefined) {
+ queryParameters['offset'] = requestParameters.offset;
+ }
+
+ if (requestParameters.from !== undefined) {
+ queryParameters['from'] = requestParameters.from;
+ }
+
+ if (requestParameters.to !== undefined) {
+ queryParameters['to'] = requestParameters.to;
+ }
+
+ if (requestParameters.after !== undefined) {
+ queryParameters['after'] = (requestParameters.after as any).toISOString();
+ }
+
+ if (requestParameters.before !== undefined) {
+ queryParameters['before'] = (requestParameters.before as any).toISOString();
+ }
+
+ if (requestParameters.hash !== undefined) {
+ queryParameters['hash'] = requestParameters.hash;
+ }
+
+ const headerParameters: runtime.HTTPHeaders = {};
+
+ const response = await this.request({
+ path: `/{runtime}/blocks`.replace(`{${"runtime"}}`, encodeURIComponent(String(requestParameters.runtime))),
+ method: 'GET',
+ headers: headerParameters,
+ query: queryParameters,
+ });
+
+ return new runtime.JSONApiResponse(response, (jsonValue) => RuntimeBlockListFromJSON(jsonValue));
+ }
+
+ /**
+ * Returns a list of Runtime blocks.
+ */
+ async runtimeBlocksGet(requestParameters: RuntimeBlocksGetRequest): Promise {
+ const response = await this.runtimeBlocksGetRaw(requestParameters);
+ return await response.value();
+ }
+
+ /**
+ * Returns a list of runtime events.
+ */
+ async runtimeEventsGetRaw(requestParameters: RuntimeEventsGetRequest): Promise> {
+ if (requestParameters.runtime === null || requestParameters.runtime === undefined) {
+ throw new runtime.RequiredError('runtime','Required parameter requestParameters.runtime was null or undefined when calling runtimeEventsGet.');
+ }
+
+ const queryParameters: any = {};
+
+ if (requestParameters.limit !== undefined) {
+ queryParameters['limit'] = requestParameters.limit;
+ }
+
+ if (requestParameters.offset !== undefined) {
+ queryParameters['offset'] = requestParameters.offset;
+ }
+
+ if (requestParameters.block !== undefined) {
+ queryParameters['block'] = requestParameters.block;
+ }
+
+ if (requestParameters.txIndex !== undefined) {
+ queryParameters['tx_index'] = requestParameters.txIndex;
+ }
+
+ if (requestParameters.txHash !== undefined) {
+ queryParameters['tx_hash'] = requestParameters.txHash;
+ }
+
+ if (requestParameters.type !== undefined) {
+ queryParameters['type'] = requestParameters.type;
+ }
+
+ if (requestParameters.rel !== undefined) {
+ queryParameters['rel'] = requestParameters.rel;
+ }
+
+ if (requestParameters.evmLogSignature !== undefined) {
+ queryParameters['evm_log_signature'] = requestParameters.evmLogSignature;
+ }
+
+ if (requestParameters.contractAddress !== undefined) {
+ queryParameters['contract_address'] = requestParameters.contractAddress;
+ }
+
+ if (requestParameters.nftId !== undefined) {
+ queryParameters['nft_id'] = requestParameters.nftId;
+ }
+
+ const headerParameters: runtime.HTTPHeaders = {};
+
+ const response = await this.request({
+ path: `/{runtime}/events`.replace(`{${"runtime"}}`, encodeURIComponent(String(requestParameters.runtime))),
+ method: 'GET',
+ headers: headerParameters,
+ query: queryParameters,
+ });
+
+ return new runtime.JSONApiResponse(response, (jsonValue) => RuntimeEventListFromJSON(jsonValue));
+ }
+
+ /**
+ * Returns a list of runtime events.
+ */
+ async runtimeEventsGet(requestParameters: RuntimeEventsGetRequest): Promise {
+ const response = await this.runtimeEventsGetRaw(requestParameters);
+ return await response.value();
+ }
+
+ /**
+ * Returns info on an EVM (ERC-20, ...) token on the runtime.
+ */
+ async runtimeEvmTokensAddressGetRaw(requestParameters: RuntimeEvmTokensAddressGetRequest): Promise> {
+ if (requestParameters.runtime === null || requestParameters.runtime === undefined) {
+ throw new runtime.RequiredError('runtime','Required parameter requestParameters.runtime was null or undefined when calling runtimeEvmTokensAddressGet.');
+ }
+
+ if (requestParameters.address === null || requestParameters.address === undefined) {
+ throw new runtime.RequiredError('address','Required parameter requestParameters.address was null or undefined when calling runtimeEvmTokensAddressGet.');
+ }
+
+ const queryParameters: any = {};
+
+ const headerParameters: runtime.HTTPHeaders = {};
+
+ const response = await this.request({
+ path: `/{runtime}/evm_tokens/{address}`.replace(`{${"runtime"}}`, encodeURIComponent(String(requestParameters.runtime))).replace(`{${"address"}}`, encodeURIComponent(String(requestParameters.address))),
+ method: 'GET',
+ headers: headerParameters,
+ query: queryParameters,
+ });
+
+ return new runtime.JSONApiResponse(response, (jsonValue) => EvmTokenFromJSON(jsonValue));
+ }
+
+ /**
+ * Returns info on an EVM (ERC-20, ...) token on the runtime.
+ */
+ async runtimeEvmTokensAddressGet(requestParameters: RuntimeEvmTokensAddressGetRequest): Promise {
+ const response = await this.runtimeEvmTokensAddressGetRaw(requestParameters);
+ return await response.value();
+ }
+
+ /**
+ * Returns the list of holders of an EVM (ERC-20, ...) token. This endpoint does not verify that `address` is actually an EVM token; if it is not, it will simply return an empty list.
+ */
+ async runtimeEvmTokensAddressHoldersGetRaw(requestParameters: RuntimeEvmTokensAddressHoldersGetRequest): Promise> {
+ if (requestParameters.runtime === null || requestParameters.runtime === undefined) {
+ throw new runtime.RequiredError('runtime','Required parameter requestParameters.runtime was null or undefined when calling runtimeEvmTokensAddressHoldersGet.');
+ }
+
+ if (requestParameters.address === null || requestParameters.address === undefined) {
+ throw new runtime.RequiredError('address','Required parameter requestParameters.address was null or undefined when calling runtimeEvmTokensAddressHoldersGet.');
+ }
+
+ const queryParameters: any = {};
+
+ if (requestParameters.limit !== undefined) {
+ queryParameters['limit'] = requestParameters.limit;
+ }
+
+ if (requestParameters.offset !== undefined) {
+ queryParameters['offset'] = requestParameters.offset;
+ }
+
+ const headerParameters: runtime.HTTPHeaders = {};
+
+ const response = await this.request({
+ path: `/{runtime}/evm_tokens/{address}/holders`.replace(`{${"runtime"}}`, encodeURIComponent(String(requestParameters.runtime))).replace(`{${"address"}}`, encodeURIComponent(String(requestParameters.address))),
+ method: 'GET',
+ headers: headerParameters,
+ query: queryParameters,
+ });
+
+ return new runtime.JSONApiResponse(response, (jsonValue) => TokenHolderListFromJSON(jsonValue));
+ }
+
+ /**
+ * Returns the list of holders of an EVM (ERC-20, ...) token. This endpoint does not verify that `address` is actually an EVM token; if it is not, it will simply return an empty list.
+ */
+ async runtimeEvmTokensAddressHoldersGet(requestParameters: RuntimeEvmTokensAddressHoldersGetRequest): Promise {
+ const response = await this.runtimeEvmTokensAddressHoldersGetRaw(requestParameters);
+ return await response.value();
+ }
+
+ /**
+ * Returns the list of non-fungible token (NFT) instances of an EVM (ERC-721, ...) token. This endpoint does not verify that `address` is actually an EVM token; if it is not, it will simply return an empty list.
+ */
+ async runtimeEvmTokensAddressNftsGetRaw(requestParameters: RuntimeEvmTokensAddressNftsGetRequest): Promise> {
+ if (requestParameters.runtime === null || requestParameters.runtime === undefined) {
+ throw new runtime.RequiredError('runtime','Required parameter requestParameters.runtime was null or undefined when calling runtimeEvmTokensAddressNftsGet.');
+ }
+
+ if (requestParameters.address === null || requestParameters.address === undefined) {
+ throw new runtime.RequiredError('address','Required parameter requestParameters.address was null or undefined when calling runtimeEvmTokensAddressNftsGet.');
+ }
+
+ const queryParameters: any = {};
+
+ if (requestParameters.limit !== undefined) {
+ queryParameters['limit'] = requestParameters.limit;
+ }
+
+ if (requestParameters.offset !== undefined) {
+ queryParameters['offset'] = requestParameters.offset;
+ }
+
+ const headerParameters: runtime.HTTPHeaders = {};
+
+ const response = await this.request({
+ path: `/{runtime}/evm_tokens/{address}/nfts`.replace(`{${"runtime"}}`, encodeURIComponent(String(requestParameters.runtime))).replace(`{${"address"}}`, encodeURIComponent(String(requestParameters.address))),
+ method: 'GET',
+ headers: headerParameters,
+ query: queryParameters,
+ });
+
+ return new runtime.JSONApiResponse(response, (jsonValue) => EvmNftListFromJSON(jsonValue));
+ }
+
+ /**
+ * Returns the list of non-fungible token (NFT) instances of an EVM (ERC-721, ...) token. This endpoint does not verify that `address` is actually an EVM token; if it is not, it will simply return an empty list.
+ */
+ async runtimeEvmTokensAddressNftsGet(requestParameters: RuntimeEvmTokensAddressNftsGetRequest): Promise {
+ const response = await this.runtimeEvmTokensAddressNftsGetRaw(requestParameters);
+ return await response.value();
+ }
+
+ /**
+ * Returns the non-fungible token (NFT) instance of an EVM (ERC-721, ...) token.
+ */
+ async runtimeEvmTokensAddressNftsIdGetRaw(requestParameters: RuntimeEvmTokensAddressNftsIdGetRequest): Promise> {
+ if (requestParameters.runtime === null || requestParameters.runtime === undefined) {
+ throw new runtime.RequiredError('runtime','Required parameter requestParameters.runtime was null or undefined when calling runtimeEvmTokensAddressNftsIdGet.');
+ }
+
+ if (requestParameters.address === null || requestParameters.address === undefined) {
+ throw new runtime.RequiredError('address','Required parameter requestParameters.address was null or undefined when calling runtimeEvmTokensAddressNftsIdGet.');
+ }
+
+ if (requestParameters.id === null || requestParameters.id === undefined) {
+ throw new runtime.RequiredError('id','Required parameter requestParameters.id was null or undefined when calling runtimeEvmTokensAddressNftsIdGet.');
+ }
+
+ const queryParameters: any = {};
+
+ const headerParameters: runtime.HTTPHeaders = {};
+
+ const response = await this.request({
+ path: `/{runtime}/evm_tokens/{address}/nfts/{id}`.replace(`{${"runtime"}}`, encodeURIComponent(String(requestParameters.runtime))).replace(`{${"address"}}`, encodeURIComponent(String(requestParameters.address))).replace(`{${"id"}}`, encodeURIComponent(String(requestParameters.id))),
+ method: 'GET',
+ headers: headerParameters,
+ query: queryParameters,
+ });
+
+ return new runtime.JSONApiResponse(response, (jsonValue) => EvmNftFromJSON(jsonValue));
+ }
+
+ /**
+ * Returns the non-fungible token (NFT) instance of an EVM (ERC-721, ...) token.
+ */
+ async runtimeEvmTokensAddressNftsIdGet(requestParameters: RuntimeEvmTokensAddressNftsIdGetRequest): Promise {
+ const response = await this.runtimeEvmTokensAddressNftsIdGetRaw(requestParameters);
+ return await response.value();
+ }
+
+ /**
+ * Returns a list of EVM (ERC-20, ...) tokens on the runtime.
+ */
+ async runtimeEvmTokensGetRaw(requestParameters: RuntimeEvmTokensGetRequest): Promise> {
+ if (requestParameters.runtime === null || requestParameters.runtime === undefined) {
+ throw new runtime.RequiredError('runtime','Required parameter requestParameters.runtime was null or undefined when calling runtimeEvmTokensGet.');
+ }
+
+ const queryParameters: any = {};
+
+ if (requestParameters.limit !== undefined) {
+ queryParameters['limit'] = requestParameters.limit;
+ }
+
+ if (requestParameters.offset !== undefined) {
+ queryParameters['offset'] = requestParameters.offset;
+ }
+
+ if (requestParameters.name !== undefined) {
+ queryParameters['name'] = requestParameters.name;
+ }
+
+ const headerParameters: runtime.HTTPHeaders = {};
+
+ const response = await this.request({
+ path: `/{runtime}/evm_tokens`.replace(`{${"runtime"}}`, encodeURIComponent(String(requestParameters.runtime))),
+ method: 'GET',
+ headers: headerParameters,
+ query: queryParameters,
+ });
+
+ return new runtime.JSONApiResponse(response, (jsonValue) => EvmTokenListFromJSON(jsonValue));
+ }
+
+ /**
+ * Returns a list of EVM (ERC-20, ...) tokens on the runtime.
+ */
+ async runtimeEvmTokensGet(requestParameters: RuntimeEvmTokensGetRequest): Promise {
+ const response = await this.runtimeEvmTokensGetRaw(requestParameters);
+ return await response.value();
+ }
+
+ /**
+ * Returns the runtime status.
+ */
+ async runtimeStatusGetRaw(requestParameters: RuntimeStatusGetRequest): Promise> {
+ if (requestParameters.runtime === null || requestParameters.runtime === undefined) {
+ throw new runtime.RequiredError('runtime','Required parameter requestParameters.runtime was null or undefined when calling runtimeStatusGet.');
+ }
+
+ const queryParameters: any = {};
+
+ const headerParameters: runtime.HTTPHeaders = {};
+
+ const response = await this.request({
+ path: `/{runtime}/status`.replace(`{${"runtime"}}`, encodeURIComponent(String(requestParameters.runtime))),
+ method: 'GET',
+ headers: headerParameters,
+ query: queryParameters,
+ });
+
+ return new runtime.JSONApiResponse(response, (jsonValue) => RuntimeStatusFromJSON(jsonValue));
+ }
+
+ /**
+ * Returns the runtime status.
+ */
+ async runtimeStatusGet(requestParameters: RuntimeStatusGetRequest): Promise {
+ const response = await this.runtimeStatusGetRaw(requestParameters);
+ return await response.value();
+ }
+
+ /**
+ * Returns a list of Runtime transactions.
+ */
+ async runtimeTransactionsGetRaw(requestParameters: RuntimeTransactionsGetRequest): Promise> {
+ if (requestParameters.runtime === null || requestParameters.runtime === undefined) {
+ throw new runtime.RequiredError('runtime','Required parameter requestParameters.runtime was null or undefined when calling runtimeTransactionsGet.');
+ }
+
+ const queryParameters: any = {};
+
+ if (requestParameters.limit !== undefined) {
+ queryParameters['limit'] = requestParameters.limit;
+ }
+
+ if (requestParameters.offset !== undefined) {
+ queryParameters['offset'] = requestParameters.offset;
+ }
+
+ if (requestParameters.block !== undefined) {
+ queryParameters['block'] = requestParameters.block;
+ }
+
+ if (requestParameters.after !== undefined) {
+ queryParameters['after'] = (requestParameters.after as any).toISOString();
+ }
+
+ if (requestParameters.before !== undefined) {
+ queryParameters['before'] = (requestParameters.before as any).toISOString();
+ }
+
+ if (requestParameters.rel !== undefined) {
+ queryParameters['rel'] = requestParameters.rel;
+ }
+
+ const headerParameters: runtime.HTTPHeaders = {};
+
+ const response = await this.request({
+ path: `/{runtime}/transactions`.replace(`{${"runtime"}}`, encodeURIComponent(String(requestParameters.runtime))),
+ method: 'GET',
+ headers: headerParameters,
+ query: queryParameters,
+ });
+
+ return new runtime.JSONApiResponse(response, (jsonValue) => RuntimeTransactionListFromJSON(jsonValue));
+ }
+
+ /**
+ * Returns a list of Runtime transactions.
+ */
+ async runtimeTransactionsGet(requestParameters: RuntimeTransactionsGetRequest): Promise {
+ const response = await this.runtimeTransactionsGetRaw(requestParameters);
+ return await response.value();
+ }
+
+ /**
+ * Returns runtime transactions with the given transaction hash.
+ */
+ async runtimeTransactionsTxHashGetRaw(requestParameters: RuntimeTransactionsTxHashGetRequest): Promise> {
+ if (requestParameters.runtime === null || requestParameters.runtime === undefined) {
+ throw new runtime.RequiredError('runtime','Required parameter requestParameters.runtime was null or undefined when calling runtimeTransactionsTxHashGet.');
+ }
+
+ if (requestParameters.txHash === null || requestParameters.txHash === undefined) {
+ throw new runtime.RequiredError('txHash','Required parameter requestParameters.txHash was null or undefined when calling runtimeTransactionsTxHashGet.');
+ }
+
+ const queryParameters: any = {};
+
+ const headerParameters: runtime.HTTPHeaders = {};
+
+ const response = await this.request({
+ path: `/{runtime}/transactions/{tx_hash}`.replace(`{${"runtime"}}`, encodeURIComponent(String(requestParameters.runtime))).replace(`{${"tx_hash"}}`, encodeURIComponent(String(requestParameters.txHash))),
+ method: 'GET',
+ headers: headerParameters,
+ query: queryParameters,
+ });
+
+ return new runtime.JSONApiResponse(response, (jsonValue) => RuntimeTransactionListFromJSON(jsonValue));
+ }
+
+ /**
+ * Returns runtime transactions with the given transaction hash.
+ */
+ async runtimeTransactionsTxHashGet(requestParameters: RuntimeTransactionsTxHashGetRequest): Promise {
+ const response = await this.runtimeTransactionsTxHashGetRaw(requestParameters);
+ return await response.value();
+ }
+
+}
diff --git a/src/vendors/nexus/apis/index.ts b/src/vendors/nexus/apis/index.ts
new file mode 100644
index 0000000000..20eda2ab0a
--- /dev/null
+++ b/src/vendors/nexus/apis/index.ts
@@ -0,0 +1 @@
+export * from './DefaultApi'
diff --git a/src/vendors/nexus/index.ts b/src/vendors/nexus/index.ts
new file mode 100644
index 0000000000..36e2d32324
--- /dev/null
+++ b/src/vendors/nexus/index.ts
@@ -0,0 +1,3 @@
+export * from './runtime'
+export * from './apis'
+export * from './models'
diff --git a/src/vendors/nexus/models/Account.ts b/src/vendors/nexus/models/Account.ts
new file mode 100644
index 0000000000..777086ff74
--- /dev/null
+++ b/src/vendors/nexus/models/Account.ts
@@ -0,0 +1,142 @@
+/* tslint:disable */
+/* eslint-disable */
+/**
+ * Oasis Nexus API V1
+ * An API for accessing indexed data from the Oasis Network. # Endpoints
+ *
+ * The version of the OpenAPI document: 0.1.0
+ *
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
+ */
+
+import { exists, mapValues } from '../runtime';
+import {
+ AccountStats,
+ AccountStatsFromJSON,
+ AccountStatsFromJSONTyped,
+ AccountStatsToJSON,
+ Allowance,
+ AllowanceFromJSON,
+ AllowanceFromJSONTyped,
+ AllowanceToJSON,
+} from './';
+
+/**
+ * A consensus layer account.
+ * @export
+ * @interface Account
+ */
+export interface Account {
+ /**
+ * The staking address for this account.
+ * @type {string}
+ * @memberof Account
+ */
+ address: string;
+ /**
+ * The expected nonce for the next transaction (= last used nonce + 1)
+ * @type {number}
+ * @memberof Account
+ */
+ nonce: number;
+ /**
+ * The available balance, in base units.
+ * @type {string}
+ * @memberof Account
+ */
+ available: string;
+ /**
+ * The active escrow balance, in base units.
+ * @type {string}
+ * @memberof Account
+ */
+ escrow: string;
+ /**
+ * The debonding escrow balance, in base units.
+ * @type {string}
+ * @memberof Account
+ */
+ debonding: string;
+ /**
+ * The balance of this accounts' (outgoing) delegations, in base units.
+ * @type {string}
+ * @memberof Account
+ */
+ delegations_balance: string;
+ /**
+ * The balance of this accounts' (outgoing) debonding delegations, in base units.
+ * @type {string}
+ * @memberof Account
+ */
+ debonding_delegations_balance: string;
+ /**
+ * The second-granular consensus time of the block in which this account was first active.
+ * Dates before Cobalt (2021-04-28) are approximate.
+ * @type {Date}
+ * @memberof Account
+ */
+ first_activity?: Date;
+ /**
+ * The allowances made by this account.
+ * This field is omitted when listing multiple accounts.
+ * @type {Array}
+ * @memberof Account
+ */
+ allowances: Array;
+ /**
+ *
+ * @type {AccountStats}
+ * @memberof Account
+ */
+ stats: AccountStats;
+}
+
+export function AccountFromJSON(json: any): Account {
+ return AccountFromJSONTyped(json, false);
+}
+
+export function AccountFromJSONTyped(json: any, ignoreDiscriminator: boolean): Account {
+ if ((json === undefined) || (json === null)) {
+ return json;
+ }
+ return {
+
+ 'address': json['address'],
+ 'nonce': json['nonce'],
+ 'available': json['available'],
+ 'escrow': json['escrow'],
+ 'debonding': json['debonding'],
+ 'delegations_balance': json['delegations_balance'],
+ 'debonding_delegations_balance': json['debonding_delegations_balance'],
+ 'first_activity': !exists(json, 'first_activity') ? undefined : (new Date(json['first_activity'])),
+ 'allowances': ((json['allowances'] as Array).map(AllowanceFromJSON)),
+ 'stats': AccountStatsFromJSON(json['stats']),
+ };
+}
+
+export function AccountToJSON(value?: Account | null): any {
+ if (value === undefined) {
+ return undefined;
+ }
+ if (value === null) {
+ return null;
+ }
+ return {
+
+ 'address': value.address,
+ 'nonce': value.nonce,
+ 'available': value.available,
+ 'escrow': value.escrow,
+ 'debonding': value.debonding,
+ 'delegations_balance': value.delegations_balance,
+ 'debonding_delegations_balance': value.debonding_delegations_balance,
+ 'first_activity': value.first_activity === undefined ? undefined : (value.first_activity.toISOString()),
+ 'allowances': ((value.allowances as Array).map(AllowanceToJSON)),
+ 'stats': AccountStatsToJSON(value.stats),
+ };
+}
+
+
diff --git a/src/vendors/nexus/models/AccountList.ts b/src/vendors/nexus/models/AccountList.ts
new file mode 100644
index 0000000000..d68b71113a
--- /dev/null
+++ b/src/vendors/nexus/models/AccountList.ts
@@ -0,0 +1,89 @@
+/* tslint:disable */
+/* eslint-disable */
+/**
+ * Oasis Nexus API V1
+ * An API for accessing indexed data from the Oasis Network. # Endpoints
+ *
+ * The version of the OpenAPI document: 0.1.0
+ *
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
+ */
+
+import { exists, mapValues } from '../runtime';
+import {
+ Account,
+ AccountFromJSON,
+ AccountFromJSONTyped,
+ AccountToJSON,
+ AccountListAllOf,
+ AccountListAllOfFromJSON,
+ AccountListAllOfFromJSONTyped,
+ AccountListAllOfToJSON,
+ List,
+ ListFromJSON,
+ ListFromJSONTyped,
+ ListToJSON,
+} from './';
+
+/**
+ *
+ * @export
+ * @interface AccountList
+ */
+export interface AccountList {
+ /**
+ * The total number of records that match the query, i.e. the number of records
+ * the query would return with limit=infinity.
+ * @type {number}
+ * @memberof AccountList
+ */
+ total_count: number;
+ /**
+ * Whether total_count is clipped for performance reasons.
+ * @type {boolean}
+ * @memberof AccountList
+ */
+ is_total_count_clipped: boolean;
+ /**
+ *
+ * @type {Array}
+ * @memberof AccountList
+ */
+ accounts: Array;
+}
+
+export function AccountListFromJSON(json: any): AccountList {
+ return AccountListFromJSONTyped(json, false);
+}
+
+export function AccountListFromJSONTyped(json: any, ignoreDiscriminator: boolean): AccountList {
+ if ((json === undefined) || (json === null)) {
+ return json;
+ }
+ return {
+
+ 'total_count': json['total_count'],
+ 'is_total_count_clipped': json['is_total_count_clipped'],
+ 'accounts': ((json['accounts'] as Array).map(AccountFromJSON)),
+ };
+}
+
+export function AccountListToJSON(value?: AccountList | null): any {
+ if (value === undefined) {
+ return undefined;
+ }
+ if (value === null) {
+ return null;
+ }
+ return {
+
+ 'total_count': value.total_count,
+ 'is_total_count_clipped': value.is_total_count_clipped,
+ 'accounts': ((value.accounts as Array).map(AccountToJSON)),
+ };
+}
+
+
diff --git a/src/vendors/nexus/models/AccountListAllOf.ts b/src/vendors/nexus/models/AccountListAllOf.ts
new file mode 100644
index 0000000000..595d1a40e6
--- /dev/null
+++ b/src/vendors/nexus/models/AccountListAllOf.ts
@@ -0,0 +1,64 @@
+/* tslint:disable */
+/* eslint-disable */
+/**
+ * Oasis Nexus API V1
+ * An API for accessing indexed data from the Oasis Network. # Endpoints
+ *
+ * The version of the OpenAPI document: 0.1.0
+ *
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
+ */
+
+import { exists, mapValues } from '../runtime';
+import {
+ Account,
+ AccountFromJSON,
+ AccountFromJSONTyped,
+ AccountToJSON,
+} from './';
+
+/**
+ * A list of consensus layer accounts.
+ * @export
+ * @interface AccountListAllOf
+ */
+export interface AccountListAllOf {
+ /**
+ *
+ * @type {Array}
+ * @memberof AccountListAllOf
+ */
+ accounts: Array;
+}
+
+export function AccountListAllOfFromJSON(json: any): AccountListAllOf {
+ return AccountListAllOfFromJSONTyped(json, false);
+}
+
+export function AccountListAllOfFromJSONTyped(json: any, ignoreDiscriminator: boolean): AccountListAllOf {
+ if ((json === undefined) || (json === null)) {
+ return json;
+ }
+ return {
+
+ 'accounts': ((json['accounts'] as Array).map(AccountFromJSON)),
+ };
+}
+
+export function AccountListAllOfToJSON(value?: AccountListAllOf | null): any {
+ if (value === undefined) {
+ return undefined;
+ }
+ if (value === null) {
+ return null;
+ }
+ return {
+
+ 'accounts': ((value.accounts as Array).map(AccountToJSON)),
+ };
+}
+
+
diff --git a/src/vendors/nexus/models/AccountStats.ts b/src/vendors/nexus/models/AccountStats.ts
new file mode 100644
index 0000000000..16cefdc71f
--- /dev/null
+++ b/src/vendors/nexus/models/AccountStats.ts
@@ -0,0 +1,77 @@
+/* tslint:disable */
+/* eslint-disable */
+/**
+ * Oasis Nexus API V1
+ * An API for accessing indexed data from the Oasis Network. # Endpoints
+ *
+ * The version of the OpenAPI document: 0.1.0
+ *
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
+ */
+
+import { exists, mapValues } from '../runtime';
+/**
+ *
+ * @export
+ * @interface AccountStats
+ */
+export interface AccountStats {
+ /**
+ * The total amount of native tokens sent, in base units.
+ * DEPRECATED: This field might be inaccurate. Nexus is currently not able to track
+ * certain actions which subtract/add tokens.
+ * @type {string}
+ * @memberof AccountStats
+ */
+ total_sent?: string;
+ /**
+ * The total amount of native tokens received, in base units.
+ * DEPRECATED: This field might be inaccurate. Nexus is currently not able to track
+ * certain actions which subtract/add tokens.
+ * @type {string}
+ * @memberof AccountStats
+ */
+ total_received?: string;
+ /**
+ * The total number of transactions this account was involved with.
+ * @type {number}
+ * @memberof AccountStats
+ */
+ num_txns: number;
+}
+
+export function AccountStatsFromJSON(json: any): AccountStats {
+ return AccountStatsFromJSONTyped(json, false);
+}
+
+export function AccountStatsFromJSONTyped(json: any, ignoreDiscriminator: boolean): AccountStats {
+ if ((json === undefined) || (json === null)) {
+ return json;
+ }
+ return {
+
+ 'total_sent': !exists(json, 'total_sent') ? undefined : json['total_sent'],
+ 'total_received': !exists(json, 'total_received') ? undefined : json['total_received'],
+ 'num_txns': json['num_txns'],
+ };
+}
+
+export function AccountStatsToJSON(value?: AccountStats | null): any {
+ if (value === undefined) {
+ return undefined;
+ }
+ if (value === null) {
+ return null;
+ }
+ return {
+
+ 'total_sent': value.total_sent,
+ 'total_received': value.total_received,
+ 'num_txns': value.num_txns,
+ };
+}
+
+
diff --git a/src/vendors/nexus/models/ActiveAccounts.ts b/src/vendors/nexus/models/ActiveAccounts.ts
new file mode 100644
index 0000000000..871ca6e275
--- /dev/null
+++ b/src/vendors/nexus/models/ActiveAccounts.ts
@@ -0,0 +1,65 @@
+/* tslint:disable */
+/* eslint-disable */
+/**
+ * Oasis Nexus API V1
+ * An API for accessing indexed data from the Oasis Network. # Endpoints
+ *
+ * The version of the OpenAPI document: 0.1.0
+ *
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
+ */
+
+import { exists, mapValues } from '../runtime';
+/**
+ *
+ * @export
+ * @interface ActiveAccounts
+ */
+export interface ActiveAccounts {
+ /**
+ * The date for the end of the daily active accounts measurement window.
+ * @type {Date}
+ * @memberof ActiveAccounts
+ */
+ window_end: Date;
+ /**
+ * The number of active accounts for the 24hour window ending at window_end.
+ * @type {number}
+ * @memberof ActiveAccounts
+ */
+ active_accounts: number;
+}
+
+export function ActiveAccountsFromJSON(json: any): ActiveAccounts {
+ return ActiveAccountsFromJSONTyped(json, false);
+}
+
+export function ActiveAccountsFromJSONTyped(json: any, ignoreDiscriminator: boolean): ActiveAccounts {
+ if ((json === undefined) || (json === null)) {
+ return json;
+ }
+ return {
+
+ 'window_end': (new Date(json['window_end'])),
+ 'active_accounts': json['active_accounts'],
+ };
+}
+
+export function ActiveAccountsToJSON(value?: ActiveAccounts | null): any {
+ if (value === undefined) {
+ return undefined;
+ }
+ if (value === null) {
+ return null;
+ }
+ return {
+
+ 'window_end': (value.window_end.toISOString()),
+ 'active_accounts': value.active_accounts,
+ };
+}
+
+
diff --git a/src/vendors/nexus/models/ActiveAccountsList.ts b/src/vendors/nexus/models/ActiveAccountsList.ts
new file mode 100644
index 0000000000..e683d41990
--- /dev/null
+++ b/src/vendors/nexus/models/ActiveAccountsList.ts
@@ -0,0 +1,72 @@
+/* tslint:disable */
+/* eslint-disable */
+/**
+ * Oasis Nexus API V1
+ * An API for accessing indexed data from the Oasis Network. # Endpoints
+ *
+ * The version of the OpenAPI document: 0.1.0
+ *
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
+ */
+
+import { exists, mapValues } from '../runtime';
+import {
+ ActiveAccounts,
+ ActiveAccountsFromJSON,
+ ActiveAccountsFromJSONTyped,
+ ActiveAccountsToJSON,
+} from './';
+
+/**
+ * A list of daily unique active account windows.
+ * @export
+ * @interface ActiveAccountsList
+ */
+export interface ActiveAccountsList {
+ /**
+ *
+ * @type {number}
+ * @memberof ActiveAccountsList
+ */
+ window_size_seconds: number;
+ /**
+ * The list of daily unique active account windows.
+ * @type {Array}
+ * @memberof ActiveAccountsList
+ */
+ windows: Array;
+}
+
+export function ActiveAccountsListFromJSON(json: any): ActiveAccountsList {
+ return ActiveAccountsListFromJSONTyped(json, false);
+}
+
+export function ActiveAccountsListFromJSONTyped(json: any, ignoreDiscriminator: boolean): ActiveAccountsList {
+ if ((json === undefined) || (json === null)) {
+ return json;
+ }
+ return {
+
+ 'window_size_seconds': json['window_size_seconds'],
+ 'windows': ((json['windows'] as Array).map(ActiveAccountsFromJSON)),
+ };
+}
+
+export function ActiveAccountsListToJSON(value?: ActiveAccountsList | null): any {
+ if (value === undefined) {
+ return undefined;
+ }
+ if (value === null) {
+ return null;
+ }
+ return {
+
+ 'window_size_seconds': value.window_size_seconds,
+ 'windows': ((value.windows as Array).map(ActiveAccountsToJSON)),
+ };
+}
+
+
diff --git a/src/vendors/nexus/models/AddressDerivationContext.ts b/src/vendors/nexus/models/AddressDerivationContext.ts
new file mode 100644
index 0000000000..7c170b6d80
--- /dev/null
+++ b/src/vendors/nexus/models/AddressDerivationContext.ts
@@ -0,0 +1,40 @@
+/* tslint:disable */
+/* eslint-disable */
+/**
+ * Oasis Nexus API V1
+ * An API for accessing indexed data from the Oasis Network. # Endpoints
+ *
+ * The version of the OpenAPI document: 0.1.0
+ *
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
+ */
+
+/**
+ *
+ * @export
+ * @enum {string}
+ */
+export enum AddressDerivationContext {
+ CoreAddressStaking = 'oasis-core/address: staking',
+ RuntimeSdkAddressSecp256k1eth = 'oasis-runtime-sdk/address: secp256k1eth',
+ RuntimeSdkAddressSr25519 = 'oasis-runtime-sdk/address: sr25519',
+ RuntimeSdkAddressMultisig = 'oasis-runtime-sdk/address: multisig',
+ RuntimeSdkAddressModule = 'oasis-runtime-sdk/address: module',
+ RuntimeSdkAddressRuntime = 'oasis-runtime-sdk/address: runtime'
+}
+
+export function AddressDerivationContextFromJSON(json: any): AddressDerivationContext {
+ return AddressDerivationContextFromJSONTyped(json, false);
+}
+
+export function AddressDerivationContextFromJSONTyped(json: any, ignoreDiscriminator: boolean): AddressDerivationContext {
+ return json as AddressDerivationContext;
+}
+
+export function AddressDerivationContextToJSON(value?: AddressDerivationContext | null): any {
+ return value as any;
+}
+
diff --git a/src/vendors/nexus/models/AddressPreimage.ts b/src/vendors/nexus/models/AddressPreimage.ts
new file mode 100644
index 0000000000..2d8c9a45b7
--- /dev/null
+++ b/src/vendors/nexus/models/AddressPreimage.ts
@@ -0,0 +1,96 @@
+/* tslint:disable */
+/* eslint-disable */
+/**
+ * Oasis Nexus API V1
+ * An API for accessing indexed data from the Oasis Network. # Endpoints
+ *
+ * The version of the OpenAPI document: 0.1.0
+ *
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
+ */
+
+import { exists, mapValues } from '../runtime';
+import {
+ AddressDerivationContext,
+ AddressDerivationContextFromJSON,
+ AddressDerivationContextFromJSONTyped,
+ AddressDerivationContextToJSON,
+} from './';
+
+/**
+ * The data from which a consensus-style address (`oasis1...`)
+ * was derived. Notably, for EVM runtimes like Sapphire,
+ * this links the Oasis address and the Ethereum address.
+ *
+ * Oasis addresses are derived from a piece of data, such as an ed25519
+ * public key or an Ethereum address. For example, [this](https://github.com/oasisprotocol/oasis-sdk/blob/b37e6da699df331f5a2ac62793f8be099c68469c/client-sdk/go/helpers/address.go#L90-L91)
+ * is how an Ethereum is converted to an Oasis address. The type of underlying data usually also
+ * determines how the signatuers for this address are verified.
+ *
+ * Consensus supports only "staking addresses" (`context="oasis-core/address: staking"`
+ * below; always ed25519-backed).
+ * Runtimes support all types. This means that every consensus address is also
+ * valid in every runtime. For example, in EVM runtimes, you can use staking
+ * addresses, but only with Oasis tools (e.g. a wallet); EVM contracts such as
+ * ERC20 tokens or tools such as Metamask cannot interact with staking addresses.
+ * @export
+ * @interface AddressPreimage
+ */
+export interface AddressPreimage {
+ /**
+ * The method by which the Oasis address was derived from `address_data`.
+ * @type {AddressDerivationContext}
+ * @memberof AddressPreimage
+ */
+ context: AddressDerivationContext;
+ /**
+ * Version of the `context`.
+ * @type {number}
+ * @memberof AddressPreimage
+ */
+ context_version?: number;
+ /**
+ * The base64-encoded data from which the Oasis address was derived.
+ * When `context = "oasis-runtime-sdk/address: secp256k1eth"`, this
+ * is the Ethereum address (in base64, not hex!).
+ * @type {string}
+ * @memberof AddressPreimage
+ */
+ address_data: string;
+}
+
+export function AddressPreimageFromJSON(json: any): AddressPreimage {
+ return AddressPreimageFromJSONTyped(json, false);
+}
+
+export function AddressPreimageFromJSONTyped(json: any, ignoreDiscriminator: boolean): AddressPreimage {
+ if ((json === undefined) || (json === null)) {
+ return json;
+ }
+ return {
+
+ 'context': AddressDerivationContextFromJSON(json['context']),
+ 'context_version': !exists(json, 'context_version') ? undefined : json['context_version'],
+ 'address_data': json['address_data'],
+ };
+}
+
+export function AddressPreimageToJSON(value?: AddressPreimage | null): any {
+ if (value === undefined) {
+ return undefined;
+ }
+ if (value === null) {
+ return null;
+ }
+ return {
+
+ 'context': AddressDerivationContextToJSON(value.context),
+ 'context_version': value.context_version,
+ 'address_data': value.address_data,
+ };
+}
+
+
diff --git a/src/vendors/nexus/models/Allowance.ts b/src/vendors/nexus/models/Allowance.ts
new file mode 100644
index 0000000000..a6b20a6c98
--- /dev/null
+++ b/src/vendors/nexus/models/Allowance.ts
@@ -0,0 +1,66 @@
+/* tslint:disable */
+/* eslint-disable */
+/**
+ * Oasis Nexus API V1
+ * An API for accessing indexed data from the Oasis Network. # Endpoints
+ *
+ * The version of the OpenAPI document: 0.1.0
+ *
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
+ */
+
+import { exists, mapValues } from '../runtime';
+/**
+ *
+ * @export
+ * @interface Allowance
+ */
+export interface Allowance {
+ /**
+ * The allowed account.
+ * @type {string}
+ * @memberof Allowance
+ */
+ address: string;
+ /**
+ * The amount allowed for the allowed account.
+ * This field is omitted when listing multiple accounts.
+ * @type {string}
+ * @memberof Allowance
+ */
+ amount: string;
+}
+
+export function AllowanceFromJSON(json: any): Allowance {
+ return AllowanceFromJSONTyped(json, false);
+}
+
+export function AllowanceFromJSONTyped(json: any, ignoreDiscriminator: boolean): Allowance {
+ if ((json === undefined) || (json === null)) {
+ return json;
+ }
+ return {
+
+ 'address': json['address'],
+ 'amount': json['amount'],
+ };
+}
+
+export function AllowanceToJSON(value?: Allowance | null): any {
+ if (value === undefined) {
+ return undefined;
+ }
+ if (value === null) {
+ return null;
+ }
+ return {
+
+ 'address': value.address,
+ 'amount': value.amount,
+ };
+}
+
+
diff --git a/src/vendors/nexus/models/BareTokenHolder.ts b/src/vendors/nexus/models/BareTokenHolder.ts
new file mode 100644
index 0000000000..9a131341cc
--- /dev/null
+++ b/src/vendors/nexus/models/BareTokenHolder.ts
@@ -0,0 +1,73 @@
+/* tslint:disable */
+/* eslint-disable */
+/**
+ * Oasis Nexus API V1
+ * An API for accessing indexed data from the Oasis Network. # Endpoints
+ *
+ * The version of the OpenAPI document: 0.1.0
+ *
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
+ */
+
+import { exists, mapValues } from '../runtime';
+/**
+ * Balance of an account for a specific (implied) runtime and token.
+ * @export
+ * @interface BareTokenHolder
+ */
+export interface BareTokenHolder {
+ /**
+ * The Oasis address of the account holder.
+ * @type {string}
+ * @memberof BareTokenHolder
+ */
+ holder_address: string;
+ /**
+ * The Ethereum address of the same account holder, if meaningfully defined.
+ * @type {string}
+ * @memberof BareTokenHolder
+ */
+ eth_holder_address?: string;
+ /**
+ * Number of tokens held, in base units.
+ * @type {string}
+ * @memberof BareTokenHolder
+ */
+ balance: string;
+}
+
+export function BareTokenHolderFromJSON(json: any): BareTokenHolder {
+ return BareTokenHolderFromJSONTyped(json, false);
+}
+
+export function BareTokenHolderFromJSONTyped(json: any, ignoreDiscriminator: boolean): BareTokenHolder {
+ if ((json === undefined) || (json === null)) {
+ return json;
+ }
+ return {
+
+ 'holder_address': json['holder_address'],
+ 'eth_holder_address': !exists(json, 'eth_holder_address') ? undefined : json['eth_holder_address'],
+ 'balance': json['balance'],
+ };
+}
+
+export function BareTokenHolderToJSON(value?: BareTokenHolder | null): any {
+ if (value === undefined) {
+ return undefined;
+ }
+ if (value === null) {
+ return null;
+ }
+ return {
+
+ 'holder_address': value.holder_address,
+ 'eth_holder_address': value.eth_holder_address,
+ 'balance': value.balance,
+ };
+}
+
+
diff --git a/src/vendors/nexus/models/Block.ts b/src/vendors/nexus/models/Block.ts
new file mode 100644
index 0000000000..2062bbade2
--- /dev/null
+++ b/src/vendors/nexus/models/Block.ts
@@ -0,0 +1,115 @@
+/* tslint:disable */
+/* eslint-disable */
+/**
+ * Oasis Nexus API V1
+ * An API for accessing indexed data from the Oasis Network. # Endpoints
+ *
+ * The version of the OpenAPI document: 0.1.0
+ *
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
+ */
+
+import { exists, mapValues } from '../runtime';
+/**
+ * A consensus block.
+ * @export
+ * @interface Block
+ */
+export interface Block {
+ /**
+ * The block height.
+ * @type {number}
+ * @memberof Block
+ */
+ height: number;
+ /**
+ * The block header hash.
+ * @type {string}
+ * @memberof Block
+ */
+ hash: string;
+ /**
+ * The second-granular consensus time.
+ * @type {Date}
+ * @memberof Block
+ */
+ timestamp: Date;
+ /**
+ * Number of transactions in the block.
+ * @type {number}
+ * @memberof Block
+ */
+ num_transactions: number;
+ /**
+ * The gas limit for the block. A gas limit 0 means that the max block gas was unlimited.
+ * Blocks from Cobalt, Damask, and early Eden had no gas limit as their sizes were only
+ * restricted by byte size until an upgrade during Eden introduced a gas limit.
+ * @type {string}
+ * @memberof Block
+ */
+ gas_limit: string;
+ /**
+ * The size limit for the block in bytes.
+ * @type {string}
+ * @memberof Block
+ */
+ size_limit?: string;
+ /**
+ * The epoch number of the epoch in which the block was produced.
+ * @type {number}
+ * @memberof Block
+ */
+ epoch: number;
+ /**
+ * The Merkle root of the state tree after applying the block.
+ * @type {string}
+ * @memberof Block
+ */
+ state_root: string;
+}
+
+export function BlockFromJSON(json: any): Block {
+ return BlockFromJSONTyped(json, false);
+}
+
+export function BlockFromJSONTyped(json: any, ignoreDiscriminator: boolean): Block {
+ if ((json === undefined) || (json === null)) {
+ return json;
+ }
+ return {
+
+ 'height': json['height'],
+ 'hash': json['hash'],
+ 'timestamp': (new Date(json['timestamp'])),
+ 'num_transactions': json['num_transactions'],
+ 'gas_limit': json['gas_limit'],
+ 'size_limit': !exists(json, 'size_limit') ? undefined : json['size_limit'],
+ 'epoch': json['epoch'],
+ 'state_root': json['state_root'],
+ };
+}
+
+export function BlockToJSON(value?: Block | null): any {
+ if (value === undefined) {
+ return undefined;
+ }
+ if (value === null) {
+ return null;
+ }
+ return {
+
+ 'height': value.height,
+ 'hash': value.hash,
+ 'timestamp': (value.timestamp.toISOString()),
+ 'num_transactions': value.num_transactions,
+ 'gas_limit': value.gas_limit,
+ 'size_limit': value.size_limit,
+ 'epoch': value.epoch,
+ 'state_root': value.state_root,
+ };
+}
+
+
diff --git a/src/vendors/nexus/models/BlockList.ts b/src/vendors/nexus/models/BlockList.ts
new file mode 100644
index 0000000000..cd635765d2
--- /dev/null
+++ b/src/vendors/nexus/models/BlockList.ts
@@ -0,0 +1,89 @@
+/* tslint:disable */
+/* eslint-disable */
+/**
+ * Oasis Nexus API V1
+ * An API for accessing indexed data from the Oasis Network. # Endpoints
+ *
+ * The version of the OpenAPI document: 0.1.0
+ *
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
+ */
+
+import { exists, mapValues } from '../runtime';
+import {
+ Block,
+ BlockFromJSON,
+ BlockFromJSONTyped,
+ BlockToJSON,
+ BlockListAllOf,
+ BlockListAllOfFromJSON,
+ BlockListAllOfFromJSONTyped,
+ BlockListAllOfToJSON,
+ List,
+ ListFromJSON,
+ ListFromJSONTyped,
+ ListToJSON,
+} from './';
+
+/**
+ * A list of consensus blocks.
+ * @export
+ * @interface BlockList
+ */
+export interface BlockList {
+ /**
+ * The total number of records that match the query, i.e. the number of records
+ * the query would return with limit=infinity.
+ * @type {number}
+ * @memberof BlockList
+ */
+ total_count: number;
+ /**
+ * Whether total_count is clipped for performance reasons.
+ * @type {boolean}
+ * @memberof BlockList
+ */
+ is_total_count_clipped: boolean;
+ /**
+ *
+ * @type {Array}
+ * @memberof BlockList
+ */
+ blocks: Array;
+}
+
+export function BlockListFromJSON(json: any): BlockList {
+ return BlockListFromJSONTyped(json, false);
+}
+
+export function BlockListFromJSONTyped(json: any, ignoreDiscriminator: boolean): BlockList {
+ if ((json === undefined) || (json === null)) {
+ return json;
+ }
+ return {
+
+ 'total_count': json['total_count'],
+ 'is_total_count_clipped': json['is_total_count_clipped'],
+ 'blocks': ((json['blocks'] as Array).map(BlockFromJSON)),
+ };
+}
+
+export function BlockListToJSON(value?: BlockList | null): any {
+ if (value === undefined) {
+ return undefined;
+ }
+ if (value === null) {
+ return null;
+ }
+ return {
+
+ 'total_count': value.total_count,
+ 'is_total_count_clipped': value.is_total_count_clipped,
+ 'blocks': ((value.blocks as Array).map(BlockToJSON)),
+ };
+}
+
+
diff --git a/src/vendors/nexus/models/BlockListAllOf.ts b/src/vendors/nexus/models/BlockListAllOf.ts
new file mode 100644
index 0000000000..955e51c76b
--- /dev/null
+++ b/src/vendors/nexus/models/BlockListAllOf.ts
@@ -0,0 +1,64 @@
+/* tslint:disable */
+/* eslint-disable */
+/**
+ * Oasis Nexus API V1
+ * An API for accessing indexed data from the Oasis Network. # Endpoints
+ *
+ * The version of the OpenAPI document: 0.1.0
+ *
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
+ */
+
+import { exists, mapValues } from '../runtime';
+import {
+ Block,
+ BlockFromJSON,
+ BlockFromJSONTyped,
+ BlockToJSON,
+} from './';
+
+/**
+ *
+ * @export
+ * @interface BlockListAllOf
+ */
+export interface BlockListAllOf {
+ /**
+ *
+ * @type {Array}
+ * @memberof BlockListAllOf
+ */
+ blocks: Array;
+}
+
+export function BlockListAllOfFromJSON(json: any): BlockListAllOf {
+ return BlockListAllOfFromJSONTyped(json, false);
+}
+
+export function BlockListAllOfFromJSONTyped(json: any, ignoreDiscriminator: boolean): BlockListAllOf {
+ if ((json === undefined) || (json === null)) {
+ return json;
+ }
+ return {
+
+ 'blocks': ((json['blocks'] as Array).map(BlockFromJSON)),
+ };
+}
+
+export function BlockListAllOfToJSON(value?: BlockListAllOf | null): any {
+ if (value === undefined) {
+ return undefined;
+ }
+ if (value === null) {
+ return null;
+ }
+ return {
+
+ 'blocks': ((value.blocks as Array).map(BlockToJSON)),
+ };
+}
+
+
diff --git a/src/vendors/nexus/models/ConsensusEvent.ts b/src/vendors/nexus/models/ConsensusEvent.ts
new file mode 100644
index 0000000000..262ddea624
--- /dev/null
+++ b/src/vendors/nexus/models/ConsensusEvent.ts
@@ -0,0 +1,134 @@
+/* tslint:disable */
+/* eslint-disable */
+/**
+ * Oasis Nexus API V1
+ * An API for accessing indexed data from the Oasis Network. # Endpoints
+ *
+ * The version of the OpenAPI document: 0.1.0
+ *
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
+ */
+
+import { exists, mapValues } from '../runtime';
+import {
+ ConsensusEventType,
+ ConsensusEventTypeFromJSON,
+ ConsensusEventTypeFromJSONTyped,
+ ConsensusEventTypeToJSON,
+ Runtime,
+ RuntimeFromJSON,
+ RuntimeFromJSONTyped,
+ RuntimeToJSON,
+} from './';
+
+/**
+ * An event emitted by the consensus layer.
+ * @export
+ * @interface ConsensusEvent
+ */
+export interface ConsensusEvent {
+ /**
+ * The block height at which this event was generated.
+ * @type {number}
+ * @memberof ConsensusEvent
+ */
+ block: number;
+ /**
+ * 0-based index of this event's originating transaction within its block.
+ * Absent if the event did not originate from a transaction.
+ * @type {number}
+ * @memberof ConsensusEvent
+ */
+ tx_index?: number;
+ /**
+ * Hash of this event's originating transaction.
+ * Absent if the event did not originate from a transaction.
+ * @type {string}
+ * @memberof ConsensusEvent
+ */
+ tx_hash?: string;
+ /**
+ * The ID of the runtime to which the event relates, encoded in hex.
+ * Present only for events of type `roothash.*`.
+ * @type {string}
+ * @memberof ConsensusEvent
+ */
+ roothash_runtime_id?: string;
+ /**
+ * The runtime to which the event relates.
+ * Present only for events of type `roothash.*`.
+ * @type {Runtime}
+ * @memberof ConsensusEvent
+ */
+ roothash_runtime?: Runtime;
+ /**
+ * When applicable, the round in the runtime to which this event
+ * relates.
+ * Present only for events of type `roothash.*` except for
+ * `roothash.execution_discrepancy` before Eden.
+ * @type {number}
+ * @memberof ConsensusEvent
+ */
+ roothash_runtime_round?: number;
+ /**
+ * The type of the event.
+ * @type {ConsensusEventType}
+ * @memberof ConsensusEvent
+ */
+ type: ConsensusEventType;
+ /**
+ * The event contents. This spec does not encode the many possible types;
+ * instead, see [the Go API](https://pkg.go.dev/github.com/oasisprotocol/oasis-core/go/consensus/api/transaction/results#Event) of oasis-core.
+ * This object will conform to one of the `*Event` types two levels down
+ * the hierarchy, e.g. `TransferEvent` from `Event > staking.Event > TransferEvent`
+ * @type {object}
+ * @memberof ConsensusEvent
+ */
+ body: object;
+}
+
+export function ConsensusEventFromJSON(json: any): ConsensusEvent {
+ return ConsensusEventFromJSONTyped(json, false);
+}
+
+export function ConsensusEventFromJSONTyped(json: any, ignoreDiscriminator: boolean): ConsensusEvent {
+ if ((json === undefined) || (json === null)) {
+ return json;
+ }
+ return {
+
+ 'block': json['block'],
+ 'tx_index': !exists(json, 'tx_index') ? undefined : json['tx_index'],
+ 'tx_hash': !exists(json, 'tx_hash') ? undefined : json['tx_hash'],
+ 'roothash_runtime_id': !exists(json, 'roothash_runtime_id') ? undefined : json['roothash_runtime_id'],
+ 'roothash_runtime': !exists(json, 'roothash_runtime') ? undefined : RuntimeFromJSON(json['roothash_runtime']),
+ 'roothash_runtime_round': !exists(json, 'roothash_runtime_round') ? undefined : json['roothash_runtime_round'],
+ 'type': ConsensusEventTypeFromJSON(json['type']),
+ 'body': json['body'],
+ };
+}
+
+export function ConsensusEventToJSON(value?: ConsensusEvent | null): any {
+ if (value === undefined) {
+ return undefined;
+ }
+ if (value === null) {
+ return null;
+ }
+ return {
+
+ 'block': value.block,
+ 'tx_index': value.tx_index,
+ 'tx_hash': value.tx_hash,
+ 'roothash_runtime_id': value.roothash_runtime_id,
+ 'roothash_runtime': RuntimeToJSON(value.roothash_runtime),
+ 'roothash_runtime_round': value.roothash_runtime_round,
+ 'type': ConsensusEventTypeToJSON(value.type),
+ 'body': value.body,
+ };
+}
+
+
diff --git a/src/vendors/nexus/models/ConsensusEventList.ts b/src/vendors/nexus/models/ConsensusEventList.ts
new file mode 100644
index 0000000000..2a9af56962
--- /dev/null
+++ b/src/vendors/nexus/models/ConsensusEventList.ts
@@ -0,0 +1,89 @@
+/* tslint:disable */
+/* eslint-disable */
+/**
+ * Oasis Nexus API V1
+ * An API for accessing indexed data from the Oasis Network. # Endpoints
+ *
+ * The version of the OpenAPI document: 0.1.0
+ *
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
+ */
+
+import { exists, mapValues } from '../runtime';
+import {
+ ConsensusEvent,
+ ConsensusEventFromJSON,
+ ConsensusEventFromJSONTyped,
+ ConsensusEventToJSON,
+ ConsensusEventListAllOf,
+ ConsensusEventListAllOfFromJSON,
+ ConsensusEventListAllOfFromJSONTyped,
+ ConsensusEventListAllOfToJSON,
+ List,
+ ListFromJSON,
+ ListFromJSONTyped,
+ ListToJSON,
+} from './';
+
+/**
+ *
+ * @export
+ * @interface ConsensusEventList
+ */
+export interface ConsensusEventList {
+ /**
+ * The total number of records that match the query, i.e. the number of records
+ * the query would return with limit=infinity.
+ * @type {number}
+ * @memberof ConsensusEventList
+ */
+ total_count: number;
+ /**
+ * Whether total_count is clipped for performance reasons.
+ * @type {boolean}
+ * @memberof ConsensusEventList
+ */
+ is_total_count_clipped: boolean;
+ /**
+ *
+ * @type {Array}
+ * @memberof ConsensusEventList
+ */
+ events: Array;
+}
+
+export function ConsensusEventListFromJSON(json: any): ConsensusEventList {
+ return ConsensusEventListFromJSONTyped(json, false);
+}
+
+export function ConsensusEventListFromJSONTyped(json: any, ignoreDiscriminator: boolean): ConsensusEventList {
+ if ((json === undefined) || (json === null)) {
+ return json;
+ }
+ return {
+
+ 'total_count': json['total_count'],
+ 'is_total_count_clipped': json['is_total_count_clipped'],
+ 'events': ((json['events'] as Array).map(ConsensusEventFromJSON)),
+ };
+}
+
+export function ConsensusEventListToJSON(value?: ConsensusEventList | null): any {
+ if (value === undefined) {
+ return undefined;
+ }
+ if (value === null) {
+ return null;
+ }
+ return {
+
+ 'total_count': value.total_count,
+ 'is_total_count_clipped': value.is_total_count_clipped,
+ 'events': ((value.events as Array).map(ConsensusEventToJSON)),
+ };
+}
+
+
diff --git a/src/vendors/nexus/models/ConsensusEventListAllOf.ts b/src/vendors/nexus/models/ConsensusEventListAllOf.ts
new file mode 100644
index 0000000000..0fa9963a8f
--- /dev/null
+++ b/src/vendors/nexus/models/ConsensusEventListAllOf.ts
@@ -0,0 +1,64 @@
+/* tslint:disable */
+/* eslint-disable */
+/**
+ * Oasis Nexus API V1
+ * An API for accessing indexed data from the Oasis Network. # Endpoints
+ *
+ * The version of the OpenAPI document: 0.1.0
+ *
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
+ */
+
+import { exists, mapValues } from '../runtime';
+import {
+ ConsensusEvent,
+ ConsensusEventFromJSON,
+ ConsensusEventFromJSONTyped,
+ ConsensusEventToJSON,
+} from './';
+
+/**
+ * A list of consensus events.
+ * @export
+ * @interface ConsensusEventListAllOf
+ */
+export interface ConsensusEventListAllOf {
+ /**
+ *
+ * @type {Array}
+ * @memberof ConsensusEventListAllOf
+ */
+ events: Array;
+}
+
+export function ConsensusEventListAllOfFromJSON(json: any): ConsensusEventListAllOf {
+ return ConsensusEventListAllOfFromJSONTyped(json, false);
+}
+
+export function ConsensusEventListAllOfFromJSONTyped(json: any, ignoreDiscriminator: boolean): ConsensusEventListAllOf {
+ if ((json === undefined) || (json === null)) {
+ return json;
+ }
+ return {
+
+ 'events': ((json['events'] as Array).map(ConsensusEventFromJSON)),
+ };
+}
+
+export function ConsensusEventListAllOfToJSON(value?: ConsensusEventListAllOf | null): any {
+ if (value === undefined) {
+ return undefined;
+ }
+ if (value === null) {
+ return null;
+ }
+ return {
+
+ 'events': ((value.events as Array).map(ConsensusEventToJSON)),
+ };
+}
+
+
diff --git a/src/vendors/nexus/models/ConsensusEventType.ts b/src/vendors/nexus/models/ConsensusEventType.ts
new file mode 100644
index 0000000000..8a43288428
--- /dev/null
+++ b/src/vendors/nexus/models/ConsensusEventType.ts
@@ -0,0 +1,55 @@
+/* tslint:disable */
+/* eslint-disable */
+/**
+ * Oasis Nexus API V1
+ * An API for accessing indexed data from the Oasis Network. # Endpoints
+ *
+ * The version of the OpenAPI document: 0.1.0
+ *
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
+ */
+
+/**
+ *
+ * @export
+ * @enum {string}
+ */
+export enum ConsensusEventType {
+ GovernanceProposalExecuted = 'governance.proposal_executed',
+ GovernanceProposalFinalized = 'governance.proposal_finalized',
+ GovernanceProposalSubmitted = 'governance.proposal_submitted',
+ GovernanceVote = 'governance.vote',
+ RegistryEntity = 'registry.entity',
+ RegistryNodeUnfrozen = 'registry.node_unfrozen',
+ RegistryNode = 'registry.node',
+ RegistryRuntime = 'registry.runtime',
+ RegistryRuntimeSuspended = 'registry.runtime_suspended',
+ RoothashExecutionDiscrepancy = 'roothash.execution_discrepancy',
+ RoothashExecutorCommitted = 'roothash.executor_committed',
+ RoothashFinalized = 'roothash.finalized',
+ RoothashMessage = 'roothash.message',
+ RoothashInMsgProcessed = 'roothash.in_msg_processed',
+ StakingAllowanceChange = 'staking.allowance_change',
+ StakingBurn = 'staking.burn',
+ StakingEscrowAdd = 'staking.escrow.add',
+ StakingEscrowDebondingStart = 'staking.escrow.debonding_start',
+ StakingEscrowReclaim = 'staking.escrow.reclaim',
+ StakingEscrowTake = 'staking.escrow.take',
+ StakingTransfer = 'staking.transfer'
+}
+
+export function ConsensusEventTypeFromJSON(json: any): ConsensusEventType {
+ return ConsensusEventTypeFromJSONTyped(json, false);
+}
+
+export function ConsensusEventTypeFromJSONTyped(json: any, ignoreDiscriminator: boolean): ConsensusEventType {
+ return json as ConsensusEventType;
+}
+
+export function ConsensusEventTypeToJSON(value?: ConsensusEventType | null): any {
+ return value as any;
+}
+
diff --git a/src/vendors/nexus/models/ConsensusTxMethod.ts b/src/vendors/nexus/models/ConsensusTxMethod.ts
new file mode 100644
index 0000000000..f4efa18f43
--- /dev/null
+++ b/src/vendors/nexus/models/ConsensusTxMethod.ts
@@ -0,0 +1,67 @@
+/* tslint:disable */
+/* eslint-disable */
+/**
+ * Oasis Nexus API V1
+ * An API for accessing indexed data from the Oasis Network. # Endpoints
+ *
+ * The version of the OpenAPI document: 0.1.0
+ *
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
+ */
+
+/**
+ *
+ * @export
+ * @enum {string}
+ */
+export enum ConsensusTxMethod {
+ BeaconPvssCommit = 'beacon.PVSSCommit',
+ BeaconPvssReveal = 'beacon.PVSSReveal',
+ BeaconVrfProve = 'beacon.VRFProve',
+ ConsensusMeta = 'consensus.Meta',
+ GovernanceCastVote = 'governance.CastVote',
+ GovernanceSubmitProposal = 'governance.SubmitProposal',
+ KeymanagerPublishEphemeralSecret = 'keymanager.PublishEphemeralSecret',
+ KeymanagerPublishMasterSecret = 'keymanager.PublishMasterSecret',
+ KeymanagerUpdatePolicy = 'keymanager.UpdatePolicy',
+ RegistryDeregisterEntity = 'registry.DeregisterEntity',
+ RegistryProveFreshness = 'registry.ProveFreshness',
+ RegistryRegisterEntity = 'registry.RegisterEntity',
+ RegistryRegisterNode = 'registry.RegisterNode',
+ RegistryRegisterRuntime = 'registry.RegisterRuntime',
+ RegistryUnfreezeNode = 'registry.UnfreezeNode',
+ RoothashEvidence = 'roothash.Evidence',
+ RoothashExecutorCommit = 'roothash.ExecutorCommit',
+ RoothashExecutorProposerTimeout = 'roothash.ExecutorProposerTimeout',
+ RoothashSubmitMsg = 'roothash.SubmitMsg',
+ StakingAddEscrow = 'staking.AddEscrow',
+ StakingAllow = 'staking.Allow',
+ StakingAmendCommissionSchedule = 'staking.AmendCommissionSchedule',
+ StakingBurn = 'staking.Burn',
+ StakingReclaimEscrow = 'staking.ReclaimEscrow',
+ StakingTransfer = 'staking.Transfer',
+ StakingWithdraw = 'staking.Withdraw',
+ KeymanagerChurpApply = 'keymanager/churp.Apply',
+ KeymanagerChurpConfirm = 'keymanager/churp.Confirm',
+ KeymanagerChurpCreate = 'keymanager/churp.Create',
+ KeymanagerChurpUpdate = 'keymanager/churp.Update',
+ VaultAuthorizeAction = 'vault.AuthorizeAction',
+ VaultCancelAction = 'vault.CancelAction',
+ VaultCreate = 'vault.Create'
+}
+
+export function ConsensusTxMethodFromJSON(json: any): ConsensusTxMethod {
+ return ConsensusTxMethodFromJSONTyped(json, false);
+}
+
+export function ConsensusTxMethodFromJSONTyped(json: any, ignoreDiscriminator: boolean): ConsensusTxMethod {
+ return json as ConsensusTxMethod;
+}
+
+export function ConsensusTxMethodToJSON(value?: ConsensusTxMethod | null): any {
+ return value as any;
+}
+
diff --git a/src/vendors/nexus/models/DebondingDelegation.ts b/src/vendors/nexus/models/DebondingDelegation.ts
new file mode 100644
index 0000000000..7db4a2312a
--- /dev/null
+++ b/src/vendors/nexus/models/DebondingDelegation.ts
@@ -0,0 +1,89 @@
+/* tslint:disable */
+/* eslint-disable */
+/**
+ * Oasis Nexus API V1
+ * An API for accessing indexed data from the Oasis Network. # Endpoints
+ *
+ * The version of the OpenAPI document: 0.1.0
+ *
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
+ */
+
+import { exists, mapValues } from '../runtime';
+/**
+ * A debonding delegation.
+ * @export
+ * @interface DebondingDelegation
+ */
+export interface DebondingDelegation {
+ /**
+ * The amount of tokens delegated in base units.
+ * @type {string}
+ * @memberof DebondingDelegation
+ */
+ amount: string;
+ /**
+ * The shares of tokens delegated.
+ * @type {string}
+ * @memberof DebondingDelegation
+ */
+ shares: string;
+ /**
+ * The delegatee (validator) address.
+ * @type {string}
+ * @memberof DebondingDelegation
+ */
+ validator: string;
+ /**
+ * The delegator address.
+ * @type {string}
+ * @memberof DebondingDelegation
+ */
+ delegator: string;
+ /**
+ * The epoch at which the debonding ends.
+ * @type {number}
+ * @memberof DebondingDelegation
+ */
+ debond_end: number;
+}
+
+export function DebondingDelegationFromJSON(json: any): DebondingDelegation {
+ return DebondingDelegationFromJSONTyped(json, false);
+}
+
+export function DebondingDelegationFromJSONTyped(json: any, ignoreDiscriminator: boolean): DebondingDelegation {
+ if ((json === undefined) || (json === null)) {
+ return json;
+ }
+ return {
+
+ 'amount': json['amount'],
+ 'shares': json['shares'],
+ 'validator': json['validator'],
+ 'delegator': json['delegator'],
+ 'debond_end': json['debond_end'],
+ };
+}
+
+export function DebondingDelegationToJSON(value?: DebondingDelegation | null): any {
+ if (value === undefined) {
+ return undefined;
+ }
+ if (value === null) {
+ return null;
+ }
+ return {
+
+ 'amount': value.amount,
+ 'shares': value.shares,
+ 'validator': value.validator,
+ 'delegator': value.delegator,
+ 'debond_end': value.debond_end,
+ };
+}
+
+
diff --git a/src/vendors/nexus/models/DebondingDelegationList.ts b/src/vendors/nexus/models/DebondingDelegationList.ts
new file mode 100644
index 0000000000..322921946f
--- /dev/null
+++ b/src/vendors/nexus/models/DebondingDelegationList.ts
@@ -0,0 +1,89 @@
+/* tslint:disable */
+/* eslint-disable */
+/**
+ * Oasis Nexus API V1
+ * An API for accessing indexed data from the Oasis Network. # Endpoints
+ *
+ * The version of the OpenAPI document: 0.1.0
+ *
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
+ */
+
+import { exists, mapValues } from '../runtime';
+import {
+ DebondingDelegation,
+ DebondingDelegationFromJSON,
+ DebondingDelegationFromJSONTyped,
+ DebondingDelegationToJSON,
+ DebondingDelegationListAllOf,
+ DebondingDelegationListAllOfFromJSON,
+ DebondingDelegationListAllOfFromJSONTyped,
+ DebondingDelegationListAllOfToJSON,
+ List,
+ ListFromJSON,
+ ListFromJSONTyped,
+ ListToJSON,
+} from './';
+
+/**
+ *
+ * @export
+ * @interface DebondingDelegationList
+ */
+export interface DebondingDelegationList {
+ /**
+ * The total number of records that match the query, i.e. the number of records
+ * the query would return with limit=infinity.
+ * @type {number}
+ * @memberof DebondingDelegationList
+ */
+ total_count: number;
+ /**
+ * Whether total_count is clipped for performance reasons.
+ * @type {boolean}
+ * @memberof DebondingDelegationList
+ */
+ is_total_count_clipped: boolean;
+ /**
+ *
+ * @type {Array}
+ * @memberof DebondingDelegationList
+ */
+ debonding_delegations: Array;
+}
+
+export function DebondingDelegationListFromJSON(json: any): DebondingDelegationList {
+ return DebondingDelegationListFromJSONTyped(json, false);
+}
+
+export function DebondingDelegationListFromJSONTyped(json: any, ignoreDiscriminator: boolean): DebondingDelegationList {
+ if ((json === undefined) || (json === null)) {
+ return json;
+ }
+ return {
+
+ 'total_count': json['total_count'],
+ 'is_total_count_clipped': json['is_total_count_clipped'],
+ 'debonding_delegations': ((json['debonding_delegations'] as Array).map(DebondingDelegationFromJSON)),
+ };
+}
+
+export function DebondingDelegationListToJSON(value?: DebondingDelegationList | null): any {
+ if (value === undefined) {
+ return undefined;
+ }
+ if (value === null) {
+ return null;
+ }
+ return {
+
+ 'total_count': value.total_count,
+ 'is_total_count_clipped': value.is_total_count_clipped,
+ 'debonding_delegations': ((value.debonding_delegations as Array).map(DebondingDelegationToJSON)),
+ };
+}
+
+
diff --git a/src/vendors/nexus/models/DebondingDelegationListAllOf.ts b/src/vendors/nexus/models/DebondingDelegationListAllOf.ts
new file mode 100644
index 0000000000..e639245477
--- /dev/null
+++ b/src/vendors/nexus/models/DebondingDelegationListAllOf.ts
@@ -0,0 +1,64 @@
+/* tslint:disable */
+/* eslint-disable */
+/**
+ * Oasis Nexus API V1
+ * An API for accessing indexed data from the Oasis Network. # Endpoints
+ *
+ * The version of the OpenAPI document: 0.1.0
+ *
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
+ */
+
+import { exists, mapValues } from '../runtime';
+import {
+ DebondingDelegation,
+ DebondingDelegationFromJSON,
+ DebondingDelegationFromJSONTyped,
+ DebondingDelegationToJSON,
+} from './';
+
+/**
+ * A list of debonding delegations.
+ * @export
+ * @interface DebondingDelegationListAllOf
+ */
+export interface DebondingDelegationListAllOf {
+ /**
+ *
+ * @type {Array}
+ * @memberof DebondingDelegationListAllOf
+ */
+ debonding_delegations: Array;
+}
+
+export function DebondingDelegationListAllOfFromJSON(json: any): DebondingDelegationListAllOf {
+ return DebondingDelegationListAllOfFromJSONTyped(json, false);
+}
+
+export function DebondingDelegationListAllOfFromJSONTyped(json: any, ignoreDiscriminator: boolean): DebondingDelegationListAllOf {
+ if ((json === undefined) || (json === null)) {
+ return json;
+ }
+ return {
+
+ 'debonding_delegations': ((json['debonding_delegations'] as Array).map(DebondingDelegationFromJSON)),
+ };
+}
+
+export function DebondingDelegationListAllOfToJSON(value?: DebondingDelegationListAllOf | null): any {
+ if (value === undefined) {
+ return undefined;
+ }
+ if (value === null) {
+ return null;
+ }
+ return {
+
+ 'debonding_delegations': ((value.debonding_delegations as Array).map(DebondingDelegationToJSON)),
+ };
+}
+
+
diff --git a/src/vendors/nexus/models/Delegation.ts b/src/vendors/nexus/models/Delegation.ts
new file mode 100644
index 0000000000..ebeef29277
--- /dev/null
+++ b/src/vendors/nexus/models/Delegation.ts
@@ -0,0 +1,81 @@
+/* tslint:disable */
+/* eslint-disable */
+/**
+ * Oasis Nexus API V1
+ * An API for accessing indexed data from the Oasis Network. # Endpoints
+ *
+ * The version of the OpenAPI document: 0.1.0
+ *
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
+ */
+
+import { exists, mapValues } from '../runtime';
+/**
+ * A delegation.
+ * @export
+ * @interface Delegation
+ */
+export interface Delegation {
+ /**
+ * The amount of tokens delegated in base units.
+ * @type {string}
+ * @memberof Delegation
+ */
+ amount: string;
+ /**
+ * The shares of tokens delegated.
+ * @type {string}
+ * @memberof Delegation
+ */
+ shares: string;
+ /**
+ * The delegatee (validator) address.
+ * @type {string}
+ * @memberof Delegation
+ */
+ validator: string;
+ /**
+ * The delegator address.
+ * @type {string}
+ * @memberof Delegation
+ */
+ delegator: string;
+}
+
+export function DelegationFromJSON(json: any): Delegation {
+ return DelegationFromJSONTyped(json, false);
+}
+
+export function DelegationFromJSONTyped(json: any, ignoreDiscriminator: boolean): Delegation {
+ if ((json === undefined) || (json === null)) {
+ return json;
+ }
+ return {
+
+ 'amount': json['amount'],
+ 'shares': json['shares'],
+ 'validator': json['validator'],
+ 'delegator': json['delegator'],
+ };
+}
+
+export function DelegationToJSON(value?: Delegation | null): any {
+ if (value === undefined) {
+ return undefined;
+ }
+ if (value === null) {
+ return null;
+ }
+ return {
+
+ 'amount': value.amount,
+ 'shares': value.shares,
+ 'validator': value.validator,
+ 'delegator': value.delegator,
+ };
+}
+
+
diff --git a/src/vendors/nexus/models/DelegationList.ts b/src/vendors/nexus/models/DelegationList.ts
new file mode 100644
index 0000000000..18a49c9264
--- /dev/null
+++ b/src/vendors/nexus/models/DelegationList.ts
@@ -0,0 +1,89 @@
+/* tslint:disable */
+/* eslint-disable */
+/**
+ * Oasis Nexus API V1
+ * An API for accessing indexed data from the Oasis Network. # Endpoints
+ *
+ * The version of the OpenAPI document: 0.1.0
+ *
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
+ */
+
+import { exists, mapValues } from '../runtime';
+import {
+ Delegation,
+ DelegationFromJSON,
+ DelegationFromJSONTyped,
+ DelegationToJSON,
+ DelegationListAllOf,
+ DelegationListAllOfFromJSON,
+ DelegationListAllOfFromJSONTyped,
+ DelegationListAllOfToJSON,
+ List,
+ ListFromJSON,
+ ListFromJSONTyped,
+ ListToJSON,
+} from './';
+
+/**
+ *
+ * @export
+ * @interface DelegationList
+ */
+export interface DelegationList {
+ /**
+ * The total number of records that match the query, i.e. the number of records
+ * the query would return with limit=infinity.
+ * @type {number}
+ * @memberof DelegationList
+ */
+ total_count: number;
+ /**
+ * Whether total_count is clipped for performance reasons.
+ * @type {boolean}
+ * @memberof DelegationList
+ */
+ is_total_count_clipped: boolean;
+ /**
+ *
+ * @type {Array}
+ * @memberof DelegationList
+ */
+ delegations: Array;
+}
+
+export function DelegationListFromJSON(json: any): DelegationList {
+ return DelegationListFromJSONTyped(json, false);
+}
+
+export function DelegationListFromJSONTyped(json: any, ignoreDiscriminator: boolean): DelegationList {
+ if ((json === undefined) || (json === null)) {
+ return json;
+ }
+ return {
+
+ 'total_count': json['total_count'],
+ 'is_total_count_clipped': json['is_total_count_clipped'],
+ 'delegations': ((json['delegations'] as Array).map(DelegationFromJSON)),
+ };
+}
+
+export function DelegationListToJSON(value?: DelegationList | null): any {
+ if (value === undefined) {
+ return undefined;
+ }
+ if (value === null) {
+ return null;
+ }
+ return {
+
+ 'total_count': value.total_count,
+ 'is_total_count_clipped': value.is_total_count_clipped,
+ 'delegations': ((value.delegations as Array).map(DelegationToJSON)),
+ };
+}
+
+
diff --git a/src/vendors/nexus/models/DelegationListAllOf.ts b/src/vendors/nexus/models/DelegationListAllOf.ts
new file mode 100644
index 0000000000..52440c9627
--- /dev/null
+++ b/src/vendors/nexus/models/DelegationListAllOf.ts
@@ -0,0 +1,64 @@
+/* tslint:disable */
+/* eslint-disable */
+/**
+ * Oasis Nexus API V1
+ * An API for accessing indexed data from the Oasis Network. # Endpoints
+ *
+ * The version of the OpenAPI document: 0.1.0
+ *
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
+ */
+
+import { exists, mapValues } from '../runtime';
+import {
+ Delegation,
+ DelegationFromJSON,
+ DelegationFromJSONTyped,
+ DelegationToJSON,
+} from './';
+
+/**
+ * A list of delegations.
+ * @export
+ * @interface DelegationListAllOf
+ */
+export interface DelegationListAllOf {
+ /**
+ *
+ * @type {Array}
+ * @memberof DelegationListAllOf
+ */
+ delegations: Array;
+}
+
+export function DelegationListAllOfFromJSON(json: any): DelegationListAllOf {
+ return DelegationListAllOfFromJSONTyped(json, false);
+}
+
+export function DelegationListAllOfFromJSONTyped(json: any, ignoreDiscriminator: boolean): DelegationListAllOf {
+ if ((json === undefined) || (json === null)) {
+ return json;
+ }
+ return {
+
+ 'delegations': ((json['delegations'] as Array).map(DelegationFromJSON)),
+ };
+}
+
+export function DelegationListAllOfToJSON(value?: DelegationListAllOf | null): any {
+ if (value === undefined) {
+ return undefined;
+ }
+ if (value === null) {
+ return null;
+ }
+ return {
+
+ 'delegations': ((value.delegations as Array).map(DelegationToJSON)),
+ };
+}
+
+
diff --git a/src/vendors/nexus/models/Entity.ts b/src/vendors/nexus/models/Entity.ts
new file mode 100644
index 0000000000..02a283c994
--- /dev/null
+++ b/src/vendors/nexus/models/Entity.ts
@@ -0,0 +1,73 @@
+/* tslint:disable */
+/* eslint-disable */
+/**
+ * Oasis Nexus API V1
+ * An API for accessing indexed data from the Oasis Network. # Endpoints
+ *
+ * The version of the OpenAPI document: 0.1.0
+ *
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
+ */
+
+import { exists, mapValues } from '../runtime';
+/**
+ * An entity registered at the consensus layer.
+ * @export
+ * @interface Entity
+ */
+export interface Entity {
+ /**
+ * The public key identifying this entity.
+ * @type {string}
+ * @memberof Entity
+ */
+ id: string;
+ /**
+ * The staking address belonging to this entity; derived from the entity's public key.
+ * @type {string}
+ * @memberof Entity
+ */
+ address: string;
+ /**
+ * The vector of nodes owned by this entity.
+ * @type {Array}
+ * @memberof Entity
+ */
+ nodes: Array;
+}
+
+export function EntityFromJSON(json: any): Entity {
+ return EntityFromJSONTyped(json, false);
+}
+
+export function EntityFromJSONTyped(json: any, ignoreDiscriminator: boolean): Entity {
+ if ((json === undefined) || (json === null)) {
+ return json;
+ }
+ return {
+
+ 'id': json['id'],
+ 'address': json['address'],
+ 'nodes': json['nodes'],
+ };
+}
+
+export function EntityToJSON(value?: Entity | null): any {
+ if (value === undefined) {
+ return undefined;
+ }
+ if (value === null) {
+ return null;
+ }
+ return {
+
+ 'id': value.id,
+ 'address': value.address,
+ 'nodes': value.nodes,
+ };
+}
+
+
diff --git a/src/vendors/nexus/models/EntityList.ts b/src/vendors/nexus/models/EntityList.ts
new file mode 100644
index 0000000000..c4fb7de4ce
--- /dev/null
+++ b/src/vendors/nexus/models/EntityList.ts
@@ -0,0 +1,89 @@
+/* tslint:disable */
+/* eslint-disable */
+/**
+ * Oasis Nexus API V1
+ * An API for accessing indexed data from the Oasis Network. # Endpoints
+ *
+ * The version of the OpenAPI document: 0.1.0
+ *
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
+ */
+
+import { exists, mapValues } from '../runtime';
+import {
+ Entity,
+ EntityFromJSON,
+ EntityFromJSONTyped,
+ EntityToJSON,
+ EntityListAllOf,
+ EntityListAllOfFromJSON,
+ EntityListAllOfFromJSONTyped,
+ EntityListAllOfToJSON,
+ List,
+ ListFromJSON,
+ ListFromJSONTyped,
+ ListToJSON,
+} from './';
+
+/**
+ *
+ * @export
+ * @interface EntityList
+ */
+export interface EntityList {
+ /**
+ * The total number of records that match the query, i.e. the number of records
+ * the query would return with limit=infinity.
+ * @type {number}
+ * @memberof EntityList
+ */
+ total_count: number;
+ /**
+ * Whether total_count is clipped for performance reasons.
+ * @type {boolean}
+ * @memberof EntityList
+ */
+ is_total_count_clipped: boolean;
+ /**
+ *
+ * @type {Array}
+ * @memberof EntityList
+ */
+ entities: Array;
+}
+
+export function EntityListFromJSON(json: any): EntityList {
+ return EntityListFromJSONTyped(json, false);
+}
+
+export function EntityListFromJSONTyped(json: any, ignoreDiscriminator: boolean): EntityList {
+ if ((json === undefined) || (json === null)) {
+ return json;
+ }
+ return {
+
+ 'total_count': json['total_count'],
+ 'is_total_count_clipped': json['is_total_count_clipped'],
+ 'entities': ((json['entities'] as Array).map(EntityFromJSON)),
+ };
+}
+
+export function EntityListToJSON(value?: EntityList | null): any {
+ if (value === undefined) {
+ return undefined;
+ }
+ if (value === null) {
+ return null;
+ }
+ return {
+
+ 'total_count': value.total_count,
+ 'is_total_count_clipped': value.is_total_count_clipped,
+ 'entities': ((value.entities as Array).map(EntityToJSON)),
+ };
+}
+
+
diff --git a/src/vendors/nexus/models/EntityListAllOf.ts b/src/vendors/nexus/models/EntityListAllOf.ts
new file mode 100644
index 0000000000..55e23300f8
--- /dev/null
+++ b/src/vendors/nexus/models/EntityListAllOf.ts
@@ -0,0 +1,64 @@
+/* tslint:disable */
+/* eslint-disable */
+/**
+ * Oasis Nexus API V1
+ * An API for accessing indexed data from the Oasis Network. # Endpoints
+ *
+ * The version of the OpenAPI document: 0.1.0
+ *
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
+ */
+
+import { exists, mapValues } from '../runtime';
+import {
+ Entity,
+ EntityFromJSON,
+ EntityFromJSONTyped,
+ EntityToJSON,
+} from './';
+
+/**
+ * A list of entities registered at the consensus layer.
+ * @export
+ * @interface EntityListAllOf
+ */
+export interface EntityListAllOf {
+ /**
+ *
+ * @type {Array}
+ * @memberof EntityListAllOf
+ */
+ entities: Array;
+}
+
+export function EntityListAllOfFromJSON(json: any): EntityListAllOf {
+ return EntityListAllOfFromJSONTyped(json, false);
+}
+
+export function EntityListAllOfFromJSONTyped(json: any, ignoreDiscriminator: boolean): EntityListAllOf {
+ if ((json === undefined) || (json === null)) {
+ return json;
+ }
+ return {
+
+ 'entities': ((json['entities'] as Array).map(EntityFromJSON)),
+ };
+}
+
+export function EntityListAllOfToJSON(value?: EntityListAllOf | null): any {
+ if (value === undefined) {
+ return undefined;
+ }
+ if (value === null) {
+ return null;
+ }
+ return {
+
+ 'entities': ((value.entities as Array).map(EntityToJSON)),
+ };
+}
+
+
diff --git a/src/vendors/nexus/models/Epoch.ts b/src/vendors/nexus/models/Epoch.ts
new file mode 100644
index 0000000000..8de6da612c
--- /dev/null
+++ b/src/vendors/nexus/models/Epoch.ts
@@ -0,0 +1,73 @@
+/* tslint:disable */
+/* eslint-disable */
+/**
+ * Oasis Nexus API V1
+ * An API for accessing indexed data from the Oasis Network. # Endpoints
+ *
+ * The version of the OpenAPI document: 0.1.0
+ *
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
+ */
+
+import { exists, mapValues } from '../runtime';
+/**
+ * A consensus epoch.
+ * @export
+ * @interface Epoch
+ */
+export interface Epoch {
+ /**
+ * The epoch number.
+ * @type {number}
+ * @memberof Epoch
+ */
+ id: number;
+ /**
+ * The (inclusive) height at which this epoch started.
+ * @type {number}
+ * @memberof Epoch
+ */
+ start_height: number;
+ /**
+ * The (inclusive) height at which this epoch ended. Omitted if the epoch is still active.
+ * @type {number}
+ * @memberof Epoch
+ */
+ end_height?: number;
+}
+
+export function EpochFromJSON(json: any): Epoch {
+ return EpochFromJSONTyped(json, false);
+}
+
+export function EpochFromJSONTyped(json: any, ignoreDiscriminator: boolean): Epoch {
+ if ((json === undefined) || (json === null)) {
+ return json;
+ }
+ return {
+
+ 'id': json['id'],
+ 'start_height': json['start_height'],
+ 'end_height': !exists(json, 'end_height') ? undefined : json['end_height'],
+ };
+}
+
+export function EpochToJSON(value?: Epoch | null): any {
+ if (value === undefined) {
+ return undefined;
+ }
+ if (value === null) {
+ return null;
+ }
+ return {
+
+ 'id': value.id,
+ 'start_height': value.start_height,
+ 'end_height': value.end_height,
+ };
+}
+
+
diff --git a/src/vendors/nexus/models/EpochList.ts b/src/vendors/nexus/models/EpochList.ts
new file mode 100644
index 0000000000..b4de01d371
--- /dev/null
+++ b/src/vendors/nexus/models/EpochList.ts
@@ -0,0 +1,89 @@
+/* tslint:disable */
+/* eslint-disable */
+/**
+ * Oasis Nexus API V1
+ * An API for accessing indexed data from the Oasis Network. # Endpoints
+ *
+ * The version of the OpenAPI document: 0.1.0
+ *
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
+ */
+
+import { exists, mapValues } from '../runtime';
+import {
+ Epoch,
+ EpochFromJSON,
+ EpochFromJSONTyped,
+ EpochToJSON,
+ EpochListAllOf,
+ EpochListAllOfFromJSON,
+ EpochListAllOfFromJSONTyped,
+ EpochListAllOfToJSON,
+ List,
+ ListFromJSON,
+ ListFromJSONTyped,
+ ListToJSON,
+} from './';
+
+/**
+ *
+ * @export
+ * @interface EpochList
+ */
+export interface EpochList {
+ /**
+ * The total number of records that match the query, i.e. the number of records
+ * the query would return with limit=infinity.
+ * @type {number}
+ * @memberof EpochList
+ */
+ total_count: number;
+ /**
+ * Whether total_count is clipped for performance reasons.
+ * @type {boolean}
+ * @memberof EpochList
+ */
+ is_total_count_clipped: boolean;
+ /**
+ *
+ * @type {Array}
+ * @memberof EpochList
+ */
+ epochs: Array;
+}
+
+export function EpochListFromJSON(json: any): EpochList {
+ return EpochListFromJSONTyped(json, false);
+}
+
+export function EpochListFromJSONTyped(json: any, ignoreDiscriminator: boolean): EpochList {
+ if ((json === undefined) || (json === null)) {
+ return json;
+ }
+ return {
+
+ 'total_count': json['total_count'],
+ 'is_total_count_clipped': json['is_total_count_clipped'],
+ 'epochs': ((json['epochs'] as Array).map(EpochFromJSON)),
+ };
+}
+
+export function EpochListToJSON(value?: EpochList | null): any {
+ if (value === undefined) {
+ return undefined;
+ }
+ if (value === null) {
+ return null;
+ }
+ return {
+
+ 'total_count': value.total_count,
+ 'is_total_count_clipped': value.is_total_count_clipped,
+ 'epochs': ((value.epochs as Array).map(EpochToJSON)),
+ };
+}
+
+
diff --git a/src/vendors/nexus/models/EpochListAllOf.ts b/src/vendors/nexus/models/EpochListAllOf.ts
new file mode 100644
index 0000000000..eb04e9008b
--- /dev/null
+++ b/src/vendors/nexus/models/EpochListAllOf.ts
@@ -0,0 +1,64 @@
+/* tslint:disable */
+/* eslint-disable */
+/**
+ * Oasis Nexus API V1
+ * An API for accessing indexed data from the Oasis Network. # Endpoints
+ *
+ * The version of the OpenAPI document: 0.1.0
+ *
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
+ */
+
+import { exists, mapValues } from '../runtime';
+import {
+ Epoch,
+ EpochFromJSON,
+ EpochFromJSONTyped,
+ EpochToJSON,
+} from './';
+
+/**
+ * A list of consensus epochs.
+ * @export
+ * @interface EpochListAllOf
+ */
+export interface EpochListAllOf {
+ /**
+ *
+ * @type {Array}
+ * @memberof EpochListAllOf
+ */
+ epochs: Array;
+}
+
+export function EpochListAllOfFromJSON(json: any): EpochListAllOf {
+ return EpochListAllOfFromJSONTyped(json, false);
+}
+
+export function EpochListAllOfFromJSONTyped(json: any, ignoreDiscriminator: boolean): EpochListAllOf {
+ if ((json === undefined) || (json === null)) {
+ return json;
+ }
+ return {
+
+ 'epochs': ((json['epochs'] as Array).map(EpochFromJSON)),
+ };
+}
+
+export function EpochListAllOfToJSON(value?: EpochListAllOf | null): any {
+ if (value === undefined) {
+ return undefined;
+ }
+ if (value === null) {
+ return null;
+ }
+ return {
+
+ 'epochs': ((value.epochs as Array).map(EpochToJSON)),
+ };
+}
+
+
diff --git a/src/vendors/nexus/models/Escrow.ts b/src/vendors/nexus/models/Escrow.ts
new file mode 100644
index 0000000000..c60d139e4f
--- /dev/null
+++ b/src/vendors/nexus/models/Escrow.ts
@@ -0,0 +1,113 @@
+/* tslint:disable */
+/* eslint-disable */
+/**
+ * Oasis Nexus API V1
+ * An API for accessing indexed data from the Oasis Network. # Endpoints
+ *
+ * The version of the OpenAPI document: 0.1.0
+ *
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
+ */
+
+import { exists, mapValues } from '../runtime';
+/**
+ *
+ * @export
+ * @interface Escrow
+ */
+export interface Escrow {
+ /**
+ * The amount of tokens that are delegated to this validator account, and are NOT in the process of debonding.
+ * @type {string}
+ * @memberof Escrow
+ */
+ active_balance?: string;
+ /**
+ * The shares of tokens that are delegated to this validator account, and are NOT in the process of debonding.
+ * @type {string}
+ * @memberof Escrow
+ */
+ active_shares?: string;
+ /**
+ * The amount of tokens that are delegated to this validator account, but are also in the process of debonding (i.e. they will be unstaked within ~2 weeks).
+ * @type {string}
+ * @memberof Escrow
+ */
+ debonding_balance?: string;
+ /**
+ * The shares of tokens that are delegated to this validator account, but are also in the process of debonding (i.e. they will be unstaked within ~2 weeks).
+ * @type {string}
+ * @memberof Escrow
+ */
+ debonding_shares?: string;
+ /**
+ * The amount of token this validator has delegated to itself, and are NOT in the process of debonding.
+ * @type {string}
+ * @memberof Escrow
+ */
+ self_delegation_balance?: string;
+ /**
+ * The shares of tokens this validator has delegated to itself, and are NOT in the process of debonding.
+ * @type {string}
+ * @memberof Escrow
+ */
+ self_delegation_shares?: string;
+ /**
+ * The active_balance of this validator account 24 hours ago.
+ * @type {string}
+ * @memberof Escrow
+ */
+ active_balance_24?: string;
+ /**
+ * The number of accounts that have delegated token to this account.
+ * @type {number}
+ * @memberof Escrow
+ */
+ num_delegators?: number;
+}
+
+export function EscrowFromJSON(json: any): Escrow {
+ return EscrowFromJSONTyped(json, false);
+}
+
+export function EscrowFromJSONTyped(json: any, ignoreDiscriminator: boolean): Escrow {
+ if ((json === undefined) || (json === null)) {
+ return json;
+ }
+ return {
+
+ 'active_balance': !exists(json, 'active_balance') ? undefined : json['active_balance'],
+ 'active_shares': !exists(json, 'active_shares') ? undefined : json['active_shares'],
+ 'debonding_balance': !exists(json, 'debonding_balance') ? undefined : json['debonding_balance'],
+ 'debonding_shares': !exists(json, 'debonding_shares') ? undefined : json['debonding_shares'],
+ 'self_delegation_balance': !exists(json, 'self_delegation_balance') ? undefined : json['self_delegation_balance'],
+ 'self_delegation_shares': !exists(json, 'self_delegation_shares') ? undefined : json['self_delegation_shares'],
+ 'active_balance_24': !exists(json, 'active_balance_24') ? undefined : json['active_balance_24'],
+ 'num_delegators': !exists(json, 'num_delegators') ? undefined : json['num_delegators'],
+ };
+}
+
+export function EscrowToJSON(value?: Escrow | null): any {
+ if (value === undefined) {
+ return undefined;
+ }
+ if (value === null) {
+ return null;
+ }
+ return {
+
+ 'active_balance': value.active_balance,
+ 'active_shares': value.active_shares,
+ 'debonding_balance': value.debonding_balance,
+ 'debonding_shares': value.debonding_shares,
+ 'self_delegation_balance': value.self_delegation_balance,
+ 'self_delegation_shares': value.self_delegation_shares,
+ 'active_balance_24': value.active_balance_24,
+ 'num_delegators': value.num_delegators,
+ };
+}
+
+
diff --git a/src/vendors/nexus/models/EvmAbiParam.ts b/src/vendors/nexus/models/EvmAbiParam.ts
new file mode 100644
index 0000000000..4dafa034fa
--- /dev/null
+++ b/src/vendors/nexus/models/EvmAbiParam.ts
@@ -0,0 +1,77 @@
+/* tslint:disable */
+/* eslint-disable */
+/**
+ * Oasis Nexus API V1
+ * An API for accessing indexed data from the Oasis Network. # Endpoints
+ *
+ * The version of the OpenAPI document: 0.1.0
+ *
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
+ */
+
+import { exists, mapValues } from '../runtime';
+/**
+ * A decoded parameter of an event or error emitted from an EVM runtime.
+ * Values of EVM type `int128`, `uint128`, `int256`, `uint256`, `fixed`, and `ufixed` are represented as strings.
+ * Values of EVM type `address` and `address payable` are represented as lowercase hex strings with a "0x" prefix.
+ * Values of EVM type `bytes` and `bytes` are represented as base64 strings.
+ * Values of other EVM types (integer types, strings, arrays, etc.) are represented as their JSON counterpart.
+ * @export
+ * @interface EvmAbiParam
+ */
+export interface EvmAbiParam {
+ /**
+ * The parameter name.
+ * @type {string}
+ * @memberof EvmAbiParam
+ */
+ name: string;
+ /**
+ * The solidity type of the parameter.
+ * @type {string}
+ * @memberof EvmAbiParam
+ */
+ evm_type: string;
+ /**
+ * The parameter value.
+ * @type {any}
+ * @memberof EvmAbiParam
+ */
+ value: any | null;
+}
+
+export function EvmAbiParamFromJSON(json: any): EvmAbiParam {
+ return EvmAbiParamFromJSONTyped(json, false);
+}
+
+export function EvmAbiParamFromJSONTyped(json: any, ignoreDiscriminator: boolean): EvmAbiParam {
+ if ((json === undefined) || (json === null)) {
+ return json;
+ }
+ return {
+
+ 'name': json['name'],
+ 'evm_type': json['evm_type'],
+ 'value': json['value'],
+ };
+}
+
+export function EvmAbiParamToJSON(value?: EvmAbiParam | null): any {
+ if (value === undefined) {
+ return undefined;
+ }
+ if (value === null) {
+ return null;
+ }
+ return {
+
+ 'name': value.name,
+ 'evm_type': value.evm_type,
+ 'value': value.value,
+ };
+}
+
+
diff --git a/src/vendors/nexus/models/EvmEventToken.ts b/src/vendors/nexus/models/EvmEventToken.ts
new file mode 100644
index 0000000000..2cd0094c9f
--- /dev/null
+++ b/src/vendors/nexus/models/EvmEventToken.ts
@@ -0,0 +1,82 @@
+/* tslint:disable */
+/* eslint-disable */
+/**
+ * Oasis Nexus API V1
+ * An API for accessing indexed data from the Oasis Network. # Endpoints
+ *
+ * The version of the OpenAPI document: 0.1.0
+ *
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
+ */
+
+import { exists, mapValues } from '../runtime';
+import {
+ EvmTokenType,
+ EvmTokenTypeFromJSON,
+ EvmTokenTypeFromJSONTyped,
+ EvmTokenTypeToJSON,
+} from './';
+
+/**
+ * Details about the EVM token involved in the event, if any.
+ * @export
+ * @interface EvmEventToken
+ */
+export interface EvmEventToken {
+ /**
+ *
+ * @type {EvmTokenType}
+ * @memberof EvmEventToken
+ */
+ type?: EvmTokenType;
+ /**
+ * Symbol of the token, as provided by token contract's `symbol()` method.
+ * @type {string}
+ * @memberof EvmEventToken
+ */
+ symbol?: string;
+ /**
+ * The number of least significant digits in base units that should be displayed as
+ * decimals when displaying tokens. `tokens = base_units / (10**decimals)`.
+ * Affects display only. Often equals 18, to match ETH.
+ * @type {number}
+ * @memberof EvmEventToken
+ */
+ decimals?: number;
+}
+
+export function EvmEventTokenFromJSON(json: any): EvmEventToken {
+ return EvmEventTokenFromJSONTyped(json, false);
+}
+
+export function EvmEventTokenFromJSONTyped(json: any, ignoreDiscriminator: boolean): EvmEventToken {
+ if ((json === undefined) || (json === null)) {
+ return json;
+ }
+ return {
+
+ 'type': !exists(json, 'type') ? undefined : EvmTokenTypeFromJSON(json['type']),
+ 'symbol': !exists(json, 'symbol') ? undefined : json['symbol'],
+ 'decimals': !exists(json, 'decimals') ? undefined : json['decimals'],
+ };
+}
+
+export function EvmEventTokenToJSON(value?: EvmEventToken | null): any {
+ if (value === undefined) {
+ return undefined;
+ }
+ if (value === null) {
+ return null;
+ }
+ return {
+
+ 'type': EvmTokenTypeToJSON(value.type),
+ 'symbol': value.symbol,
+ 'decimals': value.decimals,
+ };
+}
+
+
diff --git a/src/vendors/nexus/models/EvmNft.ts b/src/vendors/nexus/models/EvmNft.ts
new file mode 100644
index 0000000000..471a2419f6
--- /dev/null
+++ b/src/vendors/nexus/models/EvmNft.ts
@@ -0,0 +1,147 @@
+/* tslint:disable */
+/* eslint-disable */
+/**
+ * Oasis Nexus API V1
+ * An API for accessing indexed data from the Oasis Network. # Endpoints
+ *
+ * The version of the OpenAPI document: 0.1.0
+ *
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
+ */
+
+import { exists, mapValues } from '../runtime';
+import {
+ EvmToken,
+ EvmTokenFromJSON,
+ EvmTokenFromJSONTyped,
+ EvmTokenToJSON,
+} from './';
+
+/**
+ *
+ * @export
+ * @interface EvmNft
+ */
+export interface EvmNft {
+ /**
+ *
+ * @type {EvmToken}
+ * @memberof EvmNft
+ */
+ token: EvmToken;
+ /**
+ * The instance ID of this NFT within the collection represented by `token`.
+ * @type {string}
+ * @memberof EvmNft
+ */
+ id: string;
+ /**
+ * The Oasis address of this NFT instance's owner.
+ * @type {string}
+ * @memberof EvmNft
+ */
+ owner?: string;
+ /**
+ * The Ethereum address of this NFT instance's owner.
+ * @type {string}
+ * @memberof EvmNft
+ */
+ owner_eth?: string;
+ /**
+ * The total number of transfers of this NFT instance.
+ * @type {number}
+ * @memberof EvmNft
+ */
+ num_transfers?: number;
+ /**
+ *
+ * @type {string}
+ * @memberof EvmNft
+ */
+ metadata_uri?: string;
+ /**
+ *
+ * @type {string}
+ * @memberof EvmNft
+ */
+ metadata_accessed?: string;
+ /**
+ * A metadata document for this NFT instance.
+ * Currently only ERC-721 is supported, where the document is an Asset Metadata from the ERC721 Metadata JSON Schema.
+ * @type {any}
+ * @memberof EvmNft
+ */
+ metadata?: any | null;
+ /**
+ * Identifies the asset which this NFT represents
+ * @type {string}
+ * @memberof EvmNft
+ */
+ name?: string;
+ /**
+ * Describes the asset which this NFT represents
+ * @type {string}
+ * @memberof EvmNft
+ */
+ description?: string;
+ /**
+ * A URI pointing to a resource with mime type image/* representing
+ * the asset which this NFT represents. (Additional
+ * non-descriptive text from ERC-721 omitted.)
+ * @type {string}
+ * @memberof EvmNft
+ */
+ image?: string;
+}
+
+export function EvmNftFromJSON(json: any): EvmNft {
+ return EvmNftFromJSONTyped(json, false);
+}
+
+export function EvmNftFromJSONTyped(json: any, ignoreDiscriminator: boolean): EvmNft {
+ if ((json === undefined) || (json === null)) {
+ return json;
+ }
+ return {
+
+ 'token': EvmTokenFromJSON(json['token']),
+ 'id': json['id'],
+ 'owner': !exists(json, 'owner') ? undefined : json['owner'],
+ 'owner_eth': !exists(json, 'owner_eth') ? undefined : json['owner_eth'],
+ 'num_transfers': !exists(json, 'num_transfers') ? undefined : json['num_transfers'],
+ 'metadata_uri': !exists(json, 'metadata_uri') ? undefined : json['metadata_uri'],
+ 'metadata_accessed': !exists(json, 'metadata_accessed') ? undefined : json['metadata_accessed'],
+ 'metadata': !exists(json, 'metadata') ? undefined : json['metadata'],
+ 'name': !exists(json, 'name') ? undefined : json['name'],
+ 'description': !exists(json, 'description') ? undefined : json['description'],
+ 'image': !exists(json, 'image') ? undefined : json['image'],
+ };
+}
+
+export function EvmNftToJSON(value?: EvmNft | null): any {
+ if (value === undefined) {
+ return undefined;
+ }
+ if (value === null) {
+ return null;
+ }
+ return {
+
+ 'token': EvmTokenToJSON(value.token),
+ 'id': value.id,
+ 'owner': value.owner,
+ 'owner_eth': value.owner_eth,
+ 'num_transfers': value.num_transfers,
+ 'metadata_uri': value.metadata_uri,
+ 'metadata_accessed': value.metadata_accessed,
+ 'metadata': value.metadata,
+ 'name': value.name,
+ 'description': value.description,
+ 'image': value.image,
+ };
+}
+
+
diff --git a/src/vendors/nexus/models/EvmNftList.ts b/src/vendors/nexus/models/EvmNftList.ts
new file mode 100644
index 0000000000..9ad1406434
--- /dev/null
+++ b/src/vendors/nexus/models/EvmNftList.ts
@@ -0,0 +1,89 @@
+/* tslint:disable */
+/* eslint-disable */
+/**
+ * Oasis Nexus API V1
+ * An API for accessing indexed data from the Oasis Network. # Endpoints
+ *
+ * The version of the OpenAPI document: 0.1.0
+ *
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
+ */
+
+import { exists, mapValues } from '../runtime';
+import {
+ EvmNft,
+ EvmNftFromJSON,
+ EvmNftFromJSONTyped,
+ EvmNftToJSON,
+ EvmNftListAllOf,
+ EvmNftListAllOfFromJSON,
+ EvmNftListAllOfFromJSONTyped,
+ EvmNftListAllOfToJSON,
+ List,
+ ListFromJSON,
+ ListFromJSONTyped,
+ ListToJSON,
+} from './';
+
+/**
+ *
+ * @export
+ * @interface EvmNftList
+ */
+export interface EvmNftList {
+ /**
+ * The total number of records that match the query, i.e. the number of records
+ * the query would return with limit=infinity.
+ * @type {number}
+ * @memberof EvmNftList
+ */
+ total_count: number;
+ /**
+ * Whether total_count is clipped for performance reasons.
+ * @type {boolean}
+ * @memberof EvmNftList
+ */
+ is_total_count_clipped: boolean;
+ /**
+ * A list of L2 EVM NFT (ERC-721, ...) instances.
+ * @type {Array}
+ * @memberof EvmNftList
+ */
+ evm_nfts: Array;
+}
+
+export function EvmNftListFromJSON(json: any): EvmNftList {
+ return EvmNftListFromJSONTyped(json, false);
+}
+
+export function EvmNftListFromJSONTyped(json: any, ignoreDiscriminator: boolean): EvmNftList {
+ if ((json === undefined) || (json === null)) {
+ return json;
+ }
+ return {
+
+ 'total_count': json['total_count'],
+ 'is_total_count_clipped': json['is_total_count_clipped'],
+ 'evm_nfts': ((json['evm_nfts'] as Array).map(EvmNftFromJSON)),
+ };
+}
+
+export function EvmNftListToJSON(value?: EvmNftList | null): any {
+ if (value === undefined) {
+ return undefined;
+ }
+ if (value === null) {
+ return null;
+ }
+ return {
+
+ 'total_count': value.total_count,
+ 'is_total_count_clipped': value.is_total_count_clipped,
+ 'evm_nfts': ((value.evm_nfts as Array).map(EvmNftToJSON)),
+ };
+}
+
+
diff --git a/src/vendors/nexus/models/EvmNftListAllOf.ts b/src/vendors/nexus/models/EvmNftListAllOf.ts
new file mode 100644
index 0000000000..6ef40a51c5
--- /dev/null
+++ b/src/vendors/nexus/models/EvmNftListAllOf.ts
@@ -0,0 +1,64 @@
+/* tslint:disable */
+/* eslint-disable */
+/**
+ * Oasis Nexus API V1
+ * An API for accessing indexed data from the Oasis Network. # Endpoints
+ *
+ * The version of the OpenAPI document: 0.1.0
+ *
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
+ */
+
+import { exists, mapValues } from '../runtime';
+import {
+ EvmNft,
+ EvmNftFromJSON,
+ EvmNftFromJSONTyped,
+ EvmNftToJSON,
+} from './';
+
+/**
+ * A list of NFT instances.
+ * @export
+ * @interface EvmNftListAllOf
+ */
+export interface EvmNftListAllOf {
+ /**
+ * A list of L2 EVM NFT (ERC-721, ...) instances.
+ * @type {Array}
+ * @memberof EvmNftListAllOf
+ */
+ evm_nfts: Array;
+}
+
+export function EvmNftListAllOfFromJSON(json: any): EvmNftListAllOf {
+ return EvmNftListAllOfFromJSONTyped(json, false);
+}
+
+export function EvmNftListAllOfFromJSONTyped(json: any, ignoreDiscriminator: boolean): EvmNftListAllOf {
+ if ((json === undefined) || (json === null)) {
+ return json;
+ }
+ return {
+
+ 'evm_nfts': ((json['evm_nfts'] as Array).map(EvmNftFromJSON)),
+ };
+}
+
+export function EvmNftListAllOfToJSON(value?: EvmNftListAllOf | null): any {
+ if (value === undefined) {
+ return undefined;
+ }
+ if (value === null) {
+ return null;
+ }
+ return {
+
+ 'evm_nfts': ((value.evm_nfts as Array).map(EvmNftToJSON)),
+ };
+}
+
+
diff --git a/src/vendors/nexus/models/EvmToken.ts b/src/vendors/nexus/models/EvmToken.ts
new file mode 100644
index 0000000000..de87571cb0
--- /dev/null
+++ b/src/vendors/nexus/models/EvmToken.ts
@@ -0,0 +1,156 @@
+/* tslint:disable */
+/* eslint-disable */
+/**
+ * Oasis Nexus API V1
+ * An API for accessing indexed data from the Oasis Network. # Endpoints
+ *
+ * The version of the OpenAPI document: 0.1.0
+ *
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
+ */
+
+import { exists, mapValues } from '../runtime';
+import {
+ EvmTokenType,
+ EvmTokenTypeFromJSON,
+ EvmTokenTypeFromJSONTyped,
+ EvmTokenTypeToJSON,
+ VerificationLevel,
+ VerificationLevelFromJSON,
+ VerificationLevelFromJSONTyped,
+ VerificationLevelToJSON,
+} from './';
+
+/**
+ *
+ * @export
+ * @interface EvmToken
+ */
+export interface EvmToken {
+ /**
+ * The Oasis address of this token's contract.
+ * @type {string}
+ * @memberof EvmToken
+ */
+ contract_addr: string;
+ /**
+ * The Ethereum address of this token's contract.
+ * @type {string}
+ * @memberof EvmToken
+ */
+ eth_contract_addr: string;
+ /**
+ * Name of the token, as provided by token contract's `name()` method.
+ * @type {string}
+ * @memberof EvmToken
+ */
+ name?: string;
+ /**
+ * Symbol of the token, as provided by token contract's `symbol()` method.
+ * @type {string}
+ * @memberof EvmToken
+ */
+ symbol?: string;
+ /**
+ * The number of least significant digits in base units that should be displayed as
+ * decimals when displaying tokens. `tokens = base_units / (10**decimals)`.
+ * Affects display only. Often equals 18, to match ETH.
+ * @type {number}
+ * @memberof EvmToken
+ */
+ decimals?: number;
+ /**
+ * The heuristically determined interface that the token contract implements.
+ * A less specialized variant of the token might be detected; for example, an
+ * ERC-1363 token might be labeled as ERC-20 here. If the type cannot be
+ * detected or is not supported, this field will be null/absent.
+ * @type {EvmTokenType}
+ * @memberof EvmToken
+ */
+ type: EvmTokenType;
+ /**
+ * The total number of base units available.
+ * @type {string}
+ * @memberof EvmToken
+ */
+ total_supply?: string;
+ /**
+ * The total number of transfers of this token.
+ * @type {number}
+ * @memberof EvmToken
+ */
+ num_transfers?: number;
+ /**
+ * The number of addresses that have a nonzero balance of this token.
+ * @type {number}
+ * @memberof EvmToken
+ */
+ num_holders: number;
+ /**
+ * Whether the contract has been successfully verified by Sourcify.
+ * Additional information on verified contracts is available via
+ * the `/{runtime}/accounts/{address}` endpoint.
+ * DEPRECATED: This field will be removed in the future in favor of verification_level
+ * @type {boolean}
+ * @memberof EvmToken
+ */
+ is_verified: boolean;
+ /**
+ *
+ * @type {VerificationLevel}
+ * @memberof EvmToken
+ */
+ verification_level?: VerificationLevel;
+}
+
+export function EvmTokenFromJSON(json: any): EvmToken {
+ return EvmTokenFromJSONTyped(json, false);
+}
+
+export function EvmTokenFromJSONTyped(json: any, ignoreDiscriminator: boolean): EvmToken {
+ if ((json === undefined) || (json === null)) {
+ return json;
+ }
+ return {
+
+ 'contract_addr': json['contract_addr'],
+ 'eth_contract_addr': json['eth_contract_addr'],
+ 'name': !exists(json, 'name') ? undefined : json['name'],
+ 'symbol': !exists(json, 'symbol') ? undefined : json['symbol'],
+ 'decimals': !exists(json, 'decimals') ? undefined : json['decimals'],
+ 'type': EvmTokenTypeFromJSON(json['type']),
+ 'total_supply': !exists(json, 'total_supply') ? undefined : json['total_supply'],
+ 'num_transfers': !exists(json, 'num_transfers') ? undefined : json['num_transfers'],
+ 'num_holders': json['num_holders'],
+ 'is_verified': json['is_verified'],
+ 'verification_level': !exists(json, 'verification_level') ? undefined : VerificationLevelFromJSON(json['verification_level']),
+ };
+}
+
+export function EvmTokenToJSON(value?: EvmToken | null): any {
+ if (value === undefined) {
+ return undefined;
+ }
+ if (value === null) {
+ return null;
+ }
+ return {
+
+ 'contract_addr': value.contract_addr,
+ 'eth_contract_addr': value.eth_contract_addr,
+ 'name': value.name,
+ 'symbol': value.symbol,
+ 'decimals': value.decimals,
+ 'type': EvmTokenTypeToJSON(value.type),
+ 'total_supply': value.total_supply,
+ 'num_transfers': value.num_transfers,
+ 'num_holders': value.num_holders,
+ 'is_verified': value.is_verified,
+ 'verification_level': VerificationLevelToJSON(value.verification_level),
+ };
+}
+
+
diff --git a/src/vendors/nexus/models/EvmTokenList.ts b/src/vendors/nexus/models/EvmTokenList.ts
new file mode 100644
index 0000000000..ecf18d026c
--- /dev/null
+++ b/src/vendors/nexus/models/EvmTokenList.ts
@@ -0,0 +1,89 @@
+/* tslint:disable */
+/* eslint-disable */
+/**
+ * Oasis Nexus API V1
+ * An API for accessing indexed data from the Oasis Network. # Endpoints
+ *
+ * The version of the OpenAPI document: 0.1.0
+ *
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
+ */
+
+import { exists, mapValues } from '../runtime';
+import {
+ EvmToken,
+ EvmTokenFromJSON,
+ EvmTokenFromJSONTyped,
+ EvmTokenToJSON,
+ EvmTokenListAllOf,
+ EvmTokenListAllOfFromJSON,
+ EvmTokenListAllOfFromJSONTyped,
+ EvmTokenListAllOfToJSON,
+ List,
+ ListFromJSON,
+ ListFromJSONTyped,
+ ListToJSON,
+} from './';
+
+/**
+ *
+ * @export
+ * @interface EvmTokenList
+ */
+export interface EvmTokenList {
+ /**
+ * The total number of records that match the query, i.e. the number of records
+ * the query would return with limit=infinity.
+ * @type {number}
+ * @memberof EvmTokenList
+ */
+ total_count: number;
+ /**
+ * Whether total_count is clipped for performance reasons.
+ * @type {boolean}
+ * @memberof EvmTokenList
+ */
+ is_total_count_clipped: boolean;
+ /**
+ * A list of L2 EVM tokens (ERC-20, ERC-721, ...).
+ * @type {Array}
+ * @memberof EvmTokenList
+ */
+ evm_tokens: Array;
+}
+
+export function EvmTokenListFromJSON(json: any): EvmTokenList {
+ return EvmTokenListFromJSONTyped(json, false);
+}
+
+export function EvmTokenListFromJSONTyped(json: any, ignoreDiscriminator: boolean): EvmTokenList {
+ if ((json === undefined) || (json === null)) {
+ return json;
+ }
+ return {
+
+ 'total_count': json['total_count'],
+ 'is_total_count_clipped': json['is_total_count_clipped'],
+ 'evm_tokens': ((json['evm_tokens'] as Array).map(EvmTokenFromJSON)),
+ };
+}
+
+export function EvmTokenListToJSON(value?: EvmTokenList | null): any {
+ if (value === undefined) {
+ return undefined;
+ }
+ if (value === null) {
+ return null;
+ }
+ return {
+
+ 'total_count': value.total_count,
+ 'is_total_count_clipped': value.is_total_count_clipped,
+ 'evm_tokens': ((value.evm_tokens as Array).map(EvmTokenToJSON)),
+ };
+}
+
+
diff --git a/src/vendors/nexus/models/EvmTokenListAllOf.ts b/src/vendors/nexus/models/EvmTokenListAllOf.ts
new file mode 100644
index 0000000000..78d64187bc
--- /dev/null
+++ b/src/vendors/nexus/models/EvmTokenListAllOf.ts
@@ -0,0 +1,64 @@
+/* tslint:disable */
+/* eslint-disable */
+/**
+ * Oasis Nexus API V1
+ * An API for accessing indexed data from the Oasis Network. # Endpoints
+ *
+ * The version of the OpenAPI document: 0.1.0
+ *
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
+ */
+
+import { exists, mapValues } from '../runtime';
+import {
+ EvmToken,
+ EvmTokenFromJSON,
+ EvmTokenFromJSONTyped,
+ EvmTokenToJSON,
+} from './';
+
+/**
+ * A list of tokens in a runtime.
+ * @export
+ * @interface EvmTokenListAllOf
+ */
+export interface EvmTokenListAllOf {
+ /**
+ * A list of L2 EVM tokens (ERC-20, ERC-721, ...).
+ * @type {Array}
+ * @memberof EvmTokenListAllOf
+ */
+ evm_tokens: Array;
+}
+
+export function EvmTokenListAllOfFromJSON(json: any): EvmTokenListAllOf {
+ return EvmTokenListAllOfFromJSONTyped(json, false);
+}
+
+export function EvmTokenListAllOfFromJSONTyped(json: any, ignoreDiscriminator: boolean): EvmTokenListAllOf {
+ if ((json === undefined) || (json === null)) {
+ return json;
+ }
+ return {
+
+ 'evm_tokens': ((json['evm_tokens'] as Array).map(EvmTokenFromJSON)),
+ };
+}
+
+export function EvmTokenListAllOfToJSON(value?: EvmTokenListAllOf | null): any {
+ if (value === undefined) {
+ return undefined;
+ }
+ if (value === null) {
+ return null;
+ }
+ return {
+
+ 'evm_tokens': ((value.evm_tokens as Array).map(EvmTokenToJSON)),
+ };
+}
+
+
diff --git a/src/vendors/nexus/models/EvmTokenType.ts b/src/vendors/nexus/models/EvmTokenType.ts
new file mode 100644
index 0000000000..5e25f44f47
--- /dev/null
+++ b/src/vendors/nexus/models/EvmTokenType.ts
@@ -0,0 +1,36 @@
+/* tslint:disable */
+/* eslint-disable */
+/**
+ * Oasis Nexus API V1
+ * An API for accessing indexed data from the Oasis Network. # Endpoints
+ *
+ * The version of the OpenAPI document: 0.1.0
+ *
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
+ */
+
+/**
+ * The type of a EVM token.
+ * @export
+ * @enum {string}
+ */
+export enum EvmTokenType {
+ Erc20 = 'ERC20',
+ Erc721 = 'ERC721'
+}
+
+export function EvmTokenTypeFromJSON(json: any): EvmTokenType {
+ return EvmTokenTypeFromJSONTyped(json, false);
+}
+
+export function EvmTokenTypeFromJSONTyped(json: any, ignoreDiscriminator: boolean): EvmTokenType {
+ return json as EvmTokenType;
+}
+
+export function EvmTokenTypeToJSON(value?: EvmTokenType | null): any {
+ return value as any;
+}
+
diff --git a/src/vendors/nexus/models/InlineResponse400.ts b/src/vendors/nexus/models/InlineResponse400.ts
new file mode 100644
index 0000000000..52f078c7a3
--- /dev/null
+++ b/src/vendors/nexus/models/InlineResponse400.ts
@@ -0,0 +1,57 @@
+/* tslint:disable */
+/* eslint-disable */
+/**
+ * Oasis Nexus API V1
+ * An API for accessing indexed data from the Oasis Network. # Endpoints
+ *
+ * The version of the OpenAPI document: 0.1.0
+ *
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
+ */
+
+import { exists, mapValues } from '../runtime';
+/**
+ *
+ * @export
+ * @interface InlineResponse400
+ */
+export interface InlineResponse400 {
+ /**
+ * An error message.
+ * @type {string}
+ * @memberof InlineResponse400
+ */
+ msg: string;
+}
+
+export function InlineResponse400FromJSON(json: any): InlineResponse400 {
+ return InlineResponse400FromJSONTyped(json, false);
+}
+
+export function InlineResponse400FromJSONTyped(json: any, ignoreDiscriminator: boolean): InlineResponse400 {
+ if ((json === undefined) || (json === null)) {
+ return json;
+ }
+ return {
+
+ 'msg': json['msg'],
+ };
+}
+
+export function InlineResponse400ToJSON(value?: InlineResponse400 | null): any {
+ if (value === undefined) {
+ return undefined;
+ }
+ if (value === null) {
+ return null;
+ }
+ return {
+
+ 'msg': value.msg,
+ };
+}
+
+
diff --git a/src/vendors/nexus/models/Layer.ts b/src/vendors/nexus/models/Layer.ts
new file mode 100644
index 0000000000..80bde82fc8
--- /dev/null
+++ b/src/vendors/nexus/models/Layer.ts
@@ -0,0 +1,40 @@
+/* tslint:disable */
+/* eslint-disable */
+/**
+ * Oasis Nexus API V1
+ * An API for accessing indexed data from the Oasis Network. # Endpoints
+ *
+ * The version of the OpenAPI document: 0.1.0
+ *
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
+ */
+
+/**
+ *
+ * @export
+ * @enum {string}
+ */
+export enum Layer {
+ Emerald = 'emerald',
+ Sapphire = 'sapphire',
+ Pontusxtest = 'pontusxtest',
+ Pontusxdev = 'pontusxdev',
+ Cipher = 'cipher',
+ Consensus = 'consensus'
+}
+
+export function LayerFromJSON(json: any): Layer {
+ return LayerFromJSONTyped(json, false);
+}
+
+export function LayerFromJSONTyped(json: any, ignoreDiscriminator: boolean): Layer {
+ return json as Layer;
+}
+
+export function LayerToJSON(value?: Layer | null): any {
+ return value as any;
+}
+
diff --git a/src/vendors/nexus/models/List.ts b/src/vendors/nexus/models/List.ts
new file mode 100644
index 0000000000..06aadf1156
--- /dev/null
+++ b/src/vendors/nexus/models/List.ts
@@ -0,0 +1,66 @@
+/* tslint:disable */
+/* eslint-disable */
+/**
+ * Oasis Nexus API V1
+ * An API for accessing indexed data from the Oasis Network. # Endpoints
+ *
+ * The version of the OpenAPI document: 0.1.0
+ *
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
+ */
+
+import { exists, mapValues } from '../runtime';
+/**
+ *
+ * @export
+ * @interface List
+ */
+export interface List {
+ /**
+ * The total number of records that match the query, i.e. the number of records
+ * the query would return with limit=infinity.
+ * @type {number}
+ * @memberof List
+ */
+ total_count: number;
+ /**
+ * Whether total_count is clipped for performance reasons.
+ * @type {boolean}
+ * @memberof List
+ */
+ is_total_count_clipped: boolean;
+}
+
+export function ListFromJSON(json: any): List {
+ return ListFromJSONTyped(json, false);
+}
+
+export function ListFromJSONTyped(json: any, ignoreDiscriminator: boolean): List {
+ if ((json === undefined) || (json === null)) {
+ return json;
+ }
+ return {
+
+ 'total_count': json['total_count'],
+ 'is_total_count_clipped': json['is_total_count_clipped'],
+ };
+}
+
+export function ListToJSON(value?: List | null): any {
+ if (value === undefined) {
+ return undefined;
+ }
+ if (value === null) {
+ return null;
+ }
+ return {
+
+ 'total_count': value.total_count,
+ 'is_total_count_clipped': value.is_total_count_clipped,
+ };
+}
+
+
diff --git a/src/vendors/nexus/models/Node.ts b/src/vendors/nexus/models/Node.ts
new file mode 100644
index 0000000000..4d00181fd0
--- /dev/null
+++ b/src/vendors/nexus/models/Node.ts
@@ -0,0 +1,114 @@
+/* tslint:disable */
+/* eslint-disable */
+/**
+ * Oasis Nexus API V1
+ * An API for accessing indexed data from the Oasis Network. # Endpoints
+ *
+ * The version of the OpenAPI document: 0.1.0
+ *
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
+ */
+
+import { exists, mapValues } from '../runtime';
+/**
+ * A node registered at the consensus layer.
+ * @export
+ * @interface Node
+ */
+export interface Node {
+ /**
+ * The public key identifying this node.
+ * @type {string}
+ * @memberof Node
+ */
+ id: string;
+ /**
+ * The public key identifying the entity controlling this node.
+ * @type {string}
+ * @memberof Node
+ */
+ entity_id: string;
+ /**
+ * The epoch in which this node's commitment expires.
+ * @type {number}
+ * @memberof Node
+ */
+ expiration: number;
+ /**
+ * The public key used for establishing TLS connections.
+ * @type {string}
+ * @memberof Node
+ */
+ tls_pubkey: string;
+ /**
+ * The public key that will be used for establishing TLS connections
+ * upon rotation.
+ * @type {string}
+ * @memberof Node
+ */
+ tls_next_pubkey: string;
+ /**
+ * The unique identifier of this node on the P2P transport.
+ * @type {string}
+ * @memberof Node
+ */
+ p2p_pubkey: string;
+ /**
+ * The unique identifier of this node as a consensus member
+ * @type {string}
+ * @memberof Node
+ */
+ consensus_pubkey: string;
+ /**
+ * A bitmask representing this node's roles.
+ * @type {string}
+ * @memberof Node
+ */
+ roles: string;
+}
+
+export function NodeFromJSON(json: any): Node {
+ return NodeFromJSONTyped(json, false);
+}
+
+export function NodeFromJSONTyped(json: any, ignoreDiscriminator: boolean): Node {
+ if ((json === undefined) || (json === null)) {
+ return json;
+ }
+ return {
+
+ 'id': json['id'],
+ 'entity_id': json['entity_id'],
+ 'expiration': json['expiration'],
+ 'tls_pubkey': json['tls_pubkey'],
+ 'tls_next_pubkey': json['tls_next_pubkey'],
+ 'p2p_pubkey': json['p2p_pubkey'],
+ 'consensus_pubkey': json['consensus_pubkey'],
+ 'roles': json['roles'],
+ };
+}
+
+export function NodeToJSON(value?: Node | null): any {
+ if (value === undefined) {
+ return undefined;
+ }
+ if (value === null) {
+ return null;
+ }
+ return {
+
+ 'id': value.id,
+ 'entity_id': value.entity_id,
+ 'expiration': value.expiration,
+ 'tls_pubkey': value.tls_pubkey,
+ 'tls_next_pubkey': value.tls_next_pubkey,
+ 'p2p_pubkey': value.p2p_pubkey,
+ 'consensus_pubkey': value.consensus_pubkey,
+ 'roles': value.roles,
+ };
+}
+
+
diff --git a/src/vendors/nexus/models/NodeList.ts b/src/vendors/nexus/models/NodeList.ts
new file mode 100644
index 0000000000..b6b5e82bd1
--- /dev/null
+++ b/src/vendors/nexus/models/NodeList.ts
@@ -0,0 +1,97 @@
+/* tslint:disable */
+/* eslint-disable */
+/**
+ * Oasis Nexus API V1
+ * An API for accessing indexed data from the Oasis Network. # Endpoints
+ *
+ * The version of the OpenAPI document: 0.1.0
+ *
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
+ */
+
+import { exists, mapValues } from '../runtime';
+import {
+ List,
+ ListFromJSON,
+ ListFromJSONTyped,
+ ListToJSON,
+ Node,
+ NodeFromJSON,
+ NodeFromJSONTyped,
+ NodeToJSON,
+ NodeListAllOf,
+ NodeListAllOfFromJSON,
+ NodeListAllOfFromJSONTyped,
+ NodeListAllOfToJSON,
+} from './';
+
+/**
+ *
+ * @export
+ * @interface NodeList
+ */
+export interface NodeList {
+ /**
+ * The total number of records that match the query, i.e. the number of records
+ * the query would return with limit=infinity.
+ * @type {number}
+ * @memberof NodeList
+ */
+ total_count: number;
+ /**
+ * Whether total_count is clipped for performance reasons.
+ * @type {boolean}
+ * @memberof NodeList
+ */
+ is_total_count_clipped: boolean;
+ /**
+ *
+ * @type {string}
+ * @memberof NodeList
+ */
+ entity_id: string;
+ /**
+ *
+ * @type {Array}
+ * @memberof NodeList
+ */
+ nodes: Array;
+}
+
+export function NodeListFromJSON(json: any): NodeList {
+ return NodeListFromJSONTyped(json, false);
+}
+
+export function NodeListFromJSONTyped(json: any, ignoreDiscriminator: boolean): NodeList {
+ if ((json === undefined) || (json === null)) {
+ return json;
+ }
+ return {
+
+ 'total_count': json['total_count'],
+ 'is_total_count_clipped': json['is_total_count_clipped'],
+ 'entity_id': json['entity_id'],
+ 'nodes': ((json['nodes'] as Array).map(NodeFromJSON)),
+ };
+}
+
+export function NodeListToJSON(value?: NodeList | null): any {
+ if (value === undefined) {
+ return undefined;
+ }
+ if (value === null) {
+ return null;
+ }
+ return {
+
+ 'total_count': value.total_count,
+ 'is_total_count_clipped': value.is_total_count_clipped,
+ 'entity_id': value.entity_id,
+ 'nodes': ((value.nodes as Array).map(NodeToJSON)),
+ };
+}
+
+
diff --git a/src/vendors/nexus/models/NodeListAllOf.ts b/src/vendors/nexus/models/NodeListAllOf.ts
new file mode 100644
index 0000000000..c5ba62575f
--- /dev/null
+++ b/src/vendors/nexus/models/NodeListAllOf.ts
@@ -0,0 +1,72 @@
+/* tslint:disable */
+/* eslint-disable */
+/**
+ * Oasis Nexus API V1
+ * An API for accessing indexed data from the Oasis Network. # Endpoints
+ *
+ * The version of the OpenAPI document: 0.1.0
+ *
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
+ */
+
+import { exists, mapValues } from '../runtime';
+import {
+ Node,
+ NodeFromJSON,
+ NodeFromJSONTyped,
+ NodeToJSON,
+} from './';
+
+/**
+ * A list of nodes registered at the consensus layer.
+ * @export
+ * @interface NodeListAllOf
+ */
+export interface NodeListAllOf {
+ /**
+ *
+ * @type {string}
+ * @memberof NodeListAllOf
+ */
+ entity_id: string;
+ /**
+ *
+ * @type {Array}
+ * @memberof NodeListAllOf
+ */
+ nodes: Array;
+}
+
+export function NodeListAllOfFromJSON(json: any): NodeListAllOf {
+ return NodeListAllOfFromJSONTyped(json, false);
+}
+
+export function NodeListAllOfFromJSONTyped(json: any, ignoreDiscriminator: boolean): NodeListAllOf {
+ if ((json === undefined) || (json === null)) {
+ return json;
+ }
+ return {
+
+ 'entity_id': json['entity_id'],
+ 'nodes': ((json['nodes'] as Array).map(NodeFromJSON)),
+ };
+}
+
+export function NodeListAllOfToJSON(value?: NodeListAllOf | null): any {
+ if (value === undefined) {
+ return undefined;
+ }
+ if (value === null) {
+ return null;
+ }
+ return {
+
+ 'entity_id': value.entity_id,
+ 'nodes': ((value.nodes as Array).map(NodeToJSON)),
+ };
+}
+
+
diff --git a/src/vendors/nexus/models/Proposal.ts b/src/vendors/nexus/models/Proposal.ts
new file mode 100644
index 0000000000..0b12498737
--- /dev/null
+++ b/src/vendors/nexus/models/Proposal.ts
@@ -0,0 +1,182 @@
+/* tslint:disable */
+/* eslint-disable */
+/**
+ * Oasis Nexus API V1
+ * An API for accessing indexed data from the Oasis Network. # Endpoints
+ *
+ * The version of the OpenAPI document: 0.1.0
+ *
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
+ */
+
+import { exists, mapValues } from '../runtime';
+import {
+ ProposalState,
+ ProposalStateFromJSON,
+ ProposalStateFromJSONTyped,
+ ProposalStateToJSON,
+ ProposalTarget,
+ ProposalTargetFromJSON,
+ ProposalTargetFromJSONTyped,
+ ProposalTargetToJSON,
+} from './';
+
+/**
+ * A governance proposal.
+ * @export
+ * @interface Proposal
+ */
+export interface Proposal {
+ /**
+ * The unique identifier of the proposal.
+ * @type {number}
+ * @memberof Proposal
+ */
+ id: number;
+ /**
+ * The staking address of the proposal submitter.
+ * @type {string}
+ * @memberof Proposal
+ */
+ submitter: string;
+ /**
+ *
+ * @type {ProposalState}
+ * @memberof Proposal
+ */
+ state: ProposalState;
+ /**
+ * The deposit attached to this proposal.
+ * @type {string}
+ * @memberof Proposal
+ */
+ deposit: string;
+ /**
+ * The (optional) title of the proposal.
+ * @type {string}
+ * @memberof Proposal
+ */
+ title?: string;
+ /**
+ * The (optional) description of the proposal.
+ * @type {string}
+ * @memberof Proposal
+ */
+ description?: string;
+ /**
+ * The name of the upgrade handler.
+ * @type {string}
+ * @memberof Proposal
+ */
+ handler?: string;
+ /**
+ *
+ * @type {ProposalTarget}
+ * @memberof Proposal
+ */
+ target?: ProposalTarget;
+ /**
+ * The epoch at which the proposed upgrade will happen.
+ * @type {number}
+ * @memberof Proposal
+ */
+ epoch?: number;
+ /**
+ * The proposal to cancel, if this proposal proposes
+ * cancelling an existing proposal.
+ * @type {number}
+ * @memberof Proposal
+ */
+ cancels?: number;
+ /**
+ * The name of the module whose parameters are to be changed
+ * by this 'parameters_change' proposal.
+ * @type {string}
+ * @memberof Proposal
+ */
+ parameters_change_module?: string;
+ /**
+ * The parameters change proposal body. This spec does not encode the many possible types; instead, see [the Go API](https://pkg.go.dev/github.com/oasisprotocol/oasis-core/go) of oasis-core. This object will conform to one of the `ConsensusParameterChanges` types, depending on the `parameters_change_module`.
+ * @type {any}
+ * @memberof Proposal
+ */
+ parameters_change?: any | null;
+ /**
+ * The epoch at which this proposal was created.
+ * @type {number}
+ * @memberof Proposal
+ */
+ created_at: number;
+ /**
+ * The epoch at which voting for this proposal will close.
+ * @type {number}
+ * @memberof Proposal
+ */
+ closes_at: number;
+ /**
+ * The number of invalid votes for this proposal, after tallying.
+ * @type {string}
+ * @memberof Proposal
+ */
+ invalid_votes: string;
+}
+
+export function ProposalFromJSON(json: any): Proposal {
+ return ProposalFromJSONTyped(json, false);
+}
+
+export function ProposalFromJSONTyped(json: any, ignoreDiscriminator: boolean): Proposal {
+ if ((json === undefined) || (json === null)) {
+ return json;
+ }
+ return {
+
+ 'id': json['id'],
+ 'submitter': json['submitter'],
+ 'state': ProposalStateFromJSON(json['state']),
+ 'deposit': json['deposit'],
+ 'title': !exists(json, 'title') ? undefined : json['title'],
+ 'description': !exists(json, 'description') ? undefined : json['description'],
+ 'handler': !exists(json, 'handler') ? undefined : json['handler'],
+ 'target': !exists(json, 'target') ? undefined : ProposalTargetFromJSON(json['target']),
+ 'epoch': !exists(json, 'epoch') ? undefined : json['epoch'],
+ 'cancels': !exists(json, 'cancels') ? undefined : json['cancels'],
+ 'parameters_change_module': !exists(json, 'parameters_change_module') ? undefined : json['parameters_change_module'],
+ 'parameters_change': !exists(json, 'parameters_change') ? undefined : json['parameters_change'],
+ 'created_at': json['created_at'],
+ 'closes_at': json['closes_at'],
+ 'invalid_votes': json['invalid_votes'],
+ };
+}
+
+export function ProposalToJSON(value?: Proposal | null): any {
+ if (value === undefined) {
+ return undefined;
+ }
+ if (value === null) {
+ return null;
+ }
+ return {
+
+ 'id': value.id,
+ 'submitter': value.submitter,
+ 'state': ProposalStateToJSON(value.state),
+ 'deposit': value.deposit,
+ 'title': value.title,
+ 'description': value.description,
+ 'handler': value.handler,
+ 'target': ProposalTargetToJSON(value.target),
+ 'epoch': value.epoch,
+ 'cancels': value.cancels,
+ 'parameters_change_module': value.parameters_change_module,
+ 'parameters_change': value.parameters_change,
+ 'created_at': value.created_at,
+ 'closes_at': value.closes_at,
+ 'invalid_votes': value.invalid_votes,
+ };
+}
+
+
diff --git a/src/vendors/nexus/models/ProposalList.ts b/src/vendors/nexus/models/ProposalList.ts
new file mode 100644
index 0000000000..df4ae062e7
--- /dev/null
+++ b/src/vendors/nexus/models/ProposalList.ts
@@ -0,0 +1,89 @@
+/* tslint:disable */
+/* eslint-disable */
+/**
+ * Oasis Nexus API V1
+ * An API for accessing indexed data from the Oasis Network. # Endpoints
+ *
+ * The version of the OpenAPI document: 0.1.0
+ *
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
+ */
+
+import { exists, mapValues } from '../runtime';
+import {
+ List,
+ ListFromJSON,
+ ListFromJSONTyped,
+ ListToJSON,
+ Proposal,
+ ProposalFromJSON,
+ ProposalFromJSONTyped,
+ ProposalToJSON,
+ ProposalListAllOf,
+ ProposalListAllOfFromJSON,
+ ProposalListAllOfFromJSONTyped,
+ ProposalListAllOfToJSON,
+} from './';
+
+/**
+ *
+ * @export
+ * @interface ProposalList
+ */
+export interface ProposalList {
+ /**
+ * The total number of records that match the query, i.e. the number of records
+ * the query would return with limit=infinity.
+ * @type {number}
+ * @memberof ProposalList
+ */
+ total_count: number;
+ /**
+ * Whether total_count is clipped for performance reasons.
+ * @type {boolean}
+ * @memberof ProposalList
+ */
+ is_total_count_clipped: boolean;
+ /**
+ *
+ * @type {Array}
+ * @memberof ProposalList
+ */
+ proposals: Array;
+}
+
+export function ProposalListFromJSON(json: any): ProposalList {
+ return ProposalListFromJSONTyped(json, false);
+}
+
+export function ProposalListFromJSONTyped(json: any, ignoreDiscriminator: boolean): ProposalList {
+ if ((json === undefined) || (json === null)) {
+ return json;
+ }
+ return {
+
+ 'total_count': json['total_count'],
+ 'is_total_count_clipped': json['is_total_count_clipped'],
+ 'proposals': ((json['proposals'] as Array).map(ProposalFromJSON)),
+ };
+}
+
+export function ProposalListToJSON(value?: ProposalList | null): any {
+ if (value === undefined) {
+ return undefined;
+ }
+ if (value === null) {
+ return null;
+ }
+ return {
+
+ 'total_count': value.total_count,
+ 'is_total_count_clipped': value.is_total_count_clipped,
+ 'proposals': ((value.proposals as Array).map(ProposalToJSON)),
+ };
+}
+
+
diff --git a/src/vendors/nexus/models/ProposalListAllOf.ts b/src/vendors/nexus/models/ProposalListAllOf.ts
new file mode 100644
index 0000000000..9b1ac3286a
--- /dev/null
+++ b/src/vendors/nexus/models/ProposalListAllOf.ts
@@ -0,0 +1,64 @@
+/* tslint:disable */
+/* eslint-disable */
+/**
+ * Oasis Nexus API V1
+ * An API for accessing indexed data from the Oasis Network. # Endpoints
+ *
+ * The version of the OpenAPI document: 0.1.0
+ *
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
+ */
+
+import { exists, mapValues } from '../runtime';
+import {
+ Proposal,
+ ProposalFromJSON,
+ ProposalFromJSONTyped,
+ ProposalToJSON,
+} from './';
+
+/**
+ * A list of governance proposals.
+ * @export
+ * @interface ProposalListAllOf
+ */
+export interface ProposalListAllOf {
+ /**
+ *
+ * @type {Array}
+ * @memberof ProposalListAllOf
+ */
+ proposals: Array;
+}
+
+export function ProposalListAllOfFromJSON(json: any): ProposalListAllOf {
+ return ProposalListAllOfFromJSONTyped(json, false);
+}
+
+export function ProposalListAllOfFromJSONTyped(json: any, ignoreDiscriminator: boolean): ProposalListAllOf {
+ if ((json === undefined) || (json === null)) {
+ return json;
+ }
+ return {
+
+ 'proposals': ((json['proposals'] as Array).map(ProposalFromJSON)),
+ };
+}
+
+export function ProposalListAllOfToJSON(value?: ProposalListAllOf | null): any {
+ if (value === undefined) {
+ return undefined;
+ }
+ if (value === null) {
+ return null;
+ }
+ return {
+
+ 'proposals': ((value.proposals as Array).map(ProposalToJSON)),
+ };
+}
+
+
diff --git a/src/vendors/nexus/models/ProposalState.ts b/src/vendors/nexus/models/ProposalState.ts
new file mode 100644
index 0000000000..ee154c8952
--- /dev/null
+++ b/src/vendors/nexus/models/ProposalState.ts
@@ -0,0 +1,38 @@
+/* tslint:disable */
+/* eslint-disable */
+/**
+ * Oasis Nexus API V1
+ * An API for accessing indexed data from the Oasis Network. # Endpoints
+ *
+ * The version of the OpenAPI document: 0.1.0
+ *
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
+ */
+
+/**
+ * The state of the proposal.
+ * @export
+ * @enum {string}
+ */
+export enum ProposalState {
+ Active = 'active',
+ Passed = 'passed',
+ Failed = 'failed',
+ Rejected = 'rejected'
+}
+
+export function ProposalStateFromJSON(json: any): ProposalState {
+ return ProposalStateFromJSONTyped(json, false);
+}
+
+export function ProposalStateFromJSONTyped(json: any, ignoreDiscriminator: boolean): ProposalState {
+ return json as ProposalState;
+}
+
+export function ProposalStateToJSON(value?: ProposalState | null): any {
+ return value as any;
+}
+
diff --git a/src/vendors/nexus/models/ProposalTarget.ts b/src/vendors/nexus/models/ProposalTarget.ts
new file mode 100644
index 0000000000..58ac18fb93
--- /dev/null
+++ b/src/vendors/nexus/models/ProposalTarget.ts
@@ -0,0 +1,73 @@
+/* tslint:disable */
+/* eslint-disable */
+/**
+ * Oasis Nexus API V1
+ * An API for accessing indexed data from the Oasis Network. # Endpoints
+ *
+ * The version of the OpenAPI document: 0.1.0
+ *
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
+ */
+
+import { exists, mapValues } from '../runtime';
+/**
+ * The target propotocol versions for this upgrade proposal.
+ * @export
+ * @interface ProposalTarget
+ */
+export interface ProposalTarget {
+ /**
+ *
+ * @type {string}
+ * @memberof ProposalTarget
+ */
+ consensus_protocol?: string;
+ /**
+ *
+ * @type {string}
+ * @memberof ProposalTarget
+ */
+ runtime_host_protocol?: string;
+ /**
+ *
+ * @type {string}
+ * @memberof ProposalTarget
+ */
+ runtime_committee_protocol?: string;
+}
+
+export function ProposalTargetFromJSON(json: any): ProposalTarget {
+ return ProposalTargetFromJSONTyped(json, false);
+}
+
+export function ProposalTargetFromJSONTyped(json: any, ignoreDiscriminator: boolean): ProposalTarget {
+ if ((json === undefined) || (json === null)) {
+ return json;
+ }
+ return {
+
+ 'consensus_protocol': !exists(json, 'consensus_protocol') ? undefined : json['consensus_protocol'],
+ 'runtime_host_protocol': !exists(json, 'runtime_host_protocol') ? undefined : json['runtime_host_protocol'],
+ 'runtime_committee_protocol': !exists(json, 'runtime_committee_protocol') ? undefined : json['runtime_committee_protocol'],
+ };
+}
+
+export function ProposalTargetToJSON(value?: ProposalTarget | null): any {
+ if (value === undefined) {
+ return undefined;
+ }
+ if (value === null) {
+ return null;
+ }
+ return {
+
+ 'consensus_protocol': value.consensus_protocol,
+ 'runtime_host_protocol': value.runtime_host_protocol,
+ 'runtime_committee_protocol': value.runtime_committee_protocol,
+ };
+}
+
+
diff --git a/src/vendors/nexus/models/ProposalVote.ts b/src/vendors/nexus/models/ProposalVote.ts
new file mode 100644
index 0000000000..54b7691597
--- /dev/null
+++ b/src/vendors/nexus/models/ProposalVote.ts
@@ -0,0 +1,81 @@
+/* tslint:disable */
+/* eslint-disable */
+/**
+ * Oasis Nexus API V1
+ * An API for accessing indexed data from the Oasis Network. # Endpoints
+ *
+ * The version of the OpenAPI document: 0.1.0
+ *
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
+ */
+
+import { exists, mapValues } from '../runtime';
+/**
+ *
+ * @export
+ * @interface ProposalVote
+ */
+export interface ProposalVote {
+ /**
+ * The staking address casting this vote.
+ * @type {string}
+ * @memberof ProposalVote
+ */
+ address: string;
+ /**
+ * The vote cast.
+ * @type {string}
+ * @memberof ProposalVote
+ */
+ vote: string;
+ /**
+ * The block height at which this vote was recorded.
+ * @type {number}
+ * @memberof ProposalVote
+ */
+ height?: number;
+ /**
+ * The second-granular consensus time of the block in which this vote was cast.
+ * @type {Date}
+ * @memberof ProposalVote
+ */
+ timestamp?: Date;
+}
+
+export function ProposalVoteFromJSON(json: any): ProposalVote {
+ return ProposalVoteFromJSONTyped(json, false);
+}
+
+export function ProposalVoteFromJSONTyped(json: any, ignoreDiscriminator: boolean): ProposalVote {
+ if ((json === undefined) || (json === null)) {
+ return json;
+ }
+ return {
+
+ 'address': json['address'],
+ 'vote': json['vote'],
+ 'height': !exists(json, 'height') ? undefined : json['height'],
+ 'timestamp': !exists(json, 'timestamp') ? undefined : (new Date(json['timestamp'])),
+ };
+}
+
+export function ProposalVoteToJSON(value?: ProposalVote | null): any {
+ if (value === undefined) {
+ return undefined;
+ }
+ if (value === null) {
+ return null;
+ }
+ return {
+
+ 'address': value.address,
+ 'vote': value.vote,
+ 'height': value.height,
+ 'timestamp': value.timestamp === undefined ? undefined : (value.timestamp.toISOString()),
+ };
+}
+
+
diff --git a/src/vendors/nexus/models/ProposalVotes.ts b/src/vendors/nexus/models/ProposalVotes.ts
new file mode 100644
index 0000000000..51392f1607
--- /dev/null
+++ b/src/vendors/nexus/models/ProposalVotes.ts
@@ -0,0 +1,97 @@
+/* tslint:disable */
+/* eslint-disable */
+/**
+ * Oasis Nexus API V1
+ * An API for accessing indexed data from the Oasis Network. # Endpoints
+ *
+ * The version of the OpenAPI document: 0.1.0
+ *
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
+ */
+
+import { exists, mapValues } from '../runtime';
+import {
+ List,
+ ListFromJSON,
+ ListFromJSONTyped,
+ ListToJSON,
+ ProposalVote,
+ ProposalVoteFromJSON,
+ ProposalVoteFromJSONTyped,
+ ProposalVoteToJSON,
+ ProposalVotesAllOf,
+ ProposalVotesAllOfFromJSON,
+ ProposalVotesAllOfFromJSONTyped,
+ ProposalVotesAllOfToJSON,
+} from './';
+
+/**
+ *
+ * @export
+ * @interface ProposalVotes
+ */
+export interface ProposalVotes {
+ /**
+ * The total number of records that match the query, i.e. the number of records
+ * the query would return with limit=infinity.
+ * @type {number}
+ * @memberof ProposalVotes
+ */
+ total_count: number;
+ /**
+ * Whether total_count is clipped for performance reasons.
+ * @type {boolean}
+ * @memberof ProposalVotes
+ */
+ is_total_count_clipped: boolean;
+ /**
+ * The unique identifier of the proposal.
+ * @type {number}
+ * @memberof ProposalVotes
+ */
+ proposal_id: number;
+ /**
+ * The list of votes for the proposal.
+ * @type {Array}
+ * @memberof ProposalVotes
+ */
+ votes: Array;
+}
+
+export function ProposalVotesFromJSON(json: any): ProposalVotes {
+ return ProposalVotesFromJSONTyped(json, false);
+}
+
+export function ProposalVotesFromJSONTyped(json: any, ignoreDiscriminator: boolean): ProposalVotes {
+ if ((json === undefined) || (json === null)) {
+ return json;
+ }
+ return {
+
+ 'total_count': json['total_count'],
+ 'is_total_count_clipped': json['is_total_count_clipped'],
+ 'proposal_id': json['proposal_id'],
+ 'votes': ((json['votes'] as Array).map(ProposalVoteFromJSON)),
+ };
+}
+
+export function ProposalVotesToJSON(value?: ProposalVotes | null): any {
+ if (value === undefined) {
+ return undefined;
+ }
+ if (value === null) {
+ return null;
+ }
+ return {
+
+ 'total_count': value.total_count,
+ 'is_total_count_clipped': value.is_total_count_clipped,
+ 'proposal_id': value.proposal_id,
+ 'votes': ((value.votes as Array).map(ProposalVoteToJSON)),
+ };
+}
+
+
diff --git a/src/vendors/nexus/models/ProposalVotesAllOf.ts b/src/vendors/nexus/models/ProposalVotesAllOf.ts
new file mode 100644
index 0000000000..fba86b52b0
--- /dev/null
+++ b/src/vendors/nexus/models/ProposalVotesAllOf.ts
@@ -0,0 +1,72 @@
+/* tslint:disable */
+/* eslint-disable */
+/**
+ * Oasis Nexus API V1
+ * An API for accessing indexed data from the Oasis Network. # Endpoints
+ *
+ * The version of the OpenAPI document: 0.1.0
+ *
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
+ */
+
+import { exists, mapValues } from '../runtime';
+import {
+ ProposalVote,
+ ProposalVoteFromJSON,
+ ProposalVoteFromJSONTyped,
+ ProposalVoteToJSON,
+} from './';
+
+/**
+ * A list of votes for a governance proposal.
+ * @export
+ * @interface ProposalVotesAllOf
+ */
+export interface ProposalVotesAllOf {
+ /**
+ * The unique identifier of the proposal.
+ * @type {number}
+ * @memberof ProposalVotesAllOf
+ */
+ proposal_id: number;
+ /**
+ * The list of votes for the proposal.
+ * @type {Array}
+ * @memberof ProposalVotesAllOf
+ */
+ votes: Array;
+}
+
+export function ProposalVotesAllOfFromJSON(json: any): ProposalVotesAllOf {
+ return ProposalVotesAllOfFromJSONTyped(json, false);
+}
+
+export function ProposalVotesAllOfFromJSONTyped(json: any, ignoreDiscriminator: boolean): ProposalVotesAllOf {
+ if ((json === undefined) || (json === null)) {
+ return json;
+ }
+ return {
+
+ 'proposal_id': json['proposal_id'],
+ 'votes': ((json['votes'] as Array).map(ProposalVoteFromJSON)),
+ };
+}
+
+export function ProposalVotesAllOfToJSON(value?: ProposalVotesAllOf | null): any {
+ if (value === undefined) {
+ return undefined;
+ }
+ if (value === null) {
+ return null;
+ }
+ return {
+
+ 'proposal_id': value.proposal_id,
+ 'votes': ((value.votes as Array).map(ProposalVoteToJSON)),
+ };
+}
+
+
diff --git a/src/vendors/nexus/models/RoothashMessage.ts b/src/vendors/nexus/models/RoothashMessage.ts
new file mode 100644
index 0000000000..c28474d2ca
--- /dev/null
+++ b/src/vendors/nexus/models/RoothashMessage.ts
@@ -0,0 +1,141 @@
+/* tslint:disable */
+/* eslint-disable */
+/**
+ * Oasis Nexus API V1
+ * An API for accessing indexed data from the Oasis Network. # Endpoints
+ *
+ * The version of the OpenAPI document: 0.1.0
+ *
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
+ */
+
+import { exists, mapValues } from '../runtime';
+import {
+ RoothashMessageType,
+ RoothashMessageTypeFromJSON,
+ RoothashMessageTypeFromJSONTyped,
+ RoothashMessageTypeToJSON,
+} from './';
+
+/**
+ *
+ * @export
+ * @interface RoothashMessage
+ */
+export interface RoothashMessage {
+ /**
+ * The runtime that sent this message.
+ * @type {string}
+ * @memberof RoothashMessage
+ */
+ runtime: string;
+ /**
+ * The block round when the runtime sent this message.
+ * @type {number}
+ * @memberof RoothashMessage
+ */
+ round: number;
+ /**
+ * The 0-based index of this message in the block.
+ * @type {number}
+ * @memberof RoothashMessage
+ */
+ index: number;
+ /**
+ * The type of thies message.
+ * @type {RoothashMessageType}
+ * @memberof RoothashMessage
+ */
+ type?: RoothashMessageType;
+ /**
+ * The "body" of a message is a structure within the
+ * `github.com/oasisprotocol/oasis-core/go/roothash/api/message`
+ * `Message` structure
+ * (https://pkg.go.dev/github.com/oasisprotocol/oasis-core/go/roothash/api/message#Message).
+ * For example, if the type is `staking.withdraw`, the body is the Go
+ * `Message` structure's `.Staking.Withdraw` field, which is a
+ * `github.com/oasisprotocol/oasis-core/go/staking/api` `Withdraw`
+ * structure
+ * (https://pkg.go.dev/github.com/oasisprotocol/oasis-core/go/staking/api#Withdraw),
+ * with `from` and `amount` fields in JSON.
+ * @type {object}
+ * @memberof RoothashMessage
+ */
+ body?: object;
+ /**
+ * If executing this message resulted in an error, this is the
+ * error's module.
+ * @type {string}
+ * @memberof RoothashMessage
+ */
+ error_module?: string;
+ /**
+ * If executing this message resulted in an error, this is the
+ * error's code.
+ * @type {number}
+ * @memberof RoothashMessage
+ */
+ error_code?: number;
+ /**
+ * A result value that consensus provided after executing this
+ * message. These aren't centrally registered anywhere, so look at
+ * the consensus apps' `ExecuteMessage`
+ * (https://pkg.go.dev/github.com/oasisprotocol/oasis-core/go/consensus/cometbft/api#MessageSubscriber)
+ * implementations to see what they return. For example, a
+ * `staking.withdraw` type message gives a
+ * `github.com/oasisprotocol/oasis-core/go/staking/api`
+ * `WithdrawResult` structure as its result
+ * (`https://pkg.go.dev/github.com/oasisprotocol/oasis-core/go/staking/api#WithdrawResult`)
+ * with `owner`, `beneficiary`, `allowance`, and `amount_change`
+ * fields.
+ * @type {any}
+ * @memberof RoothashMessage
+ */
+ result?: any | null;
+}
+
+export function RoothashMessageFromJSON(json: any): RoothashMessage {
+ return RoothashMessageFromJSONTyped(json, false);
+}
+
+export function RoothashMessageFromJSONTyped(json: any, ignoreDiscriminator: boolean): RoothashMessage {
+ if ((json === undefined) || (json === null)) {
+ return json;
+ }
+ return {
+
+ 'runtime': json['runtime'],
+ 'round': json['round'],
+ 'index': json['index'],
+ 'type': !exists(json, 'type') ? undefined : RoothashMessageTypeFromJSON(json['type']),
+ 'body': !exists(json, 'body') ? undefined : json['body'],
+ 'error_module': !exists(json, 'error_module') ? undefined : json['error_module'],
+ 'error_code': !exists(json, 'error_code') ? undefined : json['error_code'],
+ 'result': !exists(json, 'result') ? undefined : json['result'],
+ };
+}
+
+export function RoothashMessageToJSON(value?: RoothashMessage | null): any {
+ if (value === undefined) {
+ return undefined;
+ }
+ if (value === null) {
+ return null;
+ }
+ return {
+
+ 'runtime': value.runtime,
+ 'round': value.round,
+ 'index': value.index,
+ 'type': RoothashMessageTypeToJSON(value.type),
+ 'body': value.body,
+ 'error_module': value.error_module,
+ 'error_code': value.error_code,
+ 'result': value.result,
+ };
+}
+
+
diff --git a/src/vendors/nexus/models/RoothashMessageList.ts b/src/vendors/nexus/models/RoothashMessageList.ts
new file mode 100644
index 0000000000..c26fecdf22
--- /dev/null
+++ b/src/vendors/nexus/models/RoothashMessageList.ts
@@ -0,0 +1,89 @@
+/* tslint:disable */
+/* eslint-disable */
+/**
+ * Oasis Nexus API V1
+ * An API for accessing indexed data from the Oasis Network. # Endpoints
+ *
+ * The version of the OpenAPI document: 0.1.0
+ *
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
+ */
+
+import { exists, mapValues } from '../runtime';
+import {
+ List,
+ ListFromJSON,
+ ListFromJSONTyped,
+ ListToJSON,
+ RoothashMessage,
+ RoothashMessageFromJSON,
+ RoothashMessageFromJSONTyped,
+ RoothashMessageToJSON,
+ RoothashMessageListAllOf,
+ RoothashMessageListAllOfFromJSON,
+ RoothashMessageListAllOfFromJSONTyped,
+ RoothashMessageListAllOfToJSON,
+} from './';
+
+/**
+ *
+ * @export
+ * @interface RoothashMessageList
+ */
+export interface RoothashMessageList {
+ /**
+ * The total number of records that match the query, i.e. the number of records
+ * the query would return with limit=infinity.
+ * @type {number}
+ * @memberof RoothashMessageList
+ */
+ total_count: number;
+ /**
+ * Whether total_count is clipped for performance reasons.
+ * @type {boolean}
+ * @memberof RoothashMessageList
+ */
+ is_total_count_clipped: boolean;
+ /**
+ *
+ * @type {Array}
+ * @memberof RoothashMessageList
+ */
+ roothash_messages: Array;
+}
+
+export function RoothashMessageListFromJSON(json: any): RoothashMessageList {
+ return RoothashMessageListFromJSONTyped(json, false);
+}
+
+export function RoothashMessageListFromJSONTyped(json: any, ignoreDiscriminator: boolean): RoothashMessageList {
+ if ((json === undefined) || (json === null)) {
+ return json;
+ }
+ return {
+
+ 'total_count': json['total_count'],
+ 'is_total_count_clipped': json['is_total_count_clipped'],
+ 'roothash_messages': ((json['roothash_messages'] as Array).map(RoothashMessageFromJSON)),
+ };
+}
+
+export function RoothashMessageListToJSON(value?: RoothashMessageList | null): any {
+ if (value === undefined) {
+ return undefined;
+ }
+ if (value === null) {
+ return null;
+ }
+ return {
+
+ 'total_count': value.total_count,
+ 'is_total_count_clipped': value.is_total_count_clipped,
+ 'roothash_messages': ((value.roothash_messages as Array).map(RoothashMessageToJSON)),
+ };
+}
+
+
diff --git a/src/vendors/nexus/models/RoothashMessageListAllOf.ts b/src/vendors/nexus/models/RoothashMessageListAllOf.ts
new file mode 100644
index 0000000000..23e6c5385c
--- /dev/null
+++ b/src/vendors/nexus/models/RoothashMessageListAllOf.ts
@@ -0,0 +1,64 @@
+/* tslint:disable */
+/* eslint-disable */
+/**
+ * Oasis Nexus API V1
+ * An API for accessing indexed data from the Oasis Network. # Endpoints
+ *
+ * The version of the OpenAPI document: 0.1.0
+ *
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
+ */
+
+import { exists, mapValues } from '../runtime';
+import {
+ RoothashMessage,
+ RoothashMessageFromJSON,
+ RoothashMessageFromJSONTyped,
+ RoothashMessageToJSON,
+} from './';
+
+/**
+ *
+ * @export
+ * @interface RoothashMessageListAllOf
+ */
+export interface RoothashMessageListAllOf {
+ /**
+ *
+ * @type {Array}
+ * @memberof RoothashMessageListAllOf
+ */
+ roothash_messages: Array;
+}
+
+export function RoothashMessageListAllOfFromJSON(json: any): RoothashMessageListAllOf {
+ return RoothashMessageListAllOfFromJSONTyped(json, false);
+}
+
+export function RoothashMessageListAllOfFromJSONTyped(json: any, ignoreDiscriminator: boolean): RoothashMessageListAllOf {
+ if ((json === undefined) || (json === null)) {
+ return json;
+ }
+ return {
+
+ 'roothash_messages': ((json['roothash_messages'] as Array).map(RoothashMessageFromJSON)),
+ };
+}
+
+export function RoothashMessageListAllOfToJSON(value?: RoothashMessageListAllOf | null): any {
+ if (value === undefined) {
+ return undefined;
+ }
+ if (value === null) {
+ return null;
+ }
+ return {
+
+ 'roothash_messages': ((value.roothash_messages as Array).map(RoothashMessageToJSON)),
+ };
+}
+
+
diff --git a/src/vendors/nexus/models/RoothashMessageType.ts b/src/vendors/nexus/models/RoothashMessageType.ts
new file mode 100644
index 0000000000..203ec3fd39
--- /dev/null
+++ b/src/vendors/nexus/models/RoothashMessageType.ts
@@ -0,0 +1,41 @@
+/* tslint:disable */
+/* eslint-disable */
+/**
+ * Oasis Nexus API V1
+ * An API for accessing indexed data from the Oasis Network. # Endpoints
+ *
+ * The version of the OpenAPI document: 0.1.0
+ *
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
+ */
+
+/**
+ *
+ * @export
+ * @enum {string}
+ */
+export enum RoothashMessageType {
+ StakingTransfer = 'staking.transfer',
+ StakingWithdraw = 'staking.withdraw',
+ StakingAddEscrow = 'staking.add_escrow',
+ StakingReclaimEscrow = 'staking.reclaim_escrow',
+ RegistryUpdateRuntime = 'registry.update_runtime',
+ GovernanceCastVote = 'governance.cast_vote',
+ GovernanceSubmitProposal = 'governance.submit_proposal'
+}
+
+export function RoothashMessageTypeFromJSON(json: any): RoothashMessageType {
+ return RoothashMessageTypeFromJSONTyped(json, false);
+}
+
+export function RoothashMessageTypeFromJSONTyped(json: any, ignoreDiscriminator: boolean): RoothashMessageType {
+ return json as RoothashMessageType;
+}
+
+export function RoothashMessageTypeToJSON(value?: RoothashMessageType | null): any {
+ return value as any;
+}
+
diff --git a/src/vendors/nexus/models/Runtime.ts b/src/vendors/nexus/models/Runtime.ts
new file mode 100644
index 0000000000..2fcde0e362
--- /dev/null
+++ b/src/vendors/nexus/models/Runtime.ts
@@ -0,0 +1,39 @@
+/* tslint:disable */
+/* eslint-disable */
+/**
+ * Oasis Nexus API V1
+ * An API for accessing indexed data from the Oasis Network. # Endpoints
+ *
+ * The version of the OpenAPI document: 0.1.0
+ *
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
+ */
+
+/**
+ *
+ * @export
+ * @enum {string}
+ */
+export enum Runtime {
+ Emerald = 'emerald',
+ Sapphire = 'sapphire',
+ Pontusxtest = 'pontusxtest',
+ Pontusxdev = 'pontusxdev',
+ Cipher = 'cipher'
+}
+
+export function RuntimeFromJSON(json: any): Runtime {
+ return RuntimeFromJSONTyped(json, false);
+}
+
+export function RuntimeFromJSONTyped(json: any, ignoreDiscriminator: boolean): Runtime {
+ return json as Runtime;
+}
+
+export function RuntimeToJSON(value?: Runtime | null): any {
+ return value as any;
+}
+
diff --git a/src/vendors/nexus/models/RuntimeAccount.ts b/src/vendors/nexus/models/RuntimeAccount.ts
new file mode 100644
index 0000000000..b03962bc6d
--- /dev/null
+++ b/src/vendors/nexus/models/RuntimeAccount.ts
@@ -0,0 +1,125 @@
+/* tslint:disable */
+/* eslint-disable */
+/**
+ * Oasis Nexus API V1
+ * An API for accessing indexed data from the Oasis Network. # Endpoints
+ *
+ * The version of the OpenAPI document: 0.1.0
+ *
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
+ */
+
+import { exists, mapValues } from '../runtime';
+import {
+ AccountStats,
+ AccountStatsFromJSON,
+ AccountStatsFromJSONTyped,
+ AccountStatsToJSON,
+ AddressPreimage,
+ AddressPreimageFromJSON,
+ AddressPreimageFromJSONTyped,
+ AddressPreimageToJSON,
+ RuntimeEvmBalance,
+ RuntimeEvmBalanceFromJSON,
+ RuntimeEvmBalanceFromJSONTyped,
+ RuntimeEvmBalanceToJSON,
+ RuntimeEvmContract,
+ RuntimeEvmContractFromJSON,
+ RuntimeEvmContractFromJSONTyped,
+ RuntimeEvmContractToJSON,
+ RuntimeSdkBalance,
+ RuntimeSdkBalanceFromJSON,
+ RuntimeSdkBalanceFromJSONTyped,
+ RuntimeSdkBalanceToJSON,
+} from './';
+
+/**
+ *
+ * @export
+ * @interface RuntimeAccount
+ */
+export interface RuntimeAccount {
+ /**
+ * The staking address for this account.
+ * @type {string}
+ * @memberof RuntimeAccount
+ */
+ address: string;
+ /**
+ *
+ * @type {AddressPreimage}
+ * @memberof RuntimeAccount
+ */
+ address_preimage?: AddressPreimage;
+ /**
+ * The balance(s) of this account in this runtime. Most runtimes use only one denomination, and thus
+ * produce only one balance here. These balances do not include "layer (n+1) tokens", i.e. tokens
+ * managed by smart contracts deployed in this runtime. For example, in EVM-compatible runtimes,
+ * this does not include ERC-20 tokens
+ * @type {Array}
+ * @memberof RuntimeAccount
+ */
+ balances: Array;
+ /**
+ * Data on the EVM smart contract associated with this account address. Only present for accounts
+ * that represent a smart contract on EVM.
+ * @type {RuntimeEvmContract}
+ * @memberof RuntimeAccount
+ */
+ evm_contract?: RuntimeEvmContract;
+ /**
+ * The balances of this account in each runtime, as managed by EVM smart contracts (notably, ERC-20).
+ * NOTE: This field is limited to 1000 entries. If you need more, please let us know in a GitHub issue.
+ * @type {Array}
+ * @memberof RuntimeAccount
+ */
+ evm_balances: Array;
+ /**
+ *
+ * @type {AccountStats}
+ * @memberof RuntimeAccount
+ */
+ stats: AccountStats;
+}
+
+export function RuntimeAccountFromJSON(json: any): RuntimeAccount {
+ return RuntimeAccountFromJSONTyped(json, false);
+}
+
+export function RuntimeAccountFromJSONTyped(json: any, ignoreDiscriminator: boolean): RuntimeAccount {
+ if ((json === undefined) || (json === null)) {
+ return json;
+ }
+ return {
+
+ 'address': json['address'],
+ 'address_preimage': !exists(json, 'address_preimage') ? undefined : AddressPreimageFromJSON(json['address_preimage']),
+ 'balances': ((json['balances'] as Array).map(RuntimeSdkBalanceFromJSON)),
+ 'evm_contract': !exists(json, 'evm_contract') ? undefined : RuntimeEvmContractFromJSON(json['evm_contract']),
+ 'evm_balances': ((json['evm_balances'] as Array).map(RuntimeEvmBalanceFromJSON)),
+ 'stats': AccountStatsFromJSON(json['stats']),
+ };
+}
+
+export function RuntimeAccountToJSON(value?: RuntimeAccount | null): any {
+ if (value === undefined) {
+ return undefined;
+ }
+ if (value === null) {
+ return null;
+ }
+ return {
+
+ 'address': value.address,
+ 'address_preimage': AddressPreimageToJSON(value.address_preimage),
+ 'balances': ((value.balances as Array).map(RuntimeSdkBalanceToJSON)),
+ 'evm_contract': RuntimeEvmContractToJSON(value.evm_contract),
+ 'evm_balances': ((value.evm_balances as Array).map(RuntimeEvmBalanceToJSON)),
+ 'stats': AccountStatsToJSON(value.stats),
+ };
+}
+
+
diff --git a/src/vendors/nexus/models/RuntimeBlock.ts b/src/vendors/nexus/models/RuntimeBlock.ts
new file mode 100644
index 0000000000..b7ac5660ee
--- /dev/null
+++ b/src/vendors/nexus/models/RuntimeBlock.ts
@@ -0,0 +1,97 @@
+/* tslint:disable */
+/* eslint-disable */
+/**
+ * Oasis Nexus API V1
+ * An API for accessing indexed data from the Oasis Network. # Endpoints
+ *
+ * The version of the OpenAPI document: 0.1.0
+ *
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
+ */
+
+import { exists, mapValues } from '../runtime';
+/**
+ * A ParaTime block.
+ * @export
+ * @interface RuntimeBlock
+ */
+export interface RuntimeBlock {
+ /**
+ * The block round.
+ * @type {number}
+ * @memberof RuntimeBlock
+ */
+ round: number;
+ /**
+ * The block header hash.
+ * @type {string}
+ * @memberof RuntimeBlock
+ */
+ hash: string;
+ /**
+ * The second-granular consensus time.
+ * @type {Date}
+ * @memberof RuntimeBlock
+ */
+ timestamp: Date;
+ /**
+ * The number of transactions in the block.
+ * @type {number}
+ * @memberof RuntimeBlock
+ */
+ num_transactions: number;
+ /**
+ * The total byte size of all transactions in the block.
+ * @type {number}
+ * @memberof RuntimeBlock
+ */
+ size: number;
+ /**
+ * The total gas used by all transactions in the block.
+ * @type {number}
+ * @memberof RuntimeBlock
+ */
+ gas_used: number;
+}
+
+export function RuntimeBlockFromJSON(json: any): RuntimeBlock {
+ return RuntimeBlockFromJSONTyped(json, false);
+}
+
+export function RuntimeBlockFromJSONTyped(json: any, ignoreDiscriminator: boolean): RuntimeBlock {
+ if ((json === undefined) || (json === null)) {
+ return json;
+ }
+ return {
+
+ 'round': json['round'],
+ 'hash': json['hash'],
+ 'timestamp': (new Date(json['timestamp'])),
+ 'num_transactions': json['num_transactions'],
+ 'size': json['size'],
+ 'gas_used': json['gas_used'],
+ };
+}
+
+export function RuntimeBlockToJSON(value?: RuntimeBlock | null): any {
+ if (value === undefined) {
+ return undefined;
+ }
+ if (value === null) {
+ return null;
+ }
+ return {
+
+ 'round': value.round,
+ 'hash': value.hash,
+ 'timestamp': (value.timestamp.toISOString()),
+ 'num_transactions': value.num_transactions,
+ 'size': value.size,
+ 'gas_used': value.gas_used,
+ };
+}
+
+
diff --git a/src/vendors/nexus/models/RuntimeBlockList.ts b/src/vendors/nexus/models/RuntimeBlockList.ts
new file mode 100644
index 0000000000..541fb7ff12
--- /dev/null
+++ b/src/vendors/nexus/models/RuntimeBlockList.ts
@@ -0,0 +1,89 @@
+/* tslint:disable */
+/* eslint-disable */
+/**
+ * Oasis Nexus API V1
+ * An API for accessing indexed data from the Oasis Network. # Endpoints
+ *
+ * The version of the OpenAPI document: 0.1.0
+ *
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
+ */
+
+import { exists, mapValues } from '../runtime';
+import {
+ List,
+ ListFromJSON,
+ ListFromJSONTyped,
+ ListToJSON,
+ RuntimeBlock,
+ RuntimeBlockFromJSON,
+ RuntimeBlockFromJSONTyped,
+ RuntimeBlockToJSON,
+ RuntimeBlockListAllOf,
+ RuntimeBlockListAllOfFromJSON,
+ RuntimeBlockListAllOfFromJSONTyped,
+ RuntimeBlockListAllOfToJSON,
+} from './';
+
+/**
+ *
+ * @export
+ * @interface RuntimeBlockList
+ */
+export interface RuntimeBlockList {
+ /**
+ * The total number of records that match the query, i.e. the number of records
+ * the query would return with limit=infinity.
+ * @type {number}
+ * @memberof RuntimeBlockList
+ */
+ total_count: number;
+ /**
+ * Whether total_count is clipped for performance reasons.
+ * @type {boolean}
+ * @memberof RuntimeBlockList
+ */
+ is_total_count_clipped: boolean;
+ /**
+ *
+ * @type {Array}
+ * @memberof RuntimeBlockList
+ */
+ blocks: Array;
+}
+
+export function RuntimeBlockListFromJSON(json: any): RuntimeBlockList {
+ return RuntimeBlockListFromJSONTyped(json, false);
+}
+
+export function RuntimeBlockListFromJSONTyped(json: any, ignoreDiscriminator: boolean): RuntimeBlockList {
+ if ((json === undefined) || (json === null)) {
+ return json;
+ }
+ return {
+
+ 'total_count': json['total_count'],
+ 'is_total_count_clipped': json['is_total_count_clipped'],
+ 'blocks': ((json['blocks'] as Array).map(RuntimeBlockFromJSON)),
+ };
+}
+
+export function RuntimeBlockListToJSON(value?: RuntimeBlockList | null): any {
+ if (value === undefined) {
+ return undefined;
+ }
+ if (value === null) {
+ return null;
+ }
+ return {
+
+ 'total_count': value.total_count,
+ 'is_total_count_clipped': value.is_total_count_clipped,
+ 'blocks': ((value.blocks as Array).map(RuntimeBlockToJSON)),
+ };
+}
+
+
diff --git a/src/vendors/nexus/models/RuntimeBlockListAllOf.ts b/src/vendors/nexus/models/RuntimeBlockListAllOf.ts
new file mode 100644
index 0000000000..94776d9fda
--- /dev/null
+++ b/src/vendors/nexus/models/RuntimeBlockListAllOf.ts
@@ -0,0 +1,64 @@
+/* tslint:disable */
+/* eslint-disable */
+/**
+ * Oasis Nexus API V1
+ * An API for accessing indexed data from the Oasis Network. # Endpoints
+ *
+ * The version of the OpenAPI document: 0.1.0
+ *
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
+ */
+
+import { exists, mapValues } from '../runtime';
+import {
+ RuntimeBlock,
+ RuntimeBlockFromJSON,
+ RuntimeBlockFromJSONTyped,
+ RuntimeBlockToJSON,
+} from './';
+
+/**
+ * A list of consensus blocks.
+ * @export
+ * @interface RuntimeBlockListAllOf
+ */
+export interface RuntimeBlockListAllOf {
+ /**
+ *
+ * @type {Array}
+ * @memberof RuntimeBlockListAllOf
+ */
+ blocks: Array;
+}
+
+export function RuntimeBlockListAllOfFromJSON(json: any): RuntimeBlockListAllOf {
+ return RuntimeBlockListAllOfFromJSONTyped(json, false);
+}
+
+export function RuntimeBlockListAllOfFromJSONTyped(json: any, ignoreDiscriminator: boolean): RuntimeBlockListAllOf {
+ if ((json === undefined) || (json === null)) {
+ return json;
+ }
+ return {
+
+ 'blocks': ((json['blocks'] as Array).map(RuntimeBlockFromJSON)),
+ };
+}
+
+export function RuntimeBlockListAllOfToJSON(value?: RuntimeBlockListAllOf | null): any {
+ if (value === undefined) {
+ return undefined;
+ }
+ if (value === null) {
+ return null;
+ }
+ return {
+
+ 'blocks': ((value.blocks as Array).map(RuntimeBlockToJSON)),
+ };
+}
+
+
diff --git a/src/vendors/nexus/models/RuntimeEvent.ts b/src/vendors/nexus/models/RuntimeEvent.ts
new file mode 100644
index 0000000000..336f6c477d
--- /dev/null
+++ b/src/vendors/nexus/models/RuntimeEvent.ts
@@ -0,0 +1,156 @@
+/* tslint:disable */
+/* eslint-disable */
+/**
+ * Oasis Nexus API V1
+ * An API for accessing indexed data from the Oasis Network. # Endpoints
+ *
+ * The version of the OpenAPI document: 0.1.0
+ *
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
+ */
+
+import { exists, mapValues } from '../runtime';
+import {
+ EvmAbiParam,
+ EvmAbiParamFromJSON,
+ EvmAbiParamFromJSONTyped,
+ EvmAbiParamToJSON,
+ EvmEventToken,
+ EvmEventTokenFromJSON,
+ EvmEventTokenFromJSONTyped,
+ EvmEventTokenToJSON,
+ RuntimeEventType,
+ RuntimeEventTypeFromJSON,
+ RuntimeEventTypeFromJSONTyped,
+ RuntimeEventTypeToJSON,
+} from './';
+
+/**
+ * An event emitted by the runtime layer
+ * @export
+ * @interface RuntimeEvent
+ */
+export interface RuntimeEvent {
+ /**
+ * The block height at which this event was generated.
+ * @type {number}
+ * @memberof RuntimeEvent
+ */
+ round: number;
+ /**
+ * 0-based index of this event's originating transaction within its block.
+ * Absent if the event did not originate from a transaction.
+ * @type {number}
+ * @memberof RuntimeEvent
+ */
+ tx_index?: number;
+ /**
+ * Hash of this event's originating transaction.
+ * Absent if the event did not originate from a transaction.
+ * @type {string}
+ * @memberof RuntimeEvent
+ */
+ tx_hash?: string;
+ /**
+ * Ethereum trasnsaction hash of this event's originating transaction.
+ * Absent if the event did not originate from an EVM transaction.
+ * @type {string}
+ * @memberof RuntimeEvent
+ */
+ eth_tx_hash?: string;
+ /**
+ * The second-granular consensus time of this event's block.
+ * @type {Date}
+ * @memberof RuntimeEvent
+ */
+ timestamp: Date;
+ /**
+ * The type of the event.
+ * @type {RuntimeEventType}
+ * @memberof RuntimeEvent
+ */
+ type: RuntimeEventType;
+ /**
+ * The decoded event contents, possibly augmented with additional address info.
+ * This spec does not encode the many possible types; instead, see [the Go API](https://pkg.go.dev/github.com/oasisprotocol/oasis-sdk/client-sdk/go/modules).
+ * This object will conform to one of the `*Event` types two levels down
+ * the hierarchy (e.g. `MintEvent` from `accounts > Event > MintEvent`),
+ * OR `evm > Event`. For object fields that specify an oasis-style address, Nexus
+ * will add a field specifying the corresponding Ethereum address, if known. Currently,
+ * the only such possible fields are `from_eth`, `to_eth`, and `owner_eth`.
+ * @type {object}
+ * @memberof RuntimeEvent
+ */
+ body: object;
+ /**
+ * If the event type is `evm.log`, this field describes the human-readable type of
+ * evm event, e.g. `Transfer`.
+ * Absent if the event type is not `evm.log`.
+ * @type {string}
+ * @memberof RuntimeEvent
+ */
+ evm_log_name?: string;
+ /**
+ * The decoded `evm.log` event data.
+ * Absent if the event type is not `evm.log`.
+ * @type {Array}
+ * @memberof RuntimeEvent
+ */
+ evm_log_params?: Array;
+ /**
+ *
+ * @type {EvmEventToken}
+ * @memberof RuntimeEvent
+ */
+ evm_token?: EvmEventToken;
+}
+
+export function RuntimeEventFromJSON(json: any): RuntimeEvent {
+ return RuntimeEventFromJSONTyped(json, false);
+}
+
+export function RuntimeEventFromJSONTyped(json: any, ignoreDiscriminator: boolean): RuntimeEvent {
+ if ((json === undefined) || (json === null)) {
+ return json;
+ }
+ return {
+
+ 'round': json['round'],
+ 'tx_index': !exists(json, 'tx_index') ? undefined : json['tx_index'],
+ 'tx_hash': !exists(json, 'tx_hash') ? undefined : json['tx_hash'],
+ 'eth_tx_hash': !exists(json, 'eth_tx_hash') ? undefined : json['eth_tx_hash'],
+ 'timestamp': (new Date(json['timestamp'])),
+ 'type': RuntimeEventTypeFromJSON(json['type']),
+ 'body': json['body'],
+ 'evm_log_name': !exists(json, 'evm_log_name') ? undefined : json['evm_log_name'],
+ 'evm_log_params': !exists(json, 'evm_log_params') ? undefined : ((json['evm_log_params'] as Array).map(EvmAbiParamFromJSON)),
+ 'evm_token': !exists(json, 'evm_token') ? undefined : EvmEventTokenFromJSON(json['evm_token']),
+ };
+}
+
+export function RuntimeEventToJSON(value?: RuntimeEvent | null): any {
+ if (value === undefined) {
+ return undefined;
+ }
+ if (value === null) {
+ return null;
+ }
+ return {
+
+ 'round': value.round,
+ 'tx_index': value.tx_index,
+ 'tx_hash': value.tx_hash,
+ 'eth_tx_hash': value.eth_tx_hash,
+ 'timestamp': (value.timestamp.toISOString()),
+ 'type': RuntimeEventTypeToJSON(value.type),
+ 'body': value.body,
+ 'evm_log_name': value.evm_log_name,
+ 'evm_log_params': value.evm_log_params === undefined ? undefined : ((value.evm_log_params as Array).map(EvmAbiParamToJSON)),
+ 'evm_token': EvmEventTokenToJSON(value.evm_token),
+ };
+}
+
+
diff --git a/src/vendors/nexus/models/RuntimeEventList.ts b/src/vendors/nexus/models/RuntimeEventList.ts
new file mode 100644
index 0000000000..24484731c7
--- /dev/null
+++ b/src/vendors/nexus/models/RuntimeEventList.ts
@@ -0,0 +1,89 @@
+/* tslint:disable */
+/* eslint-disable */
+/**
+ * Oasis Nexus API V1
+ * An API for accessing indexed data from the Oasis Network. # Endpoints
+ *
+ * The version of the OpenAPI document: 0.1.0
+ *
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
+ */
+
+import { exists, mapValues } from '../runtime';
+import {
+ List,
+ ListFromJSON,
+ ListFromJSONTyped,
+ ListToJSON,
+ RuntimeEvent,
+ RuntimeEventFromJSON,
+ RuntimeEventFromJSONTyped,
+ RuntimeEventToJSON,
+ RuntimeEventListAllOf,
+ RuntimeEventListAllOfFromJSON,
+ RuntimeEventListAllOfFromJSONTyped,
+ RuntimeEventListAllOfToJSON,
+} from './';
+
+/**
+ *
+ * @export
+ * @interface RuntimeEventList
+ */
+export interface RuntimeEventList {
+ /**
+ * The total number of records that match the query, i.e. the number of records
+ * the query would return with limit=infinity.
+ * @type {number}
+ * @memberof RuntimeEventList
+ */
+ total_count: number;
+ /**
+ * Whether total_count is clipped for performance reasons.
+ * @type {boolean}
+ * @memberof RuntimeEventList
+ */
+ is_total_count_clipped: boolean;
+ /**
+ *
+ * @type {Array}
+ * @memberof RuntimeEventList
+ */
+ events: Array;
+}
+
+export function RuntimeEventListFromJSON(json: any): RuntimeEventList {
+ return RuntimeEventListFromJSONTyped(json, false);
+}
+
+export function RuntimeEventListFromJSONTyped(json: any, ignoreDiscriminator: boolean): RuntimeEventList {
+ if ((json === undefined) || (json === null)) {
+ return json;
+ }
+ return {
+
+ 'total_count': json['total_count'],
+ 'is_total_count_clipped': json['is_total_count_clipped'],
+ 'events': ((json['events'] as Array).map(RuntimeEventFromJSON)),
+ };
+}
+
+export function RuntimeEventListToJSON(value?: RuntimeEventList | null): any {
+ if (value === undefined) {
+ return undefined;
+ }
+ if (value === null) {
+ return null;
+ }
+ return {
+
+ 'total_count': value.total_count,
+ 'is_total_count_clipped': value.is_total_count_clipped,
+ 'events': ((value.events as Array).map(RuntimeEventToJSON)),
+ };
+}
+
+
diff --git a/src/vendors/nexus/models/RuntimeEventListAllOf.ts b/src/vendors/nexus/models/RuntimeEventListAllOf.ts
new file mode 100644
index 0000000000..79e035c655
--- /dev/null
+++ b/src/vendors/nexus/models/RuntimeEventListAllOf.ts
@@ -0,0 +1,64 @@
+/* tslint:disable */
+/* eslint-disable */
+/**
+ * Oasis Nexus API V1
+ * An API for accessing indexed data from the Oasis Network. # Endpoints
+ *
+ * The version of the OpenAPI document: 0.1.0
+ *
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
+ */
+
+import { exists, mapValues } from '../runtime';
+import {
+ RuntimeEvent,
+ RuntimeEventFromJSON,
+ RuntimeEventFromJSONTyped,
+ RuntimeEventToJSON,
+} from './';
+
+/**
+ * A list of runtime events.
+ * @export
+ * @interface RuntimeEventListAllOf
+ */
+export interface RuntimeEventListAllOf {
+ /**
+ *
+ * @type {Array}
+ * @memberof RuntimeEventListAllOf
+ */
+ events: Array;
+}
+
+export function RuntimeEventListAllOfFromJSON(json: any): RuntimeEventListAllOf {
+ return RuntimeEventListAllOfFromJSONTyped(json, false);
+}
+
+export function RuntimeEventListAllOfFromJSONTyped(json: any, ignoreDiscriminator: boolean): RuntimeEventListAllOf {
+ if ((json === undefined) || (json === null)) {
+ return json;
+ }
+ return {
+
+ 'events': ((json['events'] as Array).map(RuntimeEventFromJSON)),
+ };
+}
+
+export function RuntimeEventListAllOfToJSON(value?: RuntimeEventListAllOf | null): any {
+ if (value === undefined) {
+ return undefined;
+ }
+ if (value === null) {
+ return null;
+ }
+ return {
+
+ 'events': ((value.events as Array).map(RuntimeEventToJSON)),
+ };
+}
+
+
diff --git a/src/vendors/nexus/models/RuntimeEventType.ts b/src/vendors/nexus/models/RuntimeEventType.ts
new file mode 100644
index 0000000000..ac23ec87ff
--- /dev/null
+++ b/src/vendors/nexus/models/RuntimeEventType.ts
@@ -0,0 +1,44 @@
+/* tslint:disable */
+/* eslint-disable */
+/**
+ * Oasis Nexus API V1
+ * An API for accessing indexed data from the Oasis Network. # Endpoints
+ *
+ * The version of the OpenAPI document: 0.1.0
+ *
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
+ */
+
+/**
+ *
+ * @export
+ * @enum {string}
+ */
+export enum RuntimeEventType {
+ AccountsTransfer = 'accounts.transfer',
+ AccountsBurn = 'accounts.burn',
+ AccountsMint = 'accounts.mint',
+ ConsensusAccountsDeposit = 'consensus_accounts.deposit',
+ ConsensusAccountsWithdraw = 'consensus_accounts.withdraw',
+ ConsensusAccountsDelegate = 'consensus_accounts.delegate',
+ ConsensusAccountsUndelegateStart = 'consensus_accounts.undelegate_start',
+ ConsensusAccountsUndelegateDone = 'consensus_accounts.undelegate_done',
+ CoreGasUsed = 'core.gas_used',
+ EvmLog = 'evm.log'
+}
+
+export function RuntimeEventTypeFromJSON(json: any): RuntimeEventType {
+ return RuntimeEventTypeFromJSONTyped(json, false);
+}
+
+export function RuntimeEventTypeFromJSONTyped(json: any, ignoreDiscriminator: boolean): RuntimeEventType {
+ return json as RuntimeEventType;
+}
+
+export function RuntimeEventTypeToJSON(value?: RuntimeEventType | null): any {
+ return value as any;
+}
+
diff --git a/src/vendors/nexus/models/RuntimeEvmBalance.ts b/src/vendors/nexus/models/RuntimeEvmBalance.ts
new file mode 100644
index 0000000000..ac254093c8
--- /dev/null
+++ b/src/vendors/nexus/models/RuntimeEvmBalance.ts
@@ -0,0 +1,112 @@
+/* tslint:disable */
+/* eslint-disable */
+/**
+ * Oasis Nexus API V1
+ * An API for accessing indexed data from the Oasis Network. # Endpoints
+ *
+ * The version of the OpenAPI document: 0.1.0
+ *
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
+ */
+
+import { exists, mapValues } from '../runtime';
+import {
+ EvmTokenType,
+ EvmTokenTypeFromJSON,
+ EvmTokenTypeFromJSONTyped,
+ EvmTokenTypeToJSON,
+} from './';
+
+/**
+ * Balance of an account for a specific runtime and EVM token.
+ * @export
+ * @interface RuntimeEvmBalance
+ */
+export interface RuntimeEvmBalance {
+ /**
+ * Number of tokens held, in base units.
+ * @type {string}
+ * @memberof RuntimeEvmBalance
+ */
+ balance: string;
+ /**
+ * The Oasis address of this token's contract.
+ * @type {string}
+ * @memberof RuntimeEvmBalance
+ */
+ token_contract_addr: string;
+ /**
+ * The EVM address of this token's contract.
+ * @type {string}
+ * @memberof RuntimeEvmBalance
+ */
+ token_contract_addr_eth: string;
+ /**
+ * The token ticker symbol. Not guaranteed to be unique across distinct EVM tokens.
+ * @type {string}
+ * @memberof RuntimeEvmBalance
+ */
+ token_symbol?: string;
+ /**
+ * The name of the token. Not guaranteed to be unique across distinct EVM tokens.
+ * @type {string}
+ * @memberof RuntimeEvmBalance
+ */
+ token_name?: string;
+ /**
+ *
+ * @type {EvmTokenType}
+ * @memberof RuntimeEvmBalance
+ */
+ token_type: EvmTokenType;
+ /**
+ * The number of decimals of precision for this token.
+ * @type {number}
+ * @memberof RuntimeEvmBalance
+ */
+ token_decimals: number;
+}
+
+export function RuntimeEvmBalanceFromJSON(json: any): RuntimeEvmBalance {
+ return RuntimeEvmBalanceFromJSONTyped(json, false);
+}
+
+export function RuntimeEvmBalanceFromJSONTyped(json: any, ignoreDiscriminator: boolean): RuntimeEvmBalance {
+ if ((json === undefined) || (json === null)) {
+ return json;
+ }
+ return {
+
+ 'balance': json['balance'],
+ 'token_contract_addr': json['token_contract_addr'],
+ 'token_contract_addr_eth': json['token_contract_addr_eth'],
+ 'token_symbol': !exists(json, 'token_symbol') ? undefined : json['token_symbol'],
+ 'token_name': !exists(json, 'token_name') ? undefined : json['token_name'],
+ 'token_type': EvmTokenTypeFromJSON(json['token_type']),
+ 'token_decimals': json['token_decimals'],
+ };
+}
+
+export function RuntimeEvmBalanceToJSON(value?: RuntimeEvmBalance | null): any {
+ if (value === undefined) {
+ return undefined;
+ }
+ if (value === null) {
+ return null;
+ }
+ return {
+
+ 'balance': value.balance,
+ 'token_contract_addr': value.token_contract_addr,
+ 'token_contract_addr_eth': value.token_contract_addr_eth,
+ 'token_symbol': value.token_symbol,
+ 'token_name': value.token_name,
+ 'token_type': EvmTokenTypeToJSON(value.token_type),
+ 'token_decimals': value.token_decimals,
+ };
+}
+
+
diff --git a/src/vendors/nexus/models/RuntimeEvmContract.ts b/src/vendors/nexus/models/RuntimeEvmContract.ts
new file mode 100644
index 0000000000..1e25e60251
--- /dev/null
+++ b/src/vendors/nexus/models/RuntimeEvmContract.ts
@@ -0,0 +1,114 @@
+/* tslint:disable */
+/* eslint-disable */
+/**
+ * Oasis Nexus API V1
+ * An API for accessing indexed data from the Oasis Network. # Endpoints
+ *
+ * The version of the OpenAPI document: 0.1.0
+ *
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
+ */
+
+import { exists, mapValues } from '../runtime';
+import {
+ RuntimeEvmContractVerification,
+ RuntimeEvmContractVerificationFromJSON,
+ RuntimeEvmContractVerificationFromJSONTyped,
+ RuntimeEvmContractVerificationToJSON,
+} from './';
+
+/**
+ *
+ * @export
+ * @interface RuntimeEvmContract
+ */
+export interface RuntimeEvmContract {
+ /**
+ * The Oasis cryptographic hash of the transaction that created the smart contract.
+ * Can be omitted for contracts that were created by another contract, as opposed
+ * to a direct `Create` call.
+ * @type {string}
+ * @memberof RuntimeEvmContract
+ */
+ creation_tx?: string;
+ /**
+ * The Ethereum transaction hash of the transaction in `creation_tx`.
+ * Encoded as a lowercase hex string.
+ * @type {string}
+ * @memberof RuntimeEvmContract
+ */
+ eth_creation_tx?: string;
+ /**
+ * The creation bytecode of the smart contract. This includes the constructor logic
+ * and the constructor parameters. When run, this code generates the runtime bytecode.
+ * Can be omitted for contracts that were created by another contract, as opposed
+ * to a direct `Create` call.
+ * @type {string}
+ * @memberof RuntimeEvmContract
+ */
+ creation_bytecode?: string;
+ /**
+ * The runtime bytecode of the smart contract. This is the code stored on-chain that
+ * describes a smart contract. Every contract has this info, but Nexus fetches
+ * it separately, so the field may be missing for very fresh contracts (or if the fetching
+ * process is stalled).
+ * @type {string}
+ * @memberof RuntimeEvmContract
+ */
+ runtime_bytecode?: string;
+ /**
+ * The total amount of gas used to create or call this contract.
+ * @type {number}
+ * @memberof RuntimeEvmContract
+ */
+ gas_used: number;
+ /**
+ * Additional information obtained from contract verification. Only available for smart
+ * contracts that have been verified successfully by Sourcify.
+ * @type {RuntimeEvmContractVerification}
+ * @memberof RuntimeEvmContract
+ */
+ verification?: RuntimeEvmContractVerification;
+}
+
+export function RuntimeEvmContractFromJSON(json: any): RuntimeEvmContract {
+ return RuntimeEvmContractFromJSONTyped(json, false);
+}
+
+export function RuntimeEvmContractFromJSONTyped(json: any, ignoreDiscriminator: boolean): RuntimeEvmContract {
+ if ((json === undefined) || (json === null)) {
+ return json;
+ }
+ return {
+
+ 'creation_tx': !exists(json, 'creation_tx') ? undefined : json['creation_tx'],
+ 'eth_creation_tx': !exists(json, 'eth_creation_tx') ? undefined : json['eth_creation_tx'],
+ 'creation_bytecode': !exists(json, 'creation_bytecode') ? undefined : json['creation_bytecode'],
+ 'runtime_bytecode': !exists(json, 'runtime_bytecode') ? undefined : json['runtime_bytecode'],
+ 'gas_used': json['gas_used'],
+ 'verification': !exists(json, 'verification') ? undefined : RuntimeEvmContractVerificationFromJSON(json['verification']),
+ };
+}
+
+export function RuntimeEvmContractToJSON(value?: RuntimeEvmContract | null): any {
+ if (value === undefined) {
+ return undefined;
+ }
+ if (value === null) {
+ return null;
+ }
+ return {
+
+ 'creation_tx': value.creation_tx,
+ 'eth_creation_tx': value.eth_creation_tx,
+ 'creation_bytecode': value.creation_bytecode,
+ 'runtime_bytecode': value.runtime_bytecode,
+ 'gas_used': value.gas_used,
+ 'verification': RuntimeEvmContractVerificationToJSON(value.verification),
+ };
+}
+
+
diff --git a/src/vendors/nexus/models/RuntimeEvmContractVerification.ts b/src/vendors/nexus/models/RuntimeEvmContractVerification.ts
new file mode 100644
index 0000000000..e4807ae954
--- /dev/null
+++ b/src/vendors/nexus/models/RuntimeEvmContractVerification.ts
@@ -0,0 +1,81 @@
+/* tslint:disable */
+/* eslint-disable */
+/**
+ * Oasis Nexus API V1
+ * An API for accessing indexed data from the Oasis Network. # Endpoints
+ *
+ * The version of the OpenAPI document: 0.1.0
+ *
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
+ */
+
+import { exists, mapValues } from '../runtime';
+import {
+ VerificationLevel,
+ VerificationLevelFromJSON,
+ VerificationLevelFromJSONTyped,
+ VerificationLevelToJSON,
+} from './';
+
+/**
+ *
+ * @export
+ * @interface RuntimeEvmContractVerification
+ */
+export interface RuntimeEvmContractVerification {
+ /**
+ *
+ * @type {VerificationLevel}
+ * @memberof RuntimeEvmContractVerification
+ */
+ verification_level?: VerificationLevel;
+ /**
+ * The smart contract's [metadata.json](https://docs.soliditylang.org/en/latest/metadata.html) file in JSON format as defined by Solidity.
+ * Includes the smart contract's [ABI](https://docs.soliditylang.org/en/develop/abi-spec.html).
+ * @type {object}
+ * @memberof RuntimeEvmContractVerification
+ */
+ compilation_metadata?: object;
+ /**
+ * Array of all contract source files, in JSON format as returned by [Sourcify](https://sourcify.dev/server/api-docs/#/Repository/get_files_any__chain___address_).
+ * @type {Array