@maestro-org/typescript-sdk
Version:
TypeScript SDK for the Maestro Dapp Platform
2,285 lines (2,237 loc) • 91.6 kB
text/typescript
/* eslint-disable no-use-before-define */
/* eslint-disable @typescript-eslint/no-empty-interface */
/**
* Type of staking-related action
* @export
* @enum {string}
*/
export const AccountAction = {
Registration: 'registration',
Deregistration: 'deregistration',
Delegation: 'delegation',
Withdrawal: 'withdrawal',
} as const;
export type AccountAction = (typeof AccountAction)[keyof typeof AccountAction];
/**
* Per-epoch information about a stake account
* @export
* @interface AccountDelegationHistory
*/
export interface AccountDelegationHistory {
/**
* Bech32 encoded pool ID the account was delegated to
* @type {string}
* @memberof AccountDelegationHistory
*/
pool_id: string;
/**
* Absolute slot of the block which contained the transactio
* @type {number}
* @memberof AccountDelegationHistory
*/
slot: number;
}
/**
* Per-epoch information about a stake account
* @export
* @interface AccountHistory
*/
export interface AccountHistory {
/**
* Active stake of the account in the epoch
* @type {number}
* @memberof AccountHistory
*/
active_stake: number;
/**
* Epoch number
* @type {number}
* @memberof AccountHistory
*/
epoch_no: number;
/**
* Bech32 encoded pool ID the account was delegated to
* @type {string}
* @memberof AccountHistory
*/
pool_id?: string | null;
}
/**
* Summary of information regarding a stake account
* @export
* @interface AccountInfo
*/
export interface AccountInfo {
/**
* Bech32 pool ID that the stake key is delegated to
* @type {string}
* @memberof AccountInfo
*/
delegated_pool?: string | null;
/**
* True if the stake key is registered
* @type {boolean}
* @memberof AccountInfo
*/
registered: boolean;
/**
* The amount of rewards that are available to be withdrawn
* @type {number}
* @memberof AccountInfo
*/
rewards_available: number;
/**
* Bech32 encoded stake address
* @type {string}
* @memberof AccountInfo
*/
stake_address: string;
/**
* Total balance controlled by the stake key (sum of UTxO and rewards)
* @type {number}
* @memberof AccountInfo
*/
total_balance: number;
/**
* Total rewards earned
* @type {number}
* @memberof AccountInfo
*/
total_rewarded: number;
/**
* Total rewards withdrawn
* @type {number}
* @memberof AccountInfo
*/
total_withdrawn: number;
/**
* Amount locked in UTxOs controlled by addresses with the stake key
* @type {number}
* @memberof AccountInfo
*/
utxo_balance: number;
}
/**
* Stake account related reward
* @export
* @interface AccountReward
*/
export interface AccountReward {
/**
* Reward amount
* @type {number}
* @memberof AccountReward
*/
amount: number;
/**
* Epoch in which the reward was earned
* @type {number}
* @memberof AccountReward
*/
earned_epoch: number;
/**
* Bech32 encoded pool ID (if relevant to reward type)
* @type {string}
* @memberof AccountReward
*/
pool_id: string;
/**
* Epoch at which the reward is spendable
* @type {number}
* @memberof AccountReward
*/
spendable_epoch: number;
/**
*
* @type {AccountStakingRewardType}
* @memberof AccountReward
*/
type: AccountStakingRewardType;
}
/**
* Type of stake account reward
* @export
* @enum {string}
*/
export const AccountRewardType = {
Member: 'member',
Leader: 'leader',
Treasury: 'treasury',
Reserves: 'reserves',
Refund: 'refund',
} as const;
export type AccountRewardType = (typeof AccountRewardType)[keyof typeof AccountRewardType];
/**
* Staking-related reward type
* @export
* @enum {string}
*/
export const AccountStakingRewardType = {
Member: 'member',
Leader: 'leader',
Refund: 'refund',
} as const;
export type AccountStakingRewardType = (typeof AccountStakingRewardType)[keyof typeof AccountStakingRewardType];
/**
* Stake account related update
* @export
* @interface AccountUpdate
*/
export interface AccountUpdate {
/**
* Absolute slot of the block which contained the transaction
* @type {number}
* @memberof AccountUpdate
*/
abs_slot: number;
/**
*
* @type {AccountAction}
* @memberof AccountUpdate
*/
action: AccountAction;
/**
* Epoch number in which the transaction occured
* @type {number}
* @memberof AccountUpdate
*/
epoch_no: number;
/**
* Transaction hash of the transaction which performed the action
* @type {string}
* @memberof AccountUpdate
*/
tx_hash: string;
}
/**
*
* @export
* @interface AdaAmount
*/
export interface AdaAmount {
ada: {
lovelace: number;
};
}
/**
* Information decoded from a Cardano address
* @export
* @interface AddressInfo
*/
export interface AddressInfo {
/**
*
* @type {string}
* @memberof AddressInfo
*/
bech32?: string | null;
/**
*
* @type {string}
* @memberof AddressInfo
*/
hex: string;
/**
*
* @type {NetworkId}
* @memberof AddressInfo
*/
network?: NetworkId | null;
/**
*
* @type {PaymentCredential}
* @memberof AddressInfo
*/
payment_cred?: PaymentCredential | null;
/**
*
* @type {StakingCredential}
* @memberof AddressInfo
*/
staking_cred?: StakingCredential | null;
}
/**
* Current Balance by payment credential
* @export
* @interface AddressBalance
*/
export interface AddressBalance {
/**
*
* @type {object}
* @memberof AddressBalance
*/
assets: object;
/**
*
* @type {string}
* @memberof AddressBalance
*/
lovelace: object;
}
/**
* Transaction which involved a specific address
* @export
* @interface AddressTransaction
*/
export interface AddressTransaction {
/**
* Address controlled at least one of the consumed UTxOs
* @type {boolean}
* @memberof AddressTransaction
*/
input: boolean;
/**
* Address controlled at least one of the produced UTxOs
* @type {boolean}
* @memberof AddressTransaction
*/
output: boolean;
/**
* Absolute slot of the block which contains the transaction
* @type {number}
* @memberof AddressTransaction
*/
slot: number;
/**
* Transaction hash
* @type {string}
* @memberof AddressTransaction
*/
tx_hash: string;
}
/**
* Lovelace or native asset
* @export
* @interface Asset
*/
export interface Asset {
/**
* Amount of the asset
* @type {string}
* @memberof Asset
*/
amount: string;
/**
* Asset (either `lovelace` or concatenation of hex encoded policy ID and asset name for native asset)
* @type {string}
* @memberof Asset
*/
unit: string;
}
/**
* Holder of a specific asset
* @export
* @interface AssetHolder
*/
export interface AssetHolder {
/**
* Address of the holder
* @type {string}
* @memberof AssetHolder
*/
address: string;
/**
* Amount of the asset owned by the holder
* @type {number}
* @memberof AssetHolder
*/
amount: number;
}
/**
* Account which controls some of a specific asset
* @export
* @interface AssetHolderAccount
*/
export interface AssetHolderAccount {
/**
* Stake/reward address for stake credential
* @type {string}
* @memberof AssetHolderAccount
*/
account: string;
/**
* Amount of the asset held by addresses which use the stake credential
* @type {number}
* @memberof AssetHolderAccount
*/
amount: number;
}
/**
* Asset of a specific policy
* @export
* @interface AssetInPolicy
*/
export interface AssetInPolicy {
/**
* Amount of the asset
* @type {number}
* @memberof AssetInPolicy
*/
amount: number;
/**
* Hex encoded asset name
* @type {string}
* @memberof AssetInPolicy
*/
name: string;
}
/**
* Information about a specific Cardano native-asset
* @export
* @interface AssetInfo
*/
export interface AssetInfo {
/**
* Hex encoding of the asset name
* @type {string}
* @memberof AssetInfo
*/
asset_name: string;
/**
* ASCII representation of the asset name
* @type {string}
* @memberof AssetInfo
*/
asset_name_ascii?: string | null;
/**
*
* @type {AssetStandards}
* @memberof AssetInfo
*/
asset_standards: AssetStandards;
/**
* Number of transactions which burned some of the asset
* @type {number}
* @memberof AssetInfo
*/
burn_tx_count: number;
/**
* CIP-14 fingerprint of the asset
* @type {string}
* @memberof AssetInfo
*/
fingerprint: string;
/**
* UNIX timestamp of the first mint transaction
* @type {number}
* @memberof AssetInfo
*/
first_mint_time: number;
/**
* Transaction hash of the first transaction which minted the asset
* @type {string}
* @memberof AssetInfo
*/
first_mint_tx: string;
/**
* Metadata of the most recent transaction which minted the asset
* @type {object}
* @memberof AssetInfo
*/
latest_mint_tx_metadata: object;
/**
* Number of transactions which minted some of the asset
* @type {number}
* @memberof AssetInfo
*/
mint_tx_count: number;
/**
*
* @type {TokenRegistryMetadata}
* @memberof AssetInfo
*/
token_registry_metadata?: TokenRegistryMetadata | null;
/**
* Current amount of the asset minted
* @type {number}
* @memberof AssetInfo
*/
total_supply: number;
}
/**
* Asset information corresponding to popular standards
* @export
* @interface AssetStandards
*/
export interface AssetStandards {
/**
* CIP-25 metadata for a specific asset
* @type {object}
* @memberof AssetStandards
*/
cip25_metadata: object;
/**
*
* @type {Cip68Metadata}
* @memberof AssetStandards
*/
cip68_metadata?: Cip68Metadata | null;
}
/**
* Transaction which moved or minted a specific asset
* @export
* @interface AssetTx
*/
export interface AssetTx {
/**
* Absolute slot of the block which includes the transaction
* @type {number}
* @memberof AssetTx
*/
slot: number;
/**
* UTC timestamp of the block which includes the transaction
* @type {string}
* @memberof AssetTx
*/
timestamp: string;
/**
* Transaction hash
* @type {string}
* @memberof AssetTx
*/
tx_hash: string;
}
/**
* UTxO which contains a specific asset
* @export
* @interface AssetUtxo
*/
export interface AssetUtxo {
/**
* Address which controls the UTxO
* @type {string}
* @memberof AssetUtxo
*/
address: string;
/**
* Amount of the asset contained in the UTxO
* @type {number}
* @memberof AssetUtxo
*/
amount: number;
/**
* UTxO transaction index
* @type {number}
* @memberof AssetUtxo
*/
index: number;
/**
* Absolute slot of block which produced the UTxO
* @type {number}
* @memberof AssetUtxo
*/
slot: number;
/**
* UTxO transaction hash
* @type {string}
* @memberof AssetUtxo
*/
tx_hash: string;
}
/**
* Block information
* @export
* @interface BlockInfo
*/
export interface BlockInfo {
/**
* Absolute slot when block was minted
* @type {number}
* @memberof BlockInfo
*/
absolute_slot: number;
/**
* Identifier of stake pool which minted the block
* @type {string}
* @memberof BlockInfo
*/
block_producer?: string | null;
/**
* Number of blocks which have been minted since the block
* @type {number}
* @memberof BlockInfo
*/
confirmations: number;
/**
* Epoch in which block was minted
* @type {number}
* @memberof BlockInfo
*/
epoch: number;
/**
* Epoch slot at which block was minted
* @type {number}
* @memberof BlockInfo
*/
epoch_slot: number;
/**
*
* @type {LedgerEra}
* @memberof BlockInfo
*/
era: LedgerEra;
/**
* Block hash
* @type {string}
* @memberof BlockInfo
*/
hash: string;
/**
* Block height (number)
* @type {number}
* @memberof BlockInfo
*/
height: number;
/**
*
* @type {OperationalCert}
* @memberof BlockInfo
*/
operational_certificate?: OperationalCert | null;
/**
* Block hash of the previous block
* @type {string}
* @memberof BlockInfo
*/
previous_block?: string | null;
/**
* Ledger protocol version (major, minor)
* @type {Array<BlockInfoProtocolVersionInner>}
* @memberof BlockInfo
*/
protocol_version: Array<BlockInfoProtocolVersionInner>;
/**
* Number of script invocations
* @type {number}
* @memberof BlockInfo
*/
script_invocations: number;
/**
* Size of the block in bytes
* @type {number}
* @memberof BlockInfo
*/
size: number;
/**
* UTC timestamp when the block was minted
* @type {string}
* @memberof BlockInfo
*/
timestamp: string;
/**
*
* @type {ExUnits}
* @memberof BlockInfo
*/
total_ex_units: ExUnits;
/**
* Total transaction fees collected for all transactions minted in the block
* @type {number}
* @memberof BlockInfo
*/
total_fees: number;
/**
* Total lovelace in outputs of transactions included in the block
* @type {string}
* @memberof BlockInfo
*/
total_output_lovelace: string;
/**
* Ordered transaction hashes for the transactions in the block
* @type {Array<string>}
* @memberof BlockInfo
*/
tx_hashes: Array<string>;
/**
* Null for Byron
* @type {string}
* @memberof BlockInfo
*/
vrf_key?: string | null;
}
/**
*
* @export
* @interface BlockInfoProtocolVersionInner
*/
export interface BlockInfoProtocolVersionInner {}
/**
*
* @export
* @interface BytesSize
*/
export interface BytesSize {
/**
*
* @type {number}
* @memberof BytesSize
*/
bytes: number;
}
/**
*
* @export
* @interface CertRedeemer
*/
export interface CertRedeemer {
/**
*
* @type {number}
* @memberof CertRedeemer
*/
cert_index: number;
/**
*
* @type {Datum}
* @memberof CertRedeemer
*/
data: Datum;
/**
*
* @type {Array<number>}
* @memberof CertRedeemer
*/
ex_units: Array<number>;
}
/**
* Certificates found in a transaction
* @export
* @interface Certificates
*/
export interface Certificates {
/**
* Instantaneous rewards certificates
* @type {Array<MirCert>}
* @memberof Certificates
*/
mir_transfers: Array<MirCert>;
/**
* Stake pool registration certificates
* @type {Array<PoolRegCert>}
* @memberof Certificates
*/
pool_registrations: Array<PoolRegCert>;
/**
* Stake pool retirement certificates
* @type {Array<PoolRetireCert>}
* @memberof Certificates
*/
pool_retirements: Array<PoolRetireCert>;
/**
* Stake key delegation certificates
* @type {Array<StakeDelegCert>}
* @memberof Certificates
*/
stake_delegations: Array<StakeDelegCert>;
/**
* Stake key deregistration certificates
* @type {Array<StakeRegCert>}
* @memberof Certificates
*/
stake_deregistrations: Array<StakeRegCert>;
/**
* Stake key registration certificates
* @type {Array<StakeRegCert>}
* @memberof Certificates
*/
stake_registrations: Array<StakeRegCert>;
}
/**
* Blockchain chain-tip (most recently adopted block)
* @export
* @interface ChainTip
*/
export interface ChainTip {
/**
* Block hash of the most recent block
* @type {string}
* @memberof ChainTip
*/
block_hash: string;
/**
* Height (number) of the most recent block
* @type {number}
* @memberof ChainTip
*/
height: number;
/**
* Absolute slot of the most recent block
* @type {number}
* @memberof ChainTip
*/
slot: number;
}
/**
*
* @export
* @enum {string}
*/
export const Cip68AssetType = {
ReferenceNft: 'reference_nft',
UserNft: 'user_nft',
UserFt: 'user_ft',
} as const;
export type Cip68AssetType = (typeof Cip68AssetType)[keyof typeof Cip68AssetType];
/**
*
* @export
* @interface Cip68Metadata
*/
export interface Cip68Metadata {
/**
* Custom user defined Plutus data
* @type {string}
* @memberof Cip68Metadata
*/
extra?: string | null;
/**
* Asset CIP-68 metadata
* @type {object}
* @memberof Cip68Metadata
*/
metadata: object;
/**
*
* @type {Cip68AssetType}
* @memberof Cip68Metadata
*/
purpose: Cip68AssetType;
/**
* CIP-68 version
* @type {number}
* @memberof Cip68Metadata
*/
version: number;
}
/**
*
* @export
* @interface ContractsVestingLockPost200Response
*/
export interface ContractsVestingLockPost200Response {
/**
*
* @type {string}
* @memberof ContractsVestingLockPost200Response
*/
cbor_hex?: string;
/**
*
* @type {string}
* @memberof ContractsVestingLockPost200Response
*/
tx_hash?: string;
}
/**
*
* @export
* @interface ContractsVestingLockPostRequest
*/
export interface ContractsVestingLockPostRequest {
/**
* Sender\'s bech32 address
* @type {string}
* @memberof ContractsVestingLockPostRequest
*/
sender: string;
/**
* Beneficiary\'s bech32 address
* @type {string}
* @memberof ContractsVestingLockPostRequest
*/
beneficiary: string;
/**
* Asset policy ID of the asset to be locked
* @type {string}
* @memberof ContractsVestingLockPostRequest
*/
asset_policy_id: string;
/**
* Asset policy token name of the asset to be locked
* @type {string}
* @memberof ContractsVestingLockPostRequest
*/
asset_token_name: string;
/**
* Total amount of the asset to be locked
* @type {number}
* @memberof ContractsVestingLockPostRequest
*/
total_vesting_quantity: number;
/**
* Vesting period start in UNIX time (seconds)
* @type {number}
* @memberof ContractsVestingLockPostRequest
*/
vesting_period_start: number;
/**
* Vesting period end in UNIX time (seconds)
* @type {number}
* @memberof ContractsVestingLockPostRequest
*/
vesting_period_end: number;
/**
* Valid initial unlock period start in UNIX time (seconds)
* @type {number}
* @memberof ContractsVestingLockPostRequest
*/
first_unlock_possible_after: number;
/**
* Number of vesting installments used to collect vested assets
* @type {number}
* @memberof ContractsVestingLockPostRequest
*/
total_installments: number;
/**
* An arbitrary note associated with locked assets
* @type {string}
* @memberof ContractsVestingLockPostRequest
*/
vesting_memo: string;
}
/**
* Information summary of the current epoch
* @export
* @interface CurrentEpochInfo
*/
export interface CurrentEpochInfo {
/**
* Total blocks in the epoch so far
* @type {number}
* @memberof CurrentEpochInfo
*/
blk_count: number;
/**
* Epoch number
* @type {number}
* @memberof CurrentEpochInfo
*/
epoch_no: number;
/**
* Total fees collected in the epoch so far
* @type {string}
* @memberof CurrentEpochInfo
*/
fees: string;
/**
* UNIX timestamp when the epoch began
* @type {number}
* @memberof CurrentEpochInfo
*/
start_time: number;
/**
* Total transactions in the epoch so far
* @type {number}
* @memberof CurrentEpochInfo
*/
tx_count: number;
}
/**
*
* @export
* @interface Data
*/
export interface Data {
/**
*
* @type {string}
* @memberof Data
*/
hash: string;
/**
*
* @type {object}
* @memberof Data
*/
value: object;
}
/**
*
* @export
* @interface Datum
*/
export interface Datum {
/**
* Hex encoded datum CBOR bytes
* @type {string}
* @memberof Datum
*/
bytes: string;
/**
* JSON representation of the datum
* @type {object}
* @memberof Datum
*/
json: object;
}
/**
* Datum (inline or hash)
* @export
* @interface DatumOption
*/
export interface DatumOption {
/**
* Hex encoded datum CBOR bytes (`null` if datum type is `hash` and corresponding datum bytes have not been seen on-chain)
* @type {string}
* @memberof DatumOption
*/
bytes?: string | null;
/**
* Datum hash
* @type {string}
* @memberof DatumOption
*/
hash: string;
/**
* JSON representation of the datum (`null` if datum type is `hash` and corresponding datum bytes have not been seen on-chain)
* @type {object}
* @memberof DatumOption
*/
json: object;
/**
*
* @type {DatumOptionType}
* @memberof DatumOption
*/
type: DatumOptionType;
}
/**
* Datum type (inline datum or datum hash)
* @export
* @enum {string}
*/
export const DatumOptionType = {
Hash: 'hash',
Inline: 'inline',
} as const;
export type DatumOptionType = (typeof DatumOptionType)[keyof typeof DatumOptionType];
/**
* Information summary of a delegator
* @export
* @interface DelegatorInfo
*/
export interface DelegatorInfo {
/**
* Delegator live stake
* @type {number}
* @memberof DelegatorInfo
*/
amount?: number | null;
/**
* Transaction hash relating to the most recent delegation
* @type {string}
* @memberof DelegatorInfo
*/
latest_delegation_tx_hash?: string | null;
/**
* Bech32 encoded stake address (reward address)
* @type {string}
* @memberof DelegatorInfo
*/
stake_address?: string | null;
}
/**
* Information summary of an epoch
* @export
* @interface EpochInfo
*/
export interface EpochInfo {
/**
* Total active stake in the epoch
* @type {string}
* @memberof EpochInfo
*/
active_stake?: string | null;
/**
* Average block reward in the epoch
* @type {string}
* @memberof EpochInfo
*/
average_reward?: string | null;
/**
* Total rewards in the epoch
* @type {string}
* @memberof EpochInfo
*/
total_rewards?: string | null;
/**
* Total blocks in the epoch
* @type {number}
* @memberof EpochInfo
*/
blk_count: number;
/**
* UNIX timestamp when the epoch ended
* @type {number}
* @memberof EpochInfo
*/
end_time: number;
/**
* Epoch number
* @type {number}
* @memberof EpochInfo
*/
epoch_no: number;
/**
* Total fees collected in the epoch
* @type {string}
* @memberof EpochInfo
*/
fees: string;
/**
* UNIX timestamp when the epoch began
* @type {number}
* @memberof EpochInfo
*/
start_time: number;
/**
* Total transactions in the epoch
* @type {number}
* @memberof EpochInfo
*/
tx_count: number;
}
/**
*
* @export
* @interface EraTime
*/
export interface EraTime {
/**
*
* @type {number}
* @memberof EraTime
*/
seconds: number;
}
/**
*
* @export
* @interface EraBound
*/
export interface EraBound {
/**
*
* @type {number}
* @memberof EraBound
*/
epoch: number;
/**
*
* @type {number}
* @memberof EraBound
*/
slot: number;
/**
*
* @type {EraTime}
* @memberof EraBound
*/
time: EraTime;
}
/**
*
* @export
* @interface SlotLength
*/
export interface SlotLength {
/**
*
* @type {number}
* @memberof SlotLength
*/
milliseconds: number;
}
/**
*
* @export
* @interface EraParameters
*/
export interface EraParameters {
/**
*
* @type {number}
* @memberof EraParameters
*/
epoch_length: number;
/**
*
* @type {SlotLength}
* @memberof EraParameters
*/
slot_length: SlotLength;
/**
*
* @type {number}
* @memberof EraParameters
*/
safe_zone: number;
}
/**
*
* @export
* @interface EraSummary
*/
export interface EraSummary {
/**
*
* @type {EraBound}
* @memberof EraSummary
*/
end: EraBound;
/**
*
* @type {EraParameters}
* @memberof EraSummary
*/
parameters: EraParameters;
/**
*
* @type {EraBound}
* @memberof EraSummary
*/
start: EraBound;
}
/**
* Execution units for Plutus scripts
* @export
* @interface ExUnit
*/
export interface ExUnit<T> {
/**
* Memory execution units
* @type {T}
* @memberof ExUnit
*/
memory: T;
/**
* CPU execution units
* @type {T}
* @memberof ExUnit
*/
cpu: T;
}
/**
*
* @export
* @interface ExUnits
*/
export interface ExUnits {
/**
*
* @type {number}
* @memberof ExUnits
*/
mem: number;
/**
*
* @type {number}
* @memberof ExUnits
*/
steps: number;
}
/**
* Details of the most recent block processed by the indexer (aka chain tip); that is, the data returned is correct as of this block in time.
* @export
* @interface LastUpdated
*/
export interface LastUpdated {
/**
* Hex-encoded hash of the most recently processed block (aka chain tip)
* @type {string}
* @memberof LastUpdated
*/
block_hash: string;
/**
* Absolute slot of the most recently processed block (aka chain tip)
* @type {number}
* @memberof LastUpdated
*/
block_slot: number;
/**
* UTC timestamp of when the most recently processed block was minted
* @type {string}
* @memberof LastUpdated
*/
timestamp: string;
}
/**
*
* @export
* @enum {string}
*/
export const LedgerEra = {
Byron: 'byron',
Shelley: 'shelley',
Allegra: 'allegra',
Mary: 'mary',
Alonzo: 'alonzo',
Vasil: 'vasil',
Valentine: 'valentine',
Conway: 'conway',
Notrecognised: 'notrecognised',
} as const;
export type LedgerEra = (typeof LedgerEra)[keyof typeof LedgerEra];
/**
* Lovelace or native asset
* @export
* @interface MintAsset
*/
export interface MintAsset {
/**
* Amount of the asset minted or burned (negative is burn)
* @type {number}
* @memberof MintAsset
*/
amount: number;
/**
* Asset (represented as concatenation of hex encoded policy ID and asset name)
* @type {string}
* @memberof MintAsset
*/
unit: string;
}
/**
*
* @export
* @interface MintRedeemer
*/
export interface MintRedeemer {
/**
*
* @type {Datum}
* @memberof MintRedeemer
*/
data: Datum;
/**
*
* @type {Array<number>}
* @memberof MintRedeemer
*/
ex_units: Array<number>;
/**
*
* @type {string}
* @memberof MintRedeemer
*/
policy: string;
}
/**
* Transaction which minted or burned a specific asset
* @export
* @interface MintingTx
*/
export interface MintingTx {
/**
* UNIX timestamp of the block which included transaction
* @type {number}
* @memberof MintingTx
*/
block_timestamp: number;
/**
* Transaction metadata
* @type {object}
* @memberof MintingTx
*/
metadata: object;
/**
* Amount of the asset minted or burned (negative if burned)
* @type {number}
* @memberof MintingTx
*/
mint_amount: number;
/**
* Transaction hash
* @type {string}
* @memberof MintingTx
*/
tx_hash: string;
}
/**
* Certificate for sending an instantaneous reward
* @export
* @interface MirCert
*/
export interface MirCert {
/**
* Index of the certificate in the transaction
* @type {number}
* @memberof MirCert
*/
cert_index: number;
/**
*
* @type {MirSource}
* @memberof MirCert
*/
from: MirSource;
/**
* Where the rewards funds are being sent
* @type {string}
* @memberof MirCert
*/
to: string;
}
/**
* The pot from which an MIR reward is being funded by
* @export
* @enum {string}
*/
export const MirSource = {
Reserves: 'reserves',
Treasury: 'treasury',
} as const;
export type MirSource = (typeof MirSource)[keyof typeof MirSource];
/**
*
* @export
* @enum {string}
*/
export const NetworkId = {
Mainnet: 'mainnet',
Testnet: 'testnet',
} as const;
export type NetworkId = (typeof NetworkId)[keyof typeof NetworkId];
/**
*
* @export
* @interface OperationalCert
*/
export interface OperationalCert {
/**
*
* @type {string}
* @memberof OperationalCert
*/
hot_vkey: string;
/**
*
* @type {number}
* @memberof OperationalCert
*/
kes_period: number;
/**
*
* @type {string}
* @memberof OperationalCert
*/
kes_signature: string;
/**
*
* @type {number}
* @memberof OperationalCert
*/
sequence_number: number;
}
/**
* A paginated response. Pass in the `next_cursor` in a subsequent request as the `cursor` query parameter to fetch the next page of results.
* @export
* @interface PaginatedAccountHistory
*/
export interface PaginatedAccountHistory {
/**
* Endpoint response data
* @type {Array<AccountHistory>}
* @memberof PaginatedAccountHistory
*/
data: Array<AccountHistory>;
/**
*
* @type {LastUpdated}
* @memberof PaginatedAccountHistory
*/
last_updated: LastUpdated;
/**
* Pagination cursor
* @type {string}
* @memberof PaginatedAccountHistory
*/
next_cursor?: string | null;
}
/**
* A paginated response. Pass in the `next_cursor` in a subsequent request as the `cursor` query parameter to fetch the next page of results.
* @export
* @interface PaginatedAccountDelegationHistory
*/
export interface PaginatedAccountDelegationHistory {
/**
* Endpoint response data
* @type {Array<AccountAction>}
* @memberof PaginatedAccountHistory
*/
data: Array<AccountDelegationHistory>;
/**
*
* @type {LastUpdated}
* @memberof PaginatedAccountDelegationHistory
*/
last_updated: LastUpdated;
/**
* Pagination cursor
* @type {string}
* @memberof PaginatedAccountDelegationHistory
*/
next_cursor?: string | null;
}
/**
* A paginated response. Pass in the `next_cursor` in a subsequent request as the `cursor` query parameter to fetch the next page of results.
* @export
* @interface PaginatedAccountReward
*/
export interface PaginatedAccountReward {
/**
* Endpoint response data
* @type {Array<AccountReward>}
* @memberof PaginatedAccountReward
*/
data: Array<AccountReward>;
/**
*
* @type {LastUpdated}
* @memberof PaginatedAccountReward
*/
last_updated: LastUpdated;
/**
* Pagination cursor
* @type {string}
* @memberof PaginatedAccountReward
*/
next_cursor?: string | null;
}
/**
* A paginated response. Pass in the `next_cursor` in a subsequent request as the `cursor` query parameter to fetch the next page of results.
* @export
* @interface PaginatedAccountUpdate
*/
export interface PaginatedAccountUpdate {
/**
* Endpoint response data
* @type {Array<AccountUpdate>}
* @memberof PaginatedAccountUpdate
*/
data: Array<AccountUpdate>;
/**
*
* @type {LastUpdated}
* @memberof PaginatedAccountUpdate
*/
last_updated: LastUpdated;
/**
* Pagination cursor
* @type {string}
* @memberof PaginatedAccountUpdate
*/
next_cursor?: string | null;
}
/**
* A paginated response. Pass in the `next_cursor` in a subsequent request as the `cursor` query parameter to fetch the next page of results.
* @export
* @interface PaginatedAddress
*/
export interface PaginatedAddress {
/**
* Endpoint response data
* @type {Array<string>}
* @memberof PaginatedAddress
*/
data: Array<string>;
/**
*
* @type {LastUpdated}
* @memberof PaginatedAddress
*/
last_updated: LastUpdated;
/**
* Pagination cursor
* @type {string}
* @memberof PaginatedAddress
*/
next_cursor?: string | null;
}
/**
* A paginated response. Pass in the `next_cursor` in a subsequent request as the `cursor` query parameter to fetch the next page of results.
* @export
* @interface PaginatedAddressTransaction
*/
export interface PaginatedAddressTransaction {
/**
* Endpoint response data
* @type {Array<AddressTransaction>}
* @memberof PaginatedAddressTransaction
*/
data: Array<AddressTransaction>;
/**
*
* @type {LastUpdated}
* @memberof PaginatedAddressTransaction
*/
last_updated: LastUpdated;
/**
* Pagination cursor
* @type {string}
* @memberof PaginatedAddressTransaction
*/
next_cursor?: string | null;
}
/**
* A paginated response. Pass in the `next_cursor` in a subsequent request as the `cursor` query parameter to fetch the next page of results.
* @export
* @interface PaginatedAsset
*/
export interface PaginatedAsset {
/**
* Endpoint response data
* @type {Array<Asset>}
* @memberof PaginatedAsset
*/
data: Array<Asset>;
/**
*
* @type {LastUpdated}
* @memberof PaginatedAsset
*/
last_updated: LastUpdated;
/**
* Pagination cursor
* @type {string}
* @memberof PaginatedAsset
*/
next_cursor?: string | null;
}
/**
* A paginated response. Pass in the `next_cursor` in a subsequent request as the `cursor` query parameter to fetch the next page of results.
* @export
* @interface PaginatedAssetHolder
*/
export interface PaginatedAssetHolder {
/**
* Endpoint response data
* @type {Array<AssetHolder>}
* @memberof PaginatedAssetHolder
*/
data: Array<AssetHolder>;
/**
*
* @type {LastUpdated}
* @memberof PaginatedAssetHolder
*/
last_updated: LastUpdated;
/**
* Pagination cursor
* @type {string}
* @memberof PaginatedAssetHolder
*/
next_cursor?: string | null;
}
/**
* A paginated response. Pass in the `next_cursor` in a subsequent request as the `cursor` query parameter to fetch the next page of results.
* @export
* @interface PaginatedAssetHolderAccount
*/
export interface PaginatedAssetHolderAccount {
/**
* Endpoint response data
* @type {Array<AssetHolderAccount>}
* @memberof PaginatedAssetHolderAccount
*/
data: Array<AssetHolderAccount>;
/**
*
* @type {LastUpdated}
* @memberof PaginatedAssetHolderAccount
*/
last_updated: LastUpdated;
/**
* Pagination cursor
* @type {string}
* @memberof PaginatedAssetHolderAccount
*/
next_cursor?: string | null;
}
/**
* A paginated response. Pass in the `next_cursor` in a subsequent request as the `cursor` query parameter to fetch the next page of results.
* @export
* @interface PaginatedAssetInfo
*/
export interface PaginatedAssetInfo {
/**
* Endpoint response data
* @type {Array<AssetInfo>}
* @memberof PaginatedAssetInfo
*/
data: Array<AssetInfo>;
/**
*
* @type {LastUpdated}
* @memberof PaginatedAssetInfo
*/
last_updated: LastUpdated;
/**
* Pagination cursor
* @type {string}
* @memberof PaginatedAssetInfo
*/
next_cursor?: string | null;
}
/**
* A paginated response. Pass in the `next_cursor` in a subsequent request as the `cursor` query parameter to fetch the next page of results.
* @export
* @interface PaginatedAssetTx
*/
export interface PaginatedAssetTx {
/**
* Endpoint response data
* @type {Array<AssetTx>}
* @memberof PaginatedAssetTx
*/
data: Array<AssetTx>;
/**
*
* @type {LastUpdated}
* @memberof PaginatedAssetTx
*/
last_updated: LastUpdated;
/**
* Pagination cursor
* @type {string}
* @memberof PaginatedAssetTx
*/
next_cursor?: string | null;
}
/**
* A paginated response. Pass in the `next_cursor` in a subsequent request as the `cursor` query parameter to fetch the next page of results.
* @export
* @interface PaginatedAssetUtxo
*/
export interface PaginatedAssetUtxo {
/**
* Endpoint response data
* @type {Array<AssetUtxo>}
* @memberof PaginatedAssetUtxo
*/
data: Array<AssetUtxo>;
/**
*
* @type {LastUpdated}
* @memberof PaginatedAssetUtxo
*/
last_updated: LastUpdated;
/**
* Pagination cursor
* @type {string}
* @memberof PaginatedAssetUtxo
*/
next_cursor?: string | null;
}
/**
* A paginated response. Pass in the `next_cursor` in a subsequent request as the `cursor` query parameter to fetch the next page of results.
* @export
* @interface PaginatedDelegatorInfo
*/
export interface PaginatedDelegatorInfo {
/**
* Endpoint response data
* @type {Array<DelegatorInfo>}
* @memberof PaginatedDelegatorInfo
*/
data: Array<DelegatorInfo>;
/**
*
* @type {LastUpdated}
* @memberof PaginatedDelegatorInfo
*/
last_updated: LastUpdated;
/**
* Pagination cursor
* @type {string}
* @memberof PaginatedDelegatorInfo
*/
next_cursor?: string | null;
}
/**
* A paginated response. Pass in the `next_cursor` in a subsequent request as the `cursor` query parameter to fetch the next page of results.
* @export
* @interface PaginatedMintingTx
*/
export interface PaginatedMintingTx {
/**
* Endpoint response data
* @type {Array<MintingTx>}
* @memberof PaginatedMintingTx
*/
data: Array<MintingTx>;
/**
*
* @type {LastUpdated}
* @memberof PaginatedMintingTx
*/
last_updated: LastUpdated;
/**
* Pagination cursor
* @type {string}
* @memberof PaginatedMintingTx
*/
next_cursor?: string | null;
}
/**
* A paginated response. Pass in the `next_cursor` in a subsequent request as the `cursor` query parameter to fetch the next page of results.
* @export
* @interface PaginatedPaymentCredentialTransaction
*/
export interface PaginatedPaymentCredentialTransaction {
/**
* Endpoint response data
* @type {Array<PaymentCredentialTransaction>}
* @memberof PaginatedPaymentCredentialTransaction
*/
data: Array<PaymentCredentialTransaction>;
/**
*
* @type {LastUpdated}
* @memberof PaginatedPaymentCredentialTransaction
*/
last_updated: LastUpdated;
/**
* Pagination cursor
* @type {string}
* @memberof PaginatedPaymentCredentialTransaction
*/
next_cursor?: string | null;
}
/**
* A paginated response. Pass in the `next_cursor` in a subsequent request as the `cursor` query parameter to fetch the next page of results.
* @export
* @interface PaginatedPolicyHolder
*/
export interface PaginatedPolicyHolder {
/**
* Endpoint response data
* @type {Array<PolicyHolder>}
* @memberof PaginatedPolicyHolder
*/
data: Array<PolicyHolder>;
/**
*
* @type {LastUpdated}
* @memberof PaginatedPolicyHolder
*/
last_updated: LastUpdated;
/**
* Pagination cursor
* @type {string}
* @memberof PaginatedPolicyHolder
*/
next_cursor?: string | null;
}
/**
* A paginated response. Pass in the `next_cursor` in a subsequent request as the `cursor` query parameter to fetch the next page of results.
* @export
* @interface PaginatedPolicyHolderAccount
*/
export interface PaginatedPolicyHolderAccount {
/**
* Endpoint response data
* @type {Array<PolicyHolderAccount>}
* @memberof PaginatedPolicyHolderAccount
*/
data: Array<PolicyHolderAccount>;
/**
*
* @type {LastUpdated}
* @memberof PaginatedPolicyHolderAccount
*/
last_updated: LastUpdated;
/**
* Pagination cursor
* @type {string}
* @memberof PaginatedPolicyHolderAccount
*/
next_cursor?: string | null;
}
/**
* A paginated response. Pass in the `next_cursor` in a subsequent request as the `cursor` query parameter to fetch the next page of results.
* @export
* @interface PaginatedPolicyUtxo
*/
export interface PaginatedPolicyUtxo {
/**
* Endpoint response data
* @type {Array<PolicyUtxo>}
* @memberof PaginatedPolicyUtxo
*/
data: Array<PolicyUtxo>;
/**
*
* @type {LastUpdated}
* @memberof PaginatedPolicyUtxo
*/
last_updated: LastUpdated;
/**
* Pagination cursor
* @type {string}
* @memberof PaginatedPolicyUtxo
*/
next_cursor?: string | null;
}
/**
* A paginated response. Pass in the `next_cursor` in a subsequent request as the `cursor` query parameter to fetch the next page of results.
* @export
* @interface PaginatedPoolBlock
*/
export interface PaginatedPoolBlock {
/**
* Endpoint response data
* @type {Array<PoolBlock>}
* @memberof PaginatedPoolBlock
*/
data: Array<PoolBlock>;
/**
*
* @type {LastUpdated}
* @memberof PaginatedPoolBlock
*/
last_updated: LastUpdated;
/**
* Pagination cursor
* @type {string}
* @memberof PaginatedPoolBlock
*/
next_cursor?: string | null;
}
/**
* A paginated response. Pass in the `next_cursor` in a subsequent request as the `cursor` query parameter to fetch the next page of results.
* @export
* @interface PaginatedPoolHistory
*/
export interface PaginatedPoolHistory {
/**
* Endpoint response data
* @type {Array<PoolHistory>}
* @memberof PaginatedPoolHistory
*/
data: Array<PoolHistory>;
/**
*
* @type {LastUpdated}
* @memberof PaginatedPoolHistory
*/
last_updated: LastUpdated;
/**
* Pagination cursor
* @type {string}
* @memberof PaginatedPoolHistory
*/
next_cursor?: string | null;
}
/**
* A paginated response. Pass in the `next_cursor` in a subsequent request as the `cursor` query parameter to fetch the next page of results.
* @export
* @interface PaginatedPoolListInfo
*/
export interface PaginatedPoolListInfo {
/**
* Endpoint response data
* @type {Array<PoolListInfo>}
* @memberof PaginatedPoolListInfo
*/
data: Array<PoolListInfo>;
/**
*
* @type {LastUpdated}
* @memberof PaginatedPoolListInfo
*/
last_updated: LastUpdated;
/**
* Pagination cursor
* @type {string}
* @memberof PaginatedPoolListInfo
*/
next_cursor?: string | null;
}
/**
* A paginated response. Pass in the `next_cursor` in a subsequent request as the `cursor` query parameter to fetch the next page of results.
* @export
* @interface PaginatedUtxoRef
*/
export interface PaginatedUtxoRef {
/**
* Endpoint response data
* @type {Array<UtxoRef>}
* @memberof PaginatedUtxoRef
*/
data: Array<UtxoRef>;
/**
*
* @type {LastUpdated}
* @memberof PaginatedUtxoRef
*/
last_updated: LastUpdated;
/**
* Pagination cursor
* @type {string}
* @memberof PaginatedUtxoRef
*/
next_cursor?: string | null;
}
/**
* A paginated response. Pass in the `next_cursor` in a subsequent request as the `cursor` query parameter to fetch the next page of results.
* @export
* @interface PaginatedUtxoWithBytes
*/
export interface PaginatedUtxoWithBytes {
/**
* Endpoint response data
* @type {Array<UtxoWithBytes>}
* @memberof PaginatedUtxoWithBytes
*/
data: Array<UtxoWithBytes>;
/**
*
* @type {LastUpdated}
* @memberof PaginatedUtxoWithBytes
*/
last_updated: LastUpdated;
/**
* Pagination cursor
* @type {string}
* @memberof PaginatedUtxoWithBytes
*/
next_cursor?: string | null;
}
/**
* A paginated response. Pass in the `next_cursor` in a subsequent request as the `cursor` query parameter to fetch the next page of results.
* @export
* @interface PaginatedUtxoWithSlot
*/
export interface PaginatedUtxoWithSlot {
/**
* Endpoint response data
* @type {Array<UtxoWithSlot>}
* @memberof PaginatedUtxoWithSlot
*/
data: Array<UtxoWithSlot>;
/**
*
* @type {LastUpdated}
* @memberof PaginatedUtxoWithSlot
*/
last_updated: LastUpdated;
/**
* Pagination cursor
* @type {string}
* @memberof PaginatedUtxoWithSlot
*/
next_cursor?: string | null;
}
/**
*
* @export
* @enum {string}
*/
export const PaymentCredKind = {
Key: 'key',
Script: 'script',
} as const;
export type PaymentCredKind = (typeof PaymentCredKind)[keyof typeof PaymentCredKind];
/**
* Payment credential, the payment part of a Cardano address
* @export
* @interface PaymentCredential
*/
export interface PaymentCredential {
/**
* Bech32-encoding of the credential key hash or script hash
* @type {string}
* @memberof PaymentCredential
*/
bech32: string;
/**
* Hex-encoding of the script or key credential
* @type {string}
* @memberof PaymentCredential
*/
hex: string;
/**
*
* @type {PaymentCredKind}
* @memberof PaymentCredential
*/
kind: PaymentCredKind;
}
/**
* Transaction which involved a specific address
* @export
* @interface PaymentCredentialTransaction
*/
export interface PaymentCredentialTransaction {
/**
* Payment credential controlled at least one of the consumed UTxOs
* @type {boolean}
* @memberof PaymentCredentialTransaction
*/
input: boolean;
/**
* Payment credential controlled at least one of the produced UTxOs
* @type {boolean}
* @memberof PaymentCredentialTransaction
*/
output: boolean;
/**
* Payment credential was an additional required signer
* @type {boolean}
* @memberof PaymentCredentialTransaction
*/
required_signer: boolean;
/**
* Absolute slot of the block which contains the transaction
* @type {number}
* @memberof PaymentCredentialTransaction
*/
slot: number;
/**
* Transaction hash
* @type {string}
* @memberof PaymentCredentialTransaction
*/
tx_hash: string;
}
/**
*
* @export
* @interface Pointer
*/
export interface Pointer {
/**
*
* @type {number}
* @memberof Pointer
*/
cert_index: number;
/**
*
* @type {number}
* @memberof Pointer
*/
slot: number;
/**
*
* @type {number}
* @memberof Pointer
*/
tx_index: number;
}
/**
* Holder of assets of a specific policy
* @export
* @interface PolicyHolder
*/
export interface PolicyHolder {
/**
* Address of the holder
* @type {string}
* @memberof PolicyHolder
*/
address: string;
/**
* List of assets owned by the holder belonging to the policy
* @type {Array<AssetInPolicy>}
* @memberof PolicyHolder
*/
assets: Array<AssetInPolicy>;
}
/**
* Account which controls some assets of a specific policy
* @export
* @interface PolicyHolderAccount
*/
export interface PolicyHolderAccount {
/**
* Address of the holder
* @type {string}
* @memberof PolicyHolderAccount
*/
account: string;
/**
* List of assets owned by the holder belonging to the policy
* @type {Array<AssetInPolicy>}
* @memberof PolicyHolderAccount
*/
assets: Array<AssetInPolicy>;
}
/**
* UTxO which contains assets of a specific policy
* @export
* @interface PolicyUtxo
*/
export interface PolicyUtxo {
/**
* Address which controls the UTxO
* @type {string}
* @memberof PolicyUtxo
*/
address: string;
/**
* List of assets contained in the UTxO belonging to the policy
* @type {Array<AssetInPolicy>}
* @memberof PolicyUtxo
*/
assets: Array<AssetInPolicy>;
/**
* UTxO transaction index
* @type {number}
* @memberof PolicyUtxo
*/
index: number;
/**
* Absolute slot of block which produced the UTxO
* @type {number}
* @memberof PolicyUtxo
*/
slot: number;
/**
* UTxO transaction hash
* @type {string}
* @memberof PolicyUtxo
*/
tx_hash: string;
}
/**
* Block created by a stake pool
* @export
* @interface PoolBlock
*/
export interface PoolBlock {
/**
* Absolute slot of the block
* @type {number}
* @memberof PoolBlock
*/
abs_slot?: number | null;
/**
* Block hash
* @type {string}
* @memberof PoolBlock
*/
block_hash: string;
/**
* Block height (block number)
* @type {number}
* @memberof PoolBlock
*/
block_height: number;
/**
* UNIX timestamp when the block was mined
* @type {number}
* @memberof PoolBlock
*/
block_time: number;
/**
* Epoch number
* @type {number}
* @memberof PoolBlock
*/
epoch_no?: number | null;
/**
* Epoch slot